:root {
  --floor: #040509; --panel: #0d0f14; --panel2: #141821; --line: #232836;
  --text: #e8eaf0; --soft: #c9ced8; --muted: #9aa3ad;
  --amber: #ffc25c; --cyan: #4fd2ff; --glint: #e8fbff; --coral: #ff6f86;
  --magenta: #e05cf0; --blue2: #7cc4ff;
  --sans: "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--floor); color: var(--text); font: 17px/1.6 var(--sans); }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 30px; margin-bottom: 10px; }
h3 { font-size: 20px; margin: 4px 0 8px; }
em { color: var(--glint); font-style: italic; }
code { font-size: 0.9em; color: var(--soft); }
.amber { color: var(--amber); } .cyan { color: var(--cyan); } .grey { color: var(--muted); }
.magenta { color: var(--magenta); } .blue2 { color: var(--blue2); }
.small { font-size: 13px; color: var(--muted); }

.hero { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.15fr); gap: 40px;
  align-items: center; max-width: 1320px; margin: 0 auto; padding: 56px 32px 24px; min-height: 92vh; }
.kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.hero h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1.02; font-weight: 600;
  background: linear-gradient(90deg, #fff 0%, var(--glint) 40%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 20px; line-height: 1.55; color: var(--soft); margin: 22px 0 26px; max-width: 34em; }
.jump { display: flex; flex-wrap: wrap; gap: 10px; }
.jump a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--soft); }
.jump a:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }
.sweep { margin: 0; position: relative; }
.sweep canvas { width: 100%; aspect-ratio: 1 / 1; display: block; }
.sweep figcaption, figure figcaption { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin-top: 10px; max-width: 60em; }
figcaption b { color: var(--soft); font-weight: 600; }
.replay { position: absolute; right: 4px; top: 4px; background: rgba(13,15,20,.8); color: var(--soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font: 13px var(--sans); cursor: pointer; }
.replay:hover { color: var(--amber); border-color: var(--amber); }

main section { max-width: 1180px; margin: 0 auto; padding: 72px 32px 24px; }
.section-lede { color: var(--soft); max-width: 46em; margin: 0 0 30px; font-size: 18px; }

.about { display: grid; grid-template-columns: 280px 1fr; gap: 44px; align-items: start; }
.about img { width: 280px; height: 440px; object-fit: cover; object-position: 50% 20%; border-radius: 6px;
  filter: saturate(.9); box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(79,210,255,.35); }
.about p { color: var(--soft); max-width: 44em; }
.quote { font-family: var(--serif); font-size: 21px; line-height: 1.5; color: var(--text) !important;
  border-left: 2px solid var(--amber); padding-left: 18px; margin: 22px 0; }
.facts { list-style: none; padding: 0; margin: 20px 0 6px; display: flex; flex-wrap: wrap; gap: 28px; }
.facts li { color: var(--muted); font-size: 14px; }
.facts b { display: block; font-size: 34px; color: var(--text); font-weight: 600; line-height: 1.1; }

.thread { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line);
  border-radius: 10px; padding: 24px 26px; }
.card p { color: var(--soft); margin: 0 0 10px; }
.when { font-size: 13px !important; letter-spacing: 0.06em; text-transform: uppercase; color: var(--amber) !important; }
.meta { font-size: 14px !important; color: var(--muted) !important; }
.card b { color: var(--text); font-weight: 600; }

.timeline { margin-top: 44px; position: relative; height: 168px; }
.timeline .axis { position: absolute; left: 0; right: 0; top: 74px; height: 1px;
  background: linear-gradient(90deg, rgba(79,210,255,.1), rgba(79,210,255,.6)); }
.timeline .ev { position: absolute; transform: translateX(-50%); font-size: 12px; color: var(--muted);
  text-align: center; width: 120px; line-height: 1.3; }
.timeline .ev.up { bottom: 82px; } .timeline .ev.down { top: 82px; }
.timeline .ev::after { content: ""; position: absolute; left: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 10px var(--cyan); transform: translateX(-50%); }
.timeline .ev.up::after { bottom: -12px; } .timeline .ev.down::after { top: -12px; }
.timeline .ev b { display: block; color: var(--soft); font-weight: 600; }
.timeline .yr { position: absolute; top: 150px; font-size: 11px; color: #4c5262; transform: translateX(-50%); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.stat { border-top: 1px solid var(--line); padding-top: 12px; }
.stat b { display: block; font-size: 34px; font-weight: 600; line-height: 1.15; }
.stat span { color: var(--muted); font-size: 14px; }
figure.wide { margin: 10px 0 36px; position: relative; }
figure.wide canvas { width: 100%; display: block; border-radius: 8px; background: #05060b; border: 1px solid #10131b; }
#river { height: 330px; } #flows { height: 520px; } #days { height: 420px; } #skills { height: 560px; cursor: crosshair; } #cites { height: 260px; }
.tip { position: absolute; max-width: 340px; background: rgba(13,15,20,.95); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--soft); pointer-events: none; z-index: 2; }
.tip b { color: var(--text); display: block; margin-bottom: 4px; }

.repos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 10px 0 40px; }
.repo { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; color: var(--soft); }
.repo:hover { border-color: var(--cyan); text-decoration: none; box-shadow: 0 0 30px -12px var(--cyan); }
.repo h3 { color: var(--cyan); font-size: 18px; }
.repo .kind { font-size: 11.5px !important; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); margin: 0 0 2px !important; }
.repo p { font-size: 14.5px; margin: 0; line-height: 1.55; }

.pubs { padding-left: 22px; color: var(--soft); }
.pubs li { margin-bottom: 12px; font-size: 15.5px; }
.pubs b { color: var(--text); font-weight: 600; }
.links { display: flex; gap: 18px; }
.talks { list-style: none; padding: 0; margin: 0; }
.talks li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid #141821; color: var(--soft); font-size: 15.5px; }
.talks span { color: var(--amber); font-variant-numeric: tabular-nums; }
.essay { display: block; background: radial-gradient(120% 140% at 0% 0%, #13202e 0%, var(--panel) 55%);
  border: 1px solid var(--line); border-radius: 12px; padding: 30px 34px; color: var(--soft); max-width: 900px; }
.essay:hover { border-color: var(--amber); text-decoration: none; }
.essay h3 { font-size: 28px; color: var(--text); }
.essay p:nth-of-type(2) { font-family: var(--serif); font-size: 18.5px; line-height: 1.6; }
.colophon p { color: var(--soft); max-width: 50em; font-size: 15.5px; }
.colophon b { color: var(--text); }
footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 26px; padding: 50px 20px 70px; border-top: 1px solid #10131b; margin-top: 50px; }
footer a { color: var(--muted); font-size: 14px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 36px; }
  .about { grid-template-columns: 1fr; } .about img { width: 220px; height: 330px; }
  .thread, .repos { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); }
  .timeline { display: none; } #skills { height: 420px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 13px; color: var(--soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
h3.sub { font-size: 22px; margin: 36px 0 8px; }
.glossary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 6px 0 40px; }
.cat { background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--c); border-radius: 10px; padding: 16px 18px; }
.cat h3 { font-size: 16.5px; color: var(--text); margin: 0 0 6px; display: flex; gap: 9px; align-items: center; }
.cat h3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); flex: none; }
.cat p { font-size: 14px; line-height: 1.5; color: var(--soft); margin: 0 0 12px; }
.bars span { display: block; position: relative; height: 18px; margin-top: 4px; background: #0a0c12; border-radius: 3px; overflow: hidden; }
.bars b { position: absolute; left: 0; top: 0; bottom: 0; opacity: .55; min-width: 2px; }
.bars em { position: absolute; left: 7px; top: 0; font-style: normal; font-size: 11.5px; color: var(--text); line-height: 18px; white-space: nowrap; }
@media (max-width: 900px) { .glossary { grid-template-columns: 1fr; } }
