/* =========================================================
   Aayush Shenday — Portfolio
   ========================================================= */

:root {
  --bg: #efefef; /* same off-white as the cover */
  --ink: #1b1b1b;
  --text: #4a4a4a;
  --muted: #8d8d8d;
  --hair: #cfcfcf;
  --ghost: rgba(0, 0, 0, 0.045);

  --dark-bg: #0c0a09;
  --dark-ink: #f4f1ee;
  --dark-text: #cfc9c4;

  --f-head: "Montserrat", "Poppins", sans-serif; /* same family as the name on the cover */
  --f-body: "Poppins", system-ui, sans-serif;

  --ease: cubic-bezier(.2, .7, .15, 1);
  --gutter: clamp(16px, 9vw, 180px);
}

*, *::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; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Page scaffold ---------- */

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 120px var(--gutter);
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Vertical page label — "P/ 02 | Intro" */
.page-label {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: .04em;
  color: #b4b4b4;
  z-index: 3;
}
.page-label i { width: 1px; height: 14px; background: currentColor; opacity: .7; }
.page-label span:first-child { font-family: var(--f-body); font-weight: 300; }

/* ---------- Headings with ghost duplicate ---------- */

.heading { position: relative; display: inline-block; }

/* Reference: big page headings ("Hello!", "Resume.") ≈ 4% of page width; the faint copy ≈ 1.4× that */
.heading h2 {
  position: relative;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(2.1rem, 4vw, 5rem);
  line-height: 1.1;
  color: var(--ink);
  z-index: 1;
}

.ghost {
  position: absolute;
  left: -0.5em;
  bottom: 0.1em;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(2.9rem, 5.6vw, 7rem);
  line-height: 1;
  color: var(--ghost);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  /* the reference's faint copy is a tall, narrow version of the heading */
  transform-origin: left bottom;
  scale: 1 1.55;
}

.ghost--num {
  font-weight: 300;
  letter-spacing: -.02em;
  font-size: clamp(3.6rem, 7vw, 8.5rem);
  left: -0.7em;
  bottom: 0.09em;
}

/* ---------- Placeholders (for content still to come) ---------- */

.placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed #c4c4c4;
  border-radius: 4px;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,.018) 14px 15px),
    #e7e7e7;
  color: #a5a5a5;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
}

/* =========================================================
   P/01 — COVER
   ========================================================= */

.cover {
  justify-content: center;
  background: #efefef;
  padding: 0 16px;
  isolation: isolate;
}

/* The bubble — drawn every frame on a canvas by main.js (soft pastel flow + its own fine grain).
   No CSS blur: the softness is in the gradients, and a blur would wipe out the grain. */
.cover__bubble {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.cover__grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .22;
  pointer-events: none;
  z-index: -2; /* background grain sits behind the bubble; the bubble carries its own moving grain */
}

.cover__name {
  position: relative;
  font-family: "Montserrat", "Poppins", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 5.6rem);
  letter-spacing: .03em;
  line-height: 1.2;
  text-rendering: geometricPrecision;
  text-align: center;
  white-space: nowrap;
  z-index: 1;
}

.cover__word { white-space: nowrap; }

/* Each letter is revealed only while the bubble covers it (main.js toggles .is-on).
   Its colour is a deeper tone of whichever pastel is flowing underneath it (set by main.js). */
.ch {
  position: relative;
  color: rgb(196, 112, 104);
}
.js .ch { opacity: 0; transition: opacity .09s linear; }
.js .ch.is-on { opacity: 1; }

/* Spider-Verse style glitch, per letter: pastel red / pastel blue copies split off behind it */
.ch::before,
.ch::after {
  content: attr(data-ch);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}
.ch::before { color: rgb(228, 152, 144); } /* a little deeper than the bubble's light red */
.ch::after  { color: rgb(142, 170, 222); } /* a little deeper than the bubble's light blue */

.ch.is-glitching { animation: chJitter .44s steps(1, end) var(--gd, 0s) both; }
.ch.is-glitching::before { animation: chSplitR .44s steps(1, end) var(--gd, 0s) both; }
.ch.is-glitching::after  { animation: chSplitB .44s steps(1, end) var(--gd, 0s) both; }
.ch.is-glitching.gv2::before { animation-name: chSplitR2; }
.ch.is-glitching.gv2::after  { animation-name: chSplitB2; }

@keyframes chSplitR {
  0%   { opacity: .9;  transform: translate(-3px, 0);    clip-path: inset(8% 0 54% 0); }
  14%  { opacity: .55; transform: translate(2px, -1px);  clip-path: inset(52% 0 14% 0); }
  28%  { opacity: .9;  transform: translate(-4px, 1px);  clip-path: inset(28% 0 36% 0); }
  42%  { opacity: .8;  transform: translate(2px, 0);     clip-path: inset(0 0 70% 0); }
  56%  { opacity: .5;  transform: translate(-2px, 0);    clip-path: inset(62% 0 4% 0); }
  70%  { opacity: .85; transform: translate(-2px, 0);    clip-path: inset(0 0 0 0); }
  86%  { opacity: .35; transform: translate(-1px, 0);    clip-path: inset(0 0 0 0); }
  100% { opacity: 0;   transform: none;                  clip-path: inset(0 0 0 0); }
}
@keyframes chSplitB {
  0%   { opacity: .9;  transform: translate(3px, 0);     clip-path: inset(44% 0 18% 0); }
  14%  { opacity: .6;  transform: translate(-2px, 1px);  clip-path: inset(10% 0 60% 0); }
  28%  { opacity: .9;  transform: translate(4px, -1px);  clip-path: inset(60% 0 6% 0); }
  42%  { opacity: .75; transform: translate(-2px, 0);    clip-path: inset(22% 0 42% 0); }
  56%  { opacity: .5;  transform: translate(3px, 0);     clip-path: inset(4% 0 66% 0); }
  70%  { opacity: .85; transform: translate(2px, 0);     clip-path: inset(0 0 0 0); }
  86%  { opacity: .35; transform: translate(1px, 0);     clip-path: inset(0 0 0 0); }
  100% { opacity: 0;   transform: none;                  clip-path: inset(0 0 0 0); }
}
@keyframes chSplitR2 {
  0%   { opacity: .85; transform: translate(-2px, 1px);  clip-path: inset(60% 0 8% 0); }
  16%  { opacity: .9;  transform: translate(-4px, 0);    clip-path: inset(14% 0 50% 0); }
  32%  { opacity: .5;  transform: translate(1px, 0);     clip-path: inset(38% 0 30% 0); }
  48%  { opacity: .85; transform: translate(-3px, -1px); clip-path: inset(0 0 62% 0); }
  66%  { opacity: .7;  transform: translate(-2px, 0);    clip-path: inset(0 0 0 0); }
  84%  { opacity: .3;  transform: translate(-1px, 0);    clip-path: inset(0 0 0 0); }
  100% { opacity: 0;   transform: none;                  clip-path: inset(0 0 0 0); }
}
@keyframes chSplitB2 {
  0%   { opacity: .85; transform: translate(2px, -1px);  clip-path: inset(6% 0 62% 0); }
  16%  { opacity: .9;  transform: translate(4px, 0);     clip-path: inset(48% 0 16% 0); }
  32%  { opacity: .5;  transform: translate(-1px, 0);    clip-path: inset(20% 0 44% 0); }
  48%  { opacity: .85; transform: translate(3px, 1px);   clip-path: inset(66% 0 0 0); }
  66%  { opacity: .7;  transform: translate(2px, 0);     clip-path: inset(0 0 0 0); }
  84%  { opacity: .3;  transform: translate(1px, 0);     clip-path: inset(0 0 0 0); }
  100% { opacity: 0;   transform: none;                  clip-path: inset(0 0 0 0); }
}
/* the letter itself flickers and nudges sideways a pixel or two */
@keyframes chJitter {
  0%   { left: 1px;  opacity: 1; }
  14%  { left: -1px; opacity: .78; }
  28%  { left: 2px;  opacity: 1; }
  42%  { left: 0;    opacity: .86; }
  56%  { left: -2px; opacity: 1; }
  70%  { left: 1px;  opacity: .92; }
  100% { left: 0;    opacity: 1; }
}

.cover__meta {
  position: absolute;
  left: clamp(20px, 4vw, 74px);
  bottom: clamp(28px, 6vh, 64px);
  font-size: 12px;
  line-height: 1.65;
  color: #a9a9a9;
  z-index: 3;
}
.cover__meta .cover__who {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.cover__meta .cover__role {
  font-size: 13px;
  font-weight: 400;
  color: #6f6f6f;
  margin-bottom: 4px;
}

.cover__scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  width: 22px; height: 36px;
  margin-left: -11px;
  border: 1px solid rgba(0,0,0,.22);
  border-radius: 12px;
  z-index: 3;
}
.cover__scroll span {
  position: absolute; left: 50%; top: 7px;
  width: 2px; height: 7px; margin-left: -1px;
  border-radius: 2px;
  background: rgba(0,0,0,.45);
  animation: scrollHint 2.2s var(--ease) infinite;
}
@keyframes scrollHint {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  80%, 100% { transform: translateY(12px); opacity: 0; }
}

/* cover entrance */
.cover__name, .cover__meta, .cover__scroll { opacity: 0; transition: opacity 1.6s var(--ease), transform 1.6s var(--ease); }
.cover__name { transform: translateY(18px) scale(.985); }
.is-loaded .cover__name { opacity: 1; transform: none; }
.is-loaded .cover__meta { opacity: 1; transition-delay: .5s; }
.is-loaded .cover__scroll { opacity: 1; transition-delay: .9s; }

/* =========================================================
   P/02 — INTRO
   ========================================================= */

.intro {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 6vw;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.intro__text { max-width: 640px; padding: 120px 0; }

/* Reference intro: name ≈ 1.55vw, italic subtitle ≈ 0.9vw, body ≈ 0.72vw */
.intro__name {
  margin-top: clamp(32px, 4.2vw, 84px);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.55vw, 1.9rem);
  color: var(--ink);
  letter-spacing: -.01em;
}

/* little "HI" bear next to "Hello!"
   idle: sways, and every few seconds lifts the HI board up to show it
   hover: grows a little, holds the board up high and waggles it, with comic motion marks */
.hi-emoji {
  position: absolute;
  left: 100%;
  bottom: 0.05em;
  margin-left: .3em;
  display: block;
  width: clamp(40px, 4vw, 75px); /* same size as the resume bear */
  aspect-ratio: 1;
  user-select: none;
  cursor: default;
  z-index: 2;
}
.hi-emoji img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  transform-origin: 50% 95%;
  /* the picture is cut off at the bottom; fade that edge so it never looks sliced when the bear lifts */
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  animation: hiIdle 4.8s ease-in-out infinite;
  transition: scale .35s var(--ease);
}
@keyframes hiIdle {
  0%, 100% { transform: rotate(-3deg); }
  25%      { transform: rotate(3deg); }
  50%      { transform: rotate(-2deg); }
  62%      { transform: translateY(-11%) scale(.97, 1.05) rotate(0deg); }   /* lifts the board up */
  70%      { transform: translateY(-11%) scale(.97, 1.05) rotate(3deg); }
  78%      { transform: translateY(-11%) scale(.97, 1.05) rotate(-3deg); }
  88%      { transform: translateY(1%) scale(1.03, .97) rotate(0deg); }     /* settles back down */
}
.hi-emoji:hover img { scale: 1.1; animation: hiRaise .9s ease-in-out infinite; }
@keyframes hiRaise {             /* board held high, waggled side to side */
  0%, 100% { transform: translateY(-16%) scale(.96, 1.06) rotate(-6deg); }
  50%      { transform: translateY(-19%) scale(.96, 1.06) rotate(6deg); }
}
.hi-emoji__marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.2;
  stroke-linecap: round;
  opacity: 0;
  translate: 0 -16%;
  pointer-events: none;
}
.hi-emoji:hover .hi-emoji__marks { animation: hiMarks .45s steps(1, end) infinite; }
@keyframes hiMarks { 0% { opacity: 1; } 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hi-emoji img, .hi-emoji:hover img, .hi-emoji:hover .hi-emoji__marks { animation: none !important; }
}
.js .heading[data-reveal] .hi-emoji { opacity: 0; transition: opacity 1s var(--ease) .7s; }
.js .heading[data-reveal].is-in .hi-emoji { opacity: 1; }

/* emote beside "Resume." — the future resume-download button (not functional yet) */
.resume-dl {
  position: absolute;
  left: 100%;
  bottom: 0.02em;
  margin-left: .3em;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  z-index: 2;
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
/* the bear: body + a cut-out arm/arrow layer that swings from the shoulder */
.bear {
  position: relative;
  display: block;
  width: clamp(40px, 4vw, 75px);
  aspect-ratio: 1;
  transform-origin: 50% 100%;
  transition: scale .35s var(--ease);
}
.bear img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
/* arm + arrow region (traced from the 128px image) and everything else */
.bear__arm {
  clip-path: polygon(71.9% 0, 100% 0, 100% 60.9%, 87.5% 60.9%, 78.1% 65.6%, 71.9% 75%, 64.1% 75%, 60.9% 68.8%, 57.8% 62.5%, 56.3% 59.4%, 56.3% 33.6%, 46.9% 31.3%);
  transform-origin: 67% 74%; /* shoulder */
  animation: bearWave 2.6s ease-in-out infinite;
}
/* body keeps a ~2% band under the arm's cut edge, so no gap opens while the arm swings */
.bear__body {
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 74.4% 0, 100% 0, 100% 58.6%, 87.5% 58.6%, 77.3% 63.6%, 71.1% 72.7%, 65.2% 72.7%, 62.9% 67.6%, 59.8% 61.3%, 58.6% 58.6%, 58.6% 35.9%, 50% 33.6%, 74.4% 0);
}
@keyframes bearWave {            /* idle: gently rocks the sign from the shoulder */
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(2deg); }
}

/* sparkles over the eyes, only on hover */
.bear__star {
  position: absolute;
  width: 18%;
  fill: #f2d98c;               /* light pastel yellow */
  stroke: #d9b35c;
  stroke-width: .8;
  opacity: 0;
  scale: 0;
  pointer-events: none;
}
.bear__star--1 { left: 18%; top: 22%; }
.bear__star--2 { left: 45%; top: 14%; width: 14%; fill: #f6c6c0; stroke: #dd9a92; } /* light pastel red */
.bear__star--3 { left: 4%;  top: 6%;  width: 12%; }

/* hover: a bit bigger, hops, waves faster, stars twinkle */
.resume-dl:hover .bear, .resume-dl:focus-visible .bear { scale: 1.12; animation: bearHop 1.1s cubic-bezier(.3, .7, .3, 1) infinite; }
.resume-dl:hover .bear__arm, .resume-dl:focus-visible .bear__arm { animation-duration: .9s; }
.resume-dl:hover .bear__star, .resume-dl:focus-visible .bear__star { animation: bearTwinkle 1.1s ease-in-out infinite; }
.resume-dl:hover .bear__star--2, .resume-dl:focus-visible .bear__star--2 { animation-delay: .18s; }
.resume-dl:hover .bear__star--3, .resume-dl:focus-visible .bear__star--3 { animation-delay: .36s; }
@keyframes bearHop {
  0%   { translate: 0 0; }
  22%  { translate: 0 -16%; }
  44%  { translate: 0 0; }
  52%  { translate: 0 1%; }   /* small landing */
  60%, 100% { translate: 0 0; }
}
@keyframes bearTwinkle {
  0%, 100% { opacity: 0; scale: .2; rotate: 0deg; }
  30%      { opacity: 1; scale: 1;  rotate: 20deg; }
  60%      { opacity: .85; scale: .75; rotate: 40deg; }
}
@media (prefers-reduced-motion: reduce) {
  .bear__arm, .resume-dl:hover .bear { animation: none !important; }
}
.resume-dl:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
/* comic speech bubble coming out of a bear (.talker); shown by main.js on scroll-in, and on hover */
.talk-bubble {
  position: absolute;
  left: 78%;
  bottom: 78%;
  display: block;
  padding: .55em .9em .6em;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
  line-height: 1.25;
  box-shadow: 3px 3px 0 var(--ink);           /* little comic offset shadow */
  transform-origin: 0% 100%;
  opacity: 0;
  scale: .3;
  rotate: -8deg;
  pointer-events: none;
  transition: opacity .2s ease, scale .45s cubic-bezier(.3, 1.6, .5, 1), rotate .45s cubic-bezier(.3, 1.6, .5, 1);
  z-index: 3;
}
.talk-bubble b { display: block; font-family: var(--f-head); font-weight: 700; font-size: clamp(11px, .78vw, 14px); }
.talk-bubble small { display: block; font-size: clamp(9.5px, .6vw, 11.5px); color: #555; }
/* the tail, pointing back down to the bear */
.talk-bubble::before,
.talk-bubble::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 100%;
  border-style: solid;
}
.talk-bubble::before { border-width: 11px 10px 0 0; border-color: var(--ink) transparent transparent; margin-top: 1px; }
.talk-bubble::after  { border-width: 8px 7px 0 0; border-color: #fff transparent transparent; left: 13.5px; margin-top: -.5px; }
.talker.is-talking .talk-bubble,
.talker:hover .talk-bubble,
.talker:focus-visible .talk-bubble { opacity: 1; scale: 1; rotate: 0deg; }
.talker.is-talking:not(:hover) .talk-bubble { animation: bubbleBob 1.6s ease-in-out .45s infinite; }
@keyframes bubbleBob { 50% { translate: 0 -3px; } }
@media (max-width: 640px) {
  .talk-bubble { left: 40%; bottom: 96%; }
}
.js .heading[data-reveal] .resume-dl { opacity: 0; transition: opacity 1s var(--ease) .7s; }
.js .heading[data-reveal].is-in .resume-dl { opacity: 1; }

.intro__sub {
  margin-top: 4px;
  font-style: italic;
  font-size: clamp(.84rem, .9vw, 1.05rem);
  color: #6b6b6b;
}
/* Resume: hackathon award */
.award { position: relative; }
.block__title--emote { display: flex; align-items: center; gap: .35em; }
.award-emote {
  position: relative;
  display: block;
  flex: none;
  width: clamp(26px, 1.9vw, 36px);
  aspect-ratio: 1;
  cursor: default;
  user-select: none;
}
.award-emote img { display: block; width: 100%; height: 100%; max-width: none; transform-origin: 50% 80%; transition: scale .3s var(--ease); }
.award-emote:hover img { scale: 1.15; }
/* wider picture (bear + its own little speech bubble) */
.award-emote--wide { width: clamp(40px, 3.2vw, 60px); aspect-ratio: 297 / 236; }
.award-emote--wide .talk-bubble { left: 70%; bottom: 80%; }
.award h4 { font-weight: 600; font-size: clamp(14px, 1vw, 19px); color: var(--ink); }
.award .meta { margin-top: 1px; }
.award p:last-child { margin-top: 8px; font-size: clamp(12.5px, .76vw, 15px); line-height: 1.6; max-width: 34em; }
.intro__dates { display: block; margin-top: 2px; font-style: normal; font-size: .9em; letter-spacing: .04em; color: #8a8a8a; }

.intro__bio { margin-top: clamp(28px, 3.4vw, 64px); font-size: clamp(12.5px, .74vw, 15px); line-height: 1.7; color: var(--text); max-width: 560px; }

.placeholder--bio { margin-top: clamp(28px, 3.4vw, 64px); height: 96px; max-width: 560px; }

.intro__media {
  align-self: end;
  justify-self: center;
  width: 100%;
  max-width: 520px;
}
.placeholder--photo { aspect-ratio: 4 / 5; border-bottom: 0; border-radius: 4px 4px 0 0; }
.intro__photo { width: 100%; height: auto; }

/* =========================================================
   P/03 — RESUME
   ========================================================= */

.resume {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 6vw;
  align-items: start;
}
.resume__col--right { padding-top: 6px; }

/* Reference resume: section titles ("Education", "Experiences") ≈ 1.55vw, item titles ≈ 0.9vw,
   italic meta ≈ 0.74vw, body ≈ 0.72vw */
.block { margin-top: clamp(36px, 4.4vw, 90px); }
.resume__col--right .block { margin-top: 0; }

.block__title {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.55vw, 1.9rem);
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: clamp(16px, 1.8vw, 34px);
}
.block__title--lg { margin-bottom: clamp(24px, 3.2vw, 60px); }

.meta { font-style: italic; font-size: clamp(11.5px, .74vw, 14px); color: var(--muted); }

.edu { position: relative; padding-left: 0; }
.edu__icon {
  position: absolute; left: -22px; top: .35em;
  width: 13px; height: 13px;
  fill: none; stroke: #9b9b9b; stroke-width: 2; stroke-linecap: round;
}
.edu h4 { font-weight: 600; font-size: clamp(14px, 1vw, 19px); color: var(--ink); }
.edu .meta { margin-top: 1px; }
.edu p:last-child { margin-top: 8px; font-size: clamp(12.5px, .76vw, 15px); }

/* Skills: compact. Each group is one row — a small label, then small chips that wrap inline. */
.resume__skills { grid-column: 1 / -1; margin-top: clamp(28px, 3vw, 60px); }
.resume__skills .block__title { margin-bottom: clamp(12px, 1.3vw, 24px); }
.skills { display: grid; gap: clamp(9px, .8vw, 16px); }
.skill-group {
  display: grid;
  grid-template-columns: clamp(150px, 15vw, 290px) minmax(0, 1fr);
  gap: clamp(8px, 1.2vw, 24px);
  align-items: baseline;
  padding-top: clamp(9px, .8vw, 16px);
  border-top: 1px solid rgba(0, 0, 0, .09);
}
.skill-group h4 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(11.5px, .76vw, 14.5px);
  line-height: 1.35;
  color: var(--ink);
}
.tools {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, .36vw, 7px);
}
.tools li {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .26em .75em;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: 999px;
  font-size: clamp(10px, .62vw, 12px);
  line-height: 1.5;
  color: #5c5c5c;
  white-space: nowrap;
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.tools li img {
  width: 1.15em; height: 1.15em;
  flex: none;
  filter: grayscale(1) brightness(.35);
  transition: filter .35s var(--ease);
}
.tools li:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.tools li:hover img { filter: grayscale(1) brightness(0) invert(1); }
.exp h4 { font-weight: 600; font-size: clamp(13.5px, .92vw, 18px); letter-spacing: .02em; color: var(--ink); }
.exp .meta { margin: 1px 0 clamp(12px, 1.3vw, 22px); }
.exp p:not(.meta) { font-size: clamp(12.5px, .74vw, 15px); line-height: 1.6; color: var(--text); max-width: 640px; }
.exp p + p:not(.meta) { margin-top: 4px; }
/* small certificate thumbnail, right side of the entry header; links to the full PDF */
.exp__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; max-width: 640px; }
.exp__cert {
  flex: none;
  width: clamp(34px, 2.3vw, 44px);
  aspect-ratio: 400 / 518; /* the whole page, like the original document */
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 3px;
  background: #e4e4e4;
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.exp__cert img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(.15); }
.exp__cert:hover { border-color: var(--ink); transform: translateY(-1px); }
.exp ul { list-style: none; margin: clamp(8px, .8vw, 14px) 0 0; padding: 0; max-width: 640px; }
.exp li {
  position: relative;
  padding-left: 1.1em;
  font-size: clamp(12.5px, .74vw, 15px);
  line-height: 1.6;
  color: var(--text);
}
.exp li + li { margin-top: clamp(4px, .4vw, 8px); }
.exp li::before { content: ""; position: absolute; left: 0; top: .72em; width: .45em; height: 1px; background: #9a9a9a; }
.exp li b { font-weight: 500; color: var(--ink); }
.exp + .exp { margin-top: clamp(28px, 2.6vw, 52px); }

/* =========================================================
   P/04 — SUMMARY
   ========================================================= */

/* Reference summary: titles ≈ 0.95vw, italic taglines ≈ 0.72vw; title column ≈ 18.6vw, rule ≈ 10vw */
/* "Projects." heading above the list, with the (already animated) milk bear GIF beside it */
.summary__heading { margin-bottom: clamp(36px, 4.4vw, 90px); }
.milk-emoji {
  position: absolute;
  left: 100%;
  bottom: 0;
  margin-left: .25em;
  width: clamp(51px, 5.1vw, 95px); /* the GIF has more empty space around it, so it's a touch wider */
  max-width: none;
  height: auto;
  transform-origin: 50% 80%;
  transition: scale .3s var(--ease);
  z-index: 2;
}
.milk-emoji { display: block; }
.milk-emoji img { display: block; width: 100%; max-width: none; height: auto; transform-origin: 50% 80%; transition: scale .3s var(--ease); }
.milk-emoji:hover img { scale: 1.12; }
.js .heading[data-reveal] .milk-emoji { opacity: 0; transition: opacity 1s var(--ease) .7s, scale .3s var(--ease); }
.js .heading[data-reveal].is-in .milk-emoji { opacity: 1; }

.toc { list-style: none; margin: 0; padding: 0; }
.toc li + li { margin-top: clamp(20px, 2.1vw, 42px); }
.toc a {
  display: grid;
  grid-template-columns: clamp(170px, 18.6vw, 380px) clamp(60px, 10.3vw, 210px) auto;
  align-items: center;
  gap: clamp(16px, 2.6vw, 52px);
}
.toc__t b {
  display: block;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(14px, .98vw, 19px);
  line-height: 1.35;
  color: var(--ink);
  transition: transform .6s var(--ease);
}
.toc__t em { display: block; font-size: clamp(11.5px, .72vw, 14px); color: var(--muted); margin-top: 1px; }
.toc__line {
  height: 1px; background: #9a9a9a;
  transform-origin: left;
  transition: transform .6s var(--ease), background .6s var(--ease);
}
.toc__p { font-size: clamp(11.5px, .72vw, 14px); color: #9a9a9a; letter-spacing: .02em; }
.toc a:hover .toc__t b { transform: translateX(8px); }
.toc a:hover .toc__line { transform: scaleX(1.12); background: var(--ink); }

/* =========================================================
   PROJECT HERO
   ========================================================= */

.project { --accent: #b8673f; }

.project__media {
  position: absolute; inset: -6% 0;
  z-index: 0;
}
.project__media .placeholder,
.project__img {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0; border-radius: 0;
}

.project__text { position: relative; z-index: 1; max-width: 560px; }
/* Reference project hero: title ≈ 4.1vw, italic tagline ≈ 1.15vw, accent rule ≈ 7.3vw wide, body ≈ 0.72vw */
.project .heading h2 { font-size: clamp(2.3rem, 4.1vw, 5.2rem); }
.project__tag { margin-top: clamp(8px, .8vw, 14px); font-style: italic; font-size: clamp(.92rem, 1.15vw, 1.4rem); }
.accent-line { display: block; width: clamp(90px, 7.3vw, 150px); height: clamp(3px, .22vw, 5px); margin-top: clamp(8px, .9vw, 16px); background: var(--accent); border-radius: 1px; transform-origin: left; }
.project__desc { margin-top: clamp(28px, 2.5vw, 52px); font-size: clamp(12.5px, .72vw, 15px); line-height: 1.6; max-width: clamp(300px, 24vw, 500px); }

.project--dark { background: var(--dark-bg); color: var(--dark-text); }
.project--dark .heading h2 { color: #fff; }
.project--dark .ghost { color: rgba(255,255,255,.07); }
.project--dark .page-label { color: #5d5856; }
.project--dark .project__tag { color: #e9e4df; }
.project--dark .placeholder {
  background:
    radial-gradient(60% 70% at 78% 40%, rgba(150, 90, 70, .28), transparent 70%),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.02) 14px 15px),
    #120e0c;
  color: #4d4542;
  place-items: center end;
  padding-right: 18%;
}

.project--light { background: linear-gradient(100deg, #e9e9e9 0%, #d6d6d6 45%, #2a2a2c 100%); color: #6d6d6d; }
.project--light .heading h2 { color: var(--ink); }
.project--light .project__tag { color: #6a6a6a; }
.project--light .placeholder {
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(255,255,255,.08), transparent 70%),
    linear-gradient(100deg, #ececec 0%, #d7d7d7 42%, #1e1e20 100%);
  color: #7a7a7a;
  place-items: center end;
  padding-right: 18%;
}

/* =========================================================
   PROJECT DETAIL
   ========================================================= */

.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6vw;
  background: linear-gradient(100deg, var(--bg) 0%, #e7e8ec 45%, #5d6477 100%);
}

/* Reference detail page: title ("Passive cooking.") ≈ 1.55vw, italic sub ≈ 0.8vw, step numbers ≈ 0.9vw, body ≈ 0.72vw */
.detail__text { max-width: 560px; }
.detail__title {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.55vw, 1.95rem);
  line-height: 1.25;
  color: var(--ink);
}
.detail__sub { font-style: italic; font-size: clamp(.82rem, .8vw, 1rem); color: #777; margin-top: 2px; }
.detail__text > p:not(.detail__sub) { font-size: clamp(12.5px, .72vw, 15px); line-height: 1.6; max-width: 520px; }
.detail__text > p + p:not(.detail__sub) { margin-top: 12px; }

.steps {
  list-style: none; padding: 0;
  margin: clamp(40px, 4.4vw, 90px) 0 clamp(36px, 3.6vw, 72px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.2vw, 24px);
  max-width: 560px;
}
.steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.steps__icon {
  width: clamp(46px, 3.8vw, 76px); height: clamp(36px, 3vw, 60px);
  border: 1.5px solid #2b2b2b;
  border-radius: 50%;
  opacity: .8;
}
.steps b { font-weight: 600; font-size: clamp(13px, .9vw, 18px); color: var(--ink); margin-top: 6px; }
.steps small { font-size: clamp(9.5px, .55vw, 11px); line-height: 1.4; color: #555; }

.detail__media { justify-self: end; width: min(100%, 420px); }
.placeholder--tall {
  aspect-ratio: 3 / 4.6;
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.05) 14px 15px), rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.5);
  color: rgba(255,255,255,.8);
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */

/* =========================================================
   REAL PROJECT CONTENT (SCoPe, GearShift)
   ========================================================= */

/* hero visuals */
.project__art {
  position: absolute;
  right: 4%; top: 50%;
  width: min(64vw, 980px);
  transform: translateY(-50%);
  opacity: .95;
}
.project--dark .project__media { background: radial-gradient(55% 60% at 70% 45%, rgba(150, 90, 70, .22), transparent 70%), var(--dark-bg); }
.project--light .project__media:has(.phones) { background: linear-gradient(100deg, #e9e9e9 0%, #d6d6d6 45%, #2a2a2c 100%); }

.phones { position: absolute; right: 9vw; top: 50%; height: min(74vh, 720px); aspect-ratio: 1.25; transform: translateY(-50%); }
.phone {
  display: block;
  aspect-ratio: 720 / 1616;
  border-radius: clamp(14px, 1.4vw, 24px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  object-fit: cover;
}
.phones .phone { position: absolute; top: 50%; height: 100%; }
.phones .phone--c { left: 50%; transform: translate(-50%, -50%); z-index: 2; }
.phones .phone--l { left: 4%; height: 84%; transform: translateY(-50%) rotate(-7deg); opacity: .9; }
.phones .phone--r { right: 4%; height: 84%; transform: translateY(-50%) rotate(7deg); opacity: .9; }

/* small "View on GitHub" link under a project description */
.project__link {
  display: inline-block;
  margin-top: clamp(16px, 1.6vw, 28px);
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  font-size: clamp(11px, .66vw, 13px);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: .8;
  transition: opacity .3s var(--ease);
}
.project__link:hover { opacity: 1; }
.project--dark .project__link { color: #e9e4df; }

/* step icons (line drawings inside the outlined ellipses) */
.steps__icon { display: grid; place-items: center; color: #2b2b2b; }
.steps__icon svg { width: 46%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.detail__text > p.detail__stack { margin-top: clamp(16px, 1.6vw, 28px); font-size: clamp(11px, .66vw, 13px); letter-spacing: .04em; color: #7a7a7a; }

/* SCoPe results chart */
.chart-card {
  margin: 0;
  align-self: center;
  width: min(100%, 440px);
  padding: clamp(16px, 1.6vw, 26px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 4px;
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
}
.chart-card figcaption { margin-bottom: clamp(12px, 1.2vw, 20px); }
.chart-card figcaption b { display: block; font-family: var(--f-head); font-weight: 600; font-size: clamp(12.5px, .8vw, 15px); }
.chart-card figcaption span { display: block; margin-top: 3px; font-size: clamp(10.5px, .62vw, 12px); line-height: 1.5; color: #6b6b6b; }
.dotplot { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--f-body); }
.dotplot__grid line { stroke: rgba(0, 0, 0, .07); stroke-width: 1; }
.dotplot__chance { stroke: #9a9a9a; stroke-width: 1; stroke-dasharray: 3 4; }
.dotplot__note, .dotplot__axis text { font-size: 9.5px; fill: #8a8a8a; }
.dotplot__row .hit { fill: transparent; }
.dotplot__row .lbl { font-size: 10.5px; fill: #3a3a3a; }
.dotplot__row .val { font-size: 10.5px; font-weight: 500; fill: #3a3a3a; font-variant-numeric: tabular-nums; }
.dotplot__row .ci { stroke: #8f8f8f; stroke-width: 2; stroke-linecap: round; }
.dotplot__row circle { fill: #6f6f6f; stroke: #fff; stroke-width: 2; transition: r .2s var(--ease); }
.dotplot__row.is-best circle { fill: var(--accent, #b8673f); }
.dotplot__row.is-best .ci { stroke: #c98a69; }
.dotplot__row.is-best .lbl, .dotplot__row.is-best .val { fill: var(--ink); font-weight: 600; }
.dotplot__row:hover .hit { fill: rgba(0, 0, 0, .04); }
.dotplot__row:hover circle { r: 6.5; }
#p1-detail { --accent: #b8673f; }

/* SCoPe hero: the live planner canvas */
canvas.scope-plan { aspect-ratio: 5 / 3; height: auto; opacity: 1; }

/* Project detail steps (SCoPe + GearShift): icons draw themselves, ellipses pop, hover lifts */
.detail.is-animated .steps__icon svg * {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s var(--ease) calc(var(--d, 0s) + .45s);
}
.detail.is-animated .steps li.is-in .steps__icon svg * { stroke-dashoffset: 0; }
.detail.is-animated .steps__icon {
  scale: .6;
  transition: scale .9s cubic-bezier(.34, 1.56, .64, 1) calc(var(--d, 0s) + .15s), border-color .35s var(--ease), color .35s var(--ease), translate .35s var(--ease);
}
.detail.is-animated .steps li.is-in .steps__icon { scale: 1; }
.detail.is-animated .steps li:hover .steps__icon { border-color: var(--accent); color: var(--accent); translate: 0 -4px; opacity: 1; }
.detail.is-animated .steps li[data-screen] { cursor: pointer; }

/* =========================================================
   GEARSHIFT: 3D screen tour
   ========================================================= */
#p3-detail { --accent: #e3ad62; }
.gs-tour { justify-self: end; align-self: center; width: min(100%, 560px); display: flex; flex-direction: column; align-items: center; }
.gs-tour__stage {
  --h: min(66vh, 580px);
  position: relative;
  width: 100%;
  height: var(--h);
  perspective: 1500px;
  transform-style: preserve-3d;
}
.gs-shot {
  position: absolute; left: 50%; top: 0;
  height: 100%; aspect-ratio: 720 / 1616;
  margin: 0;
  border-radius: clamp(16px, 1.5vw, 26px);
  overflow: hidden;
  background: #111;
  box-shadow: 0 40px 70px -28px rgba(10, 12, 20, .6), 0 0 0 1px rgba(255, 255, 255, .08);
  cursor: pointer;
  --x: 0%; --s: 1; --ry0: 0deg; --o: 1; --z: 0;
  transform: translateX(-50%) translateX(var(--x)) translateZ(var(--z)) rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry0) + var(--ry, 0deg))) scale(var(--s));
  opacity: var(--o);
  filter: brightness(var(--b, 1)) saturate(var(--sa, 1));
  transition: transform 1.05s cubic-bezier(.65, 0, .25, 1), opacity 1.05s cubic-bezier(.65, 0, .25, 1), filter 1.05s var(--ease);
  will-change: transform;
}
.gs-shot[data-off="0"]  { --x: 0%;    --s: 1;   --z: 0;      --ry0: 0deg;   --o: 1;   z-index: 5; cursor: default; }
.gs-shot[data-off="1"]  { --x: 62%;   --s: .8;  --z: -140px; --ry0: -24deg; --o: .9;  --b: .78; --sa: .8; z-index: 4; }
.gs-shot[data-off="-1"] { --x: -62%;  --s: .8;  --z: -140px; --ry0: 24deg;  --o: .9;  --b: .78; --sa: .8; z-index: 4; }
.gs-shot[data-off="2"]  { --x: 100%;  --s: .62; --z: -300px; --ry0: -32deg; --o: 0;   --b: .6;  z-index: 3; }
.gs-shot[data-off="-2"] { --x: -100%; --s: .62; --z: -300px; --ry0: 32deg;  --o: 0;   --b: .6;  z-index: 3; }
.gs-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.gs-shot__dark { opacity: 0; clip-path: circle(0% at 88% 6%); transition: clip-path .9s cubic-bezier(.65, 0, .25, 1), opacity 0s .9s; }
.gs-tour.is-dark .gs-shot__dark { opacity: 1; clip-path: circle(150% at 88% 6%); transition: clip-path .9s cubic-bezier(.65, 0, .25, 1), opacity 0s; }
/* a sheen sweeps across the front phone each time it arrives */
.gs-shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  transform: translateX(-120%);
}
.gs-shot.is-cur::after { animation: gsSheen 1.4s .55s var(--ease); }
@keyframes gsSheen { to { transform: translateX(120%); } }
.gs-shot[data-off="1"]:hover, .gs-shot[data-off="-1"]:hover { --b: .95; --sa: 1; }

.gs-tour__bar {
  margin-top: clamp(18px, 2vw, 30px);
  display: flex; align-items: center; gap: clamp(12px, 1.2vw, 20px);
  color: #fff;
}
.gs-tour__cap { margin: 0; display: flex; align-items: center; gap: 10px; font-size: clamp(10px, .6vw, 12px); letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; min-width: 15em; }
.gs-tour__cap i { width: 14px; height: 1px; background: currentColor; opacity: .6; }
.gs-tour__num { font-variant-numeric: tabular-nums; opacity: .75; }
.gs-tour__name { font-weight: 600; display: inline-block; }
.gs-tour__name.is-swap { animation: gsName .6s var(--ease); }
@keyframes gsName { from { opacity: 0; translate: 0 8px; filter: blur(3px); } }
.gs-tour__dots { display: flex; gap: 6px; }
.gs-tour__dots button {
  width: 22px; height: 14px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; align-items: center;
}
.gs-tour__dots i { position: relative; display: block; height: 2px; background: rgba(255, 255, 255, .35); border-radius: 2px; overflow: hidden; transition: background .3s; }
.gs-tour__dots i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.gs-tour__dots button.is-on i::after { transform: scaleX(1); }
.gs-tour__dots button.is-run i::after { animation: gsFill 3.4s linear; }
.gs-tour__dots button:hover i { background: rgba(255, 255, 255, .7); }
@keyframes gsFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.gs-tour__theme {
  position: relative; flex: none;
  width: 52px; height: 26px; padding: 0 6px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, .55); border-radius: 99px;
  background: rgba(255, 255, 255, .12);
  color: #fff; cursor: pointer;
}
.gs-tour__theme svg { position: relative; z-index: 1; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: color .4s; }
.gs-tour__theme .sun { color: #2b2b2b; }
.gs-tour__knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: translate .5s cubic-bezier(.34, 1.4, .64, 1), background .4s; }
.gs-tour.is-dark .gs-tour__knob { translate: 26px 0; background: #1b1d24; }
.gs-tour.is-dark .gs-tour__theme .sun { color: #fff; }
.gs-tour.is-dark .gs-tour__theme .moon { color: #fff; }

/* =========================================================
   GEARSHIFT HERO: 3D showroom (Three.js Vantage)
   ========================================================= */
.project--showroom { background: #09090a; }
.project--showroom .project__media.showroom { inset: 0; background: #09090a; }
.project--showroom .project__text { pointer-events: none; }
.project--showroom .project__text > * { pointer-events: auto; }

.showroom__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  outline: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.showroom__canvas:active { cursor: grabbing; }
.showroom[data-state="ready"] .showroom__canvas { opacity: 1; }

/* everything sits over the car's half of the hero */
.showroom__hud,
.showroom__loader,
.showroom__fallback {
  position: absolute; top: 0; bottom: 0; left: 34%; right: 0;
}
.showroom__hud {
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(56px, 8vh, 96px) 24px clamp(30px, 5vh, 56px);
  color: var(--dark-ink);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease) .3s;
}
.showroom__hud > *, .showroom__dock > *, .showroom__drive > * { pointer-events: auto; }
.showroom[data-state="ready"] .showroom__hud { opacity: 1; }

/* ---- loader ---- */
.showroom__loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  color: #a39d98;
  transition: opacity .8s var(--ease);
  pointer-events: none;
}
.showroom[data-state="ready"] .showroom__loader { opacity: 0; }
.showroom__loader-make { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: 11px; letter-spacing: .5em; text-transform: uppercase; color: #e9e4df; }
.showroom__loader-bar { position: relative; width: 168px; height: 1px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.showroom__loader-bar i { position: absolute; inset: 0; background: #e9e4df; transform-origin: left; transform: scaleX(0); transition: transform .35s var(--ease); }
.showroom__loader-text { margin: 0; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; }
.showroom__loader-text b { font-weight: 500; color: #e9e4df; font-variant-numeric: tabular-nums; }
.showroom[data-state="error"] .showroom__loader-bar { display: none; }
.showroom__fallback { display: grid; place-items: center; padding: 24px; text-align: center; color: #a39d98; font-size: 13px; line-height: 1.6; }
.showroom__fallback[hidden] { display: none; }
.showroom__fallback b { color: #e9e4df; font-weight: 500; }

/* ---- title ---- */
.showroom__title { text-align: center; pointer-events: none !important; }
.showroom__make { margin: 0; font-size: clamp(9.5px, .58vw, 11px); letter-spacing: .52em; text-transform: uppercase; color: #9c9691; }
.showroom__model {
  margin: 6px 0 0;
  font-family: var(--f-head); font-weight: 600;
  font-size: clamp(24px, 2.3vw, 42px); letter-spacing: .32em; text-indent: .32em;
  text-transform: uppercase; color: #f4f1ee; line-height: 1.1;
}
.showroom__spec { margin: 8px 0 0; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: clamp(9.5px, .58vw, 11px); letter-spacing: .26em; text-transform: uppercase; color: #8c8682; }
.showroom__spec i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .8; }

/* ---- status line ("Engine started", rpm read-out) ---- */
.showroom__status {
  margin: auto 0 14px;
  min-height: 1.4em;
  font-size: clamp(10px, .62vw, 12px); letter-spacing: .34em; text-transform: uppercase;
  color: #e9e4df;
  opacity: 0; translate: 0 6px;
  transition: opacity .5s var(--ease), translate .5s var(--ease);
  white-space: pre;
  pointer-events: none !important;
}
.showroom__status.is-on { opacity: 1; translate: 0 0; }
.showroom__status.is-readout { letter-spacing: .22em; color: #bdb7b2; font-variant-numeric: tabular-nums; }

/* ---- dock: paints, drive keys, hints ---- */
.showroom__dock { display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 1.4vh, 18px); }
.showroom__paints { display: flex; gap: 14px; }
.showroom__paints button {
  position: relative;
  width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%;
  background: none; cursor: pointer;
}
.showroom__paints button i {
  position: absolute; inset: 4px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 42%), var(--sw);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 4px 10px rgba(0, 0, 0, .5);
  transition: inset .35s var(--ease);
}
.showroom__paints button::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(244, 241, 238, .0);
  transition: box-shadow .35s var(--ease);
}
.showroom__paints button:hover i { inset: 2px; }
.showroom__paints button[aria-checked="true"]::after { box-shadow: 0 0 0 1px rgba(244, 241, 238, .85); }
.showroom__paints button[aria-checked="true"] i { inset: 3px; }
.showroom__paints button span {
  position: absolute; left: 50%; bottom: calc(100% + 10px);
  translate: -50% 4px;
  white-space: nowrap;
  font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: #d9d3ce;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), translate .25s var(--ease);
}
.showroom__paints button:hover span,
.showroom__paints button:focus-visible span { opacity: 1; translate: -50% 0; }
.showroom__paints button:focus-visible { outline: 1px dashed rgba(244, 241, 238, .5); outline-offset: 4px; }

.showroom__drive { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; flex-wrap: wrap; }
.drive-key {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 7px 18px 7px 7px;
  border: 1px solid rgba(244, 241, 238, .26); border-radius: 999px;
  background: rgba(20, 20, 22, .55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #eae6e2;
  font: inherit; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase;
  cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: none;
  transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .25s var(--ease), opacity .28s var(--ease), translate .28s var(--ease);
}
.drive-key kbd {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(244, 241, 238, .4);
  font-family: var(--f-head); font-weight: 600; font-size: 12px; letter-spacing: 0;
  transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.drive-key:hover { border-color: rgba(244, 241, 238, .6); background: rgba(40, 40, 44, .6); }
.drive-key:active, .drive-key.is-held { transform: scale(.97); }
.drive-key:focus-visible { outline: 1px dashed rgba(244, 241, 238, .55); outline-offset: 3px; }
.drive-key[hidden] { display: none; }
.drive-key.is-leaving, .drive-key.is-entering { opacity: 0; translate: 0 8px; }
.drive-key:disabled { opacity: .55; cursor: default; }
/* S invites a press */
.drive-key--s kbd { position: relative; }
.drive-key--s kbd::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1px solid rgba(244, 241, 238, .55);
  animation: sPulse 2.4s var(--ease) infinite;
}
@keyframes sPulse { 0% { scale: 1; opacity: .7; } 70%, 100% { scale: 1.65; opacity: 0; } }
.showroom.is-igniting .drive-key--s kbd { background: #f4f1ee; color: #111; }
.drive-key--a.is-held { background: #f4f1ee; border-color: #f4f1ee; color: #121212; }
.drive-key--a.is-held kbd { border-color: rgba(18, 18, 18, .5); }
.drive-key--b.is-held { border-color: rgba(222, 96, 84, .9); background: rgba(70, 18, 16, .6); }
.drive-key--b.is-held kbd { background: #d9564a; border-color: #d9564a; color: #fff; }
.showroom__stop {
  padding: 4px 2px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: #77716d;
  border-bottom: 1px solid rgba(119, 113, 109, .5);
  transition: color .3s var(--ease), opacity .28s var(--ease);
}
.showroom__stop:hover { color: #d7d1cc; }
.showroom__stop[hidden] { display: none; }
.showroom__stop.is-leaving, .showroom__stop.is-entering { opacity: 0; }

.showroom__hint {
  margin: 0; display: flex; align-items: center; gap: 10px;
  font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: #6f6a66;
  transition: opacity .28s var(--ease);
  pointer-events: none !important;
}
.showroom__hint i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.showroom__hint[hidden] { display: none; }
.showroom__hint.is-leaving, .showroom__hint.is-entering { opacity: 0; }

/* ---- mute + credit ---- */
.showroom__mute {
  position: absolute; top: clamp(24px, 4vh, 40px); right: clamp(20px, 2.4vw, 40px);
  width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid rgba(244, 241, 238, .22); border-radius: 50%;
  background: rgba(20, 20, 22, .5); color: #e9e4df; cursor: pointer;
  transition: border-color .3s var(--ease), opacity .4s var(--ease);
}
.showroom__mute[hidden] { display: none; }
.showroom__mute:hover { border-color: rgba(244, 241, 238, .6); }
.showroom__mute svg { grid-area: 1 / 1; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.showroom__mute .off, .showroom__mute[aria-pressed="true"] .on { display: none; }
.showroom__mute[aria-pressed="true"] .off { display: block; }
.showroom__credit {
  position: absolute; right: clamp(20px, 2.4vw, 40px); bottom: 14px; margin: 0;
  font-size: 9px; letter-spacing: .06em; color: #4f4a47;
}
.showroom__credit a { color: inherit; text-decoration: underline; text-decoration-color: rgba(79, 74, 71, .6); }
.showroom__credit a:hover { color: #9c9691; }
#p1-detail .count { font-variant-numeric: tabular-nums; }

/* SCoPe chart: chance line drops in, dots slide from chance to their score, CIs open out */
.chart-card .dotplot__grid line,
.chart-card .dotplot__axis text,
.chart-card .dotplot__note { transition: opacity .9s var(--ease) .2s; }
#p1-detail.is-animated .chart-card:not(.is-play) .dotplot__grid line,
#p1-detail.is-animated .chart-card:not(.is-play) .dotplot__axis text,
#p1-detail.is-animated .chart-card:not(.is-play) .dotplot__note { opacity: 0; }
#p1-detail.is-animated .dotplot__chance {
  transform-box: fill-box; transform-origin: top;
  transform: scaleY(0);
  transition: transform 1s var(--ease) .1s;
}
#p1-detail.is-animated .dotplot__row .lbl { opacity: 0; translate: -8px 0; transition: opacity .7s var(--ease), translate .7s var(--ease); transition-delay: calc(var(--i) * .13s + .3s); }
#p1-detail.is-animated .dotplot__row .val { opacity: 0; transition: opacity .5s var(--ease) calc(var(--i) * .13s + .45s); }
#p1-detail.is-animated .dotplot__row circle:not(.pulse) {
  opacity: 0;
  transform: translateX(var(--dx, 0));
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1), opacity .3s var(--ease), r .2s var(--ease);
  transition-delay: calc(var(--i) * .13s + .45s), calc(var(--i) * .13s + .45s), 0s;
}
#p1-detail.is-animated .dotplot__row .ci {
  transform-box: fill-box; transform-origin: center;
  transform: scaleX(0);
  transition: transform .8s var(--ease) calc(var(--i) * .13s + 1.25s);
}
#p1-detail.is-animated .chart-card.is-play .dotplot__chance { transform: none; }
#p1-detail.is-animated .chart-card.is-play .dotplot__row .lbl { opacity: 1; translate: 0 0; }
#p1-detail.is-animated .chart-card.is-play .dotplot__row .val { opacity: 1; }
#p1-detail.is-animated .chart-card.is-play .dotplot__row circle:not(.pulse) { opacity: 1; transform: none; }
#p1-detail.is-animated .chart-card.is-play .dotplot__row .ci { transform: none; }
.dotplot__row circle.pulse { fill: none; stroke: var(--accent, #b8673f); stroke-width: 1.2; opacity: 0; pointer-events: none; }
.chart-card.is-play .dotplot__row .pulse { animation: dotPulse 2.4s cubic-bezier(.2, .7, .3, 1) 2.2s infinite; }
@keyframes dotPulse {
  0% { r: 5; opacity: .7; }
  100% { r: 16; opacity: 0; }
}

/* GearShift detail screenshot */
.detail__media--phone { width: auto; align-self: center; }
.detail__media--phone .phone { height: min(72vh, 620px); width: auto; max-width: 100%; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 1.1s var(--ease) var(--d, 0s),
    transform 1.1s var(--ease) var(--d, 0s);
}
.js [data-reveal="photo"] { transform: translateY(70px) scale(.97); transition-duration: 1.5s; }
.js [data-reveal="line"] { transform: scaleX(0); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* "Hello!" / headings: ghost slides in from the left, title follows */
.js .heading[data-reveal] { transform: none; opacity: 1; }
.js .heading[data-reveal] h2 {
  clip-path: inset(0 100% 0 0);
  transform: translateX(-14px);
  transition: clip-path 1.2s var(--ease) .15s, transform 1.2s var(--ease) .15s;
}
.js .heading[data-reveal] .ghost {
  opacity: 0;
  translate: -50px 0;
  transition: opacity 1.6s var(--ease), translate 1.6s var(--ease);
}
.js .heading[data-reveal].is-in h2 { clip-path: inset(-20% -10% -20% 0); transform: none; }
.js .heading[data-reveal].is-in .ghost { opacity: 1; translate: 0 0; }

[data-parallax] { will-change: transform; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  .resume { grid-template-columns: 1fr; gap: 72px; }
  .resume__col--right { padding-top: 0; }
}

@media (max-width: 900px) {
  :root { --gutter: 48px; }

  .page { padding-top: 96px; padding-bottom: 96px; }

  .intro { grid-template-columns: 1fr; gap: 0; padding-top: 96px; }
  .intro__text { padding: 0 0 56px; }
  .intro__media { max-width: 400px; }

  .detail { grid-template-columns: 1fr; gap: 56px; }
  .detail__media { justify-self: start; width: min(100%, 360px); }
  .detail { background: linear-gradient(180deg, var(--bg) 0%, #e7e8ec 50%, #5d6477 100%); }

  .project { align-items: flex-end; }
  .project--light { background: linear-gradient(180deg, #2a2a2c 0%, #d6d6d6 50%, #e9e9e9 100%); }
  .project--light .placeholder { background: linear-gradient(180deg, #1e1e20 0%, #d7d7d7 55%, #ececec 100%); place-items: start center; padding: 22% 16px 0; }
  .project--dark .placeholder { place-items: start center; padding: 22% 16px 0; }

  /* real project visuals sit in the top half; the text sits at the bottom */
  .project__art { top: 26%; right: 50%; width: 130vw; transform: translate(50%, -50%); }
  .project--light .project__media:has(.phones) { background: linear-gradient(180deg, #2a2a2c 0%, #d6d6d6 55%, #e9e9e9 100%); }
  .phones { top: 30%; right: 50%; height: 44vh; transform: translate(50%, -50%); }
  .chart-card { justify-self: start; }
  .detail__media--phone { justify-self: start; }
  .detail__media--phone .phone { height: min(60vh, 520px); }
  .project--showroom { flex-direction: column; align-items: stretch; justify-content: flex-end; padding-top: 0; }
  .project--showroom .project__media.showroom { position: relative; inset: auto; flex: none; height: 84svh; margin: 0 calc(var(--gutter) * -1) 28px; }
  .showroom__hud, .showroom__loader, .showroom__fallback { left: 0; }
  .showroom__hud { padding: 72px 16px 40px; }
  .showroom__hint { flex-wrap: wrap; justify-content: center; text-align: center; row-gap: 4px; font-size: 9px; letter-spacing: .18em; }
  .showroom__credit { left: 16px; right: 16px; bottom: 8px; text-align: center; font-size: 8.5px; }
  .gs-tour { justify-self: center; }
  .gs-tour__stage { --h: min(60vh, 520px); }
  .gs-tour__cap { min-width: 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  body { font-size: 14px; }
  .page { padding-top: 80px; padding-bottom: 80px; }
  .page-label { display: none; }

  .cover__name { white-space: normal; line-height: 1.15; font-size: clamp(2.2rem, 12vw, 3.6rem); }
  .cover__word { display: block; }

  .ghost { left: -0.2em; }
  .ghost--num { left: -0.2em; }
  .intro__name { margin-top: 28px; }

  .skill-group { grid-template-columns: 1fr; gap: 6px; }

  .toc a { grid-template-columns: 1fr 48px; gap: 16px; }
  .toc__line { display: none; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
  [data-parallax] { transform: none !important; }
}

/* =========================================================
   PROJECT SHOWCASE — Monolith direction
   deep black + graphite, a golden / burnt-orange light strip as the
   recurring motif, big quiet numbers, small text, lots of space.
   ========================================================= */
:root {
  --mono-black: #070707;
  --mono-char: #111113;
  --mono-graphite: #1c1d20;
  --gold-hot: #fff1d6;
  --gold: #e3ad62;
  --burnt: #c4622d;
  --mono-ink: #f1ede8;
}

/* ---- heroes: charcoal fading into black, a soft warm key light top-right ---- */
.project--dark {
  background:
    radial-gradient(90% 75% at 82% 18%, rgba(70, 64, 58, .32), transparent 62%),
    linear-gradient(160deg, #232427 0%, #141416 42%, var(--mono-black) 100%);
}
.project--dark.project--showroom { background: #09090a; }   /* the 3D showroom keeps its own black */
.project--dark .heading h2 { color: var(--mono-ink); }
.project--dark .ghost--num { color: rgba(255, 255, 255, .12); }
.project--dark .project__desc { color: #a7a19b; }
.project__meta {
  margin: clamp(14px, 1.2vw, 22px) 0 0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: clamp(9.5px, .58vw, 11px); letter-spacing: .24em; text-transform: uppercase; color: #7f7973;
}
.project__meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); opacity: .8; }

/* ---- the accent rule becomes a thin golden line with light running along it ---- */
.project .accent-line {
  position: relative; overflow: hidden;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-hot) 0%, var(--gold) 32%, var(--burnt) 72%, rgba(196, 98, 45, 0) 100%);
  box-shadow: 0 0 10px rgba(227, 173, 98, .35);
}
.project .accent-line::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 35%;
  background: linear-gradient(90deg, transparent, rgba(255, 252, 245, .95), transparent);
  translate: -120% 0;
  animation: lineSweep 5.5s cubic-bezier(.6, 0, .4, 1) 2.2s infinite;
}
@keyframes lineSweep { 0% { translate: -120% 0; } 45%, 100% { translate: 320% 0; } }

/* ---- the light strip: one 2px bar of warm light, revealed from the top, with a spark travelling down ---- */
.lstrip {
  position: absolute;
  width: 2px;
  border-radius: 2px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 241, 214, 0) 0%, rgba(255, 241, 214, .95) 7%, #f2c17a 28%, #e08c3c 64%, rgba(196, 98, 45, 0) 100%);
  box-shadow: 0 0 5px 1px rgba(242, 180, 100, .55), 0 0 22px 4px rgba(224, 140, 60, .22);
  transform-origin: 50% 0;
  transform: scaleY(0);
  transition: transform 2s cubic-bezier(.7, 0, .2, 1) .25s;
}
.lstrip::before {           /* the glow it throws on its surroundings */
  content: ""; position: absolute; top: 0; bottom: 0; left: -22px; right: -22px;
  background: radial-gradient(closest-side, rgba(227, 150, 80, .2), transparent);
  animation: stripBreathe 5.5s ease-in-out infinite;
}
.lstrip i {
  position: absolute; left: -1px; right: -1px; top: 0; height: 18%;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, rgba(255, 251, 242, .95) 50%, transparent);
  opacity: 0;
  animation: stripSpark 5.2s cubic-bezier(.55, 0, .45, 1) 2.2s infinite;
}
.is-entered .lstrip { transform: scaleY(1); }
@keyframes stripSpark { 0% { translate: 0 -40%; opacity: 0; } 12% { opacity: 1; } 80% { opacity: .9; } 100% { translate: 0 560%; opacity: 0; } }
@keyframes stripBreathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---- projects ease back as you scroll past them (showcase.js sets --exit 0..1) ---- */
.project[data-project] .project__media { scale: calc(1 - var(--exit, 0) * .05); opacity: calc(1 - var(--exit, 0) * .6); transform-origin: 50% 0; }
.project[data-project] .project__text { translate: 0 calc(var(--exit, 0) * -48px); opacity: calc(1 - var(--exit, 0) * .85); }

/* =========================================================
   VOICEPULSE (P/07–08)
   ========================================================= */
/* hero: the cabin from the reference photo. Near-black, the seat's maroon fabric, one amber reading light.
   Every colour here was sampled from that photograph. */
.project--dark.project--vp {
  background:
    radial-gradient(34% 44% at 85% 27%, rgba(92, 55, 31, .30) 0%, rgba(72, 45, 31, .14) 40%, transparent 72%),
    radial-gradient(48% 42% at 68% 82%, rgba(77, 33, 26, .24), transparent 70%),
    #070301;
}
.project--vp .project__media.vp-hero { inset: 0; background: none; overflow: hidden; }
.vp-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; opacity: 0; transition: opacity 2.4s cubic-bezier(.45, 0, .2, 1); }
.project--vp.is-entered .vp-scene { opacity: 1; }
.vp-hero::before {            /* the fabric-like grain of the photo */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--vp-grain, none); background-size: 180px 180px;
  opacity: .07;
}
.vp-hero::after {             /* the darkness of the photo closing in, deepest behind the text */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, #070301 0%, rgba(7, 3, 1, .84) 24%, rgba(7, 3, 1, 0) 47%),
    radial-gradient(125% 100% at 72% 42%, transparent 52%, rgba(7, 3, 1, .9) 100%);
}
.project--vp .page-label { color: rgba(244, 243, 242, .32); }
.project--vp .ghost--num { color: rgba(244, 243, 242, .1); }
.project--vp .heading h2 { color: #f4f3f2; }
.project--vp .project__tag { color: #b1afae; }
.project--vp .project__desc { color: #b9b0a8; }
.project--vp .project__meta { color: rgba(244, 243, 242, .4); }
.project--vp .project__meta i { background: #d0ac84; }
.project--vp .project__link { color: #f4f3f2; }
.project--vp .accent-line {
  background: linear-gradient(90deg, #d0ac84 0%, #966c47 38%, #724025 74%, rgba(114, 64, 37, 0) 100%);
  box-shadow: 0 0 10px rgba(150, 108, 71, .35);
}
.project--vp .accent-line::after { background: linear-gradient(90deg, transparent, rgba(248, 228, 196, .9), transparent); }

/* an app window: dark browser chrome, the real screenshot inside */
.vp-win {
  position: relative; margin: 0;
  border-radius: 10px; overflow: hidden;
  background: #f3f4f6;
  box-shadow: 0 70px 120px -40px rgba(0, 0, 0, .9), 0 30px 60px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .07);
}
.vp-win__bar { position: relative; z-index: 2; height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #1b1c1f; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.vp-win__bar i { width: 8px; height: 8px; border-radius: 50%; background: #3b3c40; flex: none; }
.vp-win__bar span { margin-left: 10px; padding: 3px 10px; flex: 0 1 60%; border-radius: 5px; background: #26272b; color: #8d8882; font-size: 10px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-win__view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.vp-win__view img { display: block; width: 100%; height: auto; max-width: none; will-change: transform; }

@keyframes winSheen { to { translate: 130% 0; } }

/* ---- detail pages on black (VoicePulse, GearShift, the placeholder) ---- */
.detail--dark {
  --accent: var(--gold);
  background:
    radial-gradient(55% 70% at 76% 50%, rgba(64, 58, 52, .3), transparent 70%),
    linear-gradient(180deg, #0c0c0d 0%, var(--mono-black) 100%);
  color: #a39d97;
}
.detail--dark .page-label { color: #5d5856; }
.detail--dark .detail__title { color: var(--mono-ink); }
.detail--dark .detail__sub { color: #8a847e; }
.detail--dark .detail__text > p:not(.detail__sub) { color: #a7a19b; }
.detail--dark .detail__text > p.detail__stack { color: #77716b; }
.detail--dark .steps__icon { color: #e4dfd9; border-color: rgba(236, 232, 226, .55); }
.detail--dark .steps b { color: var(--mono-ink); }
.detail--dark .steps small { color: #8e8882; }
.detail--dark .placeholder--tall { background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, .03) 14px 15px), rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .5); }
.steps--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 620px; }

/* light detail pages (SCoPe) take Monolith's warm off-white */
.detail:not(.detail--dark) { background: linear-gradient(100deg, #f6f5f3 0%, #f0efec 55%, #e7e4df 100%); }

/* ---- VoicePulse screen tour: windows stacked in depth, the light strip marks the step ---- */
.detail--vp { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 4.5vw; }
.detail--vp .detail__media.vp-tour { margin-right: calc(var(--gutter) * -.45);
  --stage-pad: clamp(34px, 3.4vw, 56px);
  justify-self: end; align-self: center;
  width: min(100%, 800px);
  display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 24px;
}
.vp-tour__rail { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--stage-pad) + 40px) 0 14px; }
.vp-tour__strip { position: absolute; right: 0; top: calc(var(--stage-pad) + 40px); bottom: 14px; width: 1px; background: rgba(255, 255, 255, .1); }
.vp-tour__fill {
  position: absolute; left: -.5px; top: 0; width: 2px; height: var(--head, 0px);
  background: linear-gradient(180deg, var(--gold-hot), var(--gold) 45%, var(--burnt));
  box-shadow: 0 0 8px rgba(227, 160, 90, .6), 0 0 22px rgba(224, 140, 60, .25);
  transition: height 1.1s cubic-bezier(.65, 0, .25, 1);
}
.vp-tour__head {
  position: absolute; left: -3.5px; top: var(--head, 0px); width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--gold-hot);
  box-shadow: 0 0 10px 3px rgba(242, 180, 100, .8), 0 0 30px 8px rgba(224, 140, 60, .35);
  transition: top 1.1s cubic-bezier(.65, 0, .25, 1);
}
.vp-tour__tick {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 0 14px 0 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; text-align: right;
  color: #6c6761; transition: color .4s var(--ease);
  height: 0; overflow: visible;
}
.vp-tour__tick em { font-style: normal; font-variant-numeric: tabular-nums; color: #57524d; transition: color .4s var(--ease); }
.vp-tour__tick::after { content: ""; position: absolute; right: -3px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #3a3734; transition: background .4s var(--ease); }
.vp-tour__tick:hover { color: #c9c3bd; }
.vp-tour__tick.is-on { color: var(--mono-ink); }
.vp-tour__tick.is-on em { color: var(--gold); }
.vp-tour__tick.is-on::after { background: transparent; }
.vp-tour__tick:focus-visible { outline: 1px dashed rgba(236, 232, 226, .5); outline-offset: 3px; }

.vp-tour__stage { position: relative; padding: var(--stage-pad) 8% 0 0; }
.vp-tour__stage::before { content: ""; display: block; padding-top: calc(62.5% + 26px); }   /* reserves the front window's height */
.vp-shot {
  position: absolute; left: 0; right: 8%; bottom: 0;
  transform-origin: 100% 0;
  translate: 0 0; scale: 1;
  transition: translate 1.15s cubic-bezier(.65, 0, .25, 1), scale 1.15s cubic-bezier(.65, 0, .25, 1), opacity 1s cubic-bezier(.65, 0, .25, 1), filter 1s var(--ease);
  cursor: pointer;
}
.vp-shot[data-off="0"]  { z-index: 5; opacity: 1; cursor: default; }
.vp-shot[data-off="1"]  { z-index: 4; opacity: .7; translate: 4.5% -9%; scale: .92; filter: brightness(.42) saturate(.7); }
.vp-shot[data-off="2"]  { z-index: 3; opacity: .38; translate: 8.5% -17%; scale: .84; filter: brightness(.3) saturate(.5); }
.vp-shot[data-off="far"] { z-index: 2; opacity: 0; translate: 12% -24%; scale: .78; filter: brightness(.3); }
.vp-shot[data-off="-1"] { z-index: 6; opacity: 0; translate: -7% 5%; scale: 1.05; filter: blur(6px); pointer-events: none; }
.vp-shot[data-off="1"]:hover { filter: brightness(.62) saturate(.85); }
.vp-shot .vp-win__view img { width: 124.7%; margin-left: -24.7%; transform: translateY(0); transition: transform .8s var(--ease); }
.vp-shot.is-cur .vp-win__view img { transform: translateY(var(--pan, -30%)); transition: transform var(--hold, 5.4s) cubic-bezier(.45, 0, .55, 1) .9s; }
.vp-shot::after {            /* sheen as each screen arrives */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .26) 50%, transparent 62%);
  translate: -130% 0;
}
.vp-shot.is-cur::after { animation: winSheen 1.4s cubic-bezier(.5, 0, .3, 1) .5s; }
.vp-tour__cap {
  grid-column: 2; margin: 18px 0 0;
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(10px, .6vw, 12px); letter-spacing: .22em; text-transform: uppercase; color: #8a847e;
}
.vp-tour__cap i { width: 16px; height: 1px; background: var(--gold); }
.vp-tour__num { font-variant-numeric: tabular-nums; }
.vp-tour__name { font-weight: 600; color: var(--mono-ink); }
.vp-tour__name.is-swap { animation: gsName .6s var(--ease); }

/* =========================================================
   GEARSHIFT (P/09–10): golden backlight behind the phones
   ========================================================= */
/* the GearShift showroom's lighting, in a light version: the same bands and the same cool grey hue
   (pale above, a soft grey floor pool under the phones with a bright platform sheen, a cool tint at left) */
.detail.detail--gs {
  background:
    var(--fine-grain) 0 0 / 120px 120px,
    radial-gradient(34% 26% at 70% 74%, rgba(255, 255, 255, .8), transparent 72%),
    radial-gradient(62% 46% at 68% 76%, rgba(196, 199, 206, .55), transparent 72%),
    radial-gradient(40% 30% at 22% 82%, rgba(176, 184, 192, .26), transparent 72%),
    linear-gradient(180deg, #f4f5f6 0%, #f2f3f5 40%, #e6e8eb 64%, #e9ebee 82%, #eef0f2 100%);
}
/* carousel controls, readable on the light room */
.detail--gs .gs-tour__bar { color: #2b2b2d; }
.detail--gs .gs-tour__dots i { background: rgba(30, 32, 36, .18); }
.detail--gs .gs-tour__dots button:hover i { background: rgba(30, 32, 36, .38); }
.detail--gs .gs-tour__theme { border-color: rgba(30, 32, 36, .28); background: rgba(30, 32, 36, .05); color: #2b2b2d; }
.detail--gs .gs-tour__knob { box-shadow: 0 1px 3px rgba(0, 0, 0, .22); }
.detail--gs .gs-tour.is-dark .gs-tour__theme .sun { color: #2b2b2d; }
/* sits just behind the front phone (in front of the side ones), taller than it, so light spills out above and below */
.lstrip--gs { left: 50%; top: -16%; height: 132%; z-index: 0; transform: translateZ(-60px) scaleY(0); }
.detail--gs.is-entered .lstrip--gs { transform: translateZ(-60px) scaleY(1); }
.lstrip--gs::before { left: -70px; right: -70px; background: radial-gradient(closest-side, rgba(227, 150, 80, .26), transparent); }
.detail--gs .gs-tour__cap i { background: var(--gold); opacity: 1; }
.detail--gs .gs-tour__dots button.is-on i::after { background: linear-gradient(90deg, var(--gold), #b5723a); }

/* =========================================================
   PROJECT INDICATOR (fixed, right edge)
   ========================================================= */
.prail {
  --i: 0; --p: 0;
  position: fixed; right: clamp(16px, 1.7vw, 30px); top: 50%; z-index: 40;
  width: 24px; height: 176px;
  color: #e9e4df;
  opacity: 0; translate: 14px -50%; pointer-events: none;
  transition: opacity .7s var(--ease), translate .7s var(--ease), color .6s var(--ease);
}
.prail.is-on { opacity: 1; translate: 0 -50%; pointer-events: auto; }
.prail.is-light { color: #2a2a2a; }
/* a soft backing so it stays legible over bright screenshots */
.prail::before {
  content: ""; position: absolute; inset: -14px -9px -16px;
  border-radius: 14px;
  background: rgba(12, 12, 13, .42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05);
  transition: background .6s var(--ease);
}
.prail.is-light::before { background: rgba(246, 245, 243, .55); box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); }
.prail__num {
  position: absolute; top: 0; left: 50%; translate: -50% 0;
  height: 16px; overflow: hidden;
  font-family: var(--f-head); font-weight: 300; font-size: 12.5px; line-height: 16px; letter-spacing: .06em;
}
.prail__digits { display: flex; flex-direction: column; transform: translateY(calc(var(--i) * -16px)); transition: transform .9s cubic-bezier(.65, 0, .25, 1); }
.prail__digits b { display: block; height: 16px; font-weight: 300; }
.prail__track { position: absolute; left: 50%; top: 32px; bottom: 8px; width: 1px; translate: -50% 0; }
.prail__track::before { content: ""; position: absolute; inset: 0; background: currentColor; opacity: .2; }
.prail__fill {
  position: absolute; left: -.5px; top: 0; width: 2px; height: calc(var(--p) * 100%);
  background: linear-gradient(180deg, var(--gold-hot), var(--gold) 50%, var(--burnt));
  box-shadow: 0 0 8px rgba(227, 160, 90, .65);
}
.prail__tick {
  position: absolute; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  display: grid; place-items: center;
}
.prail__tick[data-i="0"] { top: 32px; }
.prail__tick[data-i="1"] { top: 100px; }
.prail__tick[data-i="2"] { top: 168px; }
.prail__tick::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid currentColor; background: var(--prail-bg, #0b0b0c); opacity: .55;
  transition: background .5s var(--ease), border-color .5s var(--ease), opacity .5s var(--ease), box-shadow .5s var(--ease), scale .5s var(--ease);
}
.prail.is-light .prail__tick::before { --prail-bg: #f2f1ee; }
.prail__tick.is-on::before { opacity: 1; background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px 2px rgba(227, 160, 90, .6); scale: 1.15; }
.prail__tick span {
  position: absolute; right: 26px; top: 50%; translate: 6px -50%;
  font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transition: opacity .4s var(--ease), translate .4s var(--ease);
}
.prail__tick:hover span, .prail__tick:focus-visible span { opacity: .8; translate: 0 -50%; }
/* the current project, written vertically under the rail like the page labels */
.prail__name {
  position: absolute; left: 50%; top: 192px; translate: -50% 0;
  writing-mode: vertical-rl; rotate: 180deg;
  font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; opacity: .7;
}
.prail__name.is-swap { animation: prailName .7s var(--ease); }
@keyframes prailName { from { opacity: 0; translate: -50% -8px; } }
.prail__tick:focus-visible { outline: 1px dashed currentColor; outline-offset: 2px; border-radius: 50%; }

/* ---- responsive ---- */
/* grid columns never grow wider than the page because of a wide child */
.detail > * { min-width: 0; }

@media (max-width: 900px) {
  .prail { display: none; }
  .project--dark.project--vp { background: radial-gradient(60% 34% at 80% 14%, rgba(92, 55, 31, .32), transparent 72%), radial-gradient(70% 30% at 50% 46%, rgba(77, 33, 26, .2), transparent 70%), #070301; }
  .vp-hero::after { background: linear-gradient(180deg, rgba(7, 3, 1, 0) 38%, rgba(7, 3, 1, .92) 66%, #070301 100%), radial-gradient(120% 70% at 55% 26%, transparent 50%, rgba(7, 3, 1, .85) 100%); }
  .gs-tour__bar { flex-wrap: wrap; justify-content: center; row-gap: 12px; max-width: 100%; }
  .detail:not(.detail--dark) { background: linear-gradient(180deg, #f6f5f3 0%, #eeece8 100%); }
  .detail--dark { background: radial-gradient(90% 50% at 50% 70%, rgba(64, 58, 52, .3), transparent 70%), linear-gradient(180deg, #0c0c0d 0%, var(--mono-black) 100%); }
  .steps--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }


  .detail--vp { grid-template-columns: 1fr; gap: 48px; }
  .detail--vp .detail__media.vp-tour { justify-self: stretch; width: 100%; margin-right: 0; grid-template-columns: minmax(0, 1fr); }
  .vp-tour__rail { order: 2; grid-column: 1; flex-direction: row; justify-content: space-between; padding: 22px 0 0; }
  .vp-tour__strip { top: 22px; bottom: auto; left: 0; right: 0; width: auto; height: 1px; }
  .vp-tour__fill { top: -.5px; left: 0; height: 2px; width: var(--head, 0px); transition: width 1.1s cubic-bezier(.65, 0, .25, 1); }
  .vp-tour__head { top: -3.5px; left: var(--head, 0px); margin: 0 0 0 -4px; transition: left 1.1s cubic-bezier(.65, 0, .25, 1); }
  .vp-tour__tick { height: auto; flex-direction: column-reverse; padding: 14px 0 0; font-size: 8.5px; letter-spacing: .12em; gap: 4px; align-items: center; text-align: center; }
  .vp-tour__tick::after { right: auto; left: 50%; top: 0; margin: -2.5px 0 0 -2.5px; }
  .vp-tour__tick span { display: none; }
  .vp-tour__stage { grid-column: 1; }
  .vp-tour__cap { grid-column: 1; order: 3; }
  .lstrip--gs { top: -6%; height: 112%; }
}
@media (prefers-reduced-motion: reduce) {
  .vp-scene { opacity: 1; }
  .lstrip { transform: scaleY(1); }
  .lstrip--gs { transform: translateZ(-60px) scaleY(1); }
}

/* =========================================================
   VOICEPULSE DETAIL (P/08) in the hero's cabin palette
   (sampled from the reference seat photo: near-black, maroon fabric,
   leather brown, one amber reading light, ivory type)
   ========================================================= */
.detail--dark.detail--vp {
  --accent: #d0ac84;
  background:
    radial-gradient(40% 55% at 78% 30%, rgba(92, 55, 31, .26) 0%, rgba(72, 45, 31, .12) 42%, transparent 72%),
    radial-gradient(50% 45% at 70% 86%, rgba(77, 33, 26, .2), transparent 70%),
    #070301;
  color: #b9b0a8;
}
.detail--vp .page-label { color: rgba(244, 243, 242, .32); }
.detail--vp .detail__title { color: #f4f3f2; }
.detail--vp .detail__sub { color: #b1afae; }
.detail--dark.detail--vp .detail__text > p:not(.detail__sub) { color: #b9b0a8; }
.detail--dark.detail--vp .detail__text > p.detail__stack { color: rgba(244, 243, 242, .4); }
.detail--dark.detail--vp .steps__icon { color: rgba(244, 243, 242, .88); border-color: rgba(244, 243, 242, .4); }
.detail--dark.detail--vp .steps b { color: #f4f3f2; }
.detail--dark.detail--vp .steps small { color: rgba(244, 243, 242, .5); }

/* app windows: warm leather-dark chrome instead of cool grey */
.detail--vp .vp-win { box-shadow: 0 60px 110px -40px rgba(0, 0, 0, .95), 0 26px 50px -28px rgba(7, 3, 1, .9), 0 0 0 1px rgba(208, 172, 132, .1); }
.detail--vp .vp-win__bar { background: #1a0f0a; border-bottom-color: rgba(244, 243, 242, .04); }
.detail--vp .vp-win__bar i { background: #4d211a; }
.detail--vp .vp-win__bar span { background: #0e0704; color: rgba(244, 243, 242, .42); }
.detail--vp .vp-shot::after { background: linear-gradient(105deg, transparent 38%, rgba(248, 228, 196, .2) 50%, transparent 62%); }

/* the rail: lamp amber running down to copper */
.detail--vp .vp-tour__strip { background: rgba(244, 243, 242, .08); }
.detail--vp .vp-tour__fill {
  background: linear-gradient(180deg, #f8e4c4, #d0ac84 40%, #966c47 72%, #724025);
  box-shadow: 0 0 8px rgba(208, 172, 132, .5), 0 0 22px rgba(150, 108, 71, .28);
}
.detail--vp .vp-tour__head { background: #f8e4c4; box-shadow: 0 0 10px 3px rgba(208, 172, 132, .75), 0 0 30px 8px rgba(150, 108, 71, .35); }
.detail--vp .vp-tour__tick { color: rgba(244, 243, 242, .34); }
.detail--vp .vp-tour__tick em { color: rgba(244, 243, 242, .24); }
.detail--vp .vp-tour__tick::after { background: #301810; }
.detail--vp .vp-tour__tick:hover { color: rgba(244, 243, 242, .72); }
.detail--vp .vp-tour__tick.is-on { color: #f4f3f2; }
.detail--vp .vp-tour__tick.is-on em { color: #d0ac84; }
.detail--vp .vp-tour__cap { color: rgba(244, 243, 242, .45); }
.detail--vp .vp-tour__cap i { background: #d0ac84; }
.detail--vp .vp-tour__name { color: #f4f3f2; }

@media (max-width: 900px) {
  .detail--dark.detail--vp {
    background:
      radial-gradient(70% 30% at 70% 62%, rgba(92, 55, 31, .24), transparent 72%),
      radial-gradient(80% 30% at 40% 92%, rgba(77, 33, 26, .18), transparent 70%),
      #070301;
  }
}

/* GearShift detail on phones: the lit floor sits low, under the phones (light version) */
@media (max-width: 900px) {
  .detail.detail--gs {
    background:
      var(--fine-grain) 0 0 / 120px 120px,
      radial-gradient(60% 16% at 50% 88%, rgba(255, 255, 255, .8), transparent 72%),
      radial-gradient(90% 26% at 50% 86%, rgba(196, 199, 206, .55), transparent 72%),
      linear-gradient(180deg, #f4f5f6 0%, #f2f3f5 50%, #e6e8eb 78%, #eef0f2 100%);
  }
}

/* =========================================================
   FINE GRAIN (SCoPe + GearShift description pages): a very thin, fine
   film grain, as a background layer so it never sits over the content
   ========================================================= */
:root {
  --fine-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .2 -.075'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   SCoPe DESCRIPTION (P/06): the light version of SCoPe's own hero
   (sampled from it: warm near-black #0c0a09 with a terracotta glow
   rgba(150,90,70) centred at 70% 45%; warm ivory #e8e0da; burnt orange #b8673f)
   — same glow, same place, same hue, in light values
   ========================================================= */
#p1-detail {
  background:
    var(--fine-grain) 0 0 / 120px 120px,
    radial-gradient(55% 60% at 70% 45%, rgba(196, 128, 102, .17), transparent 70%),
    radial-gradient(28% 32% at 70% 45%, rgba(184, 103, 63, .07), transparent 72%),
    radial-gradient(130% 110% at 70% 45%, transparent 58%, rgba(150, 90, 70, .07) 100%),
    #f6f1ed;
}
@media (max-width: 900px) {
  #p1-detail {
    background:
      var(--fine-grain) 0 0 / 120px 120px,
      radial-gradient(80% 40% at 50% 74%, rgba(196, 128, 102, .17), transparent 70%),
      radial-gradient(130% 110% at 50% 70%, transparent 58%, rgba(150, 90, 70, .07) 100%),
      #f6f1ed;
  }
}

/* =========================================================
   NAVBAR — transparent, fixed. The only colour is the accent of the name:
   coral-pink rgb(228,152,144) (its glitch layer) and the deeper rose rgb(196,112,104) (its ink).
   No background, no border: the letters and one gliding hairline of light carry everything.
   ========================================================= */
.nav {
  --coral: 228, 152, 144;
  --rose: 196, 112, 104;
  --nav-base: var(--rose);            /* resting letters on light sections */
  --glide: cubic-bezier(.65, 0, .25, 1);
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2.2vw, 30px) clamp(20px, 3.2vw, 56px) 0;
  pointer-events: none;               /* only the words themselves take the mouse */
  background: none; border: 0;
}
.nav[data-tone="dark"] { --nav-base: var(--coral); }
.nav a { pointer-events: auto; }

.nav__brand, .nav__link, .nav__drop a {
  position: relative; display: inline-block;
  font-family: var(--f-head); font-weight: 600; text-transform: uppercase; text-decoration: none;
  font-size: clamp(10.5px, .72vw, 12.5px); letter-spacing: .26em; line-height: 1;
  color: rgba(var(--nav-base), .8);
  padding: 9px 2px;
  transition: color .5s var(--ease), text-shadow .6s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.nav__brand { font-weight: 700; letter-spacing: .3em; }
.nav__brand > span, .nav__link > span, .nav__drop a > span { position: relative; z-index: 1; display: block; white-space: nowrap; }
.nav__links { position: relative; display: flex; align-items: center; gap: clamp(20px, 2.8vw, 48px); }
.nav__item { position: relative; }

/* ---- letters: split by nav.js so each can move on its own ---- */
.nav__ch { display: inline-block; transition: color .45s var(--ease); }
/* page load: the bar writes itself in, letter by letter */
.js .nav__ch { opacity: 0; translate: 0 .7em; filter: blur(3px); }
.is-loaded .nav__ch, .nav.is-in .nav__ch {
  opacity: 1; translate: 0 0; filter: blur(0);
  transition: opacity .7s var(--ease), translate .9s var(--ease), filter .7s var(--ease), color .45s var(--ease);
  transition-delay: calc(.5s + var(--g, 0) * 22ms);
}
/* hover: a ripple runs through the word, each letter lifting and catching the coral */
.nav__brand:hover .nav__ch, .nav__link:hover .nav__ch, .nav__drop a:hover .nav__ch,
.nav__link:focus-visible .nav__ch, .nav__drop a:focus-visible .nav__ch {
  animation: navWave .62s var(--ease) calc(var(--i, 0) * 26ms) both;
}
@keyframes navWave {
  0%   { translate: 0 0; }
  38%  { translate: 0 -3px; color: rgb(var(--coral)); text-shadow: 0 0 10px rgba(var(--coral), .9); }
  100% { translate: 0 0; }
}
.nav__brand:hover, .nav__link:hover, .nav__drop a:hover { color: rgb(var(--coral)); }
.nav[data-tone="light"] .nav__brand:hover, .nav[data-tone="light"] .nav__link:hover, .nav[data-tone="light"] .nav__drop a:hover { color: rgb(var(--rose)); }

/* ---- the glitch: two coral layers split into thin slices (like the name's), on hover or arrival ---- */
.nav__brand::before, .nav__brand::after,
.nav__link::before, .nav__link::after,
.nav__drop a::before, .nav__drop a::after {
  content: attr(data-t);
  position: absolute; left: 2px; top: 9px;
  letter-spacing: inherit; white-space: nowrap;
  opacity: 0; pointer-events: none;
}
.nav__brand::before, .nav__link::before, .nav__drop a::before { color: rgb(var(--coral)); }
.nav__brand::after,  .nav__link::after,  .nav__drop a::after  { color: rgb(var(--rose)); }
.nav__brand:hover::before, .nav__brand:hover::after,
.nav__link:hover::before, .nav__link:hover::after,
.nav__drop a:hover::before, .nav__drop a:hover::after,
.is-pulse::before, .is-pulse::after { opacity: 1; }
.nav__brand:hover::before, .nav__link:hover::before, .nav__drop a:hover::before, .is-pulse::before { animation: navSliceA .55s steps(1, end) 1; }
.nav__brand:hover::after,  .nav__link:hover::after,  .nav__drop a:hover::after,  .is-pulse::after  { animation: navSliceB .55s steps(1, end) 1 .04s; }
@keyframes navSliceA {
  0%   { clip-path: inset(0 0 62% 0);  translate: -3px 0; }
  22%  { clip-path: inset(38% 0 30% 0); translate: 3px 0; }
  46%  { clip-path: inset(70% 0 0 0);   translate: -2px 0; }
  70%  { clip-path: inset(10% 0 55% 0); translate: 2px 0; }
  100% { clip-path: inset(0 0 100% 0);  translate: 0 0; opacity: 0; }
}
@keyframes navSliceB {
  0%   { clip-path: inset(55% 0 20% 0); translate: 3px 0; }
  25%  { clip-path: inset(0 0 72% 0);   translate: -3px 0; }
  50%  { clip-path: inset(32% 0 40% 0); translate: 2px 0; }
  75%  { clip-path: inset(78% 0 0 0);   translate: -2px 0; }
  100% { clip-path: inset(0 0 100% 0);  translate: 0 0; opacity: 0; }
}

/* ---- current section: the word warms, and one hairline of light glides underneath ---- */
.nav__link.is-current { color: rgb(var(--coral)); text-shadow: 0 0 9px rgba(var(--coral), .55); }
.nav[data-tone="light"] .nav__link.is-current { color: rgb(var(--rose)); text-shadow: 0 0 10px rgba(var(--coral), .75); }
.nav__glow {
  position: absolute; left: 0; bottom: -3px; height: 9px; width: var(--w, 0px);
  translate: var(--x, 0px) 0;
  pointer-events: none; opacity: 0;
  transition: translate .75s var(--glide), width .75s var(--glide), opacity .6s var(--ease);
}
.nav__glow.is-on { opacity: 1; }
.nav__glow::before {           /* the hairline: brightest in the middle, fading to nothing at both ends */
  content: ""; position: absolute; left: -6%; right: -6%; top: 4px; height: 1px;
  background: linear-gradient(90deg, rgba(var(--coral), 0), rgba(var(--coral), .95) 50%, rgba(var(--coral), 0));
  box-shadow: 0 0 8px rgba(var(--coral), .7);
  transition: scale .5s var(--ease);
  animation: navBreathe 4.8s ease-in-out infinite;
}
.nav__glow::after {            /* a small bead of light riding the line */
  content: ""; position: absolute; left: 50%; top: 2.5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: rgb(var(--coral));
  box-shadow: 0 0 6px 1px rgba(var(--coral), .95), 0 0 16px 3px rgba(var(--coral), .45);
}
.nav__glow.is-moving::before { scale: 1.7 1; }   /* the light stretches as it travels */
@keyframes navBreathe { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
/* hover preview: a faint line where the light would go */
.nav__link > span::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -6px; height: 1px;
  background: linear-gradient(90deg, rgba(var(--coral), 0), rgba(var(--coral), .5), rgba(var(--coral), 0));
  scale: 0 1; opacity: 0; transition: scale .5s var(--ease), opacity .4s var(--ease);
}
.nav__link:not(.is-current):hover > span::after { scale: 1 1; opacity: 1; }

/* ---- the name: waits on the cover (the big name is there), then settles in as you leave it ---- */
.nav__brand { transition: opacity .8s var(--ease), letter-spacing 1s var(--ease), filter .8s var(--ease), color .5s var(--ease); }
.nav__brand.is-away { opacity: 0; letter-spacing: .55em; filter: blur(4px); pointer-events: none; }

/* ---- Projects: a quiet chevron after the word, and a list on a barely-there surface ---- */
.nav__link--menu { padding-right: 18px; }
.nav__chev {
  position: absolute; right: 3px; top: 50%; width: 5px; height: 5px; margin-top: -4px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  rotate: 45deg; transition: rotate .45s var(--ease), margin-top .45s var(--ease);
}
.nav__item.is-open .nav__chev { rotate: 225deg; margin-top: -1px; }
.nav__drop {
  position: absolute; top: 100%; right: -16px; min-width: 210px;
  margin: 10px 0 0; padding: 14px 22px 12px 26px; list-style: none;
  border-radius: 18px;
  background: rgba(var(--coral), .045);
  -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1);
  opacity: 0; visibility: hidden; translate: 0 -8px; pointer-events: none;
  transition: opacity .35s var(--ease), translate .45s var(--ease), visibility 0s .35s;
}
.nav__drop::before {           /* a thin coral line draws down the left edge as the list opens */
  content: ""; position: absolute; left: 12px; top: 16px; bottom: 14px; width: 1px;
  background: linear-gradient(180deg, rgba(var(--coral), 0), rgba(var(--coral), .8) 30%, rgba(var(--coral), .8) 70%, rgba(var(--coral), 0));
  transform-origin: 50% 0; scale: 1 0; transition: scale .6s var(--glide);
}
.nav__item.is-open .nav__drop { opacity: 1; visibility: visible; translate: 0 0; pointer-events: auto; transition: opacity .35s var(--ease), translate .45s var(--ease); }
.nav__item.is-open .nav__drop::before { scale: 1 1; transition-delay: .08s; }
.nav__drop li { opacity: 0; translate: 10px 0; transition: opacity .4s var(--ease), translate .5s var(--ease); }
.nav__item.is-open .nav__drop li { opacity: 1; translate: 0 0; }
.nav__item.is-open .nav__drop li:nth-child(1) { transition-delay: .06s; }
.nav__item.is-open .nav__drop li:nth-child(2) { transition-delay: .12s; }
.nav__item.is-open .nav__drop li:nth-child(3) { transition-delay: .18s; }
.nav__drop a { display: block; width: 100%; padding: 10px 2px; }
.nav__drop a > span::before {  /* the current project gets a bead of light on the line */
  content: ""; position: absolute; left: -16.5px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
  background: rgb(var(--coral)); box-shadow: 0 0 6px 1px rgba(var(--coral), .9);
  opacity: 0; scale: .3; transition: opacity .4s var(--ease), scale .4s var(--ease);
}
.nav__drop a.is-current { color: rgb(var(--coral)); text-shadow: 0 0 10px rgba(var(--coral), .6); }
.nav[data-tone="light"] .nav__drop a.is-current { color: rgb(var(--rose)); text-shadow: 0 0 10px rgba(var(--coral), .8); }
.nav__drop a.is-current > span::before { opacity: 1; scale: 1; }
.nav__link:focus-visible, .nav__brand:focus-visible, .nav__drop a:focus-visible { outline: 1px dashed rgba(var(--coral), .8); outline-offset: 3px; border-radius: 4px; }

/* the 3D showroom's mute button sat where the bar is: move it down a little */
.showroom__mute { top: clamp(64px, 9vh, 88px); }

@media (max-width: 900px) {
  .nav { padding: 14px 16px 0; justify-content: flex-end; }
  .nav__brand { display: none; }
  .nav__links { gap: 22px; }
  .nav__brand, .nav__link, .nav__drop a { font-size: 10px; letter-spacing: .2em; padding: 11px 2px; }
  .nav__link--menu { padding-right: 16px; }
  .nav__brand::before, .nav__brand::after, .nav__link::before, .nav__link::after, .nav__drop a::before, .nav__drop a::after { top: 11px; }
  .nav__drop { right: -8px; min-width: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .nav__ch { opacity: 1; translate: 0 0; filter: none; }
  .nav__glow, .nav__glow::before { transition: none; animation: none; }
  .nav__brand::before, .nav__brand::after, .nav__link::before, .nav__link::after, .nav__drop a::before, .nav__drop a::after { display: none; }
}

/* ---- LinkedIn icon beside the hackathon title ---- */
.award h4 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.award__link { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; color: #9a8f8a; transition: color .35s var(--ease), scale .35s var(--ease); }
.award__link svg { width: 100%; height: 100%; fill: currentColor; }
.award__link:hover, .award__link:focus-visible { color: var(--ink); scale: 1.14; }
.award__link:focus-visible { outline: 1px dashed currentColor; outline-offset: 3px; border-radius: 3px; }

/* =========================================================
   CONTACT (P/11): the Intro's pastel world, closing the site where it began.
   Accent = the name's coral / rose (same as the navbar).
   ========================================================= */
.contact { --coral: 228, 152, 144; --rose: 196, 112, 104; isolation: isolate; }
/* the cover bubble's three pastels as soft balls that drift and bump into each other (contact.js moves them) */
.contact__blobs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.contact__blob {
  position: absolute; left: 0; top: 0; width: var(--d); height: var(--d); border-radius: 50%;
  background: radial-gradient(circle closest-side, rgba(var(--c), .64) 0%, rgba(var(--c), .4) 45%, rgba(var(--c), .12) 78%, rgba(var(--c), 0) 100%);
  will-change: transform; opacity: 0; transition: opacity 1.4s var(--ease);
}
.contact__blobs.is-on .contact__blob { opacity: 1; }
.contact__blob--red    { --c: 236, 166, 156; }
.contact__blob--blue   { --c: 170, 193, 236; }
.contact__blob--yellow { --c: 242, 211, 148; }
.contact__inner { position: relative; width: min(100%, 880px); }

/* heading + emote, built like "Hello!" / "Projects." */
.contact-emoji {
  position: absolute; left: 100%; bottom: -.12em; margin-left: .3em; z-index: 2;
  display: block; width: clamp(64px, 6.4vw, 118px); aspect-ratio: 439 / 325; cursor: default;
}
.contact-emoji img { display: block; width: 100%; height: 100%; max-width: none; transform-origin: 50% 85%; transition: scale .3s var(--ease); }
.contact-emoji:hover img { scale: 1.1; }
.js .heading[data-reveal] .contact-emoji { opacity: 0; transition: opacity 1s var(--ease) .7s; }
.js .heading[data-reveal].is-in .contact-emoji { opacity: 1; }

.contact__lede { margin: clamp(22px, 2.2vw, 40px) 0 0; max-width: 34em; font-size: clamp(13px, .85vw, 16px); line-height: 1.6; color: #5f5f5f; }

/* the three rows: big words, a coral line that draws across, the navbar's glitch */
.contact__list { list-style: none; margin: clamp(34px, 3.8vw, 68px) 0 0; padding: 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.contact__row {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: clamp(14px, 1.6vw, 28px);
  width: 100%; padding: clamp(18px, 1.8vw, 28px) 4px;
  border: 0; border-bottom: 1px solid rgba(0, 0, 0, .08); background: none;
  font: inherit; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer;
}
.contact__icon { display: grid; place-items: center; color: #8a8580; transition: color .4s var(--ease); }
.contact__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.contact__icon svg.fill { fill: currentColor; stroke: none; width: 20px; height: 20px; }
.contact__label {
  position: relative; display: block;
  font-family: var(--f-head); font-weight: 600; font-size: clamp(1.4rem, 2.5vw, 2.8rem); line-height: 1.1; letter-spacing: -.01em;
  transition: color .4s var(--ease), translate .6s var(--ease);
}
.contact__value { font-size: clamp(12px, .8vw, 15px); letter-spacing: .02em; color: #7a7570; transition: color .4s var(--ease); }
.contact__hint { min-width: 7em; text-align: right; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: #a49c96; transition: color .4s var(--ease); }
.contact__line {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, rgb(var(--rose)), rgb(var(--coral)) 60%, rgba(var(--coral), 0));
  box-shadow: 0 0 8px rgba(var(--coral), .5);
  transform-origin: 0 50%; scale: 0 1; transition: scale .8s cubic-bezier(.65, 0, .25, 1);
}
.contact__row:hover .contact__line, .contact__row:focus-visible .contact__line, .contact__row.is-copied .contact__line { scale: 1 1; }
.contact__row:hover .contact__label, .contact__row:focus-visible .contact__label { color: rgb(var(--rose)); translate: 10px 0; }
.contact__row:hover .contact__icon, .contact__row:hover .contact__hint, .contact__row:hover .contact__value,
.contact__row.is-copied .contact__hint { color: rgb(var(--rose)); }
.contact__row:focus-visible { outline: 1px dashed rgba(var(--rose), .7); outline-offset: 4px; border-radius: 4px; }
.contact__label::before, .contact__label::after { content: attr(data-t); position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; }
.contact__label::before { color: rgb(var(--coral)); }
.contact__label::after { color: rgb(var(--rose)); }
.contact__row:hover .contact__label::before { opacity: 1; animation: navSliceA .55s steps(1, end) 1; }
.contact__row:hover .contact__label::after { opacity: 1; animation: navSliceB .55s steps(1, end) 1 .04s; }

.contact__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(26px, 2.6vw, 44px);
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
}
.contact__foot a { color: #7a7570; text-decoration: none; padding-bottom: 3px; border-bottom: 1px solid transparent; transition: color .4s var(--ease), border-color .4s var(--ease); }
.contact__foot a:hover, .contact__foot a:focus-visible { color: rgb(var(--rose)); border-color: rgba(var(--rose), .6); }
.contact__top span { display: inline-block; transition: translate .4s var(--ease); }
.contact__top:hover span { translate: 0 -3px; }

@media (max-width: 900px) {
  .nav__links { gap: 15px; }
  .contact__row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .contact__value { grid-column: 2 / -1; grid-row: 2; }
  .contact__hint { min-width: 0; }
  .contact-emoji { width: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .contact__blob { transition: none; }
}

/* ---- cover: the milk bear, centre bottom. It rolls in once; then its "HI!" and music notes come alive ---- */
.cover-emoji {
  position: absolute; left: 50%; bottom: 14px; z-index: 3; translate: -50% 0;
  display: block; width: clamp(78px, 7vw, 124px); aspect-ratio: 316 / 256; cursor: default;
  opacity: 0; transition: opacity .9s var(--ease) .6s;
}
.is-loaded .cover-emoji { opacity: 1; }
.cover-emoji__art { position: absolute; inset: 0; display: block; transform-origin: 50% 90%; transition: scale .3s var(--ease); }
.cover-emoji:hover .cover-emoji__art { scale: 1.1; }
.cover-emoji__bear { display: block; width: 100%; height: 100%; max-width: none; }
/* the pieces cut out of the GIF, placed exactly where they were drawn (% of the 316 x 256 frame) */
.cover-emoji__fx {
  position: absolute; display: block; height: auto; max-width: none; pointer-events: none;
  opacity: 0; scale: .3;
  transition: opacity .2s ease, scale .5s cubic-bezier(.3, 1.7, .5, 1);
}
.cover-emoji__hi     { left: 6.65%;  top: 2.34%;  width: 30.38%; transform-origin: 50% 100%; }
.cover-emoji__note-p { left: 56.65%; top: 5.47%;  width: 14.56%; transform-origin: 40% 80%; }
.cover-emoji__note-y { left: .32%;   top: 41.02%; width: 13.29%; transform-origin: 40% 80%; }
.cover-emoji.is-waving .cover-emoji__fx { opacity: 1; scale: 1; }
.cover-emoji.is-waving .cover-emoji__hi     { animation: coverHi 1.15s ease-in-out .35s infinite; }
.cover-emoji.is-waving .cover-emoji__note-p { transition-delay: .12s; animation: coverNoteP 2.4s ease-in-out .2s infinite; }
.cover-emoji.is-waving .cover-emoji__note-y { transition-delay: .24s; animation: coverNoteY 2s ease-in-out .3s infinite; }
html:not(.js) .cover-emoji__fx { opacity: 1; scale: 1; }
@keyframes coverHi {            /* a little hop and wiggle, like he's shouting it */
  0%, 100% { translate: 0 0; rotate: 0deg; }
  20%      { translate: 0 -14%; rotate: -6deg; }
  40%      { translate: 0 0; rotate: 0deg; }
  60%      { translate: 0 -7%; rotate: 5deg; }
  80%      { translate: 0 0; rotate: 0deg; }
}
@keyframes coverNoteP {         /* drifts up and sways, like it's floating off the beat */
  0%, 100% { translate: 0 0; rotate: -10deg; }
  50%      { translate: 22% -30%; rotate: 14deg; }
}
@keyframes coverNoteY {
  0%, 100% { translate: 0 0; rotate: 12deg; }
  50%      { translate: -18% -34%; rotate: -14deg; }
}
.cover-emoji .talk-bubble { left: 84%; bottom: 96%; }
@media (max-width: 640px) {
  .cover-emoji { width: 74px; bottom: 12px; }
  .cover-emoji .talk-bubble { left: 54%; bottom: 104%; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-emoji.is-waving .cover-emoji__fx { animation: none !important; }
}

/* the scroll cue now sits in the bottom-right corner, level with the name/school block on the left */
.cover__scroll { left: auto; right: clamp(20px, 4vw, 74px); bottom: clamp(28px, 6vh, 64px); margin-left: 0; }
