:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6760;
  --line: #e7e3db;
  --accent: #0f6e63;
  --accent-soft: #e3f1ee;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121311;
    --surface: #1a1c19;
    --text: #ecebe6;
    --muted: #a19e96;
    --line: #2b2e2a;
    --accent: #5fc4b4;
    --accent-soft: #1b2d29;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121311; --surface: #1a1c19; --text: #ecebe6; --muted: #a19e96;
  --line: #2b2e2a; --accent: #5fc4b4; --accent-soft: #1b2d29; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { font-family: Newsreader, Georgia, serif; font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: 2rem; margin: 0 0 1.5rem; }
h3 { margin: 0; font-size: 1rem; font-weight: 600; }

.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 880px; margin: 0 auto; padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: Newsreader, Georgia, serif; font-size: 1.15rem; color: var(--text); font-weight: 500; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; transition: transform .2s; }
.brand:hover svg { transform: rotate(-8deg); }
@media (max-width: 420px) { .brand span { display: none; } }
.nav__links { display: flex; gap: 22px; font-size: 0.92rem; }
.nav__links a { color: var(--muted); }
.nav__links a:hover { color: var(--text); text-decoration: none; }

main { max-width: 880px; margin: 0 auto; padding: 0 24px; }
section { padding: 56px 0; border-top: 1px solid var(--line); }
section:first-child, .now, .stats { border-top: 0; }

.hero > *, .stats > *, .skills > *, .creds > *, .job__body { min-width: 0; }
.hero { display: grid; grid-template-columns: 168px 1fr; gap: 40px; align-items: start; padding-top: 64px; }
.hero__photo { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 6px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1.05; margin: 0 0 12px; }
.lede { font-size: 1.25rem; font-weight: 500; margin: 0 0 14px; }
.intro { color: var(--muted); margin: 0 0 24px; max-width: 60ch; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 0.92rem; font-weight: 500;
  transition: border-color .15s, transform .15s;
}
.pill:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.pill svg { width: 16px; height: 16px; }

.now { padding: 8px 0 24px; }
.now__text p { margin: 0; }
.now__text p + p { margin-top: 10px; }
.now__text {
  margin: 0; padding: 20px 24px; border-radius: 14px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 16px 0 56px; }
.stats div { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.stats strong { display: block; font-family: Newsreader, Georgia, serif; font-size: 1.9rem; font-weight: 500; line-height: 1.1; }
.stats span { font-size: 0.85rem; color: var(--muted); line-height: 1.35; display: block; margin-top: 4px; }

.timeline { display: flex; flex-direction: column; }
.job { display: grid; grid-template-columns: 24px 1fr; gap: 16px; }
.job__rail { position: relative; display: flex; justify-content: center; }
.job__rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.job:first-child .job__rail::before { top: 10px; }
.job:last-child .job__rail::before { bottom: auto; height: 10px; }
.job__dot { position: relative; margin-top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); }
.job--current .job__dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.job__body { padding-bottom: 36px; }
.job__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.job__head h3 { font-size: 1.08rem; }
.at { color: var(--accent); font-weight: 600; }
.job__head time { font-size: 0.88rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.job__summary { margin: 4px 0 8px; color: var(--muted); }
.job ul:not(.tags) { margin: 0 0 12px; padding-left: 18px; }
.job ul:not(.tags) li { margin: 4px 0; }
.job ul:not(.tags) li::marker { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tags li { font-size: 0.78rem; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }

.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill, .creds > div { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.skill h3, .creds h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 6px; }
.skill p, .creds p { margin: 0; font-size: 0.93rem; }
.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

.contact p { color: var(--muted); max-width: 56ch; margin: 0 0 20px; }
.footer { max-width: 880px; margin: 0 auto; padding: 24px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .skills { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  main, .nav, .footer { padding-left: 16px; padding-right: 16px; }
  .nav__links { gap: 14px; }
  .hero { grid-template-columns: 1fr; gap: 20px; padding-top: 32px; }
  .hero__photo { width: 112px; height: 112px; }
  .skills, .creds, .stats { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pill, .brand svg { transition: none; }
}
