:root {
  --bg: #0b0709;
  --bg2: #140c10;
  --line: #2a1a20;
  --ink: #efe6e1;
  --mute: #9a8a90;
  --dim: #5f5057;
  --red: #e0432f;
  --red2: #a8261d;
  --violet: #a77bff;
  --good: #7fd6a2;
  --bad: #ff5a47;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--red); color: #fff; }

/* faint scanlines over everything */
.scan {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  font-family: var(--mono); font-size: 13px;
  background: linear-gradient(var(--bg) 60%, rgba(11,7,9,0));
}
.mark {
  font-weight: 700; letter-spacing: .08em; text-decoration: none; font-size: 15px;
  color: var(--ink); position: relative;
}
.mark::after { content: "_"; color: var(--red); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav nav { display: flex; gap: 4px; margin-left: auto; }
.nav nav a {
  text-decoration: none; color: var(--mute); padding: 6px 10px; border: 1px solid transparent;
}
.nav nav a:hover { color: var(--ink); }
.nav nav a.on { color: var(--ink); border-color: var(--line); background: var(--bg2); }
.nav nav a.on::before { content: "["; color: var(--red); margin-right: 2px; }
.nav nav a.on::after { content: "]"; color: var(--red); margin-left: 2px; }
.gh {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  color: var(--ink); padding: 6px 12px; border: 1px solid var(--line); background: var(--bg2);
}
.gh:hover { border-color: var(--red); color: #fff; }

main { flex: 1; }
.panel[hidden] { display: none !important; }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--red); margin: 0 0 10px; letter-spacing: .02em; }
h1 {
  font-family: var(--mono); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(38px, 6.4vw, 76px); line-height: 1; margin: 0 0 22px;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 48px) 80px; }

/* ---------- home ---------- */
#tab-home {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex; align-items: center;
  overflow: hidden;
}
.art { position: absolute; top: 0; bottom: 0; right: 0; width: 58%; }
.art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.art::after { /* fade the art into the text side */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(11,7,9,.0) 28%), linear-gradient(0deg, var(--bg) 0%, rgba(11,7,9,0) 14%);
}
.hero { position: relative; z-index: 2; max-width: 560px; padding: 40px clamp(16px, 4vw, 48px); }
.lede { color: #d8cdc8; font-size: 17px; margin: 0 0 28px; max-width: 520px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.btn {
  font-family: var(--mono); font-size: 13px; text-decoration: none;
  padding: 11px 16px; background: var(--red); color: #fff; border: 1px solid var(--red);
  display: inline-flex; gap: 8px; align-items: center; position: relative;
}
.btn:hover { background: #ff563f; animation: jitter .18s steps(2) 2; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
@keyframes jitter { 0% { transform: translate(1px,0); } 50% { transform: translate(-2px,1px); } 100% { transform: none; } }
.facts { list-style: none; padding: 0; margin: 0; display: flex; gap: 28px; flex-wrap: wrap; font-family: var(--mono); }
.facts li { display: flex; flex-direction: column; }
.facts b { font-size: 20px; color: var(--ink); }
.facts span { font-size: 11.5px; color: var(--mute); }

/* ---------- work ---------- */
.proj { border-top: 1px solid var(--line); padding: 34px 0 30px; }
.proj header { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.idx { font-family: var(--mono); color: var(--red); font-size: 13px; }
.proj h2 { font-family: var(--mono); font-size: 28px; margin: 0; letter-spacing: -.01em; }
.stack { font-family: var(--mono); font-size: 12px; color: var(--mute); margin-left: auto; }
.what { color: #d3c7c2; margin: 0 0 18px; max-width: 760px; }
.nums { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: var(--mute); }
.nums b { color: var(--ink); font-size: 14px; margin-right: 4px; }
.fine { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin: 6px 0 0; }
.repo { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--violet); text-decoration: none; }
.repo::after { content: " →"; }
.repo:hover { color: #fff; }
.repo.soon { color: var(--dim); pointer-events: none; }
.repo.soon::after { content: " · public soon"; }
.repo.live { color: var(--red); }

/* demo window */
.demo { border: 1px solid var(--line); background: #0e090b; position: relative; }
.demo .bar {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--dim);
}
.demo .bar i { width: 8px; height: 8px; border-radius: 50%; background: #2c1d23; }
.demo .bar span { margin-left: 8px; }
.replay {
  margin-left: auto; font: inherit; color: var(--mute); background: none;
  border: 1px solid var(--line); padding: 2px 8px; cursor: pointer;
}
.replay:hover { color: var(--ink); border-color: var(--mute); }
.demo .body { height: 290px; overflow: hidden; padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; position: relative; }

.term .l { white-space: pre-wrap; word-break: break-word; min-height: 1.55em; }
.term .p { color: var(--red); }
.term .c { color: var(--ink); }
.term .o { color: var(--mute); }
.term .dim { color: var(--dim); }
.term .good { color: var(--good); }
.term .bad { color: var(--bad); }
.term .vio { color: var(--violet); }
.caret::after { content: "▌"; color: var(--red); animation: blink .8s steps(1) infinite; }
.tbl { color: var(--mute); }

/* reviewbot diff */
.diff .ln { display: grid; grid-template-columns: 30px 14px 1fr; white-space: pre; transition: background .25s; }
.diff .n { color: var(--dim); }
.diff .add { color: #cfe8d6; }
.diff .add .s { color: var(--good); }
.diff .hit { background: rgba(224,67,47,.18); box-shadow: inset 2px 0 var(--red); }
.diff .scanning { background: rgba(167,123,255,.10); }
.note {
  margin: 8px 0 4px 44px; border: 1px solid var(--line); border-left: 2px solid var(--red);
  padding: 6px 10px; background: #160d10; white-space: normal; opacity: 0; transform: translateY(4px); transition: .3s;
}
.note.in { opacity: 1; transform: none; }
.note b { color: var(--red); font-weight: 600; }
.ai { margin-left: 44px; white-space: normal; }
.ai s { color: var(--dim); }

/* inkwell */
.ink { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dev { border: 1px solid var(--line); background: #120b0e; display: flex; flex-direction: column; min-width: 0; }
.dev .h { display: flex; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--mute); font-size: 11.5px; }
.dot { display: inline-flex; align-items: center; gap: 6px; }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.dot.off { color: var(--bad); }
.dot.off::before { background: var(--bad); }
.dev .t { padding: 10px; color: var(--ink); white-space: pre-wrap; word-break: break-word; font-family: var(--sans); font-size: 13.5px; flex: 1; }
.dev .t mark { background: rgba(167,123,255,.25); color: #fff; }
.ink .status { grid-column: 1 / -1; color: var(--mute); font-size: 12px; min-height: 1.5em; }

/* tripwire feed */
.feed .row { display: grid; grid-template-columns: 48px 1fr 70px 110px; gap: 10px; align-items: center; padding: 3px 0; border-bottom: 1px dashed #21151a; animation: rowin .35s ease-out; }
@keyframes rowin { from { opacity: 0; transform: translateY(-6px); } }
.feed .eco { color: var(--dim); }
.feed .ver { color: var(--dim); }
.feed .score { height: 6px; background: #21151a; position: relative; }
.feed .score i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--good); width: 0; transition: width .5s; }
.feed .row.flag { color: #ffd9d3; }
.feed .row.flag .score i { background: var(--bad); }
.feed .why { grid-column: 2 / -1; color: var(--bad); font-size: 11.5px; white-space: normal; }
.feed .head { color: var(--mute); margin-bottom: 6px; display: flex; justify-content: space-between; }

/* duet */
.duet { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.scr { border: 1px solid var(--line); background: #120b0e; min-width: 0; }
.scr .h { padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--mute); font-size: 11.5px; display: flex; justify-content: space-between; }
.scr svg { display: block; width: 100%; height: 150px; }
.duet .status { grid-column: 1 / -1; color: var(--mute); font-size: 12px; white-space: pre-wrap; }

/* design demo: themed workspace */
.dash {
  --t-bg: #120b0e; --t-panel: #160d11; --t-grid: #24161b; --t-up: #7fd6a2; --t-dn: #e0432f; --t-ln: #a77bff; --t-tx: #9a8a90;
  display: grid; grid-template-columns: 1fr 150px; grid-template-rows: auto 1fr; gap: 8px; padding: 10px !important;
  background: var(--t-bg); transition: background .5s;
}
.dash .tb { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--t-tx); font-size: 11.5px; transition: color .5s; }
.dash .tb .tab { padding: 3px 8px; border: 1px solid var(--t-grid); background: var(--t-panel); transition: .5s; }
.dash .tb .tab.on { color: var(--t-ln); border-color: var(--t-ln); }
.dash .sw { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.dash .sw button { width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.dash .sw button.on { border-color: var(--t-tx); transform: scale(1.15); }
.dash .win { border: 1px solid var(--t-grid); background: var(--t-panel); position: relative; min-width: 0; transition: .5s; }
.dash .win .wh { display: flex; justify-content: space-between; padding: 4px 8px; font-size: 11px; color: var(--t-tx); border-bottom: 1px solid var(--t-grid); transition: .5s; }
.dash canvas { display: block; width: 100%; height: calc(100% - 25px); }
.dash .side { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.dash .side .win { flex: 1; }
.dash .kv { padding: 6px 8px; font-size: 11px; color: var(--t-tx); display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; }
.dash .kv b { color: var(--t-ln); font-weight: 600; transition: color .5s; }

/* test results under each project */
.tests { margin-top: 14px; border: 1px solid var(--line); background: #0e090b; font-family: var(--mono); font-size: 12.5px; }
.tests summary { cursor: pointer; padding: 8px 12px; list-style: none; display: flex; gap: 12px; align-items: center; color: var(--mute); flex-wrap: wrap; }
.tests summary::-webkit-details-marker { display: none; }
.tests summary span::before { content: "$ "; color: var(--red); }
.tests summary b { color: var(--good); font-weight: 600; }
.tests summary::after { content: "−"; margin-left: auto; color: var(--red); }
.tests:not([open]) summary::after { content: "+"; }
.tests ul { list-style: none; margin: 0; padding: 6px 12px 12px; border-top: 1px dashed var(--line); }
.tests li { padding: 3px 0 3px 20px; position: relative; color: #d3c7c2; line-height: 1.5; }
.tests li::before { position: absolute; left: 0; top: 3px; }
.tests li.ok::before { content: "✔"; color: var(--good); }
.tests li.bench::before { content: "≈"; color: var(--violet); }
.tests li.warn { color: var(--mute); }
.tests li.warn::before { content: "!"; color: #e0b44a; left: 4px; }
.tests .k { color: var(--ink); font-weight: 600; }

/* Traders Room: engine + feats */
.engine { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; margin-top: 22px; }
.engine h4 { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .16em; color: var(--red); margin: 0 0 10px; }
.engine ol { margin: 0; padding: 0; list-style: none; counter-reset: e; }
.engine ol li { counter-increment: e; position: relative; padding: 5px 0 5px 34px; color: #d3c7c2; border-bottom: 1px dashed #21151a; font-size: 14px; }
.engine ol li::before { content: counter(e, decimal-leading-zero); position: absolute; left: 0; top: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--violet); }
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feats li { background: #0e090b; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.feats b { font-family: var(--mono); font-size: 18px; color: var(--ink); letter-spacing: -.01em; }
.feats span { font-size: 12.5px; color: var(--mute); line-height: 1.4; }
.feats li:hover b { color: var(--red); }
@media (max-width: 760px) { .engine { grid-template-columns: 1fr; } }

/* ---------- project tiles ---------- */
.view-switch { display: flex; gap: 6px; align-items: center; margin: -6px 0 18px; font-family: var(--mono); font-size: 12px; }
.view-switch button { font: inherit; color: var(--mute); background: var(--bg2); border: 1px solid var(--line); padding: 5px 10px; cursor: pointer; }
.view-switch button.on { color: var(--ink); border-color: var(--red); }
.view-switch span { margin-left: 10px; color: var(--dim); }
.tile {
  font: inherit; color: inherit; text-align: left; cursor: pointer; background: #0e090b;
  border: 1px solid var(--line); position: relative; transition: border-color .2s, transform .2s, background .2s;
}
.tile:hover, .tile:focus-visible { border-color: var(--red); background: #130b0e; outline: none; }
.tile b { font-weight: 700; }
.t-idx { font-family: var(--mono); font-size: 12px; color: var(--red); }
.t-name { font-family: var(--mono); font-size: 20px; letter-spacing: -.01em; display: block; }
.t-tag { color: #cfc3be; font-size: 13.5px; display: block; }
.t-stack { font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.t-stat { font-family: var(--mono); font-size: 13px; color: var(--violet); }
.t-tests { font-family: var(--mono); font-size: 11.5px; color: var(--good); }
.t-open { font-family: var(--mono); color: var(--dim); transition: color .2s, transform .2s; }
.tile:hover .t-open { color: var(--red); transform: translate(2px, -2px); }

.tiles.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tiles.grid .tile { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 14px; min-height: 210px; }
.tiles.grid .tile:hover { transform: translateY(-3px); }
.tiles.grid .t-main { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.tiles.grid .t-open { position: absolute; top: 12px; right: 14px; font-size: 16px; }
.tiles.grid .t-stat { border-top: 1px dashed var(--line); padding-top: 8px; }

.tiles.table { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.tiles.table .tile {
  display: grid; grid-template-columns: 34px minmax(0, 2.2fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 1.3fr) 18px;
  gap: 14px; align-items: center; padding: 12px 10px; border-width: 0 0 1px; background: transparent;
}
.tiles.table .tile:hover { background: #130b0e; }
.tiles.table .t-name { font-size: 15px; }
.tiles.table .t-tag { font-size: 12.5px; color: var(--mute); }
.tiles-head { display: none; }

/* ---------- full-screen viewer ---------- */
dialog#viewer {
  width: min(1100px, calc(100vw - 32px)); max-width: none; height: calc(100vh - 48px); max-height: none;
  padding: 0; border: 1px solid var(--red); background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column;
}
dialog#viewer:not([open]) { display: none; }
dialog#viewer::backdrop { background: rgba(5, 2, 4, .78); backdrop-filter: blur(3px); }
dialog#viewer[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } }
.vbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--mute); }
.vtitle::before { content: "~/"; color: var(--red); }
.vclose { margin-left: auto; font: inherit; color: var(--ink); background: var(--bg2); border: 1px solid var(--line); padding: 5px 12px; cursor: pointer; }
.vclose:hover { border-color: var(--red); }
.slot { overflow-y: auto; padding: 8px 28px 32px; flex: 1; }
.slot .proj { border-top: 0; padding-top: 18px; }
.slot .proj h2 { font-size: 34px; }
body:has(dialog[open]) { overflow: hidden; }

@media (max-width: 760px) {
  .view-switch span { display: none; }
  .tiles.table .tile { grid-template-columns: 26px 1fr 18px; gap: 4px 10px; }
  .tiles.table .t-main { grid-column: 2; }
  .tiles.table .t-open { grid-column: 3; grid-row: 1; }
  .tiles.table .t-stack, .tiles.table .t-stat, .tiles.table .t-tests { grid-column: 2; }
  .tiles.grid .tile { min-height: 0; }
  dialog#viewer { width: 100vw; height: 100dvh; border: 0; margin: 0; }
  .slot { padding: 4px 16px 28px; }
}

/* clipper demo */
.clip { display: flex; flex-direction: column; gap: 8px; }
.cl-head { display: flex; justify-content: space-between; color: var(--mute); font-size: 11.5px; }
.cl-state.hot { color: var(--red); }
.cl-bars { height: 92px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line); }
.cl-bars i { flex: 1; background: #3a2530; min-width: 2px; transition: height .2s; }
.cl-bars i.hot { background: var(--red); box-shadow: 0 0 10px rgba(224,67,47,.5); }
.cl-steps { display: flex; flex-direction: column; gap: 3px; color: var(--mute); }
.cl-step { animation: rowin .3s ease-out; }
.cl-step.ok { color: var(--good); }
.cl-phone {
  position: absolute; right: 14px; bottom: 14px; width: 210px; padding: 10px 12px; border: 1px solid var(--line);
  background: #160d11; display: flex; flex-direction: column; gap: 4px; opacity: 0; transform: translateY(10px); transition: .35s;
}
.cl-phone.in { opacity: 1; transform: none; }
.cl-phone b { color: var(--red); font-size: 12px; }
.cl-phone span { font-family: var(--sans); font-size: 13px; color: var(--ink); }
.cl-btns { display: flex; gap: 6px; }
.cl-btns i { font-style: normal; font-family: var(--mono); font-size: 11px; padding: 2px 8px; border: 1px solid var(--line); color: var(--mute); }
.cl-btns i:first-child { border-color: var(--good); color: var(--good); }
@media (max-width: 760px) { .cl-phone { position: static; width: auto; } }

/* ---------- research ---------- */
.intro { color: #d3c7c2; max-width: 760px; margin: 0 0 26px; font-size: 16px; }
.rfacts { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.rfacts li { background: #0e090b; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.rfacts b { font-family: var(--mono); font-size: 24px; }
.rfacts span { color: var(--mute); font-size: 12.5px; }
.methods { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 26px; }
.methods span { font-family: var(--mono); font-size: 11.5px; color: var(--mute); border: 1px solid var(--line); padding: 3px 8px; }
.methods span::before { content: "✔ "; color: var(--good); }
.rfilters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rfilters button { font-family: var(--mono); font-size: 12px; color: var(--mute); background: var(--bg2); border: 1px solid var(--line); padding: 5px 10px; cursor: pointer; }
.rfilters button.on { color: var(--ink); border-color: var(--red); }
.rtable { border-top: 1px solid var(--line); }
.rrow {
  display: grid; grid-template-columns: 30px minmax(0, 1.6fr) 110px 76px minmax(0, 2.4fr); gap: 14px; align-items: center;
  width: 100%; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
button.rrow:hover { background: #130b0e; }
button.rrow:hover .rt { color: #fff; }
.rhead { cursor: default; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
.ri { font-family: var(--mono); font-size: 11.5px; color: var(--red); }
.rt { font-weight: 600; font-size: 14px; }
.rc { font-family: var(--mono); font-size: 11.5px; color: var(--mute); }
.rr { font-size: 12.5px; color: var(--mute); line-height: 1.45; }
.badge { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border: 1px solid; justify-self: start; white-space: nowrap; }
.v-edge { color: var(--good); border-color: rgba(127,214,162,.5); }
.v-partial { color: var(--violet); border-color: rgba(167,123,255,.5); }
.v-tool { color: #e0b44a; border-color: rgba(224,180,74,.5); }
.v-no-edge { color: #c98b84; border-color: rgba(201,139,132,.35); }
.rsub { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: var(--red); margin: 40px 0 12px; }
.datasets { margin: 0; padding-left: 18px; color: #d3c7c2; }
.datasets li { margin: 6px 0; }
.datasets li::marker { content: "▸ "; color: var(--dim); }
.study header { align-items: center; }
.study .idx { text-transform: uppercase; letter-spacing: .12em; }
.sgrid { display: grid; grid-template-columns: 160px 1fr; gap: 14px 22px; margin: 18px 0 0; }
.sgrid dt { font-family: var(--mono); font-size: 12px; color: var(--red); text-transform: uppercase; letter-spacing: .12em; padding-top: 3px; }
.sgrid dd { margin: 0; color: #ddd2cd; line-height: 1.6; }
@media (max-width: 760px) {
  .rfacts { grid-template-columns: 1fr 1fr; }
  .rhead { display: none; }
  .rrow { grid-template-columns: 26px 1fr auto; gap: 4px 10px; }
  .rrow .rc { display: none; }
  .rrow .rr { grid-column: 2 / -1; }
  .sgrid { grid-template-columns: 1fr; gap: 4px; }
  .sgrid dd { margin-bottom: 12px; }
}

/* ---------- lab ---------- */
.wrap.wide { max-width: 1180px; }
.labgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.labx { border: 1px solid var(--line); background: #0e090b; display: flex; flex-direction: column; transition: border-color .2s; }
.labx:hover { border-color: #4a2a32; }
.labx header { display: flex; align-items: baseline; gap: 12px; padding: 12px 14px 10px; }
.labx h2 { font-family: var(--mono); font-size: 18px; margin: 0; }
.enlarge { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--mute); background: none; border: 1px solid var(--line); padding: 3px 8px; cursor: pointer; }
.enlarge:hover { color: var(--ink); border-color: var(--red); }
.labx .stage { position: relative; height: 280px; overflow: hidden; background: #0b0709; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); touch-action: none; cursor: crosshair; }
.labx .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.labx .what { padding: 12px 14px 0; margin: 0; font-size: 13.5px; }
.lab-tech { font-family: var(--mono); font-size: 11px; color: var(--dim); padding: 6px 14px 14px; margin: 0; }
.slot .labx { border: 0; background: none; }
.slot .labx .stage { height: min(68vh, 640px); }
.slot .enlarge { display: none; }

/* holo card */
.holo-stage { display: grid; place-items: center; perspective: 900px; cursor: default; background: radial-gradient(circle at 50% 120%, #2a0f16 0%, #0b0709 60%) !important; }
.holo { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%; width: min(78%, 340px); aspect-ratio: 1.586; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; }
.holo-in {
  position: relative; width: 100%; height: 100%; border-radius: 14px; overflow: hidden; padding: 16px 18px;
  background: linear-gradient(135deg, #1c0d13, #120a1c 55%, #1a0c10); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(224,67,47,.15); color: #f2e8e4; font-family: var(--mono);
  display: flex; flex-direction: column;
}
.h-top { display: flex; justify-content: space-between; font-size: 12px; }
.h-mark { font-weight: 700; letter-spacing: .06em; }
.h-mark, .h-chip { color: #e8c49a; }
.h-id { color: #9a8a90; }
.h-chip { width: 42px; margin-top: 14px; }
.h-name { margin-top: auto; font-size: 16px; letter-spacing: .14em; }
.h-role { font-size: 10.5px; color: #9a8a90; letter-spacing: .06em; }
.h-foil {
  position: absolute; inset: 0; mix-blend-mode: color-dodge; opacity: .55; pointer-events: none;
  background: repeating-linear-gradient(115deg, #e0432f 0%, #f0b43c 6%, #3cf0c8 12%, #a77bff 18%, #e0432f 24%);
  background-size: 300% 300%; background-position: var(--gx) var(--gy);
  -webkit-mask-image: radial-gradient(circle at var(--gx) var(--gy), #000 0%, transparent 65%);
  mask-image: radial-gradient(circle at var(--gx) var(--gy), #000 0%, transparent 65%);
}
.h-glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.32), transparent 45%); mix-blend-mode: overlay; }

/* command palette */
.pal-stage { display: grid; place-items: center; cursor: default; padding: 16px; background: radial-gradient(circle at 30% 0%, #1d0d14, #0b0709 60%) !important; }
.pal { width: min(100%, 460px); border: 1px solid #3a2530; background: rgba(20,12,16,.92); box-shadow: 0 24px 60px -20px #000; font-family: var(--mono); font-size: 13px; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pal-in span { color: var(--red); }
.pal input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font: inherit; }
.pal kbd { font: inherit; font-size: 10.5px; color: var(--dim); border: 1px solid var(--line); padding: 1px 5px; }
.pal ul { list-style: none; margin: 0; padding: 6px; max-height: 176px; overflow: auto; }
.pal li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; cursor: pointer; color: #cfc3be; }
.pal li.on { background: #24141b; color: #fff; box-shadow: inset 2px 0 var(--red); }
.pal li b { color: var(--red); font-weight: 700; }
.pal li em { font-style: normal; font-size: 11px; color: var(--dim); }
.pal li.none { color: var(--dim); cursor: default; }
.pal-foot { display: flex; gap: 14px; padding: 6px 12px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--dim); }
.pal-msg { margin-left: auto; color: var(--good); }
@media (max-width: 760px) {
  .labgrid { grid-template-columns: 1fr; }
  .labx .stage { height: 240px; }
  .nav nav a { padding: 6px 4px; font-size: 12px; }
}

/* ---------- resume ---------- */
.cv { max-width: 820px; }
.cv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cv-top h1 { margin-bottom: 10px; }
.cv-sub { font-family: var(--mono); font-size: 12.5px; color: var(--mute); margin: 0 0 8px; }
.cv-sub a { color: var(--violet); text-decoration: none; }
.cv h3 {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: var(--red);
  margin: 34px 0 12px; display: flex; align-items: center; gap: 12px;
}
.cv h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cv p { color: #d3c7c2; margin: 0; }
.job { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.job b { font-size: 16px; }
.job span { color: var(--mute); margin-left: 8px; }
.job time { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.cv ul { margin: 6px 0 0; padding-left: 18px; color: #d3c7c2; }
.cv li { margin: 4px 0; }
.cv li::marker { content: "– "; color: var(--dim); }
.skills { display: grid; grid-template-columns: 170px 1fr; gap: 6px 16px; margin: 0; }
.skills dt { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.skills dd { margin: 0; color: #d3c7c2; }

footer {
  display: flex; justify-content: space-between; padding: 18px clamp(16px, 4vw, 48px);
  font-family: var(--mono); font-size: 12px; color: var(--mute); border-top: 1px solid var(--line);
}
footer .dim { color: var(--dim); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .nav { gap: 10px; }
  .gh span { display: none; }
  .nav nav a { padding: 6px 6px; }
  #tab-home { flex-direction: column; align-items: stretch; min-height: 0; }
  .art { position: relative; width: 100%; height: 54vh; min-height: 300px; }
  .art::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(11,7,9,0) 45%); }
  .hero { margin-top: -70px; padding-top: 0; padding-bottom: 48px; }
  .dash { grid-template-columns: 1fr !important; }
  .dash .side { display: none; }
  .stack { margin-left: 0; width: 100%; }
  .ink, .duet { grid-template-columns: 1fr; }
  .duet .scr svg { height: 90px; }
  .demo .body { height: 330px; font-size: 11.5px; }
  .feed .row { grid-template-columns: 34px 1fr 64px; }
  .feed .ver { display: none; }
  .skills { grid-template-columns: 1fr; }
  .skills dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
.ink .status .okmsg { color: var(--good); }

/* phone nav with five tabs: tighter, and it can scroll sideways instead of pushing GitHub off screen */
@media (max-width: 760px) {
  .nav { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .mark { font-size: 13px; }
  .nav nav { min-width: 0; overflow-x: auto; scrollbar-width: none; gap: 0; }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav a { padding: 6px 5px; font-size: 12px; white-space: nowrap; }
  .nav nav a.on::before, .nav nav a.on::after { content: none; }
  .gh { padding: 6px 8px; flex: none; }
}

/* "take a look" beside project titles */
.proj header .look {
  font-family: var(--mono); font-size: 12px; text-decoration: none; align-self: center;
  color: #fff; background: var(--red); border: 1px solid var(--red); padding: 5px 10px; white-space: nowrap;
  transition: background .2s, transform .2s;
}
.proj header .look:hover { background: #ff563f; transform: translate(1px, -1px); }
.proj header .look[title^="Open the code"] { background: transparent; color: var(--ink); border-color: var(--line); }
.proj header .look[title^="Open the code"]:hover { border-color: var(--red); }

/* discord button sits just left of github */
.nav .gh.dc { margin-right: -12px; }
.nav .gh.dc:hover { border-color: #5865f2; color: #fff; }
@media (max-width: 760px) { .nav .gh.dc { margin-right: -2px; } }
@media (max-width: 760px) {
  .nav nav a { padding: 6px 3px; font-size: 11.5px; letter-spacing: -.02em; }
  .nav .gh { padding: 6px 7px; }
}
