/* Ridit Aggarwal, personal site. style.css */

:root {
  --cream: #F4EFE6;
  --cream-2: #EAE3D6;
  --ink: #17150F;
  --ink-2: #24221B;
  --orange: #FF5A1F;
  --green: #1E4D3B;
  --green-2: #2C6650;
  --yellow: #FFD449;
  --pink: #F6B7A6;
  --sky: #A9D8E8;
  --muted: #6D675B;
  --muted-d: #A8A193;
  --line: rgba(23, 21, 15, .14);
  --line-d: rgba(244, 239, 230, .16);

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --hand: "Kalam", "Comic Neue", cursive;

  --pad: clamp(16px, 3vw, 44px);
  --r: clamp(22px, 2.6vw, 40px);
  --ease: cubic-bezier(.77, 0, .18, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--sans); font-size: clamp(16px, 1.08vw, 18px); line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 1000; background: var(--yellow); padding: 10px 16px; border-radius: 99px; font-weight: 600; transition: top .3s var(--out); }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
.big { font-weight: 800; letter-spacing: -.045em; line-height: .9; }
.hand { font-family: var(--hand); font-weight: 400; line-height: 1.15; letter-spacing: 0; }
.small { font-size: 14px; line-height: 1.4; }
.muted { color: var(--muted); }
.on-dark .muted { color: var(--muted-d); }
.hl {
  background-image: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  background-repeat: no-repeat; background-size: 0% 100%;
  transition: background-size 1.1s var(--out) .35s;
}
.in .hl, .hl.in { background-size: 100% 100%; }

/* ---------- layout ---------- */
.wrap { padding-inline: var(--pad); }
.sheet { position: relative; border-radius: var(--r) var(--r) 0 0; margin-top: calc(var(--r) * -1); padding: clamp(90px, 11vw, 170px) var(--pad); }
.sheet--cream { background: var(--cream); }
.sheet--ink { background: var(--ink); color: var(--cream); }
.sheet--green { background: var(--green); color: var(--cream); }
.sheet--yellow { background: var(--yellow); }
.sheet--pink { background: var(--pink); }
.sheet--orange { background: var(--orange); }
.kicker { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: clamp(28px, 4vw, 56px); }
.kicker .hand { font-size: clamp(20px, 1.6vw, 26px); }
.h2 { font-size: clamp(54px, 9vw, 150px); }

/* ---------- nav ---------- */
.nav { position: fixed; z-index: 60; inset: 14px var(--pad) auto; display: flex; justify-content: space-between; align-items: center; pointer-events: none; transition: transform .7s var(--ease); }
.nav.is-hidden { transform: translateY(-140%); }
.nav > * { pointer-events: auto; }
.pill { display: flex; align-items: center; gap: 4px; background: rgba(244, 239, 230, .86); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border-radius: 99px; padding: 5px; box-shadow: 0 1px 0 rgba(23,21,15,.06), 0 8px 30px -12px rgba(23,21,15,.25); }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; font-weight: 700; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 50%; transition: transform .8s var(--out); }
.brand:hover img { transform: rotate(180deg); }
.nav__links a { padding: 9px 14px; border-radius: 99px; font-weight: 500; font-size: 15px; transition: background .3s; }
.nav__links a:hover { background: rgba(23,21,15,.07); }
.nav__links a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.nav__cta { background: var(--orange) !important; color: var(--ink); font-weight: 600 !important; }
.nav__menu { display: none; padding: 9px 16px; font-weight: 600; border-radius: 99px; background: var(--ink); color: var(--cream); }

.menu { position: fixed; inset: 0; z-index: 55; background: var(--orange); padding: 100px var(--pad) var(--pad); display: flex; flex-direction: column; justify-content: space-between; clip-path: circle(0 at calc(100% - 50px) 40px); transition: clip-path .8s var(--ease), visibility 0s .8s; visibility: hidden; }
.menu.is-open { clip-path: circle(150% at calc(100% - 50px) 40px); visibility: visible; transition: clip-path .9s var(--ease); }
.menu__list a { display: block; font-size: clamp(56px, 17vw, 110px); font-weight: 800; letter-spacing: -.05em; line-height: 1; padding: 6px 0; }
.menu__foot { display: flex; justify-content: space-between; font-family: var(--hand); font-size: 20px; }

/* ---------- cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 900; pointer-events: none; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; opacity: 0; transition: width .5s var(--out), height .5s var(--out), margin .5s var(--out), opacity .3s, background .3s; }
.cursor span { font-family: var(--hand); font-size: 18px; color: var(--ink); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.has-cursor .cursor { opacity: 1; }
.cursor.is-link { width: 40px; height: 40px; margin: -20px 0 0 -20px; background: rgba(255, 90, 31, .35); }
.cursor.has-label { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: var(--yellow); }
.cursor.has-label span { opacity: 1; transition-delay: .1s; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- preloader ---------- */
.loader { display: none; }
.is-loading .loader { display: block; position: fixed; inset: 0; z-index: 950; pointer-events: auto; }
.loader__panel { position: absolute; inset: 0; background: var(--ink); color: var(--cream); display: flex; flex-direction: column; justify-content: space-between; padding: var(--pad); }
.loader__curve { position: absolute; left: -10%; right: -10%; top: 100%; height: 22vh; background: var(--ink); border-radius: 0 0 50% 50%; transform-origin: top; }
.loader__hi { font-size: clamp(34px, 5vw, 70px); color: var(--yellow); clip-path: inset(0 100% 0 0); transition: clip-path 1.4s cubic-bezier(.65, .05, .36, 1) .2s; }
.loader.is-run .loader__hi { clip-path: inset(0 0 0 0); }
.loader__photos { position: absolute; left: 50%; top: 50%; width: clamp(160px, 18vw, 260px); aspect-ratio: 4/5; transform: translate(-50%, -50%); }
.loader__photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; opacity: 0; transform: scale(.9) rotate(var(--r, 0deg)); transition: opacity .25s, transform .5s var(--out); }
.loader__photos img.on { opacity: 1; transform: none rotate(var(--r, 0deg)); transform: rotate(var(--r, 0deg)); }
.loader__row { display: flex; justify-content: space-between; align-items: flex-end; }
.loader__count { font-size: clamp(80px, 14vw, 220px); font-weight: 800; letter-spacing: -.06em; line-height: .8; font-variant-numeric: tabular-nums; }
.loader.is-out { transform: translateY(-100%); transition: transform 1.1s var(--ease); }
.loader.is-out .loader__curve { transform: scaleY(1); }

/* ---------- page transition ---------- */
.pt { position: fixed; inset: 0; z-index: 800; pointer-events: none; }
.pt__panel { position: absolute; left: 0; right: 0; top: 0; height: 100%; background: var(--pt, var(--orange)); transform: translateY(calc(100% + 14vh)); display: grid; place-items: center; }
.pt__panel::before, .pt__panel::after { content: ""; position: absolute; left: -10%; right: -10%; height: 20vh; background: inherit; border-radius: 50%; }
.pt__panel::before { top: -10vh; transform: scaleY(1); transition: transform .9s var(--ease); }
.pt__panel::after { bottom: -10vh; transform: scaleY(0); }
.pt__label { font-family: var(--hand); font-size: clamp(30px, 4vw, 54px); opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .6s var(--out); }
.is-leaving .pt { pointer-events: auto; }
.is-leaving .pt__panel { transform: translateY(0); transition: transform .85s var(--ease); }
.is-leaving .pt__panel::before { transform: scaleY(0); }
.is-leaving .pt__label { opacity: 1; transform: none; transition-delay: .4s; }
.is-entering .pt__panel { transform: translateY(0); transition: none; }
.is-entering .pt__panel::before { transform: scaleY(0); transition: none; }
.is-entering .pt__label { opacity: 1; transform: none; transition: none; }
.is-entered .pt__panel { transform: translateY(-112%); transition: transform 1s var(--ease); }
.is-entered .pt__panel::after { transform: scaleY(1); transition: transform 1s var(--ease); }
.is-entered .pt__label { opacity: 0; transform: translateY(-30px); transition: opacity .3s, transform .5s; }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--out), transform 1.1s var(--out); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em 0 .1em; margin: -.08em 0 -.1em; }
.wi { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: left bottom; transition: transform 1.1s var(--out); transition-delay: calc(var(--i, 0) * 30ms + var(--d, 0s)); }
.in .wi { transform: none; }
.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s cubic-bezier(.65, .05, .36, 1) var(--d, .3s); }
.draw.in path { stroke-dashoffset: 0; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; padding: 120px var(--pad) clamp(40px, 5vw, 70px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.hero__name { font-size: clamp(68px, 17.6vw, 300px); position: relative; z-index: 3; pointer-events: none; }
.hero__name span { display: block; }
.hero__name .w { padding-top: .02em; }
.hero__foot { z-index: 4 !important; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: clamp(20px, 2.4vw, 36px); align-items: end; position: relative; z-index: 2; }
.hero__lede { grid-column: 1 / span 5; font-size: clamp(19px, 1.55vw, 24px); line-height: 1.35; font-weight: 500; max-width: 34ch; letter-spacing: -.01em; }
.hero__now { grid-column: 9 / span 4; justify-self: end; display: flex; gap: 12px; align-items: center; font-size: 15px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #2FB36B; box-shadow: 0 0 0 0 rgba(47,179,107,.6); animation: ping 2.2s infinite; flex: none; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(47,179,107,0); } 100% { box-shadow: 0 0 0 0 rgba(47,179,107,0); } }

.pins { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.pin { position: absolute; pointer-events: auto; will-change: transform; }
.pin__inner { position: relative; background: #fff; padding: 8px 8px 10px; border-radius: 6px; box-shadow: 0 18px 40px -18px rgba(23,21,15,.45), 0 2px 6px rgba(23,21,15,.08); transform: rotate(var(--rot, 0deg)); transition: transform .7s var(--out); }
.pin:hover .pin__inner { transform: rotate(0deg) scale(1.04); }
.pin__inner::before { content: ""; position: absolute; top: -12px; left: 50%; width: 74px; height: 24px; margin-left: -37px; background: rgba(255, 212, 73, .75); transform: rotate(calc(var(--rot, 0deg) * -1.5)); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pin img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.pin__note { position: absolute; font-family: var(--hand); font-size: clamp(17px, 1.35vw, 22px); line-height: 1.1; width: max-content; max-width: 16ch; color: var(--ink); }
.pin__note svg { width: 46px; height: 34px; color: var(--orange); margin-bottom: 2px; }
.pin--a { width: clamp(150px, 19vw, 330px); aspect-ratio: 4/3; right: 4%; top: 13%; --rot: -4deg; }
.pin--b { width: clamp(100px, 10vw, 180px); aspect-ratio: 3/4; right: 31%; top: 10%; --rot: 5deg; }
.pin--c { width: clamp(100px, 10vw, 180px); aspect-ratio: 3/4; left: 4%; top: 11%; --rot: -6deg; }
.pin--d { width: clamp(120px, 14vw, 240px); aspect-ratio: 4/3; left: 24%; top: 14%; --rot: 3deg; }
.pin--a .pin__inner, .pin--d .pin__inner { height: 100%; }
.pin--b .pin__inner, .pin--c .pin__inner { height: 100%; }
.pin--a .pin__note { left: -4%; top: 103%; }
.pin--b .pin__note { left: -4%; top: 104%; }
.pin--c .pin__note { left: 104%; top: 8%; }
.pin--d .pin__note { left: 104%; top: 40%; }

/* ---------- marquee ---------- */
.marquee { background: var(--yellow); overflow: hidden; padding: clamp(16px, 2vw, 28px) 0 calc(clamp(16px, 2vw, 28px) + var(--r)); position: relative; z-index: 1; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__item { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); padding-right: clamp(16px, 2vw, 32px); font-size: clamp(42px, 6.6vw, 110px); font-weight: 800; letter-spacing: -.05em; white-space: nowrap; line-height: 1; }
.marquee__item img { height: .78em; width: 1.3em; object-fit: cover; border-radius: 99px; }
.marquee__item i { font-style: normal; font-family: var(--hand); font-weight: 400; font-size: .55em; letter-spacing: 0; color: var(--orange); }

/* ---------- intro ---------- */
.intro__text { font-size: clamp(30px, 4.3vw, 72px); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; }
.intro__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.intro__text { grid-column: 1 / span 11; }
.intro__note { grid-column: 9 / span 4; margin-top: clamp(24px, 3vw, 40px); font-size: clamp(20px, 1.6vw, 26px); color: var(--orange); transform: rotate(-2deg); }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(48px, 6vw, 96px); }
.stat { border-radius: 22px; padding: 20px 20px 18px; display: flex; flex-direction: column; justify-content: space-between; min-height: 190px; gap: 20px; transition: transform .6s var(--out); }
.stat:hover { transform: translateY(-6px) rotate(-1deg); }
.stat:nth-child(1) { background: var(--orange); }
.stat:nth-child(2) { background: var(--sky); }
.stat:nth-child(3) { background: var(--pink); }
.stat:nth-child(4) { background: var(--green); color: var(--cream); }
.stat strong { font-size: clamp(48px, 5vw, 86px); font-weight: 800; letter-spacing: -.05em; line-height: .9; }
.stat span { font-weight: 500; line-height: 1.3; max-width: 20ch; }
.scrub .sw { transition: opacity .2s linear; }

/* ---------- three cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 22px); }
.card { position: relative; border-radius: 30px; padding: clamp(20px, 2vw, 30px); min-height: clamp(420px, 40vw, 600px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate; transition: transform .7s var(--out); }
.card--orange { background: var(--orange); }
.card--green { background: var(--green); color: var(--cream); }
.card--yellow { background: var(--yellow); }
.card:hover { transform: translateY(-8px); }
.card__top { display: flex; justify-content: space-between; align-items: baseline; }
.card__top .hand { font-size: 22px; }
.card__num { font-weight: 700; font-size: 15px; }
.stack { position: relative; height: clamp(160px, 15vw, 230px); margin: 10px 0; }
.stack img { position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 6px solid #fff; box-shadow: 0 16px 30px -14px rgba(0,0,0,.45); transition: transform .8s var(--out); }
.stack img:nth-child(1) { transform: translate(-50%, -50%) rotate(-8deg); }
.stack img:nth-child(2) { transform: translate(-50%, -50%) rotate(5deg); }
.stack img:nth-child(3) { transform: translate(-50%, -50%) rotate(-1deg); }
.card:hover .stack img:nth-child(1) { transform: translate(-108%, -48%) rotate(-12deg); }
.card:hover .stack img:nth-child(2) { transform: translate(8%, -54%) rotate(10deg); }
.card:hover .stack img:nth-child(3) { transform: translate(-50%, -40%) rotate(-2deg) scale(1.06); }
.card__title { font-size: clamp(54px, 5.6vw, 100px); }
.card__desc { margin-top: 14px; max-width: 30ch; font-weight: 500; line-height: 1.4; }
.card__go { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.round { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; transition: transform .6s var(--out), background .3s; flex: none; }
.round svg { width: 18px; height: 18px; }
.card--green .round { background: var(--cream); color: var(--ink); }
.card:hover .round { transform: rotate(-45deg) scale(1.08); }

/* ---------- SAFR ---------- */
.safr__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: end; margin-bottom: clamp(40px, 5vw, 80px); }
.safr__title { grid-column: 1 / span 6; font-size: clamp(110px, 21vw, 360px); color: var(--cream); position: relative; }
.safr__title .hand { display: block; font-size: clamp(20px, 1.8vw, 28px); letter-spacing: 0; font-weight: 400; color: var(--yellow); margin-top: 14px; transform: rotate(-2deg); line-height: 1.15; }
.safr__intro { grid-column: 8 / span 5; display: grid; gap: 18px; padding-bottom: 1.4vw; }
.safr__intro p { font-size: clamp(19px, 1.5vw, 24px); line-height: 1.35; font-weight: 500; }
.safr__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); align-items: start; }
.plate { grid-column: 1 / span 7; border-radius: 26px; overflow: hidden; background: var(--ink-2); border: 1px solid var(--line-d); }
.plate__bar { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-d); font-family: var(--hand); font-size: 18px; color: var(--muted-d); }
.plate svg { width: 100%; height: auto; }
.plate .part { transition: stroke .3s, fill .3s; }
.plate .lbl { fill: var(--muted-d); font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .02em; transition: fill .3s; }
.plate .lead { stroke: var(--muted-d); stroke-width: 1; transition: stroke .3s; }
.plate [data-part].is-on .lbl { fill: var(--yellow); }
.plate [data-part].is-on .lead, .plate [data-part].is-on .part { stroke: var(--yellow); }
.plate .sweep { transform-origin: 320px 150px; animation: sweep 4.5s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: rotate(-32deg); } to { transform: rotate(32deg); } }
.plate .blink { animation: blink 1.6s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.plate .wave { animation: wave 2.4s var(--out) infinite; opacity: 0; }
.plate .wave:nth-of-type(2) { animation-delay: .3s; }
.plate .wave:nth-of-type(3) { animation-delay: .6s; }
@keyframes wave { 30% { opacity: 1; } 100% { opacity: 0; } }
.spec { grid-column: 8 / span 5; }
.spec__row { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line-d); transition: color .3s, padding .5s var(--out); }
.spec__row:last-child { border-bottom: 1px solid var(--line-d); }
.spec__row dt { color: var(--muted-d); font-weight: 600; font-size: 15px; }
.spec__row.is-on { color: var(--yellow); padding-left: 10px; }
.spec__row.is-on dt { color: var(--yellow); }
.safr__photo { margin-top: 18px; border-radius: 22px; overflow: hidden; position: relative; aspect-ratio: 4/3; }
.safr__photo img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.safr__photo figcaption { position: absolute; left: 14px; bottom: 12px; background: var(--cream); color: var(--ink); padding: 4px 12px; border-radius: 99px; font-family: var(--hand); font-size: 17px; }

.nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(48px, 6vw, 90px); }
.num { border-top: 2px solid var(--cream); padding-top: 14px; display: grid; gap: 8px; }
.num strong { font-size: clamp(46px, 5vw, 88px); font-weight: 800; letter-spacing: -.05em; line-height: .9; }
.num strong small { font-size: .45em; letter-spacing: -.02em; }
.num span { color: var(--muted-d); font-weight: 500; line-height: 1.35; max-width: 26ch; }

.sites { margin-top: clamp(64px, 8vw, 120px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
.sites__list { grid-column: 1 / span 6; }
.sites__list h3, .quotes h3 { font-family: var(--hand); font-weight: 400; font-size: clamp(22px, 1.8vw, 28px); color: var(--yellow); margin-bottom: 14px; }
.site { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line-d); transition: padding .5s var(--out), color .3s; }
.site:last-child { border-bottom: 1px solid var(--line-d); }
.site:hover { padding-left: 12px; color: var(--yellow); }
.site b { font-size: clamp(19px, 1.6vw, 26px); font-weight: 700; letter-spacing: -.02em; }
.site span { color: var(--muted-d); font-size: 15px; text-align: right; }
.quotes { grid-column: 8 / span 5; }
.quote { background: var(--cream); color: var(--ink); border-radius: 26px; padding: clamp(22px, 2.4vw, 34px); position: relative; min-height: 340px; display: flex; flex-direction: column; justify-content: space-between; }
.quote__slides { position: relative; flex: 1; }
.quote__slide { position: absolute; inset: 0; opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .7s var(--out); pointer-events: none; }
.quote__slide.on { opacity: 1; transform: none; pointer-events: auto; position: relative; }
.quote__mark { font-family: var(--hand); font-size: 80px; line-height: .6; color: var(--orange); display: block; height: 34px; }
.quote blockquote { font-size: clamp(19px, 1.5vw, 23px); line-height: 1.4; font-weight: 500; letter-spacing: -.01em; }
.quote cite { display: block; margin-top: 16px; font-style: normal; font-size: 15px; color: var(--muted); }
.quote__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.quote__dots { display: flex; gap: 6px; }
.quote__dots button { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .4s var(--out), background .3s; }
.quote__dots button[aria-current="true"] { width: 26px; background: var(--orange); }
.quote__arrows { display: flex; gap: 8px; }
.quote__arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; transition: background .3s, color .3s; }
.quote__arrows button:hover { background: var(--ink); color: var(--cream); }
.quote__arrows svg { width: 16px; height: 16px; }
.press { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.press .hand { color: var(--muted-d); font-size: 19px; margin-right: 4px; }

.tag { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 99px; border: 1.5px solid currentColor; font-weight: 600; font-size: 15px; transition: background .3s, color .3s, border-color .3s; }
.tag svg { width: 12px; height: 12px; transition: transform .5s var(--out); }
.tag:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.tag:hover svg { transform: translate(2px, -2px); }

.btn { display: inline-flex; align-items: center; gap: 14px; height: 58px; padding: 0 8px 0 24px; border-radius: 99px; background: var(--yellow); color: var(--ink); font-weight: 700; position: relative; overflow: hidden; isolation: isolate; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--orange); border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--ease); }
.btn:hover::before { transform: none; }
.btn .round { width: 44px; height: 44px; }
.btn:hover .round { transform: rotate(-45deg); }

/* ---------- experiments ---------- */
.fails { padding-bottom: 0; }
.fails__pin { position: relative; }
.fails__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.fails__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 0 var(--pad); margin-bottom: clamp(24px, 3vw, 44px); }
.fails__head .h2 { font-size: clamp(48px, 7.4vw, 124px); }
.fails__head p { max-width: 32ch; font-weight: 500; font-size: clamp(17px, 1.3vw, 20px); }
.fails__track { display: flex; gap: clamp(14px, 1.6vw, 26px); padding: 0 var(--pad); width: max-content; will-change: transform; }
.shot { flex: none; width: clamp(240px, 24vw, 400px); }
.shot--wide { width: clamp(320px, 36vw, 580px); }
.shot__img { border-radius: 18px; overflow: hidden; aspect-ratio: 3/4; background: var(--cream-2); }
.shot--wide .shot__img { aspect-ratio: 4/3; }
.shot__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--out); }
.shot:hover .shot__img img { transform: scale(1.05); }
.shot--diagram .shot__img { background: #fff; }
.shot--diagram .shot__img img { object-fit: contain; padding: 18px; }
.shot p { font-family: var(--hand); font-size: clamp(19px, 1.5vw, 24px); margin-top: 12px; line-height: 1.2; }
.fails__end { width: clamp(260px, 26vw, 420px); flex: none; align-self: center; font-size: clamp(26px, 2.4vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.fails__end a { display: inline-block; margin-top: 18px; }

/* ---------- about ---------- */
.about__title { font-size: clamp(80px, 14vw, 240px); margin-bottom: clamp(30px, 4vw, 60px); position: relative; display: inline-block; }
.about__title svg { position: absolute; left: 47%; bottom: -10%; width: 54%; height: auto; color: var(--orange); }
.box { border-radius: 30px; padding: clamp(20px, 3vw, 46px); }
.box + .box { margin-top: clamp(12px, 1.4vw, 22px); }
.box--white { background: #FFFCF6; box-shadow: 0 1px 0 var(--line); }
.box--sky { background: var(--sky); }
.box__label { font-family: var(--hand); font-size: clamp(20px, 1.6vw, 26px); margin-bottom: clamp(20px, 2.6vw, 40px); display: flex; justify-content: space-between; }
.bio { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 44px); }
.portrait { grid-column: 1 / span 4; position: relative; }
.portrait__img { border-radius: 20px; overflow: hidden; aspect-ratio: 4/5; background: var(--cream-2); }
.portrait__img img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 40%; transform: scale(1.5); transform-origin: 38% 42%; }
.portrait .hand { position: absolute; right: -6%; bottom: -5%; background: var(--yellow); padding: 6px 14px; border-radius: 8px; font-size: 19px; transform: rotate(-4deg); box-shadow: 0 10px 20px -12px rgba(0,0,0,.4); }
.bio__text { grid-column: 5 / span 8; display: grid; gap: 22px; align-content: start; }
.bio__lead { font-size: clamp(30px, 3.1vw, 52px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.bio__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 32px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.facts div { border-radius: 16px; background: var(--cream); padding: 14px; display: grid; gap: 4px; align-content: start; }
.facts dt { font-family: var(--hand); font-size: 18px; color: var(--muted); }
.facts dd { font-weight: 600; line-height: 1.3; }
.edu { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 44px); }
.edu__side { grid-column: 1 / span 4; display: grid; gap: 14px; align-content: start; }
.edu__side h3 { font-size: clamp(30px, 2.8vw, 46px); line-height: 1; letter-spacing: -.035em; font-weight: 800; }
.edu__side .polaroid { margin-top: 14px; }
.polaroid { background: #fff; padding: 8px 8px 12px; border-radius: 6px; box-shadow: 0 16px 30px -18px rgba(0,0,0,.5); transform: rotate(-2deg); transition: transform .6s var(--out); }
.polaroid:hover { transform: rotate(0) scale(1.02); }
.polaroid img { border-radius: 3px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.polaroid figcaption { font-family: var(--hand); font-size: 18px; padding: 8px 4px 0; }
.edu__main { grid-column: 5 / span 8; display: grid; gap: clamp(26px, 3vw, 44px); }
.edu__main h4 { font-family: var(--hand); font-weight: 400; font-size: 21px; margin-bottom: 12px; }
.grades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.grades div { background: rgba(255,255,255,.55); border-radius: 18px; padding: 14px; display: grid; gap: 10px; }
.grades > div > span { font-weight: 600; font-size: 14px; }
.grades strong { font-size: clamp(38px, 4vw, 70px); font-weight: 800; letter-spacing: -.05em; line-height: .9; font-variant-numeric: tabular-nums; }
.grades strong small { font-size: .42em; }
.aps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ap { border-radius: 18px; background: var(--ink); color: var(--cream); padding: 14px; display: grid; gap: 22px; transition: transform .5s var(--out), background .3s, color .3s; }
.ap:hover { transform: rotate(-3deg) translateY(-4px); background: var(--orange); color: var(--ink); }
.ap b { font-size: 46px; font-weight: 800; line-height: .8; letter-spacing: -.05em; }
.ap span { font-size: 14px; line-height: 1.25; font-weight: 600; }
.lead-list li { display: grid; grid-template-columns: 34px 1fr; padding: 13px 0; border-top: 1px solid rgba(23,21,15,.18); }
.lead-list li:last-child { border-bottom: 1px solid rgba(23,21,15,.18); }
.lead-list .hand { color: var(--orange); font-size: 20px; line-height: 1.2; }

/* ---------- footer ---------- */
.foot { padding-bottom: var(--pad); }
.foot__big { display: block; font-size: clamp(84px, 17vw, 300px); color: var(--cream); }
.foot__big span { display: inline-block; transition: transform .6s var(--out), color .3s; }
.foot__big:hover span { color: var(--yellow); }
.foot__big:hover span:nth-child(odd) { transform: translateY(-4%) rotate(-3deg); }
.foot__big:hover span:nth-child(even) { transform: translateY(3%) rotate(2deg); }
.foot__mail { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(48px, 6vw, 90px); border-bottom: 1px solid var(--line-d); }
.foot__mail > a { font-size: clamp(24px, 3vw, 52px); font-weight: 700; letter-spacing: -.03em; background-image: linear-gradient(var(--yellow), var(--yellow)); background-size: 0 3px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .6s var(--out); }
.foot__mail > a:hover { background-size: 100% 3px; }
.copy { height: 42px; padding: 0 18px; border-radius: 99px; border: 1.5px solid var(--line-d); font-weight: 600; font-size: 15px; transition: background .3s, color .3s, border-color .3s; }
.copy:hover { border-color: var(--cream); }
.copy.done { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.foot__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 16px; padding: 36px 0 64px; }
.foot__col { display: grid; gap: 8px; align-content: start; }
.foot__col h4 { font-family: var(--hand); font-weight: 400; font-size: 21px; color: var(--yellow); margin-bottom: 4px; }
.foot__col a { width: fit-content; font-weight: 500; position: relative; }
.foot__col a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--out); }
.foot__col a:hover::after { transform: scaleX(1); transform-origin: left; }
.foot__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; color: var(--muted-d); font-size: 14px; }
.foot__bar a:hover { color: var(--cream); }

/* ---------- sub page header ---------- */
.phead { padding: 150px var(--pad) clamp(80px, 9vw, 130px); position: relative; overflow: hidden; }
.phead--orange { background: var(--orange); }
.phead--green { background: var(--green); color: var(--cream); }
.phead--yellow { background: var(--yellow); }
.phead--ink { background: var(--ink); color: var(--cream); }
.phead__crumb { font-family: var(--hand); font-size: 21px; margin-bottom: clamp(16px, 2vw, 30px); }
.phead__crumb a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.phead__title { font-size: clamp(76px, 15.5vw, 270px); }
.phead__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: clamp(20px, 3vw, 44px); align-items: end; }
.phead__row p { grid-column: 1 / span 6; font-size: clamp(20px, 1.7vw, 28px); line-height: 1.3; font-weight: 500; letter-spacing: -.015em; }
.phead__row .hand { grid-column: 9 / span 4; justify-self: end; font-size: clamp(20px, 1.6vw, 26px); transform: rotate(-3deg); }
.phead__peek { position: absolute; right: var(--pad); top: 110px; width: clamp(120px, 15vw, 250px); }
.phead__peek .polaroid { transform: rotate(6deg); }

/* ---------- rows ---------- */
.group + .group { margin-top: clamp(70px, 9vw, 140px); }
.group__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.group__head h2 { font-size: clamp(46px, 6vw, 100px); }
.group__head .hand { font-size: clamp(19px, 1.5vw, 24px); color: var(--muted); }
.rows { border-top: 2px solid var(--ink); }
.row { border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.row__head { width: 100%; text-align: left; display: grid; grid-template-columns: 56px minmax(0, 6fr) minmax(0, 3fr) minmax(0, 2fr) 48px; gap: 16px; align-items: center; padding: clamp(20px, 2.2vw, 30px) 0; position: relative; }
.row__n { font-family: var(--hand); font-size: 20px; color: var(--muted); }
.row__title { font-size: clamp(26px, 2.8vw, 46px); font-weight: 800; letter-spacing: -.04em; line-height: 1; transition: transform .6s var(--out), color .3s; }
.row__head:hover .row__title { transform: translateX(12px); color: var(--orange); }
.row__title small { display: block; font-size: .44em; font-weight: 500; letter-spacing: -.01em; margin-top: 8px; color: var(--muted); }
.row__role { font-weight: 500; line-height: 1.35; font-size: 15px; }
.row__date { text-align: right; font-size: 15px; color: var(--muted); }
.row__plus { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--cream); justify-self: end; position: relative; transition: transform .6s var(--out), background .3s; }
.row__plus::before, .row__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 2px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); }
.row__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.row__head:hover .row__plus { background: var(--orange); }
.row.is-open .row__plus { transform: rotate(135deg); background: var(--orange); }
.row__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .8s var(--ease); }
.row.is-open .row__body { grid-template-rows: 1fr; }
.row__inner { overflow: hidden; }
.row__content { display: grid; grid-template-columns: 56px minmax(0, 6fr) minmax(0, 5fr); gap: 16px; padding: 0 0 clamp(30px, 3vw, 50px); opacity: 0; transform: translateY(18px); transition: opacity .5s, transform .8s var(--out); }
.row.is-open .row__content { opacity: 1; transform: none; transition-delay: .15s; }
.row__desc { grid-column: 2; display: grid; gap: 16px; max-width: 60ch; align-content: start; }
.row__lead { font-size: clamp(20px, 1.6vw, 25px); line-height: 1.35; font-weight: 600; letter-spacing: -.015em; }
.row__desc ul { display: grid; gap: 10px; }
.row__desc li { padding-left: 24px; position: relative; }
.row__desc li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.row__side { grid-column: 3; display: grid; gap: 16px; align-content: start; }
.facts-list div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts-list div:last-child { border-bottom: 1px solid var(--line); }
.facts-list dt { font-family: var(--hand); font-size: 18px; color: var(--muted); }
.facts-list dd { font-weight: 500; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photos button { border-radius: 12px; overflow: hidden; aspect-ratio: 1; }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--out); }
.photos button:hover img { transform: scale(1.08); }
.row__quote { background: var(--yellow); border-radius: 18px; padding: 16px 18px; font-weight: 500; line-height: 1.4; }
.row__quote cite { display: block; font-style: normal; font-family: var(--hand); font-size: 18px; margin-top: 8px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, #2FB36B); }

/* skills */
.skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.skill { border-radius: 22px; padding: 20px; display: grid; gap: 14px; align-content: start; }
.skill:nth-child(1) { background: var(--orange); }
.skill:nth-child(2) { background: var(--sky); }
.skill:nth-child(3) { background: var(--pink); }
.skill:nth-child(4) { background: var(--yellow); }
.skill h3 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.skill li { padding: 6px 0; border-top: 1px solid rgba(23,21,15,.18); font-weight: 500; font-size: 15px; }

/* ---------- hover peek ---------- */
.peek { position: fixed; left: 0; top: 0; z-index: 70; width: clamp(200px, 20vw, 320px); pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .5s var(--out); }
.peek.on { opacity: 1; transform: scale(1); }
.peek__inner { background: #fff; padding: 7px; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); will-change: transform; }
.peek img { width: 100%; height: auto; max-height: 260px; object-fit: cover; border-radius: 5px; }
@media (hover: none), (pointer: coarse) { .peek { display: none; } }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 700; background: rgba(23,21,15,.86); display: grid; place-items: center; padding: 60px var(--pad); opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.lb.open { opacity: 1; visibility: visible; transition: opacity .4s; }
.lb figure { max-width: min(1100px, 100%); max-height: 100%; display: grid; gap: 12px; transform: scale(.94) rotate(-1deg); transition: transform .6s var(--out); }
.lb.open figure { transform: none; }
.lb img { max-height: calc(100vh - 160px); width: auto; max-width: 100%; margin: 0 auto; border-radius: 10px; background: #fff; }
.lb figcaption { color: var(--cream); text-align: center; font-family: var(--hand); font-size: 21px; }
.lb__close { position: absolute; top: 18px; right: var(--pad); height: 44px; padding: 0 18px; border-radius: 99px; background: var(--cream); color: var(--ink); font-weight: 700; }

/* ---------- awards ---------- */
.feature { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: clamp(70px, 8vw, 130px); }
.medal { border-radius: 28px; padding: clamp(18px, 2vw, 28px); display: flex; flex-direction: column; gap: 18px; text-align: left; transition: transform .6s var(--out); }
.medal:hover { transform: translateY(-8px) rotate(-.6deg); }
.medal:nth-child(1) { background: var(--orange); }
.medal:nth-child(2) { background: var(--green); color: var(--cream); }
.medal:nth-child(3) { background: var(--sky); }
.medal__img { border-radius: 12px; overflow: hidden; background: #fff; aspect-ratio: 4/3; }
.medal__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1s var(--out); }
.medal:hover .medal__img img { transform: scale(1.05); }
.medal__fig { font-size: clamp(44px, 4.4vw, 76px); font-weight: 800; letter-spacing: -.05em; line-height: .9; }
.medal p { font-weight: 500; line-height: 1.4; }
.medal .hand { font-size: 19px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter { height: 42px; padding: 0 18px; border-radius: 99px; border: 1.5px solid var(--ink); font-weight: 600; font-size: 15px; transition: background .3s, color .3s; }
.filter:hover { background: rgba(23,21,15,.06); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.filter sup { font-size: 11px; margin-left: 3px; opacity: .6; }
.alist { border-top: 2px solid var(--ink); }
.aitem { border-bottom: 1px solid var(--line); transition: opacity .4s, transform .6s var(--out); }
.aitem.is-out { display: none; }
.aitem.fade { opacity: 0; transform: translateY(10px); }
.aitem > button, .aitem > div { width: 100%; text-align: left; display: grid; grid-template-columns: 56px minmax(0, 6fr) minmax(0, 4fr) 150px; gap: 16px; align-items: baseline; padding: 20px 0; }
.aitem h3 { font-size: clamp(21px, 2vw, 32px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; transition: transform .6s var(--out), color .3s; }
.aitem > button:hover h3 { transform: translateX(10px); color: var(--orange); }
.aitem p { color: var(--muted); font-size: 15px; line-height: 1.4; }
.aitem .chip { justify-self: end; font-size: 14px; font-weight: 600; padding: 4px 12px; border-radius: 99px; background: var(--c, var(--cream-2)); }
.aitem .see { font-family: var(--hand); font-size: 17px; color: var(--orange); display: block; margin-top: 4px; }

/* ---------- legal ---------- */
.legal { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.legal__toc { grid-column: 1 / span 3; position: sticky; top: 100px; align-self: start; display: grid; gap: 8px; }
.legal__toc a { color: var(--muted); font-weight: 500; transition: color .3s; }
.legal__toc a:hover { color: var(--ink); }
.legal__body { grid-column: 5 / span 7; display: grid; gap: 16px; max-width: 68ch; }
.legal__body h2 { font-size: clamp(26px, 2.4vw, 38px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin-top: 34px; scroll-margin-top: 100px; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body h2 .hand { display: block; font-size: 20px; font-weight: 400; color: var(--orange); letter-spacing: 0; margin-bottom: 4px; }
.legal__body ul { display: grid; gap: 8px; }
.legal__body li { padding-left: 22px; position: relative; }
.legal__body li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.legal__body a { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal__body .lead { font-size: clamp(22px, 2vw, 30px); line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px var(--pad) var(--pad); background: var(--yellow); }
.nf h1 { font-size: clamp(120px, 30vw, 520px); }
.nf p { font-size: clamp(20px, 1.8vw, 28px); font-weight: 500; max-width: 30ch; margin: 18px 0 28px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: span 2; min-height: 380px; }
  .safr__title, .safr__intro, .plate, .spec, .sites__list, .quotes { grid-column: 1 / -1; }
  .quotes { margin-top: 30px; }
  .nums { grid-template-columns: 1fr 1fr; row-gap: 30px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .skills { grid-template-columns: 1fr 1fr; }
  .feature { grid-template-columns: 1fr 1fr; }
  .feature .medal:last-child { grid-column: span 2; }
}
@media (max-width: 860px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__links .nav__cta { display: none; }
  .nav__menu { display: inline-flex; }
  .hero { padding-top: 96px; justify-content: flex-start; }
  .pins { position: relative; inset: auto; height: 100vw; margin-bottom: 18px; }
  .pin--a { right: 2%; top: 4%; width: 46vw; }
  .pin--b { right: auto; left: 6%; top: 56%; width: 28vw; }
  .pin--c { left: 2%; top: 2%; width: 30vw; }
  .pin--d { left: 42%; top: 46%; width: 50vw; }
  .pin__note { display: none; }
  .hero__lede { grid-column: 1 / -1; }
  .hero__now { grid-column: 1 / -1; justify-self: start; }
  .intro__text, .intro__note { grid-column: 1 / -1; }
  .bio > *, .edu > * { grid-column: 1 / -1 !important; }
  .portrait { max-width: 380px; }
  .bio__cols { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .aps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grades { grid-template-columns: 1fr 1fr; }
  .phead__row p, .phead__row .hand { grid-column: 1 / -1; justify-self: start; }
  .phead__peek { display: none; }
  .row__head { grid-template-columns: 34px minmax(0, 1fr) 46px; }
  .row__role, .row__date { display: none; }
  .row__meta { display: block !important; margin-top: 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
  .row__content { grid-template-columns: 1fr; }
  .row__desc, .row__side { grid-column: 1; }
  .aitem > button, .aitem > div { grid-template-columns: 34px 1fr; }
  .aitem p, .aitem .chip { grid-column: 2; justify-self: start; }
  .legal__toc { display: none; }
  .legal__body { grid-column: 1 / -1; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .fails__sticky { position: relative; height: auto; padding-bottom: 60px; }
  .fails__track { overflow-x: auto; width: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; -webkit-overflow-scrolling: touch; transform: none !important; }
  .shot { scroll-snap-align: start; width: 72vw; }
  .shot--wide { width: 86vw; }
  .fails__head { flex-direction: column; align-items: start; }
}
@media (max-width: 600px) {
  .cards, .feature, .skills { grid-template-columns: 1fr; }
  .cards .card:last-child, .feature .medal:last-child { grid-column: auto; }
  .card { min-height: 400px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { min-height: 150px; }
  .aps { grid-template-columns: 1fr 1fr; }
  .spec__row { grid-template-columns: 96px 1fr; }
  .site { grid-template-columns: 1fr; gap: 2px; }
  .site span { text-align: left; }
  .safr__title .hand { left: auto; right: 0; top: -12%; }
}
.row__meta { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .wi { transform: none; }
  .hl { background-size: 100% 100%; }
  .draw path { stroke-dashoffset: 0; }
}
.nf .btn { background: var(--ink); color: var(--cream); } .nf .btn .round { background: var(--yellow); color: var(--ink); }

/* ---------- crossword ---------- */
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- crossword ---------- */
.puzzle { grid-column: 6 / span 7; margin-top: clamp(30px, 4vw, 56px); display: grid; gap: 14px; justify-items: start; }
.puzzle__lead { font-size: clamp(20px, 1.6vw, 26px); color: var(--orange); transform: rotate(-1.5deg); }
.cw { background: var(--yellow); border-radius: 18px; padding: clamp(18px, 2vw, 26px); transform: rotate(1deg); box-shadow: 0 22px 40px -24px rgba(23,21,15,.5); max-width: 100%; transition: transform .6s var(--out); }
.cw:hover, .cw:focus-within { transform: rotate(0); }
.cw__top { display: flex; justify-content: space-between; font-family: var(--hand); font-size: 18px; margin-bottom: 6px; }
.cw__clue { font-size: clamp(22px, 2vw, 32px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 16px; }
.cw__clue span { font-weight: 500; color: var(--muted); }
.cw__grid { display: flex; flex-wrap: wrap; gap: 14px; }
.cw__word { display: flex; }
.cw__cell { width: clamp(30px, 3vw, 44px); aspect-ratio: 1; border: 2px solid var(--ink); margin-left: -2px; background: #fff; text-align: center; font: 700 clamp(16px, 1.5vw, 22px) var(--sans); text-transform: uppercase; color: var(--ink); padding: 0; border-radius: 0; caret-color: var(--orange); transition: background .3s, color .3s, transform .4s var(--out); }
.cw__word .cw__cell:first-child { margin-left: 0; }
.cw__cell:focus { outline: none; background: #FFF4CC; box-shadow: inset 0 0 0 2px var(--orange); position: relative; z-index: 1; }
.cw.is-right .cw__cell { background: var(--green); color: var(--cream); }
.cw.is-right .cw__cell { animation: pop .5s var(--out) both; animation-delay: calc(var(--k) * 40ms); }
@keyframes pop { 40% { transform: translateY(-6px); } }
.cw.is-wrong .cw__grid { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.cw__actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.cw__btn { height: 40px; padding: 0 18px; border-radius: 99px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 15px; }
.cw__btn:hover { background: var(--orange); color: var(--ink); }
.cw__giveup { font-size: 19px; text-decoration: underline; text-underline-offset: 4px; }
.cw__msg { font-size: 19px; margin-top: 10px; max-width: 34ch; line-height: 1.25; min-height: 1px; }
.cw__msg:empty { display: none; }
@media (max-width: 860px) { .puzzle { grid-column: 1 / -1; } }

/* ---------- cycling bits ---------- */
.marquee__item svg.bike { height: .62em; width: auto; aspect-ratio: 240 / 130; flex: none; }
.bikebit { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border: 1.5px dashed rgba(23, 21, 15, .28); border-radius: 18px; max-width: 64ch; }
.bike-doodle { width: clamp(96px, 9vw, 130px); height: auto; flex: none; color: var(--orange); }
.bikebit p { font-size: clamp(18px, 1.35vw, 21px); line-height: 1.25; }
@media (max-width: 600px) { .bikebit { flex-direction: column; align-items: flex-start; } }

/* ---------- hero photos sit higher on laptop screens ---------- */
@media (min-width: 861px) {
  .hero__name { font-size: clamp(68px, min(17.6vw, 25.5vh), 300px); }
  .pin--a { top: max(8%, 82px); width: min(19vw, 28vh); }
  .pin--b { top: max(6.5%, 80px); width: min(10vw, 15vh); }
  .pin--c { top: max(5%, 76px); width: min(9vw, 13vh); }
  .pin--d { top: max(9%, 84px); width: min(14vw, 20vh); }
  .shot { width: min(24vw, 400px, 37vh); }
  .shot--wide { width: min(36vw, 580px, 60vh); }
}

/* ---------- gallery video ---------- */
.shot__img video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- music switch ---------- */
.music { position: fixed; left: 16px; bottom: 16px; z-index: 65; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px; border-radius: 99px; background: rgba(244, 239, 230, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 6px 20px -10px rgba(23, 21, 15, .35); color: var(--ink); opacity: .75; transition: opacity .3s; }
.music:hover, .music:focus-visible { opacity: 1; }
.music__label { font-family: var(--hand); font-size: 16px; line-height: 1; }
.music__bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.music__bars i { width: 2px; height: 3px; background: var(--orange); border-radius: 2px; transition: height .3s; }
.music.is-on .music__bars i { animation: eq 1s ease-in-out infinite; }
.music.is-on .music__bars i:nth-child(2) { animation-delay: -.3s; }
.music.is-on .music__bars i:nth-child(3) { animation-delay: -.6s; }
.music.is-on .music__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.is-loading .music { opacity: 0; }
