
:root {
  --cream: #f4f3ef;
  --cream-2: #ebeae5;
  --ink: #111;
  --gray: #5c5c5c;
  --blue: #0104ff;
  --pink: #ff8bf1;
  --yellow: #e6ff00;
  --line: rgba(17, 17, 17, .18);
  /* free stand-ins for signal-a.studio's PP Editorial New / Neue Haas Grotesk / GT America Mono */
  --display: "Instrument Serif", Georgia, serif;
  --display-wt: 400;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --pad: clamp(16px, 2.6vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background-color: var(--cream);
  /* paper grain: one big uneven tile, kept behind the content */
  background-image: url("/images/paper-grain.png?v=1");
  background-size: 800px 800px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.4;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, p, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--blue); color: var(--cream); }

.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }

.binary {
  background-color: var(--blue);
  background-image: url("/images/bg-binary.jpg");
  background-size: 1100px auto;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--blue) url("/images/bg-binary.jpg") center / 1100px auto;
  color: var(--cream);
  clip-path: inset(0 0 0 0);
}
.preloader__plate { position: relative; width: clamp(220px, 34vw, 420px); aspect-ratio: 1; }
.preloader__logo { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; }
/* full kitchen dishes cloned in for the flicker */
.pre-dish {
  position: absolute; left: 50%; top: 50%; width: 1024px; height: 460px;
  translate: calc(var(--ox) * -1) calc(var(--oy) * -1);
  transform-origin: var(--ox) var(--oy);
  scale: var(--ps, 1.9);
  visibility: hidden;
}
.pre-dish img { position: absolute; object-fit: contain; max-width: none; }
.pre-dish.is-on { visibility: visible; }
.preloader__count {
  position: absolute; right: var(--pad); bottom: 14svh;
  font-family: var(--display); font-weight: var(--display-wt); font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; font-size: clamp(80px, 18vw, 260px); line-height: .8;
  color: var(--yellow);
}
.preloader__note { position: absolute; left: var(--pad); bottom: var(--pad); font-family: var(--mono); font-size: 14px; }
@keyframes bob { from { transform: translateY(-8px) rotate(-4deg); } to { transform: translateY(8px) rotate(4deg); } }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 95;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--blue);
  pointer-events: none;
  display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .2s;
  opacity: 0;
}
.cursor__label { font-family: var(--mono); font-size: 13px; color: var(--cream); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor.is-big { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.cursor.is-big .cursor__label { opacity: 1; }
@media (pointer: fine) { .cursor { opacity: 1; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; justify-content: flex-end; align-items: flex-start;
  padding: 20px var(--pad);
  color: #fff; mix-blend-mode: difference;
  pointer-events: none;
  transition: transform .5s var(--ease);
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
}
.nav.is-hidden { transform: translateY(-130%); }
.nav > * { pointer-events: auto; }
.nav__links { display: flex; justify-content: space-between; width: min(38vw, 620px); }
.nav__links a { position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Vertical name, reads bottom to top in its own gutter ---------- */
/* sized from the name, tall enough for ANNALISE and in the photo's own proportions (480 x 595) */
:root { --rail-name: clamp(22px, 2vw, 30px); --rail-h: calc(var(--rail-name) * 5.1); --rail-w: calc(var(--rail-h) * 480 / 595); }
main { margin-left: calc(var(--pad) + var(--rail-w) + 14px); border-left: 1px solid var(--ink); }
/* a tall box that turns as you scroll: name on two sides, portrait on the other two */
.rail { position: fixed; left: var(--pad); top: 20px; z-index: 70; display: block; width: var(--rail-w); perspective: 1200px; color: var(--ink); font-size: 12px; line-height: 1.15; }
.rail__box { position: relative; display: block; height: var(--rail-h); transform-style: preserve-3d; transform: translateZ(calc(var(--rail-w) / -2)) rotateY(var(--spin, 0deg)); }
.rail__face { position: absolute; inset: 0; display: block; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.rail__face--0 { transform: rotateY(0deg) translateZ(calc(var(--rail-w) / 2)); }
.rail__face--1, .rail__face--2, .rail__face--3 { visibility: hidden; }
.rail__face--1 { transform: rotateY(90deg) translateZ(calc(var(--rail-w) / 2)); }
.rail__face--2 { transform: rotateY(180deg) translateZ(calc(var(--rail-w) / 2)); }
.rail__face--3 { transform: rotateY(270deg) translateZ(calc(var(--rail-w) / 2)); }
.rail__text { display: flex; flex-direction: column; gap: 5px; width: fit-content; height: 100%; writing-mode: vertical-rl; transform: rotate(180deg); }
.rail__face img { width: 100%; height: 100%; object-fit: contain; }
.rail strong { color: var(--blue); font-size: var(--rail-name); font-weight: 700; text-transform: uppercase; letter-spacing: -.03em; line-height: .98; white-space: nowrap; }
.rail sup { font-size: .5em; vertical-align: super; line-height: 0; }
.rail__a { text-align: end; }

/* ---------- Hero ---------- */
.hero {
  --fs: min(20vw, 38svh); /* size of ANNALISE */
  position: relative;
  height: 100svh; min-height: 620px;
  overflow: hidden;
}
.hero__intro {
  position: absolute; top: 17px; left: var(--pad);
  display: flex; align-items: flex-start; gap: clamp(10px, 1vw, 18px);
  font-size: clamp(16px, 1.3vw, 21px); line-height: 1.6;
  z-index: 3;
}
.hero__intro p { max-width: 31ch; }
.hero__logo { flex: none; width: auto; height: .8em; margin: .01em 0 0 .06em; transform-origin: 50% 90%; }
.hero__logo:hover { animation: wiggle .6s ease-in-out; }
@keyframes wiggle { 25% { rotate: -8deg; } 75% { rotate: 6deg; } }
.stack {
  position: absolute; left: 50%; top: 43%; z-index: 2;
  height: min(48svh, 26vw); aspect-ratio: 1536 / 1644;
  translate: -50% -50%;
}
.stack__card {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--cream-2);
  border: 1px solid var(--ink);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .35);
  will-change: transform;
}
.stack__card img { width: 100%; height: 100%; object-fit: cover; }

.hero__name {
  position: absolute; left: var(--pad); bottom: calc(var(--pad) * .5); z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  font-family: var(--display); font-weight: var(--display-wt); font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  font-size: var(--fs); line-height: .8; letter-spacing: -.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero__line { display: flex; align-items: flex-start; gap: .05em; }
.hero__line--last { font-size: .3em; letter-spacing: 0; margin-top: .12em; }
.hero__word { display: inline-flex; overflow: hidden; padding-top: .06em; }
.char { display: inline-block; will-change: transform; }
.hero__year {
  position: absolute; right: var(--pad); bottom: calc(var(--pad) * .6 + 30px);
  font-size: clamp(22px, 2.7vw, 46px); font-weight: 700; letter-spacing: -.02em; line-height: 1;
}
.hero__clock {
  position: absolute; right: var(--pad); bottom: calc(var(--pad) * .6);
  font-size: 13px; text-transform: uppercase; letter-spacing: .02em;
}
.hero__clock span { color: #8a8a8a; margin-right: 6px; }

/* About side: "currently" rotator */
.about__side { display: flex; flex-direction: column; gap: 28px; }
.now { display: flex; gap: 10px; align-items: flex-start; max-width: 260px; font-family: var(--mono); font-size: 13px; line-height: 1.3; }
.now__dot { flex: none; width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; background: var(--blue); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { transform: scale(1.6); opacity: .5; } }
.now__rotator { position: relative; height: 3.9em; overflow: hidden; flex: 1; }
.now__rotator p { position: absolute; inset: 0; }
.now__rotator b { display: block; }

/* ---------- Ticker ---------- */
.ticker { background: var(--ink); color: var(--cream); overflow: hidden; padding: 14px 0; }
.ticker__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.ticker__group { display: flex; align-items: center; gap: 28px; padding-right: 28px; font-family: var(--body); font-weight: 400; letter-spacing: -.01em; font-size: clamp(16px, 1.9vw, 28px); text-transform: uppercase; line-height: 1; }
.ticker__group b { font-weight: inherit; color: var(--yellow); margin-right: .2em; }
.ticker__group img { width: 1.1em; height: 1.1em; animation: spin 6s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- About ---------- */
.about { padding: clamp(90px, 14vw, 200px) var(--pad); display: grid; grid-template-columns: 1fr 4fr; gap: 24px; }
.about__text { font-size: clamp(26px, 3.6vw, 58px); line-height: 1.08; letter-spacing: -.02em; }
.about__text .w { opacity: .14; }

/* ---------- Kitchen ---------- */
.kitchen {
  position: relative; height: 100svh; overflow: hidden;
  background: var(--blue) url("/images/bg-binary.jpg") center / 1100px auto;
  color: var(--cream);
}
.kitchen__head { position: absolute; top: 88px; left: var(--pad); right: var(--pad); z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.kitchen__title { position: relative; font-family: var(--display); font-weight: var(--display-wt); font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; text-transform: uppercase; font-size: clamp(44px, 7vw, 110px); line-height: .9; color: var(--yellow); }
.kitchen__title-b { position: absolute; left: 0; top: 0; white-space: nowrap; color: var(--pink); opacity: 0; }
.kitchen__sub { font-family: var(--mono); font-size: 14px; max-width: 22ch; text-align: right; }
.stage-wrap { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; padding-top: 110px; }
.stage { position: relative; width: 1024px; height: 460px; flex: none; transform: scale(var(--s, 1)); }
.dish { position: absolute; inset: 0; transform-origin: var(--ox) var(--oy); }
.dish img { position: absolute; object-fit: contain; max-width: none; }
.k-group { position: absolute; }
.k-panel { position: absolute; background: #000; border-radius: 3px; overflow: hidden; }
.k-panel img { position: absolute; object-fit: contain; max-width: none; }
.kitchen__foot { position: absolute; left: var(--pad); right: var(--pad); bottom: var(--pad); display: flex; align-items: center; gap: 16px; font-family: var(--mono); font-size: 13px; }
.kitchen__bar { flex: 1; height: 2px; background: rgba(231, 222, 206, .3); }
.kitchen__bar i { display: block; height: 100%; background: var(--yellow); transform-origin: left; transform: scaleX(0); }

/* ---------- Work index ---------- */
.work { padding: clamp(90px, 12vw, 180px) var(--pad) 60px; position: relative; }
.work__head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--ink); padding-bottom: 12px; }
.work__row {
  display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 20px;
  padding: 14px 0; border-bottom: 1px solid var(--ink);
  position: relative; overflow: hidden;
}
.work__row::before {
  content: ""; position: absolute; inset: 0; background: var(--blue);
  transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1;
}
.work__list li { position: relative; z-index: 0; }
.work__row:hover::before { transform: translateY(0); }
.work__row:hover { color: var(--cream); }
.work__num { font-family: var(--mono); font-size: 14px; padding-left: 4px; }
.work__title { font-family: var(--display); font-weight: var(--display-wt); font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; font-size: clamp(64px, 12vw, 190px); line-height: .9; text-transform: uppercase; transition: transform .5s var(--ease); }
.work__row:hover .work__title { transform: translateX(24px); }
.work__meta { font-family: var(--mono); font-size: 13px; text-align: right; padding-right: 4px; }
.preview {
  position: fixed; left: 0; top: 0; z-index: 70;
  width: clamp(200px, 22vw, 340px); aspect-ratio: 5 / 4;
  border-radius: 6px; overflow: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .5);
}
.preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Experience ---------- */
.exp { padding: clamp(90px, 12vw, 180px) var(--pad); }
.exp__head { display: grid; grid-template-columns: 1fr 3fr; gap: 24px; margin-bottom: clamp(40px, 6vw, 90px); }
.exp__title { font-family: var(--display); font-weight: var(--display-wt); font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; text-transform: uppercase; font-size: clamp(44px, 7vw, 110px); line-height: .9; }
.exp__group { display: grid; grid-template-columns: 1fr 3fr; gap: 24px; border-top: 1px solid var(--ink); padding: 18px 0 30px; }
.exp__label { font-family: var(--mono); font-size: 14px; }
.exp__label span { color: var(--blue); margin-right: 6px; }
.exp__group li {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 170px; align-items: baseline; gap: 16px;
  padding: 12px 10px; border-bottom: 1px solid var(--line);
  font-size: clamp(18px, 2vw, 28px); letter-spacing: -.01em;
  overflow: hidden; isolation: isolate;
  transition: color .35s var(--ease), padding .35s var(--ease);
}
.exp__group li span:nth-child(2) { color: var(--gray); transition: color .35s; }
.exp__group li span:nth-child(3) { font-family: var(--mono); font-size: 14px; letter-spacing: 0; color: var(--gray); text-align: right; white-space: nowrap; transition: color .35s; }
.exp__group li::before { content: ""; position: absolute; inset: 0; background: var(--pink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); z-index: -1; }
.exp__group li:hover { padding-left: 22px; }
.exp__group li:hover::before { transform: scaleX(1); }
.exp__group li:hover span { color: var(--ink); }

/* ---------- Skills statement ---------- */
.skills { padding: clamp(80px, 10vw, 160px) var(--pad); }
.skills__eyebrow { text-align: center; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: clamp(18px, 2vw, 32px); }
.skills__statement {
  font-family: var(--display); font-weight: var(--display-wt); font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  font-size: clamp(30px, 4.2vw, 72px); line-height: 1; letter-spacing: 0;
  text-transform: uppercase;
  hyphens: none;
}
.skills__tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: clamp(28px, 3vw, 48px); }
.skills__tools li { border: 1px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 14px; transition: background .25s, color .25s; }
.skills__tools li:hover { background: var(--ink); color: var(--cream); }

/* ---------- Recipes ---------- */
.recipes { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; column-gap: 24px; padding: clamp(44px, 5vw, 72px) var(--pad); }
.recipes__head { grid-row: 1 / span 2; display: flex; flex-direction: column; gap: clamp(16px, 2vw, 28px); }
.recipes__title { font-family: var(--display); font-weight: var(--display-wt); text-transform: uppercase; font-size: clamp(64px, 11vw, 190px); line-height: .86; }
/* A loose stack of index cards: main.js positions them and handles flipping */
.recipes { overflow-x: clip; }
.deck { position: relative; width: min(400px, 100%); aspect-ratio: 5 / 3; grid-column: 2; margin: clamp(90px, 10vw, 130px) auto 0; touch-action: pan-y; outline: none; }
/* each card is a folder: back panel with a tab, drawing tucked inside, front panel with the title */
.card {
  position: absolute; inset: 0;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .16));
  cursor: pointer; user-select: none; -webkit-user-select: none; will-change: transform;
}
.deck.is-dragging .card { cursor: grabbing; }
.deck:focus-visible .card__front path { stroke-width: 3; }
.card__back, .card__front { position: absolute; overflow: visible; }
.card__back { left: 4%; width: 92%; top: 14%; height: 86%; } /* back is smaller than the front */
.card__front { left: 0; width: 100%; bottom: 0; height: 68%; }
.card path { stroke: var(--blue); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.card__back path { fill: var(--cream-2); }
.card__front path { fill: var(--cream); }
/* bigger than the folder: rises out of the top, bottom tucked behind the front */
.card__art { position: absolute; left: 50%; top: calc(-72% + var(--art-y, 0%)); height: 150%; width: auto; max-width: none; translate: -50% 0; object-fit: contain; pointer-events: none; transition: opacity .25s; }
.card[inert] .card__art { opacity: 0; } /* only the top folder shows its drawing */
.card__name { position: absolute; left: 6%; right: 6%; bottom: 0; height: 60%; display: flex; align-items: center; justify-content: center; margin: 0; font-family: var(--mono); font-weight: 400; font-size: 13px; line-height: 1.2; text-align: center; }

/* the full recipe, centered on screen */
.recipe { width: min(1060px, calc(100vw - var(--pad) * 2)); max-width: none; max-height: 86svh; margin: auto; padding: 0; background: #fff; color: var(--ink); border: 1px solid var(--ink); border-radius: 8px; overflow: hidden; }
.recipe[open] { display: flex; flex-direction: column; animation: recipe-in .4s var(--ease); }
@keyframes recipe-in { from { opacity: 0; transform: translateY(30px) scale(.97); } }
.recipe::backdrop { background: rgba(17, 17, 17, .55); }
.recipe__head { flex: none; display: flex; align-items: center; gap: 18px; padding: 12px clamp(16px, 3vw, 32px); border-bottom: 2px solid var(--blue); }
.recipe__name { flex: 1; margin: 0; font-family: var(--display); font-weight: var(--display-wt); font-size: clamp(34px, 4.6vw, 66px); line-height: .95; text-transform: uppercase; }
.recipe__side { display: flex; flex-direction: column; gap: 22px; }
.recipe__art { width: 100%; height: 210px; object-fit: contain; }
.recipe__close { flex: none; width: 42px; height: 42px; border: 1px solid var(--ink); border-radius: 50%; font-size: 22px; line-height: 1; transition: background .25s, color .25s; }
.recipe__close:hover { background: var(--ink); color: var(--cream); }
.recipe__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: 1fr 2fr; gap: clamp(20px, 3vw, 44px); padding: clamp(18px, 2.6vw, 34px) clamp(16px, 3vw, 32px); scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.3) transparent; }
.recipe__intro { display: flex; flex-direction: column; gap: .8em; font-family: var(--display); font-size: clamp(19px, 1.6vw, 22px); line-height: 1.25; }
.recipe__intro strong { font-weight: 400; font-style: italic; }
.recipe__steps { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 2.4vw, 34px); align-content: start; }
.recipe__steps h4 { margin: 0 0 8px; font-family: var(--mono); font-weight: 400; font-size: 13px; line-height: 1.2; color: var(--blue); }
.recipe__steps p { font-size: 15px; line-height: 1.55; white-space: pre-line; }
.deck__controls { grid-column: 2; display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: clamp(22px, 2.5vw, 32px); font-family: var(--mono); font-size: 13px; }
.deck__arrow { width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 50%; font-size: 16px; transition: background .25s, color .25s; }
.deck__arrow:hover { background: var(--ink); color: var(--cream); }
.deck__hint { flex-basis: 100%; text-align: center; color: var(--gray); font-size: 12px; }

/* ---------- Fun: compact flicker band ---------- */
.fun { position: relative; padding: clamp(24px, 3vw, 40px) var(--pad) clamp(36px, 4vw, 60px); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.fun__defs { position: absolute; }
.upto { margin-top: clamp(48px, 6vw, 90px); }
.upto__title { font-family: var(--display); font-weight: var(--display-wt); text-transform: uppercase; font-size: clamp(36px, 5vw, 76px); line-height: .9; margin-bottom: clamp(24px, 3vw, 44px); }
.upto__list li { display: grid; grid-template-columns: 1fr 3fr; align-items: center; gap: 24px; padding: 18px 0; border-top: 1px solid var(--ink); }
.upto__list h3 { font-family: var(--mono); font-weight: 400; font-size: 14px; line-height: 1.4; }
.upto__list p { max-width: 62ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.45; }
.upto__list a { color: var(--blue); text-decoration: underline; text-underline-offset: .15em; }
.flick { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 1.6vw, 24px); height: clamp(220px, 34vh, 380px); }
.flick__slot { position: relative; min-width: 0; }
.flick__slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; visibility: hidden; }
.flick__slot img.is-on { visibility: visible; }
.flick__slot img.is-line { filter: url(#outline-blue); }
.flick__slot img.is-photo { object-fit: cover; border: 1px solid var(--ink); }

/* ---------- Contact ---------- */
.contact { position: relative; display: flex; flex-direction: column; gap: clamp(48px, 6vw, 90px); padding: clamp(60px, 7vw, 100px) var(--pad) var(--pad); overflow: hidden; }
.contact__title { display: flex; flex-direction: column; font-family: var(--display); font-weight: var(--display-wt); font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; text-transform: uppercase; font-size: clamp(54px, 10.5vw, 190px); line-height: .88; margin: 18px 0 28px; }
.contact__title span:last-child { color: var(--blue); }
.contact__mail { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(22px, 3vw, 44px); border-bottom: 2px solid var(--ink); padding-bottom: 4px; transition: color .25s, border-color .25s; }
.contact__mail:hover { color: var(--blue); border-color: var(--blue); }
.contact__mail span { transition: transform .35s var(--ease); }
.contact__mail:hover span { transform: translate(4px, -4px) rotate(10deg); }
.contact__bottom { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--ink); padding-top: 14px; font-family: var(--mono); font-size: 13px; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .nav { font-size: 12px; }
  .pre-dish { --ps: 1.3; }
  .nav__links { width: 100%; }
  .hero__intro { top: 58px; right: var(--pad); font-size: 15px; line-height: 1.5; }
  .hero__intro p { max-width: none; }
  .hero { --fs: 22vw; }
  .stack { height: auto; width: min(58vw, 280px); left: 50%; top: 53%; }
  .hero__name { bottom: 46px; }
  .hero__year { display: none; }
  .hero__clock { bottom: 16px; left: var(--pad); right: auto; }
  .about, .exp__head, .exp__group, .upto__list li { grid-template-columns: 1fr; }
  .upto__list li { gap: 8px; }
  .exp__group li { grid-template-columns: 1fr; gap: 2px; }
  .exp__group li span:nth-child(3) { text-align: left; margin-top: 4px; }
  .exp__group li span:empty { display: none; }
  .kitchen__head { top: 76px; flex-direction: column; align-items: flex-start; }
  .kitchen__sub { text-align: left; }
  .stage-wrap { padding-top: 60px; }
  /* re-plate the kitchen as a 2 x 3 grid on phones */
  .stage { width: 600px; height: 780px; }
  .dish { translate: var(--mx) var(--my); scale: 1.25; }
  [data-dish="sardines"] { --mx: -115px; --my: -13px; }
  [data-dish="pasta"]    { --mx: -53px;  --my: -10px; }
  [data-dish="toast"]    { --mx: -602px; --my: 260px; }
  [data-dish="moka"]     { --mx: 188px;  --my: 28px; }
  [data-dish="eggs"]     { --mx: -352px; --my: 270px; }
  [data-dish="noodles"]  { --mx: -305px; --my: 270px; }
  .work__row { grid-template-columns: 1fr; gap: 4px; }
  .work__meta { text-align: left; }
  .work__num { display: none; }
  .flick { grid-template-columns: repeat(3, 1fr); height: 190px; }
  .flick__slot:nth-child(n+4) { display: none; }
  .nav__links a { font-size: 11px; }
  .recipe__body, .recipe__steps { grid-template-columns: 1fr; }
  .recipes { display: block; }
  .recipe__body { align-content: start; }
  .contact__bottom { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .about__text .w { opacity: 1; }
}

/* ---------- Project pages ---------- */
.project { --pj-top: 24vh; }
.pj__title { position: fixed; right: var(--pad); bottom: 2vh; z-index: 6; pointer-events: none; font-family: var(--display); font-weight: var(--display-wt); text-transform: uppercase; font-size: clamp(90px, 17vw, 320px); line-height: .82; color: var(--blue); }
.pj { display: grid; grid-template-columns: clamp(240px, 25vw, 380px) minmax(0, 1fr) clamp(56px, 6vw, 88px); gap: clamp(24px, 3vw, 48px); padding: var(--pj-top) var(--pad) clamp(60px, 8vw, 120px); }
.pj__info { position: sticky; top: var(--pj-top); align-self: start; display: flex; flex-direction: column; gap: 22px; max-height: calc(100vh - var(--pj-top) - 20px); overflow-y: auto; scrollbar-width: none; }
.pj__row { display: grid; grid-template-columns: 58px 1fr; gap: 10px; }
.pj__row h2 { font-family: var(--mono); font-weight: 400; font-size: 13px; line-height: 1.6; color: var(--gray); }
.pj__row p { font-size: 14px; line-height: 1.45; }
.pj__back { margin-left: 68px; font-family: var(--mono); font-size: 13px; color: var(--blue); }
.pj__media { width: 100%; max-width: 780px; margin-inline: auto; display: flex; flex-direction: column; gap: clamp(28px, 4vw, 56px); }
.pj__media figure { min-width: 0; }
.pj__media img, .pj__media video { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--cream-2); }
.pj__media img.pj__crop { aspect-ratio: 1614 / 900; object-fit: cover; object-position: 50% 52%; } /* wide crop, centered on the subject */
.pj__stickers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pj__stickers > div { display: grid; place-items: center; aspect-ratio: 1; padding: 14%; border-radius: 8px; background: #fff; }
.pj__stickers > .is-blue { background: var(--blue); }
.pj__stickers img { width: auto; max-width: 100%; height: 100%; max-height: 100%; object-fit: contain; border-radius: 0; background: none; min-height: 0; }
/* full width, from the rail line to the screen edge; the column below keeps its usual start point */
.pj__wip { --wip-gap: 40px; --wip-h: 36px; height: var(--wip-h); display: flex; align-items: center; margin-top: calc(var(--pj-top) - var(--wip-h) - var(--wip-gap)); overflow: hidden; background: var(--yellow); font-family: var(--mono); font-size: 13px; }
.pj__wip + .pj { padding-top: var(--wip-gap, 40px); }
.pj__wip span { white-space: pre; }
.pj__wip-track { display: flex; width: max-content; animation: pj-drift 40s linear infinite; }
.pj__note { padding-top: clamp(16px, 2.5vw, 36px); border-top: 1px solid var(--ink); }
.pj__tag { margin-bottom: 12px; font-family: var(--mono); font-size: 13px; color: var(--blue); }
.pj__note h2 { margin-bottom: 12px; font-family: var(--display); font-weight: var(--display-wt); text-transform: uppercase; font-size: clamp(36px, 4.4vw, 64px); line-height: .92; }
.pj__note > p:last-child { max-width: 56ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.4; }
.pj__status { color: var(--blue); }
.pj__duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pj__shapes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 44px) 10px; }
.pj__shapes > div { display: grid; place-items: center; aspect-ratio: 4 / 3; }
.pj__media .pj__shapes img { width: auto; max-width: 74%; height: auto; max-height: 100%; border-radius: 0; background: none; }
.pj__media figcaption { margin-top: 10px; font-family: var(--mono); font-size: 13px; }
.pj__phones { --across: 4; overflow: hidden; container-type: inline-size; border-radius: 8px; }
.pj__track { display: flex; width: max-content; animation: pj-drift calc(var(--count) * 7s) linear infinite; }
.pj__track img { flex: none; width: calc((100cqw - (var(--across) - 1) * 10px) / var(--across)); margin-right: 10px; }
.pj__phones:hover .pj__track { animation-play-state: paused; }
@keyframes pj-drift { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .pj__phones { overflow-x: auto; }
  .pj__track, .pj__wip-track { animation: none; }
}
.pj__map { position: sticky; top: var(--pj-top); align-self: start; height: calc(100vh - var(--pj-top) - 20px); overflow: hidden; cursor: pointer; }
.pj__map-inner { transform-origin: 0 0; pointer-events: none; }
.pj__map-view { position: absolute; left: 0; right: 0; top: 0; border: 1px solid var(--blue); background: rgba(1, 4, 255, .08); pointer-events: none; }
.wip { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-height: 70vh; justify-content: center; padding: clamp(60px, 8vw, 120px) var(--pad); }
.wip__title { font-family: var(--display); font-weight: var(--display-wt); text-transform: uppercase; font-size: clamp(90px, 16vw, 280px); line-height: .85; }
.wip__text { font-size: clamp(18px, 1.8vw, 26px); }
.wip__back { font-family: var(--mono); font-size: 13px; color: var(--blue); }
.pj-next { display: flex; flex-direction: column; gap: 14px; padding: clamp(40px, 5vw, 72px) var(--pad); background: var(--blue) url("/images/bg-binary.jpg") center / 1100px auto; color: var(--cream); position: relative; z-index: 8; }
.pj-next__title { font-family: var(--display); font-weight: var(--display-wt); text-transform: uppercase; font-size: clamp(70px, 15vw, 280px); line-height: .85; color: var(--yellow); transition: color .3s; }
.pj-next:hover .pj-next__title { color: var(--pink); }
.pj-foot { position: relative; z-index: 8; background: var(--cream); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px var(--pad); font-family: var(--mono); font-size: 13px; }
@media (max-width: 820px) {
  .rail { display: none; }
  main { margin-left: 0; border-left: 0; }
  .pj__map { display: none; }
  .pj__title { position: static; display: block; padding: 76px var(--pad) 0; font-size: 27vw; }
  .pj { grid-template-columns: minmax(0, 1fr); padding: 24px var(--pad) 60px; }
  .pj__wip { margin-top: 20px; }
  .wip { min-height: 50vh; }
  .pj__wip + .pj { padding-top: 24px; }
  .pj__info { position: static; max-height: none; }
  .pj__phones { --across: 2; }
}
