/* ==========================================================================
   DESIGN TOKENS: change the look of the whole site from here.
   Concept: the page is a coordinate plane. Light = drafting paper, dark = night desk.
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #F2F4F3;
  --panel: #E8ECEA;
  --panel-2: #F8F9F8;
  --ink: #101418;
  --ink-2: #4F5A61;
  --line: #CBD2D0;
  --line-2: #9AA6A5;
  --signal: #E8541E;       /* the one warm accent */
  --plot: #2459D6;         /* data / math accent */
  --grid: rgba(16, 20, 24, .05);
  --grid-major: rgba(16, 20, 24, .085);
  --fx: 30, 70, 110;       /* background particles (r,g,b) */
  --fx-sig: 232, 84, 30;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1160px;
  --radius: 14px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0D12; --panel: #10151C; --panel-2: #151B24; --ink: #E8EBEF; --ink-2: #8F9AA6;
  --line: #1F2833; --line-2: #344050; --signal: #FF7A3D; --plot: #6EA8FF;
  --grid: rgba(150, 180, 220, .05); --grid-major: rgba(150, 180, 220, .09);
  --fx: 140, 180, 235; --fx-sig: 255, 122, 61;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
/* the plane: minor grid every 48px (the probe cursor reads in these units), major every 240px */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 240px 240px, 240px 240px, 48px 48px, 48px 48px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
}
#bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body[data-bg="dim"] #bg { opacity: .55; }
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 3px; }
::selection { background: color-mix(in srgb, var(--signal) 30%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { top: 12px; color: var(--bg); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.meta { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin: 0; }
.dim { color: var(--ink-2); }
.kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--signal); margin: 0 0 14px; }
.kicker a { text-decoration: none; }

/* ---------- probe cursor (native cursor stays) ---------- */
.probe { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; opacity: 0; transition: opacity .2s; will-change: transform; }
.probe.on { opacity: 1; }
.probe i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border: 1.5px solid var(--signal); border-radius: 50%; transition: transform .22s cubic-bezier(.2,.8,.2,1), background .2s; }
.probe i::before, .probe i::after { content: ""; position: absolute; background: var(--signal); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.probe i::before { width: 6px; height: 1.5px; } .probe i::after { width: 1.5px; height: 6px; }
.probe span { position: absolute; left: 18px; top: 12px; font: 11px/1 var(--mono); color: var(--ink-2); white-space: nowrap; background: color-mix(in srgb, var(--bg) 82%, transparent); padding: 3px 6px; border-radius: 5px; }
.probe.flip span { left: auto; right: 18px; }
.probe.is-link i { transform: scale(2.4); background: color-mix(in srgb, var(--signal) 14%, transparent); }
.probe.is-link i::before, .probe.is-link i::after { opacity: 0; }
.probe.is-link span { color: var(--signal); left: 28px; top: -6px; }
.probe.is-quiet { opacity: 0 !important; }
.probe.is-down i { transform: scale(.78); }
.probe.is-link.is-down i { transform: scale(2); }
@media (pointer: coarse) { .probe { display: none; } }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.mark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -.02em; text-decoration: none; font-variation-settings: "SOFT" 100, "WONK" 1; }
.mark:hover { color: var(--ink); } .mark svg { transition: transform .3s; } .mark:hover svg { transform: rotate(-12deg); }
.top nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.top nav a { font-size: 15px; color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.theme { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-left: -8px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); cursor: pointer; }
.theme:hover { color: var(--ink); background: var(--panel); }
@media (max-width: 520px) { .top nav { gap: 12px; } .top nav a { font-size: 14px; } .mark span { display: none; } }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-top: clamp(36px, 6vw, 84px); padding-bottom: clamp(56px, 8vw, 110px); min-height: min(82vh, 760px); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: 0; } }
.statement { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 5.5vw, 82px); line-height: 1; letter-spacing: -.035em; margin: 0 0 28px; text-wrap: balance; font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1; }
.statement em, .contact-title em, .page-title em { font-style: italic; color: var(--signal); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.bio p { font-family: var(--serif); font-size: clamp(18.5px, 1.7vw, 21px); line-height: 1.55; margin: 0 0 .9em; max-width: 52ch; }
.hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.btn { display: inline-block; padding: 11px 22px; border: 1px solid var(--ink); border-radius: 999px; font-weight: 500; font-size: 15px; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--signal); border-color: var(--signal); color: #fff; }

/* hero figure: the boards */
.hero-fig { margin: 0; }
.hero-boards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hero-boards li:nth-child(even) { margin-top: 20px; }
.hero-boards a { display: grid; gap: 3px; height: 100%; padding: 14px 14px 16px; border: 1px solid var(--line-2); border-radius: 16px; background: color-mix(in srgb, var(--panel-2) 62%, transparent); text-decoration: none; transition: border-color .2s, transform .2s; }
.hero-boards a:hover { border-color: var(--signal); transform: translateY(-3px); color: var(--ink); }
.hb-art { display: block; color: var(--ink-2); padding: 2px 8px 10px; } .hb-art img { width: 100%; aspect-ratio: 5/3; object-fit: cover; border-radius: 8px; }
.hb-name { font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: -.01em; line-height: 1.15; } .hb-tag { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.hero-fig figcaption { font-size: 14px; color: var(--ink-2); margin-top: 14px; } .fig-n { font-family: var(--mono); color: var(--ink); margin-right: 4px; }
.now-line { font-size: 15px; color: var(--ink-2); max-width: 54ch; margin: 6px 0 0; padding-left: 14px; border-left: 2px solid var(--signal); line-height: 1.5; }
.now-line span { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--signal); margin-right: 6px; }

/* ---------- blocks ---------- */
.block { padding: clamp(52px, 8vw, 100px) 0; border-top: 1px solid var(--line); }
.block > .wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); column-gap: clamp(24px, 5vw, 64px); }
.block-title { grid-column: 1; grid-row: 1 / span 40; align-self: start; position: sticky; top: 90px; margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.025em; line-height: 1.08; font-variation-settings: "SOFT" 80, "WONK" 1; }
.block-title small { display: block; margin-top: 8px; font-family: var(--sans); font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); font-variation-settings: normal; max-width: 22ch; }
.block > .wrap > :not(.block-title) { grid-column: 2; min-width: 0; }
@media (max-width: 860px) { .block > .wrap { display: block; } .block-title { position: static; margin-bottom: 26px; } }
.more { margin: 26px 0 0; font-weight: 500; }
.subtitle { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -.015em; margin: 64px 0 14px; }
.tag { font-family: var(--mono); font-size: 11.5px; font-weight: 400; padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 99px; color: var(--ink-2); letter-spacing: 0; vertical-align: middle; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.chips li { font-family: var(--mono); font-size: 12.5px; padding: 3px 11px; border: 1px solid var(--line-2); border-radius: 99px; }
.chips.big li { font-size: 14px; padding: 5px 14px; }

/* lately */
.lately { display: grid; gap: 30px; }
.lead-post { display: grid; gap: 8px; text-decoration: none; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); transition: border-color .2s, transform .2s; }
.lead-post:hover { border-color: var(--signal); color: var(--ink); transform: translateY(-2px); }
.lead-post img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.lead-eq { font-size: clamp(16px, 2.4vw, 26px); color: var(--plot); overflow-x: auto; padding: 8px 0 14px; }
.lead-eq .katex-display { margin: 0; text-align: left; } .lead-eq .katex-display > .katex { text-align: left; }
.lead-meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.lead-title { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.lead-sum { font-family: var(--serif); font-size: 19px; color: var(--ink-2); max-width: 56ch; }
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 6px 24px; padding: 20px 10px; margin: 0 -10px; border-bottom: 1px solid var(--line); text-decoration: none; border-radius: 8px; transition: background .15s; }
.post-row:hover { background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--ink); }
.post-row time, .post-meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); padding-top: 5px; }
.post-title { display: block; font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: -.015em; line-height: 1.25; }
.post-row:hover .post-title { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 4px; }
.post-sum { display: block; color: var(--ink-2); margin-top: 3px; max-width: 62ch; font-size: 15.5px; }
@media (max-width: 700px) { .post-row { grid-template-columns: 1fr; } .post-meta { order: 2; padding-top: 0; } }

/* projects on the home page */
.proj-feature { display: grid; gap: 22px; }
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); gap: 22px clamp(24px, 4vw, 52px); padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); position: relative; }
.feat::before { content: ""; position: absolute; left: 0; top: 28px; bottom: 28px; width: 3px; border-radius: 3px; background: var(--signal); }
.feat.dom-ai::before { background: var(--plot); } .feat.dom-math::before { background: var(--plot); }
.feat-b { margin-left: clamp(0px, 4vw, 56px); } .feat-b .specs { order: -1; } .feat-b { grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); }
@media (max-width: 800px) { .feat, .feat-b { grid-template-columns: 1fr; margin-left: 0; } .feat-b .specs { order: 0; } }
.feat-kind { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin: 0 0 6px; }
.feat-kind .dom { color: var(--signal); margin-right: 8px; text-transform: uppercase; letter-spacing: .05em; }
.dom-ai .feat-kind .dom { color: var(--plot); }
.feat h3 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 14px; font-variation-settings: "SOFT" 70, "WONK" 1; }
.feat h3 a { text-decoration: none; } .feat h3 a:hover { text-decoration: underline; text-decoration-color: var(--signal); }
.feat-main p { margin: 0 0 12px; max-width: 56ch; }
.feat-parts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px !important; }
.feat-parts a { font-family: var(--mono); font-size: 12px; padding: 3px 10px; border: 1px dashed var(--line-2); border-radius: 6px; text-decoration: none; color: var(--ink-2); }
.feat-parts a:hover { border-color: var(--signal); color: var(--signal); }
.feat-img { grid-column: 1 / -1; width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.specs { margin: 0; align-self: start; font-size: 15px; border-top: 1px solid var(--line-2); }
.specs div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.specs dt { font-family: var(--mono); font-size: 12px; color: var(--ink-2); padding-top: 2px; } .specs dd { margin: 0; }
.scratch { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: s; }
.scratch a { display: grid; grid-template-columns: 38px minmax(0, 220px) minmax(0, 1fr) auto; gap: 8px 22px; align-items: baseline; padding: 20px 8px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .15s; }
.scratch a:hover { background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--ink); }
.idx { font-family: var(--mono); font-size: 13px; color: var(--plot); }
.s-title { font-family: var(--display); font-size: 21px; font-weight: 500; letter-spacing: -.015em; }
.s-sum { color: var(--ink-2); font-size: 15.5px; } .s-dom { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
@media (max-width: 760px) { .scratch a { grid-template-columns: 30px 1fr; } .s-sum, .s-dom { grid-column: 2; } }

/* bench */
.bench { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .bench { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bench a { display: grid; gap: 4px; text-decoration: none; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); height: 100%; transition: border-color .2s, transform .2s; }
.bench a:hover { border-color: var(--signal); color: var(--ink); transform: translateY(-3px) rotate(-.4deg); }
.bench .b1 { margin-top: 22px; } .bench .b2 { margin-top: 8px; } .bench .b3 { margin-top: 30px; }
@media (max-width: 1000px) { .bench .b1, .bench .b2, .bench .b3 { margin-top: 0; } }
.bench-art, .part-art, .ph-art, .mp-art { color: var(--ink-2); display: block; }
.bench-art { padding: 6px 4px 10px; } .bench-art img { width: 100%; aspect-ratio: 5/3; object-fit: cover; border-radius: 8px; }
.art { width: 100%; height: auto; display: block; }
.art .sig-s { stroke: var(--signal); } .art .sig-f { fill: var(--signal); stroke: none; }
.art-t { font: 600 10px var(--mono); fill: currentColor; stroke: none; letter-spacing: .08em; }
.bench-name { font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: -.01em; }
.bench-tag { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }

.about-lede { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.4; letter-spacing: -.005em; margin: 0 0 18px; max-width: 34em; }
.contact-title { grid-column: 1 / -1 !important; font-family: var(--display); font-weight: 400; font-size: clamp(48px, 9vw, 120px); letter-spacing: -.04em; line-height: .95; margin: 0 0 20px; font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1; }
.contact-copy { grid-column: 1 / -1 !important; color: var(--ink-2); max-width: 44ch; margin: 0 0 26px; font-family: var(--serif); font-size: 20px; }
.btns { grid-column: 1 / -1 !important; display: flex; flex-wrap: wrap; gap: 12px; }
.btns.inline { margin-top: 22px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 0 44px; font-size: 14px; color: var(--ink-2); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.foot-note { margin: 0; line-height: 1.6; } .foot-note span { font-family: var(--mono); font-size: 12px; }
.foot-links { display: flex; gap: 18px; margin: 0; } .foot a { text-decoration: none; } .foot a:hover { color: var(--signal); }

/* ---------- list pages ---------- */
.page-head { padding-top: clamp(44px, 7vw, 96px); padding-bottom: 28px; }
.page-title { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 9vw, 112px); letter-spacing: -.04em; line-height: .96; margin: 0 0 16px; font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1; }
.page-sub { font-family: var(--serif); color: var(--ink-2); font-size: 21px; max-width: 46ch; margin: 0; }
.empty { color: var(--ink-2); } .empty[hidden], .filter[hidden] { display: none; }
.wfeature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 40px; align-items: center; padding: clamp(20px, 3vw, 34px); margin: 12px 0 40px; border: 1px solid var(--line-2); border-radius: 22px; text-decoration: none; background: color-mix(in srgb, var(--panel-2) 60%, transparent); transition: border-color .2s; }
.wfeature:hover { border-color: var(--signal); color: var(--ink); }
.wfeature img { width: 100%; max-height: 340px; object-fit: cover; border-radius: 12px; }
.wf-eq { font-size: clamp(15px, 2vw, 24px); color: var(--plot); overflow-x: auto; } .wf-eq .katex-display { margin: 0; }
.wf-body { display: grid; gap: 10px; } .wf-title { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
@media (max-width: 780px) { .wfeature { grid-template-columns: 1fr; } }
.filter { display: grid; gap: 14px; margin: 8px 0 22px; }
.filter input { font: inherit; width: 100%; max-width: 420px; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--panel-2) 70%, transparent); color: var(--ink); }
.filter input:focus { outline: 2px solid var(--signal); outline-offset: 1px; }
.tagbar { display: flex; flex-wrap: wrap; gap: 8px; }
.tagbar button { font-family: var(--mono); font-size: 12.5px; padding: 5px 13px; border: 1px solid var(--line-2); border-radius: 99px; background: none; color: var(--ink); cursor: pointer; }
.tagbar button small { color: var(--ink-2); margin-left: 2px; }
.tagbar button:hover { background: var(--panel); } .tagbar button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); } .tagbar button.on small { color: inherit; }
.wgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.wgrid li[hidden] { display: none; }
@media (max-width: 980px) { .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (max-width: 620px) { .wgrid { grid-template-columns: 1fr; } }
.wcard { display: grid; align-content: start; gap: 8px; height: 100%; padding: 20px; border-radius: 16px; text-decoration: none; transition: transform .2s, border-color .2s; }
.wcard.text-only { border: 1px solid var(--line); background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.wcard.has-cover { padding: 0 0 18px; } .wcard.has-cover > *:not(img) { padding: 0 18px; } .wcard.has-cover img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 16px 16px 6px 6px; margin-bottom: 6px; }
.wcard:hover { transform: translateY(-3px); color: var(--ink); } .wcard.text-only:hover { border-color: var(--signal); }
.wc-glyph { font-family: var(--display); font-size: 54px; line-height: 1; color: var(--plot); opacity: .85; } .wc-eq { font-size: 1.15em; color: var(--plot); overflow: hidden; min-height: 54px; }
.wc-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.wc-title { font-family: var(--display); font-weight: 500; font-size: 23px; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.wc-sum { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }

.pdom { margin: 8px 0 52px; } .pdom-title { font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: -.02em; margin: 0 0 8px; padding-left: 14px; border-left: 3px solid var(--signal); line-height: 1.1; }
.pdom.dom-ai .pdom-title { border-color: var(--plot); }
.plist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plist a { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) auto; gap: 4px 28px; align-items: baseline; padding: 22px 10px; margin: 0 -10px; border-bottom: 1px solid var(--line); text-decoration: none; border-radius: 8px; transition: background .15s; }
.plist a:hover { background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--ink); }
.pl-title { font-family: var(--display); font-size: 26px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.pl-kind { grid-column: 1; font-family: var(--mono); font-size: 12px; color: var(--ink-2); } .pl-sum { grid-column: 2; grid-row: 1 / span 2; color: var(--ink-2); font-size: 15.5px; } .plist .tag { grid-column: 3; grid-row: 1; }
@media (max-width: 760px) { .plist a { grid-template-columns: 1fr auto; } .pl-sum { grid-column: 1 / -1; grid-row: auto; } .pl-kind { grid-column: 1 / -1; } .plist .tag { grid-column: 2; grid-row: 1; } }

.parts { list-style: none; margin: 0; padding: 0; columns: 3 280px; column-gap: 18px; }
.parts li { break-inside: avoid; margin: 0 0 18px; } .parts li[hidden] { display: none; }
.part { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; background: color-mix(in srgb, var(--panel-2) 55%, transparent); transition: border-color .2s, transform .2s; }
.part:hover { border-color: var(--signal); transform: translateY(-3px); color: var(--ink); }
.parts-h { font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -.02em; margin: 8px 0 18px; padding-left: 14px; border-left: 3px solid var(--signal); line-height: 1.1; }
.parts-h.second { margin-top: 64px; border-color: var(--line-2); } .parts-sub { color: var(--ink-2); margin: -6px 0 18px; }
.core-parts { columns: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } .core-parts li { margin: 0; } @media (max-width: 700px) { .core-parts { grid-template-columns: 1fr; } }
.part.core { border-color: var(--line-2); }
.part-art { border-bottom: 1px dashed var(--line-2); padding-bottom: 14px; } .part-art img { width: 100%; aspect-ratio: 5/3; object-fit: cover; border-radius: 8px; }
.part-body { display: grid; gap: 8px; } .part-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.part-name { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -.015em; line-height: 1.15; } .part-tag { color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.part-specs { display: grid; gap: 3px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); padding-top: 8px; border-top: 1px dashed var(--line-2); } .part-specs b { color: var(--ink); font-weight: 500; margin-right: 4px; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); padding-bottom: 80px; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { font-family: var(--serif); font-size: 21px; line-height: 1.6; max-width: 36em; margin: 0 0 1em; }
.about-text h2, .about-side h2 { font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: -.02em; margin: 2.2em 0 .5em; }
.about-side h2:first-child { margin-top: 0; } .about-side p { color: var(--ink-2); margin: 0; }
ul.plain { padding-left: 1.1em; font-family: var(--serif); font-size: 20px; line-height: 1.55; max-width: 36em; } ul.plain li { margin-bottom: .7em; }

/* ---------- article ---------- */
.art-grid {
  --text: min(680px, 100% - 2 * var(--gutter)); --wide: min(1080px, 100% - 2 * var(--gutter));
  display: grid; padding-bottom: 80px;
  grid-template-columns: [full-start] minmax(var(--gutter), 1fr) [wide-start] minmax(0, calc((var(--wide) - var(--text)) / 2)) [text-start] var(--text) [text-end] minmax(0, calc((var(--wide) - var(--text)) / 2)) [wide-end] minmax(var(--gutter), 1fr) [full-end];
}
.art-grid > *, .prose > * { grid-column: text; min-width: 0; }
.art-grid > .wide, .prose > .wide { grid-column: wide; } .art-grid > .full, .prose > .full { grid-column: full; }
.prose { display: contents; font-family: var(--serif); font-size: clamp(19px, 1.9vw, 21px); line-height: 1.68; }
.prose > * + * { margin-top: 1.25em; } .prose > :first-child { margin-top: 0; } .prose > p, .prose > ul, .prose > ol { margin-bottom: 0; }
.prose > h2, .prose > h3, .prose > h4 { margin-top: 2.1em; margin-bottom: 0; }
.crumb { font-family: var(--mono); font-size: 13px; margin: 28px 0 8px; } .crumb a { text-decoration: none; color: var(--ink-2); } .crumb a:hover { color: var(--signal); }
.dh, .mh { padding: 18px 0 30px; } .dh h1, .mh h1, .proj-head h1, .part-head h1 { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 5.8vw, 72px); line-height: 1.02; letter-spacing: -.035em; margin: 6px 0 18px; text-wrap: balance; font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1; }
.dek { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 25px); line-height: 1.45; color: var(--ink-2); margin: 0 0 16px; }
.mh { text-align: center; } .mh .dek, .mh .meta, .mh .chips { margin-left: auto; margin-right: auto; justify-content: center; } .mh .dek { max-width: 40em; }
.mh-eq { font-size: clamp(18px, 3.4vw, 40px); color: var(--plot); padding: 22px 0 8px; overflow-x: auto; } .mh-eq .katex-display { margin: 0; }
.ph { position: relative; height: min(80vh, 760px); margin-bottom: 40px; grid-column: full; } .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-over { position: absolute; inset: auto 0 0 0; padding: clamp(40px, 8vw, 110px) var(--gutter) 36px; background: linear-gradient(transparent, rgba(4, 6, 10, .82)); color: #fff; }
.ph-over > * { max-width: 760px; margin-left: auto; margin-right: auto; } .ph-over h1 { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 6vw, 80px); line-height: 1; letter-spacing: -.035em; margin: 8px auto 14px; } .ph-over .dek, .ph-over .meta, .ph-over .kicker { color: rgba(255,255,255,.86); }
.dcover { margin-top: 0; margin-bottom: 36px; }
.toc-col { display: none; }
@media (min-width: 1380px) { .toc-col { display: block; grid-column: full-start / wide-start; grid-row: span 400; align-self: start; position: sticky; top: 92px; padding-left: var(--gutter); padding-right: 10px; } .toc-mobile { display: none; } }
.toc-title { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-2); } .toc li a { display: block; padding: 4px 0 4px 12px; font-size: 13.5px; line-height: 1.35; text-decoration: none; color: var(--ink-2); margin-left: -1px; border-left: 2px solid transparent; }
.toc li.d3 a { padding-left: 24px; font-size: 13px; } .toc li a:hover { color: var(--ink); } .toc li a.on { color: var(--ink); border-left-color: var(--signal); }
.toc-mobile { margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; background: color-mix(in srgb, var(--panel-2) 60%, transparent); } .toc-mobile summary { cursor: pointer; padding: 10px 0; font-weight: 500; font-size: 15px; } .toc-mobile .toc-title { display: none; } .toc-mobile .toc ol { margin-bottom: 12px; }
.proj-head, .part-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); gap: 28px clamp(24px, 4vw, 56px); padding: 18px 0 36px; align-items: start; }
.part-head { grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) minmax(240px, 340px); } .part-head .specs { grid-column: 3; } .ph-art { padding: 14px; border: 1px solid var(--line-2); border-radius: 14px; background: color-mix(in srgb, var(--panel-2) 60%, transparent); } .ph-art img { width: 100%; border-radius: 8px; }
@media (max-width: 860px) { .proj-head, .part-head { grid-template-columns: 1fr; } .part-head .specs { grid-column: auto; } }
.proj-head h1 .tag { font-size: 12px; font-family: var(--mono); letter-spacing: 0; } .used-in { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin: 0; }
.specs.datasheet { border-top: 2px solid var(--ink); } .specs.datasheet div { grid-template-columns: 110px 1fr; }
.art-foot { margin-top: 72px; } .art-foot > * + * { margin-top: 48px; } .related h2 { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -.015em; margin: 0 0 12px; } .related-proj { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.mini-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; } .mini-parts a { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-weight: 500; font-size: 15px; } .mini-parts a:hover { border-color: var(--signal); color: var(--ink); } .mini-parts small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-2); line-height: 1.35; } .mini-parts img { width: 70px; aspect-ratio: 5/4; object-fit: cover; border-radius: 6px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-family: var(--display); font-weight: 500; letter-spacing: -.01em; line-height: 1.25; } .pager a:hover { border-color: var(--signal); color: var(--ink); } .pager a.r { text-align: right; } .pager span { display: block; font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
body.is-post .art-grid { position: relative; } .progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--signal); z-index: 30; }

/* ---------- prose parts ---------- */
.prose h2, .prose h3, .prose h4 { font-family: var(--display); font-weight: 500; letter-spacing: -.025em; line-height: 1.12; position: relative; font-variation-settings: "SOFT" 60, "WONK" 1; }
.prose h2 { font-size: 1.85em; } .prose h3 { font-size: 1.38em; } .prose h4 { font-size: 1.12em; }
.prose .anchor { position: absolute; left: -1.1em; color: var(--line-2); text-decoration: none; opacity: 0; font-family: var(--mono); font-weight: 400; } .prose :is(h2, h3, h4):hover .anchor, .prose .anchor:focus { opacity: 1; } @media (max-width: 800px) { .prose .anchor { display: none; } }
.prose a { text-decoration-color: var(--signal); } .prose ul, .prose ol { padding-left: 1.3em; } .prose li + li { margin-top: .4em; }
.prose blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--signal); color: var(--ink-2); font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 2.4em 0; }
.prose code { font-family: var(--mono); font-size: .8em; background: var(--panel); border: 1px solid var(--line); padding: .1em .38em; border-radius: 5px; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; display: block; overflow-x: auto; } .prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); } .prose th { font-weight: 600; border-bottom: 1px solid var(--line-2); }
.prose img:not(.sheet-img) { border-radius: 10px; }
.math-block { overflow-x: auto; padding: 4px 0; } .math-block .katex-display { margin: .6em 0; } .katex { font-size: 1.06em; } .math-error { color: #b3261e; }
.prose figure, .prose .fig { margin: 2em 0; } .prose figure > a, .fig > a { display: block; cursor: zoom-in; } .fig img, .gallery img { display: block; width: 100%; border: 1px solid var(--line); }
.prose figcaption, .embed figcaption { font-family: var(--sans); font-size: 14px; color: var(--ink-2); margin-top: 8px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.embed figcaption a { white-space: nowrap; }
.fig.video video { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #000; }
.gallery-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px; } .gallery-grid figure { margin: 0; } .gallery-grid img { aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; } @media (max-width: 600px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.callout { font-family: var(--sans); font-size: 16px; line-height: 1.6; padding: 16px 20px; border-radius: 12px; border: 1px solid var(--line-2); border-left: 4px solid var(--plot); background: color-mix(in srgb, var(--panel) 70%, transparent); } .callout > strong { display: block; margin-bottom: 4px; } .callout p { margin: 0; } .callout p + p { margin-top: .7em; }
.callout-idea { border-left-color: var(--signal); } .callout-warn { border-left-color: #c28a00; }
.md-error { font-family: var(--mono); font-size: 13px; color: #b3261e; border: 1px dashed #b3261e; border-radius: 8px; padding: 10px 14px; }
.footnotes { font-size: .82em; border-top: 1px solid var(--line-2); margin-top: 3em; padding-top: 1em; } .footnotes ol { padding-left: 1.2em; } .fn-ref a { text-decoration: none; font-family: var(--sans); font-size: .72em; padding: 0 2px; } .fn-back { text-decoration: none; color: var(--ink-2); }
.code { background: #0D1117; color: #E8E6DF; border-radius: 12px; overflow: hidden; font-family: var(--mono); } .code-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; font-size: 12px; color: #8e99a5; border-bottom: 1px solid #222a33; }
.copy { font: inherit; color: inherit; background: none; border: 1px solid #343a45; border-radius: 6px; padding: 2px 10px; cursor: pointer; } .copy:hover { color: #fff; border-color: #FF7A3D; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; } .code code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.tok-k { color: #FF9A66; } .tok-s { color: #A7DDB0; } .tok-c { color: #7A857F; font-style: italic; } .tok-n { color: #F2C57C; } .tok-f { color: #9CCBFF; } .tok-t { color: #D2B8FF; } .tok-m { color: #E58FB0; } .tok-p { color: #F2C57C; }

/* embeds */
.embed { margin: 2em 0; } .embed-frame { position: relative; aspect-ratio: var(--ratio, 16 / 10); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.embed[style*="--h"] .embed-frame { aspect-ratio: auto; height: var(--h); }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.embed-fallback, .embed-load { font: 500 15px var(--sans); color: var(--ink); text-decoration: underline; text-decoration-color: var(--signal); background: none; border: 0; cursor: pointer; padding: 12px; text-align: center; }
.embed-load { border: 1px solid var(--ink); border-radius: 999px; padding: 10px 20px; text-decoration: none; margin-top: 8px; } .embed-load:hover { background: var(--ink); color: var(--bg); }
.embed-frame.loading::after { content: "Loading…"; position: absolute; left: 14px; top: 12px; font: 12px var(--mono); color: var(--ink-2); animation: pulse 1.4s infinite; pointer-events: none; z-index: -0; }
.embed-frame.slow::before { content: "Taking a while? Use the link underneath to open it directly."; position: absolute; left: 14px; bottom: 12px; font: 12px var(--mono); color: var(--signal); z-index: 1; background: color-mix(in srgb, var(--bg) 85%, transparent); padding: 3px 8px; border-radius: 6px; }
@keyframes pulse { 50% { opacity: .35; } }
.yt-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; display: block; } .yt-play img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; } .yt-play:hover img { opacity: 1; }
.yt-icon { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: var(--signal); } .yt-icon::after { content: ""; position: absolute; left: 27px; top: 14px; border-left: 17px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
/* plot */
.plot { margin: 2em 0; } .plot-frame { border: 1px solid var(--line-2); border-radius: 14px; background: color-mix(in srgb, var(--panel-2) 70%, transparent); padding: 12px; }
.plot-canvas { display: block; width: 100%; aspect-ratio: 16 / 9; touch-action: pan-y; cursor: crosshair; } .plot-fallback { font-family: var(--mono); font-size: 14px; color: var(--ink-2); background: none; border: 0; }
.plot-readout { font: 12px/1.4 var(--mono); color: var(--ink-2); min-height: 1.4em; padding: 4px 4px 0; }
.plot-sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 22px; padding: 8px 4px 2px; } .plot-sliders label { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; font: 13px var(--mono); } .plot-sliders output { color: var(--plot); } .plot-sliders input { grid-column: 1 / -1; width: 100%; accent-color: var(--signal); }
/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; } .lightbox::backdrop { background: rgba(5, 8, 12, .9); }
.lightbox figure { margin: 0; height: 100%; display: grid; place-items: center; align-content: center; gap: 12px; padding: 20px 64px; } .lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; background: #fff; } .lightbox figcaption { color: #dfe4ea; font-size: 15px; text-align: center; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 99px; width: 44px; height: 44px; font-size: 26px; line-height: 1; cursor: pointer; } .lightbox button:hover { background: var(--signal); } .lightbox button[hidden] { display: none; }
.lb-close { right: 18px; top: 18px; } .lb-prev { left: 12px; top: 50%; } .lb-next { right: 12px; top: 50%; }

/* ---------- resume (also the print stylesheet) ---------- */
.resume { max-width: 860px; padding-top: 40px; padding-bottom: 80px; } .resume-actions { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.resume-head h1 { font-family: var(--display); font-size: clamp(34px, 6vw, 56px); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; margin: 0 0 8px; } .resume-line { font-size: 19px; margin: 0 0 6px; }
.resume h2 { font-family: var(--mono); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); border-bottom: 1px solid var(--line-2); padding-bottom: 6px; margin: 34px 0 14px; }
.r-item { margin-bottom: 18px; break-inside: avoid; } .r-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; } .r-row h3 { font-size: 17px; font-weight: 600; margin: 0; }
.r-item p { margin: 4px 0 0; } .r-item ul { margin: 8px 0 0; padding-left: 1.2em; } .r-item li { margin-bottom: 6px; }
.r-skills { margin: 0; } .r-skills div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 5px 0; } .r-skills dt { font-weight: 600; } .r-skills dd { margin: 0; } @media (max-width: 600px) { .r-skills div { grid-template-columns: 1fr; gap: 0; } }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 10.5pt; } body::before, #bg, .probe { display: none !important; }
  .top, .foot, .skip, .resume-actions { display: none !important; } .wrap.resume { max-width: none; padding: 0; } .meta, .resume h2 { color: #333; } a { text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- SpiRobs stage ---------- */
.sim { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--panel-2) 52%, transparent); backdrop-filter: blur(2px); }
.sim-stage { position: relative; }
.sim canvas { display: block; width: 100%; height: clamp(440px, 64vw, 760px); touch-action: pan-y; }
.sim-hud { position: absolute; inset: 0; pointer-events: none; padding: clamp(14px, 2.2vw, 24px); display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.sim-title { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.sim-title small { text-transform: none; letter-spacing: 0; color: var(--ink-2); font-size: 12px; }
.sim-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 22%, transparent); animation: simpulse 2.4s ease-in-out infinite; }
@keyframes simpulse { 50% { box-shadow: 0 0 0 8px transparent; } }
.sim-ten { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 7px; min-width: 210px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(6px); align-self: flex-end; position: absolute; right: clamp(14px, 2.2vw, 24px); top: clamp(14px, 2.2vw, 24px); }
.sim-ten li { display: grid; grid-template-columns: 22px 1fr 44px 20px; align-items: center; gap: 8px; }
.sim-ten em { position: relative; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.sim-ten i { position: absolute; inset: 0; background: var(--plot); transform: scaleX(0); transition: background .2s; }
.sim-ten li.pull i { background: var(--signal); }
.sim-ten b { font-weight: 500; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.sim-ten small { color: var(--ink-2); }
.sim-tip { margin: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--bg) 70%, transparent); font-variant-numeric: tabular-nums; white-space: pre; }
.sim figcaption { padding: 12px clamp(14px, 2.2vw, 24px); border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.sim.in-project { margin-bottom: 8px; }
@media (max-width: 640px) { .sim-ten { position: static; align-self: flex-start; min-width: 0; } .sim-hud { gap: 10px; } }
.sim-tip { align-self: flex-end; }

/* ---------- project and AI icons ---------- */
.feat-ico { width: clamp(112px, 12vw, 150px); color: var(--ink-2); margin: 0 0 14px -4px; } .feat-ico:empty { display: none; }
.feat-ico svg, .ph-ico svg, .pl-ico svg { width: 100%; height: auto; display: block; }
.ph-ico { width: clamp(120px, 14vw, 170px); color: var(--ink-2); margin: 0 0 8px -4px; } .ph-ico:empty { display: none; }
.plist a { grid-template-columns: 84px minmax(0, 220px) minmax(0, 1fr) auto; align-items: center; }
.pl-ico { grid-column: 1; grid-row: 1 / span 2; color: var(--ink-2); } .pl-ico:empty { visibility: hidden; }
.pl-title { grid-column: 2; } .pl-kind { grid-column: 2; } .pl-sum { grid-column: 3; } .plist .tag { grid-column: 4; }
@media (max-width: 760px) { .plist a { grid-template-columns: 64px 1fr auto; } .pl-ico { grid-column: 1; grid-row: 1 / span 2; } .pl-title { grid-column: 2; } .pl-kind { grid-column: 2; } .pl-sum { grid-column: 1 / -1; } .plist .tag { grid-column: 3; grid-row: 1; } }
.art .plot-s { stroke: var(--plot); }

/* ---------- home: organisation and presence ---------- */
.sec-n { display: block; font-family: var(--mono); font-style: normal; font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--signal); margin-bottom: 10px; }
.jump { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 0; padding-bottom: 6px; margin-top: -34px; font-family: var(--mono); font-size: 12.5px; }
.jump a { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(8px); text-decoration: none; color: var(--ink-2); transition: color .2s, border-color .2s, transform .2s; }
.jump a b { color: var(--signal); font-weight: 500; } .jump a:hover { color: var(--ink); border-color: var(--signal); transform: translateY(-1px); }
@media (max-width: 640px) { .jump { margin-top: 0; } }

.band { margin: clamp(28px, 5vw, 64px) 0; padding: clamp(40px, 6vw, 84px) 0; color: var(--ink); position: relative; overflow: hidden;
  --bg: #0A0D12; --panel: #10151C; --panel-2: #151B24; --ink: #E8EBEF; --ink-2: #8F9AA6; --line: #1F2833; --line-2: #344050; --signal: #FF7A3D; --plot: #6EA8FF;
  background: radial-gradient(1100px 520px at 70% 0%, rgba(255, 122, 61, .13), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgba(110, 168, 255, .10), transparent 60%), #0A0D12; }
.band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(150, 180, 220, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 180, 220, .06) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(#000, transparent 90%); }
.band > .wrap { position: relative; }
.band .kicker { color: var(--signal); }
.band-title { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 6.4vw, 92px); line-height: .98; letter-spacing: -.04em; margin: 6px 0 clamp(22px, 3vw, 40px); max-width: 14ch; font-variation-settings: "SOFT" 60, "WONK" 1; }
.band-title em { font-style: italic; color: var(--signal); }
.band .sim { border-color: var(--line-2); background: rgba(16, 21, 28, .6); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .02) inset; }
.band .sim canvas { height: clamp(460px, 54vw, 700px); }
.band .more a { color: var(--ink); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
html.no-js .reveal { opacity: 1; transform: none; }

/* ---------- landing: name and introduction ---------- */
.hero-name { font-family: var(--display); font-weight: 400; font-size: clamp(54px, 8.6vw, 124px); line-height: .94; letter-spacing: -.045em; margin: 4px 0 18px; font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 1; }
.hero .statement { font-size: clamp(24px, 2.8vw, 38px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 22px; color: var(--ink-2); max-width: 24ch; }
.hero .statement em { color: var(--signal); }
.hero-role { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; padding: 0; font-family: var(--mono); font-size: 12.5px; }
.hero-role span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.hero-role .live { width: 7px; height: 7px; border-radius: 50%; background: #3DBE72; box-shadow: 0 0 0 3px color-mix(in srgb, #3DBE72 25%, transparent); }
.hero-social { margin-top: 14px; }
.about-intro .about-body { max-width: 66ch; } .about-intro .about-body p { margin: 0 0 14px; }
.about-intro .about-lede { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; letter-spacing: -.015em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 22px 0; }
.facts div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.facts dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--signal); margin-bottom: 4px; } .facts dd { margin: 0; font-size: 15px; } .facts b { font-weight: 600; }
.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } @media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
.about-intro .chips { margin: 4px 0 22px; }

/* ---------- GitHub repo cards ---------- */
.repos { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.repos a { display: grid; gap: 8px; height: 100%; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 14px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); text-decoration: none; transition: border-color .2s, transform .2s; }
.repos a:hover { border-color: var(--signal); transform: translateY(-2px); color: var(--ink); }
.repo-top { display: flex; align-items: center; gap: 9px; color: var(--ink-2); } .repo-name { font-family: var(--mono); font-size: 14px; color: var(--ink); flex: 1; overflow-wrap: anywhere; }
.repo-desc { font-size: 14.5px; color: var(--ink-2); } .repo-lang { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.parts { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; align-items: stretch; }
.parts li { margin: 0; } .parts li > a { height: 100%; }

/* ---------- hero arm ---------- */
.sim.stage-dark { --bg: #0A0D12; --panel: #10151C; --panel-2: #151B24; --ink: #E8EBEF; --ink-2: #8F9AA6; --line: #1F2833; --line-2: #344050; --signal: #FF7A3D; --plot: #6EA8FF; color: var(--ink);
  border-color: var(--line-2); background: radial-gradient(520px 360px at 70% 0%, rgba(255, 122, 61, .15), transparent 65%), radial-gradient(420px 320px at 0% 100%, rgba(110, 168, 255, .11), transparent 65%), #0A0D12; box-shadow: 0 34px 80px -34px rgba(10, 13, 18, .55); }
.hero-sim { min-width: 0; }
.sim.in-hero canvas { height: clamp(440px, 46vw, 620px); }
.sim.in-hero .sim-ten { min-width: 0; padding: 9px 11px; gap: 5px; grid-template-columns: 1fr; font-size: 11px; }
.sim.in-hero .sim-ten li { grid-template-columns: 20px 52px 40px 18px; gap: 6px; }
.sim.in-hero figcaption { font-size: 12.5px; padding: 10px 16px; }
@media (max-width: 860px) { .sim.in-hero canvas { height: clamp(380px, 90vw, 520px); } }
.sim.in-hero .sim-title small { display: none; }
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(24px, 4vw, 56px); }
.sim.in-hero { box-shadow: none; }
.mermaid-wrap { margin: 1.5em 0; overflow-x: auto; text-align: center; } .mermaid-wrap pre.mermaid { background: none; border: 0; padding: 0; font-family: var(--mono); font-size: 13px; white-space: pre; }
