@font-face { font-family: "Geist"; src: url("fonts/geist-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* tokens: the Dooms Inference palette. Monochrome (near-black / near-white) with one orange pop for the engine and the brand mark.
   Radius scale as on dooms-inference.vercel.app: 20px panels, 16px inner blocks, full pills for buttons and tabs. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a; --surface: #141414; --surface-2: #1b1b1b; --line: #222222; --line-2: #333333;
  --ink: #f2f2f2; --ink-2: #a3a3a3; --ink-3: #6e6e6e;
  --accent: #f2f2f2; --accent-ink: #0a0a0a; --pop: #ff5a2e;
  --s1: #ff5a2e; --s2: #8c8c8c; --s3: #8c8c8c; --s4: #8c8c8c;
  --stage-1: #ff5a2e; --stage-2: #b9441f; --stage-3: #7a2d15;
  --code-bg: #0d0d0d; --code-ink: #ededed; --code-dim: #7a7a7a;
  --nav: rgba(15,15,15,.72);
  --shadow: 0 50px 110px -40px rgba(0,0,0,.95);
  --r: 20px; --r-m: 16px;
}
@media (prefers-color-scheme: light) {
  :root:where(:not([data-theme="dark"])) {
    color-scheme: light;
    --bg: #f4f4f4; --surface: #fcfcfc; --surface-2: #eaeaea; --line: #dcdcdc; --line-2: #c6c6c6;
    --ink: #0a0a0a; --ink-2: #4f4f4f; --ink-3: #7a7a7a;
    --accent: #0a0a0a; --accent-ink: #f4f4f4; --pop: #e8431a;
    --s1: #e8431a; --s2: #7a7a7a; --s3: #7a7a7a; --s4: #7a7a7a;
    --stage-1: #e8431a; --stage-2: #f08a6c; --stage-3: #f7c3b2;
    --code-bg: #111111;
    --nav: rgba(252,252,252,.76);
    --shadow: 0 50px 100px -45px rgba(0,0,0,.35);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f4; --surface: #fcfcfc; --surface-2: #eaeaea; --line: #dcdcdc; --line-2: #c6c6c6;
  --ink: #0a0a0a; --ink-2: #4f4f4f; --ink-3: #7a7a7a;
  --accent: #0a0a0a; --accent-ink: #f4f4f4; --pop: #e8431a;
  --s1: #e8431a; --s2: #7a7a7a; --s3: #7a7a7a; --s4: #7a7a7a;
  --stage-1: #e8431a; --stage-2: #f08a6c; --stage-3: #f7c3b2;
  --code-bg: #111111;
  --nav: rgba(252,252,252,.76);
  --shadow: 0 50px 100px -45px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 "Geist", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
h1, h2 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.6rem); max-width: 22ch; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section-body { color: var(--ink-2); max-width: 62ch; margin: 16px 0 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 30; background: var(--surface); 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: 20; background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid color-mix(in oklab, var(--line) 70%, transparent); }
.nav-row { height: 64px; display: flex; align-items: center; gap: 32px; }
.brand { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 500; text-decoration: none; letter-spacing: -0.01em; }
.nav nav { display: flex; gap: 24px; font-size: 14.5px; }
.nav nav a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.nav-end { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ink-2); font-size: 19px; cursor: pointer; text-decoration: none; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 760px) { .nav nav { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 8px; font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap; transition: transform .15s cubic-bezier(.16,1,.3,1), background .2s, border-color .2s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in oklab, var(--accent) 88%, black); }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.btn.ghost:hover { border-color: var(--ink-3); }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; min-height: min(calc(100dvh - 64px), 760px); padding-top: 48px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.4rem); max-width: 13ch; }
.lede { font-size: 1.125rem; color: var(--ink-2); max-width: 46ch; margin: 22px 0 32px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-fig { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px 26px 20px; box-shadow: var(--shadow); }
.hero-fig figcaption { display: grid; gap: 2px; margin-bottom: 18px; }
.fig-title { font-weight: 500; font-size: 15px; }
.fig-sub { color: var(--ink-3); font-size: 13.5px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: 0; gap: 40px; padding-top: 40px; } }

/* bar charts (shared). Marks are thin, rounded at the data end, labeled directly. */
.chart { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 14px; align-items: center; font-size: 13.5px; }
.row-name { color: var(--ink-2); line-height: 1.3; }
.row-name strong { color: var(--ink); font-weight: 500; }
.track { position: relative; height: 22px; display: flex; align-items: center; }
.bar { height: 14px; border-radius: 0 4px 4px 0; transform-origin: left center; transform: scaleX(0); transition: transform .9s cubic-bezier(.16,1,.3,1); }
.bar.in { transform: scaleX(1); }
.val { margin-left: 10px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12.5px; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .4s .5s; }
.val.in { opacity: 1; }
.val small { color: var(--ink-3); font-size: 11.5px; margin-left: 6px; }
.row[data-sys="dooms"] .row-name { color: var(--ink); font-weight: 500; }
.hit { position: absolute; inset: -4px 0; cursor: default; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; gap: 4px; } }

/* where the time goes */
.where { padding: 112px 0 104px; border-top: 1px solid var(--line); }
.timeline { margin-top: 48px; display: grid; gap: 22px; }
.tl-row { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.tl-label { font-size: 14px; color: var(--ink-2); }
.tl-label strong { display: block; color: var(--ink); font-weight: 500; font-size: 15px; }
.tl-track { display: flex; gap: 2px; height: 44px; }
.seg { height: 100%; transform-origin: left center; transform: scaleX(0); transition: transform .8s cubic-bezier(.16,1,.3,1); display: flex; align-items: center; padding-left: 10px; overflow: hidden; font-family: "Geist Mono", ui-monospace, monospace; font-size: 12px; color: #fff; white-space: nowrap; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.seg.in { transform: scaleX(1); }
.seg[data-i="0"] { background: var(--stage-1); }
.seg[data-i="1"] { background: var(--stage-2); color: #fff; }
.seg[data-i="2"] { background: var(--stage-3); color: #fff; }
.tl-total { font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; color: var(--ink); margin-top: 6px; }
.stage-key { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; padding-left: 168px; font-size: 13.5px; color: var(--ink-2); }
.stage-key span { display: inline-flex; align-items: center; gap: 8px; }
.stage-key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
@media (max-width: 700px) { .tl-row { grid-template-columns: 1fr; gap: 8px; } .stage-key { padding-left: 0; } .seg { font-size: 0; } }

/* benchmarks */
.bench { padding: 104px 24px 96px; }
.bench-head { margin-bottom: 36px; }
.tabs, .code-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-bottom: 22px; flex-wrap: wrap; }
.tabs button, .code-tabs button { border: 0; background: none; color: var(--ink-2); font: 500 14px "Geist", sans-serif; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.tabs button[aria-selected="true"], .code-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.bench-body { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.bench-chart { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px; }
.panel-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.sub-chart + .sub-chart { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.sub-title { font-size: 13.5px; color: var(--ink-3); margin-bottom: 12px; }
.link-btn { margin-top: 22px; border: 0; background: none; color: var(--ink-2); font: 500 13.5px "Geist", sans-serif; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; padding: 4px 0; }
.link-btn:hover { color: var(--ink); }
.table-wrap { margin-top: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px 8px 0; }
th { color: var(--ink-3); font-weight: 500; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; font-family: "Geist Mono", ui-monospace, monospace; }
.bench-note { font-size: 14.5px; color: var(--ink-2); padding-top: 6px; }
.bench-note p { margin: 0 0 14px; }
.bench-note strong { color: var(--ink); font-weight: 500; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); margin-bottom: 12px; }
@media (max-width: 900px) { .bench-body { grid-template-columns: 1fr; } }

/* losses */
.losses { padding: 96px 24px; border-top: 1px solid var(--line); }
.loss-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0; margin-top: 44px; }
.loss { padding: 0 28px; border-left: 1px solid var(--line); }
.loss:first-child { padding-left: 0; border-left: 0; }
.loss-num { font-size: clamp(2rem, 1.4rem + 2vw, 3.1rem); font-weight: 600; letter-spacing: -0.03em; color: var(--ink-3); line-height: 1.1; }
.loss-num span { color: var(--ink); }
.loss p { color: var(--ink-2); margin: 14px 0 0; max-width: 36ch; font-size: 15px; }
@media (max-width: 860px) { .loss-grid { grid-template-columns: 1fr; gap: 36px; } .loss { padding: 0; border-left: 0; } }

/* log */
.log { padding: 104px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.log-grid { display: grid; grid-template-columns: 360px 1fr; gap: 64px; }
.log-side { position: sticky; top: 104px; align-self: start; }
.log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.entry { display: grid; grid-template-columns: 1fr 210px; gap: 32px; padding: 30px 0; border-top: 1px solid var(--line); opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.entry:first-child { border-top: 0; padding-top: 4px; }
.entry.in { opacity: 1; transform: none; }
.entry h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.entry p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 58ch; }
.delta { font-family: "Geist Mono", ui-monospace, monospace; text-align: right; }
.delta .what { font-family: "Geist", sans-serif; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.delta .nums { font-size: 15px; color: var(--ink-3); }
.delta .after { font-size: 26px; color: var(--ink); letter-spacing: -0.02em; display: block; margin-top: 2px; }
.delta .after.worse { color: var(--s2); }
.delta .unit { font-size: 13px; color: var(--ink-3); margin-left: 4px; }
@media (max-width: 960px) { .log-grid { grid-template-columns: 1fr; gap: 36px; } .log-side { position: static; } }
@media (max-width: 620px) { .entry { grid-template-columns: 1fr; gap: 14px; } .delta { text-align: left; } }

/* install */
.use { padding: 104px 24px 96px; }
.use h2 { margin-bottom: 32px; }
.code-card { position: relative; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 26px 28px; overflow-x: auto; border: 1px solid color-mix(in oklab, var(--code-bg) 80%, var(--line)); }
.code-card pre { margin: 0; font: 400 13.5px/1.7 "Geist Mono", ui-monospace, monospace; }
.code-card .c { color: var(--code-dim); }
.copy { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgb(255 255 255 / .12); background: rgb(255 255 255 / .04); color: var(--code-ink); cursor: pointer; display: grid; place-items: center; font-size: 16px; }
.copy:hover { background: rgb(255 255 255 / .1); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin: 48px 0 0; }
.facts dt { font-weight: 600; margin-bottom: 6px; }
.facts dd { margin: 0; color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13.5px; color: var(--ink-3); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { margin-left: 18px; text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--ink); }

/* tooltip */
.tip { position: fixed; z-index: 25; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12.5px; padding: 7px 10px; border-radius: 8px; max-width: 260px; line-height: 1.4; transform: translate(-50%, calc(-100% - 10px)); }

/* reduced motion: everything lands in its final state at once */
@media (prefers-reduced-motion: reduce) {
  .bar, .seg, .entry, .val { transition: none !important; }
}

/* grid children may shrink below their content width (charts, code); without this the page scrolls sideways on phones */
.hero > *, .bench-body > *, .log-grid > *, .tl-row > *, .row > *, .loss-grid > *, .entry > * { min-width: 0; }
.row { grid-template-columns: minmax(110px, 30%) 1fr; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } .wrap, .bench, .losses, .use { padding-left: 16px; padding-right: 16px; } .hero-fig, .bench-chart { padding: 18px; } }
@media (max-width: 700px) { .where, .bench, .losses, .log, .use { padding-top: 72px; padding-bottom: 64px; } .hero { padding-top: 28px; padding-bottom: 48px; } }

/* ---------------------------------------------------------------- brand mark (the Dooms D, in the site accent) */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.mark { width: 26px; height: 26px; flex: none; }
.mark-bg { fill: var(--accent); }
.mark-d, .mark-dot { fill: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .mark-bg { transform-origin: center; animation: mark-pop .7s cubic-bezier(.34,1.56,.64,1) both; }
  .mark-d { stroke: #fff; stroke-width: 1.2; stroke-dasharray: 80; stroke-dashoffset: 80; fill-opacity: 0; animation: mark-draw 1s .25s cubic-bezier(.16,1,.3,1) forwards; }
  .mark-dot { transform-origin: 15.6px 16px; transform: scale(0); animation: mark-dot .4s 1s cubic-bezier(.34,1.56,.64,1) forwards; }
  .brand:hover .mark { animation: mark-nudge .5s cubic-bezier(.34,1.56,.64,1); }
}
@keyframes mark-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mark-draw { 60% { fill-opacity: 0; } to { stroke-dashoffset: 0; fill-opacity: 1; stroke-width: 0; } }
@keyframes mark-dot { to { transform: scale(1); } }
@keyframes mark-nudge { 40% { transform: rotate(-8deg) scale(1.08); } }

/* ---------------------------------------------------------------- reading progress under the nav (CSS scroll-driven; absent where unsupported) */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress { animation: progress linear both; animation-timeline: scroll(root); }
  }
}
@keyframes progress { to { transform: scaleX(1); } }

/* ---------------------------------------------------------------- hero entrance: words rise in reading order, then the rest */
.nowrap { white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .split .w { display: inline-block; opacity: 0; transform: translateY(.45em); animation: word-in .7s cubic-bezier(.16,1,.3,1) forwards; }
  .split .w:nth-child(1) { animation-delay: .05s; } .split .w:nth-child(2) { animation-delay: .1s; } .split .w:nth-child(3) { animation-delay: .15s; }
  .split .w:nth-child(4) { animation-delay: .2s; } .split .w:nth-child(5) { animation-delay: .25s; } .split .w:nth-child(6) { animation-delay: .3s; }
  .split .w:nth-child(7) { animation-delay: .35s; }
  .rise { opacity: 0; transform: translateY(16px); animation: word-in .8s var(--d, 0s) cubic-bezier(.16,1,.3,1) forwards; }
  .rise-in { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
  .rise-in.in { opacity: 1; transform: none; }
}
@keyframes word-in { to { opacity: 1; transform: none; } }
#hero-count { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- chart focus: hovering a bar dims the others */
.chart:has(.hit:hover) .row:not(:has(.hit:hover)) { opacity: .38; }
.row { transition: opacity .25s; }

/* ---------------------------------------------------------------- the race: both runs fill in real proportion to their duration */
.race-bar { display: flex; align-items: center; gap: 16px; margin-top: 40px; }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.race-clock { font-family: "Geist Mono", ui-monospace, monospace; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.timeline { margin-top: 22px; }
.tl-track { position: relative; }
.tl-track .seg { transform: none; transition: none; }
.tl-cover { position: absolute; inset: 0; background: var(--bg); transform-origin: right center; }
.tl-done { font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; color: var(--ink); opacity: 0; transition: opacity .3s; margin-top: 6px; }
.tl-done.in { opacity: 1; }
.tl-done b { color: var(--accent); font-weight: 500; }

/* ---------------------------------------------------------------- source */
.source { padding: 104px 24px 112px; border-top: 1px solid var(--line); }
.source-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-top: 40px; }
.repo-card, .author-card { text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px; transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .25s, box-shadow .35s; }
.repo-card:hover, .author-card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.repo-top { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.repo-top i { color: var(--accent); font-size: 20px; }
.repo-name strong { font-weight: 600; }
.repo-desc { color: var(--ink-2); margin: 14px 0 22px; max-width: 60ch; }
.repo-stats { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.repo-stats span { display: inline-flex; align-items: center; gap: 6px; }
.repo-stats b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.repo-cta { display: inline-flex; gap: 6px; align-items: center; margin-top: 24px; color: var(--accent); font-weight: 500; font-size: 15px; }
.repo-cta i { transition: transform .3s cubic-bezier(.16,1,.3,1); }
.repo-card:hover .repo-cta i { transform: translate(3px, -3px); }
.author-card { display: flex; gap: 18px; align-items: center; }
.author-card img { border-radius: 50%; border: 1px solid var(--line); }
.author-name { font-weight: 600; font-size: 17px; }
.author-login { color: var(--ink-3); font-size: 14px; margin-top: 2px; }
.author-meta { color: var(--ink-2); font-size: 14px; margin-top: 10px; }
@media (max-width: 860px) { .source-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .source { padding-top: 72px; padding-bottom: 72px; } }
@media (max-width: 560px) { .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; } .tabs button { white-space: nowrap; } }


/* ---------------------------------------------------------------- Dooms shape language: floating pill nav, pill buttons, rounder panels */
.nav { top: 14px; left: 50%; transform: translateX(-50%); position: fixed; width: min(1216px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 999px; background: var(--nav); }
.nav-row { height: 56px; padding: 0 10px 0 20px; max-width: none; }
.nav .progress { left: 24px; right: 24px; bottom: -1px; border-radius: 2px; background: var(--pop); }
main { padding-top: 84px; }
.btn { border-radius: 999px; height: 48px; padding: 0 22px; }
.btn.small { height: 38px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: var(--accent); opacity: .84; }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink-3); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.icon-btn { border-radius: 999px; }
.hero-fig, .bench-chart, .repo-card, .author-card { border-radius: var(--r); }
.code-card { border-radius: var(--r); }
.copy { border-radius: 999px; }
::selection { background: var(--pop); color: #fff; }
:focus-visible { outline-color: var(--ink); }
.mark-bg { fill: var(--pop); }
.tl-done b, .repo-cta, .repo-top i { color: var(--pop); }
.delta .after.worse { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--pop); text-decoration-thickness: 2px; }
.loss-num span { color: var(--ink); }
body { transition: background-color .5s cubic-bezier(.16,1,.3,1), color .5s cubic-bezier(.16,1,.3,1); }
@media (max-width: 760px) { .nav { top: 8px; width: calc(100% - 16px); } }

/* ---------------------------------------------------------------- other projects: one 2x2 tile and four 1x1 tiles (exactly five items, five cells) */
.projects { padding: 96px 24px 112px; border-top: 1px solid var(--line); }
.proj-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: auto auto; gap: 16px; margin-top: 40px; }
.proj { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .3s, transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s; }
.proj.big { grid-column: span 2; grid-row: span 2; }
.proj:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: var(--shadow); }
.proj-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.proj.big .proj-img { aspect-ratio: 16 / 11; }
.proj-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .8s cubic-bezier(.16,1,.3,1); }
.proj:hover .proj-img img { transform: scale(1.045); }
.logo-tile { display: grid; place-items: center; background: #f6f6f6; }
.logo-tile img { width: 58%; height: auto; object-fit: contain; }
.proj-body { padding: 18px 20px 22px; }
.proj.big .proj-body { padding: 24px 26px 28px; }
.proj h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.proj.big h3 { font-size: 22px; }
.proj h3 i { color: var(--ink-3); transition: transform .35s cubic-bezier(.16,1,.3,1), color .3s; }
.proj:hover h3 i { transform: translate(3px, -3px); color: var(--pop); }
.proj p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.proj.big p { font-size: 16px; max-width: 52ch; }
.all-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .3s, gap .3s; }
.all-link:hover { border-color: var(--pop); gap: 12px; }
@media (prefers-reduced-motion: no-preference) { .proj.rise-in { transition-delay: calc(var(--s, 0) * 80ms); } }
@media (max-width: 980px) { .proj-grid:not(.two) { grid-template-columns: 1fr 1fr; } .proj-grid:not(.two) .proj.big { grid-column: span 2; grid-row: auto; } }
@media (max-width: 600px) { .proj-grid { grid-template-columns: 1fr; } .proj.big { grid-column: auto; } .projects { padding: 72px 16px; } }

/* two-tile projects row: the Dooms sibling wider, RYDU beside it in its own black and green */
.proj-grid.two { grid-template-columns: 1.45fr 1fr; grid-template-rows: auto; }
.proj-grid.two .proj.big { grid-column: auto; grid-row: auto; }
.proj-grid.two .proj-img { aspect-ratio: 16 / 10; }
.proj-img.rydu { display: grid; place-items: center; background: #0a0a0a; position: relative; overflow: hidden; }
.proj-img.rydu::after { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 90%; background: radial-gradient(closest-side, rgb(42 203 111 / .28), transparent 70%); }
.rydu-mark { font-weight: 600; font-size: clamp(2.6rem, 2rem + 2.4vw, 4rem); letter-spacing: -0.04em; color: #2acb6f; position: relative; z-index: 1; transition: letter-spacing .6s cubic-bezier(.16,1,.3,1); }
.proj:hover .rydu-mark { letter-spacing: 0.02em; }
.tag { font-size: 12px; font-weight: 500; letter-spacing: 0; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
div.proj { cursor: default; }
@media (max-width: 760px) { .proj-grid.two { grid-template-columns: 1fr; } }

/* three tiles: the Dooms sibling tall on the left, RYDU and Mirikids stacked on the right */
.proj-grid.three { grid-template-columns: 1.45fr 1fr; grid-template-rows: auto auto; }
.proj-grid.three .proj.big { grid-column: 1; grid-row: 1 / span 2; }
.proj-grid.three .proj.big .proj-img { flex: 1; aspect-ratio: auto; min-height: 280px; }
.proj-grid.three .proj:not(.big) .proj-img { aspect-ratio: 16 / 9; }
@media (max-width: 860px) { .proj-grid.three { grid-template-columns: 1fr; } .proj-grid.three .proj.big { grid-row: auto; } .proj-grid.three .proj.big .proj-img { aspect-ratio: 16 / 10; flex: none; } }
.proj-grid.three .proj.big .proj-img img { object-position: left 30%; }
