/* Ben Smollan — portfolio. Warm paper and brown ink (after diwen.dev, 2 Nov), was navy and cream; editorial grotesk type, mono labels, a visible grid,
   and a guided tour up a snake of eight projects. Type, structure and finish follow BenSmollan/design-taste-library. */
:root {
  /* warm paper is the base, dark brown is the ink and the accent (names kept from the navy version) */
  --navy: #FAF6F1;
  --deep: #F1EBE3;
  --blue: #E7DED3;
  --cream: #3B2A22;
  --bg: var(--navy);
  --surface: var(--deep);
  --raised: var(--blue);
  --ink: var(--cream);
  --ink-2: rgba(59, 42, 34, .82);
  --muted: rgba(59, 42, 34, .6);
  --line: rgba(59, 42, 34, .14);
  --grid: rgba(59, 42, 34, .045);
  --shadow: 0 24px 48px -24px rgba(59, 42, 34, .18);
  --display: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease-mech: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  /* border colour for each step up the snake: blue → cream */
  --t: var(--blue); --bw: 2px;
  color-scheme: light;
}
[data-tier="1"] { --t: #DDD3C8; --bw: 1.5px; }
[data-tier="2"] { --t: #D0C4B7; --bw: 1.5px; }
[data-tier="3"] { --t: #C2B3A4; --bw: 2px; }
[data-tier="4"] { --t: #AE9C8C; --bw: 2px; }
[data-tier="5"] { --t: #998574; --bw: 2.5px; }
[data-tier="6"] { --t: #826D5E; --bw: 2.5px; }
[data-tier="7"] { --t: #6A5547; --bw: 3px; }
[data-tier="8"] { --t: #523F34; --bw: 3.5px; }
[data-tier="9"] { --t: #3B2A22; --bw: 4px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: rgba(59, 42, 34, .4); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--cream); }
::selection { background: var(--cream); color: var(--bg); }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
/* metadata: mono, uppercase, bracketed where it's a label */
.label, .card-kick, .hero .kicker, .sec > .tag, .facts dt, .lb-count, .focus-tag, .scale span, .steps .n { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.label { color: var(--muted); }
/* the grid is visible: twelve hairline columns behind everything */
body::before { content: ''; position: fixed; z-index: -1; top: 0; bottom: 0; left: 50%; width: min(var(--max), 100vw); translate: -50% 0; padding: 0 var(--gutter); pointer-events: none;
  background: linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / calc(100% / 12) 100% content-box, linear-gradient(90deg, transparent calc(100% - 1px), var(--grid) 0) content-box; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.flag { display: inline-block; width: 1.5em; height: 1em; vertical-align: -.12em; border-radius: 2px; box-shadow: 0 0 0 1px rgba(59, 42, 34, .18); }

/* placeholder frames, until real photos arrive */
.ph { position: relative; background: repeating-linear-gradient(135deg, rgba(59, 42, 34, .08) 0 10px, rgba(59, 42, 34, .03) 10px 20px), var(--surface); }
.ph::after { content: '[' attr(data-ph) ']'; position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ph > img { display: none; }

/* ── buttons ─────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 14px; border: 0; border-radius: 999px; padding: 7px 7px 7px 20px; background: var(--cream); color: var(--bg); font-weight: 600; font-size: 15px; letter-spacing: -.01em; text-decoration: none; cursor: pointer; transition: background .16s var(--ease-mech); }
.btn::after { content: '→'; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); color: var(--cream); font-size: 15px; transition: translate .2s var(--ease-mech); }
.btn:hover { background: #5a4337; }
.btn:hover::after { translate: 3px 0; }
.btn.ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1.5px var(--cream); }
.btn.ghost:hover { background: rgba(59, 42, 34, .06); }

/* ── header / footer ─────────────────────── */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(250, 246, 241, .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; padding-block: 8px; flex-wrap: wrap; }
.bar .name { font: 800 20px/1 var(--display); letter-spacing: -.045em; text-decoration: none; margin-right: auto; }
.bar nav { display: flex; gap: clamp(14px, 2.4vw, 28px); font-size: 14px; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); }
.bar .tour-btn { border: 1px solid var(--cream); border-radius: 999px; background: none; padding: 6px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--cream); transition: background .16s var(--ease-mech), color .16s var(--ease-mech); }
.bar .tour-btn:hover { background: var(--cream); color: var(--bg); }
.foot { border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 110px); }
.foot .wrap { display: flex; justify-content: space-between; gap: 24px; padding-block: 24px 36px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }

/* ── home: the snake ─────────────────────── */
.sec-h { font-size: clamp(36px, 4.6vw, 60px); font-weight: 900; letter-spacing: -.05em; line-height: .9; }
.sec-head { display: flex; align-items: baseline; column-gap: 20px; row-gap: 10px; flex-wrap: wrap; padding-block: clamp(24px, 3.4vw, 40px) clamp(18px, 2.6vw, 30px); }
.sec-head .label { flex-basis: 100%; }
.sec-head p:not(.label) { color: var(--muted); font-size: 15px; max-width: 34ch; }
.projects { display: flex; flex-direction: column; }
.projects > .sec-head { width: 100%; }
@media (min-width: 641px) { .projects { min-height: calc(100svh - 60px); } }
.snake { --th: clamp(120px, calc((100svh - 390px) / 3), 205px); --tw: calc(var(--th) * 1.42); --gx: clamp(40px, 5vw, 76px); --gy: clamp(34px, 4.5vh, 56px);
  display: flex; justify-content: center; align-items: center; gap: clamp(24px, 4vw, 56px); padding-bottom: 32px; }
.board { position: relative; }
.board::before, .board::after { content: '+'; position: absolute; font: 400 16px/1 var(--mono); color: var(--muted); pointer-events: none; }
.board::before { left: -22px; top: -22px; }
.board::after { right: -22px; bottom: -22px; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wires path { fill: none; stroke: var(--cream); stroke-width: 1.5; stroke-dasharray: 3 5; opacity: .55; }
.wires .head { stroke-dasharray: none; opacity: .7; }
.tiles { display: grid; grid-template-columns: repeat(3, var(--tw)); grid-template-rows: repeat(3, var(--th)); gap: var(--gy) var(--gx); }
/* climbs from bottom right: Creative 1-2-3 right to left, Construction 4-5 left to right (two, centred
   between the columns), Commerce 6-7-8 right to left */
.snake .tile:nth-child(1) { grid-area: 3 / 3; } .snake .tile:nth-child(2) { grid-area: 3 / 2; } .snake .tile:nth-child(3) { grid-area: 3 / 1; }
.snake .tile:nth-child(4) { grid-area: 2 / 1; } .snake .tile:nth-child(5) { grid-area: 2 / 2; }
.snake .tile:nth-child(4), .snake .tile:nth-child(5) { width: var(--tw); margin-left: calc((var(--tw) + var(--gx)) / 2); }
.snake .tile:nth-child(6) { grid-area: 1 / 3; } .snake .tile:nth-child(7) { grid-area: 1 / 2; } .snake .tile:nth-child(8) { grid-area: 1 / 1; }

.tile { position: relative; transform-style: preserve-3d; }
.tile > .detail { display: none; }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; cursor: pointer; background: var(--surface); border: var(--bw) solid var(--t); border-radius: 4px; backface-visibility: hidden; transition: transform .22s var(--ease-mech), box-shadow .22s var(--ease-mech); }
.face:hover, .face:focus-visible { transform: translateY(-4px); box-shadow: 0 4px 0 0 var(--t); }
.face .pic { flex: 1; min-height: 0; border-bottom: 1px solid var(--line); }
.face .pic img { width: 100%; height: 100%; object-fit: cover; }
/* a picture that filling the box would cut off badly (portrait, logo) is shown whole instead (site.js) */
img.fit { object-fit: contain !important; background: var(--bg); }
.face .cap { display: flex; align-items: baseline; gap: 10px; padding: 9px 13px 11px; }
.face .num { font: 900 clamp(18px, 1.9vw, 26px)/1 var(--display); letter-spacing: -.05em; color: var(--muted); font-variant-numeric: tabular-nums; }
.face h2 { font-size: clamp(16px, 1.5vw, 19px); font-weight: 800; letter-spacing: -.035em; }
/* the category of each row, beside it (above it on phones) */
.rows { position: absolute; inset: 0; pointer-events: none; }
.rows li { position: absolute; right: calc(100% + 16px); height: var(--th); display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; rotate: 180deg; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cream); white-space: nowrap; }
.rows li::before { content: '[ '; color: var(--muted); } .rows li::after { content: ' ]'; color: var(--muted); }
.rows li:nth-child(1) { top: 0; }
.rows li:nth-child(2) { top: calc(var(--th) + var(--gy)); }
.rows li:nth-child(3) { top: calc(2 * (var(--th) + var(--gy))); }
html.touring .rows { opacity: 0; transition: opacity .2s; }
/* the card back, seen while the projects are piled up */
.tile::after { content: 'BS'; position: absolute; inset: 0; display: grid; place-items: center; border-radius: 4px; background: var(--raised); color: var(--cream); font: 900 32px/1 var(--display); letter-spacing: -.06em; box-shadow: inset 0 0 0 6px var(--raised), inset 0 0 0 7px rgba(59, 42, 34, .5), var(--shadow); transform: rotateY(180deg); backface-visibility: hidden; }
/* the one to focus on: a double ring and a tab in the border */
.tile.focus .face { box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--cream); }
.tile.focus .face:hover { box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--cream), 0 9px 0 0 var(--cream); }
.focus-tag { position: absolute; z-index: 2; top: -10px; left: 12px; padding: 2px 8px; border-radius: 2px; background: var(--cream); color: var(--bg); font-size: 10.5px; white-space: nowrap; backface-visibility: hidden; pointer-events: none; }

/* scale of project: thin and light at the bottom, thick and dark at the top */
.scale { display: flex; align-items: stretch; gap: 10px; height: calc(var(--th) * 3 + var(--gy) * 2); }
.scale ol { display: flex; flex-direction: column-reverse; justify-content: space-between; width: 26px; padding: 4px 0; }
.scale li { height: calc(var(--bw) * 1.6); background: var(--t); }
.scale span { writing-mode: vertical-rl; transform: rotate(180deg); color: var(--muted); text-align: center; }

/* ── experience ──────────────────────────── */
.exp { padding-top: clamp(24px, 4vw, 48px); }
.exp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.exp-tiles .tile { aspect-ratio: 4 / 3; }

/* ── intro ───────────────────────────────── */
.intro { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px; min-height: 100svh; padding: clamp(24px, 5vw, 72px) clamp(24px, 7vw, 120px); border-bottom: 1px solid var(--line); }
.intro-left { position: relative; z-index: 2; }
/* the name is the hero: heavy, tight, the second line stepped in, overlapping the photo */
.intro-name { font: 900 clamp(64px, 10.6vw, 168px)/.84 var(--display); letter-spacing: -.065em; margin-right: -14vw; }
.intro-name > span { display: block; }
.intro-name > span + span { padding-left: .9em; }
.intro-sub { margin-top: 22px; font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.intro-sub::before { content: '[ '; } .intro-sub::after { content: ' ]'; }
.guide-spot { position: relative; display: flex; align-items: flex-end; gap: 14px; margin-top: clamp(28px, 5vh, 56px); min-height: 140px; }
.guide-spot .guide { position: relative; }
.bubble { position: relative; display: inline-block; max-width: 18em; padding: 12px 16px; background: var(--surface); border: 1px solid var(--cream); border-radius: 14px; font-size: 16px; line-height: 1.4; }
.bubble.say-left { align-self: flex-start; }
.bubble.say-left::before { content: ''; position: absolute; left: -9px; bottom: 16px; width: 14px; height: 14px; background: var(--surface); border-left: 1px solid var(--cream); border-bottom: 1px solid var(--cream); transform: rotate(45deg); }
.bubble small { display: block; margin-top: 6px; font: 500 11px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.intro .begin { margin-top: 22px; margin-left: 6px; }
.intro-me { position: relative; justify-self: center; display: flex; flex-direction: column; align-items: center; }
.intro-me .bubble { align-self: flex-end; margin-bottom: -6px; margin-right: -24px; z-index: 3; font: 700 clamp(17px, 1.5vw, 20px)/1.25 var(--display); letter-spacing: -.02em; }
.intro-me .bubble::before { content: ''; position: absolute; right: 28px; bottom: -9px; width: 14px; height: 14px; background: var(--surface); border-right: 1px solid var(--cream); border-bottom: 1px solid var(--cream); transform: rotate(45deg); }
.me-frame { width: clamp(220px, 25vw, 350px); aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; outline: 1px solid var(--line); outline-offset: 8px; }
.me-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.intro-me figcaption { margin-top: 22px; display: flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.intro-me figcaption .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
/* there, but not the obvious choice */
.intro .explore { position: absolute; left: clamp(16px, 3vw, 32px); bottom: clamp(14px, 2.5vw, 26px); border: 0; background: none; padding: 4px; cursor: pointer; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .6; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .2em; }
.intro .explore:hover { opacity: 1; text-decoration-color: currentColor; }

/* ── the tour guide: a rigged cartoon of Ben, moved and posed by assets/guide.js ── */
.guide { --gw: clamp(92px, 8.6vw, 124px); width: var(--gw); z-index: 70; pointer-events: none; }
.guide-spot .guide { --gw: clamp(110px, 10vw, 140px); }
.guide.loose { position: fixed; left: 0; top: 0; }
.guide[hidden] { display: none; }
.guide svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 12px rgba(59, 42, 34, .18)); }
.guide svg * { transform-box: view-box; }
/* joints: shoulders and elbows rotate; a pose sets the angles, pointing sets them from script */
.guide .arm, .guide .fore { transition: transform .38s cubic-bezier(.3, 1.25, .5, 1); }
.guide .arm-l { transform-origin: 27px 104px; transform: rotate(var(--lu, 10deg)); }
.guide .arm-l .fore { transform-origin: 27px 128px; transform: rotate(var(--lf, 0deg)); }
.guide .arm-r { transform-origin: 93px 104px; transform: rotate(var(--ru, -10deg)); }
.guide .arm-r .fore { transform-origin: 93px 128px; transform: rotate(var(--rf, 0deg)); }
.guide .free, .guide .crossed { transition: opacity .14s; }
.guide.p-cross .free, .guide:not(.p-cross) .crossed { opacity: 0; }
.guide .head { transform-origin: 60px 86px; transform: rotate(var(--tilt, 0deg)); transition: transform .4s ease; }
.guide .pupils { transform: translate(var(--px, 0), var(--py, 0)); transition: transform .18s ease-out; }
.guide .eyes { transform-origin: 60px 60px; transition: transform .07s; }
.guide.blink .eyes { transform: scaleY(.12); }
.guide .brows { transition: transform .25s; }
.guide.p-wave .brows, .guide.p-cheer .brows, .guide.p-point .brows { transform: translateY(-1.6px); }
.guide .mouth-open { opacity: 0; }
.guide.mouth .mouth-open { opacity: 1; }
.guide.mouth .mouth { opacity: 0; }
.guide .fig { transform-origin: 60px 140px; }
/* poses */
.guide.p-wave { --ru: -148deg; --rf: -18deg; --lu: 8deg; }
.guide.p-wave .arm-r .fore { animation: g-wave .42s ease-in-out infinite alternate; }
@keyframes g-wave { from { transform: rotate(0deg); } to { transform: rotate(-42deg); } }
.guide.p-cheer { --lu: 158deg; --lf: 22deg; --ru: -158deg; --rf: -22deg; }
.guide.p-cheer .fig { animation: g-jump .36s ease-out 3 alternate; }
@keyframes g-jump { to { transform: translateY(-7px); } }
.guide.p-brace { --lu: 162deg; --lf: 78deg; --ru: -162deg; --rf: -78deg; }
.guide.p-jump { --lu: 138deg; --lf: 38deg; --ru: -138deg; --rf: -38deg; }
.guide.p-shrug { --lu: 50deg; --lf: 75deg; --ru: -50deg; --rf: -75deg; }
.guide.p-walk .arm-l { animation: g-swing .3s ease-in-out infinite alternate; }
.guide.p-walk .arm-r { animation: g-swing .3s ease-in-out infinite alternate-reverse; }
@keyframes g-swing { from { transform: rotate(-22deg); } to { transform: rotate(24deg); } }
/* what he says: a speech bubble that sits on the side away from the nearest screen edge */
.guide .say { position: absolute; right: 80%; bottom: 84%; width: max-content; max-width: min(290px, 62vw); padding: 11px 15px; background: var(--surface); border: 1px solid var(--cream); border-radius: 14px 14px 2px 14px; font-size: 15px; line-height: 1.45; opacity: 0; transform: translateY(6px) scale(.96); transform-origin: 100% 100%; transition: opacity .25s, transform .25s; }
.guide.at-left .say { right: auto; left: 80%; border-radius: 14px 14px 14px 2px; transform-origin: 0 100%; }
.guide .say.on { opacity: 1; transform: none; }
.guide.quiet .say.on { opacity: 0; transform: translateY(6px) scale(.96); }

/* ── stage: the tour, and project cards in explore mode ── */
html.touring body { overflow: hidden; }
html.touring .bar { visibility: hidden; }
.stage { position: fixed; inset: 0; z-index: 50; }
.stage[hidden] { display: none; }
.stage-bg { position: absolute; inset: 0; background: rgba(250, 246, 241, .62); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); transition: opacity .28s var(--ease-out), visibility 0s; }
/* while things move, the blur is switched off: it would be redrawn on every frame (tour.js reveal()) */
.stage.peek .stage-bg { opacity: 0; visibility: hidden; transition: opacity .16s, visibility 0s .16s; }
.slot { position: absolute; inset: 0 0 var(--ui, 0px) 0; display: grid; place-items: center; padding: 24px var(--gutter); pointer-events: none; }
.slot > * { pointer-events: auto; }
.stage.tour { --ui: 96px; }
.stage .close { position: absolute; top: 14px; right: 16px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 20px; line-height: 1; }
.stage.tour .close { display: none; }
.tour-ui { display: none; }
.stage.tour .tour-ui { display: block; }
.tour-ui .go { position: absolute; left: 50%; bottom: 40px; translate: -50% 0; display: flex; gap: 10px; align-items: center; }
.tour-ui .back { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; color: var(--muted); }
.tour-ui .back:disabled { opacity: 0; pointer-events: none; }
.progress { position: absolute; left: clamp(16px, 3vw, 32px); right: 112px; bottom: 18px; height: 3px; background: rgba(59, 42, 34, .12); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--cream); transition: width .9s var(--ease-mech); }
.exit-tour { position: absolute; right: 14px; bottom: 8px; border: 0; background: none; padding: 4px 6px; cursor: pointer; font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .45; }
.exit-tour:hover { opacity: .9; }

.card { position: relative; width: min(var(--cw, 420px), 100%); }
.card[data-tier="4"], .card[data-tier="5"], .card[data-tier="6"] { --cw: 470px; }
.card[data-tier="7"], .card[data-tier="8"], .card[data-tier="9"] { --cw: 540px; }
.card-body { position: relative; z-index: 1; max-height: calc(100svh - var(--ui, 0px) - 64px); overflow: auto; overscroll-behavior: contain; padding: 22px 24px 24px; background: var(--surface); border: var(--bw) solid var(--t); border-radius: 6px; box-shadow: 0 30px 60px -24px rgba(59, 42, 34, .18); }
.card.focus .card-body { box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--cream), 0 30px 60px -24px rgba(59, 42, 34, .18); }
.card-kick { color: var(--muted); }
.card h2 { margin-top: 10px; font-size: clamp(34px, 3.6vw, 50px); font-weight: 900; letter-spacing: -.055em; line-height: .9; }
.card .detail > * + * { margin-top: 14px; }
.card .lead { margin-top: 18px; border-radius: 2px; overflow: hidden; display: grid; place-items: center; background: var(--bg); }
/* the card's photo is shown whole, at its own shape */
.card .lead img { width: auto; height: auto; max-width: 100%; max-height: min(46vh, 400px); }
.card .sum { color: var(--ink-2); font-size: 16px; }
.card .say { display: none; }
.card .full { margin-top: 18px; }
.card .hint { font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* branches: bubbles orbiting the card (wide screens) */
.card .wires { z-index: 0; }
.card .wires path { stroke: var(--t); stroke-dasharray: none; stroke-width: 1.5; opacity: .8; }
.card.orbit > .branches > li { position: absolute; z-index: 2; width: 190px; padding: 10px 14px 11px; background: var(--surface); border: 1px solid var(--t); border-radius: 4px; cursor: default; opacity: 0; translate: 0 8px; transition: opacity .3s var(--ease-out), translate .3s var(--ease-out), box-shadow .16s var(--ease-mech); }
.card.orbit > .branches > li.in { opacity: 1; translate: 0 0; }
/* narrower windows: a smaller card and narrower bubbles, so the mind map still fits around it */
.card.orbit.tight { --cw: 360px; }
.card.orbit.tight > .branches > li { width: 150px; padding: 8px 10px 9px; }
.card.orbit.tight > .branches > li > h3 { font-size: 13.5px; }
.card.orbit .lead img { max-height: min(34vh, 320px); }
.card.orbit > .branches > li.on { box-shadow: inset 3px 0 0 var(--cream); }
/* a branch's details, opened beside it */
.bpanel { position: fixed; z-index: 8; overflow: auto; overscroll-behavior: contain; padding: 16px 18px 18px; background: var(--surface); border: 1px solid var(--t); border-radius: 4px; box-shadow: 0 24px 50px -18px rgba(59, 42, 34, .18); }
.bpanel > li > * + * { margin-top: 10px; }
.branches h3 { font-size: 16px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.bpanel h3 { font-size: 22px; font-weight: 900; letter-spacing: -.045em; line-height: 1; }
.branches h4 { font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--cream); }
.branches p, .branches li li { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.branches li > * + * { margin-top: 8px; }
.branches figure img, .branches figure video { width: 100%; border-radius: 2px; }
.bpanel video, .card.stack .branches video { width: auto; max-width: 100%; max-height: 56vh; margin: 0 auto; background: var(--navy); }
.branches figure.ph { height: 120px; border-radius: 2px; }
.card-body:focus { outline: none; }
.branches .pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.branches .pics img, .branches .pics .ph { aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
/* opened branches show every photo whole, two to a row */
.bpanel .pics, .card.stack .branches .pics { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.bpanel .pics img, .card.stack .branches .pics img { aspect-ratio: auto; height: auto; object-fit: contain; }
.bpanel .pics > :only-child, .card.stack .branches .pics > :only-child { grid-column: 1 / -1; }
.bpanel figure:not(.pics) img, .card.stack .branches figure:not(.pics) img { width: auto; max-width: 100%; max-height: 56vh; margin: 0 auto; display: block; }
/* sub-branches read as a ledger: hairline rows, a mono label, then the text */
.branches > li > ul { display: grid; }
.branches li li { padding: 10px 0 11px; border-top: 1px solid var(--line); }
.branches li li:last-child { border-bottom: 1px solid var(--line); }
.branches li li > * + * { margin-top: 4px; }
.card.orbit > .branches > li:not(.open) > :not(h3):not(figure:first-of-type) { display: none; }
.card.orbit > .branches > li:not(.open) > figure:first-of-type { order: -1; margin: -4px -8px 8px; }
.card.orbit > .branches > li:not(.open) > figure:first-of-type img, .card.orbit > .branches > li:not(.open) > figure:first-of-type video, .card.orbit > .branches > li:not(.open) > figure:first-of-type .ph { height: 86px; object-fit: contain; background: var(--bg); }
.card.orbit > .branches > li:not(.open) > figure.ph:first-of-type { height: 70px; }
.card.orbit > .branches > li:not(.open) > figure.pics:first-of-type > :nth-child(n + 4) { display: none; }
.card.orbit > .branches > li:not(.open) > figure.pics:first-of-type img, .card.orbit > .branches > li:not(.open) > figure.pics:first-of-type .ph { height: 56px; object-fit: cover; }
.card.orbit > .branches > li { display: flex; flex-direction: column; }
.card.orbit.compact > .branches > li > figure:first-of-type { display: none; }
.card.orbit > .branches > li > h3::after { content: ' +'; color: var(--muted); font-family: var(--mono); font-weight: 400; }
.card.orbit > .branches > li.on > h3::after { content: ' →'; }

/* branches: an accordion inside the card (narrow screens) */
.card.stack .branches { margin-top: 18px; border-top: 1px solid var(--line); }
.card.stack .branches > li { padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.card.stack .branches > li > h3 { display: flex; justify-content: space-between; gap: 12px; }
.card.stack .branches > li > h3::after { content: '+'; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.card.stack .branches > li.open > h3::after { content: '−'; }
.card.stack .branches > li:not(.open) > :not(h3) { display: none; }
.card.stack .wires { display: none; }

/* ── project pages ───────────────────────── */
.hero { padding-block: clamp(40px, 6vw, 88px) clamp(28px, 4vw, 56px); }
.hero .kicker { margin-bottom: 22px; color: var(--muted); }
.hero .kicker::before { content: '[ '; } .hero .kicker::after { content: ' ]'; }
.hero h1 { font-size: clamp(60px, 10vw, 150px); font-weight: 900; line-height: .84; letter-spacing: -.065em; }
.hero .sub { margin-top: 22px; font: 600 clamp(20px, 2.2vw, 28px)/1.2 var(--display); letter-spacing: -.03em; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px 24px; margin-top: clamp(28px, 4vw, 48px); padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; }
.facts dt { color: var(--muted); margin-bottom: 6px; }
h2 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 900; letter-spacing: -.05em; line-height: .95; }
h3 { font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.lede { font: 600 clamp(22px, 2.4vw, 30px)/1.25 var(--display); letter-spacing: -.03em; }
.muted, small { color: var(--muted); }
small { font-size: 14px; }
.prose { color: var(--ink-2); max-width: 40em; }
.prose p + p { margin-top: 1em; }
.sec { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px 40px; padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.sec > .tag { color: var(--muted); padding-top: 7px; }
.sec > .tag::before { content: '['; } .sec > .tag::after { content: ']'; }
.sec > .body { min-width: 0; }
.sec > .body > * + * { margin-top: 26px; }
.sec h2 + .prose, .sec .lede + .prose { margin-top: 16px; }
.shot img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.shot.plain img { box-shadow: none; }
.shot figcaption, p.cap, figcaption.cap { margin-top: 10px; font: 500 11px/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.grid2, .grid3, .grid4 { display: grid; gap: 16px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid2 img, .grid3 img, .grid4 img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; height: auto; }
.grid4 .page img { aspect-ratio: auto; }
.cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px; background: var(--navy) center / cover no-repeat; display: grid; place-items: center; padding: 8%; }
.cover::before { content: ''; position: absolute; inset: 0; background: rgba(59, 42, 34, .18); }
.cover img { position: relative; width: 82%; height: auto; aspect-ratio: auto; object-fit: contain; box-shadow: none; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .6)); }
.adv h3 { margin-top: 12px; }
.adv p { color: var(--ink-2); }
.steps > li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 16px; padding-block: 20px; border-top: 1px solid var(--line); }
.steps > li:first-child { border-top: 0; padding-top: 0; }
.steps .n { color: var(--muted); padding-top: 5px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-2); max-width: 38em; }
.list > li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 40px; padding-block: 20px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list p { color: var(--ink-2); max-width: 38em; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
/* stats are typographic: a giant numeral over a small mono label */
.stats b { display: block; font: 900 clamp(48px, 6.4vw, 92px)/.9 var(--display); letter-spacing: -.06em; color: var(--cream); }
.stats span { display: block; margin-top: 12px; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); max-width: 26ch; }
.tl-wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px 48px; align-items: center; }
.tl-frame { position: relative; aspect-ratio: 9 / 16; background: #000; overflow: hidden; border-radius: 2px; }
.tl-frame video { width: 100%; height: 100%; object-fit: cover; }
.tl-btn { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(59, 42, 34, .90); color: #fff; display: grid; place-items: center; }
.tl-btn .i-play { display: none; }
.tl-btn.paused .i-play { display: block; }
.tl-btn.paused .i-pause { display: none; }
.thumb { position: relative; display: block; max-width: 340px; }
.thumb img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 2px; }
.thumb .play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 56px; height: 56px; border-radius: 50%; background: rgba(59, 42, 34, .90); color: #fff; display: grid; place-items: center; }
.next { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; padding-block: clamp(32px, 5vw, 52px); border-top: 1px solid var(--line); text-decoration: none; }
.next span { color: var(--muted); font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.next strong { font: 900 clamp(34px, 5vw, 72px)/.9 var(--display); letter-spacing: -.055em; }
.next:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.placeholder-page { min-height: 50vh; display: grid; place-items: center; text-align: center; border: 1px dashed var(--line); border-radius: 2px; padding: 48px 24px; color: var(--muted); }

/* the Origin Studios Notion workspace map (origin.html, assets/notion-map.js) */
.notion-sec > .body > .notion-map { margin-top: 34px; }
.notion-map .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nm-canvas { position: relative; margin-top: 28px; border: 1px solid var(--line); border-radius: 4px; background: radial-gradient(circle at 50% 50%, rgba(34, 57, 111, .35), transparent 70%); overflow: hidden; }
.nm-canvas svg { display: block; width: 100%; height: auto; max-height: 86vh; touch-action: pan-y; cursor: default; }
.nm-canvas svg.grab { cursor: grabbing; }
.nm-ring { fill: none; stroke: var(--line); stroke-dasharray: 2 6; }
.nm-links path { fill: none; stroke-width: 1; opacity: .38; transition: opacity .2s; }
.nm-dot { stroke-width: 1.2; transition: opacity .2s; cursor: pointer; }
.nm-dot.private { stroke-dasharray: 2 2; }
.focus .nm-links path:not(.lit), .focus .nm-dot:not(.lit) { opacity: .12; }
.nm-links path.lit { opacity: 1; stroke-width: 2; }
.nm-section { font: 500 15px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; dominant-baseline: middle; }
.nm-root { font: 900 26px/1 var(--display); letter-spacing: -.04em; fill: var(--cream); }
.nm-tip { position: absolute; z-index: 2; max-width: 250px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--cream); border-radius: 4px; pointer-events: none; }
.nm-tip small { display: block; font: 500 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nm-tip b { display: block; margin-top: 4px; font-size: 15px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.nm-tip span { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.nm-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 4px; }
.nm-zoom button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--cream); cursor: pointer; font-size: 16px; }
.nm-zoom button:hover { border-color: var(--cream); }
@media (max-width: 860px) { .notion-map .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* photos full screen */
.bpanel img, .card .lead img, .card.stack .branches > li.open img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 64px 84px 40px; background: rgba(250, 246, 241, .94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; }
.lightbox img { display: block; max-width: min(1400px, 100%); max-height: calc(100svh - 150px); object-fit: contain; border-radius: 2px; box-shadow: 0 30px 80px -30px rgba(59, 42, 34, .18); }
.lightbox figcaption { max-width: 60ch; text-align: center; font-size: 15px; color: var(--ink-2); }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--cream); font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox button:hover { border-color: var(--cream); }
.lb-prev { left: 20px; top: 50%; translate: 0 -50%; }
.lb-next { right: 20px; top: 50%; translate: 0 -50%; }
.lb-close { top: 16px; right: 16px; font-size: 24px !important; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
.lb-count { position: absolute; top: 30px; left: 50%; translate: -50% 0; color: var(--muted); }
@media (max-width: 640px) {
  .lightbox { padding: 64px 10px 28px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
  .lightbox button { width: 40px; height: 40px; }
}

/* back into the tour from a project page */
.tour-pill { position: fixed; z-index: 30; left: 50%; bottom: 18px; translate: -50% 0; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.tour-pill[hidden] { display: none; }
.tour-pill a { white-space: nowrap; padding: 9px 16px; border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 600; }
.tour-pill a:last-child { background: var(--cream); color: var(--bg); }

/* ── edit mode (tools/edit.command): everything laid out flat so every line can be edited ── */
html.editing .intro { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; position: relative; padding: 40px var(--gutter) 64px; border-bottom: 1px solid var(--line); }
html.editing .snake { display: block; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
html.editing .board, html.editing .exp-tiles { display: block; }
html.editing .tiles { display: block; }
html.editing .wires, html.editing .rows, html.editing .scale, html.editing .tile::after { display: none; }
html.editing .tile { margin: 0 0 28px; padding: 16px 18px; border: var(--bw) solid var(--t); border-radius: 14px; background: var(--surface); aspect-ratio: auto; }
html.editing .face { position: static; border: 0; box-shadow: none; background: none; }
html.editing .face .pic { display: none; }
html.editing .tile > .detail { display: block; }
html.editing .detail > * + * { margin-top: 10px; }
html.editing .detail .lead { max-width: 320px; }
html.editing .branches { margin-left: 18px; }
html.editing .branches li { margin-top: 8px; }
html.editing .branches ul { margin-left: 18px; }

/* ── narrow screens ──────────────────────── */
@media (max-width: 860px) {
  .sec, .list > li { grid-template-columns: 1fr; gap: 10px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-wrap, .stats { grid-template-columns: 1fr; }
  .tl-frame { max-width: 340px; }
  .exp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro { grid-template-columns: 1fr; align-content: center; gap: 20px; padding-bottom: 56px; }
  .intro-left { order: 2; }
  .intro-me { order: 1; }
  .me-frame { width: min(46vw, 210px); outline-offset: 5px; }
  .intro-me .bubble { margin-left: 0; }
  .guide-spot { margin-top: 16px; min-height: 0; }
}
@media (max-width: 640px) {
  .bar .wrap { gap: 16px; flex-wrap: nowrap; }
  .bar nav a[href="#projects"] { display: none; }
  .bar nav, .bar .tour-btn { font-size: 14px; white-space: nowrap; }
  .snake { --gx: 22px; --gy: 26px; --tw: calc((100vw - 2 * var(--gutter) - 2 * var(--gx)) / 3); --th: calc(var(--tw) * 1.18); flex-direction: column; gap: 14px; }
  .face { border-radius: 3px; }
  .face .cap { flex-direction: column; gap: 0; padding: 6px 8px 8px; }
  .face h2 { font-size: 13px; line-height: 1.15; }
  .face .num { font-size: 15px; }
  .tile::after { border-radius: 3px; font-size: 20px; }
  .rows li { right: 0; height: auto; writing-mode: horizontal-tb; rotate: none; font-size: 10px; translate: 0 calc(-100% - 7px); }
  .rows li:nth-child(2) { right: auto; left: 0; }  /* the arrow up from row 1 is on the right */
  .intro-name { margin-right: 0; }
  .focus-tag { font-size: 10px; top: -10px; left: 6px; padding: 0 6px; }
  .scale { height: auto; width: calc(var(--tw) * 3 + var(--gx) * 2); flex-direction: column-reverse; gap: 6px; }
  .scale ol { flex-direction: row; width: 100%; height: 16px; align-items: flex-end; padding: 0; gap: 4px; }
  .scale li { flex: 1; height: calc(var(--bw) * 2.4); }
  .scale span { writing-mode: horizontal-tb; transform: none; }
  .stage.tour { --ui: 132px; }
  .tour-ui .go { bottom: 34px; left: 16px; translate: none; }
  .guide { --gw: 76px; }
  .guide .say { max-width: calc(100vw - 120px); font-size: 14px; }
  .card-body { padding: 18px 18px 20px; }
  .tour-pill { bottom: 12px; }
  .tour-pill a { padding: 8px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

/* ── The home page as one column (2 Nov, after diwen.dev): hello, then rows by category ──
   Overrides the old full-screen intro and the snake grid; the tiles are now rows, the cards and tour unchanged. */
body::before { display: none; }
.home { width: min(720px, 100% - 32px); margin: 0 auto; padding: 72px 0 48px; }
.home .intro { display: block; min-height: 0; padding: 0; border: 0; }
.hello { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.home .intro-name { font: 900 clamp(48px, 8vw, 76px)/.86 var(--display); letter-spacing: -.06em; margin: 12px 0 0; max-width: 6ch; }
.hello .tag { margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.home .me-frame { width: 220px; aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; outline: 1px solid var(--line); outline-offset: 6px; }
.intro-text { margin-top: 28px; color: var(--ink-2); max-width: 60ch; }
.intro-text b { color: var(--ink); font-weight: 600; }
.home .guide-spot { display: flex; align-items: flex-end; gap: 16px; margin-top: 18px; min-height: 0; }
.home .guide-spot .guide { --gw: 76px; }
.home .intro .begin { margin: 0 0 14px; }
.home .intro .explore { position: static; margin: 0 0 22px; opacity: 1; text-decoration: none; text-transform: none; letter-spacing: 0; font: 400 13px var(--sans); color: var(--muted); cursor: pointer; }
.home .intro .explore:hover { color: var(--ink); }

/* a category: an icon, its name and one line, then its rows */
.cat { margin-top: 56px; }
.cat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cat-icon { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; background: var(--surface); outline: 1px solid var(--line); }
.cat-icon svg { width: 17px; height: 17px; stroke: var(--ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cat-head h2 { font: 800 22px/1 var(--display); letter-spacing: -.035em; }
.cat-head p { margin-left: auto; color: var(--muted); font-size: 13.5px; }
.home .snake { display: block; padding: 0; }
.home .board { position: static; }
.home .board::before, .home .board::after, .home .wires { display: none; }
.home .tiles, .home .exp-tiles { display: block; }
.home .tile { aspect-ratio: auto; width: auto; margin: 0; grid-area: auto; }
.home .tile .face, .home .hustles > summary.face { position: relative; inset: auto; display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; overflow: visible; box-shadow: none; }
.home .tile .face:hover, .home .tile .face:focus-visible, .home .hustles > summary.face:hover, .home .hustles > summary.face:focus-visible { transform: none; box-shadow: none; background: rgba(59, 42, 34, .03); }
.home .face .pic { width: 72px; height: 50px; flex: none; border: 3px solid #fff; border-radius: 2px; box-shadow: 0 1px 3px rgba(59, 42, 34, .25); overflow: hidden; background: var(--surface); }
.home .face .pic img { width: 100%; height: 100%; object-fit: cover; }
.home .face .cap { display: block; padding: 0; }
.home .face .num { display: none; }
.home .face h2 { font: 700 17px/1.2 var(--display); letter-spacing: -.02em; }
.home .face .line { color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 2px; }
.home .face .when { font: 500 12px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.home .tile::after { border-radius: 4px; font-size: 20px; }
/* Vital: the one to focus on */
.home .tile.focus .face { box-shadow: none; }
.home .tile.focus .pic { outline: 2px solid var(--ink); outline-offset: 1px; }
.home .focus-tag { position: absolute; z-index: 2; top: 50%; left: auto; right: 150px; translate: 0 -50%; }
.home .foot { margin-top: 48px; border: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) {
  .home { padding-top: 40px; }
  .hello { grid-template-columns: 1fr; }
  .home .me-frame { width: 180px; grid-row: 1; }
  .cat-head p { display: none; }
  .home .tile .face, .home .hustles > summary.face { grid-template-columns: 60px 1fr; gap: 14px; }
  .home .face .pic { width: 60px; height: 44px; }
  .home .face .when { grid-column: 2; }

}
.home .exp { padding-top: 0; }
.home .face .pic.ph::after { content: none; }
.home .focus-tag { position: static; display: inline-block; translate: none; margin: 0 0 0 10px; vertical-align: 3px; }
.home .tile.focus .face h2 { display: inline; }
.home .intro .begin { white-space: nowrap; }
/* the guide only floats above the page while he's out on the tour; at home on the intro he stays under cards */
.guide:not(.loose) { z-index: auto; }
.home .tile .face[href] { color: inherit; text-decoration: none; }
/* Construction: Ben's line under the heading, and the dropdown of smaller builds */
.cat-intro { margin-top: 12px; color: var(--ink-2); font-size: 15px; max-width: 60ch; }
.more { border-bottom: 1px solid var(--line); }
.more summary { list-style: none; cursor: pointer; padding: 14px 0; display: flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: '+'; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); transition: rotate .2s var(--ease-mech); }
.more[open] summary::before { rotate: 45deg; }
.more summary span { padding: 1px 6px; border-radius: 2px; background: var(--surface); }
.more summary:hover { color: var(--ink); }
.more .tile:last-child .face { border-bottom: 0; }
.home .snake .tile { width: auto; margin: 0; grid-area: auto; }
/* "currently reading" under the hello, GitHub links */
.home .reading { margin-top: 14px; color: var(--ink-2); font-size: 15px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.home .reading cite { font-style: italic; color: var(--ink); }
.home .foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.card .gh, .gh-line { display: block; margin-top: 12px; font-size: 14px; color: var(--muted); }
.gh-line { margin: 40px 0 0; }
/* the tour guide and the guided tour are switched off (Ben, 4 Nov): rows still open their cards */
.guide-spot[hidden], .guide { display: none !important; }

/* ── the photo border down both edges (rails.js): wide screens only, always there.
   A collage: small photos of different sizes, tilted and overlapping, flush to the screen edge,
   with a ragged inner edge. ── */
.rail { display: none; }
@media (min-width: 1240px) {
  .rail { display: block; position: absolute; z-index: 0; overflow: hidden; width: min(195px, (100vw - 720px) / 2 - 70px); padding: 8px 0; pointer-events: none; opacity: .55; }
  .rail-l { left: 0; }
  .rail-r { right: 0; }
  .rail figure { position: relative; margin: var(--lap) 0 0; width: var(--w); height: var(--h); rotate: var(--tilt); box-shadow: 0 3px 10px rgba(59, 42, 34, .22); }
  .rail-l figure { margin-left: calc(var(--in) * -0.4); }
  .rail-r figure { margin-left: auto; margin-right: calc(var(--in) * -0.4); }
  .rail figure:first-child { margin-top: 0; }
  .rail img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .home { position: relative; z-index: 1; }
  body { position: relative; overflow-x: hidden; }
}

/* ── full width (4 Nov): the column uses the whole screen, with normal margins ── */
.home { width: auto; max-width: none; margin: 0; padding: clamp(40px, 6vw, 88px) clamp(20px, 5vw, 80px) 48px; }
.home .intro-name { font-size: clamp(56px, 9vw, 150px); max-width: none; }
.home .me-frame { width: clamp(220px, 24vw, 380px); }
.intro-text { max-width: 70ch; font-size: clamp(16px, 1.25vw, 19px); }
.home .face .line { font-size: 14.5px; }
.home .face h2 { font-size: clamp(17px, 1.35vw, 21px); }
.home .tile .face, .home .hustles > summary.face { grid-template-columns: 112px 1fr auto; gap: 24px; padding: 14px 0; }
.home .face .pic { width: 112px; height: 74px; }
.cat-head h2 { font-size: clamp(22px, 2vw, 30px); }
@media (max-width: 560px) {
  .home .tile .face, .home .hustles > summary.face { grid-template-columns: 60px 1fr; gap: 14px; }
  .home .face .pic { width: 60px; height: 44px; }
}
.home .reading { align-items: center; }
.home .reading .book { width: 44px; height: auto; border-radius: 2px; box-shadow: 0 2px 6px rgba(59, 42, 34, .25); }

/* the hello as one block (4 Nov): words on the left, the photo beside them, top-aligned, no dead space */
.home { padding-top: clamp(32px, 4vw, 56px); }
.hello { grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 4vw, 64px); align-items: start; }
.home .intro-name { font-size: clamp(52px, 7.4vw, 120px); line-height: .9; margin-top: 10px; }
.hello .tag { margin-top: 14px; }
.hello .intro-text { margin-top: 26px; max-width: 62ch; }
.hello .reading { margin-top: 16px; }
.home .me-frame { width: clamp(200px, 20vw, 300px); margin-top: 6px; }
@media (max-width: 560px) {
  .hello { grid-template-columns: 1fr; }
  .home .me-frame { width: 170px; grid-row: 1; }
}
/* no dead middle (4 Nov): the page is wide but capped, and the photo sits right beside the words */
.home { max-width: 1280px; margin: 0 auto; }
.hello { grid-template-columns: auto auto; justify-content: start; gap: clamp(32px, 4vw, 72px); }
.hello > div:first-child { max-width: 760px; }
@media (max-width: 560px) { .hello { grid-template-columns: 1fr; } }

/* ── the Vital page (4 Nov rework) ── */
.hero-line { margin-top: 14px; max-width: 46ch; color: var(--ink-2); font-size: clamp(16px, 1.3vw, 19px); }
.strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: clamp(28px, 4vw, 48px) 0 8px; border-top: 2px solid var(--ink); }
.strip li { position: relative; padding: 14px 10px 0 0; font-weight: 700; font-size: 14px; line-height: 1.3; }
.strip li::before { content: ''; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.strip small { display: block; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.two h3, .features h3 { font-size: 17px; margin-bottom: 6px; }
.two p, .features p, .nums p, .note { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.pull { margin: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--ink); font: 600 clamp(18px, 1.7vw, 23px)/1.4 var(--display); letter-spacing: -.02em; color: var(--ink); }
.criteria { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: c; }
.criteria li { counter-increment: c; padding: 14px; background: var(--surface); border-radius: 4px; font-weight: 700; font-size: 15px; }
.criteria li::before { content: '0' counter(c); display: block; font: 500 11px var(--mono); color: var(--muted); margin-bottom: 6px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.features li { padding: 16px; border: 1px solid var(--line); border-radius: 4px; }
.ticks li { position: relative; padding: 0 0 8px 22px; color: var(--ink-2); }
.ticks li::before { content: '→'; position: absolute; left: 0; color: var(--ink); }
.mini { padding-left: 20px; list-style: decimal; color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.market { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 36px; align-items: center; }
.market svg { width: 100%; height: auto; }
.market .m1 { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; } .market .m2 { fill: var(--raised); stroke: var(--ink); stroke-width: 1.5; } .market .m3 { fill: var(--ink); }
.market text { text-anchor: middle; fill: var(--ink); } .market .mv { font: 900 22px var(--display); letter-spacing: -.03em; } .market .mv.s { fill: var(--bg); font-size: 15px; }
.market .ml { font: 500 10px var(--mono); letter-spacing: .05em; text-transform: uppercase; fill: var(--muted); } .market .m3 ~ .ml:last-child { fill: var(--bg); }
.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px 24px; }
.nums dt { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nums dd { margin: 4px 0 2px; font: 900 clamp(22px, 2vw, 28px)/1.1 var(--display); letter-spacing: -.03em; }
.nums.small dd { font-size: 18px; }
.note { color: var(--muted); }
.network svg { width: 100%; max-width: 620px; height: auto; display: block; }
.network text { text-anchor: middle; font: 700 15px var(--display); fill: var(--ink); } .network .b { font-size: 22px; font-weight: 900; fill: var(--bg); } .network .w { font: 500 11px var(--mono); fill: var(--bg); text-transform: uppercase; letter-spacing: .05em; }
.network .n1 { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; } .network .n2 { fill: var(--ink); } .network .ln { fill: none; stroke: var(--ink); stroke-width: 1.5; }
@media (max-width: 700px) { .strip { grid-template-columns: repeat(3, 1fr); row-gap: 22px; } .criteria { grid-template-columns: repeat(2, 1fr); } .market { grid-template-columns: 1fr; } }

/* ── no bracketed, spaced-out capitals (4 Nov, Ben): labels are plain sentence-case text ── */
.ph::after { content: attr(data-ph); }
.rows li::before, .rows li::after, .intro-sub::before, .intro-sub::after, .hero .kicker::before, .hero .kicker::after,
.sec > .tag::before, .sec > .tag::after, .venn-name::before, .venn-name::after { content: none; }
.label, .card-kick, .hero .kicker, .sec > .tag, .facts dt, .lb-count, .focus-tag, .steps .n, .nums dt, .strip small,
.home .face .when, .more summary, .criteria li::before, .branches h4, .market .ml, .network .w {
  font-family: var(--sans); text-transform: none; letter-spacing: 0; font-weight: 500;
}
.label, .card-kick, .hero .kicker, .facts dt, .nums dt, .strip small, .home .face .when, .more summary { font-size: 14px; }
.sec > .tag { font-size: 15px; color: var(--ink-2); font-weight: 600; }
.branches h4 { font-size: 14px; font-weight: 700; color: var(--ink); }
.focus-tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.steps .n, .criteria li::before { font-size: 14px; font-variant-numeric: tabular-nums; }
.home .face .when { font-variant-numeric: tabular-nums; }
.market .ml, .network .w { font-size: 11px; }
.demo { margin: clamp(32px, 4vw, 56px) 0 8px; }
.demo h2 { font-size: clamp(22px, 2vw, 28px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 14px; }
.demo video { display: block; width: 100%; border-radius: 4px; background: #000; box-shadow: 0 0 0 1px var(--line); }

/* ── fonts (4 Nov, Ben): Instrument Serif for headings, Inter for text, as on the editorial template he picked ── */
:root { --display: 'Instrument Serif', Georgia, serif; --sans: 'Inter', system-ui, sans-serif; }
body { font-family: var(--sans); }
h1, h2, h3, .home .intro-name, .cat-head h2, .home .face h2, .card h2, .hero h1, .sec h2, .lede, .pull, .sec-h, .bpanel h3, .branches h3,
.features h3, .two h3, .steps h3, .list h3, .nums dd, .demo h2, .market .mv, .network text, .criteria li, .strip li {
  font-family: var(--display); font-weight: 400;
}
.home .intro-name { letter-spacing: -.025em; line-height: .95; }
.cat-head h2 { font-size: clamp(30px, 2.8vw, 40px); letter-spacing: -.02em; }
.home .face h2 { font-size: clamp(21px, 1.7vw, 25px); letter-spacing: -.01em; }
.card h2, .hero h1 { letter-spacing: -.025em; }
.sec h2, .lede { letter-spacing: -.015em; line-height: 1.12; }
.bpanel h3, .branches h3, .features h3, .two h3, .steps h3, .list h3 { font-size: 21px; letter-spacing: -.01em; }
.pull { font-size: clamp(22px, 2vw, 28px); line-height: 1.3; letter-spacing: -.01em; }
.nums dd { font-size: clamp(28px, 2.6vw, 36px); letter-spacing: -.02em; }
.criteria li, .strip li { font-size: 18px; }
.market .mv { font-size: 26px; } .network text { font-size: 17px; } .network .b { font-size: 26px; }
.bar .name { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: -.01em; }
.btn { font-family: var(--sans); }

/* Third font: Instrument Serif italic, for accents (Ben, 4 Nov) */
.intro-name em, .cat-head h2, .face .cap h2, .home .reading cite { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; }
.home .reading cite { font-size: 1.15em; }

/* Early Hustles: a row that opens to its four hustles, each its own card (Ben, 4 Nov) */
.more.hustles { border-bottom: 0; }
.more.hustles > summary.face { list-style: none; position: relative; cursor: pointer; }
.more.hustles > summary.face .when::after { content: '+'; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 12px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); transition: rotate .2s var(--ease-mech); }
.more.hustles[open] > summary.face .when::after { rotate: 45deg; }
.more.hustles > .tiles { padding-left: 40px; }
.more.hustles .pic:empty { background: var(--surface); }
.more.hustles > summary.face { font: inherit; letter-spacing: normal; text-transform: none; color: inherit; }
.more.hustles > summary.face::before { content: none; display: none; }
.more.hustles > summary.face .when { display: inline-flex; align-items: center; }
@media (max-width: 759px) { .more.hustles > .tiles { padding-left: 20px; } }
.more.hustles > summary.face span.when { background: none; padding: 0; border-radius: 0; }
