/* Billboard, white (Nyk's pick, Nov 19 2026). Four pages share this file.
   White page, one black ink, one red accent. The name fills the width and the brain
   is its "o". Pages run up the left edge, links down the right. Rows turn black
   under the robot. */

:root { --y: #ffffff; --k: #141414; --r: #d22a0b; --rail: 58px; --pad: 40px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body, body * { cursor: var(--robot-cursor), auto !important; }
a, button { cursor: var(--robot-cursor), pointer !important; }
/* brain cursor with ?beside=1: the ordinary arrow and hand come back, and the brain rides beside them */
html.brain-beside, html.brain-beside body, html.brain-beside body * { cursor: auto !important; }
html.brain-beside a, html.brain-beside a *, html.brain-beside button { cursor: pointer !important; }
img { max-width: 100%; }

body {
  margin: 0;
  background: var(--y);
  color: var(--k);
  font-family: "Recursive", -apple-system, sans-serif;
  font-variation-settings: "MONO" 0, "CASL" 0.25;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --sparks: #d22a0b, #141414;
}
a { color: inherit; }
.px { font-family: "Silkscreen", monospace; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- edge rails ---------- */
.rail {
  position: fixed; top: 0; bottom: 0; z-index: 20;
  width: var(--rail);
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  padding: 22px 0;
  background: var(--y);
}
.rail-l { left: 0; border-right: 3px solid var(--k); flex-direction: column-reverse; justify-content: flex-end; }
.rail-r { right: 0; border-left: 3px solid var(--k); justify-content: center; font-size: 1.15rem; }
.rail-l a {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: "Silkscreen", monospace; font-size: 16px; letter-spacing: 2px; text-transform: uppercase; text-decoration: none;
  padding: 6px 4px;
}
.rail-l a[aria-current], .rail-l a:hover { background: var(--k); color: var(--y); }
.rail-l .mark { margin-top: auto; letter-spacing: 6px; color: var(--r); }
.rail-l .mark:hover { background: none; color: var(--k); }
.rail-r a { display: inline-flex; padding: 6px; text-decoration: none; }
.rail-r a:hover { background: var(--k); color: var(--y); }
.bsky {
  display: inline-block; width: 1em; height: 1em; background: currentColor;
  -webkit-mask: url("images/bluesky.svg") center / contain no-repeat;
  mask: url("images/bluesky.svg") center / contain no-repeat;
}

main, .foot { margin: 0 var(--rail); }

/* ---------- the giant line: the name at home, the page title elsewhere ---------- */
.hero { padding: 6px var(--pad) 0; overflow: hidden; }
.name-row { position: relative; }
.name-row h1 {
  margin: 0;
  font-family: "Recursive", sans-serif;
  font-variation-settings: "CASL" 0, "wght" 500, "slnt" 0;   /* held still (Nyk, Nov 19) */
  font-weight: 500;
  font-size: 18vw;            /* at home site.js sets the exact size to fill the row */
  line-height: 0.86;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: var(--k);
  padding-bottom: 0.04em;
}
.title h1 { font-size: clamp(4.6rem, 15vw, 15rem); padding: 0.06em 0 0.1em; }
.name-char { display: inline-block; transition: opacity 120ms ease; }
.name-char.is-masked { opacity: 0; }
.name-char[data-noink] { visibility: hidden; }
.stack .name-gap { display: block; height: 0; overflow: hidden; }
.sand-canvas { position: absolute; pointer-events: none; z-index: 3; }

.brain-orb {
  --brain-tilt-x: 0deg;
  --brain-tilt-y: 0deg;
  position: absolute; left: 50%; top: 50%; width: 12vw; aspect-ratio: 1; z-index: 4;
  transform: translate(-50%, -50%) perspective(820px) rotateX(var(--brain-tilt-x)) rotateY(var(--brain-tilt-y));
  transition: transform 240ms ease-out, opacity 200ms ease-out;
  opacity: 0; pointer-events: none;      /* shown by site.js once the model has loaded */
}
.brain-orb.ready { opacity: 1; pointer-events: auto; }
.brain-orb model-viewer {
  display: block; width: 100%; height: 100%;
  --poster-color: transparent; --progress-bar-height: 0px;
  background: transparent; pointer-events: none;
  animation: brain-float 7.4s ease-in-out infinite;
}
.brain-orb model-viewer::part(default-progress-bar) { display: none; }
@keyframes brain-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.brain-tooltip {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%);
  background: var(--k); color: var(--y);
  font-family: "Silkscreen", monospace; font-size: 16px; line-height: 1; letter-spacing: 1px; white-space: nowrap;
  padding: 8px 10px;
  opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0.15s; pointer-events: none;
}
.brain-orb:hover .brain-tooltip { opacity: 1; visibility: visible; }

/* ---------- current focus bar: the line sits still, once, between two red squares ---------- */
.ticker { display: flex; align-items: stretch; background: var(--k); color: var(--y); border-top: 3px solid var(--k); border-bottom: 3px solid var(--k); font-family: "Silkscreen", monospace; font-size: 16px; line-height: 1; letter-spacing: 1px; text-transform: uppercase; }
.ticker b { flex: 0 0 auto; display: flex; align-items: center; font-weight: 400; background: var(--y); color: var(--k); padding: 13px 16px 14px var(--pad); }
.ticker p { flex: 1 1 auto; min-width: 0; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 13px var(--pad) 14px 30px; line-height: 1.5; text-align: center; }
.ticker p::before, .ticker p::after { content: "\25A0"; flex: 0 0 auto; color: var(--r); line-height: 1; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 32%); gap: 48px; padding: 54px 0 0 var(--pad); align-items: end; }
.bio { padding-bottom: 64px; }
.bio p { margin: 0 0 1em; max-width: 44em; font-size: 1.14rem; }
.bio p:first-child { font-size: clamp(1.5rem, 2.5vw, 2.15rem); line-height: 1.24; font-weight: 650; letter-spacing: -0.01em; max-width: 24em; margin-bottom: 0.9em; }
.bio p:last-child { margin-bottom: 0; }
.face { align-self: stretch; display: flex; align-items: flex-end; }
.face img { display: block; width: 100%; height: auto; }

/* typing: the words are in place from the start (invisible), so the page never jumps */
.js-typing .type-reveal, .js-typing .type-after { visibility: hidden; }
.js-typing .type-reveal.typed, .js-typing .type-after.typed { visibility: visible; }
.t-off { visibility: hidden; }
/* the paragraphs after the typed line: a pink glint sweeps across and leaves the words behind it */
.type-after.shimmer {
  color: transparent; -webkit-text-fill-color: transparent;
  background-image: linear-gradient(100deg, var(--k) 0%, var(--k) 40%, #e78fbf 47%, rgba(231, 143, 191, 0) 54%, rgba(231, 143, 191, 0) 100%);
  background-size: 300% 100%; background-repeat: no-repeat; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  animation: shimmer-in 1.5s cubic-bezier(0.3, 0.1, 0.2, 1) both, rise-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes shimmer-in { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes rise-in { from { transform: translateY(8px); } to { transform: none; } }
.typing .t-on::after {
  content: ""; position: absolute; width: 0.09em; height: 1.02em; margin: 0.2em 0 0 0.06em;
  background: var(--r); animation: caret-blink 0.9s steps(1, end) infinite;
}
@keyframes caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---------- ledger rows ---------- */
.ledger { position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr); border-top: 4px solid var(--k); }
.ledger h2 { margin: 0; padding: 22px 16px 0 var(--pad); font-family: "Silkscreen", monospace; font-weight: 700; font-size: 16px; line-height: 1.5; letter-spacing: 1px; text-transform: uppercase; }
.ledger .side { padding: 22px 16px 22px var(--pad); }
.item { position: relative; padding: 20px var(--pad) 22px 22px; border-left: 3px solid var(--k); }
.item + .item { border-top: 3px solid var(--k); }
.item p { margin: 0; }
.item:hover, .item:focus-within { background: var(--k); color: var(--y); }
.go { display: inline-block; margin-top: 10px; font-family: "Silkscreen", monospace; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; text-decoration: none; }
.go::after { content: " \2192"; }
.item .go::before { content: ""; position: absolute; inset: 0; }   /* the whole row is the link */
a.go:hover { background: var(--k); color: var(--y); }
.item a.go:hover { background: none; }

.pub .who { font-size: 0.98rem; }
.pub .what { font-size: clamp(1.35rem, 2.3vw, 2rem); line-height: 1.16; font-weight: 750; letter-spacing: -0.015em; max-width: 26em; margin: 4px 0 6px; }
.pub .where { font-size: 0.98rem; }

.poster .items { border-left: 3px solid var(--k); }
.poster .item { border-left: 0; padding-right: 400px; min-height: 380px; }
.poster .what { font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.22; font-weight: 700; max-width: 20em; }
.poster .past { position: relative; margin: 0; padding: 14px var(--pad) 16px 22px; border-top: 3px solid var(--k); }
.poster .past:hover { background: var(--k); color: var(--y); }
.poster .past .go { margin-top: 0; }
.poster .past .go::before { content: ""; position: absolute; inset: 0; }
.poster .past a.go:hover { background: none; }
/* the poster sheet leans out of its row, over the rule above; it opens the PDF too */
.sheet { position: absolute; right: calc(var(--pad) + 30px); top: -30px; width: 272px; z-index: 5; transform: rotate(4deg); transition: transform 0.18s ease-out; }
.sheet:hover { transform: rotate(1.5deg) scale(1.03); }
.sheet img { display: block; width: 100%; height: auto; border: 4px solid var(--k); background: #fff; }
.sheet.wide { width: 400px; top: 34px; }
.poster.land .item { padding-right: 500px; min-height: 380px; }
.poster.solo .item { min-height: 416px; }   /* no "past posters" line under it, so the row itself holds the sheet */

.proj { display: grid; grid-template-columns: 36% minmax(0, 1fr) 210px; gap: 28px; align-items: baseline; }
.proj h3 { margin: 0; font-size: clamp(1.35rem, 2.3vw, 2rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.015em; }
.proj p { font-size: 1rem; }
.proj .go { margin-top: 0; white-space: nowrap; justify-self: end; }

/* CV and resume: the pages themselves, with the PDF one click away */
.doc { padding: 34px var(--pad) 56px 22px; border-left: 3px solid var(--k); display: grid; gap: 30px; justify-items: start; }
.doc a { display: block; max-width: 900px; }
.doc img { display: block; width: 100%; height: auto; border: 3px solid var(--k); }

.foot { border-top: 4px solid var(--k); padding: 22px var(--pad) 40px; font-family: "Silkscreen", monospace; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; }

/* read by screen readers, not shown */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.spark-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ---------- small screens: rails become a bar ---------- */
@media (max-width: 820px) {
  :root { --rail: 0px; --pad: 20px; }
  .rail { position: static; width: auto; flex-direction: row; flex-wrap: wrap; padding: 10px 20px; gap: 8px 14px; border: 0; border-bottom: 3px solid var(--k); }
  .rail-l { flex-direction: row; justify-content: flex-start; }
  .rail-l a { writing-mode: horizontal-tb; transform: none; }
  .rail-l .mark { margin: 0 6px 0 0; order: -1; }
  .rail-r { justify-content: flex-start; gap: 6px; }
  .ticker { flex-direction: column; }
  .ticker b { padding-right: var(--pad); }
  .ticker p { padding-left: var(--pad); gap: 16px; text-align: left; align-items: flex-start; }
  .ticker p::before { line-height: inherit; }
  .ticker p::after { display: none; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 36px; }
  .bio { padding-right: var(--pad); padding-bottom: 28px; }
  .face { max-width: 320px; }
  .ledger { grid-template-columns: minmax(0, 1fr); }
  .ledger h2 { padding-bottom: 14px; }
  .ledger .side { padding-top: 16px; padding-bottom: 16px; }
  .item, .poster .items, .doc { border-left: 0; }
  .item { padding-left: var(--pad); border-top: 3px solid var(--k); }
  .poster .item, .poster.land .item, .poster.solo .item { padding-right: var(--pad); min-height: 0; }
  .sheet, .sheet.wide { position: static; display: block; width: 200px; margin: 6px 0 26px var(--pad); transform: rotate(3deg); }
  .sheet.wide { width: 260px; }
  .proj { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .proj .go { justify-self: start; }
  .doc { padding-left: var(--pad); }
}

@media (prefers-reduced-motion: reduce) {
  .brain-orb model-viewer { animation: none; }
}
