/* Nik Joseph portfolio. Hand-written CSS, no framework. */
:root {
  --bg: #f3efe6;
  --bg-2: #e9e4d7;
  --ink: #16151a;
  --muted: #625e56;
  --line: rgba(22, 21, 26, .16);
  --line-strong: rgba(22, 21, 26, .55);
  --ember: #0047ab;
  --ember-text: #0047ab;
  --cobalt: #5c5850;
  --green: #14704a;
  --amber: #8f5600;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --pad: clamp(20px, 4.2vw, 64px);
  --max: 1360px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0e0e11;
  --bg-2: #17171c;
  --ink: #ece8df;
  --muted: #a39e93;
  --line: rgba(236, 232, 223, .16);
  --line-strong: rgba(236, 232, 223, .55);
  --ember: #3d7bff;
  --ember-text: #86abff;
  --cobalt: #b3aea3;
  --green: #5fd39f;
  --amber: #f0b352;
  color-scheme: dark;
}
/* The Mandate panel is always dark, whatever the theme. */
.inverse {
  --bg: #0e0e11;
  --bg-2: #18181d;
  --ink: #ece8df;
  --muted: #a39e93;
  --line: rgba(236, 232, 223, .16);
  --line-strong: rgba(236, 232, 223, .55);
  --ember: #3d7bff;
  --ember-text: #86abff;
  --cobalt: #b3aea3;
  --green: #5fd39f;
  --amber: #f0b352;
  background: var(--bg);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(16px, 1.05vw + 12px, 18.5px);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ember-text); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ember); color: #fff; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; z-index: 100; font-family: var(--mono); font-size: 13px; }
.skip:focus { top: 12px; color: var(--bg); }

.mono { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.it { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.muted, .dim { color: var(--muted); }

/* ───────── Nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 18px; height: 56px; }
.nav__mark { font-weight: 800; letter-spacing: -.04em; font-size: 1.15rem; text-decoration: none; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.nav__mark i { font-style: normal; font-weight: 400; color: var(--ember-text); font-size: 1.25rem; }
.nav__links { display: flex; gap: clamp(12px, 2.4vw, 30px); margin-left: auto; }
.nav__links a { text-decoration: none; padding: 8px 0; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__links a:hover::after, .nav__links a[aria-current]::after { transform: scaleX(1); }
.theme { width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; flex: none; }
.theme span { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); border: 1.5px solid var(--ink); transition: transform .4s var(--ease); }
[data-theme="dark"] .theme span { transform: rotate(180deg); }
@media (max-width: 560px) { .nav__mark b { display: none; } .nav__in { gap: 12px; } }

/* ───────── Status stamps ───────── */
.stamp { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 500; padding: 4px 9px 4px 8px; border: 1px solid currentColor; border-radius: 99px; white-space: nowrap; line-height: 1.3; }
.stamp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stamp--live { color: var(--green); }
.stamp--dev { color: var(--amber); }
.stamp--proto { color: var(--ember-text); }
.stamp--paper { color: var(--muted); }
.stamp--live::before { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ───────── Hero ───────── */
.hero { position: relative; padding-top: clamp(28px, 6vw, 80px); overflow: hidden; }
.hero__art { position: absolute; right: -8%; top: 0; width: min(74vw, 1040px); aspect-ratio: 1.55; pointer-events: none; opacity: .95; }
.hero__art canvas { width: 100%; height: 100%; }
.hero__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); position: relative; }
.hero h1 { position: relative; font-size: clamp(5.2rem, 21.5vw, 19rem); line-height: .8; letter-spacing: -.065em; font-weight: 800; margin: clamp(26px, 5vw, 60px) 0 0 -.05em; }
.hero h1 .it { display: block; letter-spacing: -.035em; font-size: 1.04em; padding-left: .34em; line-height: .86; margin-top: -.04em; }
.hero h1 .it::after { content: "."; color: var(--ember); font-family: var(--display); font-style: normal; font-weight: 800; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 88px); margin-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(48px, 7vw, 96px); align-items: end; }
.hero__lede { font-size: clamp(1.3rem, 2.25vw, 2.05rem); line-height: 1.22; letter-spacing: -.022em; font-weight: 500; max-width: 24em; text-wrap: balance; }
.hero__lede .it { font-size: 1.1em; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border: 1px solid var(--ink); border-radius: 99px; text-decoration: none; font-weight: 500; font-size: .95rem; line-height: 1; transition: background .25s, color .25s, transform .25s var(--ease); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn:hover { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.ledger { border-top: 1px solid var(--ink); }
.ledger__cap { display: flex; justify-content: space-between; padding: 10px 0; color: var(--muted); }
.ledger a { display: grid; grid-template-columns: 2.2em 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; transition: padding .3s var(--ease), color .2s; }
.ledger a:hover { padding-left: 10px; color: var(--ink); }
.ledger a:hover .ledger__name { color: var(--ember-text); }
.ledger__n { color: var(--muted); }
.ledger__name { font-weight: 700; letter-spacing: -.02em; font-size: 1.08rem; }

/* ───────── Section heads ───────── */
.sec { padding-block: clamp(64px, 9vw, 136px); }
.sec__head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px; align-items: baseline; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: clamp(36px, 6vw, 80px); }
.sec__head h2 { font-size: clamp(2.2rem, 5.6vw, 4.8rem); line-height: .95; letter-spacing: -.045em; font-weight: 800; text-wrap: balance; }
.sec__head p { color: var(--muted); max-width: 46ch; margin-top: 14px; }
@media (max-width: 760px) { .sec__head { grid-template-columns: 1fr; gap: 10px; } }

/* ───────── Featured work ───────── */
.feat { padding-block: clamp(56px, 8vw, 120px); border-top: 1px solid var(--line); position: relative; }
.feat__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); align-items: start; }
.feat__n { font-family: var(--mono); font-weight: 500; font-size: .95rem; color: var(--ember-text); line-height: 1; }
.feat__meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 18px; }
.feat h3 { font-size: clamp(2.9rem, 8.6vw, 8.2rem); line-height: .86; letter-spacing: -.06em; font-weight: 800; margin-bottom: clamp(18px, 2.4vw, 32px); }
.feat h3 a { text-decoration: none; }
.feat__lede { font-size: clamp(1.12rem, 1.5vw, 1.4rem); line-height: 1.34; letter-spacing: -.012em; max-width: 34em; text-wrap: pretty; }
.feat__facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin-top: 24px; font-size: .93rem; }
.feat__facts dt { color: var(--muted); padding-top: .25em; }
.feat__links { display: flex; gap: 10px 22px; flex-wrap: wrap; margin-top: 26px; }
.link { font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; display: inline-flex; gap: 8px; align-items: baseline; }
.link .arr { transition: transform .25s var(--ease); display: inline-block; }
.link:hover .arr { transform: translate(3px, 0); }
.link--ext:hover .arr { transform: translate(2px, -2px); }
.note { color: var(--muted); font-size: .8rem; line-height: 1.45; margin-top: 12px; max-width: 62ch; }
.note b { font-weight: 500; color: var(--ink); }

.feat--a .feat__text { grid-column: 1 / span 5; }
.feat--a .feat__vis { grid-column: 7 / span 6; }
.feat--b .feat__text { grid-column: 1 / span 12; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 48px); align-items: end; }
.feat--b .feat__vis { grid-column: 1 / span 12; margin-top: clamp(10px, 2vw, 24px); }
.feat--c .feat__vis { grid-column: 1 / span 6; order: -1; }
.feat--c .feat__text { grid-column: 8 / span 5; }
.feat--d .feat__text { grid-column: 1 / span 5; }
.feat--d .feat__vis { grid-column: 6 / span 7; }
.feat.inverse { border-top: 0; }
@media (max-width: 900px) {
  .feat__grid > * { grid-column: 1 / -1 !important; order: 0 !important; }
  .feat--b .feat__text { grid-template-columns: 1fr; }
}

/* ───────── Visual: Internstop journey ───────── */
.vis { border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-2); padding: clamp(16px, 2.4vw, 28px); position: relative; }
.vis__cap { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); margin-bottom: 18px; }
.journey__feed { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-weight: 700; letter-spacing: -.01em; }
.journey__rail { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 30px 0 0; padding-top: 26px; }
.journey__rail::before { content: ""; position: absolute; left: 4px; right: 4px; top: 6px; height: 2px; background: var(--line-strong); }
.journey__rail::after { content: ""; position: absolute; left: 4px; top: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ember) 22%, transparent); animation: travel 9s var(--ease) infinite; }
@keyframes travel { 0%, 8% { left: 4px; } 28%, 36% { left: 26%; } 56%, 64% { left: 51.5%; } 86%, 100% { left: 77%; } }
.journey__st { position: relative; }
.journey__st::before { content: ""; position: absolute; left: 4px; top: -25px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--ink); }
.journey__st h4 { font-size: clamp(1rem, 1.5vw, 1.3rem); letter-spacing: -.03em; line-height: 1.1; font-weight: 800; }
.journey__st p { font-size: .82rem; line-height: 1.35; color: var(--muted); margin-top: 6px; }
.journey__st--planned h4 { color: var(--muted); }
.journey__st--planned::before { border-style: dashed; }
.journey__base { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.journey__base span { background: var(--bg); padding: 10px 12px; font-family: var(--mono); font-size: .7rem; letter-spacing: .03em; }
@media (max-width: 520px) {
  .journey__rail { grid-template-columns: 1fr; padding: 0 0 0 30px; gap: 18px; }
  .journey__rail::before { left: 9px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; }
  .journey__rail::after { display: none; }
  .journey__st::before { left: -26px; top: 3px; }
}

/* ───────── Visual: Mandate committee ───────── */
.cmte { display: grid; grid-template-columns: 1.05fr 1.5fr .9fr .9fr 1fr 1.05fr; gap: 0; align-items: stretch; margin-top: 8px; }
.cmte__col { position: relative; padding: 0 clamp(8px, 1.1vw, 18px); display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.cmte__col + .cmte__col::before { content: "→"; position: absolute; left: -.55em; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--mono); }
.cmte__col:first-child { padding-left: 0; } .cmte__col:last-child { padding-right: 0; }
.node { border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 12px; background: var(--bg-2); transition: opacity .35s, border-color .35s, background .35s, transform .35s var(--ease); }
.node b { display: block; font-size: 1rem; letter-spacing: -.02em; line-height: 1.15; }
.node span { display: block; font-size: .78rem; color: var(--muted); line-height: 1.3; margin-top: 3px; }
.node i { font-family: var(--mono); font-style: normal; font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; float: right; margin-left: 6px; padding: 2px 5px; border-radius: 4px; border: 1px solid currentColor; }
.node--llm i { color: var(--ember-text); } .node--code i { color: var(--green); }
.node.is-off { opacity: .28; }
.node.is-hit { border-color: var(--ember); background: color-mix(in srgb, var(--ember) 14%, var(--bg-2)); transform: translateY(-2px); }
.node .res { display: none; font-family: var(--mono); font-size: .68rem; color: var(--ember-text); margin-top: 6px; letter-spacing: .03em; }
.node.is-hit .res { display: block; }
.cmte__ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; }
.chip { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 99px; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cmte__out { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; min-height: 3.6em; }
.cmte__out strong { font-size: clamp(1.3rem, 2.4vw, 2rem); letter-spacing: -.035em; line-height: 1.05; }
.cmte__out span { color: var(--muted); font-size: .92rem; max-width: 60ch; }
@media (max-width: 980px) {
  .cmte { grid-template-columns: 1fr; gap: 26px; }
  .cmte__col { padding: 0; }
  .cmte__col + .cmte__col::before { content: "↓"; left: 50%; top: -22px; transform: translateX(-50%); }
  .cmte__col--3 { display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) { .cmte__col--3 { grid-template-columns: 1fr; } }

/* ───────── Visual: order book ───────── */
.book { font-family: var(--mono); font-size: .78rem; }
.book__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }
.book__lad { display: grid; gap: 2px; }
.book__row { display: grid; grid-template-columns: 3.2em 1fr 4.6em; gap: 8px; align-items: center; height: 24px; position: relative; }
.book__row .bar { height: 100%; border-radius: 3px; transform-origin: left; transition: width .35s var(--ease); min-width: 2px; }
.book__row--ask .bar { background: color-mix(in srgb, var(--ember) 55%, transparent); }
.book__row--bid .bar { background: color-mix(in srgb, var(--cobalt) 50%, transparent); }
.book__row .q { position: absolute; left: calc(3.2em + 14px); font-size: .7rem; mix-blend-mode: normal; }
.book__row .p { text-align: right; font-weight: 500; }
.book__row .c { color: var(--muted); font-size: .68rem; }
.book__mid { display: flex; justify-content: space-between; padding: 8px 0; margin: 4px 0; border-block: 1px solid var(--line); color: var(--muted); }
.book__mid b { color: var(--ink); font-weight: 500; }
.book__tape { border-left: 1px solid var(--line); padding-left: 16px; min-height: 240px; }
.book__tape h4 { font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.book__tape li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; animation: tapein .4s var(--ease); }
.book__tape li.buy b { color: var(--cobalt); } .book__tape li.sell b { color: var(--ember-text); }
.book__tape li b { font-weight: 500; }
@keyframes tapein { from { opacity: 0; transform: translateY(-6px); } }
.book__ctl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
@media (max-width: 520px) { .book__grid { grid-template-columns: 1fr; } .book__tape { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; min-height: 0; } }

/* ───────── Visual: shooter sketch ───────── */
.game { padding: 0; overflow: hidden; background: #0b0b10; border-color: #0b0b10; color: #ece8df; }
.game canvas { width: 100%; aspect-ratio: 16 / 10; touch-action: none; cursor: crosshair; }
.game__hud { position: absolute; inset: 14px 16px auto 16px; display: flex; justify-content: space-between; gap: 12px; pointer-events: none; color: #a39e93; }
.game__hud b { color: #86abff; font-weight: 500; }
.game__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #ece8df; color: #0b0b10; padding: 14px 22px; border-radius: 99px; font-weight: 700; display: flex; gap: 10px; align-items: center; transition: transform .25s var(--ease), background .2s; }
.game__play:hover { transform: translate(-50%, -50%) scale(1.05); background: #3d7bff; color: #fff; }
.game__play[hidden] { display: none; }

/* ───────── Visual: trajectories ───────── */
.traj svg { width: 100%; height: auto; }
.traj .obs { fill: none; stroke: var(--ink); stroke-width: 1.4; opacity: .75; }
.traj .syn { fill: none; stroke: var(--ember); stroke-width: 1.6; stroke-dasharray: 5 5; }
.traj .ax { stroke: var(--line-strong); stroke-width: 1; }
.traj text { font-family: var(--mono); font-size: 10px; fill: var(--muted); letter-spacing: .05em; }
.traj__key { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: .8rem; color: var(--muted); }
.traj__key i { display: inline-block; width: 22px; border-top: 2px solid var(--ink); vertical-align: middle; margin-right: 7px; }
.traj__key i.s { border-top: 2px dashed var(--ember); }

/* ───────── Research block ───────── */
.research { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.research h3 { font-weight: 800; font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.02; letter-spacing: -.045em; margin: 16px 0 20px; text-wrap: balance; }
.research h3 a { text-decoration: none; }
@media (max-width: 900px) { .research { grid-template-columns: 1fr; } }

/* ───────── Index table ───────── */
.idx { border-top: 1px solid var(--ink); }
.idx__row { display: grid; grid-template-columns: 2.4em minmax(0, 3.2fr) minmax(0, 3.4fr) minmax(0, 2.6fr) auto; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; position: relative; transition: padding .3s var(--ease); }
a.idx__row:hover { padding-left: 12px; color: inherit; }
a.idx__row:hover .idx__name { color: var(--ember-text); }
.idx__name { font-weight: 800; font-size: clamp(1.2rem, 2.2vw, 1.8rem); letter-spacing: -.04em; line-height: 1.05; }
.idx__name small { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-top: 6px; }
.idx__what { font-size: .95rem; color: var(--muted); line-height: 1.4; }
.idx__stack { font-family: var(--mono); font-size: .72rem; color: var(--muted); line-height: 1.5; }
.idx__n { color: var(--muted); }
@media (max-width: 900px) {
  .idx__row { grid-template-columns: 2em 1fr auto; }
  .idx__what { grid-column: 2 / -1; } .idx__stack { grid-column: 2 / -1; }
  .idx__row .stamp { grid-row: 1; grid-column: 3; }
}
@media (max-width: 520px) { .idx__row { grid-template-columns: 1fr; gap: 8px; } .idx__n { display: none; } .idx__what, .idx__stack, .idx__row .stamp { grid-column: 1; grid-row: auto; justify-self: start; } }

/* ───────── Experience ───────── */
.xp { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px; padding: clamp(22px, 3vw, 36px) 0; border-bottom: 1px solid var(--line); }
.xp:first-of-type { border-top: 1px solid var(--line); }
.xp__when { color: var(--muted); padding-top: .5em; }
.xp h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); letter-spacing: -.04em; line-height: 1.05; font-weight: 800; }
.xp h3 span { font-weight: 400; color: var(--muted); }
.xp ul { margin-top: 12px; max-width: 62ch; }
.xp li { position: relative; padding-left: 1.3em; margin-top: 6px; }
.xp li::before { content: ""; position: absolute; left: 0; top: .72em; width: .7em; height: 2px; background: var(--ember-text); }
@media (max-width: 760px) { .xp { grid-template-columns: 1fr; gap: 6px; } .xp__when { padding: 0; } }

/* ───────── About ───────── */
.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 6vw, 110px); }
.about__big { font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.16; letter-spacing: -.03em; font-weight: 500; text-wrap: pretty; }
.about__big + p { margin-top: 1.2em; }
.about p + p { margin-top: 1em; }
.about__body { max-width: 58ch; margin-top: 28px; }
.skills dt { color: var(--muted); margin-bottom: 8px; }
.skills dd { margin-bottom: 26px; font-size: 1.12rem; line-height: 1.4; letter-spacing: -.015em; font-weight: 500; }
.skills { border-top: 1px solid var(--ink); padding-top: 16px; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }

/* ───────── Contact / footer ───────── */
.contact { padding-block: clamp(72px, 11vw, 168px) clamp(36px, 5vw, 64px); position: relative; overflow: hidden; }
.contact__mail { display: block; font-size: clamp(1.75rem, 7.3vw, 7.4rem); font-weight: 800; letter-spacing: -.055em; line-height: 1; text-decoration: none; margin: 22px 0 clamp(28px, 4vw, 52px); overflow-wrap: anywhere; }
.contact__mail .at { color: var(--ember); }
.contact__mail:hover { color: var(--ink); }
.contact__mail:hover .u { text-decoration: underline; text-decoration-thickness: .04em; text-underline-offset: .1em; }
.contact__row { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; }
.foot { margin-top: clamp(56px, 8vw, 110px); padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); }

/* ───────── Case study pages ───────── */
.cs__head { padding-top: clamp(28px, 5vw, 64px); }
.crumb { display: inline-flex; gap: 8px; text-decoration: none; color: var(--muted); }
.cs__head h1 { font-size: clamp(3.2rem, 12.5vw, 12rem); line-height: .84; letter-spacing: -.065em; font-weight: 800; margin: clamp(20px, 3vw, 36px) 0 clamp(18px, 2.6vw, 32px) -.04em; overflow-wrap: anywhere; }
.cs__head h1.long { letter-spacing: -.05em; font-size: clamp(2.1rem, 5.4vw, 4.8rem); line-height: .96; text-wrap: balance; margin-left: 0; }
.cs__sum { font-size: clamp(1.25rem, 2.2vw, 1.9rem); line-height: 1.24; letter-spacing: -.022em; font-weight: 500; max-width: 32em; text-wrap: pretty; }
.cs__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-block: 1px solid var(--ink); margin-top: clamp(32px, 5vw, 64px); }
.cs__facts div { padding: 16px 18px 18px 0; }
.cs__facts div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.cs__facts dt { color: var(--muted); margin-bottom: 6px; }
.cs__facts dd { font-weight: 500; line-height: 1.35; font-size: .98rem; }
@media (max-width: 820px) { .cs__facts { grid-template-columns: 1fr 1fr; } .cs__facts div:nth-child(3) { border-left: 0; padding-left: 0; } .cs__facts div:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 440px) { .cs__facts { grid-template-columns: 1fr; } .cs__facts div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }
.cs__vis { margin-top: clamp(32px, 5vw, 72px); }
.cs__body { margin-top: clamp(48px, 7vw, 110px); }
.cs__sec { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px; padding: clamp(26px, 4vw, 52px) 0; border-top: 1px solid var(--line); }
.cs__sec h2 { font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.1; letter-spacing: -.03em; }
.cs__sec .prose { max-width: 64ch; font-size: 1.08rem; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 1em; }
.prose li { position: relative; padding-left: 1.3em; margin-top: 8px; }
.prose li::before { content: ""; position: absolute; left: 0; top: .72em; width: .7em; height: 2px; background: var(--ember-text); }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--bg-2); padding: 1px 5px; border-radius: 4px; }
.prose strong { font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 99px; font-family: var(--mono); font-size: .74rem; margin: 0; }
.tags li::before { display: none; }
@media (max-width: 760px) { .cs__sec { grid-template-columns: 1fr; gap: 12px; } }
.next { display: block; text-decoration: none; padding: clamp(40px, 7vw, 96px) 0; border-top: 1px solid var(--ink); margin-top: clamp(40px, 6vw, 80px); }
.next strong { display: block; font-size: clamp(2.6rem, 9vw, 8rem); font-weight: 800; letter-spacing: -.06em; line-height: .9; margin-top: 12px; transition: transform .4s var(--ease); }
.next:hover strong { transform: translateX(14px); }

/* ───────── Reveal ───────── */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
  .journey__rail::after { left: 26%; }
}
@media print {
  .nav, .hero__art, .theme, .game, .book__ctl { display: none !important; }
  .js .rv { opacity: 1; transform: none; }
}

/* Narrow text column: keep long one-word titles inside it. */
@media (min-width: 901px) { .feat--d h3, .feat--a h3 { font-size: clamp(2.9rem, 6.7vw, 6.6rem); } }
@media (min-width: 901px) {
  .feat--d h3 { font-size: clamp(2.9rem, 6.1vw, 6.2rem); }
  .idx__row { grid-template-columns: 2.4em minmax(0, 3.2fr) minmax(0, 3.4fr) minmax(0, 2.4fr) 15.5em; }
  .idx__row .stamp { justify-self: end; }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .hero__art { width: 118vw; right: -42%; top: 30px; opacity: .7; }
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .ledger a { grid-template-columns: minmax(0, 1fr) auto; }
  .ledger__n { display: none; }
  .ledger .stamp { font-size: .6rem; padding: 3px 7px; }
  .ledger__name { line-height: 1.15; }
}
.game canvas { max-height: 72vh; }

/* Poster case study: stages and targets */
.prose .stages, .prose .targets { list-style: none; padding: 0; margin: 1.4em 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--ink); }
.prose .stages li, .prose .targets li { padding: 16px 18px 18px 0; margin: 0; }
.prose .stages li::before, .prose .targets li::before { content: none; display: none; }
.prose .stages li + li, .prose .targets li + li { border-left: 1px solid var(--line); padding-left: 18px; }
.stages .mono, .targets .mono { display: block; color: var(--muted); font-size: .72rem; }
.stages b { display: block; font-size: 1.25rem; letter-spacing: -.02em; margin: 6px 0 8px; }
.targets b { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.04em; line-height: 1; margin-bottom: 8px; color: var(--ember-text); }
.prose .stages p, .prose .targets p { font-size: .9rem; line-height: 1.45; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 760px) { .prose .stages, .prose .targets { grid-template-columns: 1fr; } .prose .stages li + li, .prose .targets li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }
