/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --paper: #faf9f6;
  --paper-raised: #ffffff;
  --ink: #16181d;
  --ink-soft: #4b4f58;
  --ink-faint: #868a93;
  --line: #e7e4dd;
  --line-strong: #d8d4ca;
  --accent: #3b3ff2;
  --accent-ink: #ffffff;
  --accent-soft: #eceaff;
  --accent-2: #0f8b7f;
  --accent-2-soft: #e4f4f1;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --shadow-sm: 0 1px 2px rgba(22, 24, 29, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 24, 29, 0.08);
  --shadow-lg: 0 24px 64px rgba(22, 24, 29, 0.12);
  --max-w: 1120px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 112px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: none; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; color: var(--ink); }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { color: var(--ink-soft); font-size: 17px; margin-top: 14px; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-cta {
  padding: 9px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 180px 0 96px;
  border-top: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 64px;
  align-items: end;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-2);
  background: var(--accent-2-soft);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.hero-kicker .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(15, 139, 127, 0.18);
}
.hero h1 {
  font-size: clamp(40px, 5.6vw, 68px);
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 560px;
  margin-top: 26px;
}
.hero-actions { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

.hero-aside {
  border-left: 1px solid var(--line);
  padding-left: 36px;
}
.hero-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.hero-meta-row:first-child { padding-top: 0; }
.hero-meta-row span:first-child { color: var(--ink-faint); }
.hero-meta-row span:last-child { font-weight: 600; text-align: right; }

.hero-strip {
  margin-top: 88px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-stat {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}
.hero-stat:last-child { border-right: none; }
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  color: var(--ink);
}
.hero-stat .label { font-size: 13.5px; color: var(--ink-faint); margin-top: 4px; }

/* ============================================================
   About
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; }
.about-copy p { font-size: 17px; color: var(--ink-soft); margin: 0 0 18px; }
.about-copy p:last-child { margin-bottom: 0; }
.about-list { display: flex; flex-direction: column; gap: 22px; }
.about-list li {
  display: flex;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.about-list li:last-child { border-bottom: none; padding-bottom: 0; }
.about-list .mark {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.about-list h4 { font-size: 16px; margin-bottom: 4px; font-family: var(--font-sans); font-weight: 600; }
.about-list p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* ============================================================
   Experience
   ============================================================ */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item:first-child { padding-top: 0; }
.timeline-item:last-child { border-bottom: none; padding-bottom: 0; }
.timeline-date { font-size: 14px; color: var(--ink-faint); font-weight: 600; padding-top: 4px; }
.timeline-date .current {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-2-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.timeline-role { font-size: 21px; font-family: var(--font-display); font-weight: 600; }
.timeline-org { font-size: 15px; color: var(--accent); font-weight: 600; margin-top: 2px; }
.timeline-body { margin-top: 16px; color: var(--ink-soft); font-size: 15.5px; display: flex; flex-direction: column; gap: 9px; }
.timeline-body li { position: relative; padding-left: 20px; }
.timeline-body li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line-strong);
}

/* ============================================================
   Projects
   ============================================================ */
.project-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--paper-raised);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.project-feature:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.project-feature-media {
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  min-height: 280px;
}
.project-feature-media img { width: 100%; height: auto; }
.project-feature-body { padding: 44px 44px 44px 0; display: flex; flex-direction: column; justify-content: center; }
.project-feature:nth-child(even) { direction: rtl; }
.project-feature:nth-child(even) > * { direction: ltr; }
.project-feature:nth-child(even) .project-feature-body { padding: 44px 0 44px 44px; }
.project-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.project-feature-body h3 { font-size: 26px; margin-bottom: 14px; }
.project-feature-body p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 20px; }
.project-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: var(--accent-2-soft);
  color: var(--accent-2);
  padding: 8px 14px;
  border-radius: var(--radius-s);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  width: fit-content;
}
.tech-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-pill {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 28px;
  background: var(--paper-raised);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.project-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--line-strong); }
.project-card h4 { font-size: 17px; margin-bottom: 10px; font-family: var(--font-sans); font-weight: 700; }
.project-card p { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 16px; }

/* ============================================================
   Skills
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.skill-group { background: var(--paper-raised); padding: 30px 32px; }
.skill-group h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-family: var(--font-sans); font-weight: 700; margin-bottom: 16px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-tags span { font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); padding: 6px 12px; border-radius: var(--radius-s); }

/* ============================================================
   Credentials
   ============================================================ */
.credentials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.credential-card { background: var(--paper-raised); padding: 30px; }
.credential-card .cred-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 14px; }
.credential-card ul { display: flex; flex-direction: column; gap: 10px; }
.credential-card li { font-size: 14.5px; color: var(--ink-soft); }
.credential-card li strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   Contact
   ============================================================ */
.contact-wrap {
  background: var(--ink);
  border-radius: var(--radius-l);
  padding: 72px;
  color: var(--paper);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.contact-wrap h2 { color: var(--paper); font-size: clamp(28px, 3.2vw, 38px); }
.contact-wrap p { color: rgba(250, 249, 246, 0.7); font-size: 16px; margin-top: 16px; max-width: 460px; }
.contact-wrap .btn-primary { background: var(--accent); }
.contact-links { display: flex; flex-direction: column; gap: 0; border-left: 1px solid rgba(250, 249, 246, 0.15); padding-left: 40px; }
.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(250, 249, 246, 0.12);
  font-size: 15px;
  font-weight: 600;
}
.contact-link:last-child { border-bottom: none; padding-bottom: 0; }
.contact-link span:first-child { color: rgba(250, 249, 246, 0.5); font-weight: 500; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.contact-link:hover span:last-child { color: var(--accent-soft); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-faint);
}
.footer a:hover { color: var(--ink); }

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  section { padding: 72px 0; }
  .hero { padding: 140px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-aside { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  .hero-strip { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2) { border-right: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .project-feature, .project-feature:nth-child(even) { grid-template-columns: 1fr; direction: ltr; }
  .project-feature-body, .project-feature:nth-child(even) .project-feature-body { padding: 32px; }
  .project-grid { grid-template-columns: 1fr; }
  .skills-grid, .credentials-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; padding: 40px 28px; }
  .contact-links { border-left: none; padding-left: 0; border-top: 1px solid rgba(250,249,246,0.15); padding-top: 24px; }
  .nav-links { position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: var(--paper); flex-direction: column; justify-content: flex-start; align-items: flex-start; padding: 36px 28px; gap: 24px; transform: translateX(100%); transition: transform 0.25s ease; }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { font-size: 18px; }
  .nav-toggle { display: block; }
}
