/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --color-dark: #2c3e50;
  --color-dark-alt: #1b2631;
  --color-primary: #3498db;
  --color-primary-dark: #2980b9;
  --color-warn: #e67e22;
  --color-light-bg: #f5f6fa;
  --color-white: #ffffff;
  --color-text: #333333;
  --color-muted: #7f8c8d;
  --font-heading: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  --nav-height: 70px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.7;
  background: var(--color-white);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
}

.section-dark {
  background: var(--color-dark);
  color: #e8ecef;
}

.section-light {
  background: var(--color-light-bg);
}

.section-eyebrow {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-eyebrow-light {
  color: #5dade2;
}

.section-title-light {
  color: var(--color-white);
}

.section-lead {
  max-width: 620px;
  color: var(--color-muted);
  margin-top: 14px;
  margin-bottom: 40px;
}

h2 { font-size: 32px; }

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 14px 30px;
  border-radius: 3px;
  border: 2px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover { background: var(--color-primary-dark); }

.btn-outline {
  border-color: rgba(255,255,255,0.6);
  color: var(--color-white);
}

.btn-outline:hover {
  border-color: var(--color-white);
  background: rgba(255,255,255,0.08);
}

.btn-large { font-size: 16px; padding: 16px 36px; }

/* ==========================================================================
   Navbar
   ========================================================================== */
#masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--color-dark);
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.navbar {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  color: var(--color-white);
}

.logo span { color: var(--color-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #cfd8dc;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
  border-color: var(--color-primary);
}

.nav-cta {
  background: var(--color-primary);
  color: var(--color-white) !important;
  padding: 8px 18px;
  border-radius: 3px;
  border-bottom: none !important;
}

.nav-cta:hover { background: var(--color-primary-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  display: block;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100vh;
  background: var(--color-dark);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: var(--nav-height) 24px 100px;
}

.hero-inner { max-width: 700px; }

.hero-eyebrow {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2.5px;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 46px;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  color: #cfd8dc;
  margin-bottom: 36px;
}

.hero-buttons {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
}

.hero-divider svg {
  width: 100%;
  height: 60px;
  display: block;
}

.hero-divider polygon {
  fill: var(--color-white);
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  align-items: center;
}

.avatar-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(52, 152, 219, 0.35);
  overflow: hidden;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.about-text h2 { margin-bottom: 20px; }
.about-text p { margin-bottom: 16px; color: var(--color-text); }
.about-text p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline {
  position: relative;
  margin-top: 50px;
  padding-left: 40px;
  border-left: 3px solid rgba(255,255,255,0.15);
}

.timeline-item {
  position: relative;
  padding-bottom: 50px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -49px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-dark);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.4);
}

.timeline-duration {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-primary);
  background: rgba(52, 152, 219, 0.12);
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.timeline-content h3 {
  font-size: 22px;
  color: var(--color-white);
  margin-bottom: 4px;
}

.timeline-org {
  font-weight: 600;
  color: #9fb4c4;
  margin-bottom: 12px;
}

.timeline-content p:not(.timeline-org) {
  color: #c7d1d8;
  max-width: 640px;
}

.timeline-content a { color: var(--color-primary); font-weight: 600; }
.timeline-content a:hover { text-decoration: underline; }

/* ==========================================================================
   Projects
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 10px;
}

.project-card {
  background: var(--color-white);
  border-top: 4px solid var(--color-primary);
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
  border-radius: 4px;
  padding: 34px;
}

.project-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(52, 152, 219, 0.1);
  padding: 5px 10px;
  border-radius: 3px;
  margin-bottom: 16px;
}

.project-tag-warn {
  color: var(--color-warn);
  background: rgba(230, 126, 34, 0.12);
}

.project-card h3 { font-size: 22px; margin-bottom: 4px; }

.project-meta {
  color: var(--color-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.project-card > p:not(.project-meta) {
  color: var(--color-text);
  margin-bottom: 20px;
}

.project-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--color-primary);
}

.project-link i { margin-left: 4px; font-size: 12px; }

.project-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

.project-link:hover { color: var(--color-primary-dark); }

/* ==========================================================================
   Skills
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 20px;
}

.skill-group h4 {
  font-size: 16px;
  margin-bottom: 18px;
  color: var(--color-dark);
}

.skill-group h4 i { color: var(--color-primary); margin-right: 8px; }

.skill-pills li {
  display: inline-block;
  background: var(--color-white);
  border: 1px solid #dfe6e9;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  padding: 8px 14px;
  border-radius: 3px;
  margin: 0 8px 8px 0;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-inner { text-align: center; }

.contact-lead {
  max-width: 520px;
  margin: 0 auto 36px;
  color: #c7d1d8;
}

.contact-inner .btn { margin-bottom: 30px; }
.contact-inner .btn i { margin-right: 8px; }

.social-links {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.social-links a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  color: var(--color-white);
  font-size: 18px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.social-links a:hover {
  border-color: var(--color-primary);
  background: rgba(52, 152, 219, 0.15);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--color-dark-alt);
  color: #8494a0;
  text-align: center;
  padding: 26px 0;
  font-size: 13px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .project-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero h1 { font-size: 34px; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open { max-height: 400px; }

  .nav-links li { width: 100%; }

  .nav-link {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid transparent;
  }

  .nav-link.active, .nav-link:hover {
    border-color: var(--color-primary);
    background: rgba(255,255,255,0.03);
  }

  .nav-cta { margin: 16px 24px; display: inline-block; width: calc(100% - 48px); text-align: center; }

  .timeline { padding-left: 30px; }
  .timeline-dot { left: -38px; }
}
