/* ───────── tokens ───────── */
:root {
  color-scheme: light;

  --bg: #fbfaf6;
  --ink: #1e2024;
  --muted: #5f636a;
  --faint: #9da1a8;
  --line: rgba(30, 34, 40, 0.12);
  --line-strong: rgba(30, 34, 40, 0.3);
  --live: #4caf6a;

  /* backdrop: lit paper */
  --paper-hi: #fffefb;
  --paper-lo: #f3f1ea;
  --vignette: rgba(70, 60, 40, 0.03);
  --grain-opacity: 0.16;
  --nav-glass: rgba(251, 250, 246, 0.8);

  /* surfaces */
  --paper: #fafbfc;                         /* photo cards, snapshots */
  --peek-a: #dbe1e8;
  --peek-b: #c3cad3;
  --card-edge: rgba(255, 255, 255, 0.35);
  --card-sheen: rgba(255, 255, 255, 0.35);
  --card-index: rgba(30, 34, 40, 0.45);
  --card-hint: rgba(30, 34, 40, 0.32);
  --shadow: rgba(0, 0, 0, 0.3);

  /* the eye drawing */
  --eye-iris: rgba(30, 34, 40, 0.72);
  --eye-pupil: currentColor;
  --eye-glint: #fdfeff;
  --eye-lines: #fdfeff;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-fade: cubic-bezier(0.25, 0.8, 0.3, 1); /* starts moving at once, settles slowly */
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  /* gently settles on the intro or the hero; .snap-hero can't be scrolled past */
  scroll-snap-type: y proximity;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inclusive Sans", system-ui, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ───────── backdrop: lit paper ───────── */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 35%, var(--paper-hi) 0%, var(--bg) 45%, var(--paper-lo) 100%);
}

/* gentle edge falloff so the page feels lit from the middle */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(140% 110% at 50% 40%, transparent 55%, var(--vignette) 100%);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }
::selection { background: var(--ink); color: var(--bg); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.label {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
}

/* ───────── pixie dust: canvas for the cursor trail + click sparkles (script.js) ───────── */
.pixie {
  position: fixed;
  inset: 0;
  z-index: 145; /* over content, under the card cursor pill */
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ───────── grain ───────── */
.grain {
  /* sits behind the content, so only the background gets grain */
  position: fixed;
  inset: -100%;
  width: 300%;
  height: 300%;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.14  0 0 0 0 0.13  0 0 0 0 0.11  1.8 0 0 0 -0.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  17%  { transform: translate(-3%, 2%); }
  33%  { transform: translate(2%, -4%); }
  50%  { transform: translate(-4%, -1%); }
  67%  { transform: translate(3%, 3%); }
  83%  { transform: translate(-1%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ───────── nav ───────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--gutter);
  transition: background 0.4s var(--ease-soft), backdrop-filter 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
}

/* links + speaker fade in as the intro eye docks (--navp set by script.js) */
.nav-links,
.nav-meta {
  opacity: var(--navp, 1);
  transform: translateY(calc((1 - var(--navp, 1)) * -8px));
}

.nav:not(.ready) .nav-links,
.nav:not(.ready) .nav-meta { pointer-events: none; }

/* the logo only shows once the flying intro eye has landed on it */
.nav:not(.docked) .mark { opacity: 0; pointer-events: none; }

.nav.scrolled {
  background: var(--nav-glass);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}

.mark {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
}

/* hand-drawn eye logo */
.eye {
  display: block;
  width: 80px;
  height: auto;
  overflow: visible;
}

.eye .lid path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eye .lid .lashes { stroke-width: 1.6; }
.eye .lid .sketch { stroke-width: 0.9; opacity: 0.35; }
.eye .lid .soft { stroke-width: 1.5; }

/* a big, dark iris with a soft light texture */
.eye .iris {
  fill: var(--eye-iris);
  stroke: currentColor;
  stroke-width: 1.5;
}

.eye .iris-lines {
  fill: none;
  stroke: var(--eye-lines);
  stroke-width: 0.8;
  stroke-linecap: round;
  opacity: 0.3;
}

.eye .pupil { fill: var(--eye-pupil); }
.eye .glint { fill: var(--eye-glint); }

/* blink: lids meet along the corner line, upper lid flips into a closed curve */
.eye .lid,
.eye .eye-clip {
  transform-box: view-box;
  transform-origin: 36px 31.8px;
}

.eye.blinking .lid-upper { animation: blink-upper 0.42s cubic-bezier(0.4, 0, 0.6, 1); }
.eye.blinking .lid-lower { animation: blink-lower 0.42s cubic-bezier(0.4, 0, 0.6, 1); }
.eye.blinking .eye-clip  { animation: blink-clip 0.42s cubic-bezier(0.4, 0, 0.6, 1); }

@keyframes blink-upper { 30%, 48% { transform: scaleY(-0.3); } }
@keyframes blink-lower { 30%, 48% { transform: scaleY(0.3); } }
@keyframes blink-clip  { 30%, 48% { transform: scaleY(0); } }

.nav-links {
  position: relative;
  display: flex;
  gap: clamp(20px, 2.6vw, 36px);
}

.nav-links a {
  position: relative;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  transition: color 0.3s var(--ease-soft);
}

.nav-links a:hover,
.nav-links a.active { color: var(--ink); }

/* a small ink dot that glides under the active / hovered link */
.nav-dot {
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
  transition:
    transform 0.55s var(--ease),
    opacity 0.3s var(--ease-soft);
}

.nav-meta {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

/* speaker: an X while off, soft pulsing waves while the music plays */
.sound {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: -6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.3s var(--ease-soft);
}

.sound:hover { background: var(--line); }
.sound:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 2px; }

.sound svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound .spk { fill: currentColor; fill-opacity: 0.12; }
.sound .wave,
.sound .mute { transition: opacity 0.3s var(--ease-soft); }
.sound .wave { opacity: 0; }

.sound[aria-pressed="true"] .mute { opacity: 0; }
.sound[aria-pressed="true"] .wave { animation: wave-pulse 1.6s ease-in-out infinite; }
.sound[aria-pressed="true"] .w2 { animation-delay: 0.25s; }

@keyframes wave-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}

/* the YouTube player is only an audio source, kept out of the way */
.yt-holder {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.status-dot,
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(76, 175, 106, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

.live-dot {
  display: inline-block;
  margin: 0 4px 2px 2px;
  vertical-align: middle;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(76, 175, 106, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(76, 175, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 175, 106, 0); }
}

/* ───────── intro: one big blinking eye ───────── */
/* "scroll to view" + a bobbing chevron; arrives after the eye opens, leaves as you scroll */
.scroll-hint {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: clamp(24px, 6vh, 56px);
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: color 0.3s var(--ease-soft);
}

.scroll-hint:hover { color: var(--ink); }

.scroll-hint-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fade-up 1s var(--ease) 1.7s forwards;
}

.scroll-hint svg {
  width: 20px;
  height: 12px;
  overflow: visible;
  animation: nudge 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.scroll-hint path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50%      { transform: translateY(6px); opacity: 1; }
}

.intro-eye {
  --e: 0; /* 0 = big + centred, 1 = docked as the nav logo */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: min(84vw, 820px);
  color: var(--ink);
  pointer-events: none;
  transform: translate(calc(50vw - 50%), calc(50vh - 50%)); /* until script.js takes over */
  transform-origin: 50% 50%;
  will-change: transform;
  mix-blend-mode: multiply; /* the halftone's white paper melts into the page */
}

.intro-eye.docked { visibility: hidden; }

/* big = halftone dots; as it flies in it cross-fades (--x, set by script.js) to the line
   drawing, so it lands as exactly the logo */
.intro-eye .eye {
  width: 100%;
  opacity: var(--x, 0);
}

/* halftone: the shaded drawing (softened) is screened with a grid of radial dots, then
   brightness + contrast snap that into crisp dots that grow with darkness. Its white
   backing multiplies away into the page (see .intro-eye). Padding leaves room for the halo. */
.intro-eye .halftone {
  --cell: 9px; /* dot spacing; set from the eye size by script.js */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: -12%;
  padding: 12%;
  box-sizing: content-box;
  background: #fff;
  filter: brightness(0.67) contrast(24);
  opacity: calc(1 - var(--x, 0));
  pointer-events: none;
}

.intro-eye .halftone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle farthest-corner, #000, #fff) 0 0 / var(--cell) var(--cell);
  mix-blend-mode: screen;
}

.intro-eye .eyes-tone {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: blur(calc(var(--cell) * 0.22));
}

.eyes-tone .lid,
.eyes-tone .eye-clip {
  transform-box: view-box;
  transform-origin: 36px 31.8px;
}

.eyes-tone.blinking .lid-upper { animation: blink-upper 0.5s cubic-bezier(0.4, 0, 0.6, 1); }
.eyes-tone.blinking .lid-lower { animation: blink-lower 0.5s cubic-bezier(0.4, 0, 0.6, 1); }
.eyes-tone.blinking .eye-clip  { animation: blink-clip 0.5s cubic-bezier(0.4, 0, 0.6, 1); }
.eyes-tone.waking .lid-upper { animation: wake-upper 1.1s cubic-bezier(0.45, 0, 0.2, 1) 0.35s both; }
.eyes-tone.waking .lid-lower { animation: wake-lower 1.1s cubic-bezier(0.45, 0, 0.2, 1) 0.35s both; }
.eyes-tone.waking .eye-clip  { animation: wake-clip 1.1s cubic-bezier(0.45, 0, 0.2, 1) 0.35s both; }

/* fine lines when big, thickening to exactly the logo's strokes as it lands
   (--k = viewBox units per screen px at full size, set by script.js) */
.intro-eye .eye .lid path       { stroke-width: calc(3.6 * var(--k, 0.14) * (1 - var(--e)) + 2.1 * var(--e)); }
.intro-eye .eye .lid .lashes    { stroke-width: calc(2.3 * var(--k, 0.14) * (1 - var(--e)) + 1.6 * var(--e)); }
.intro-eye .eye .lid .sketch    { stroke-width: calc(1.2 * var(--k, 0.14) * (1 - var(--e)) + 0.9 * var(--e)); }
.intro-eye .eye .iris           { stroke-width: calc(2.4 * var(--k, 0.14) * (1 - var(--e)) + 1.5 * var(--e)); }
.intro-eye .eye .iris-lines     { stroke-width: calc(1.2 * var(--k, 0.14) * (1 - var(--e)) + 0.8 * var(--e)); }
.intro-eye .eye .lid .soft      { stroke-width: calc(2.2 * var(--k, 0.14) * (1 - var(--e)) + 1.5 * var(--e)); }

/* slower, softer blink at full size */
.intro-eye .eye.blinking .lid-upper,
.intro-eye .eye.blinking .lid-lower,
.intro-eye .eye.blinking .eye-clip { animation-duration: 0.5s; }

/* on load the eye starts closed and slowly opens */
.intro-eye .eye.waking .lid-upper { animation: wake-upper 1.1s cubic-bezier(0.45, 0, 0.2, 1) 0.35s both; }
.intro-eye .eye.waking .lid-lower { animation: wake-lower 1.1s cubic-bezier(0.45, 0, 0.2, 1) 0.35s both; }
.intro-eye .eye.waking .eye-clip  { animation: wake-clip 1.1s cubic-bezier(0.45, 0, 0.2, 1) 0.35s both; }

@keyframes wake-upper { from { transform: scaleY(-0.3); } }
@keyframes wake-lower { from { transform: scaleY(0.3); } }
@keyframes wake-clip  { from { transform: scaleY(0); } }

/* ───────── hero ───────── */
/* the hero stays put while the eye flies into the nav (and for a short beat after);
   .pin-space (height set by script.js) is the scroll distance it stays pinned for */
.stage { position: relative; }

.snap-point {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  scroll-snap-align: start;
}

.snap-intro { top: 0; }
.snap-hero { scroll-snap-stop: always; } /* top: set by script.js to the landed position */

.hero {
  position: sticky;
  top: 0;
  padding-top: clamp(140px, 22vh, 230px);
  padding-bottom: clamp(96px, 16vh, 180px);
}

.headline {
  margin: 0;
  font-size: clamp(40px, 6vw, 82px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--faint);
  text-wrap: balance; /* keeps "fun" from sitting alone on the last line */
}

.headline .ink { color: var(--ink); }

/* words fade in one by one, out of a soft blur, once the eye has landed (.hero.play);
   scrolling back up fades them out quickly so the intro is just the eye again */
.w {
  display: inline-block;
  position: relative;
}

.w > span {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.22em);
  transition:
    opacity 0.3s var(--ease-soft),
    filter 0.3s var(--ease-soft),
    transform 0.3s var(--ease-soft);
}

.hero.play .w > span {
  opacity: 1;
  filter: none;
  transform: none;
  transition:
    opacity 0.8s var(--ease-fade) calc(var(--i, 0) * 55ms),
    filter 0.9s var(--ease-fade) calc(var(--i, 0) * 55ms),
    transform 1s var(--ease-fade) calc(var(--i, 0) * 55ms);
}

/* "Naina." peeks a little photo card on hover */
.name,
.fun {
  position: relative;
  display: inline-block;
}

.name { cursor: default; }

.peek {
  position: absolute;
  left: 62%;
  bottom: 78%;
  width: clamp(84px, 9vw, 128px);
  aspect-ratio: 4 / 5;
  padding: 6px 6px 22px;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 18px 40px -12px var(--shadow), 0 2px 6px rgba(0, 0, 0, 0.06);
  transform: translateY(16px) rotate(-10deg) scale(0.6);
  transform-origin: bottom left;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.55s var(--ease), opacity 0.3s var(--ease-soft);
  z-index: 5;
}

.peek img,
.peek-face {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  background: linear-gradient(160deg, var(--peek-a), var(--peek-b));
  font-size: 22px;
  letter-spacing: 0;
  color: var(--ink);
  font-style: italic;
}

.name:hover .peek,
.name:focus-visible .peek {
  opacity: 1;
  transform: translateY(0) rotate(-6deg) scale(1);
}

.name:focus-visible { outline: none; }

/* "fun" — squiggle + bouncy letters */
/* letters dance via script.js; origin near the baseline so they rock on their feet */
.fun .l {
  display: inline-block;
  transform-origin: 50% 85%;
  will-change: transform;
}

.squiggle {
  position: absolute;
  left: 2%;
  bottom: -0.04em;
  width: 96%;
  height: 0.2em;
  overflow: visible;
}

.squiggle path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 0.3s var(--ease-soft);
}

/* the squiggle draws itself under "fun" once the words are in */
.hero.play .squiggle path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s var(--ease) 0.5s;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 48px;
  margin-top: clamp(40px, 6vh, 64px);
  font-size: 16px;
}

.hero-meta p {
  margin: 0;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease-soft), filter 0.3s var(--ease-soft), transform 0.3s var(--ease-soft);
}

.hero.play .hero-meta p {
  opacity: 1;
  filter: none;
  transform: none;
  transition:
    opacity 0.8s var(--ease-fade) var(--d),
    filter 0.9s var(--ease-fade) var(--d),
    transform 1s var(--ease-fade) var(--d);
}

.hero-meta p:nth-child(1) { --d: 0.45s; }
.hero-meta p:nth-child(2) { --d: 0.52s; }
.hero-meta p:nth-child(3) { --d: 0.59s; }
.hero-meta .label { margin-right: 6px; }

/* ───────── sections ───────── */
.section { padding-top: clamp(48px, 8vh, 96px); padding-bottom: clamp(48px, 8vh, 96px); }
#work { padding-top: clamp(24px, 4vh, 48px); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: clamp(40px, 5vw, 64px);
  font-size: 15px;
}

.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.section-head .count,
.section-head .range { color: var(--muted); }

.section-head .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
  align-self: center;
  transform-origin: left;
}

/* ───────── work: one centred column ───────── */
#work { --col: 640px; }

#work .section-head {
  max-width: var(--col);
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(64px, 8vw, 112px);
}

.card {
  display: block;
  width: 100%;
  max-width: var(--col);
  cursor: none;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 6px;
  overflow: hidden;
  background: color-mix(in srgb, var(--tint, #d8dde3) 62%, transparent);
  box-shadow: inset 0 0 0 1px var(--card-edge);
  isolation: isolate;
  clip-path: inset(0 0 0 0 round 6px);
  transition: clip-path 0.7s var(--ease);
}

.card-media::after {
  /* faint inner light so empty tiles don't feel flat */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 30% 0%, var(--card-sheen), transparent 60%);
  pointer-events: none;
}

.card-media > img,
.card-media > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.card-media:has(> img, > video) .card-empty { display: none; }
.card-media:has(> img, > video)::after { display: none; } /* the sheen is only for empty tiles */
.card-media:has(> img, > video) .card-index { color: rgba(255, 255, 255, 0.8); }

.card-index {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  font-size: 13px;
  color: var(--card-index);
  letter-spacing: 0.04em;
}

.card-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--card-hint);
  transition: transform 1.1s var(--ease), letter-spacing 0.8s var(--ease);
}

.card:hover .card-media { clip-path: inset(10px 10px 10px 10px round 10px); }
.card:hover .card-media > img,
.card:hover .card-media > video { transform: scale(1.06); }
.card:hover .card-empty { transform: scale(1.04); letter-spacing: 0.08em; }

.card-meta {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  margin-top: 20px;
  font-size: 16px;
}

.card-title { font-weight: 400; }
.card-sub { color: var(--muted); }

.card-arrow {
  position: absolute;
  right: 0;
  color: var(--muted);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: transform 0.5s var(--ease), opacity 0.3s var(--ease-soft);
}

.card:hover .card-arrow { opacity: 1; transform: translate(0, 0); color: var(--ink); }

/* ───────── cursor pill (work cards only) ───────── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  pointer-events: none;
  will-change: transform;
}

.cursor-label {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  transform: scale(0);
  transition: transform 0.45s var(--ease);
}

.cursor.on .cursor-label { transform: scale(1); }

/* the eye inside the pill, drawn light on dark */
.cursor .eye { width: 60px; }
.cursor .eye .lid path { stroke-width: 2.5; }
.cursor .eye .lid .lashes { stroke-width: 1.9; }
.cursor .eye .lid .soft { stroke-width: 2; }
.cursor {
  --eye-iris: rgba(255, 255, 255, 0.4);
  --eye-pupil: currentColor;
  --eye-glint: var(--ink);
  --eye-lines: var(--ink);
}
.cursor .eye.blinking .lid-upper,
.cursor .eye.blinking .lid-lower,
.cursor .eye.blinking .eye-clip { animation-delay: 0.18s; }

/* closed eye for work that isn't ready yet */
.cursor.soon .eye .lid-upper { transform: scaleY(-0.3); }
.cursor.soon .eye .lid-lower { transform: scaleY(0.3); }
.cursor.soon .eye .eye-clip { transform: scaleY(0); }

/* ───────── about / life ───────── */
.split {
  display: grid;
  grid-template-columns: minmax(120px, 2fr) 10fr;
  gap: 24px;
  border-top: 1px solid var(--line);
  margin-top: clamp(24px, 4vh, 48px);
}

.split .side { padding-top: 6px; }

/* about: plain paragraphs in one readable column */
.about {
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.7;
}

.about p { margin: 0; }
.about p + p { margin-top: 1em; }

/* the whole block fades in word by word, first to last, as it scrolls into view (script.js) */
.about .fw {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.35em, 0);
  transition:
    opacity 1.1s var(--ease-fade) calc(var(--i, 0) * 12ms),
    transform 1.2s var(--ease-fade) calc(var(--i, 0) * 12ms);
}

.about.in .fw {
  opacity: 1;
  transform: none;
}

/* life — a clothesline of photos; the section pins while vertical scroll slides it sideways,
   the string sags and the photos swing with the speed (script.js) */
.life-section { margin-top: clamp(24px, 4vh, 48px); }
.life-rule { border-top: 1px solid var(--line); }

.life-stage { position: relative; } /* height set by script.js: viewport + sideways distance */

.life-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.life-label {
  position: absolute;
  top: clamp(96px, 14vh, 140px);
  left: 0;
  right: 0;
}

.life-rail {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.life-track {
  position: relative;
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  width: max-content;
  padding: 56px max(9vw, 48px) 70px;
  will-change: transform;
}

.life-line {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}

.life-line path {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.1;
  opacity: 0.7;
}

.life-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 56px;
  height: 1px;
  background: var(--line);
}

.life-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: opacity 0.4s var(--ease-soft);
}

/* the polaroids */
.snap {
  position: relative;
  flex: none;
  width: clamp(150px, 17vw, 200px);
  margin: 0;
  padding: 8px 8px 0;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 10px 24px -14px var(--shadow), 0 1px 3px rgba(0, 0, 0, 0.05);
  transform-origin: 50% -6px; /* swings from its clip */
  user-select: none;
  -webkit-user-select: none;
}

.snap-img,
.snap img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  background: var(--tint);
}

.snap figcaption {
  padding: 12px 4px 14px;
  font-size: 14px;
  font-style: italic;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--muted);
  text-align: center;
}

.clip {
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 2;
  width: 12px;
  height: 30px;
  margin-left: -6px;
  filter: drop-shadow(0 1.5px 1.5px rgba(0, 0, 0, 0.12));
}

.clip svg { display: block; width: 100%; height: 100%; }
.clip-body { fill: var(--clip); }
.clip-shine { fill: rgba(255, 255, 255, 0.45); }
.clip-split { stroke: rgba(30, 34, 40, 0.14); stroke-width: 0.7; }
.clip-spring { fill: #d4d7dc; stroke: rgba(30, 34, 40, 0.3); stroke-width: 0.6; }

/* ───────── fun: an endless marquee of side projects ───────── */
.fun-section { padding-top: clamp(48px, 8vh, 96px); padding-bottom: clamp(48px, 8vh, 96px); }

.fun-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
}

.marquee {
  overflow: hidden;
  touch-action: pan-y; /* vertical swipes still scroll the page; sideways drags spin the strip */
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.marquee.dragging { cursor: grabbing; }

/* two copies of the tiles sit side by side; script.js slides and wraps them seamlessly,
   pushed by page scroll, slowed on hover, draggable with momentum */
.marquee-track {
  display: flex;
  gap: clamp(14px, 2vw, 24px);
  width: max-content;
  padding: 10px 0 14px;
  will-change: transform;
}

.fun-tile {
  flex: none;
  width: clamp(220px, 24vw, 320px);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: none;
}

.fun-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: var(--tint, #e8e8ea);
  box-shadow: inset 0 0 0 1px var(--card-edge);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.fun-media video,
.fun-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* until a video is added: a quiet play glyph */
.fun-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}

.fun-placeholder::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 14px;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--muted);
}

.fun-media:has(video, img) .fun-placeholder { display: none; }

/* expand hint, top-right on hover */
.fun-expand {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s var(--ease-soft), transform 0.4s var(--ease);
}

.fun-expand::before,
.fun-expand::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1.4px solid var(--ink);
}

.fun-expand::before { top: 7px; right: 7px; border-left: 0; border-bottom: 0; }
.fun-expand::after { bottom: 7px; left: 7px; border-right: 0; border-top: 0; }

.fun-tile:hover .fun-media,
.fun-tile:focus-visible .fun-media {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px var(--card-edge), 0 16px 30px -18px var(--shadow);
}

.fun-tile:hover .fun-expand,
.fun-tile:focus-visible .fun-expand { opacity: 1; transform: none; }

.fun-tile:focus-visible { outline: none; }
.fun-tile:focus-visible .fun-media { box-shadow: 0 0 0 2px var(--ink); }

.fun-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  align-items: baseline;
  margin-top: 12px;
  font-size: 15px;
}

.fun-tag { white-space: nowrap; } /* long titles wrap; the tag stays in one piece */

.fun-tag { color: var(--muted); font-size: 13px; }

/* ───────── lightbox for an expanded project ───────── */
.lightbox {
  width: min(960px, 92vw);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(251, 250, 246, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox[open] { animation: lb-in 0.45s var(--ease); }
.lightbox[open]::backdrop { animation: lb-fade 0.35s var(--ease-soft); }

@keyframes lb-in { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes lb-fade { from { opacity: 0; } }

.lb-inner { position: relative; }

.lb-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: var(--tint, #e8e8ea);
  box-shadow: 0 30px 60px -30px var(--shadow);
}

.lb-media {
  max-height: 76vh;
  margin: 0 auto;
}

.lb-media video,
.lb-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lb-media .fun-placeholder { transform: scale(1.4); }

.lb-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  font-size: 15px;
}

.lb-tag { color: var(--muted); font-size: 13px; margin-left: 6px; }
.lb-link { flex: none; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.lb-link:hover { color: var(--ink); border-color: var(--ink); }

.lb-close,
.lb-nav {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px var(--shadow), 0 0 0 1px var(--line);
  transition: transform 0.3s var(--ease);
}

.lb-close { top: -14px; right: -14px; font-size: 22px; }
.lb-nav { top: calc(50% - 46px); }
.lb-prev { left: -18px; }
.lb-next { right: -18px; }
.lb-close:hover,
.lb-nav:hover { transform: scale(1.08); }

/* ───────── contact / footer ───────── */
.footer {
  padding-top: clamp(80px, 14vh, 160px);
  padding-bottom: 28px;
  margin-top: clamp(24px, 4vh, 48px);
  border-top: 1px solid var(--line);
}

.say {
  margin: 18px 0 0;
  font-size: clamp(36px, 5.6vw, 84px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.say .ital { font-style: italic; }

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}

.email {
  position: relative;
  font-size: clamp(18px, 1.6vw, 22px);
}

.email::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.25);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.email:hover::after { transform: scaleX(1); }

.copy {
  font: inherit;
  font-size: 13px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.3s var(--ease-soft), color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}

.copy:hover { color: var(--ink); border-color: var(--line-strong); }
.copy.done { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 40px;
  font-size: 15px;
}

.socials a { color: var(--muted); transition: color 0.3s var(--ease-soft); }
.socials a:hover { color: var(--ink); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(80px, 14vh, 160px);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.to-top:hover { color: var(--ink); }

/* ───────── scroll reveal ───────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
}

.reveal.in { opacity: 1; transform: none; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ───────── responsive ───────── */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 600px) {
  .nav { grid-template-columns: 1fr auto; row-gap: 10px; padding-top: 14px; padding-bottom: 12px; }
  .mark { grid-column: 1; }
  .nav-meta { grid-column: 2; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .nav-links a { font-size: 14px; }
}

@media (max-width: 520px) {
  .hero-meta { flex-direction: column; gap: 8px; }
  .fun-head .label + .label { display: none; }
  .lb-meta { flex-direction: column; gap: 6px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-close { right: 4px; }
  .foot { flex-direction: column; }
}

@media (hover: none), (pointer: coarse) {
  .card,
  .fun-tile { cursor: pointer; }
  .cursor { display: none; }
}

/* ───────── page to page (home ↔ case studies): a soft cross-fade ───────── */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .grain { animation: none; }
  .scroll-hint svg { animation: none; }
  .intro-eye .eye.waking *,
  .eyes-tone.waking * { animation: none !important; }
}
