/* Aryan Kalra: the pinned poster, second cut.
   The name holds still; the sides of him pass beneath it and lend it their colour.
   Further down, one picture holds on the left while each side is read on the right,
   and every new picture arrives behind a wipe of that side's colour.
   Brand colours kept: gold, Scholar blue, Creator red on near-black. */

:root {
  --ground: #0a0a0f;
  --surface: #14141d;
  --ink: #f0f0f5;
  --soft: #a9a9be;
  --on-field: #0a0a0f;
  --on-field-soft: rgb(10 10 15 / 0.72);
  --paper: #f0f0f5;

  --scholar: #5b8cff;
  --founder: #f5c542;
  --creator: #ff3860;

  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --text: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
  --mark: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 0.8rem + 1.4vw, 2rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-display: clamp(3.5rem, 12.4vw, 16rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --pad: clamp(1.5rem, 4.4vw, 4.5rem);
  --gap-section: clamp(5rem, 11vw, 11rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
strong { font-weight: 600; }
figure { margin: 0; }
::selection { background: var(--founder); color: var(--on-field); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- links and buttons ---------- */
.link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--t-hover) ease;
}
.link--under { text-decoration-color: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
  .link--under:hover { text-decoration-thickness: 0.14em; }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.5rem;
  background: var(--founder);
  color: var(--on-field);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button--small { min-height: 40px; padding: 0 1rem; font-size: var(--step-small); }
.button--ink { background: var(--on-field); color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--paper); color: var(--on-field); }
  .button--ink:hover { background: var(--paper); color: var(--on-field); }
}

/* ---------- hero ---------- */
.hero { position: relative; height: 230svh; --name: var(--ink); --k: 0; }
.hero[data-frame="1"] { --name: var(--scholar); --k: 1; }
.hero[data-frame="2"] { --name: var(--founder); --k: 2; }
.hero[data-frame="3"] { --name: var(--creator); --k: 3; }
.hero__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--ground);
  --fw: min(30vw, 58svh * 0.8);
  --fh: calc(var(--fw) * 1.25);
  --side: calc(50vw - var(--fw) / 2 - var(--margin) - 24px);
  /* on short laptop windows the name shrinks with the height, so the side line and the intro never meet */
  --hero-size: min(var(--step-display), max(4.5rem, calc((100svh - 500px) * 1.087)));
  --below: calc(50% + var(--hero-size) * 0.46 + 14px);
}

.bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--margin);
}
.wordmark {
  font-family: var(--mark);
  font-weight: 700;
  font-size: var(--step-lead);
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
}
.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.75rem); font-size: var(--step-small); }
.nav__link { text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .nav__link:hover { text-decoration: underline; text-underline-offset: 0.25em; }
}
.nav__worlds { position: relative; }
.nav__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  min-width: 9rem;
  padding: 0.5rem 0;
  background: var(--paper);
  color: var(--on-field);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px) scale(0.97);
  transform-origin: top center;
  transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out);
}
.nav__worlds:hover .nav__menu,
.nav__worlds:focus-within .nav__menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 8px); }
.nav__menu-item { padding: 0.5rem 1.25rem; text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .nav__menu-item:hover { background: #dcdce6; }
}
.nav__menu-button { display: none; min-height: 44px; font-size: var(--step-small); }

.name {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--margin);
  pointer-events: none;
  font-family: var(--display);
  font-size: var(--hero-size);
  line-height: 0.86;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--name);
  transition: color 500ms var(--ease-out);
}
.name__half { display: block; overflow: hidden; padding-bottom: 0.04em; }
.name__half > span { display: block; }

.reel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 1;
  width: var(--fw);
  transform: translateX(-50%);
}
.reel__track {
  display: grid;
  gap: 24px;
  transform: translateY(var(--y, calc((100svh - var(--fh)) / 2)));
  will-change: transform;
}
.reel__frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.reel__frame img, .reel__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 35%);
}

/* the side in frame, named under ARYAN in the name's own colour */
.persona {
  position: absolute;
  left: var(--margin);
  top: var(--below);
  z-index: 3;
  width: var(--side);
  color: var(--name);
  transition: color 500ms var(--ease-out);
}
.persona__word {
  font-family: var(--display);
  font-size: var(--step-lead);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.persona__note { margin-top: 0.2rem; font-size: var(--step-body); line-height: 1.4; color: var(--ink); }
.swap { display: inline-block; white-space: nowrap; }
.swap.is-swapping { animation: swap 600ms var(--ease-out); }

.switch {
  position: absolute;
  right: var(--margin);
  top: var(--below);
  z-index: 3;
  display: grid;
  justify-items: end;
  gap: 0.6rem;
}
.switch__label { font-size: var(--step-small); color: var(--soft); }
.switch__row { display: flex; }
.switch__item {
  position: relative;
  min-height: 48px;
  padding: 0 1.1rem;
  color: var(--on-field);
  font-size: var(--step-small);
  font-weight: 600;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.switch__item:active { transform: scale(0.97); }
.switch__item[data-persona="scholar"] { background: var(--scholar); }
.switch__item[data-persona="founder"] { background: var(--founder); }
.switch__item[data-persona="creator"] { background: var(--creator); }
.switch__item[aria-pressed="true"] { background: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .switch__item:hover { background: var(--paper); }
}
.switch__item:focus-visible { outline-offset: -5px; outline-color: var(--on-field); }
.return-to-hub { font-size: var(--step-small); }
.hero[data-frame="0"] .return-to-hub { visibility: hidden; }

.hero__line {
  position: absolute;
  left: var(--margin);
  bottom: 32px;
  z-index: 3;
  max-width: 28ch;
}

/* ---------- phone menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 4rem 1.25rem;
  background: var(--ground);
}
.mobile-menu__link {
  font-family: var(--display);
  font-size: var(--step-head);
  line-height: 1.05;
  text-transform: uppercase;
  text-decoration: none;
}
.mobile-menu__close { position: absolute; top: 1rem; right: 1.25rem; min-height: 44px; padding: 0 0.5rem; }

/* ---------- about: the question, then the desk opens to full width ---------- */
.about { padding-top: var(--gap-section); }
.about__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--pad);
  padding: 0 var(--margin) calc(var(--gap-section) * 0.6);
}
.about__question {
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 31ch;
}
.about__text { display: grid; gap: 1.25rem; max-width: 46ch; }

.desk { position: relative; height: 190svh; }
.desk__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding-top: 40px;
  overflow: hidden;
}
.desk__frame {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(100vw - var(--margin) * 2, (100svh - 120px) * 1.712);
  aspect-ratio: 1900 / 1110;
}
.desk__draw {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* --draw runs 0 to 1 with the scroll; each object draws in its turn, given by --d */
/* each piece starts scattered and tilted, draws its lines, and drifts into its place on the desk */
.obj {
  --p: clamp(0, (var(--draw, 1) - var(--d)) / 0.3, 1);
  --q: calc(1 - var(--p));
  pointer-events: bounding-box;
  transform-box: fill-box;
  transform-origin: center;
  transform: translate(calc(var(--dx) * var(--q)), calc(var(--dy) * var(--q))) rotate(calc(var(--rot) * var(--q))) scale(calc(0.86 + var(--p) * 0.14));
  opacity: calc(0.25 + var(--p) * 0.75);
  transition: stroke var(--t-hover) ease;
}
.float { transform-box: fill-box; transform-origin: center; }
.obj > * { stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--p)); }
.obj[data-name="monitor"] { stroke: var(--soft); }
.fill-red { fill: var(--creator); fill-opacity: var(--p); stroke: none; }
.fill-gold { fill: var(--founder); fill-opacity: var(--p); stroke: none; }
.engrave { fill: var(--ink); stroke: none; font-family: var(--text); font-style: italic; font-size: 24px; opacity: var(--p); }
@media (hover: hover) and (pointer: fine) {
  .obj:hover { stroke: var(--founder); }
}
.desk__cap { padding: 0.9rem var(--margin) 1.25rem; text-align: center; font-size: var(--step-small); color: var(--soft); }

/* ---------- the sides: picture held left, reading right ---------- */
.sides { display: grid; grid-template-columns: 1fr 1fr; }
.stage { position: relative; }
.stage__frame {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--surface);
}
.stage__item {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(100% 0 0 0);
}
.stage__item.is-on { clip-path: inset(0 0 0 0); transition: clip-path 900ms var(--ease-in-out); }
.stage__item.is-under { clip-path: inset(0 0 0 0); }
.stage__item img, .stage__item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transform: scale(1.18);
}
.stage__item.is-on img, .stage__item.is-on video { transform: scale(1); transition: transform 1700ms var(--ease-out); }
.stage__item.is-under img, .stage__item.is-under video { transform: scale(1); }
/* the side's colour arrives first, then lifts off the picture */
.stage__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c);
  transform: translateY(0);
}
.stage__item.is-on::after { transform: translateY(-101%); transition: transform 900ms var(--ease-in-out) 380ms; }
.stage__item.is-under::after { transform: translateY(-101%); }
.stage__item--paper { background: var(--paper); }
.stage__item--paper img { object-fit: contain; padding: 9%; }
.stage__cap {
  position: absolute;
  left: var(--margin);
  bottom: var(--margin);
  z-index: 50;
  padding: 0.45rem 0.75rem;
  background: var(--paper);
  color: var(--on-field);
  font-size: var(--step-small);
  font-weight: 600;
}

.sides__read { min-width: 0; }
.side { color: var(--on-field); }
.side--scholar { background: var(--scholar); }
.side--founder { background: var(--founder); }
.side--creator { background: var(--creator); }
.side--before { background: var(--surface); color: var(--ink); }
.side__block {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.2rem;
  padding: clamp(2.5rem, 7svh, 4.5rem) var(--pad);
  max-width: 44rem;
}
.side__block + .side__block { min-height: 80svh; }
.side--before .side__block { min-height: 80svh; }
.side__block > p:not([class]) { max-width: 46ch; }
/* short laptop windows: tighter blocks so each one still fits beside the pinned picture */
@media (min-width: 861px) and (max-height: 680px) {
  .side__block { gap: 0.9rem; padding-block: 2rem; }
  .video, .row { padding-block: 0.6rem; }
}
.side__title {
  font-family: var(--display);
  font-size: var(--step-head);
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.side__sub {
  font-family: var(--display);
  font-size: var(--step-lead);
  line-height: 1.05;
  text-transform: uppercase;
}
.side__figure {
  font-family: var(--display);
  font-size: var(--step-head);
  line-height: 0.92;
  text-transform: uppercase;
}
.side__lead { max-width: 40ch; }
.side__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.side__count { font-variant-numeric: tabular-nums; }

.rows { display: grid; gap: 4px; width: 100%; max-width: 38rem; }
.rows__group { font-weight: 600; margin-bottom: 0.4rem; }
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.7rem 0.9rem;
  background: rgb(10 10 15 / 0.08);
}
.side--before .row { background: rgb(240 240 245 / 0.07); }
.row > span:last-child { flex: none; font-size: var(--step-small); font-variant-numeric: tabular-nums; }

.videos { display: grid; gap: 4px; width: 100%; max-width: 38rem; }
.video {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.85rem 0.9rem;
  background: rgb(10 10 15 / 0.08);
  text-decoration: none;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.video > span:last-child { flex: none; font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.video:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) {
  .video:hover, .video:focus-visible { background: var(--on-field); color: var(--creator); }
}

.phone-pic { display: none; }

/* ---------- off duty: the strip runs sideways ---------- */
.rest { position: relative; background: var(--ground); }
.rest__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.rest__track {
  display: flex;
  align-items: center;
  gap: 3vw;
  height: 100%;
  width: max-content;
  padding-inline: var(--margin);
  transform: translate3d(var(--x, 0px), 0, 0);
  will-change: transform;
}
.rest__head { width: 34vw; align-self: center; display: grid; gap: 1.25rem; }
.rest__title {
  font-family: var(--display);
  font-size: var(--step-display);
  line-height: 0.86;
  text-transform: uppercase;
}
.rest__note { max-width: 30ch; }
.shot { display: grid; gap: 0.75rem; }
.shot__pic {
  height: var(--h);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}
.shot__pic img {
  width: 116%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 40%);
  transform: translateX(var(--px, -7%));
}
.shot--1 { --h: 70svh; }
.shot--2 { --h: 52svh; align-self: flex-end; margin-bottom: 9svh; }
.shot--3 { --h: 64svh; align-self: flex-start; margin-top: 8svh; }
.shot--4 { --h: 52svh; align-self: flex-end; margin-bottom: 12svh; }
.shot--5 { --h: 72svh; }
.shot figcaption { display: grid; gap: 0.1rem; width: 0; min-width: 100%; }
.shot__name { font-weight: 600; }
.shot__when { font-size: var(--step-small); color: var(--soft); }

/* ---------- now and books: a stack you can pull from ---------- */
.record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-areas: "head st" "texts stack";
  grid-template-rows: auto 1fr;
  gap: clamp(1.5rem, 4svh, 2.5rem) var(--pad);
  padding: clamp(2.5rem, 7svh, 5rem) var(--margin);
  background: var(--surface);
}
.record__statement {
  grid-area: st;
  align-self: start;
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 31ch;
}
.anchor { position: absolute; top: -80px; }
.shelf__head { grid-area: head; position: relative; }
.shelf__title {
  font-family: var(--display);
  font-size: var(--step-head);
  line-height: 0.92;
  text-transform: uppercase;
  color: var(--founder);
}
.shelf__note { margin-top: 1rem; max-width: 56ch; color: var(--soft); }

.shelf__stack {
  grid-area: stack;
  align-self: end;
  justify-self: start;
  display: flex;
  align-items: flex-end;
  list-style: none;
  padding: 2.5rem 0 0.5rem;
  --h: clamp(160px, min(25vw, 40svh), 400px);
}
.book { position: relative; }
.book + .book { margin-left: calc(var(--h) * -0.4); }
.book__cover {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% 100%;
  transform: rotate(var(--tilt));
  transition: transform 500ms var(--ease-out);
}
.book__cover img { display: block; height: var(--h); width: auto; max-width: none; }
@media (hover: hover) and (pointer: fine) { .book__cover:hover { transform: rotate(0deg) translateY(-10px); } }
.book__cover.is-on { transform: rotate(0deg) translateY(-8%) scale(1.06); }
.book__cover:active { transform: rotate(0deg) translateY(-6%) scale(1.02); transition-duration: var(--t-press); }

.shelf__texts { grid-area: texts; align-self: center; display: grid; gap: 2.5rem; }
.book__name { font-size: var(--step-lead); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; max-width: 24ch; }
.book__by { margin-top: 0.35rem; color: var(--soft); }
.book__why { margin-top: 1rem; max-width: 46ch; }
@media (min-width: 861px) and (max-height: 680px) {
  .record { padding-block: 1.75rem; }
  .shelf__stack { padding-top: 1.5rem; }
}
/* with script, one note shows at a time, the others wait in the same spot */
.js .shelf__texts > * { grid-area: 1 / 1; }
.js .book__text { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-out), visibility 0s linear 400ms; }
.js .book__text.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0ms; }

/* ---------- contact: the address is the headline ---------- */
.contact {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 3rem;
  padding: var(--pad) var(--margin) 2rem;
  background: var(--paper);
  color: var(--on-field);
  overflow: hidden;
}
.contact__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--pad); }
.contact__ask { font-size: var(--step-lead); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; max-width: 24ch; }
.contact__what { max-width: 44ch; }
.contact__email {
  align-self: center;
  display: block;
  font-family: var(--display);
  font-size: var(--step-display);
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
}
.contact__email .ch { display: inline-block; transition: transform 420ms var(--ease-out), color 300ms ease; }
@media (hover: hover) and (pointer: fine) {
  .contact__email:hover .ch { transform: translateY(-0.06em); }
  .contact__email:hover .ch:nth-child(3n + 1) { color: var(--scholar); }
  .contact__email:hover .ch:nth-child(3n + 2) { color: #c79600; }
  .contact__email:hover .ch:nth-child(3n) { color: var(--creator); }
}
.contact__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 2rem;
  font-size: var(--step-small);
}
.contact__social { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: flex-end; }
.copy {
  display: inline-grid;
  min-height: 48px;
  padding: 0 1.25rem;
  align-items: center;
  background: var(--on-field);
  color: var(--paper);
  font-size: var(--step-small);
  font-weight: 600;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.copy > span { grid-area: 1 / 1; transition: opacity 200ms ease, transform 300ms var(--ease-out); }
.copy__done { opacity: 0; transform: translateY(8px); }
.copy.is-done { background: var(--scholar); color: var(--on-field); }
.copy.is-done .copy__idle { opacity: 0; transform: translateY(-8px); }
.copy.is-done .copy__done { opacity: 1; transform: none; }
.copy:active { transform: scale(0.97); }

/* ---------- footer: the name across the Faculty Building ---------- */
.footer {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: #2a2420;
  color: var(--paper);
}
.footer__pic {
  position: absolute;
  inset: -6% 0 0 0;
  width: 100%;
  height: 112%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 45%;
  filter: brightness(0.5);
  transform: translateY(var(--fy, 0px));
}
.footer__top, .footer__bottom { position: relative; padding: 32px var(--margin); }
.footer__top { display: flex; justify-content: space-between; gap: 2rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; max-width: 30rem; }
.footer__where { text-align: right; }
.footer__bottom { padding-bottom: 28px; display: grid; gap: 1.25rem; }
.footer__name {
  font-family: var(--display);
  font-size: 18.4vw;
  line-height: 0.82;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.footer__name > span { display: inline-block; }
.footer__line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem; font-size: var(--step-small); }
.footer__what { display: block; margin-top: 0.25rem; }
.credits { color: rgb(240 240 245 / 0.8); }
.credits a { color: var(--paper); text-decoration: underline; text-underline-offset: 0.15em; }

/* ---------- phone: its own composition ---------- */
@media (max-width: 860px) {
  .hero { height: auto; }
  .hero__stage {
    position: relative;
    height: auto;
    display: grid;
    gap: 1rem;
    padding: 84px var(--margin) 2.5rem;
    --fw: 100%;
  }
  .nav__link, .nav__worlds { display: none; }
  .nav__menu-button { display: inline-flex; align-items: center; }
  .name { display: contents; font-size: 27vw; }
  .name__half { font-family: var(--display); font-size: 27vw; line-height: 0.86; text-transform: uppercase; color: var(--name); transition: color 500ms var(--ease-out); }
  .name__half--a { order: 1; justify-self: start; }
  .reel { order: 2; position: relative; top: auto; bottom: auto; left: auto; width: 100%; transform: none; }
  .name__half--b { order: 3; justify-self: end; }
  .persona { order: 4; position: static; width: auto; }
  .switch { order: 5; position: static; justify-items: start; }
  .hero__line { order: 6; position: static; max-width: none; }
  .reel__track { transform: none; display: block; }
  .reel__frame:not(.is-on) { display: none; }
  .switch__row { width: 100%; }
  .switch__item { flex: 1; min-height: 52px; }

  .about { padding-top: 4.5rem; }
  .about__intro { grid-template-columns: 1fr; gap: 1.5rem; padding-bottom: 3rem; }
  .about__question { font-size: var(--step-lead); }
  .desk { height: auto; }
  .desk__sticky { position: static; height: auto; display: block; }
  .desk__sticky { padding-top: 0; }
  .desk__frame { width: 100%; }
  .desk__draw { stroke-width: 3.2; }

  .sides { display: block; }
  .stage { display: none; }
  .side__block, .side__block + .side__block { min-height: 0; padding: 0 var(--margin) 4rem; }
  .side__block:first-child { padding-top: 0; }
  .side--before .side__block { min-height: 0; }
  .phone-pic {
    display: block;
    width: calc(100% + var(--margin) * 2);
    max-width: none;
    margin-inline: calc(var(--margin) * -1);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: var(--pos, 50% 50%);
    margin-bottom: 1rem;
  }
  .phone-pic--paper { aspect-ratio: 1200 / 1024; object-fit: contain; background: var(--paper); padding: 6%; }
  .row, .video { flex-direction: column; gap: 0.15rem; }
  .side__actions .button { width: 100%; }

  .rest { height: auto !important; padding: 4.5rem var(--margin); }
  .rest__sticky { position: static; height: auto; overflow: visible; }
  .rest__track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 0.75rem;
    width: auto;
    height: auto;
    padding: 0;
    transform: none;
    align-items: start;
  }
  .rest__head { grid-column: 1 / -1; width: auto; }
  .rest__title { font-size: 12.4vw; }
  .shot--1, .shot--2, .shot--3, .shot--4, .shot--5 { --h: auto; align-self: start; margin: 0; }
  .shot:nth-of-type(even) { margin-top: 3.5rem; }
  .shot--1 { grid-column: 1 / -1; }
  .shot__pic { width: 100%; height: auto; }
  .shot__pic img { width: 100%; transform: none; }

  .record { grid-template-columns: 1fr; grid-template-areas: "st" "head" "stack" "texts"; grid-template-rows: none; row-gap: 0; padding: 4.5rem var(--margin); }
  .shelf__head { margin-top: 3.5rem; }
  .shelf__stack { justify-self: center; }
  .shelf__stack { --h: calc((100vw - var(--margin) * 2) / 1.9); padding-top: 2.5rem; }
  .shelf__texts { margin-top: 1rem; }

  .contact { min-height: 86svh; padding: 3.5rem var(--margin) 2rem; }
  .contact__top { grid-template-columns: 1fr; gap: 1rem; }
  .contact__email { font-size: 12.4vw; }
  .contact__foot { grid-template-columns: 1fr; justify-items: start; font-size: var(--step-body); }
  .contact__social { justify-content: start; }

  .footer { min-height: 88svh; }
  .footer__top { flex-direction: column; padding: 24px var(--margin); }
  .footer__where { text-align: left; }
  .footer__bottom { padding: 24px var(--margin) 28px; }
  .footer__line { grid-template-columns: 1fr; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .name [data-line] {
    transform: translateY(105%);
    animation: line-up 1000ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 120ms + 150ms);
  }
  .js [data-rise] {
    opacity: 0;
    transform: translateY(18px);
    animation: rise var(--t-reveal) var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 90ms + 400ms);
  }
  .js .reel__frame { animation: settle 1200ms var(--ease-soft) both; }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 75ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* rows step in one after another */
  .js .row, .js .video {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
    transition-delay: calc(var(--r, 0) * 60ms + 120ms), calc(var(--r, 0) * 60ms + 120ms), 0ms, 0ms;
  }
  .js .is-in .row, .js .is-in .video { opacity: 1; transform: none; }

  /* the books land on the pile one after another */
  .js .book { opacity: 0; transform: translateY(48px); transition: opacity 600ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--n) * 90ms + 150ms); }
  .js .is-in .book { opacity: 1; transform: none; }

  /* every piece keeps a slow bob of its own, even once it has landed */
  .float { animation: bob var(--f) ease-in-out infinite alternate; animation-delay: calc(var(--fd) * -1); animation-play-state: var(--play, running); }

  /* each holiday shot opens like a shutter as it slides in */
  .js .shot__pic { clip-path: inset(0 0 0 100%); transition: clip-path 1000ms var(--ease-in-out); }
  .js .shot.is-in .shot__pic { clip-path: inset(0 0 0 0); }
  .js .shot figcaption { opacity: 0; transform: translateY(10px); transition: opacity 600ms var(--ease-out) 400ms, transform 700ms var(--ease-out) 400ms; }
  .js .shot.is-in figcaption { opacity: 1; transform: none; }

  /* the email letters rise one by one */
  .js .contact__email .ch { transform: translateY(0.5em); opacity: 0; }
  .js .contact__email.is-in .ch { transform: none; opacity: 1; transition: transform 800ms var(--ease-out), opacity 600ms ease, color 300ms ease; transition-delay: calc(var(--c) * 35ms), calc(var(--c) * 35ms), 0ms; }
  .js .contact__email.is-in.is-settled .ch { transition-delay: 0ms; }

  /* the footer name climbs into place */
  .js .footer__name > span { transform: translateY(calc(var(--fn, 1) * 60%)); }
  .js .footer__name > span:last-child { transform: translateY(calc(var(--fn, 1) * 90%)); }

  .stage__cap span { display: inline-block; animation: cap-in 500ms var(--ease-out); }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes bob { from { transform: translateY(-9px) rotate(-0.6deg); } to { transform: translateY(9px) rotate(0.6deg); } }
@keyframes swap { from { opacity: 0; transform: translateY(0.6em); } to { opacity: 1; transform: none; } }
@keyframes cap-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .name, .name__half, .persona { transition: none; }
  .swap.is-swapping { animation: none; }
  .stage__item, .stage__item::after, .stage__item img { transition: none !important; }
  .obj > * { stroke-dashoffset: 0; }
  .book__cover, .js .book__text { transition: none !important; }
}

/* ---------- desktop: the reading sections each fill one screen, so the page settles on whole screens ---------- */
@media (min-width: 861px) {
  .about { padding-top: 0; }
  .about__intro { min-height: 100svh; align-content: center; padding-block: var(--margin); }
  .side__block, .side__block + .side__block, .side--before .side__block { min-height: 100svh; }
  .record { min-height: 100svh; grid-template-rows: auto auto; align-content: center; }
}
