/* Space Corgi extras: universe labels, black-hole lens cursor, custom cursor, title particles,
   command palette + terminal, corgi flock, Lenis, stacked cases, constellation,
   kinetic titles, recruiter mode and print (see js/site-extras.js, js/site-motion.js). */

:root {
  --tint-a: #8b5cf6;
  --tint-b: #4c1d95;
  --tint-c: #c4a1ff;
  --space-1: #0d0b24;
  --space-2: #05050d;
  --sx-ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

/* Shelved intro (name, bio, portrait). Remove .is-shelved from .hero-pin to restore it. */
.hero-pin.is-shelved,
.hero-pin.is-shelved + .sfx-hero-horizon {
  display: none !important;
}

/* ---------- universe (launched hero) ---------- */

/* The deep-space backdrop follows the visitor's local time (js/space-details.js timeTint). */
.launch-hero .launch-hero__space {
  background:
    radial-gradient(55% 45% at 72% 30%, color-mix(in srgb, var(--tint-a) 34%, transparent), transparent 70%),
    radial-gradient(45% 40% at 18% 78%, color-mix(in srgb, var(--tint-c) 12%, transparent), transparent 70%),
    radial-gradient(40% 35% at 88% 92%, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0) 70%),
    radial-gradient(120% 100% at 50% 50%, var(--space-1) 0%, var(--space-2) 72%);
}

.launch-hero .uni-labels {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.launch-hero .uni-labels.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease;
}

.launch-hero .planet-label {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: 999px;
  background: rgba(10, 8, 24, 0.45);
  color: #f2eeff;
  font: 500 12px/1.2 Inter, system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  will-change: transform, opacity;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.launch-hero .planet-label::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

.launch-hero .planet-label.is-hover,
.launch-hero .planet-label:focus-visible {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 30%, rgba(10, 8, 24, 0.6));
  box-shadow: 0 0 24px color-mix(in srgb, var(--c) 60%, transparent);
}

.launch-hero .bh-fx {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 100%;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
}

.launch-hero .bh-label {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 8;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tint-a) 80%, transparent);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.45);
  color: #fff;
  font: 600 11px Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  scale: 0.7;
  transition: opacity 0.2s ease, scale 0.3s var(--sx-ease);
}

.launch-hero .bh-label.is-on {
  opacity: 1;
  scale: 1;
}

/* Inside the universe the pointer *is* a small black hole (js/launch/bh-lens.js). */
.launch-hero[data-launch-state="completed"].has-bh-cursor,
.launch-hero[data-launch-state="completed"].has-bh-cursor .planet-label {
  cursor: default;
}

.launch-hero[data-launch-state="completed"].is-planet-hover:not(.has-bh-cursor) {
  cursor: pointer;
}

.launch-hero[data-launch-state="completed"].is-grabbing:not(.has-bh-cursor) {
  cursor: grabbing;
}

/* title rendered as particles */
.launch-hero .launch-world__title {
  position: relative;
}

.launch-hero .launch-world__title [data-line] {
  display: inline-block;
}

.launch-hero .title-canvas {
  position: absolute;
  pointer-events: none;
}

.launch-hero .launch-world__title.is-particles [data-line] {
  color: transparent;
}

/* while the hole swallows the world the real letters take over again */
.launch-hero.is-holing .launch-world__title.is-particles [data-line] {
  color: #fff;
}

.launch-hero.is-holing .launch-world__title.is-particles em[data-line] {
  color: var(--violet-soft);
}

.launch-hero.is-holing .title-canvas {
  visibility: hidden;
}

/* children that force `visibility: visible` (the WebGL canvas) must vanish with the swallowed hero */
.launch-hero.is-swallowed,
.launch-hero.is-swallowed * {
  visibility: hidden !important;
}

.launch-hero .launch-world__title:focus-visible {
  outline: none;
}

.launch-hero .sh-w {
  display: inline-block;
  white-space: nowrap;
}

.launch-hero.is-holing .launch-world__controls {
  border-top-color: transparent;
  transition: border-color 0.4s ease;
}

/* ---------- custom cursor disabled: normal cursor restored ---------- */
.cursor-dot,
.cursor-ring,
.cursor-trail {
  display: none !important;
}

html.has-cursor.cursor-in input,
html.has-cursor.cursor-in textarea {
  cursor: text !important;
}

.cursor-dot,
.cursor-ring,
.cursor-trail {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483646;
  pointer-events: none;
}

.cursor-trail {
  width: 100vw;
  height: 100vh;
}

.cursor-dot,
.cursor-ring {
  z-index: 2147483647;
  opacity: 0;
  mix-blend-mode: difference;
  transition: opacity 0.3s ease;
}

html.cursor-in .cursor-dot,
html.cursor-in .cursor-ring {
  opacity: 1;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #fff;
}

.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
}

.cursor-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid #fff;
  border-radius: 50%;
  transition: transform 0.35s var(--sx-ease), background-color 0.3s ease, border-color 0.3s ease;
}

.cursor-ring.is-link::before {
  transform: scale(1.7);
  background: rgba(255, 255, 255, 0.08);
}

.cursor-ring.has-label {
  mix-blend-mode: normal;
}

.cursor-ring.has-label::before {
  transform: scale(2.6);
  border-color: transparent;
  background: var(--tint-a);
  box-shadow: 0 10px 30px rgba(109, 40, 217, 0.45);
}

.cursor-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font: 600 11px Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.35s var(--sx-ease);
}

.cursor-ring.has-label span {
  opacity: 1;
  transform: none;
}

.cursor-ring.is-down::before {
  transform: scale(0.8);
}

html.bh-cursor .cursor-dot,
html.bh-cursor .cursor-ring {
  opacity: 0 !important;
}

/* ---------- command palette + terminal ---------- */

.palette {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: start center;
  padding-top: 14vh;
  font-family: Inter, system-ui, sans-serif;
}

.palette[hidden] {
  display: none;
}

.palette kbd {
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font: 500 11px "JetBrains Mono", ui-monospace, monospace;
  opacity: 0.75;
}

.palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 16, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.palette-box {
  position: relative;
  width: min(640px, 92vw);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(18, 13, 38, 0.94);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px color-mix(in srgb, var(--tint-a) 18%, transparent);
  color: #ece8ff;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.22s var(--sx-ease), opacity 0.18s ease;
}

.palette.is-open .palette-backdrop,
.palette.is-open .palette-box {
  opacity: 1;
}

.palette.is-open .palette-box {
  transform: none;
}

.palette-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.palette-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: inherit;
  font: 500 12px "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
  opacity: 0.6;
  cursor: pointer;
}

.palette-tabs button[aria-selected="true"] {
  border-bottom-color: var(--tint-c);
  opacity: 1;
}

.palette-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.palette-input > span {
  font-size: 18px;
  opacity: 0.5;
}

.palette-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: inherit;
  font: 16px Inter, system-ui, sans-serif;
}

.palette-list {
  max-height: 48vh;
  margin: 0;
  padding: 6px;
  overflow: auto;
  list-style: none;
}

.palette-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.palette-list li[aria-selected="true"] {
  background: color-mix(in srgb, var(--tint-a) 24%, transparent);
}

.palette-list .pi {
  width: 24px;
  font-size: 13px;
  text-align: center;
}

.palette-list .pt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-list .pg {
  font: 11px "JetBrains Mono", ui-monospace, monospace;
  opacity: 0.5;
}

.palette-list .empty {
  justify-content: center;
  opacity: 0.5;
  cursor: default;
}

.palette-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font: 11px "JetBrains Mono", ui-monospace, monospace;
  opacity: 0.55;
}

.palette-foot kbd {
  margin-right: 3px;
}

.palette-pane.term {
  display: flex;
  flex-direction: column;
  height: min(52vh, 420px);
  font: 13px/1.6 "JetBrains Mono", ui-monospace, monospace;
}

.palette-pane.term[hidden] {
  display: none;
}

.term-log {
  flex: 1;
  padding: 14px 16px 4px;
  overflow: auto;
  overflow-wrap: anywhere;
}

.term-log a {
  color: var(--tint-c);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.term-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
}

.term-prompt {
  flex: none;
  color: #86efac;
}

.term-line input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: inherit;
  font: inherit;
  caret-color: var(--tint-c);
}

.t-acc {
  color: var(--tint-c);
}

.t-acc[data-run] {
  cursor: pointer;
}

.t-acc[data-run]:hover {
  text-decoration: underline;
}

.t-cmd {
  display: inline-block;
  min-width: 17ch;
}

.t-dim {
  opacity: 0.55;
}

.t-err {
  color: #fca5a5;
}

.t-ok {
  color: #86efac;
}

/* ---------- easter egg: a flock of rocket corgis ---------- */

.flock-corgi {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9500;
  line-height: 1;
  pointer-events: none;
  will-change: transform;
}

.fc-dog {
  display: inline-block;
  transform: scaleX(-1);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.fc-fire {
  position: absolute;
  right: 85%;
  top: 45%;
  width: 1.1em;
  height: 0.3em;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, #ffb24a, #fff7d6);
  filter: blur(1px);
  animation: sx-flick 0.1s infinite alternate;
}

@keyframes sx-flick {
  to {
    opacity: 0.6;
  }
}

/* ---------- page loader lives in bunq.css (#loader) ---------- */

/* ---------- Lenis ---------- */

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* ---------- stacked case studies ---------- */

#work .is-stack {
  position: sticky;
  transform-origin: 50% 0;
  will-change: scale, filter;
  background-color: rgb(var(--c-surface-container-low));
  box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, 0.45);
}

html.light #work .is-stack {
  box-shadow: 0 -18px 40px -26px rgba(24, 24, 27, 0.25);
}

/* ---------- GitHub heatmap constellation ---------- */

.constel {
  pointer-events: none;
}

.constel-line {
  fill: none;
  stroke: rgb(var(--c-tertiary));
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px rgb(var(--c-tertiary) / 0.7));
}

.constel-star {
  fill: #fff;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.2);
  transition: opacity 0.35s ease, transform 0.45s var(--sx-ease);
  filter: drop-shadow(0 0 3px rgb(var(--c-tertiary)));
}

html.light .constel-star {
  fill: rgb(var(--c-tertiary));
}

.constel-star.is-lit {
  opacity: 1;
  transform: none;
  animation: sx-twinkle 2.6s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * -0.37s);
}

@keyframes sx-twinkle {
  50% {
    opacity: 0.55;
  }
}

.heat-cell.is-star {
  stroke: rgb(var(--c-tertiary) / 0.8);
  stroke-width: 1;
}

/* ---------- kinetic section titles ---------- */

.kin-w {
  display: inline-block;
  will-change: translate, rotate, opacity;
}

/* ---------- header buttons ---------- */

.hdr-kbd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgb(var(--c-hairline));
  border-radius: 4px;
  background: rgb(var(--c-surface-container-low));
  color: rgb(var(--c-on-surface-variant));
  font: 500 11px "JetBrains Mono", ui-monospace, monospace;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hdr-kbd:hover {
  background: rgb(var(--c-surface-container-high));
  color: rgb(var(--c-on-surface));
}

.hdr-kbd[aria-pressed="true"] {
  border-color: rgb(var(--c-primary) / 0.6);
  color: rgb(var(--c-primary));
}

/* ---------- recruiter mode ---------- */

html.recruiter {
  scroll-behavior: auto;
}

html.recruiter [data-sfx],
html.recruiter [data-sfx-stagger] > * {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

html.recruiter *,
html.recruiter *::before,
html.recruiter *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
}

.recruiter-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 16px;
  border: 1px solid rgb(var(--c-hairline));
  border-radius: 999px;
  background: rgb(var(--c-surface) / 0.94);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.45);
  color: rgb(var(--c-on-surface));
  font: 500 12px "JetBrains Mono", ui-monospace, monospace;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.recruiter-bar[hidden] {
  display: none;
}

.recruiter-bar span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recruiter-bar button {
  flex: none;
  padding: 6px 12px;
  border: 1px solid rgb(var(--c-hairline));
  border-radius: 999px;
  background: rgb(var(--c-surface-container-high));
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.recruiter-bar button.is-primary {
  border-color: transparent;
  background: rgb(var(--c-on-surface));
  color: rgb(var(--c-surface));
}

/* ---------- opening frame ---------- */

.gate {
  position: absolute;
  inset: 0;
  z-index: 3;
  height: auto;
  overflow: hidden;
  background: transparent;
  color: #16140f;
}

.gate-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(
    calc(var(--card) * 24%)
    calc(var(--card) * 24%)
    calc(var(--card) * 32%)
    calc(var(--card) * 24%)
  );
  background: color-mix(in srgb, #c8c4ba calc(var(--card) * 100%), transparent);
  transform: translateY(calc(var(--leave) * -76%));
  opacity: calc(1 - var(--album));
}

.gate-lines,
.gate-mark,
.gate-space,
.gate-hint {
  opacity: calc(1 - min(var(--card) * 2.6, 1));
}

.gate-lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.gate-flow {
  position: absolute;
  width: 150%;
  height: 140%;
  left: -25%;
  top: -20%;
}

.gate-blob,
.gate-hair {
  transform-box: fill-box;
  transform-origin: center;
}

.gate-blob {
  fill: #d8d4cb;
}

.gate-blob-a { animation: gate-slide-a 24s ease-in-out infinite alternate; }
.gate-blob-b { animation: gate-slide-b 28s ease-in-out infinite alternate; }
.gate-blob-c { animation: gate-xoet 16s ease-in-out infinite alternate; }
.gate-blob-d { animation: gate-slide-d 22s ease-in-out infinite alternate; }

.gate-hair {
  fill: none;
  stroke: #d5d1c8;
  stroke-width: 1.2;
  stroke-linecap: round;
  animation: gate-hair 30s ease-in-out infinite alternate;
}

@keyframes gate-slide-a {
  from { transform: translate(-6%, -2%); }
  to { transform: translate(12%, 5%); }
}

@keyframes gate-slide-b {
  from { transform: translate(8%, 0); }
  to { transform: translate(-10%, 6%); }
}

@keyframes gate-xoet {
  from { transform: translate(-28%, 4%) rotate(-4deg); }
  to { transform: translate(32%, -3%) rotate(3deg); }
}

@keyframes gate-slide-d {
  from { transform: translate(0, -4%); }
  to { transform: translate(-8%, 8%); }
}

@keyframes gate-hair {
  from { transform: translate(0, 0); }
  to { transform: translate(-3%, 2%); }
}

.gate-streak {
  display: none;
}

.gate-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 46%;
  pointer-events: none;
}

.gate-fx {
  position: absolute;
  z-index: 1;
  display: block;
  touch-action: pan-y;
}

.gate-still {
  z-index: 1;
  object-fit: contain;
  object-position: center 62%;
  padding: calc(var(--header-h, 104px) + 12px) 18vw 4vh;
  box-sizing: border-box;
  pointer-events: none;
}

/* Both layers sit on the same portrait box; the face (51.4% 30%) is zoomed to the frame center. */
.gate-still,
.gate-fx {
  transform-origin: 51.4% 30%;
  transform:
    translate(calc(var(--card) * var(--face-dx, 0px)), calc(var(--card) * var(--face-dy, 0px)))
    scale(calc(1 + var(--card) * (var(--zoom, 1) - 1)));
  filter: grayscale(calc(var(--card) * 0.9)) brightness(calc(1 + var(--card) * 0.12));
}

.gate.is-live .gate-still {
  visibility: hidden;
}

.gate-space {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  top: calc(var(--header-h, 104px) + 18px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #16140f;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1;
  cursor: pointer;
}

.gate-space kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(22, 20, 15, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
}

.gate-space:focus-visible {
  outline: 2px solid #16140f;
  outline-offset: 4px;
}

.gate-mark {
  position: absolute;
  left: clamp(20px, 4vw, 56px);
  top: calc(var(--header-h, 104px) + 18px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: "Bricolage Grotesque", Inter, sans-serif;
  font-size: clamp(2rem, 4.4vw, 4.6rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.045em;
  pointer-events: none;
}

.gate-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 2;
  margin: 0;
  translate: -50% 0;
  color: rgba(22, 20, 15, 0.55);
  font: 500 11px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  pointer-events: none;
}

.gate.is-over .gate-hint {
  opacity: 0;
}

/* Scroll change after the portrait: type behind the photo, signature slash, staircase, album. */

.reel-pin {
  height: 900vh;
  background: #f7f6f2;
}

.reel-pin.is-static {
  height: auto;
}

.reel-sticky {
  --card: 0;
  --hold: 0;
  --leave: 0;
  --steps: 0;
  --album: 0;
  --roll: 0;
  --light: 0;
  --lift: 0;
  --white: 0;
  --sign: 0;
  --settle: 0;
  --quote: 0;
  --mark: 0;
  --ready: 0;
  --exit: 0;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: color-mix(in srgb, #c9cdc2 calc(var(--light) * 100%), color-mix(in srgb, #1c2419 calc(var(--card) * 100%), #f7f6f2));
  color: #f4f1e8;
}

.reel-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: var(--card);
}

.reel-lines path {
  fill: none;
  stroke: color-mix(in srgb, rgba(28, 36, 25, 0.22) calc(var(--light) * 100%), rgba(244, 241, 232, 0.16));
  stroke-width: 1.4;
  opacity: var(--card);
}

.reel-card {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translateY(calc(var(--leave) * -76%));
  opacity: calc(1 - var(--album));
}

.reel-mega {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 1;
  width: max-content;
  margin: 0;
  transform: translate(-50%, calc(-50% - var(--leave) * 76vh));
  opacity: calc((max(0, var(--card) - 0.18) / 0.82) * (1 - min(var(--leave) * 1.35, 1)));
  text-align: center;
  font-family: "Bricolage Grotesque", Inter, sans-serif;
  font-size: clamp(3.2rem, 11.6vw, 11rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: #f4f1e8;
}

.reel-mega span { display: block; white-space: nowrap; }
.reel-mega span:first-child { color: #d6ff4a; }
.reel-mega i { font-style: normal; }

.reel-card figure {
  display: none;
}

.reel-frame {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: color-mix(in srgb, #c8c4ba calc(var(--card) * 100%), transparent);
}

.reel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: grayscale(calc(var(--card) * 0.92)) contrast(calc(1.04 - var(--card) * 0.16)) brightness(calc(1 + var(--card) * 0.32));
}

.reel-sign {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 4;
  width: min(78vw, 980px);
  aspect-ratio: 1244 / 555;
  pointer-events: none;
  background: #d6ff4a;
  transform: translate(-50%, -50%);
  -webkit-mask: url("./img/signature.png?v=5") center / contain no-repeat;
  mask: url("./img/signature.png?v=5") center / contain no-repeat;
  clip-path: inset(0 calc((1 - min(max(var(--card) - 0.42, 0) / 0.58, 1)) * 100%) 0 0);
}

.reel-type {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 10vh 4vw 6vh;
  opacity: var(--leave);
  pointer-events: none;
  transform: translateY(calc(var(--album) * -105%));
}

.reel-type h2 {
  position: relative;
  z-index: 1;
  width: min(14em, 94vw);
  margin: 0;
  font-family: "Bricolage Grotesque", Inter, sans-serif;
  font-size: clamp(2.2rem, 6.6vw, 6.8rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.reel-type h2 span { display: block; }
.reel-type em { color: #d6ff4a; font-style: normal; }

.reel-steps {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 100%;
  height: 78%;
  fill: #d6ff4a;
  opacity: calc(1 - var(--album));
  transform: translateY(calc((1 - var(--steps) * 2.35) * 100%));
}

.reel-album {
  position: absolute;
  inset: 0;
  z-index: 4;
  color: color-mix(in srgb, #1c2419 calc(var(--light) * 100%), #f4f1e8);
  opacity: var(--album);
  pointer-events: none;
}

.reel-track {
  --roll-x: -38vw;
  position: absolute;
  inset: 0;
  transform: translateX(calc(var(--roll) * var(--roll-x)));
}

.reel-album figure,
.reel-album blockquote {
  position: absolute;
  margin: 0;
}

.reel-album figure {
  display: flex;
  flex-direction: column;
  transform: translateY(calc((1 - var(--album)) * 24vh));
}

.reel-album .a1 { left: 5vw; top: 14%; width: 17vw; }
.reel-album .a2 { left: 72vw; top: 5%; width: 16vw; }
.reel-album .a3 { left: 28vw; top: 40%; width: 34vw; }
.reel-album .a4 { left: 90vw; top: 46%; width: 32vw; }
.reel-album .a5 { left: 1vw; top: 62%; width: 17vw; }

.reel-album img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #9a9c94;
}

.reel-album .a3 img { aspect-ratio: 5 / 4; }
.reel-album .a2 img { filter: grayscale(0.85); }

.reel-album figcaption {
  order: -1;
  margin: 0 0 6px;
  color: color-mix(in srgb, rgba(28, 36, 25, 0.55) calc(var(--light) * 100%), rgba(244, 241, 232, 0.7));
  font: 500 10px/1.3 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.reel-album .a2 figcaption::after,
.reel-album .a3 figcaption::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 3px;
  margin-left: 8px;
  background: #d6ff4a;
  vertical-align: middle;
}

.reel-album blockquote {
  left: 40vw;
  top: 7%;
  width: min(340px, 26vw);
  transform: translate(calc(var(--roll) * -6vw), calc((1 - var(--album)) * 14vh - var(--light) * 48vh));
}

.reel-album p {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.7rem, 2.5vw, 2.6rem);
  font-style: italic;
  line-height: 1.12;
}

.reel-album mark {
  background: #d6ff4a;
  color: #1c2419;
}

.reel-autograph {
  display: block;
  width: 156px;
  height: 70px;
  margin-top: 14px;
  background: #d6ff4a;
  -webkit-mask: url("./img/signature.png?v=5") center / contain no-repeat;
  mask: url("./img/signature.png?v=5") center / contain no-repeat;
}

.reel-album path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.reel-pin.is-static .reel-sticky { --light: 1; --album: 1; --roll: 0.35; position: relative; height: auto; min-height: 100svh; }
.reel-pin.is-static .reel-card,
.reel-pin.is-static .reel-type { display: none; }
.reel-pin.is-static .reel-album { position: relative; opacity: 1; min-height: 100svh; }

@media (max-width: 760px) {
  .reel-mega { font-size: 16vw; }
  .reel-track { --roll-x: -150vw; }
  .reel-album .a2,
  .reel-album .a5 { display: none; }
  .reel-album blockquote {
    left: 6vw;
    top: 8%;
    width: 86vw;
    transform: translate(calc(var(--roll) * -1 * var(--roll-x)), calc((1 - var(--album)) * 10vh));
  }
  .reel-album .a3 { left: 6vw; top: 36%; width: 74vw; }
  .reel-album .a1 { left: 88vw; top: 40%; width: 52vw; }
  .reel-album .a4 { left: 150vw; top: 38%; width: 68vw; }
  .reel-album p { font-size: 1.65rem; }
}

@media (max-width: 720px) {
  .gate-mark {
    font-size: 1.7rem;
  }

  .gate-still {
    padding-inline: 8vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.effects-on) .gate-lines,
  html:not(.effects-on) .gate-lines * { animation: none; }
  html:not(.effects-on) .gate-fx { display: none; }
  html:not(.effects-on) .gate.is-live .gate-still { visibility: visible; }
}

/* ---------- chapter rail + landing plate ---------- */

main section[id]:not(#hero) {
  scroll-margin-top: calc(var(--header-h, 104px) + 8px);
}

.chapters {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 40;
  transform: translateY(-50%);
  color: rgb(var(--c-on-surface));
}

.chapters.is-space {
  color: #ebe7ff;
}

.chapters ol {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapters ol::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 3px;
  bottom: 4px;
  width: 1px;
  background: currentColor;
  opacity: 0.28;
}

.chapters button {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: 500 10px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.chapters button i {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgb(var(--c-background, 19 19 21));
  box-shadow: 0 0 0 4px transparent;
}

.chapters.is-space button i {
  background: #07060f;
}

.chapters button.is-on i {
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
}

.chapters button.is-hole i {
  background: transparent;
  box-shadow: inset 0 0 0 2px currentColor;
}

.chapters button.is-hole.is-on i {
  background: #07060f;
  box-shadow: inset 0 0 0 2px currentColor, 0 0 10px currentColor;
}

.chapters button span {
  position: absolute;
  right: 22px;
  top: 50%;
  opacity: 0;
  translate: 6px -50%;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.25s ease, translate 0.35s var(--sx-ease);
}

.chapters:hover button span,
.chapters button:focus-visible span,
.chapters button.is-on span {
  opacity: 0.92;
  translate: 0 -50%;
}

.chapters button.is-on span {
  opacity: 1;
}

.chapters.is-work {
  transition: opacity 0.35s ease;
}

.chapters.is-work:not(:hover):not(:focus-within) {
  opacity: 0.22;
}

.chapters.is-work:not(:hover):not(:focus-within) button span {
  opacity: 0;
  translate: 6px -50%;
}

.dock {
  position: fixed;
  left: clamp(20px, 6vw, 80px);
  top: calc(var(--header-h, 104px) + 36px);
  z-index: 45;
  width: min(440px, calc(100vw - 108px));
  padding: 22px 24px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(10, 8, 24, 0.78);
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.65), 0 0 0 1px color-mix(in srgb, var(--tint-a) 22%, transparent);
  color: #f4f1ff;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transform: perspective(900px) rotateY(-18deg) rotateX(7deg) translateY(16px);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.7s var(--sx-ease), opacity 0.45s ease;
}

.dock[hidden] {
  display: none;
}

.dock.is-in {
  opacity: 1;
  transform: perspective(900px) rotateY(-16deg) rotateX(6deg);
}

.dock.is-flat,
.dock.is-in.is-flat {
  transform: none;
  opacity: 0;
}

.dock-kicker {
  margin: 0;
  color: var(--tint-c);
  font: 500 11px/1.4 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dock-title {
  margin: 10px 0 0;
  font-family: "Bricolage Grotesque", Inter, sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.dock-lede {
  display: -webkit-box;
  margin: 12px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: rgba(244, 241, 255, 0.72);
  font: 400 15px/1.5 Inter, system-ui, sans-serif;
}

@media (max-width: 720px) {
  /* In orbit the world links already are the chapters. On the page, dots sit in a pill. */
  .chapters.is-space {
    display: none;
  }

  .chapters {
    top: auto;
    bottom: 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .chapters ol {
    flex-direction: row;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid rgb(var(--c-hairline));
    border-radius: 999px;
    background: rgb(var(--c-surface) / 0.92);
  }

  .chapters.is-space ol {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(7, 6, 15, 0.62);
  }

  .chapters ol::before {
    display: none;
  }

  .chapters button span {
    display: none;
  }

  .dock {
    top: auto;
    bottom: 18px;
    left: 16px;
    width: min(440px, calc(100vw - 48px));
    transform: perspective(700px) rotateX(10deg) translateY(12px);
  }

  .dock.is-in {
    transform: perspective(700px) rotateX(8deg);
  }

  .chapters.is-work,
  .chapters.is-work:not(:hover):not(:focus-within) {
    opacity: 1;
    top: calc(var(--header-h, 84px) + 10px);
    bottom: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock,
  .dock.is-in {
    transform: none;
    transition: opacity 0.2s linear;
  }
}

/* ---------- album -> projects: the room slides over the pinned album ---------- */

html.reel-stack .reel-pin {
  height: 1000vh;
  background: #ebe5d8;
}

html.reel-stack .reel-pin .reel-sticky {
  --exit: 0;
  transform-origin: 50% 18%;
  transform: translateY(calc(var(--exit) * -7vh)) scale(calc(1 - var(--exit) * 0.035));
  border-radius: calc(var(--exit) * 24px);
}

html.reel-stack .reel-pin .reel-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 9;
  background: linear-gradient(180deg, rgba(22, 20, 17, 0.08) 0%, rgba(22, 20, 17, 0.26) 100%);
  opacity: var(--exit);
  pointer-events: none;
}

html.reel-stack #projects {
  --enter: 0;
  z-index: 6;
  margin-top: -100vh;
  border-radius: calc((1 - var(--enter)) * 40px) calc((1 - var(--enter)) * 40px) 0 0;
  box-shadow: 0 -36px 84px rgb(14 13 11 / calc((1 - var(--enter)) * 0.36));
}

html.reel-stack #projects .project-fan {
  translate: 0 calc((1 - var(--enter)) * 18vh);
}

html.reel-stack #projects .project-stage__foot {
  translate: 0 calc((1 - var(--enter)) * 10vh);
  opacity: var(--enter);
}

html.reel-stack #projects .ph-work__pin {
  translate: 0 calc((1 - var(--enter)) * 8vh);
}

/* ---------- paper sheet: draw an H, then the signature, quote and film ---------- */

.reel-legacy.is-shelved {
  display: none !important;
}

.reel-pin.is-legacy .reel-sheet {
  display: none;
}

.reel-pin:not(.is-legacy) {
  height: 540vh;
}

html.reel-stack .reel-pin:not(.is-legacy) {
  height: 640vh;
}

.reel-pin:not(.is-legacy) .gate {
  transform: translateY(calc(var(--lift, 0) * -110%));
}

.reel-pin.is-sheet .gate {
  pointer-events: none;
}

.reel-sheet {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  background:
    radial-gradient(80% 62% at 50% 44%, rgba(255, 250, 242, 0.72), rgba(255, 250, 242, 0) 70%),
    color-mix(in srgb, #fbf6ee calc(var(--white) * 100%), #f3ede2);
  color: #1c2419;
}

.reel-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: calc(0.4 * (1 - var(--white)));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .14 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.sheet-draw {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: calc(var(--lift) * (1 - var(--white)));
  pointer-events: none;
}

.sheet-name {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 2;
  width: max-content;
  max-width: 96vw;
  margin: 0;
  transform: translate(-50%, -50%);
  font-family: "Bricolage Grotesque", Inter, sans-serif;
  font-size: clamp(1.7rem, 5.4vw, 5.2rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.06em;
  text-align: center;
  white-space: nowrap;
}

.sheet-gap {
  position: relative;
  display: inline-block;
  box-shadow: inset 0 -0.06em 0 rgba(28, 36, 25, 0.28);
}

.sheet-gap i {
  font-style: normal;
  opacity: 0;
}

.sheet-ghost,
.sheet-stamp {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sheet-ghost {
  opacity: 0;
}

.reel-sheet.is-ghost .sheet-ghost {
  opacity: 1;
}

.sheet-ghost path {
  fill: none;
  stroke: rgba(28, 36, 25, 0.28);
  stroke-width: 4;
  stroke-linecap: round;
}

.reel-sheet.is-done .sheet-gap {
  box-shadow: none;
}

.reel-sheet.is-done .sheet-stamp {
  animation: sheet-stamp-pop 420ms cubic-bezier(0.22, 1.35, 0.36, 1) both;
}

@keyframes sheet-stamp-pop {
  0% {
    transform: scale(1.24);
    opacity: 0.45;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.sheet-hint {
  position: absolute;
  left: 50%;
  bottom: 14vh;
  z-index: 5;
  margin: 0;
  transform: translateX(-50%);
  color: rgba(28, 36, 25, 0.82);
  font: 600 clamp(20px, 2.3vw, 30px)/1.2 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sheet-ink,
.sheet-pen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sheet-ink {
  z-index: 3;
  pointer-events: none;
}

.sheet-pen {
  z-index: 4;
  background: transparent;
}

.reel-sheet.is-live .sheet-pen,
.reel-sheet.is-live .sheet-skip {
  pointer-events: auto;
}

.reel-sheet.is-live {
  cursor: default;
}

.sheet-skip {
  position: absolute;
  left: 22px;
  bottom: 18px;
  z-index: 6;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: rgba(28, 36, 25, 0.55);
  font: 500 11px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.sheet-sign {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 8vh 6vw;
  pointer-events: none;
  opacity: calc(min(var(--sign) * 14, 1) * (1 - min(var(--roll) * 7.2, 1)));
  transform: translateY(calc((1 - var(--settle)) * -4vh + var(--roll) * -68vh)) scale(calc(1.22 - var(--settle) * 0.32 - var(--roll) * 0.16));
}

.sheet-quote {
  margin: 0;
  max-width: 16em;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.8rem, 3.4vw, 3.4rem);
  font-style: italic;
  line-height: 1.14;
  text-align: center;
  opacity: var(--quote);
  transform: translateY(calc((1 - var(--quote)) * 14px));
}

.sheet-quote mark {
  padding: 0 0.14em;
  border-radius: 3px;
  background: linear-gradient(90deg, #d6ff4a, #d6ff4a) no-repeat 0 84% / calc(var(--mark, 1) * 100%) 86%;
  color: #1c2419;
}

.sheet-autograph {
  width: min(520px, 72vw);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(28, 36, 25, 0.06));
}

.sheet-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 4.5vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%) translateY(calc((1 - var(--ready, 0)) * 10px));
  opacity: calc(var(--ready, 0) * (1 - min(var(--roll, 0) * 18, 1)));
  color: rgba(28, 36, 25, 0.56);
  font: 500 10px/1.2 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sheet-scroll-cue i {
  display: block;
  width: 1px;
  height: 24px;
  background: linear-gradient(to bottom, rgba(28, 36, 25, 0.55), rgba(28, 36, 25, 0));
  animation: sheet-cue-pulse 1.8s ease-in-out infinite;
}

@keyframes sheet-cue-pulse {
  0%, 100% {
    transform: scaleY(0.75);
    opacity: 0.5;
  }
  50% {
    transform: scaleY(1.1);
    opacity: 1;
  }
}

.sheet-film {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--quote);
}

.sheet-frame {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(46vh, 30vw);
  margin: 0;
  padding: 10px 10px 14px;
  border-radius: 3px;
  background: #fffcf6;
  box-shadow:
    0 22px 48px -16px rgba(24, 22, 18, 0.22),
    0 2px 6px rgba(24, 22, 18, 0.08),
    inset 0 0 0 1px rgba(28, 36, 25, 0.08);
  transform:
    translate(-50%, -50%)
    translateX(calc((var(--i) + 1.38 - var(--roll) * 5.46) * 58vw))
    translateY(calc(sin((var(--i) + 1) * 1.3) * 1.4vh))
    rotate(calc((var(--i) - 2) * 1.15deg));
}

.sheet-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #c8c4ba;
}

.sheet-frame figcaption {
  margin-top: 10px;
  color: rgba(28, 36, 25, 0.72);
  font: 500 10px/1.3 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

html.sheet-inking .cursor-dot,
html.sheet-inking .cursor-ring,
html.sheet-inking .cursor-trail {
  opacity: 0 !important;
}

.reel-pin.is-static .gate {
  position: relative;
  height: 100svh;
  transform: none;
}

.reel-pin.is-static .reel-sheet {
  position: relative;
  height: auto;
  overflow: visible;
}

.reel-pin.is-static .sheet-draw {
  display: none;
}

.reel-pin.is-static .sheet-sign {
  position: relative;
  min-height: 70vh;
  opacity: 1;
  transform: none;
}

.reel-pin.is-static .sheet-quote {
  opacity: 1;
}

.reel-pin.is-static .sheet-film {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  height: auto;
  padding: 2vh 0 12vh;
}

.reel-pin.is-static .sheet-frame {
  position: relative;
  left: auto;
  top: auto;
  width: min(460px, 86vw);
  transform: none;
}

@media (max-width: 760px) {
  .sheet-name {
    font-size: 11vw;
    white-space: normal;
    width: 92vw;
  }

  .sheet-frame {
    width: 68vw;
  }
}

/* ---------- print / PDF ---------- */

@media print {
  @page {
    margin: 14mm 12mm;
  }

  html,
  body {
    background: #fff !important;
    color: #18181b !important;
  }

  body > header,
  .recruiter-bar,
  .gate-fx,
  .gate-lines,
  .gate-hint,
  .chapters,
  .dock,
  .palette,
  .flock-corgi,
  #loader,
  .cursor-dot,
  .cursor-ring,
  .cursor-trail,
  .sfx-stars,
  .sfx-corgi,
  .sfx-track,
  .sfx-trail,
  .sfx-cpath,
  .sfx-finale-slot,
  .sfx-btn,
  .sfx-hero-horizon,
  .launch-hero__canvas,
  .launch-hero__flash,
  .launch-skip,
  .corgi-bubble,
  .uni-labels,
  .bh-fx,
  .bh-label,
  .sh-void,
  .sh-flash,
  .sh-hole,
  .sh-ring,
  #heatmap-tooltip,
  .animate-marquee {
    display: none !important;
  }

  .gate.is-live .gate-still {
    visibility: visible !important;
  }

  html.reel-stack #projects {
    margin-top: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html.sh-pin .hero-pin,
  .hero-pin {
    height: auto !important;
  }

  .hero-pin > .launch-hero {
    position: relative !important;
    top: 0 !important;
  }

  .hero-pin + * {
    margin-top: 0 !important;
  }

  #work .is-stack {
    position: static !important;
    scale: none !important;
    filter: none !important;
    box-shadow: none !important;
  }

  .kin-w {
    translate: none !important;
    rotate: none !important;
    opacity: 1 !important;
  }

  [data-sfx],
  [data-sfx-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  main section {
    break-inside: auto;
  }

  main section h2,
  main section h3 {
    break-after: avoid;
  }

  #projects .deck-card,
  #projects .project-fan,
  #projects .project-stage__floor,
  #experiments article {
    break-inside: avoid;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    word-break: break-all;
  }

  #projects .deck-repo::after,
  .hero-portrait a::after {
    content: "";
  }

  .project-stage__floor,
  .project-fan,
  .deck-panel__close,
  .project-stage__hint {
    display: none !important;
  }

  .deck-sheets {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
  }
}

/* ---------- quote page facing the name, then the black hole ---------- */

.verse {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: #f4f3ee;
  color: #16140f;
}

.verse-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.verse-lines svg {
  width: 100%;
  height: 100%;
}

.verse-lines path {
  fill: none;
  stroke: #d4cfc6;
  stroke-width: 1.2;
}

.verse-shot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  margin: 0;
}

.verse-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.verse-shot figcaption {
  margin-top: 6px;
  color: rgba(22, 20, 15, 0.5);
  font: 500 10px/1.3 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.verse-quote {
  position: absolute;
  top: 34%;
  right: 7%;
  width: min(280px, 28vw);
  margin: 0;
}

.verse-quote p {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.7rem, 2.5vw, 2.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.verse-quote mark,
.orbit-quote mark {
  background: #d6f25a;
  color: inherit;
}

.verse-sign {
  display: block;
  width: 180px;
  height: auto;
  margin-top: 14px;
  color: #16140f;
}

.verse-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  margin: 0;
  translate: -50% 0;
  color: rgba(22, 20, 15, 0.55);
  font: 500 11px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.verse-hint kbd {
  padding: 3px 6px;
  border: 1px solid rgba(22, 20, 15, 0.25);
  border-radius: 4px;
  font: inherit;
}

#space-fx .space-flash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--hx, 50%) var(--hy, 50%), #fff 0, rgb(238 226 255 / 0.9) 22%, rgb(150 110 240 / 0.5) 65%, rgb(70 35 170 / 0.3) 100%);
}

#space-fx .space-ring {
  position: absolute;
  left: var(--hx, 50%);
  top: var(--hy, 50%);
  z-index: 2;
  width: 0;
  height: 0;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  box-shadow:
    0 0 0 2px rgb(236 224 255 / 0.95),
    0 0 26px 6px rgb(167 139 250 / 0.6),
    inset 0 0 26px 6px rgb(167 139 250 / 0.35);
}

#draw-zero.is-leaving {
  opacity: 0;
  transition: opacity 0.34s ease;
  pointer-events: none;
}

/* The page stays laid out under #orbit, so closing it lands where you were. */
html.is-orbit body > header,
html.is-orbit #top,
html.is-orbit .chapters,
html.is-orbit .dock {
  visibility: hidden;
}

#orbit:focus {
  outline: none;
}

html.corgi-paused [data-launch-trigger],
html.corgi-paused .launch-skip,
html.corgi-paused .corgi-bubble,
html.corgi-paused [data-corgi-action],
html.corgi-paused [data-launch-return],
html.corgi-paused .world-controls__label {
  display: none !important;
}

@media (max-width: 720px) {
  .verse {
    min-height: auto;
    padding: calc(var(--header-h, 104px) + 28px) 18px 72px;
  }

  .verse-shot {
    position: relative;
    left: auto;
    top: auto;
    display: inline-block;
    width: 46%;
    margin: 0 2% 18px;
    vertical-align: top;
  }

  .verse-quote {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    margin: 12px 0 28px;
  }
}