:root {
  --ink: #111110;
  --grey: #6B6A66;
  --line: #E6E5E1;
  --wash: #F6F5F2;
  --bg: #FFFFFF;
  --serif: 'Newsreader', Georgia, serif;
  --mono: 'DM Mono', ui-monospace, monospace;
  --display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --head-wt: 800;
  --rule: 3px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: #FFC531; color: var(--ink); }

/* ------------------------------------------------ hero */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; cursor: crosshair; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
canvas.troop { position: absolute; inset: 0; width: 100%; height: 100%; }
.nav { position: absolute; top: 26px; right: var(--gutter); display: flex; gap: 32px; z-index: 2; font: 400 13px/1 var(--mono); letter-spacing: .02em; }
.nav a { text-decoration: none; color: var(--grey); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.mark { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); width: min(64vw, 820px); text-align: center; z-index: 1; pointer-events: none; }
.mark h1 { margin: 0; }
.mark img { width: 100%; height: auto; }
.tag { margin: clamp(14px, 2vw, 26px) 0 0; font: italic 400 clamp(20px, 2.1vw, 30px)/1.2 var(--serif); }

/* ------------------------------------------------ sections */
section[id] { scroll-margin-top: 56px; }
.label { margin: 0 0 clamp(28px, 3vw, 40px); font: var(--head-wt) clamp(30px, 3.4vw, 48px)/1 var(--display); letter-spacing: -.03em; font-optical-sizing: auto; }

/* ------------------------------------------------ work: one project to a row */
.work { padding: clamp(64px, 8vw, 112px) var(--gutter); max-width: var(--max); margin: 0 auto; }
.grid { --pad: clamp(40px, 4vw, 56px); display: flex; flex-direction: column; }
.cell { position: relative; padding: var(--pad) 0 clamp(56px, 6vw, 88px); border-top: var(--rule) solid var(--ink); }
.plate { position: relative; z-index: 1; display: grid; gap: 22px; text-decoration: none; }
@media (min-width: 860px) { .plate { grid-template-columns: 62fr 38fr; gap: clamp(32px, 4vw, 64px); align-items: start; } }
.media { position: relative; overflow: hidden; border-radius: 4px; aspect-ratio: 16 / 10; background: var(--wash); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .25s; }
.media img, .media video, .media canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media img, .media video { object-position: var(--focus, 50% 50%); }
.media img.gen { opacity: 0; transition: opacity .3s; }
.media.made img.gen { opacity: 1; }
.media video { opacity: 0; transition: opacity .6s; }
.media.live video { opacity: 1; }
.media canvas.noise { transition: opacity .6s; }
.media.made canvas.noise { opacity: 0; }
.steps { position: absolute; right: 10px; bottom: 9px; font: 400 11px/1 var(--mono); color: #fff; mix-blend-mode: difference; }
.media.made .steps { opacity: 0; transition: opacity .4s .2s; }
.media.txt { margin: 0; padding: clamp(20px, 2.6vw, 36px); font: 400 clamp(12px, 1vw, 14px)/1.75 var(--mono); white-space: pre-wrap; color: var(--ink); overflow: hidden; }
.pic { position: relative; }
.pic > .media { z-index: 1; }
.plate:hover .media { box-shadow: 0 0 0 1px var(--ink); }
.media.frame { display: grid; place-items: center; }
.media.screen { position: absolute; top: 7%; bottom: 7%; left: 50%; transform: translateX(-50%); aspect-ratio: 2048 / 2732; border-radius: 8px; background: var(--bg); }
.plate:hover .media.screen { box-shadow: 0 0 0 1px var(--line); }
.cap { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cap .num { font: 400 12px/1 var(--mono); color: var(--grey); }
.cap h3 { margin: 0; font: var(--head-wt) clamp(48px, 5.6vw, 80px)/.9 var(--display); letter-spacing: -.04em; font-optical-sizing: auto; }
.cap p { margin: 0; font: 400 clamp(19px, 1.45vw, 22px)/1.4 var(--serif); color: #3B3A37; max-width: 34ch; text-wrap: pretty; }
.cap .go { margin-top: 6px; padding-bottom: 4px; border-bottom: 1px solid currentColor; font: 400 13px/1.2 var(--mono); color: var(--ink); white-space: nowrap; }
.cap .go i { font-style: normal; display: inline-block; transition: transform .25s; }
.cell:hover .go i { transform: translate(2px, -2px); }
/* phones: name first, then the picture (with room above it for the peeker), then the line and link */
@media (max-width: 859px) {
  .plate { gap: 0; }
  .cap { display: contents; }
  .cap .num { order: 1; margin-bottom: 10px; }
  .cap h3 { order: 2; margin-bottom: 40px; }
  .pic { order: 3; }
  .cap p { order: 4; margin-top: 20px; }
  .cap .go { order: 5; margin-top: 16px; justify-self: start; }
}

/* peekers: one creature hidden behind each picture's top edge; it rises when the plate scrolls into view */
.peek { position: absolute; top: -32px; left: calc(12px + var(--px, .7) * (100% - 80px)); width: 56px; height: 56px; z-index: 0; transform: translateY(40px); transition: transform .55s cubic-bezier(.3,1.6,.5,1); }
.peek canvas { width: 100%; height: 100%; }
.peek.up { transform: none; }
.cell:hover .peek.up { transform: translateY(-12px); }
@media (prefers-reduced-motion: reduce) { .peek { transform: none; } }

/* ------------------------------------------------ writing list */
.writing { padding: 0 var(--gutter) clamp(64px, 8vw, 112px); max-width: var(--max); margin: 0 auto; }
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-top: 1px solid var(--ink); }
.posts li:first-child { border-top: var(--rule) solid var(--ink); }
.posts a { display: grid; grid-template-columns: 180px 1fr; align-items: baseline; gap: 6px 32px; padding: 24px 0; text-decoration: none; }
.posts time { font: 400 12px/1 var(--mono); color: var(--grey); }
.posts .t { font: 700 clamp(26px, 2.6vw, 36px)/1.05 var(--display); letter-spacing: -.03em; }
.posts .d { grid-column: 2; font: 400 18px/1.45 var(--serif); color: var(--grey); max-width: 60ch; }
.posts a:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.posts .soon { padding: 24px 0; font: italic 400 26px/1 var(--serif); color: var(--grey); }
@media (max-width: 700px) { .posts a { grid-template-columns: 1fr; } .posts .d { grid-column: 1; } }

/* ------------------------------------------------ hello + footer */
.say { position: relative; overflow: hidden; min-height: min(72svh, 680px); display: grid; place-items: center; padding: 96px var(--gutter); cursor: crosshair; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.say::before { content: ''; position: absolute; top: 0; left: calc(max(0px, (100% - var(--max)) / 2) + var(--gutter)); right: calc(max(0px, (100% - var(--max)) / 2) + var(--gutter)); border-top: var(--rule) solid var(--ink); }
.say-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.say .big { margin: 0; font: italic 400 clamp(48px, 7vw, 104px)/1 var(--serif); letter-spacing: -.02em; }
.hello { font: 400 14px/1 var(--mono); background: none; border: 0; border-bottom: 1px solid var(--ink); padding: 0 0 6px; color: var(--ink); cursor: pointer; text-decoration: none; }
.hello i { font-style: normal; display: inline-block; transition: transform .25s; }
.hello:hover i { transform: translateX(4px); }
.foot { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 36px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; font: 400 12px/1 var(--mono); color: var(--grey); border-top: 1px solid var(--line); }
.foot .mini { margin-right: auto; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.mini img { height: 18px; width: auto; }

/* ------------------------------------------------ reading */
.bar { position: sticky; top: 0; z-index: 5; background: rgb(255 255 255 / .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); height: 56px; display: flex; align-items: center; padding: 0 var(--gutter); gap: 24px; border-bottom: 1px solid var(--line); }
.bar::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: calc(var(--read, 0) * 100%); background: var(--ink); }
.barnav { display: flex; gap: 24px; font: 400 13px/1 var(--mono); }
.barnav a { text-decoration: none; color: var(--grey); }
.barnav a:hover { color: var(--ink); }
#walker { flex: 1; min-width: 40px; height: 36px; }
.bar.float { position: fixed; left: 0; right: 0; transform: translateY(-101%); transition: transform .35s ease; }
.past .bar.float { transform: none; }
@media (max-width: 600px) { .bar.float .barnav a:not([href="#hello"]) { display: none; } }
.post { padding: 0 var(--gutter) 40px; }
.band { position: relative; overflow: hidden; margin: 0 calc(var(--gutter) * -1); padding: clamp(72px, 10vw, 136px) var(--gutter) clamp(48px, 6vw, 80px); }
.band canvas.troop { position: absolute; inset: 0; width: 100%; height: 100%; }
.band .head { position: relative; z-index: 1; }
.head, .body, .end { max-width: 660px; margin: 0 auto; }
.head .meta { font: 400 12px/1 var(--mono); color: var(--grey); margin: 0 0 28px; }
.head h1 { margin: 0; font: 400 clamp(44px, 6.4vw, 84px)/1 var(--serif); letter-spacing: -.025em; text-wrap: balance; }
.head .dek { margin: 24px 0 0; font: italic 400 clamp(20px, 1.9vw, 25px)/1.4 var(--serif); color: var(--grey); text-wrap: pretty; }
.cover { max-width: 1000px; margin: 0 auto clamp(40px, 5vw, 64px); }
.cover .media { box-shadow: none; background: none; border-radius: 0; }
.body { padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--ink); font: 400 clamp(19px, 1.5vw, 21px)/1.6 var(--serif); text-wrap: pretty; }
.body > * { margin-top: 0; }
.body > * + * { margin-top: 1em; }
.body p, .body ul, .body ol, .body pre { margin-bottom: 0; }
.body > p:first-child { display: flow-root; }
.body > p:first-child::first-letter { float: left; font: 400 5.3em/.68 var(--serif); margin: .07em .06em 0 -.04em; }
.body h2 { margin: 2.2em 0 0; font: 400 clamp(28px, 2.6vw, 34px)/1.15 var(--serif); letter-spacing: -.015em; }
.body h3 { margin: 1.8em 0 0; font: 400 13px/1.3 var(--mono); letter-spacing: .02em; color: var(--grey); }
.body h2 + *, .body h3 + * { margin-top: .7em; }
.body a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.body a:hover { text-decoration-thickness: 2px; }
.body strong { font-weight: 500; }
.body ul, .body ol { padding-left: 0; }
@media (max-width: 760px) { .body ul, .body ol { padding-left: 1.15em; } }
.body li + li { margin-top: .2em; }
.body li::marker { color: var(--grey); }
.body blockquote { margin: 1.8em 0; padding: 0; font: italic 400 clamp(26px, 2.5vw, 34px)/1.25 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.body code { font: 400 .8em/1 var(--mono); background: var(--wash); padding: .1em .3em; border-radius: 3px; }
.body pre { background: var(--wash); border-radius: 4px; padding: 20px 24px; overflow-x: auto; font: 400 14px/1.65 var(--mono); }
.body pre code { background: none; padding: 0; font: inherit; }
.body hr { border: 0; height: 30px; margin: 2.6em 0; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 30'%3E%3Cg fill='%23111110'%3E%3Ccircle cx='44' cy='17' r='4'/%3E%3Ccircle cx='76' cy='17' r='4'/%3E%3Ccircle cx='60' cy='24' r='2.2'/%3E%3C/g%3E%3Cg stroke='%23111110' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M48 6 L38 9'/%3E%3Cpath d='M72 6 L82 9'/%3E%3C/g%3E%3C/svg%3E"); }
.body figure { margin: 2.2em 0; }
@media (min-width: 1000px) { .body figure { margin-left: -120px; margin-right: -120px; } .body figcaption { padding-left: 120px; } }
.body figcaption { margin-top: 12px; font: 400 12px/1.4 var(--mono); color: var(--grey); }
.media.inline { display: block; aspect-ratio: auto; }
.media.inline img { position: relative; height: auto; }
.body table { border-collapse: collapse; width: 100%; font-size: .85em; }
.body th, .body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.end { margin-top: clamp(64px, 8vw, 96px); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.end .sig { width: 52px; height: 52px; flex: none; display: block; }
.end .sig canvas { width: 100%; height: 100%; }
.end .by { font: 400 12px/1.4 var(--mono); color: var(--grey); }
.end .by b { display: block; font: 400 20px/1.2 var(--serif); color: var(--ink); }
.end .next { flex: 1; min-width: 220px; font: 400 22px/1.2 var(--serif); text-decoration: none; }
.end .next small { display: block; font: 400 12px/1 var(--mono); color: var(--grey); margin-bottom: 6px; }
.end .home-link { font: 400 12px/1 var(--mono); color: var(--grey); text-decoration: none; margin-left: auto; }
.end .home-link:hover { color: var(--ink); }
.read .foot { margin-top: 48px; }

/* ------------------------------------------------ 404 + legal */
.four { margin: 0; font: italic 400 clamp(96px, 16vw, 220px)/.9 var(--serif); letter-spacing: -.04em; }
.legal .bar { position: static; }
.legal iframe { width: 100%; height: calc(100svh - 56px); border: 0; display: block; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

