/* ---------- Tokens ---------- */
:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-alt: #eef0ea;
  --ink: #14161a;
  --ink-soft: #565c63;
  --ink-faint: #8b9096;
  --line: #e1e2dc;
  --accent: #2f4cff;
  --accent-soft: #e7eaff;
  --accent-ink: #1f35c7;

  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;

  --max: 880px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101114;
    --surface: #17181c;
    --surface-alt: #1b1d21;
    --ink: #f0f1ee;
    --ink-soft: #a7acb2;
    --ink-faint: #6d7278;
    --line: #2a2c31;
    --accent: #7c90ff;
    --accent-soft: #202544;
    --accent-ink: #b3bfff;
  }
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

a { color: var(--accent-ink); }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 76px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 20px;
}
.hero-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 10vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.hero-role {
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
}
.hero-line {
  font-size: 16.5px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink-soft); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--surface-alt); }

.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
}
@media (max-width: 640px) {
  .section-grid { grid-template-columns: 1fr; gap: 16px; }
}

.section-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-num {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent-ink);
}

.section-content { max-width: 62ch; }
.lead { font-size: 17px; color: var(--ink); margin: 0 0 14px; }
.section-content p { color: var(--ink-soft); margin: 0 0 14px; }
.section-content p:last-child { margin-bottom: 0; }

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}
.timeline-item {
  position: relative;
  padding: 0 0 32px 28px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}
.timeline-date {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.timeline-title { font-weight: 700; margin: 0 0 2px; color: var(--ink); }
.timeline-org { font-size: 14.5px; color: var(--accent-ink); margin: 0 0 8px; font-weight: 500; }
.timeline-desc { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* ---------- Skills ---------- */
.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-list a {
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.contact-list a:hover { border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
  font-size: 13.5px;
  color: var(--ink-faint);
}
.footer-inner a { color: var(--ink-faint); text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }

/* ---------- Scroll reveal (progressive enhancement) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .reveal.in-view {
  opacity: 1;
  transform: none;
}
