:root {
  /* risograph spot inks on cream paper */
  --paper: #f3eccc; --ink: #1c140a;
  --magenta: #ff48b0; --magenta-2: #ff8fcc;
  --violet: #7c3aed;  --violet-2: #a855f7;
  --plum: #5b21b6;    --indigo: #4f46e5;
  --yellow: #ffd538;  --lime: #c4ff3a;

  /* rgb triplets for translucent fills, e.g. rgba(var(--paper-rgb), .8) */
  --paper-rgb: 243, 236, 204;
  --ink-rgb: 28, 20, 10;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--paper); overflow-x: clip; }
body { color: var(--ink); font-family: var(--font-body); position: relative; }
a { color: inherit; }

/* keyboard skip link — off-screen until focused */
.skip-link {
  position: absolute; left: 8px; top: 8px; z-index: 100;
  padding: 8px 14px; background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 13px; text-decoration: none;
  transform: translateY(-150%); transition: transform 150ms ease;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--magenta); outline-offset: 2px; }
.lyr { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1; }

/* ============ CSS-driven parallax ============
   The JS tick only updates three root vars (--mx, --my, --sy). Each .lyr
   resolves its own transform via calc() against its --d (depth). This
   collapses 114 per-frame inline-style writes into 3 root-var writes plus
   a composited transform recalc — sub-millisecond per tick.
   Registered @property gives the browser typed numbers it can pipe to the
   compositor without main-thread style-recalc churn. */
@property --mx { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --my { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --sy { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --d  { syntax: '<number>'; inherits: false; initial-value: 0; }
.lyr {
  --par-speed:  calc(1 + var(--d) / 60);
  --par-amp:    calc(max(var(--d), -1 * var(--d)) * 0.9);
  --par-so:     calc(-1 * var(--sy) * var(--par-speed) * 1px);
  --par-tx:     calc(-1 * var(--mx) * var(--par-amp) * 1px);
  --par-ty:     calc(-1 * var(--my) * var(--par-amp) * 0.5px);
  transform: translate3d(var(--par-tx), calc(var(--par-so) + var(--par-ty)), 0);
}
.lyr[data-no-scroll="1"] {
  --par-so: 0px;
  --par-amp: 12;
}
/* Lazy-loaded card layers: skip rendering until near viewport. The :has()
   check stops matching once the IntersectionObserver removes data-src,
   so the card never gets stuck hidden after first reveal. */
.card:has(> img[data-src]) {
  content-visibility: auto;
  contain-intrinsic-size: 320px 350px;
}

/* ============ BRUSH STROKE (single color, currentColor via <use>) ============ */
.brush, .solid {
  position: absolute;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.brush svg, .solid svg { width: 100%; height: 100%; display: block; }

/* ============ MISALIGNED PRINT PLATES STACK ============ */
/* wrapper sets position/size/rotation; children sit on top of each other and offset by a few px in diff colors */
.plates { position: absolute; pointer-events: none; }
.plates .plate {
  position: absolute; inset: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.plates .plate svg { width: 100%; height: 100%; display: block; }
/* plate variants: small offset like real riso registration error (3-8px) */
.plates .p-ink     { color: var(--ink);     transform: translate(0px, 0px);   opacity: 0.7; }
.plates .p-magenta { color: var(--magenta); transform: translate(-4px, -3px); opacity: 0.78; }
.plates .p-violet  { color: var(--violet);  transform: translate(5px, 4px);   opacity: 0.78; }
.plates .p-yellow  { color: var(--yellow);  transform: translate(3px, -5px);  opacity: 0.85; }
.plates .p-plum    { color: var(--plum);    transform: translate(-3px, 5px);  opacity: 0.78; }
.plates .p-indigo  { color: var(--indigo);  transform: translate(6px, -3px);  opacity: 0.7; }

/* ============ ALEX ASCII — single copy, 300% size ============ */
.alex {
  position: absolute;
  font-family: 'JetBrains Mono', 'Cascadia Code', ui-monospace, monospace;
  font-size: 12px;          /* 150% of v8's 8px, 50% of v9's 24px */
  line-height: 1;
  white-space: pre;
  color: var(--ink);
  pointer-events: none;
  user-select: none;
  mix-blend-mode: multiply;
  opacity: 0.85;
}
/* anchored low in the page so the parallax sweep brings Alex through
   the whoami→projects transition (depth 36 = 1.6× scroll speed) */
.alex.hero {
  top: 250vh;
  right: 4vw;
  transform: rotate(-2deg);
}

/* ============ photo cards (no rotation, no recolor) ============ */
.card { position: absolute; pointer-events: none; }
.card img { width: 100%; height: auto; display: block; }
/* push card-containing layers BEHIND text layers so site copy sits in front */
.lyr:has(.card) { z-index: 0; }
/* text-bearing layers stay above cards */
.lyr:has(.headline-wrap),
.lyr:has(.sub),
.lyr:has(.issue),
.lyr:has(.badge),
.lyr:has(.brushstroke),
.lyr:has(.swatch-stack),
.lyr:has(.figlet),
.lyr:has(.ascii-gear),
.lyr:has(.ascii-fish),
.lyr:has(.ascii-botanical),
.lyr:has(.ascii-portrait),
.lyr:has(.ascii-art),
.lyr:has(.alex) { z-index: 5; }
/* sticky top bar sits ABOVE main content so links are clickable */
.lyr:has(.top-bar) { z-index: 50; }

/* ============ figlet scatter ============ */
.figlet { position: absolute; font-family: var(--font-mono); white-space: pre; line-height: 1; pointer-events: none; user-select: none; mix-blend-mode: multiply; }
.figlet.huge { font-size: 26px; opacity: 0.22; }
.figlet.medium { font-size: 14px; opacity: 0.38; }
.figlet.small { font-size: 10px; opacity: 0.5; }

/* ============ ascii decorations ============ */
.ascii-botanical { font-family: var(--font-mono); font-size: 14px; line-height: 1.1; color: var(--violet); opacity: 0.7; white-space: pre; position: absolute; top: 5vh; left: 4vw; mix-blend-mode: multiply; }
.ascii-fish { font-family: var(--font-mono); font-size: 18px; line-height: 1.6; color: var(--indigo); opacity: 0.55; white-space: pre; position: absolute; bottom: 8vh; right: 6vw; mix-blend-mode: multiply; }
.ascii-art { font-family: var(--font-mono); line-height: 1; white-space: pre; position: absolute; mix-blend-mode: multiply; user-select: none; pointer-events: none; }
.ascii-blocks   { font-size: 10px; color: var(--ink);    opacity: 0.32; }
.ascii-contours { font-size: 18px; color: var(--violet); opacity: 0.55; letter-spacing: 0.1em; }
.ascii-diagram  { font-size: 9px;  color: var(--magenta); opacity: 0.62; }
.ascii-waveform { font-size: 9px;  color: var(--indigo);  opacity: 0.55; }
.ascii-cloud      { font-size: 16px; color: var(--ink);     opacity: 0.55; line-height: 1.1; }
.ascii-reg        { font-size: 9px;  color: var(--magenta); opacity: 0.42; }
.ascii-dense      { font-size: 11px; color: var(--violet);  opacity: 0.38; letter-spacing: 0.1em; }
.ascii-signal     { font-size: 11px; color: var(--ink);     opacity: 0.7; }
.ascii-halftone   { font-size: 10px; color: var(--ink);     opacity: 0.65; }
.ascii-archive    { font-size: 13px; color: var(--plum);    opacity: 0.5; letter-spacing: 0.1em; }
.ascii-mesh       { font-size: 12px; color: var(--indigo);  opacity: 0.55; }
.ascii-pattern    { font-size: 11px; color: var(--ink);     opacity: 0.65; }

/* ============ grit ============ */
.photocopy-noise { position: absolute; inset: 0; mix-blend-mode: multiply; opacity: 0.42; }
.photocopy-noise svg { width: 100%; height: 100%; display: block; }
.dither { position: absolute; inset: 0; mix-blend-mode: multiply; opacity: 0.25; }
.dither svg { width: 100%; height: 100%; display: block; }
.halftone { position: absolute; top: 22vh; right: 18vw; width: 360px; height: 360px; background-image: radial-gradient(circle, var(--ink) 1.4px, transparent 2.2px); background-size: 8px 8px; opacity: 0.42; mask: radial-gradient(circle, #000 30%, transparent 78%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 78%); mix-blend-mode: multiply; }

/* ============ swatches ============ */
.swatch-stack { position: absolute; top: 16vh; left: 30px; display: flex; flex-direction: column; gap: 12px; width: 76px; }
.swatch { font-family: var(--font-mono); font-size: 10px; line-height: 1; padding: 10px 6px; white-space: pre; mix-blend-mode: multiply; box-shadow: 3px 3px 0 var(--ink); }
.swatch.s1 { background: var(--yellow); color: var(--ink); }
.swatch.s2 { background: var(--magenta); color: var(--paper); }
.swatch.s3 { background: var(--violet); color: var(--paper); }
.swatch.s4 { background: var(--plum); color: var(--paper); }

/* ============ top bar ============ */
.top-bar { position: absolute; top: 22px; left: 40px; right: 40px; display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1.5px solid var(--ink); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; pointer-events: auto; background: rgba(var(--paper-rgb), 0.65); backdrop-filter: blur(2px); }
.top-bar .left { display: flex; align-items: center; gap: 14px; padding: 8px 0 8px 8px; }
.top-bar .left .mark { display: inline-block; width: 14px; height: 14px; background: var(--magenta); border-radius: 50%; box-shadow: 4px 4px 0 var(--violet); }
.top-bar .right { display: flex; gap: 22px; padding-right: 8px; }
.top-bar .right a { color: var(--ink); text-decoration: none; padding-bottom: 2px; border-bottom: 1.5px solid transparent; }
.top-bar .right a:hover { border-bottom-color: var(--magenta); }
.top-bar .right a.prompt { background: var(--ink); color: var(--paper); padding: 4px 10px; }

.issue { position: absolute; top: 20vh; left: 140px; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; padding: 6px 14px; border: 1.5px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.issue .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.headline-wrap { position: absolute; top: 28vh; left: 140px; }
.headline { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: clamp(120px, 21vw, 320px); line-height: 0.78; letter-spacing: -0.06em; color: var(--ink); position: relative; display: inline-block; font-variation-settings: "opsz" 144; }
.headline::before, .headline::after { content: attr(data-text); position: absolute; top: 0; left: 0; pointer-events: none; mix-blend-mode: multiply; }
.headline::before { color: var(--magenta); transform: translate(8px, 6px); opacity: 0.92; }
.headline::after { color: var(--violet); transform: translate(-7px, -4px); opacity: 0.88; }

.brushstroke { position: absolute; top: 48vh; left: 80px; width: 740px; height: 240px; mix-blend-mode: multiply; opacity: 0.95; }
.brushstroke svg { width: 100%; height: 100%; display: block; }

.sub { position: absolute; top: 66vh; left: 140px; font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(22px, 2.4vw, 36px); line-height: 1.15; max-width: 24ch; color: var(--ink); background: rgba(var(--paper-rgb), 0.78); padding: 16px 22px; box-shadow: 5px 5px 0 var(--ink); border: 1.5px solid var(--ink); }
.sub mark { background: var(--yellow); mix-blend-mode: multiply; padding: 0 6px; font-weight: 900; font-style: normal; }
.sub .strike { text-decoration: line-through; text-decoration-thickness: 4px; text-decoration-color: var(--magenta); }

.badge { position: absolute; top: 50vh; left: 24px; width: 138px; height: 138px; display: grid; place-items: center; background: var(--magenta); color: var(--ink); font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 32px; line-height: 1; text-align: center; letter-spacing: 0.04em; border-radius: 50%; transform: rotate(-13deg); box-shadow: 0 0 0 6px var(--paper), 0 0 0 7.5px var(--ink), 7px 7px 0 8px var(--ink); }

.arrow { position: absolute; top: 56vh; left: 44vw; width: 280px; height: 140px; color: var(--violet); mix-blend-mode: multiply; }
.arrow text { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 18px; }
.ascii-gear { font-family: var(--font-mono); font-size: 13px; line-height: 1; color: var(--magenta); opacity: 0.95; white-space: pre; position: absolute; bottom: 18vh; left: 50vw; transform: rotate(-8deg); }

main { position: relative; z-index: 10; }
.hero-spacer { height: 100vh; }
section.real { min-height: 90vh; padding: 100px 80px; position: relative; }
/* Last section hugs its content (not the 90vh default) so the contact heading
   stays on screen at maximum scroll on tall viewports. */
section.real#contact { min-height: 0; }
.section-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--plum); margin-bottom: 18px; }
.ascii-divider { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.15em; color: var(--ink); margin-bottom: 36px; opacity: 0.75; }
.ascii-divider b { color: var(--plum); font-weight: 400; }
.h2 { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: clamp(64px, 9vw, 140px); line-height: 0.9; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 40px; position: relative; display: inline-block; }
.h2::before, .h2::after { content: attr(data-text); position: absolute; top: 0; left: 0; pointer-events: none; mix-blend-mode: multiply; }
.h2::before { color: var(--magenta); transform: translate(6px, 4px); opacity: 0.9; }
.h2::after { color: var(--violet); transform: translate(-5px, -3px); opacity: 0.85; }
.legible { background: rgba(var(--paper-rgb), 0.85); border: 1.5px solid var(--ink); padding: 28px 32px; box-shadow: 8px 8px 0 var(--ink); backdrop-filter: blur(3px); max-width: 920px; position: relative; }
.body-copy { font-family: var(--font-display); font-style: italic; font-size: 22px; line-height: 1.4; color: var(--ink); max-width: 40ch; }
.body-copy strong { color: var(--plum); font-style: normal; }
.projects-dir { font-family: var(--font-mono); font-size: 14px; line-height: 1.8; color: var(--ink); position: relative; }
.projects-dir .prompt-line { color: var(--ink); opacity: 0.7; margin-bottom: 14px; }
.projects-dir .prompt-line .glyph { color: var(--plum); margin-right: 8px; }
.projects-dir .group { color: var(--ink); opacity: 0.95; font-weight: 700; font-style: italic; margin: 18px 0 4px; letter-spacing: 0.02em; }
.projects-dir .group:first-of-type { margin-top: 0; }
.projects-dir .group .hash { color: var(--plum); opacity: 0.85; margin-right: 8px; font-style: normal; }
.projects-dir .row { display: grid; grid-template-columns: 116px 60px 28px 70px 1fr 2fr; gap: 14px; align-items: baseline; padding: 2px 0; }
.projects-dir .row:hover { background: rgba(255, 20, 147, 0.12); }
.projects-dir .perm, .projects-dir .user, .projects-dir .sz, .projects-dir .date { color: var(--ink); opacity: 0.6; }
.projects-dir .sz { text-align: right; }
.projects-dir .name { color: var(--plum); font-weight: 700; text-decoration: none; letter-spacing: 0.02em; }
.projects-dir .name:hover,
.projects-dir .name:focus-visible { background: var(--plum); color: var(--paper); outline: 2px solid var(--ink); outline-offset: 2px; }
.projects-dir .desc { color: var(--ink); opacity: 0.95; }
.projects-dir .row.redacted .name { color: var(--ink); opacity: 0.55; }
.projects-dir .row.redacted .desc { color: transparent; background: var(--ink); opacity: 0.18; display: inline-block; width: 70%; height: 0.85em; border-radius: 1px; }
.projects-dir .row.incoming .name { color: var(--ink); opacity: 0.5; }
.projects-dir .row.incoming .desc { color: var(--ink); opacity: 0.45; font-style: italic; }
/* offline = subdomain not deployed yet — strikethrough + non-clickable */
.projects-dir .row.offline .name,
.projects-dir .row.offline .desc { text-decoration: line-through; opacity: 0.55; }
.projects-dir .row.offline .name { color: var(--ink); cursor: default; }
.postcard { background: var(--paper); border: 1.5px solid var(--ink); padding: 28px 32px; max-width: 560px; font-family: var(--font-mono); font-size: 14px; line-height: 1.7; box-shadow: 8px 8px 0 var(--ink); position: relative; }
.postcard::before { content: "★ POSTCARD ★"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--paper); padding: 0 10px; font-size: 11px; letter-spacing: 0.3em; color: var(--violet); }
.postcard b { color: var(--plum); }
.postcard a { color: var(--violet); text-decoration: underline; }
.postcard a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; background: var(--yellow); }
.top-bar .right a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; background: var(--yellow); border-bottom-color: transparent; }

/* ============ headline jitter — fires after typing BELL ============ */
@keyframes headline-jitter {
  0%, 100% { translate: 0 0; }
  12% { translate: -2px 1px; }
  24% { translate:  2px -1px; }
  36% { translate: -1px 2px; }
  48% { translate:  1px -2px; }
  60% { translate: -2px -1px; }
  72% { translate:  2px 2px; }
  84% { translate: -1px -1px; }
}
.headline.jitter { animation: headline-jitter 900ms steps(12, end); }

/* ============ PRINT — re-flow into a one-page riso zine colophon ============ */
@media print {
  html, body { background: #fff !important; color: #1c140a !important; overflow: visible !important; }
  body { font: 11pt/1.55 "Courier New","JetBrains Mono",monospace !important; }
  /* hide every parallax layer + atmosphere */
  .lyr { display: none !important; }
  #ios-collage { display: none !important; }
  /* the real content takes the page */
  main { position: static !important; padding: 0.6in 0.75in !important; max-width: 7in !important; margin: 0 auto !important; z-index: auto !important; }
  .hero-spacer { display: none !important; }
  section.real { min-height: 0 !important; padding: 0 0 0.5in !important; break-inside: avoid; }
  .section-label { color: #1c140a !important; font-size: 9pt !important; opacity: 0.7; margin-bottom: 0.15in !important; }
  .ascii-divider { font-size: 10pt !important; opacity: 0.55; margin-bottom: 0.2in !important; }
  .ascii-divider b { color: #1c140a !important; }
  .h2 {
    font: italic 900 32pt/0.95 "Georgia","Fraunces",serif !important;
    margin-bottom: 0.25in !important;
    color: #1c140a !important;
    letter-spacing: -0.02em;
  }
  .h2::before, .h2::after { display: none !important; } /* no ghost print on paper */
  .legible {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: none !important;
    backdrop-filter: none !important;
  }
  .body-copy { font: 11.5pt/1.55 Georgia,serif !important; max-width: none !important; color: #1c140a !important; }
  .body-copy strong { color: #1c140a !important; font-style: italic; }
  .projects-dir { font: 9.5pt/1.5 "Courier New",monospace !important; }
  .projects-dir .prompt-line { margin-bottom: 0.1in !important; }
  .projects-dir .row {
    display: grid !important;
    grid-template-columns: 88px 36px 18px 50px 1fr 2fr !important;
    gap: 8px !important;
    padding: 1pt 0 !important;
  }
  .projects-dir .name { color: #1c140a !important; background: none !important; text-decoration: underline; }
  .projects-dir .row.redacted .desc { background: #1c140a !important; color: transparent !important; opacity: 0.5 !important; }
  .postcard {
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid #1c140a !important;
    padding: 0.25in !important;
    max-width: none !important;
  }
  .postcard::before { color: #1c140a !important; background: #fff !important; }
  .postcard b { color: #1c140a !important; font-weight: 700; }
  .postcard a { color: #1c140a !important; }
  /* one ASCII colophon at the bottom */
  main::after {
    content: "\A   ┼ ─────────────────────────────────────────────── ┼\A   PRINTED AT 2bz.ca       ·       RUN OF 1\A   ┼ ─────────────────────────────────────────────── ┼\A   PLATE 6/6   ·   ALEX   ·   YVR";
    white-space: pre;
    display: block;
    margin-top: 0.6in;
    text-align: center;
    font: 9pt/1.6 "Courier New",monospace;
    color: #1c140a;
    opacity: 0.7;
  }
}

/* ============ Golden Hour — paper warms ±30min around Vancouver sunset ============ */
.golden-hour { --paper: #fff4e2; }
.golden-hour body { background: var(--paper); }

/* ============ Marine Layer — back-layer decoration softens when YVR is foggy ============ */
@keyframes marine-drift { 0% { transform: translateX(0); } 100% { transform: translateX(-40px); } }
.marine-fog .brush,
.marine-fog .solid,
.marine-fog .card,
.marine-fog .figlet,
.marine-fog .ascii-botanical,
.marine-fog .ascii-fish,
.marine-fog .ascii-portrait { filter: blur(1.5px); transition: filter 1.2s ease; }
.marine-fog body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 6;
  background-image: radial-gradient(circle, rgba(255,255,255,0.18) 1px, transparent 2px);
  background-size: 6px 6px;
  mix-blend-mode: screen; opacity: 0.5;
  animation: marine-drift 18s linear infinite;
}

/* ============ #misprint — slap the URL hash on, watch the inks slide ============ */
[style*="color: var(--magenta)"],
[style*="color: var(--violet)"],
[style*="color: var(--yellow)"],
[style*="color: var(--lime)"],
[style*="color: var(--plum)"],
[style*="color: var(--indigo)"] { transition: translate 700ms cubic-bezier(.2,.8,.2,1); }
:root:has(#misprint:target) [style*="color: var(--magenta)"] { translate:  6px  2px; }
:root:has(#misprint:target) [style*="color: var(--violet)"]  { translate: -5px  3px; }
:root:has(#misprint:target) [style*="color: var(--yellow)"]  { translate:  3px -4px; }
:root:has(#misprint:target) [style*="color: var(--lime)"]    { translate: -3px -3px; }
:root:has(#misprint:target) [style*="color: var(--plum)"]    { translate:  4px -2px; }
:root:has(#misprint:target) [style*="color: var(--indigo)"]  { translate: -4px  4px; }
:root:has(#misprint:target) .headline::before { translate: 6px 4px; }
:root:has(#misprint:target) .headline::after  { translate: -7px -2px; }

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .top-bar { top: 10px; left: 10px; right: 10px; font-size: 13.5px; letter-spacing: 0.12em; padding-bottom: 10px; }
  .top-bar .left { gap: 10px; padding: 6px 8px; }
  .top-bar .left .mark { width: 14px; height: 14px; box-shadow: 4px 4px 0 var(--violet); }
  .top-bar .left span:nth-child(3),
  .top-bar .left span:nth-child(4) { display: none; }
  .top-bar .right { gap: 18px; padding: 6px 8px 6px 0; }
  .top-bar .right a { padding: 6px 2px; min-height: 36px; display: flex; align-items: center; }

  .issue { top: 16vh; left: 16px; font-size: 13px; padding: 6px 12px; }
  .headline-wrap { top: 22vh; left: 12px; }
  .headline { letter-spacing: -0.05em; font-size: clamp(156px, 48vw, 400px); }
  .headline::before { transform: translate(5px, 4px); }
  .headline::after  { transform: translate(-4px, -3px); }
  .sub { top: 70vh; left: 12px; right: 12px; padding: 18px 20px; font-size: clamp(24px, 6.5vw, 34px); max-width: none; }
  .brushstroke { width: 95vw; height: 180px; left: 0; top: 44vh; }

  /* Badge — lifted on mobile so it doesn't crash into the .sub intro card */
  .badge { width: 84px; height: 84px; font-size: 20px; left: 12px; top: 38vh;
    box-shadow: 0 0 0 4px var(--paper), 0 0 0 5.5px var(--ink), 5px 5px 0 6px var(--ink); }

  .swatch-stack { display: none; }

  .figlet.huge { font-size: 14px; }
  .figlet.medium { font-size: 9px; }
  .figlet.small { font-size: 7px; }
  .ascii-botanical, .ascii-fish, .ascii-gear { font-size: 10px; }
  .ascii-blocks { font-size: 6px; }
  .ascii-contours { font-size: 12px; }
  .ascii-diagram, .ascii-waveform { font-size: 5px; }
  .arrow { width: 180px; left: 30vw; }
  /* Mobile uses .alex.hero so the specificity beats the default rule above */
  .alex.hero { font-size: 14px; right: auto; left: -25vw; top: 360vh; }

  section.real { padding: 100px 16px 160px; min-height: 180vh; }
  .section-label { font-size: 15px; margin-bottom: 14px; letter-spacing: 0.2em; }
  .ascii-divider { font-size: 16px; margin-bottom: 28px; }
  .h2 { font-size: clamp(56px, 16vw, 112px); margin-bottom: 30px; }
  .h2::before { transform: translate(4px, 3px); }
  .h2::after  { transform: translate(-3px, -2px); }
  .legible { padding: 26px 24px; box-shadow: 6px 6px 0 var(--ink); }
  .body-copy { font-size: 28px; line-height: 1.45; }

  /* Projects directory — collapse the grid to a stacked card per entry */
  .projects-dir { font-size: 18px; line-height: 1.5; }
  .projects-dir .prompt-line { margin-bottom: 14px; }
  .projects-dir .row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
    border-bottom: 1px dashed rgba(var(--ink-rgb), 0.18);
  }
  .projects-dir .row > .perm,
  .projects-dir .row > .user,
  .projects-dir .row > .sz,
  .projects-dir .row > .date { display: none; }
  .projects-dir .name { font-size: 22px; }
  .projects-dir .desc { opacity: 0.85; }
  .projects-dir .row.redacted .desc,
  .projects-dir .row.incoming .desc { opacity: 0.55; }

  .postcard { padding: 26px 24px; font-size: 21px; max-width: none; box-shadow: 6px 6px 0 var(--ink); line-height: 1.6; }
  .postcard a { word-break: break-all; }

  /* End the scroll cleanly on mobile — contact is the bottom, no oversized empty tail */
  section.real#contact { min-height: 0; padding-bottom: 80px; }
  main > div[style*="height: 30vh"] { display: none; }
}

@media (max-width: 380px) {
  .top-bar { font-size: 12.5px; letter-spacing: 0.1em; }
  .top-bar .right { gap: 14px; }
  .badge { width: 74px; height: 74px; font-size: 17px; top: 36vh; }
  .headline { font-size: clamp(128px, 44vw, 320px); }
  .body-copy { font-size: 26px; }
  .projects-dir { font-size: 16px; }
  .projects-dir .name { font-size: 20px; }
  .postcard { font-size: 19px; }
}
/* ============ iOS STATIC COLLAGE ============
   The live 114-layer parallax collage OOM-crashes iOS WebKit. On iOS only
   (.ios-static, set by the head script before paint) we hide it and paint a
   STATIC pre-baked tile collage (scripts/bake-collage.mjs). Opaque WebP tiles
   ~1.3 MP (phone) / ~3.7 MP (tablet) each — far under the per-image decode ceiling that broke the earlier
   full-page planes — rendered at their baked aspect via height:auto (no
   stretch) with zero per-frame work (no jank). display:block kills the
   inline-image gaps between stacked tiles. Desktop keeps the live collage. */
/* inset:0 + overflow:hidden CLAMPS the tile stack to the real document
   height: tiles taller than the content (wide phones) are clipped instead of
   adding a dead cream tail; shorter (narrow phones) are filled by the cream
   background. Kills the cross-device coverage gap/overshoot. */
#ios-collage { position: absolute; inset: 0; overflow: hidden; background: var(--paper); z-index: 1; pointer-events: none; }
#ios-collage img { display: block; width: 100%; height: auto; }
html:not(.ios-static) #ios-collage { display: none; }
html.ios-static .lyr:not([data-keep]) { display: none !important; }
/* iOS is static (no parallax), so the kept-live hero layers must SCROLL with
   the page instead of staying position:fixed — otherwise they pin over the
   scrolled content (ghosting). The nav (data-no-scroll) stays fixed/sticky. */
html.ios-static .lyr[data-keep]:not([data-no-scroll]) { position: absolute !important; transform: none !important; }

/* Honour reduced-motion: un-fix the layers — position:absolute MUST pair with
   transform:none, or the fixed layers freeze to the viewport and overlap the
   scrolled content — and stop the pulsing issue dot. */
@media (prefers-reduced-motion: reduce) {
  .lyr:not([data-no-scroll]) { position: absolute !important; transform: none !important; }
  .issue .dot { animation: none !important; }
}
