/* ---------- tokens ---------- */
/* The whole site is black and white, apart from Khushi's photo. Logos and covers turn to colour when hovered. */
:root {
  --display: "Bodoni Moda", Didot, "Bodoni MT", "Times New Roman", serif;
  --text: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 84px);
  --top: clamp(76px, 13svh, 132px); /* clears the floating nav */
  --foot: clamp(28px, 7svh, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.3, 1.4, .5, 1);
}
/* Panels and brand pages alternate between these two. */
[data-tone="dark"] { --bg: #000; --fg: #fff; }
[data-tone="light"] { --bg: #fff; --fg: #000; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: var(--text);
  font-size: clamp(15px, .45vw + 11px, 18px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
::selection { background: #000; color: #fff; }
[data-tone="dark"] ::selection { background: #fff; color: #000; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 50;
  padding: .6em 1em; background: #fff; color: #000; border: 2px solid #000; font-weight: 700;
  translate: 0 -300%;
}
.skip:focus { translate: 0 0; }
.noscript { position: fixed; inset: auto 0 0 0; padding: 1em; background: #fff; color: #000; text-align: center; }

/* ---------- the sideways track ---------- */
.track {
  display: flex;
  height: 100vh; height: 100dvh;
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.panel {
  position: relative; flex: 0 0 auto;
  width: 100vw; height: 100%;
  overflow: hidden auto;
  scrollbar-width: thin;
  background: var(--bg); color: var(--fg);
}
@media (pointer: coarse) {
  .track { scroll-snap-type: x proximity; }
  .panel { scroll-snap-align: start; }
}
.panel h2 {
  font-weight: 800; font-stretch: 120%;
  font-size: clamp(2.1rem, 5.4vw, 4.8rem);
  line-height: .9; letter-spacing: -.015em; text-transform: uppercase;
}

/* ---------- floating nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; z-index: 20;
  display: flex; align-items: center; gap: 2px;
  padding: 5px; border-radius: 999px;
  background: #000; border: 1px solid rgba(255, 255, 255, .4);
  translate: -50% 0;
  transition: translate .5s var(--ease), opacity .3s, visibility 0s;
}
body[data-at="home"] .nav {
  translate: -50% -180%; opacity: 0; visibility: hidden;
  transition: translate .5s var(--ease), opacity .3s, visibility 0s .5s;
}
.nav a {
  padding: .62em .95em; border-radius: 999px;
  color: #fff; text-decoration: none; white-space: nowrap;
  font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.nav a:hover { background: rgba(255, 255, 255, .2); }
.nav a[aria-current="true"] { background: #fff; color: #000; }
.nav .nav__home { padding: 0; margin-right: 4px; }
.nav .nav__home:hover { background: none; }
.nav__home span {
  display: block; width: 30px; height: 30px; border-radius: 50%;
  background: #333 var(--photo) var(--px) var(--py) / var(--pz) auto no-repeat;
}

/* ---------- home ---------- */
.home {
  overflow: hidden;
  --S: max(350px, min(54svh, 86vw));
  --P: calc(var(--S) * .46);       /* photo diameter */
  --R: calc(var(--S) * .41);       /* radius of the ring of page links */
  --M: calc(var(--S) * .17);       /* size of each page link */
  --C: clamp(42px, 6.4svh, 62px);  /* size of each brand disc */
  --rx: min(41vw, 92svh);          /* the belt of brands is a wide ellipse, like an orbit seen at a tilt */
  --ry: 34svh;
  --cy: 42%;
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.8s linear; }
.home__mark, .home__hint {
  position: absolute; top: clamp(18px, 4svh, 34px);
  font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  opacity: 0; transition: opacity .8s linear 1.7s;
}
.home__mark { left: var(--gutter); }
.home__hint { right: var(--gutter); display: flex; align-items: center; gap: .9em; }
.home__hint i {
  display: block; width: clamp(34px, 5vw, 70px); height: 1px; background: currentColor;
  transform-origin: left; animation: hint 2.6s var(--ease) infinite;
}
@keyframes hint {
  0% { transform: scaleX(0); opacity: 1; }
  55% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* Everything round the photo hangs off this one point, and leans a little away from the pointer. */
.system {
  position: absolute; left: 50%; top: var(--cy); width: 0; height: 0;
  translate: calc(var(--mx, 0) * -7px) calc(var(--my, 0) * -5px);
}
.belt-path {
  position: absolute; left: calc(var(--rx) * -1); top: calc(var(--ry) * -1);
  width: calc(var(--rx) * 2); height: calc(var(--ry) * 2); border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, .3);
  translate: calc(var(--mx, 0) * -10px) calc(var(--my, 0) * -7px);
  scale: .8; opacity: 0;
  transition: scale 1.6s var(--ease) .45s, opacity 1s linear .45s;
}
.belt { position: absolute; left: 0; top: 0; translate: calc(var(--mx, 0) * -10px) calc(var(--my, 0) * -7px); }
.chip { /* a brand, circling */
  position: absolute; left: calc(var(--C) / -2); top: calc(var(--C) / -2);
  width: var(--C); height: var(--C); padding: 0; border: 0; border-radius: 50%; background: none;
  cursor: pointer; will-change: transform;
  opacity: 0; transition: opacity .6s linear;
}
.chip:hover, .chip:focus-visible { z-index: 5; }
.chip:focus-visible { outline-color: #fff; outline-offset: 6px; }
.chip__face {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--c, #fff); color: var(--k, #000);
  filter: grayscale(1); opacity: calc(.42 + var(--d, 1) * .58); /* discs at the far side of the belt are dimmer */
  transition: filter .25s linear, opacity .25s linear, scale .25s var(--ease);
}
.chip:hover .chip__face, .chip:focus-visible .chip__face { filter: none; opacity: 1; scale: 1.28; }
.chip__face img { width: 68%; height: 68%; object-fit: contain; pointer-events: none; }
.chip__face img.is-fill { width: 100%; height: 100%; object-fit: cover; }
.chip__face em { font-family: var(--display); font-style: italic; font-size: calc(var(--C) * .4); line-height: 1; }
.chip__name {
  position: absolute; left: 50%; top: calc(100% + 12px); translate: -50% 0;
  padding: .32em .75em; border-radius: 999px; background: #fff; color: #000; white-space: nowrap;
  font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity .2s linear;
}
.chip:hover .chip__name, .chip:focus-visible .chip__name { opacity: 1; }

.portrait { /* the one thing on the site that is always in colour */
  position: absolute; left: calc(var(--P) / -2); top: calc(var(--P) / -2);
  width: var(--P); height: var(--P); border-radius: 50%;
  background: #222 var(--photo) var(--px) var(--py) / var(--pz) auto no-repeat;
  box-shadow: 0 0 0 calc(var(--S) * .02) #000, 0 0 0 calc(var(--S) * .02 + 1px) rgba(255, 255, 255, .6);
  scale: .7; opacity: 0;
  transition: scale 1.1s var(--ease), opacity .5s linear;
}
.stamp { /* words running round the photo, turning slowly */
  position: absolute; left: calc(var(--S) * -.309); top: calc(var(--S) * -.309);
  width: calc(var(--S) * .618); height: calc(var(--S) * .618); overflow: visible; /* sits between the photo and the page links */
  animation: stamp 80s linear infinite;
  opacity: 0; transition: opacity 1s linear .9s;
}
.stamp text { fill: currentColor; stroke: none; font-family: var(--text); font-size: 7.3px; font-weight: 700; }
@keyframes stamp { to { rotate: -360deg; } }
.ring {
  position: absolute; left: calc(var(--R) * -1); top: calc(var(--R) * -1);
  width: calc(var(--R) * 2); height: calc(var(--R) * 2); border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  scale: .55; opacity: 0;
  transition: scale 1.2s var(--ease) .25s, opacity .6s linear .25s;
}
.orbit { position: absolute; left: 0; top: 0; --a: -24deg; --step: 72deg; }
.arm { position: absolute; left: 0; top: 0; rotate: calc(var(--a) + var(--i) * var(--step)); }
.arm__out {
  position: absolute; left: 0; top: 0;
  translate: 0 0; scale: .3; opacity: 0;
  transition: translate 1s var(--spring), scale 1s var(--spring), opacity .3s linear;
  transition-delay: calc(.55s + var(--i) * .09s);
}
.moon { /* each circle is the colour of the page it leads to */
  position: absolute; left: calc(var(--M) / -2); top: calc(var(--M) / -2);
  width: var(--M); height: var(--M); border-radius: 50%;
  display: grid; place-items: center;
  rotate: calc(-1 * (var(--a) + var(--i) * var(--step)));
  background: var(--bg); color: var(--fg); text-decoration: none;
  box-shadow: inset 0 0 0 1px #fff;
  font-size: max(9px, calc(var(--M) * .125)); font-weight: 800; font-stretch: 84%;
  letter-spacing: .06em; text-transform: uppercase;
  transition: scale .25s var(--ease), background .2s, color .2s;
}
.moon:hover, .moon:focus-visible { scale: 1.12; }
.moon[data-tone="dark"]:hover { background: #fff; color: #000; }
.moon:focus-visible { outline-color: #fff; }

.home__title {
  position: absolute; left: 0; right: 0; bottom: clamp(20px, 4.5svh, 46px);
  padding-inline: var(--gutter); text-align: center; pointer-events: none;
}
.home__title h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.2rem, min(8.5svh, 13vw), 5.5rem);
  line-height: 1; letter-spacing: .14em; text-transform: uppercase;
  margin-right: -.14em; /* balances the trailing letter-space */
}
.home__title .word { display: inline-block; white-space: nowrap; }
.home__title .ch { /* the name arrives a letter at a time */
  display: inline-block; opacity: 0; translate: 0 .55em;
  transition: opacity .5s linear, translate .9s var(--spring);
  transition-delay: calc(1s + var(--n) * .05s);
}
.home__title p {
  margin-top: 1em; text-wrap: balance;
  font-size: clamp(.68rem, 1.55svh, .9rem); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  opacity: 0; transition: opacity .9s linear 1.9s;
}
.home__links {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(22px, 5svh, 50px);
  display: flex; gap: 10px; pointer-events: none;
  opacity: 0; transition: opacity .8s linear 1.5s;
}
.home__links li { pointer-events: auto; }
.home__links .push { margin-left: auto; }
.home__links a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55); background: #000;
  transition: background .2s, color .2s;
}
.home__links a:hover { background: #fff; color: #000; }
.home__links svg { width: 20px; height: 20px; }

.is-ready .sky { opacity: 1; }
.is-ready .portrait { scale: 1; opacity: 1; }
.is-ready .ring { scale: 1; opacity: 1; }
.is-ready .belt-path { scale: 1; opacity: 1; }
.is-ready .stamp { opacity: .9; }
.is-ready .arm__out { translate: 0 calc(var(--R) * -1); scale: 1; opacity: 1; }
.is-ready .chip { opacity: 1; transition-delay: calc(1.1s + var(--i) * .06s); }
.is-ready .home__title .ch { opacity: 1; translate: 0 0; }
.is-ready .home__title p { opacity: 1; }
.is-ready .home__links { opacity: 1; }
.is-ready .home__mark, .is-ready .home__hint { opacity: .85; }

/* ---------- brands: square logo tiles ---------- */
.brands { display: flex; flex-direction: column; }
.brands__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
  padding: var(--top) var(--gutter) 0;
}
.brands__head p { max-width: 16ch; text-align: right; font-weight: 600; line-height: 1.25; }
.arena {
  position: relative; flex: 1 1 auto; min-height: 0;
  margin: clamp(10px, 3svh, 30px) var(--gutter) clamp(14px, 4svh, 40px);
}
.badge {
  position: absolute; left: 0; top: 0;
  width: calc(var(--r) * 2); height: calc(var(--r) * 2);
  padding: 0; border: 0; background: none;
  cursor: grab; user-select: none; -webkit-user-select: none;
  opacity: 0; transition: opacity .35s linear; will-change: transform;
}
.badge.is-in { opacity: 1; }
.badge.is-held { cursor: grabbing; z-index: 2; }
.badge__face {
  position: absolute; inset: 0; overflow: hidden;
  display: grid; place-items: center;
  background: var(--c, #fff); color: var(--k, #000);
  border: 2px solid var(--fg, #000);
  box-shadow: 6px 6px 0 var(--fg, #000);
  filter: grayscale(1); /* black and white until hovered */
  transition: filter .25s linear, translate .2s var(--ease), box-shadow .2s var(--ease);
}
.badge:hover .badge__face, .badge:focus-visible .badge__face, .badge.is-held .badge__face { filter: none; }
.badge:hover .badge__face, .badge:focus-visible .badge__face { translate: -3px -3px; box-shadow: 9px 9px 0 var(--fg, #000); }
.badge.is-held .badge__face { translate: -5px -5px; box-shadow: 12px 12px 0 var(--fg, #000); }
.badge:focus-visible { outline: 3px solid var(--fg, #000); outline-offset: 10px; }
.badge__name {
  padding: 0 10%; text-align: center; text-wrap: balance;
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: calc(var(--r) * var(--fs, .36)); line-height: 1;
}
.badge__logo { width: 80%; height: 66%; object-fit: contain; pointer-events: none; }
.badge__logo--edge { width: 100%; height: 100%; } /* the tile shares the logo file's background, so it can run to the edges */
.badge__logo--fill { width: 100%; height: 100%; object-fit: cover; }

/* ---------- about ---------- */
.about { display: flex; flex-direction: column; padding: var(--top) var(--gutter) var(--foot); }
.about__wrap {
  margin-block: auto;
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.6fr);
  gap: clamp(24px, 5vw, 80px); align-items: start;
}
.about__text p { max-width: 58ch; }
.about__text p + p { margin-top: 1em; }
.about__text p:first-child {
  max-width: 30em; margin-bottom: 1.1em;
  font-family: var(--display); font-size: clamp(1.45rem, 2.5vw, 2.3rem); line-height: 1.2;
}

/* ---------- skills ---------- */
.skills { display: flex; flex-direction: column; padding: var(--top) var(--gutter) var(--foot); }
.skills__wrap {
  margin-block: auto;
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.6fr);
  gap: clamp(24px, 5vw, 80px); align-items: start;
}
.skills__tools { margin-top: 1.5em; max-width: 26ch; font-weight: 600; }
.skills__list { columns: 2; column-gap: clamp(24px, 4vw, 64px); }
.skills__list li { break-inside: avoid; padding: .8em 0 1.05em; border-top: 1px solid var(--fg); }
.skills__list strong {
  display: block; font-family: var(--display); font-weight: 400;
  font-size: clamp(1.45rem, 2.3vw, 2.15rem); line-height: 1.08;
}
.skills__list span { display: block; margin-top: .35em; max-width: 36ch; opacity: .8; }

/* ---------- experience ---------- */
.experience {
  width: auto; min-width: 100vw;
  display: flex; flex-direction: column; padding: var(--top) var(--gutter) var(--foot);
}
.experience__wrap { margin-block: auto; }
.timeline { display: flex; margin-top: clamp(26px, 7svh, 72px); border-top: 1px solid var(--fg); }
.timeline li {
  position: relative; flex: 0 0 auto;
  width: clamp(250px, 26vw, 390px);
  padding: clamp(18px, 3.4svh, 30px) clamp(24px, 3vw, 48px) 0 0;
}
.timeline li::before {
  content: ""; position: absolute; left: 0; top: -7px;
  width: 13px; height: 13px; border-radius: 50%; background: var(--fg);
}
.timeline .when { font-size: .85rem; font-weight: 700; letter-spacing: .03em; }
.timeline h3 {
  margin: .45em 0 .25em;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.7rem, 2.7vw, 2.5rem); line-height: 1.05;
}
.timeline .role { font-weight: 700; }
.timeline .note { margin-top: .7em; max-width: 34ch; opacity: .8; }

/* ---------- education ---------- */
.education { display: flex; flex-direction: column; padding: var(--top) var(--gutter) var(--foot); }
.education__wrap { margin-block: auto; display: grid; gap: clamp(26px, 6svh, 60px); }
.education__list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35em 2rem; align-items: baseline;
  padding: clamp(14px, 3svh, 28px) 0; border-top: 1px solid var(--fg);
}
.education__list li:last-child { border-bottom: 1px solid var(--fg); }
.education__list h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.8rem, 4.2vw, 3.8rem); line-height: 1.02;
}
.education__list .when { font-weight: 700; white-space: nowrap; }
.education__list .school { grid-column: 1 / -1; font-weight: 600; }

/* ---------- contact ---------- */
.contact { display: flex; flex-direction: column; padding: var(--top) var(--gutter) 0; }
.contact__wrap {
  margin-block: auto; padding-bottom: clamp(20px, 4svh, 44px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 5vw, 80px); align-items: center;
}
.contact__email {
  display: inline-block; margin-top: .4em; overflow-wrap: anywhere;
  font-family: var(--display); font-size: clamp(1.5rem, 4.1vw, 4.2rem); line-height: 1.1;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em;
}
.contact__email:hover { text-decoration-thickness: 3px; }
.contact__list { display: flex; flex-wrap: wrap; gap: .5em 1.8em; margin-top: 1.7em; font-weight: 700; }
.contact__list a { text-underline-offset: .25em; }
.contact__list a:hover { text-decoration-thickness: 3px; }
.contact__photo {
  width: clamp(130px, 22vw, 300px); aspect-ratio: 1; border-radius: 50%;
  background: #222 var(--photo) 50% 62% / 100% auto no-repeat;
  box-shadow: 0 0 0 10px var(--bg), 0 0 0 11px var(--fg);
}
.ticker {
  margin-inline: calc(var(--gutter) * -1); padding: .55em 0;
  overflow: hidden; white-space: nowrap;
  background: var(--fg); color: var(--bg);
  font-size: .95rem; font-weight: 800; font-style: italic; font-stretch: 112%;
  letter-spacing: .03em; text-transform: uppercase;
}
.ticker__run { display: inline-flex; animation: ticker 40s linear infinite; }
.ticker__run span { padding-right: 1.2em; }
@keyframes ticker { to { transform: translateX(-50%); } }
.contact__fine { padding: .9em 0; font-size: .8rem; opacity: .8; }

/* ---------- the brand room (grows out of its tile) ---------- */
.room {
  position: fixed; inset: 0; margin: 0; padding: 0; border: 0;
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  overflow: hidden;
  background: var(--bg, #fff); color: var(--fg, #000);
  clip-path: inset(var(--it, 50%) var(--ir, 50%) var(--ib, 50%) var(--il, 50%));
  transition: clip-path .6s cubic-bezier(.65, 0, .2, 1), background-color .4s, color .4s;
}
.room.is-open { clip-path: inset(0); }
.room::backdrop { background: transparent; }

.pill {
  appearance: none; cursor: pointer;
  padding: .55em 1.15em; border: 1.5px solid currentColor; border-radius: 999px; background: transparent;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.pill:hover { background: var(--fg, #000); color: var(--bg, #fff); border-color: var(--fg, #000); }
.pill--icon { display: grid; place-items: center; width: 2.9em; height: 2.9em; padding: 0; }
.pill--icon svg { width: 1.5em; height: 1.5em; stroke-width: 2; }

.room__bar {
  position: absolute; z-index: 2; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
}
.room__pager { display: flex; align-items: center; gap: .8em; font-size: .85rem; font-weight: 700; }
.room__body {
  position: absolute; inset: 0; padding-top: 70px;
  display: grid; grid-template-columns: minmax(270px, 31vw) minmax(0, 1fr); align-items: center;
  transition: opacity .18s linear;
}
.room__body.is-swapping { opacity: 0; }
.room__intro { padding-left: var(--gutter); padding-right: clamp(16px, 2vw, 32px); }
.room__logo:empty { display: none; }
.room__logo {
  --r: clamp(40px, 4.6vw, 62px);
  position: relative; width: calc(var(--r) * 2); height: calc(var(--r) * 2); margin-bottom: 1.6rem;
}
.room__logo .badge__face { box-shadow: none; }
.room__logo:hover .badge__face { filter: none; }
.room__intro h2 {
  font-family: var(--display); font-weight: 400; font-style: italic;
  font-size: clamp(2.4rem, 5.2vw, 5rem); line-height: .98; overflow-wrap: anywhere;
}
.room__role { margin-top: 1.1em; font-weight: 700; }
.room__about { margin-top: .5em; max-width: 34ch; }

.shelf {
  --h: clamp(230px, 52svh, 520px);
  display: flex; align-items: flex-start; gap: clamp(20px, 2.6vw, 44px);
  padding: 26px var(--gutter) 26px 12px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
  scrollbar-color: var(--fg, #000) transparent;
}
.shelf__empty { font-weight: 600; }
.work {
  --th: calc(var(--h) * var(--tall)); /* this tile's height */
  flex: 0 0 auto; width: max(calc(var(--th) * var(--ar)), 10.5rem);
  padding-top: calc(var(--h) - var(--th)); /* tiles of different heights stand on one line */
  opacity: 0; translate: 40px 0;
  transition: opacity .5s linear, translate .7s var(--ease);
  transition-delay: calc(.28s + var(--n) * .06s);
}
.shelf.is-in .work { opacity: 1; translate: 0 0; }
.work__open {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  text-align: left; text-decoration: none; cursor: pointer;
}
div.work__open { cursor: default; }
.work__tile {
  position: relative; display: grid; place-items: center; overflow: hidden;
  width: calc(var(--th) * var(--ar)); height: var(--th);
  background: var(--fg, #000); color: var(--bg, #fff);
  border: 1px solid var(--fg, #000); border-radius: 4px;
  transition: translate .3s var(--ease);
}
button.work__open:hover .work__tile, a.work__open:hover .work__tile { translate: 0 -8px; }
.work__tile img { /* covers are black and white until hovered, like the logos */
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1); transition: filter .3s linear;
}
.work__open:hover .work__tile img, .work__open:focus-visible .work__tile img { filter: none; }
.work__card { /* the title card behind every cover */
  position: absolute; inset: 0; padding: calc(var(--h) * .045);
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
}
.work__card small { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.work__card em {
  display: block; overflow-wrap: anywhere; text-wrap: balance;
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: calc(var(--h) * .07); line-height: 1.04;
}
.work__card b { display: block; margin-top: .7em; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
/* The shape of a tile tells you what the piece is. */
.work--reel .work__tile { border-radius: calc(var(--h) * .05); }
.work--carousel .work__tile { /* more pages peek out behind the first */
  overflow: visible;
  box-shadow:
    9px -9px 0 -1px var(--bg, #fff), 9px -9px 0 0 color-mix(in srgb, var(--fg, #000) 60%, transparent),
    18px -18px 0 -1px var(--bg, #fff), 18px -18px 0 0 color-mix(in srgb, var(--fg, #000) 35%, transparent);
}
.work--carousel { width: max(calc(var(--th) * var(--ar) + 18px), 10.5rem); }
.work--reel .work__tile::after, .work--video .work__tile::after { /* play mark */
  content: ""; position: absolute; left: 50%; top: 50%; translate: -35% -50%;
  border-style: solid; border-color: transparent transparent transparent currentColor;
  border-width: calc(var(--h) * .035) 0 calc(var(--h) * .035) calc(var(--h) * .058);
  opacity: 0;
}
.work--reel .work__tile:has(img)::after, .work--video .work__tile:has(img)::after { opacity: 1; color: #fff; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .6)); }
.work__cta {
  display: inline-block; margin-top: .9em;
  font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: .25em;
}
.work__cta--none { text-decoration: none; opacity: .6; }
.work h3 { margin-top: .55em; font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.work h3.is-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.work__views { margin-top: .15em; font-size: .9rem; font-weight: 700; }
.work__credit { margin-top: .15em; font-size: .9rem; }
.work__note { margin-top: .3em; font-size: .9rem; opacity: .82; }

/* ---------- draft tab ---------- */
.draft-tab {
  position: fixed; left: 0; top: 50%; z-index: 40; translate: 0 -50%;
  writing-mode: vertical-rl; padding: .9em .35em;
  background: #000; color: #fff; border: 1px solid #fff; border-left: 0; border-radius: 0 4px 4px 0;
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  pointer-events: none;
}

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .nav { top: 10px; padding: 4px; max-width: calc(100vw - 12px); }
  .nav a { padding: .6em .58em; font-size: .6rem; letter-spacing: .04em; font-stretch: 88%; }
  .nav__home span { width: 26px; height: 26px; }

  /* On a phone the belt is wider than the screen: brands sweep across above and below the photo. */
  .home { --S: min(50svh, 92vw); --P: calc(var(--S) * .42); --R: calc(var(--S) * .385); --M: calc(var(--S) * .22); --C: 40px; --rx: 72vw; --ry: 28svh; --cy: 41%; }
  .stamp { display: none; }
  .home__title { bottom: 76px; }
  .home__links { bottom: 20px; justify-content: center; }
  .home__links .push { margin-left: 0; }

  .brands__head p { max-width: 13ch; }

  .about__wrap { grid-template-columns: 1fr; }
  .skills__wrap { grid-template-columns: 1fr; }
  .skills__list { columns: 1; }

  .timeline li { width: 76vw; }

  .education__list li { grid-template-columns: 1fr; }

  .contact__wrap { grid-template-columns: 1fr; }
  .contact__photo { order: -1; width: 112px; }

  .room__body { display: block; overflow-y: auto; padding-top: 74px; }
  .room__intro { padding-right: var(--gutter); }
  .room__logo { margin-bottom: 1rem; }
  .shelf { --h: clamp(190px, 38svh, 340px); padding: 26px var(--gutter) 34px; }
}

/* short and wide (a phone held sideways) */
@media (max-height: 520px) and (min-aspect-ratio: 3/2) {
  .home { --S: min(84svh, 46vw); --P: calc(var(--S) * .4); --R: calc(var(--S) * .385); --M: calc(var(--S) * .22); --cy: 50%; }
  .belt, .belt-path, .stamp, .home__mark { display: none; }
  .system { left: 28%; }
  .home__title { left: 54%; right: 0; bottom: auto; top: 50%; translate: 0 -50%; text-align: left; }
  .is-ready .home__title { translate: 0 -50%; }
  .home__links { left: 54%; right: auto; bottom: 16px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .room { clip-path: none; opacity: 0; }
  .room.is-open { clip-path: none; opacity: 1; }
}
