:root {
  --bg: #fafaf9;
  --bg-2: #f1f1ef;
  --fg: #16181d;
  --muted: #5d6470;
  --line: #e2e2de;
  --accent: #0a7d5a;
  --accent-soft: rgba(10, 125, 90, .1);
  --term-bg: #0f1216;
  --term-fg: #d7dde5;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10; --bg-2: #13161b; --fg: #e8ebef; --muted: #9099a6;
    --line: #22262d; --accent: #3ddc97; --accent-soft: rgba(61, 220, 151, .1);
    --term-bg: #07090b; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d10; --bg-2: #13161b; --fg: #e8ebef; --muted: #9099a6;
  --line: #22262d; --accent: #3ddc97; --accent-soft: rgba(61, 220, 151, .1);
  --term-bg: #07090b; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -.04em; }
.logo span { color: var(--accent); }
.nav nav { margin-left: auto; display: flex; gap: 22px; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav nav a:hover { color: var(--fg); }
.theme-toggle {
  background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; color: var(--fg);
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* Hero */
.hero { padding-top: 88px; padding-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.hero > * { min-width: 0; }
.eyebrow { color: var(--muted); font-size: 13px; margin: 0; display: flex; align-items: center; gap: 10px; }
.eyebrow .dot { flex: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
h1 { font-size: clamp(44px, 9vw, 88px); font-weight: 700; letter-spacing: -.045em; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 680px; margin: 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line); text-decoration: none;
  font-weight: 600; font-size: 15px; transition: transform .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--fg); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.term {
  margin-top: 28px; background: var(--term-bg); color: var(--term-fg);
  border-radius: var(--radius); border: 1px solid #1f242b; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.45);
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid #1f242b; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c323a; }
.term-bar span { margin-left: 10px; font-size: 12px; color: #6b7480; }
.term pre { margin: 0; padding: 18px 20px 22px; font-size: 13.5px; line-height: 1.7; overflow-x: auto; }
.term .p { color: #3ddc97; } .term .h { color: #6b7480; } .term .ok { color: #3ddc97; } .term .s { color: #f5c36b; }
.cursor { display: inline-block; width: 8px; height: 1.1em; background: #3ddc97; vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding: 0; margin-top: 24px; max-width: 1000px; width: calc(100% - 40px); }
.stats div { background: var(--bg); padding: 22px; display: grid; gap: 4px; }
.stats strong { font-size: 22px; letter-spacing: -.02em; }
.stats span { color: var(--muted); font-size: 13px; }

/* Sections */
.section { padding-top: 96px; }
.section h2 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 36px; display: flex; align-items: baseline; gap: 14px; }
.num { font-size: 14px; color: var(--accent); font-weight: 500; letter-spacing: 0; }

.job { border-top: 1px solid var(--line); padding: 32px 0 8px; }
.job + .job { margin-top: 24px; }
.job-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.job h3 { font-size: 22px; }
.org { margin: 4px 0 0; color: var(--muted); }
.org a { color: var(--accent); text-decoration: none; }
.when { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.feats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feats li {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .2s;
}
.feats li:hover { border-color: var(--accent); }
.feats h4 { font-size: 16px; }
.feats p { margin: 0; color: var(--muted); font-size: 15px; }
.feats .tags { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--accent); }

.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; }
.skills h3 { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 6px; }
.card h3 { font-size: 18px; }
.card p { margin: 0; font-size: 14px; }
.kicker { color: var(--accent); font-size: 12px; }

.contact .lede { margin-bottom: 28px; }
.links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.links a {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; font-size: 17px;
  transition: border-color .2s, background .2s; overflow-wrap: anywhere;
}
.links a:hover { border-color: var(--accent); background: var(--accent-soft); }
.links .mono { font-size: 12px; color: var(--muted); font-weight: 400; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 72px; padding-bottom: 40px; color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .nav nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .hero { padding-top: 56px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .feats, .skills, .cards, .links { grid-template-columns: 1fr; }
  .section { padding-top: 72px; }
  .term pre { font-size: 11.5px; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
