@font-face { font-family: "Bahiana"; src: url("../fonts/bahiana-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bangers"; src: url("../fonts/bangers-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #121212;
  --paper: #f4ecdb;
  --red: #c8322c;
  --orange: #e8561c;
  --blue: #2f5f9e;

  --display: "Bangers", "Impact", system-ui, sans-serif;
  --body: "Bahiana", "Arial Narrow", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 64px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }

/* ---------- Curtain ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
}
.curtain__panel {
  position: absolute; inset: 0;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.curtain__mark {
  position: absolute; inset: 0;
  margin: 0; padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center;
  column-gap: .3em; row-gap: .15em;
  text-align: center;
  font-family: var(--body);
  font-size: clamp(19px, 1.8vw, 27px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}
.curtain__mark span { display: inline-block; }
.curtain__mark span:nth-child(2) { color: var(--orange); }
.curtain__mark .curtain__credit {
  flex-basis: 100%; margin-top: .7em;
  font-size: .66em; letter-spacing: .16em; opacity: .75;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(16px, 2.4vw, 32px) var(--gutter);
  font-family: var(--display);
  letter-spacing: .06em;
  text-shadow: 0 1px 12px rgba(0,0,0,.25);
}
.nav__logo {
  font-family: var(--body);
  font-size: clamp(15px, 1.05vw, 18px);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav__logo span { color: var(--orange); margin: 0 .12em; }
.nav__links { display: flex; gap: clamp(16px, 2.6vw, 40px); font-size: clamp(16px, 1.3vw, 20px); }
.nav__links a { position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--orange);
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav { gap: 24px; }
.nav__links { margin-left: auto; }

/* ---------- Day / night toggle ---------- */
.nav__tools { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 28px); pointer-events: none; }
.nav__tools > * { pointer-events: auto; }
.theme {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 4px;
  background: none; border: 0; cursor: pointer; color: inherit;
  font-family: var(--display); font-size: clamp(14px, 1.1vw, 17px);
  letter-spacing: .08em; text-transform: uppercase;
}
.theme__label { display: inline-block; overflow: hidden; }
.theme__label b { font-weight: 400; color: var(--orange); display: inline-block; min-width: 2.9em; text-align: left; }
/* the sun: an orange disc. The moon: a paper disc with a shadow sliding across */
.theme__orb {
  position: relative; width: 14px; height: 14px; border-radius: 50%;
  background: var(--orange); overflow: hidden;
  transition: background-color .7s var(--ease-out), transform .7s var(--ease-out);
}
.theme__orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--ink);
  transform: translate(120%, -60%);
  transition: transform .7s var(--ease-out);
}
.theme[aria-pressed="true"] .theme__orb { background: var(--paper); transform: rotate(-20deg); }
.theme[aria-pressed="true"] .theme__orb::after { transform: translate(38%, -22%); }
.theme:hover .theme__orb { transform: scale(1.15); }
.theme[aria-pressed="true"]:hover .theme__orb { transform: rotate(-20deg) scale(1.15); }
.theme:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
@media (max-width: 720px) { .theme__label { display: none; } }

/* ---------- Sound toggle ---------- */
.sound {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 0 6px 4px;
  background: none; border: 0; cursor: pointer;
  color: inherit;
  font-family: var(--display);
  font-size: clamp(14px, 1.1vw, 17px);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sound__label b { font-weight: 400; color: var(--orange); display: inline-block; min-width: 2.1em; text-align: left; }
.sound__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.sound__bars i:nth-child(2) { transform: scaleY(.65); }
.sound__bars i:nth-child(3) { transform: scaleY(.3); }
.sound__bars i:nth-child(4) { transform: scaleY(.5); }
.sound__bars i {
  display: block; width: 2px; height: 100%;
  background: currentColor;
  transform-origin: bottom;
  transform: scaleY(.4);
  transition: transform .5s var(--ease-out);
}
.sound[aria-pressed="true"] .sound__bars i { animation: eq 1.1s ease-in-out infinite alternate; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { animation-duration: .8s;  animation-delay: -.3s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { animation-duration: 1.3s; animation-delay: -.6s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(4) { animation-duration: .95s; animation-delay: -.2s; }
@keyframes eq { 0% { transform: scaleY(.25); } 100% { transform: scaleY(1); } }
.sound:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 560px;
  overflow: hidden;
  overflow: clip; /* never scrolls, even when something inside gets focused or scrolled into view */
  isolation: isolate;
}
.hero__media { position: absolute; inset: -2%; z-index: -1; will-change: transform; }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  object-position: 58% 50%;
}

/* Legibility: weighted to the lower-left where the type lives */
.hero__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 0% 100%, rgba(10,14,24,.55) 0%, rgba(10,14,24,.18) 45%, transparent 70%),
    linear-gradient(to bottom, rgba(0,0,0,.28) 0%, transparent 18%);
}
.hero__grain {
  position: absolute; inset: -50%;
  opacity: .11; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
  pointer-events: none;
}
@keyframes grain {
  0% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); }
  80% { transform: translate(3%,3%); } 100% { transform: translate(0,0); }
}

.hero__content {
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  bottom: clamp(48px, 11vh, 140px);
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  /* each line stays on one row; never wider than the screen. --title-em is the
     widest line across all rotating phrases, measured in JS */
  font-size: min(clamp(40px, 8.4vw, 168px), calc((100vw - 2 * var(--gutter)) / var(--title-em, 8.2)));
  line-height: .86;
  letter-spacing: .005em;
  color: var(--paper);
  text-shadow: .03em .04em 0 rgba(18,18,18,.35);
}
.hero__line { display: block; white-space: nowrap; }
.hero__title.is-wrap .hero__line { white-space: normal; }
/* SplitText line masks need a hair of room for Bangers' descenders/italics */
.hero__title .line-mask { padding: .04em .12em 0 0; margin-right: -.12em; }

.hero__foot {
  position: relative;
  margin-top: clamp(16px, 2.4vw, 32px);
  max-width: max(820px, 50vw);
}
.hero__blurb {
  background: var(--ink);
  padding: clamp(12px, 1.4vw, 20px) clamp(14px, 1.8vw, 26px);
  transform-origin: left center;
}
.hero__blurb p {
  margin: 0;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: clamp(18px, 1.5vw, 30px);
  line-height: 1.35;
}

.hero__cta {
  position: absolute;
  right: clamp(-40px, -2vw, -8px);
  bottom: clamp(-30px, -2vw, -20px);
  display: inline-grid; place-items: center;
  padding: clamp(10px, 1vw, 14px) clamp(26px, 3vw, 46px);
  background: var(--red);
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(16px, 1.35vw, 21px);
  letter-spacing: .06em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.6);
}
.hero__cta-fill {
  position: absolute; inset: 0; z-index: -1;
  background: var(--orange);
  transform: translateY(101%);
  transition: transform .6s var(--ease-out);
}
/* the wrapper is the window; the label and its copy roll through it */
.hero__cta-inner { display: block; overflow: hidden; }
.hero__cta-label {
  position: relative; display: block;
  line-height: 1.15;
}
.hero__cta-label::after {
  content: attr(data-label);
  position: absolute; left: 0; top: 100%;
}
.hero__cta-label, .hero__cta-label::after { transition: transform .6s var(--ease-out); }
.hero__cta:hover .hero__cta-fill { transform: translateY(0); }
.hero__cta:hover .hero__cta-label { transform: translateY(-100%); }
.hero__cta:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(20px, 4vh, 40px);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display); letter-spacing: .14em; font-size: 14px;
  writing-mode: vertical-rl;
}
.hero__scroll i {
  display: block; width: 1px; height: 56px; background: rgba(244,236,219,.35);
  position: relative; overflow: hidden;
}
.hero__scroll i::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: var(--paper);
  animation: drip 2.2s var(--ease-out) infinite;
}
@keyframes drip { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .hero__video { object-position: 62% 50%; }
  .hero__shade {
    background:
      linear-gradient(to top, rgba(10,14,24,.7) 0%, rgba(10,14,24,.25) 45%, transparent 70%),
      linear-gradient(to bottom, rgba(0,0,0,.3) 0%, transparent 18%);
  }
  .hero__content { bottom: 96px; }
  .hero__cta { position: relative; right: auto; bottom: auto; margin-top: 14px; }
  .hero__scroll { display: none; }
  .nav__links { gap: 16px; }
  .nav { gap: 16px; }
  .sound__label { display: none; }
}

/* ---------- Pre-JS / reduced motion ---------- */
.js .hero__title, .js .hero__blurb, .js .hero__cta, .js .nav, .js .hero__scroll { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .curtain { display: none; }
  .hero__grain, .hero__scroll i::after, .sound .sound__bars i { animation: none !important; }
}

/* =========================================================
   Walk-in transition + desk navigation
   ========================================================= */
.hero__walkin, .hero__still {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; pointer-events: none;
}
.hero__walkin { z-index: 3; }
.hero__still  { z-index: 4; }
.hero__shade, .hero__grain { z-index: 5; }

/* the desk box is sized by JS to the video frame's on-screen rect */
.desk {
  position: absolute; z-index: 6;
  container-type: inline-size;
}
.desk[hidden] { display: block !important; visibility: hidden; }

.desk__title {
  position: absolute;
  margin: 0;
  display: grid; place-content: center;
  text-align: center;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--paper);
  font-size: 5.6cqw;
  line-height: .9;
  letter-spacing: .01em;
  text-shadow: 0 0 .5em rgba(244,236,219,.18);
  pointer-events: none;
}
.desk__line { display: block; }
.desk__title .line-mask { padding: .04em .1em 0; margin: 0 -.1em; }


.tag {
  position: absolute;
  left: var(--x); top: var(--y);
  translate: -50% -50%;
  display: inline-grid; place-items: center;
  padding: .62em 1.3em;
  background: var(--red);
  color: var(--paper);
  font-family: var(--body);
  font-size: clamp(15px, 1.3cqw, 28px);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 .5em 1.2em -.5em rgba(18,18,18,.6);
  overflow: hidden; isolation: isolate;
  transition: rotate .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.tag::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--orange);
  transform: translateY(101%);
  transition: transform .5s var(--ease-out);
}
.tag:hover, .tag:focus-visible { rotate: -2deg; box-shadow: 0 .9em 1.6em -.6em rgba(18,18,18,.7); }
.tag:hover::before, .tag:focus-visible::before { transform: translateY(0); }
.tag:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* narrow-screen dock for tags cropped out of frame */
.dock {
  position: absolute; z-index: 7;
  left: var(--gutter); right: var(--gutter);
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  display: none; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.dock.has-tags { display: flex; }
/* the row itself never catches clicks (it sits right over the Back button);
   only its visible tags do */
.dock { pointer-events: none; }
.dock .tag { position: static; translate: none; font-size: 16px; pointer-events: auto; }

/* transition chrome */
.walk {
  position: absolute; z-index: 8;
  left: var(--gutter); right: var(--gutter);
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 18px;
}
.walk[hidden] { display: none; }
.walk__bar { flex: 1; height: 2px; background: rgba(244,236,219,.25); overflow: hidden; }
.walk__bar i { display: block; height: 100%; background: var(--paper); transform-origin: left; transform: scaleX(0); }
.walk__skip {
  background: rgba(18,18,18,.55); color: var(--paper);
  border: 1px solid rgba(244,236,219,.35);
  padding: 8px 16px;
  font-family: var(--display); letter-spacing: .08em; font-size: 15px;
  text-transform: uppercase; cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .4s var(--ease-out);
}
.walk__skip:hover { background: var(--red); }
.walk__skip:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

body.at-desk .hero__content, body.at-desk .hero__scroll { visibility: hidden !important; pointer-events: none; }
body.at-desk .hero__content * { visibility: hidden !important; }
/* the nav bar spans the width; only its controls should catch clicks */
.nav { pointer-events: none; }
.nav > * { pointer-events: auto; }

.hero__walkin { object-position: 52% 50%; }
@media (min-width: 721px) { .hero__walkin { object-position: 50% 50%; } }

/* at the desk the wall is light: nav switches to ink */
.nav { transition: color .8s var(--ease-out), text-shadow .8s var(--ease-out); }
body.at-desk .nav { color: var(--ink); text-shadow: none; }
.nav__logo, .sound, .theme { transition: background-color .8s var(--ease-out), padding .8s var(--ease-out); }
body.at-desk .nav__logo, body.at-desk .sound, body.at-desk .theme {
  background-color: rgba(244,236,219,.88);
  padding: 7px 12px;
  box-shadow: 0 6px 18px -10px rgba(18,18,18,.5);
}

/* =========================================================
   Sections (work · lab · contact)
   ========================================================= */
.sec__video, .sec__still {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  z-index: 4; opacity: 0; pointer-events: none;
}
@media (max-width: 720px) { .sec__video, .sec__still { object-position: 53% 50%; } }

.secs { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.sec {
  position: absolute; inset: 0;
  padding-top: clamp(96px, 16vh, 210px);
  padding-left: max(var(--gutter), min(11.5vw, 260px));
  padding-right: var(--gutter);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(14px, 1.8vw, 28px);
}
.sec[hidden] { display: none; }
.sec > * { pointer-events: auto; }

.sec__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--paper);
  font-size: clamp(40px, 6.2vw, 140px);
  line-height: .9;
  letter-spacing: .005em;
  text-shadow: .035em .045em 0 rgba(18,18,18,.5);
  text-wrap: balance;
  max-width: 100%;
}
.sec__title .word { white-space: nowrap; }

.sec__blurb {
  background: var(--ink);
  padding: clamp(12px, 1.2vw, 20px) clamp(14px, 1.6vw, 24px);
  max-width: 100%;
  transform-origin: left center;
}
.sec__blurb p {
  margin: 0;
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: clamp(16px, 1.15vw, 24px);
  line-height: 1.4;
  color: var(--paper);
}

.sec__hello {
  font-size: clamp(24px, 2.6vw, 58px);
  padding: .3em 1.25em;
  letter-spacing: .04em;
  text-shadow: .04em .05em 0 rgba(18,18,18,.35);
}

.back {
  position: absolute; z-index: 8;
  left: var(--gutter);
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(244,236,219,.9); color: var(--ink);
  border: 0; padding: 9px 16px;
  font-family: var(--display); letter-spacing: .08em; font-size: 15px;
  text-transform: uppercase; cursor: pointer;
  box-shadow: 0 8px 22px -12px rgba(18,18,18,.6);
  pointer-events: auto;
  transition: background-color .4s var(--ease-out), color .4s var(--ease-out);
}
.back[hidden] { display: none; }
.back:hover { background: var(--red); color: var(--paper); }
.back:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.back span { display: inline-block; transition: transform .5s var(--ease-out); }
.back:hover span { transform: translateX(-4px); }

/* tags with no section yet answer with a small nudge */
.tag.is-soon { animation: nudge .5s var(--ease-out); }
@keyframes nudge { 30% { rotate: -4deg; } 60% { rotate: 3deg; } }

@media (max-width: 720px) {
  .sec { padding-top: 92px; }
  .sec__hello { position: static !important; translate: none !important; margin-top: 6px; }
  .sec__blurb { max-width: min(100%, 520px); }
}

/* =========================================================
   Work: project + experiment browser
   ========================================================= */
.sec__body.work {
  position: absolute; left: 0; right: 0;
  bottom: clamp(70px, 10vh, 116px);
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: auto;
}
.work__bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  padding-left: max(var(--gutter), min(11.5vw, 260px));
  padding-right: var(--gutter);
}
.work__tabs { display: flex; gap: 8px; }
.work__tab {
  border: 0; cursor: pointer;
  padding: 8px 14px 7px;
  background: rgba(18,18,18,.78); color: var(--paper);
  font-family: var(--body); font-size: clamp(14px, 1vw, 18px);
  letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .4s var(--ease-out), color .4s var(--ease-out);
}
.work__tab span { opacity: .6; margin-left: .35em; }
.work__tab[aria-selected="true"] { background: var(--red); }
.work__tab:hover { background: var(--orange); }
.work__tab:focus-visible, .work__arrow:focus-visible, .card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.work__note {
  margin: 0; padding: 7px 12px;
  background: var(--ink); color: var(--paper);
  font-family: var(--body); font-size: clamp(13px, .9vw, 16px);
  letter-spacing: .05em; text-transform: uppercase;
}
.work__note[hidden] { display: none; }
.work__arrows { margin-left: auto; display: flex; gap: 6px; }
.work__arrow {
  width: 40px; height: 36px; border: 0; cursor: pointer;
  background: rgba(244,236,219,.92); color: var(--ink);
  font-family: var(--display); font-size: 18px;
  box-shadow: 0 6px 16px -10px rgba(18,18,18,.6);
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}
.work__arrow:hover { background: var(--ink); color: var(--paper); }
@media (pointer: coarse) { .work__arrows { display: none; } }

.work__strip {
  display: flex; gap: clamp(14px, 1.6vw, 26px);
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x proximity;
  scroll-padding-left: max(var(--gutter), min(11.5vw, 260px));
  padding: 16px var(--gutter) 22px max(var(--gutter), min(11.5vw, 260px));
  scrollbar-width: none;
  cursor: grab;
}
.work__strip::-webkit-scrollbar { display: none; }
.work__strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.work__strip.is-dragging .card { pointer-events: none; }

.card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(220px, 19vw, 320px);
  height: clamp(230px, 33vh, 360px);
  scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 10px 10px 14px;
  border: 0; text-align: left; cursor: pointer;
  background: var(--paper); color: var(--ink);
  font: inherit;
  box-shadow: 0 16px 30px -16px rgba(18,18,18,.75), 0 1px 0 rgba(18,18,18,.08);
  rotate: var(--tilt, 0deg);
  transition: rotate .6s var(--ease-out), translate .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
/* a strip of tape holding the print */
.card::before {
  content: ""; position: absolute; top: -9px; left: 50%;
  width: 64px; height: 18px; translate: -50% 0; rotate: -3deg;
  background: rgba(244,236,219,.72);
  box-shadow: 0 1px 2px rgba(18,18,18,.15);
}
.card:hover, .card:focus-visible { rotate: 0deg; translate: 0 -8px; box-shadow: 0 26px 40px -18px rgba(18,18,18,.8); }
.card__cover { display: block; width: 100%; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #efe5cf; }
.card__cover svg { display: block; width: 100%; height: 100%; transition: scale .8s var(--ease-out); }
.card__cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .8s var(--ease-out); }
.card:hover .card__cover svg, .card:hover .card__cover img { scale: 1.05; }
.card__meta {
  margin-top: 10px;
  font-family: var(--body); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(18,18,18,.65);
}
.card__title {
  margin-top: 2px;
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(22px, 1.7vw, 30px); line-height: .95;
}
.card__chip {
  margin-top: 8px; padding: 3px 8px 2px;
  background: var(--red); color: var(--paper);
  font-family: var(--body); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
}
.card__chip--ink { background: var(--ink); }

/* ---------- case file sheet ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.sheet[hidden] { display: none; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(18,18,18,.55); backdrop-filter: blur(6px); }
.sheet__paper {
  position: relative;
  width: min(1400px, 100%);
  height: min(720px, 100%);
  display: grid; grid-template-columns: minmax(250px, 30%) 1fr;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  overflow: hidden;
  transform-origin: 50% 50%;
}
.sheet__paper::after { /* paper grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sheet__close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  border: 0; cursor: pointer; padding: 7px 12px;
  background: var(--ink); color: var(--paper);
  font-family: var(--display); letter-spacing: .08em; font-size: 15px; text-transform: uppercase;
}
.sheet__close span { margin-left: 4px; }
.sheet__close:hover { background: var(--red); }
.sheet__side {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px; background: #e9dfc8;
  border-right: 2px solid rgba(18,18,18,.12);
  min-height: 0; overflow: auto;
}
.sheet__cover { aspect-ratio: 16 / 10; max-width: 100%; box-shadow: 0 12px 24px -16px rgba(18,18,18,.7); }
.sheet__cover svg, .sheet__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sheet__cover { overflow: hidden; background: #111; }
.sheet__kind { margin: 6px 0 0; font-family: var(--body); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: rgba(18,18,18,.65); }
.sheet__title { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(34px, 3.2vw, 52px); line-height: .9; text-wrap: balance; }
.sheet__facts { margin: 6px 0 0; display: grid; gap: 8px; }
.sheet__facts div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: baseline; border-top: 1px solid rgba(18,18,18,.15); padding-top: 8px; }
.sheet__facts dt { font-family: var(--body); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(18,18,18,.55); }
.sheet__facts dd { margin: 0; font-family: var(--body); font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }

.sheet__main { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 0; padding: 22px clamp(20px, 3vw, 44px) 20px; }
.sheet__links { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sheet__links:empty { display: none; }
.sheet__protos { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sheet__protos[hidden] { display: none; }
.sheet__protos-label { flex: 1 1 100%; font-family: var(--body); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(18,18,18,.55); }
.sheet__protos a {
  padding: 5px 9px 4px; color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(18,18,18,.35);
  font-family: var(--body); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.sheet__protos a:hover { background: var(--red); color: var(--paper); box-shadow: none; }
.sheet__protos a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sheet__links a {
  padding: 6px 10px 5px; background: var(--ink); color: var(--paper);
  font-family: var(--body); font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .3s var(--ease-out);
}
.sheet__links a:hover { background: var(--red); }
.sheet__links a.sheet__pdf {
  flex: 1 1 100%;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px 9px; background: var(--red); color: var(--paper);
  box-shadow: 0 12px 22px -14px rgba(18,18,18,.8);
}
.sheet__pdf-main { font-family: var(--display); font-size: clamp(17px, 1.3vw, 22px); letter-spacing: .05em; }
.sheet__pdf-main span { display: inline-block; transition: transform .4s var(--ease-out); }
.sheet__pdf-sub { font-size: 12px; letter-spacing: .1em; opacity: .85; }
.sheet__links a.sheet__pdf:hover { background: var(--orange); }
.sheet__links a.sheet__pdf:hover .sheet__pdf-main span { transform: translateY(3px); }
.sheet__links a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sheet__steps { list-style: none; margin: 0 110px 0 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 6px; }
.sheet__steps button { white-space: nowrap; }
@media (max-width: 1100px) { .sheet__steps { flex-wrap: wrap; } }
.sheet__steps button {
  border: 0; cursor: pointer; padding: 7px 11px 6px;
  background: transparent; color: rgba(18,18,18,.6);
  box-shadow: inset 0 0 0 1px rgba(18,18,18,.2);
  font-family: var(--body); font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.sheet__steps button i { font-style: normal; margin-right: .5em; opacity: .55; font-variant-numeric: tabular-nums; }
.sheet__steps button:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sheet__steps button[aria-current="step"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.sheet__steps button:focus-visible, .sheet__nav:focus-visible, .sheet__close:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.sheet__stage { align-self: center; max-width: 100%; padding: 24px 0; min-height: 0; overflow: auto; }
.sheet__head { margin: 0 0 14px; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 2.8vw, 46px); line-height: .95; color: var(--red); }
.sheet__text { margin: 0; max-width: 46em; font-family: var(--body); font-size: clamp(20px, 1.6vw, 28px); line-height: 1.4; letter-spacing: .035em; text-transform: uppercase; }
.sheet__stat { margin-top: 22px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sheet__stat[hidden] { display: none; }
.sheet__stat b { font-family: var(--display); font-weight: 400; font-size: clamp(54px, 5vw, 86px); line-height: .9; color: var(--ink); }
.sheet__stat span { font-family: var(--body); font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: rgba(18,18,18,.6); }

.sheet__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 2px solid rgba(18,18,18,.12); padding-top: 14px; }
.sheet__nav {
  border: 0; cursor: pointer; padding: 9px 16px 8px;
  background: var(--red); color: var(--paper);
  font-family: var(--display); letter-spacing: .08em; font-size: 16px; text-transform: uppercase;
  transition: background-color .3s var(--ease-out), opacity .3s;
}
.sheet__nav[data-dir="-1"] { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(18,18,18,.3); }
.sheet__nav:hover:not(:disabled) { background: var(--orange); color: var(--paper); }
.sheet__nav:disabled { opacity: .3; cursor: default; }
.sheet__count { font-family: var(--body); font-size: 15px; letter-spacing: .1em; font-variant-numeric: tabular-nums; color: rgba(18,18,18,.6); }

@media (max-width: 760px) {
  .sheet { padding: 0; }
  .sheet__paper { height: 100%; grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow: auto; }
  .sheet__side { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; padding: 18px 16px 14px; border-right: 0; border-bottom: 2px solid rgba(18,18,18,.12); overflow: visible; }
  .sheet__cover { width: 96px; aspect-ratio: 1; }
  .sheet__kind { margin: 0; flex: 1 1 140px; }
  .sheet__title { flex: 1 1 100%; font-size: 34px; }
  .sheet__facts { display: none; }
  .sheet__links { flex: 1 1 100%; }
  .sheet__protos { flex: 1 1 100%; }
  .sheet__main { padding: 16px; }
  .sheet__steps { margin: 0; }
  .sheet__steps button { font-size: 13px; padding: 6px 9px 5px; }
  .sheet__close { top: 10px; right: 10px; }
  .card { width: 210px; height: clamp(220px, 30vh, 280px); }
}

/* =========================================================
   Skills (#lab): sticky-note chapters + tossable tags
   ========================================================= */
.sec__body.skills {
  flex: 1 1 auto; min-height: 0;
  align-self: stretch;
  display: flex; flex-direction: column; gap: clamp(10px, 1.6vh, 18px);
  margin-bottom: clamp(64px, 9.5vh, 104px);
  margin-left: calc(-1 * max(var(--gutter), min(11.5vw, 260px)));
  margin-right: calc(-1 * var(--gutter));
}
.skills__stage {
  position: relative; flex: 1 1 auto; min-height: 150px;
  padding: 4px var(--gutter) 0 max(var(--gutter), min(11.5vw, 260px));
  display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(10px, 1.4vh, 16px);
}
.skills__title {
  margin: 0;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(32px, 4.2vw, 82px); line-height: .92;
  color: var(--red);
  text-shadow: .03em .04em 0 rgba(18,18,18,.25);
}
.skills__stage.is-personal .skills__title { color: var(--ink); text-shadow: .03em .04em 0 rgba(244,236,219,.6); }
.skills__tags { display: flex; flex-wrap: wrap; gap: 12px 14px; max-width: min(100%, 1320px); }
.skill {
  position: relative;
  display: inline-block;
  padding: .5em 1em .42em;
  font-family: var(--body); font-size: clamp(16px, 1.4vw, 27px);
  letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 10px 20px -12px rgba(18,18,18,.75), inset 0 0 0 1px rgba(18,18,18,.12);
  cursor: grab; user-select: none; touch-action: none;
  will-change: transform;
}
.skill--red { background: var(--red); color: var(--paper); box-shadow: 0 10px 20px -12px rgba(18,18,18,.75); }
.skill--ink { background: var(--ink); color: var(--paper); box-shadow: 0 10px 20px -12px rgba(18,18,18,.75); }
.skill--orange { background: var(--orange); color: var(--paper); box-shadow: 0 10px 20px -12px rgba(18,18,18,.75); }
.skill--blue { background: #2f6db5; color: var(--paper); box-shadow: 0 10px 20px -12px rgba(18,18,18,.75); }
.skill--ghost { pointer-events: none; z-index: 2; white-space: nowrap; }
.skill.is-held { cursor: grabbing; z-index: 3; box-shadow: 0 22px 30px -14px rgba(18,18,18,.8); }
.skills__line {
  margin: 4px 0 0; max-width: 36em;
  padding: 10px 14px; background: var(--ink); color: var(--paper);
  font-family: var(--body); font-size: clamp(17px, 1.3vw, 23px); letter-spacing: .05em; text-transform: uppercase; line-height: 1.35;
}
.skills__line[hidden] { display: none; }
.skills__hint {
  position: absolute; right: var(--gutter); top: 0; margin: 0;
  padding: 5px 10px; background: rgba(244,236,219,.9); color: rgba(18,18,18,.7);
  font-family: var(--body); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  pointer-events: none;
}

.skills__index {
  display: flex; gap: clamp(10px, 1vw, 16px);
  overflow-x: auto; scrollbar-width: none;
  padding: 14px var(--gutter) 10px max(var(--gutter), min(11.5vw, 260px));
}
.skills__index::-webkit-scrollbar { display: none; }
.note {
  position: relative; flex: 0 0 auto;
  width: clamp(118px, 9.6vw, 168px); min-height: clamp(78px, 9.5vh, 104px);
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  padding: 10px 11px 9px; border: 0; cursor: pointer; text-align: left;
  background: #f6e7b8; color: var(--ink); font: inherit;
  rotate: var(--tilt, 0deg);
  box-shadow: 0 12px 20px -14px rgba(18,18,18,.8);
  transition: rotate .5s var(--ease-out), translate .5s var(--ease-out), background-color .4s var(--ease-out), color .4s var(--ease-out);
}
.note::before {
  content: ""; position: absolute; top: -8px; left: 50%; width: 46px; height: 15px;
  translate: -50% 0; rotate: 4deg; background: rgba(244,236,219,.75);
}
.note:hover { rotate: 0deg; translate: 0 -6px; }
.note[aria-selected="true"] { background: var(--red); color: var(--paper); rotate: 0deg; translate: 0 -10px; }
.note--ink { background: var(--ink); color: var(--paper); }
.note--ink[aria-selected="true"] { background: var(--orange); }
.note:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.note__title { font-family: var(--display); text-transform: uppercase; font-size: clamp(15px, 1.12vw, 20px); line-height: .95; }
.note__count { margin-top: 8px; font-family: var(--body); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .65; }

@media (max-width: 720px) {
  .sec__body.skills { margin-left: calc(-1 * var(--gutter)); }
  .skills__stage, .skills__index { padding-left: var(--gutter); }
  .skills__hint { display: none; }
  .skill { font-size: 15px; }
  .note { width: 124px; }
}

/* =========================================================
   Contact: links + letter form
   ========================================================= */
.sec__body.contact { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(12px, 1.6vh, 18px); margin-top: 4px; }
.contact__lead {
  margin: 0; max-width: 34em;
  padding: 10px 14px 9px;
  background: rgba(244,236,219,.94); color: var(--ink);
  font-family: var(--body); font-size: clamp(17px, 1.3vw, 24px); line-height: 1.35;
  letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 10px 22px -14px rgba(18,18,18,.7);
}
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__btn {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .45em 1.1em .4em; border: 0; cursor: pointer;
  background: var(--ink); color: var(--paper);
  font-family: var(--display); font-size: clamp(17px, 1.35vw, 26px); letter-spacing: .05em; text-transform: uppercase;
  box-shadow: 0 12px 24px -14px rgba(18,18,18,.8);
  transition: background-color .35s var(--ease-out), translate .35s var(--ease-out);
}
.contact__btn--talk { background: var(--red); flex-direction: column; align-items: flex-start; gap: 2px; padding-bottom: .5em; }
.contact__btn-main { display: inline-flex; gap: .4em; }
.contact__btn-sub { font-family: var(--body); font-size: .55em; letter-spacing: .08em; opacity: .85; }
.contact__btn--quiet { background: rgba(244,236,219,.94); color: var(--ink); }
.contact__btn:hover { background: var(--orange); color: var(--paper); translate: 0 -2px; }
.contact__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 720px) {
  .contact__btn { font-size: 16px; }
}

/* =========================================================
   About (#about): "Human behind the pixels"
   ========================================================= */
#about { overflow-y: auto; padding-bottom: 72px; scrollbar-width: none; pointer-events: auto; overscroll-behavior: contain; }
#about::-webkit-scrollbar { display: none; }
.sec__body.about { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 2vh, 22px); max-width: 100%; }
.about__lead {
  margin: 0;
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(24px, 2.4vw, 44px); line-height: .95;
  color: var(--paper);
  text-shadow: .035em .045em 0 rgba(18,18,18,.6);
}
.about__cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 28px);
  width: min(100%, 1120px);
  perspective: 900px;
}
.about__card {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(16px, 1.8vw, 26px) clamp(16px, 1.8vw, 26px) clamp(16px, 1.6vw, 22px);
  background: var(--paper); color: var(--ink);
  rotate: var(--tilt, 0deg);
  box-shadow: 0 24px 40px -22px rgba(0,0,0,.85);
  transform-style: preserve-3d;
  transition: rotate .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.about__card::before { /* tape */
  content: ""; position: absolute; top: -10px; left: 50%; width: 74px; height: 20px;
  translate: -50% 0; rotate: -3deg; background: rgba(244,236,219,.75);
  box-shadow: 0 1px 2px rgba(18,18,18,.2);
}
.about__card:hover { rotate: 0deg; box-shadow: 0 34px 50px -24px rgba(0,0,0,.9); }
.about__card--warm { background: #efe1c4; }
.about__kicker {
  align-self: flex-start; padding: 4px 9px 3px;
  background: var(--red); color: var(--paper);
  font-family: var(--body); font-size: clamp(13px, .9vw, 16px); letter-spacing: .1em; text-transform: uppercase;
}
.about__head {
  margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(22px, 2vw, 36px); line-height: .95; text-wrap: balance;
}
.about__text {
  margin: 0; font-family: var(--body); text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(15px, 1.1vw, 20px); line-height: 1.35;
}
.about__pull {
  margin: 2px 0 0; padding-top: 10px; border-top: 2px solid rgba(18,18,18,.15);
  font-family: var(--display); text-transform: uppercase; color: var(--red);
  font-size: clamp(16px, 1.25vw, 22px); line-height: 1;
}
.about__close { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.about__closer {
  margin: 0; padding: 8px 12px 7px; background: var(--ink); color: var(--paper);
  font-family: var(--body); font-size: clamp(15px, 1.1vw, 19px); letter-spacing: .06em; text-transform: uppercase;
}
.about__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.about__btn {
  border: 0; cursor: pointer; padding: .45em 1.1em .4em;
  background: var(--paper); color: var(--ink);
  font-family: var(--display); font-size: clamp(17px, 1.3vw, 24px); letter-spacing: .05em; text-transform: uppercase;
  box-shadow: 0 12px 24px -14px rgba(0,0,0,.85);
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), translate .35s var(--ease-out);
}
.about__btn--red { background: var(--red); color: var(--paper); }
.about__btn:hover { background: var(--orange); color: var(--paper); translate: 0 -2px; }
.about__btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.about__btn span { display: inline-block; transition: transform .4s var(--ease-out); }
.about__btn:hover span { transform: translateX(4px); }

@media (max-width: 860px) {
  .about__cards { grid-template-columns: 1fr; }
  #about { padding-bottom: 104px; }
}

/* =========================================================
   More rabbit holes (#more): What the font?! quiz
   ========================================================= */
#more { overflow-y: auto; padding-bottom: 92px; scrollbar-width: none; pointer-events: auto; overscroll-behavior: contain; gap: clamp(10px, 1.4vw, 20px); }
#more::-webkit-scrollbar { display: none; }
.sec__kicker {
  margin: 0 0 -6px; align-self: flex-start;
  padding: 4px 10px 3px; background: var(--red); color: var(--paper);
  font-family: var(--body); font-size: clamp(14px, 1vw, 18px); letter-spacing: .1em; text-transform: uppercase;
}
.sec__body.quiz { width: 100%; }
.quiz__board {
  position: relative;
  width: min(100%, 900px);
  display: flex; flex-direction: column; gap: clamp(12px, 1.6vh, 18px);
  padding: clamp(18px, 2.2vw, 32px);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 34px 60px -28px rgba(0,0,0,.9);
}
.quiz__board::before { /* tape */
  content: ""; position: absolute; top: -10px; left: 64px; width: 84px; height: 22px; rotate: -4deg;
  background: rgba(244,236,219,.78); box-shadow: 0 1px 2px rgba(18,18,18,.2);
}
.quiz__board::after { /* grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .1; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.quiz__board > * { margin: 0; position: relative; z-index: 1; }
.quiz__lead { font-family: var(--display); text-transform: uppercase; font-size: clamp(24px, 2.4vw, 40px); line-height: .98; text-wrap: balance; }
.quiz__meta { font-family: var(--body); text-transform: uppercase; letter-spacing: .05em; font-size: clamp(16px, 1.2vw, 21px); color: rgba(18,18,18,.7); }
.quiz__kicker { align-self: flex-start; padding: 4px 9px 3px; background: var(--ink); color: var(--paper); font-family: var(--body); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.quiz__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.quiz__row--actions { justify-content: space-between; }
.quiz__btn {
  border: 0; cursor: pointer; padding: .5em 1.1em .45em;
  background: var(--ink); color: var(--paper);
  font-family: var(--display); font-size: clamp(16px, 1.25vw, 22px); letter-spacing: .05em; text-transform: uppercase;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), opacity .3s, translate .3s var(--ease-out);
}
.quiz__btn--red { background: var(--red); }
.quiz__btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(18,18,18,.35); }
.quiz__btn:hover:not(:disabled) { background: var(--orange); color: var(--paper); box-shadow: none; translate: 0 -1px; }
.quiz__btn:disabled { opacity: .35; cursor: default; }
.quiz__btn:focus-visible, .quiz__adv:focus-visible, .quiz__opt:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.quiz__adventures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quiz__adv {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  padding: 14px 16px; border: 0; background: #efe3c6; color: var(--ink); font: inherit;
  box-shadow: inset 0 0 0 1.5px rgba(18,18,18,.15);
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), translate .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.quiz__adv:hover { background: var(--ink); color: var(--paper); translate: 0 -2px; box-shadow: 0 12px 20px -14px rgba(18,18,18,.8); }
.quiz__adv-title { font-family: var(--display); text-transform: uppercase; font-size: clamp(20px, 1.7vw, 28px); line-height: .95; }
.quiz__adv-sub { font-family: var(--body); text-transform: uppercase; letter-spacing: .05em; font-size: clamp(14px, 1vw, 17px); opacity: .7; }
.quiz__before { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding-top: 12px; border-top: 2px solid rgba(18,18,18,.12);
  font-family: var(--body); text-transform: uppercase; letter-spacing: .05em; font-size: clamp(14px, 1vw, 17px); color: rgba(18,18,18,.75); }
.quiz__before-label { color: var(--red); }

.quiz__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.quiz__count { font-family: var(--body); text-transform: uppercase; letter-spacing: .1em; font-size: 15px; font-variant-numeric: tabular-nums; }
.quiz__adv-chip { padding: 3px 8px 2px; background: var(--ink); color: var(--paper); font-family: var(--body); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.quiz__dots { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 4px; }
.quiz__dots li { width: 16px; height: 6px; background: rgba(18,18,18,.15); }
.quiz__dots li.is-on { background: var(--ink); }
.quiz__dots li.is-right { background: #2f6db5; }
.quiz__dots li.is-wrong { background: var(--red); }
.quiz__q { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(24px, 2.3vw, 40px); line-height: 1; text-wrap: balance; }
.quiz__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quiz__opt {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 12px 14px; border: 0; background: #efe3c6; color: var(--ink); font: inherit;
  box-shadow: inset 0 0 0 1.5px rgba(18,18,18,.15);
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), box-shadow .25s var(--ease-out), opacity .3s;
}
.quiz__opt-key { flex: none; display: grid; place-items: center; width: 28px; height: 28px; background: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(18,18,18,.3); font-family: var(--display); font-size: 16px; }
.quiz__opt-text { font-family: var(--body); text-transform: uppercase; letter-spacing: .04em; font-size: clamp(16px, 1.2vw, 21px); line-height: 1.2; }
.quiz__opt:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--ink); }
.quiz__opt[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.quiz__opt[aria-checked="true"] .quiz__opt-key { background: var(--red); color: var(--paper); box-shadow: none; }
.quiz__opt:disabled { cursor: default; }
.quiz__opt.is-answer { background: #2f6db5; color: var(--paper); box-shadow: none; }
.quiz__opt.is-answer .quiz__opt-key { background: var(--paper); color: #2f6db5; box-shadow: none; }
.quiz__opt.is-miss { background: var(--red); color: var(--paper); box-shadow: none; text-decoration: line-through; text-decoration-thickness: 2px; }
.quiz__opt.is-miss .quiz__opt-key { background: var(--paper); color: var(--red); box-shadow: none; }
.quiz__opt.is-dim { opacity: .4; }

.quiz__hint { display: flex; flex-direction: column; gap: 4px; overflow: hidden; padding: 10px 14px; background: var(--ink); color: var(--paper);
  font-family: var(--body); text-transform: uppercase; letter-spacing: .05em; font-size: clamp(15px, 1.1vw, 19px); }
.quiz__hint[hidden] { display: none; }
.quiz__hint-label { color: var(--orange); font-size: .8em; letter-spacing: .1em; }

.quiz__feedback { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: #efe3c6; }
.quiz__feedback[hidden] { display: none; }
.quiz__feedback.is-right { box-shadow: inset 4px 0 0 #2f6db5; }
.quiz__feedback.is-wrong { box-shadow: inset 4px 0 0 var(--red); }
.quiz__feedback > p { margin: 0; }
.quiz__stamp {
  position: absolute; top: 10px; right: 14px;
  padding: 4px 12px 2px; border: 3px solid currentColor;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: clamp(18px, 1.5vw, 24px);
}
.quiz__feedback.is-right .quiz__stamp { color: #2f6db5; }
.quiz__feedback.is-wrong .quiz__stamp { color: var(--red); }
.quiz__fb-title { font-family: var(--display); text-transform: uppercase; font-size: clamp(22px, 1.9vw, 32px); line-height: 1; padding-right: 130px; }
.quiz__fb-lead { font-family: var(--body); text-transform: uppercase; letter-spacing: .05em; font-size: clamp(15px, 1.05vw, 18px); color: rgba(18,18,18,.7); }
.quiz__fb-lead b { color: var(--ink); font-weight: 400; background: rgba(47,109,181,.18); padding: 0 .2em; }
.quiz__fb-story { font-family: var(--body); text-transform: uppercase; letter-spacing: .04em; font-size: clamp(16px, 1.2vw, 21px); line-height: 1.38; }

.quiz__result-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 3.2vw, 56px); line-height: .95; }
.quiz__score { font-family: var(--body); text-transform: uppercase; letter-spacing: .05em; font-size: clamp(18px, 1.4vw, 24px); }
.quiz__score b { font-family: var(--display); font-weight: 400; font-size: 2.2em; color: var(--red); vertical-align: -.12em; font-variant-numeric: tabular-nums; }
.quiz__ego { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; background: var(--ink); color: var(--paper); box-shadow: 0 16px 26px -16px rgba(18,18,18,.8); }
.quiz__ego-label { font-family: var(--body); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; opacity: .7; }
.quiz__ego-name { font-family: var(--display); text-transform: uppercase; font-size: clamp(28px, 2.8vw, 46px); line-height: .95; color: var(--orange); }
.quiz__ego-line { font-family: var(--body); text-transform: uppercase; letter-spacing: .05em; font-size: clamp(15px, 1.1vw, 19px); }
.quiz__share { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; box-shadow: inset 0 0 0 1.5px rgba(18,18,18,.25); }
.quiz__share[hidden] { display: none; }
.quiz__share .quiz__ego-label { opacity: .6; }
.quiz__share-text { font-family: var(--display); text-transform: uppercase; font-size: clamp(18px, 1.5vw, 26px); line-height: 1.05; user-select: all; }
.quiz__share-note { font-family: var(--body); text-transform: uppercase; letter-spacing: .06em; font-size: 13px; color: var(--red); }

@media (max-width: 720px) {
  #more { padding-bottom: 104px; }
  .quiz__adventures, .quiz__opts { grid-template-columns: 1fr; }
  .quiz__dots { margin-left: 0; flex: 1 1 100%; }
  .quiz__stamp { position: static; align-self: flex-start; }
  .quiz__fb-title { padding-right: 0; }
}

/* =========================================================
   How I deal with hard problems (#problems)
   ========================================================= */
#problems { overflow-y: auto; padding-bottom: 96px; scrollbar-width: none; pointer-events: auto; overscroll-behavior: contain; }
#problems::-webkit-scrollbar { display: none; }
.sec__body.probs { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(16px, 2.2vh, 26px); width: min(100%, 1280px); }

.probs__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 64em; }
.probs__intro p { margin: 0; }
.probs__intro > p:first-child {
  padding: 12px 16px 11px; background: rgba(18,18,18,.78); color: var(--paper);
  font-family: var(--body); text-transform: uppercase; letter-spacing: .05em;
  font-size: clamp(15px, 1.1vw, 20px); line-height: 1.4;
}
.probs__intro b { font-weight: 400; color: var(--orange); }
.probs__pick {
  padding: 5px 11px 4px; background: var(--red); color: var(--paper);
  font-family: var(--display); text-transform: uppercase; letter-spacing: .05em;
  font-size: clamp(16px, 1.25vw, 22px);
}
.probs__pick span { display: inline-block; animation: probs-nudge 1.6s ease-in-out infinite; }
@keyframes probs-nudge { 50% { translate: 0 3px; } }

/* the four situations */
.probs__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 22px); width: 100%;
  perspective: 900px;
}
.prob {
  position: relative; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: clamp(16px, 1.5vw, 24px) clamp(14px, 1.4vw, 22px) clamp(14px, 1.3vw, 20px);
  border: 0; background: var(--paper); color: var(--ink);
  rotate: var(--tilt, 0deg);
  box-shadow: 0 24px 40px -22px rgba(0,0,0,.85);
  transform-style: preserve-3d;
  transition: rotate .6s var(--ease-out), box-shadow .6s var(--ease-out), background-color .45s var(--ease-out), color .45s var(--ease-out), translate .6s var(--ease-out);
}
.prob::before { /* tape */
  content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 20px;
  translate: -50% 0; rotate: -3deg; background: rgba(244,236,219,.75);
  box-shadow: 0 1px 2px rgba(18,18,18,.2);
}
.prob:hover { rotate: 0deg; box-shadow: 0 34px 50px -24px rgba(0,0,0,.9); }
.prob:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.prob__num {
  font-family: var(--display); font-size: clamp(30px, 2.6vw, 48px); line-height: .8; color: var(--red);
  transition: color .45s var(--ease-out);
}
.prob__quote {
  font-family: var(--display); text-transform: uppercase; font-weight: 400;
  font-size: clamp(19px, 1.55vw, 28px); line-height: .98; text-wrap: balance;
}
.prob__wins { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.prob__win {
  padding: 4px 8px 3px; background: var(--ink); color: var(--paper);
  font-family: var(--body); text-transform: uppercase; letter-spacing: .05em;
  font-size: clamp(13px, .92vw, 16px); line-height: 1.15;
}
.prob__open {
  display: flex; align-items: center; justify-content: space-between; align-self: stretch;
  padding-top: 10px; border-top: 2px solid rgba(18,18,18,.14);
  font-family: var(--display); text-transform: uppercase; letter-spacing: .05em;
  font-size: clamp(14px, 1vw, 17px); color: var(--red);
  transition: border-color .45s var(--ease-out), color .45s var(--ease-out);
}
.prob__open i { position: relative; width: 14px; height: 14px; }
.prob__open i::before, .prob__open i::after {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: currentColor;
  transition: rotate .5s var(--ease-out);
}
.prob__open i::after { rotate: 90deg; }
/* open card turns ink, the others step back */
.prob.is-open { background: var(--ink); color: var(--paper); rotate: 0deg; translate: 0 -8px; box-shadow: 0 34px 54px -24px rgba(0,0,0,.95); }
.prob.is-open .prob__num { color: var(--orange); }
.prob.is-open .prob__win { background: var(--red); }
.prob.is-open .prob__open { color: var(--orange); border-color: rgba(244,236,219,.18); }
.prob.is-open .prob__open i::after { rotate: 0deg; }

/* the story: usual move vs what I do */
.probs__panel { width: 100%; overflow: hidden; }
.probs__panel[hidden] { display: none; }
.pd {
  position: relative; margin: 6px 0 4px;
  display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 22px);
  padding: clamp(18px, 2vw, 32px);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 34px 60px -28px rgba(0,0,0,.9);
}
.pd::after { /* grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .1; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.pd > * { position: relative; z-index: 1; }
.pd p { margin: 0; }
.pd__top { display: flex; align-items: baseline; gap: 14px; padding-right: 40px; }
.pd__num { font-family: var(--display); color: var(--red); font-size: clamp(26px, 2.2vw, 40px); line-height: .8; }
.pd__quote { font-family: var(--display); text-transform: uppercase; font-size: clamp(22px, 2vw, 36px); line-height: .95; }
.pd__cols { display: grid; grid-template-columns: minmax(0, .85fr) auto minmax(0, 1.25fr); gap: clamp(14px, 2vw, 32px); align-items: start; }
.pd__label {
  display: inline-block; margin-bottom: 8px; padding: 4px 9px 3px;
  background: rgba(18,18,18,.12); color: var(--ink);
  font-family: var(--body); text-transform: uppercase; letter-spacing: .1em; font-size: clamp(13px, .9vw, 15px);
}
.pd__label--red { background: var(--red); color: var(--paper); }
.pd__usual p, .pd__mine p, .pd__where p {
  font-family: var(--body); text-transform: uppercase; letter-spacing: .04em; line-height: 1.38;
  font-size: clamp(16px, 1.2vw, 21px);
}
.pd__mine p { font-size: clamp(17px, 1.32vw, 23px); }
/* the cross-out is a background line, so it draws across every wrapped line in turn */
.pd__strike {
  background: linear-gradient(var(--red), var(--red)) no-repeat 0 58% / 100% 3px;
}
.pd__arrow { font-family: var(--display); font-size: clamp(30px, 2.6vw, 48px); line-height: 1; color: var(--red); padding-top: 26px; }
.pd__where {
  display: flex; align-items: flex-start; gap: 16px;
  padding-top: clamp(12px, 1.4vw, 18px); border-top: 2px dashed rgba(18,18,18,.2);
}
.pd__stamp {
  flex: none; padding: 6px 10px 5px; rotate: -3deg;
  box-shadow: inset 0 0 0 2px var(--red); color: var(--red);
  font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: clamp(14px, 1vw, 17px);
}
.pd__where p { font-family: var(--display); font-size: clamp(17px, 1.35vw, 24px); line-height: 1.05; }
.pd__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border: 0; cursor: pointer;
  background: var(--ink); color: var(--paper);
  font-family: var(--display); font-size: 24px; line-height: 1;
  transition: background-color .3s var(--ease-out), rotate .4s var(--ease-out);
}
.pd__close:hover { background: var(--red); rotate: 90deg; }
.pd__close:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* how I'll show up */
.probs__team {
  width: 100%; display: flex; flex-direction: column; gap: 10px;
  padding: clamp(16px, 1.6vw, 24px); background: rgba(18,18,18,.82); color: var(--paper);
}
.probs__team-head { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(22px, 1.9vw, 34px); line-height: .95; color: var(--orange); }
.probs__team-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 26px); }
.probs__team-item { font-family: var(--body); text-transform: uppercase; letter-spacing: .04em; font-size: clamp(14px, 1.02vw, 18px); line-height: 1.35; }
.probs__team-item b { display: block; margin-bottom: 4px; font-family: var(--display); font-weight: 400; letter-spacing: .05em; font-size: clamp(17px, 1.3vw, 23px); line-height: 1; color: var(--paper); }
.probs__team-item span { opacity: .82; }

.probs__close { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.probs__closer {
  margin: 0; padding: 8px 12px 7px; background: var(--ink); color: var(--paper);
  font-family: var(--body); font-size: clamp(15px, 1.1vw, 19px); letter-spacing: .06em; text-transform: uppercase;
}
.probs__cta {
  border: 0; cursor: pointer; padding: .45em 1.1em .4em;
  background: var(--red); color: var(--paper);
  font-family: var(--display); font-size: clamp(17px, 1.3vw, 24px); letter-spacing: .05em; text-transform: uppercase;
  box-shadow: 0 12px 24px -14px rgba(0,0,0,.85);
  transition: background-color .35s var(--ease-out), translate .35s var(--ease-out);
}
.probs__cta:hover { background: var(--orange); translate: 0 -2px; }
.probs__cta:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.probs__cta span { display: inline-block; transition: transform .4s var(--ease-out); }
.probs__cta:hover span { transform: translateX(4px); }

@media (max-width: 1180px) {
  .probs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .probs__team-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  #problems { padding-bottom: 110px; }
  .probs__grid { grid-template-columns: 1fr; }
  .probs__team-list { grid-template-columns: 1fr; }
  .pd__cols { grid-template-columns: 1fr; }
  .pd__arrow { padding-top: 0; rotate: 90deg; justify-self: start; }
  .pd__where { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .probs__pick span { animation: none; } }

/* never show browser video chrome over the scene (play buttons, control bars) */
video::-webkit-media-controls,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
video { pointer-events: none; }
