/* ---------- Tokens ---------- */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --border: #e6e4df;
  --text: #17181c;
  --text-dim: #5c5f68;
  --text-faint: #8b8e97;
  --accent: #2f5fe0;
  --accent-soft: #eaefff;
  --radius: 12px;
  --maxw: 1040px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: "Space Grotesk", "Inter", sans-serif; line-height: 1.15; letter-spacing: -0.015em; font-weight: 600; }
::selection { background: var(--accent-soft); color: var(--accent); }

/* ---------- Layout ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 24px;
  border-top: 1px solid var(--border);
}
.section__head { margin-bottom: 44px; max-width: 600px; }
.section__title { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
.eyebrow {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 600;
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card--accent { border-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600; font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #2450c2; }
.btn--ghost { color: var(--text); border-color: var(--border); background: transparent; }
.btn--ghost:hover { border-color: var(--text-faint); }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; }
.btn--lg { padding: 15px 28px; font-size: 1rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto;
  padding: 20px 24px;
  background: var(--bg);
}
.nav.scrolled { border-bottom: 1px solid var(--border); }
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.nav__brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: #fff;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.8rem;
}
.nav__brand-name { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 0.9rem; color: var(--text-dim); transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--ease); }
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; top: 0; right: 0; z-index: 45;
  height: 100vh; width: min(78vw, 300px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
  padding: 100px 32px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: "Space Grotesk", sans-serif; font-size: 1.2rem; color: var(--text-dim);
  padding: 12px 0; border-bottom: 1px solid var(--border); transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--text); }

/* ---------- Pill ---------- */
.pill {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.82rem; font-weight: 500; margin-bottom: 24px;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 90px 24px 80px;
}
.hero__inner { max-width: 700px; }
.hero__title { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin-bottom: 22px; }
.hero__lead { font-size: clamp(1rem, 1.6vw, 1.1rem); color: var(--text-dim); max-width: 580px; margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.stat { display: flex; flex-direction: column; }
.stat__num { font-family: "Space Grotesk", sans-serif; font-size: clamp(1.6rem, 3.5vw, 2rem); font-weight: 600; }
.stat__label { font-size: 0.85rem; color: var(--text-faint); max-width: 150px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.about__body p { color: var(--text-dim); margin-bottom: 18px; font-size: 1rem; }
.about__body strong { color: var(--text); font-weight: 600; }
.about__card { padding: 26px; }
.about__card h3 { font-size: 0.95rem; margin-bottom: 16px; color: var(--text); }
.factlist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.factlist li { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.factlist li:last-child { border-bottom: 0; padding-bottom: 0; }
.factlist span { color: var(--text-faint); font-size: 0.88rem; }
.factlist strong { font-weight: 600; font-size: 0.9rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px;
  background: var(--border);
}
.tl-item { position: relative; margin-bottom: 20px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-item__marker {
  position: absolute; left: -28px; top: 24px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text-faint);
}
.tl-item__marker--accent { border-color: var(--accent); background: var(--accent); }
.tl-item__content { padding: 22px 24px; transition: border-color 0.2s; }
.tl-item__content:hover { border-color: var(--text-faint); }
.tl-item__top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.tl-item__top h3 { font-size: 1.1rem; }
.tl-item__date { font-size: 0.8rem; color: var(--text-faint); font-family: "Space Grotesk", sans-serif; white-space: nowrap; }
.tl-item__org { color: var(--text-faint); font-size: 0.88rem; margin: 4px 0 12px; }
.tl-item__content p:last-child { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill { padding: 26px; transition: border-color 0.2s; }
.skill:hover { border-color: var(--text-faint); }
.skill__icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 8px; margin-bottom: 16px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 1.15rem;
}
.skill h3 { font-size: 1.05rem; margin-bottom: 8px; }
.skill p { color: var(--text-dim); font-size: 0.92rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.tags span {
  padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-dim);
}

/* ---------- Interests ---------- */
.interests-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.interest { padding: 26px; transition: border-color 0.2s; }
.interest:hover { border-color: var(--text-faint); }
.interest__emoji { font-size: 1.6rem; display: block; margin-bottom: 12px; }
.interest h3 { font-size: 1.05rem; margin-bottom: 8px; }
.interest p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact__card { padding: clamp(32px, 5vw, 56px); text-align: center; }
.contact__title { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 10px 0 16px; }
.contact__lead { color: var(--text-dim); max-width: 460px; margin: 0 auto 28px; font-size: 1.02rem; }
.contact__form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 540px; margin: 44px auto 0; text-align: left; }
.field { position: relative; }
.field--full { grid-column: 1 / -1; }
.field input, .field textarea {
  width: 100%; padding: 17px 14px 7px; font-family: inherit; font-size: 0.92rem;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; resize: vertical;
  transition: border-color 0.2s;
}
.field textarea { padding-top: 19px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field label {
  position: absolute; left: 14px; top: 13px; color: var(--text-faint); font-size: 0.92rem;
  pointer-events: none; transition: 0.2s var(--ease);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: 5px; font-size: 0.68rem; color: var(--accent);
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 36px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer__brand { font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.footer p { color: var(--text-faint); font-size: 0.86rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .skills-grid, .interests-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .skills-grid, .interests-grid { grid-template-columns: 1fr; }
  .contact__form { grid-template-columns: 1fr; }
  .hero__stats { gap: 28px; }
  .section { padding: 60px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
