/* ───────────── tokens ───────────── */
:root {
  --bg: #0d0e0b;
  --bg-2: #13150f;
  --surface: #171912;
  --line: #2a2d22;
  --line-2: #3a3e30;
  --text: #ece8dc;
  --muted: #9b988a;
  --dim: #6a6a5e;
  --accent: #d4f25a;
  --accent-ink: #121407;
  --danger: #ff5d5d;

  --c-appliance: #d4f25a;
  --c-arena: #ff6b5d;
  --c-phones: #5ad1f2;
  --c-field: #5af2a6;
  --c-retail: #c78bff;
  --c-power: #f2b45a;
  --c-courses: #8ea6ff;
  --c-other: #77776c;
  --c-todo: #b9ad8f;
  --c-battleship: #8fb3c9;
  --c-memory: #d9a2b8;
  --c-cart: #c9b06b;
  --c-finshark: #7fc4b4;
  --c-hotel: #ff9f6b;
  --c-dental: #f27ad6;
  --c-broker: #ffd23f;

  --heat-0: #1b1d16;
  --heat-1: #34401a;
  --heat-2: #5f7a22;
  --heat-3: #9cc23a;
  --heat-4: #d4f25a;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --rail: 0px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3efe4;
  --bg-2: #ebe6d8;
  --surface: #fbf8f0;
  --line: #d8d2c0;
  --line-2: #c4bda8;
  --text: #17180f;
  --muted: #5d5b4f;
  --dim: #8b887a;
  --accent: #4d6b00;
  --accent-ink: #f3efe4;
  --danger: #c4301f;

  --c-appliance: #5f8500;
  --c-arena: #d43c2c;
  --c-phones: #0f87ab;
  --c-field: #12925a;
  --c-retail: #7c3fc4;
  --c-power: #b8700f;
  --c-courses: #3e5bd6;
  --c-other: #8b887a;
  --c-todo: #7d6f4e;
  --c-battleship: #3f6f8c;
  --c-memory: #a3486e;
  --c-cart: #8a6d12;
  --c-finshark: #2b8270;
  --c-hotel: #c25a1d;
  --c-dental: #b0308f;
  --c-broker: #a07800;

  --heat-0: #e3ddcc;
  --heat-1: #cbd99a;
  --heat-2: #a3c04a;
  --heat-3: #6f9512;
  --heat-4: #3f5a00;
  color-scheme: light;
}

@media (min-width: 1180px) { :root { --rail: 96px; } }

/* ───────────── base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s, color .4s;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; }
b { font-weight: 600; color: var(--text); }
code { font-family: var(--mono); font-size: .88em; padding: .1em .35em; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.02em; }
em { font-style: italic; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.accent { color: var(--accent); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

.wrap {
  width: 100%;
  max-width: calc(1180px + var(--rail));
  margin: 0 auto;
  padding: 0 var(--gutter) 0 calc(var(--gutter) + var(--rail));
}

.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] .grain { opacity: .12; mix-blend-mode: multiply; }

/* ───────────── top bar ───────────── */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 60px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.bar.is-scrolled { border-bottom-color: var(--line); }
.bar__logo { display: inline-flex; align-items: center; gap: 10px; font: 700 18px var(--mono); text-decoration: none; letter-spacing: -.04em; }
.bar__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.bar__nav { display: none; gap: 4px; font: 500 13px var(--mono); }
.bar__nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 6px; transition: color .2s, background .2s; }
.bar__nav a:hover, .bar__nav a.is-active { color: var(--text); background: var(--bg-2); }
.bar__nav a.is-active::before { content: "* "; color: var(--accent); }
@media (min-width: 900px) { .bar__nav { display: flex; } }
.bar__tools { display: flex; align-items: center; gap: 8px; }

.kbd-btn, .icon-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  transition: border-color .2s, transform .2s;
}
.kbd-btn { padding: 0 6px 0 12px; font: 500 12px var(--mono); color: var(--muted); }
.icon-btn { width: 36px; justify-content: center; }
.kbd-btn:hover, .icon-btn:hover { border-color: var(--line-2); }
.icon-btn:active, .kbd-btn:active { transform: scale(.96); }
kbd { font: 500 11px var(--mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); }
.icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .moon { display: none; }
:root[data-theme="light"] .icon-btn .sun { display: none; }
:root[data-theme="light"] .icon-btn .moon { display: block; }
@media (max-width: 520px) { .kbd-btn__label { display: none; } }
/* touch screens have no shortcut to show, so the button reads "jump to" instead */
@media (hover: none) {
  .kbd-btn { padding: 0 12px; }
  .kbd-btn kbd { display: none; }
  .kbd-btn__label { display: inline; }
}

/* ───────────── rail (git graph spine) ───────────── */
.rail { display: none; }
@media (min-width: 1180px) {
  .rail {
    display: block; position: fixed; z-index: 40;
    left: calc(var(--gutter) + 18px); top: 50%; transform: translateY(-50%);
    height: min(62vh, 520px); width: 120px;
  }
}
.rail__track { position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.rail__fill { width: 100%; height: 0%; background: var(--accent); transition: height .1s linear; }
.rail__nodes { list-style: none; margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.rail__nodes li { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.rail__nodes li::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%; flex: none;
  background: var(--bg); border: 2px solid var(--line-2);
  transition: border-color .3s, background .3s, transform .3s var(--ease);
}
.rail__nodes li span { font: 500 11px var(--mono); color: var(--dim); opacity: 0; transform: translateX(-4px); transition: opacity .3s, transform .3s, color .3s; }
.rail:hover .rail__nodes li span, .rail__nodes li.is-active span { opacity: 1; transform: none; }
.rail__nodes li.is-passed::before { border-color: var(--accent); background: var(--accent); }
.rail__nodes li.is-active::before { border-color: var(--accent); background: var(--bg); transform: scale(1.35); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); }
.rail__nodes li.is-active span { color: var(--text); }
.rail__nodes li.is-hotfix::before { border-radius: 3px; transform: rotate(45deg); }
.rail__nodes li.is-hotfix.is-passed::before, .rail__nodes li.is-hotfix.is-active::before { border-color: var(--danger); background: var(--danger); }
.rail__nodes li.is-hotfix.is-active::before { transform: rotate(45deg) scale(1.3); box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 22%, transparent); }

/* ───────────── hero ───────────── */
.hero { position: relative; min-height: 100svh; padding: 120px 0 0; display: flex; flex-direction: column; justify-content: center; }
.hero > .wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 48px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 40vw at 85% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(40vw 30vw at 0% 100%, color-mix(in srgb, var(--c-phones) 7%, transparent), transparent 60%);
}

.term {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin: 0 0 clamp(24px, 4vw, 44px);
  font: 400 clamp(12px, 1.4vw, 14px)/1.8 var(--mono); color: var(--muted);
}
.term__path { color: var(--c-phones); }
.term__branch { color: var(--c-retail); }
.term__caret { color: var(--accent); }
.term__cmd { color: var(--text); }
.term__cmd .nw { white-space: nowrap; }
.term__cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--accent); transform: translateY(.18em); margin-left: -6px; animation: blink 1s steps(1) infinite; }
.term__out { flex-basis: 100%; color: var(--accent); opacity: 0; transition: opacity .3s; }
.term__out.is-in { opacity: 1; }
@keyframes blink { 50% { opacity: 0; } }

.hero__name {
  font-size: clamp(54px, 11.2vw, 168px);
  line-height: .9; letter-spacing: -.045em;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  font-weight: 350;
}
.hero__name .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__name .line > * { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.hero__name .line:nth-child(2) > * { animation-delay: .12s; }
.hero__name em { font-weight: 300; color: color-mix(in srgb, var(--text) 82%, var(--accent)); }
@keyframes rise { to { transform: none; } }

.hero__grid { display: grid; gap: 24px; margin-top: clamp(28px, 4vw, 48px); }
@media (min-width: 860px) { .hero__grid { grid-template-columns: 1.4fr 1fr; align-items: end; gap: 64px; } }
.hero__lede { margin: 0; max-width: 34ch; font: 400 clamp(19px, 2.1vw, 26px)/1.4 var(--serif); color: var(--muted); }
.hero__lede b { color: var(--text); font-weight: 500; }
.hero__meta { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.hero__meta span { display: flex; align-items: center; gap: 10px; }
.hero__meta span::before { content: "→"; color: var(--dim); }
.hero__meta span:first-child::before { content: none; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); position: relative; margin: 0 2px; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent); animation: ping 2s var(--ease) infinite; }
@keyframes ping { from { transform: scale(.5); opacity: 1; } to { transform: scale(2); opacity: 0; } }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); margin: clamp(36px, 6vw, 72px) 0 0; border-top: 1px solid var(--line); }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 18px 16px 0 0; }
.stat + .stat { padding-left: 0; }
@media (min-width: 860px) { .stat + .stat { border-left: 1px solid var(--line); padding-left: 20px; } }
.stat dt { order: 2; font: 400 12px/1.4 var(--mono); color: var(--muted); max-width: 22ch; }
.stat dd { margin: 0 0 4px; font: 400 clamp(38px, 5vw, 60px)/1 var(--serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat { display: flex; flex-direction: column; }
.stat dd { order: 1; }

/* commit ticker */
.ticker { border-block: 1px solid var(--line); overflow: hidden; background: var(--bg-2); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker__track { display: flex; width: max-content; animation: marquee 90s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; font: 400 13px var(--mono); color: var(--muted); white-space: nowrap; border-right: 1px solid var(--line); }
.ticker__item .h { color: var(--dot, var(--accent)); }
.ticker__item .t { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────────── sections ───────────── */
.section { padding: clamp(88px, 12vw, 160px) 0 0; }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.hash { color: var(--accent-ink); background: var(--accent); padding: 2px 7px; border-radius: 4px; font-weight: 700; font-size: 11px; }
.section h2 { font-size: clamp(38px, 6vw, 76px); line-height: 1; letter-spacing: -.035em; font-variation-settings: "opsz" 144; }
.section h2 em { color: var(--accent); font-weight: 300; }
.section__sub { margin: 20px 0 0; color: var(--muted); max-width: 60ch; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ───────────── log: legend, branch map, heatmap ───────────── */
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.legend button {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px;
  font: 500 12px var(--mono); color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; background: transparent;
  transition: color .2s, border-color .2s, background .2s, opacity .2s;
}
.legend button i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.legend button:hover, .legend button.is-on { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.legend button small { color: var(--dim); font-size: 11px; }

.graph, .heat { margin: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.graph__scroll, .heat__scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
#branch-map { display: block; width: 100%; min-width: 760px; height: auto; }
#branch-map .lane { transition: opacity .3s; }
#branch-map.has-focus .lane:not(.is-focus) { opacity: .12; }
#branch-map .trunk { stroke: var(--line-2); }
#branch-map .tick { fill: var(--dim); font: 400 11px var(--mono); }
#branch-map .gridline { stroke: var(--line); stroke-dasharray: 2 4; }
#branch-map .lane-label { font: 500 12px var(--mono); }
#branch-map line.era { stroke: var(--dim); stroke-dasharray: 4 4; }
#branch-map line.era--agentic { stroke: var(--accent); }
#branch-map .era-band { fill: var(--accent); opacity: .04; }
#branch-map .era-label { font: 500 11px var(--mono); fill: var(--muted); stroke: none; }
#branch-map .era-label.era--agentic { fill: var(--accent); }
.graph__bar { display: flex; justify-content: flex-end; padding: 10px 14px 0; }
.graph__toggle { padding: 5px 10px; border: 1px dashed var(--line-2); border-radius: 8px; background: none; color: var(--muted); font: 500 12px var(--mono); }
.graph__toggle:hover, .graph__toggle[aria-expanded="true"] { color: var(--text); border-style: solid; border-color: var(--muted); }
.legend button[hidden] { display: none; }
.graph__note { margin: 0; padding: 12px 18px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.55; }
.graph__note b { color: var(--text); }
#branch-map .lane-count { font: 400 11px var(--mono); fill: var(--dim); }
#branch-map .dot { cursor: pointer; transition: r .2s var(--ease); }
#branch-map .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
#branch-map.is-in .draw { animation: draw 1.6s var(--ease) forwards; animation-delay: var(--delay, 0s); }
#branch-map .dot, #branch-map .head-ring, #branch-map .quiet { opacity: 0; }
#branch-map.is-in .quiet { animation: quiet .8s ease forwards; animation-delay: var(--delay, 0s); }
@keyframes quiet { to { opacity: .55; } }
#branch-map.is-in .dot, #branch-map.is-in .head-ring { animation: pop .5s var(--ease) forwards; animation-delay: var(--delay, 0s); }
#branch-map .head-ring { transform-box: fill-box; transform-origin: center; }
#branch-map.is-in .head-ring { animation: pop .5s var(--ease) forwards, ring 2.4s ease-out infinite; animation-delay: var(--delay, 0s), calc(var(--delay, 0s) + .5s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }

.heat { margin-top: 16px; padding: 16px 18px 18px; }
.heat figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.heat__scale { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); }
.heat__scale i { width: 11px; height: 11px; border-radius: 3px; }
.heat__scale i[data-l="0"] { background: var(--heat-0); } .heat__scale i[data-l="1"] { background: var(--heat-1); }
.heat__scale i[data-l="2"] { background: var(--heat-2); } .heat__scale i[data-l="3"] { background: var(--heat-3); }
.heat__scale i[data-l="4"] { background: var(--heat-4); }
.heat__scroll { --cell: 12px; --gap: 3px; }
.heat__months { display: grid; grid-auto-flow: column; grid-auto-columns: var(--cell); column-gap: var(--gap); height: 18px; font: 400 11px var(--mono); color: var(--dim); }
.heat__months span { grid-row: 1; white-space: nowrap; }
.heat__grid { display: grid; grid-template-rows: repeat(7, var(--cell)); grid-auto-flow: column; grid-auto-columns: var(--cell); gap: var(--gap); width: max-content; padding-bottom: 4px; }
.heat__grid i { border-radius: 3px; background: var(--heat-0); transition: background-color .25s, transform .15s; }
.heat__grid i[data-l="1"] { background: var(--heat-1); }
.heat__grid i[data-l="2"] { background: var(--heat-2); }
.heat__grid i[data-l="3"] { background: var(--heat-3); }
.heat__grid i[data-l="4"] { background: var(--heat-4); }
.heat__grid.is-lane i[data-l]:not([data-l="0"]) { background: color-mix(in srgb, var(--focus) calc(var(--a) * 100%), var(--heat-0)); }
.heat__grid i.is-empty { visibility: hidden; }
.heat__grid i:hover { transform: scale(1.35); outline: 1px solid var(--text); }

.tip {
  position: fixed; z-index: 70; pointer-events: none;
  min-width: 180px; max-width: 260px; padding: 10px 12px;
  font: 400 12px/1.5 var(--mono);
  background: var(--text); color: var(--bg); border-radius: 8px;
  box-shadow: 0 12px 30px rgb(0 0 0 / .3);
}
.tip b { color: inherit; }
.tip .row { display: flex; align-items: center; gap: 8px; }
.tip .row i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.tip .row span:last-child { margin-left: auto; }

/* ───────────── projects ───────────── */
.grep { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 28px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 12px; }
.grep__cmd { color: var(--accent); font-size: 13px; margin-right: 6px; }
.chip { padding: 5px 11px; font: 500 12px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); transition: all .2s; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.grep__out { margin-left: auto; font-size: 12px; color: var(--dim); }
@media (max-width: 600px) { .grep__out { flex-basis: 100%; margin: 4px 0 0; } }

.projects { display: flex; flex-direction: column; gap: 20px; }
.project {
  --mx: 50%; --my: 0%;
  position: relative; display: grid; gap: 20px;
  padding: clamp(22px, 3.4vw, 40px);
  border: 1px solid var(--line); border-radius: 20px;
  background:
    radial-gradient(600px circle at var(--mx) var(--my), color-mix(in srgb, var(--lane) 9%, transparent), transparent 45%),
    var(--surface);
  transition: border-color .35s, opacity .35s, transform .35s var(--ease), filter .35s;
}
.project::before { content: ""; position: absolute; left: -1px; top: 28px; bottom: 28px; width: 3px; border-radius: 3px; background: var(--lane); }
.project:hover { border-color: color-mix(in srgb, var(--lane) 45%, var(--line)); }
@media (min-width: 900px) { .project { grid-template-columns: 210px 1fr; gap: 40px; } }
.project.is-dimmed, .mini.is-dimmed { opacity: .22; filter: grayscale(1); transform: scale(.985); }

.project__side { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 899px) { .project__side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; } }
.project__idx { margin: 0; font-size: 12px; color: var(--dim); }
@media (min-width: 900px) { .project__idx { font: 300 64px/1 var(--serif); color: var(--lane); letter-spacing: -.04em; margin-bottom: 8px; } }
.project__branch { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--lane); }
.node { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--lane); background: var(--bg); flex: none; }
.status { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 11px; color: var(--muted); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-field); }
.status--wip i { background: var(--accent); animation: blink 1.4s steps(1) infinite; }

.project__body h3 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.1; font-variation-settings: "opsz" 96; }
.project__meta { margin: 10px 0 0; font-size: 12px; color: var(--dim); }
.project__lede { margin: 16px 0 0; font: 400 19px/1.5 var(--serif); color: var(--text); max-width: 62ch; }
.project__list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; color: var(--muted); max-width: 72ch; }
.project__list li { position: relative; padding-left: 22px; font-size: 15.5px; }
.project__list li::before { content: "+"; position: absolute; left: 0; top: 0; font: 700 14px/1.75 var(--mono); color: var(--lane); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.facts li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; }
.facts b { color: var(--lane); font-weight: 700; }

.own { margin-top: 22px; }
.own__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font: 400 12px var(--mono); color: var(--muted); }
.own__row strong { font-weight: 700; color: var(--text); }
.own__badge { display: inline-block; margin-left: 8px; padding: 1px 7px; font: 700 10px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--lane); border: 1px solid color-mix(in srgb, var(--lane) 50%, transparent); border-radius: 4px; }
.own__bar { position: relative; height: 8px; border-radius: 99px; background: repeating-linear-gradient(-45deg, var(--line) 0 4px, transparent 4px 8px); overflow: hidden; }
.own__bar span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--lane); transition: width 1.4s var(--ease); }

.more__title { margin: 56px 0 16px; font-size: 13px; font-weight: 500; color: var(--muted); }
.more__title::before { content: "└─ "; color: var(--dim); }
.more { display: grid; gap: 20px; }
@media (min-width: 800px) { .more { grid-template-columns: repeat(2, 1fr); } }
.mini { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .3s, opacity .35s, transform .35s var(--ease), filter .35s; }
.mini:hover { border-color: color-mix(in srgb, var(--lane) 45%, var(--line)); }
.mini { display: flex; flex-direction: column; }
.mini .project__branch { display: flex; flex-wrap: wrap; gap: 8px; }
.mini .project__branch .own__badge { margin-left: auto; }
.mini .own, .mini .mini__count { margin-top: auto; }
.mini .project__meta { margin-bottom: 22px; }
.mini h4 { margin: 12px 0 8px; font-size: 24px; line-height: 1.15; }
.mini > p:not([class]) { margin: 0; color: var(--muted); font-size: 15px; }

.mini__count { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mini__count b { color: var(--lane); font-weight: 700; }
.more__title--early { margin-top: 48px; }
.early { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.mini--early { display: flex; flex-direction: column; padding: 18px; border-radius: 14px; border-style: dashed; background: transparent; }
.mini--early h4 { margin: 10px 0 6px; font-size: 20px; }
.mini--early > p:not([class]) { font-size: 13.5px; line-height: 1.5; flex: 1; }
.mini--early .project__branch { font-size: 12px; }
.early__meta { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 0; font-size: 11px; color: var(--dim); }
.early__links { display: flex; gap: 14px; margin: 10px 0 0; font-size: 12px; }
.early__links a { color: var(--lane); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.early__links a:hover { border-bottom-color: var(--lane); }

/* ───────────── hotfix ───────────── */
.section--hotfix .eyebrow .hash { background: var(--danger); color: #fff; }
.section--hotfix h2 em { color: var(--danger); }
.incident {
  position: relative; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line)); border-radius: 20px;
  background:
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--danger) 5%, transparent) 0 12px, transparent 12px 24px),
    var(--surface);
  padding: clamp(22px, 3.4vw, 44px);
}
.incident__story { display: grid; gap: 16px; max-width: 70ch; }
.incident__story p { margin: 0; font: 400 clamp(18px, 1.8vw, 22px)/1.5 var(--serif); color: var(--muted); }
.incident__story b { color: var(--text); font-weight: 500; }
.incident__foot { margin: 28px 0 0; font-size: 12px; color: var(--muted); }
.ok { color: var(--c-field); }

/* ───────────── stack ───────────── */
.stack { display: grid; gap: 20px; }
@media (min-width: 1000px) { .stack { grid-template-columns: 1.55fr 1fr; } }
.code {
  margin: 0; padding: 24px; overflow-x: auto;
  font: 400 13.5px/1.85 var(--mono); color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.code code { padding: 0; border: 0; background: none; font-size: inherit; }
.code k { color: var(--c-phones); }
.code s { text-decoration: none; color: var(--accent); }
.stack__note { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.stack__note > p:first-child { margin: 0 0 18px; font-size: 13px; }
.stack__caption { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.split { display: grid; gap: 10px; }
.split__row { display: grid; grid-template-columns: 112px 1fr 40px; align-items: center; gap: 12px; font: 400 12px var(--mono); color: var(--muted); }
.split__row .bar-bg { height: 10px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.split__row .bar-bg span { display: block; height: 100%; width: 0; background: var(--c); border-radius: 3px; transition: width 1.2s var(--ease); }
.split__row b { text-align: right; font-weight: 500; color: var(--text); }

/* ───────────── refs ───────────── */
.refs { display: grid; gap: 20px; }
@media (min-width: 900px) { .refs { grid-template-columns: 1.4fr 1fr 1fr; } }
.ref { padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ref--work { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.ref__tag { margin: 0 0 16px; font-size: 12px; color: var(--accent); }
.ref h3 { font-size: 26px; line-height: 1.15; }
.ref__when { margin: 8px 0 14px; font-size: 12px; color: var(--dim); }
.ref p:not([class]), .ref li { color: var(--muted); font-size: 15px; }
.ref p:not([class]) { margin: 0; }
.ref ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.ref li::marker { color: var(--accent); }

/* ───────────── push ───────────── */
.push { padding-bottom: clamp(80px, 10vw, 140px); }
.push__title { font-size: clamp(44px, 8.4vw, 120px) !important; line-height: .95 !important; max-width: 14ch; }
.push__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; margin-top: clamp(32px, 5vw, 56px); }
.mail {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 18px 24px; border-radius: 14px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); text-align: left;
  transition: transform .25s var(--ease), box-shadow .25s;
  max-width: 100%;
}
.mail:hover { transform: translateY(-3px); box-shadow: 0 14px 40px color-mix(in srgb, var(--accent) 30%, transparent); }
.mail__addr { font: 400 clamp(18px, 2.6vw, 28px)/1.1 var(--serif); letter-spacing: -.01em; overflow-wrap: anywhere; }
.mail__hint { font-size: 11px; opacity: .7; }
.push__clock { flex-basis: 100%; order: 3; margin: 0; font-size: 12px; color: var(--dim); }
.links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.link { font: 500 15px var(--mono); text-decoration: none; color: var(--muted); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.link:hover { color: var(--text); border-color: var(--accent); }

.foot { border-top: 1px solid var(--line); padding: 24px 0 32px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 12px; color: var(--dim); }
.foot code { font-size: 11px; }
.foot__top { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-2); transition: color .2s, border-color .2s; }
.foot__top:hover { color: var(--accent); border-color: var(--accent); }

/* ───────────── command palette ───────────── */
.palette { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding: 14vh 16px 16px; }
.palette[hidden] { display: none; }
.palette__backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; }
.palette__box { position: relative; width: min(560px, 100%); border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); box-shadow: 0 30px 80px rgb(0 0 0 / .45); overflow: hidden; animation: drop .25s var(--ease); }
.palette__input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--accent); }
.palette__input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 400 16px var(--mono); }
.palette__list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette__list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; font: 400 14px var(--mono); color: var(--muted); }
.palette__list li .grp { margin-left: auto; font-size: 11px; color: var(--dim); }
.palette__list li[aria-selected="true"] { background: var(--bg-2); color: var(--text); }
.palette__list li[aria-selected="true"]::before { content: "❯"; color: var(--accent); }
.palette__list .empty { color: var(--dim); cursor: default; }
@keyframes fade { from { opacity: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

/* ───────────── toast ───────────── */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 85; transform: translate(-50%, 20px); opacity: 0; padding: 10px 16px; border-radius: 8px; background: var(--text); color: var(--bg); font: 500 13px var(--mono); transition: opacity .25s, transform .25s var(--ease); pointer-events: none; }
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }

/* ───────────── motion preferences ───────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ticker__track { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
