/* ============================================================
   FONTS — local variable @font-face
   Panchang  → display / titles (single variable file, 200–800 wght)
   Satoshi   → body / utility / nav (variable + italic, 300–900)
   ============================================================ */
@font-face {
  font-family: 'Panchang';
  src: url('fonts/Panchang-Variable.ttf') format('truetype-variations'),
       url('fonts/Panchang-Variable.ttf') format('truetype');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-Variable.ttf') format('truetype-variations'),
       url('fonts/Satoshi-Variable.ttf') format('truetype');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/Satoshi-VariableItalic.ttf') format('truetype-variations'),
       url('fonts/Satoshi-VariableItalic.ttf') format('truetype');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* COLOR */
  --pearl-1: #ECF0F3;     /* light cool grey (matches user attached swatch) */
  --pearl-2: #DDE3E8;
  --pearl-3: #B8C0C8;
  --void-0:  #0c0a0f;
  --void-1:  #0d1018;
  --ink:     #14161c;
  --ink-soft:#4a4e58;
  --ink-mute:#8a8e98;
  --rule:    rgba(20,22,28,0.18);

  --accent-blue:   #0f1a91;
  --accent-cyan:   #b8e8ff;
  --accent-warm:   #ffd9b8;
  --accent-brick:  #8f3c3a;
  --accent-active: #E3735A;  /* coral orange — active nav + mood values */

  /* TYPE */
  --font-display: 'Panchang', 'Anton', 'Archivo Black', sans-serif;
  --font-body:    'Satoshi', 'Inter', system-ui, sans-serif;

  /* Fluid scale tuned smaller per feedback. 1440 viewport → roughly:
     display 112px / banner 112px / h2 80px / time 18px / body 13px / label 10px */
  --fs-display:  clamp(2.75rem, 8vw, 7rem);
  --fs-banner:   clamp(2.75rem, 8vw, 7rem);
  --fs-h2:       clamp(2rem,    6vw, 5rem);
  --fs-h3:       clamp(1.05rem, 1.4vw, 1.35rem);
  --fs-time:     clamp(0.875rem, 1.15vw, 1.125rem);
  --fs-prose:    0.9375rem;     /* 15px */
  --fs-body:     0.8125rem;     /* 13px */
  --fs-label:    0.625rem;      /* 10px */
  --fs-meta:     0.65rem;       /* ~10.4px */

  --lh-display:  0.86;
  --lh-tight:    1.05;
  --lh-body:     1.55;

  --tracking-display: -0.02em;
  --tracking-label:    0.18em;
  --tracking-meta:     0.14em;
  --tracking-nav:      0.22em;

  /* GRID */
  --max-w:    96rem;
  --gutter:   clamp(1rem, 2.5vw, 2.5rem);
  --gutter-lg: clamp(2rem, 5vw, 5rem);

  /* CURSOR — feeds glass spotlight mask. JS updates these on :root. */
  --cx: -100vw;
  --cy: -100vh;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--pearl-1);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body { overflow-x: hidden; }

img, svg, video, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   LAYER STACK
     0   #spatial-bg
     1   #avatar-canvas
     2   #heatmap-canvas, #work-darkness
     3   #glass-overlay
     4   <main>
     5   <nav.top-nav>
   ============================================================ */
#spatial-bg {
  position: fixed;
  inset: -10%;
  height: auto;
  z-index: 0;
  pointer-events: none;
  background:
    /* Soft white core — pulls bg toward pure white at the centre */
    radial-gradient(ellipse 55% 65% at 50% 42%, rgba(255, 255, 255, 0.55) 0%, transparent 55%),
    /* Cool grey ambient wash */
    radial-gradient(ellipse 80% 90% at 50% 55%, rgba(200, 210, 220, 0.18) 0%, transparent 70%),
    /* Neutral vignette — gallery-wall feel */
    radial-gradient(ellipse 75% 100% at 50% 50%, transparent 55%, rgba(40, 50, 60, 0.16) 100%);
  filter: blur(40px);
  animation: pearl-breathe 32s ease-in-out infinite alternate;
}
@keyframes pearl-breathe {
  0%   { transform: translate(-0.6%, -0.4%) scale(1.00); }
  100% { transform: translate( 0.6%,  0.4%) scale(1.04); }
}

#avatar-canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100vh;
  z-index: 1;
  pointer-events: none;
  --avatar-blur: 0px;
  --avatar-bright: 1;
  --avatar-sat: 1.05;
  filter:
    blur(var(--avatar-blur))
    brightness(var(--avatar-bright))
    saturate(var(--avatar-sat));
  transition: filter 0.25s linear;
}

#heatmap-canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100vh;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.5;
}

#work-darkness {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: rgba(12, 10, 15, 0.62);            /* warm ink, not navy */
  backdrop-filter: blur(2px) brightness(0.5) saturate(0.65);
  -webkit-backdrop-filter: blur(2px) brightness(0.5) saturate(0.65);
  opacity: var(--darkness, 0);
  transition: opacity 0.25s linear;
  overflow: hidden;
}
/* ::before — warm volumetric breathing. Sepia/amber pools drift on
   the dark surface and screen-blend onto the avatar silhouette,
   giving the dark zone a candle-lit feel without any blue cast. */
#work-darkness::before {
  content: "";
  position: absolute;
  inset: -15%;
  background:
    /* warm amber upper-left */
    radial-gradient(ellipse 60% 70% at 28% 35%, rgba(255, 200, 140, 0.12), transparent 60%),
    /* sepia core lower-right */
    radial-gradient(ellipse 55% 65% at 75% 70%, rgba(255, 230, 190, 0.10), transparent 65%),
    /* broad neutral lift across the centre */
    radial-gradient(ellipse 90% 100% at 50% 50%, rgba(255, 245, 230, 0.05), transparent 75%);
  mix-blend-mode: screen;
  filter: blur(60px);
  animation: cosmic-drift 26s ease-in-out infinite alternate;
}
/* ::after — heavy film grain. Two layered turbulences (fine + coarse)
   tile at different sizes for depth. Opacity bumped so the dark zone
   reads as densely grainy à la raviklaassens. */
#work-darkness::after {
  content: "";
  position: absolute;
  inset: -8%;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.7'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.55'/></svg>");
  background-size: 180px 180px, 380px 380px;
  opacity: 0.55;
  mix-blend-mode: overlay;
  animation: grain-jitter 1.2s steps(8) infinite;
}

@keyframes cosmic-drift {
  0%   { transform: translate(0,   0)   rotate(-2deg); }
  100% { transform: translate(2%, -3%)  rotate( 4deg); }
}
@keyframes grain-jitter {
  0%, 100% { transform: translate(0,    0);    }
  10%      { transform: translate(-3%, -2%);   }
  20%      { transform: translate( 2%, -3%);   }
  30%      { transform: translate(-1%,  4%);   }
  40%      { transform: translate( 3%,  1%);   }
  50%      { transform: translate(-2%, -3%);   }
  60%      { transform: translate( 1%,  2%);   }
  70%      { transform: translate(-3%, -1%);   }
  80%      { transform: translate( 2%,  3%);   }
  90%      { transform: translate(-1%, -2%);   }
}

#glass-overlay {
  position: fixed;
  inset: 0;
  width: 100%; height: 100vh;
  z-index: 3;
  pointer-events: none;
  backdrop-filter: blur(10px) saturate(1.08) brightness(1.02);
  -webkit-backdrop-filter: blur(10px) saturate(1.08) brightness(1.02);
  background: rgba(235,231,224, 0.38);
  opacity: var(--glass-opacity, 1);

  --spot: clamp(120px, 16vw, 220px);

  /* --cx / --cy live on :root and update on every mousemove,
     so this rule simply consumes whatever the document currently
     has (off-screen by default → full glass on first paint). */
  mask-image: radial-gradient(
    circle var(--spot) at var(--cx) var(--cy),
    transparent 0%,
    rgba(0,0,0,0.35) 55%,
    #000 100%
  );
  -webkit-mask-image: radial-gradient(
    circle var(--spot) at var(--cx) var(--cy),
    transparent 0%,
    rgba(0,0,0,0.35) 55%,
    #000 100%
  );
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

main { position: relative; z-index: 4; }

/* ============================================================
   GLOBAL FILM GRAIN — single layer for the whole page
   Sits above content with overlay blend so it reads as paper
   texture in light sections AND film grain in the dark section.
   ============================================================ */
#film-grain {
  position: fixed;
  inset: -8%;
  z-index: 6;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
  opacity: 0.13;
  mix-blend-mode: overlay;
  animation: grain-jitter 1.4s steps(8) infinite;
}

/* ============================================================
   CURSOR BLOB — soft glowing dot that lerps after the pointer
   ============================================================ */
#cursor-blob {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  z-index: 7;
  pointer-events: none;
  border-radius: 50%;
  /* Warm-grey colour chosen so `mix-blend-mode: difference` resolves
     to a NEUTRAL dark grey on pearl and a light grey on void —
     no yellow / no blue cast. */
  background: radial-gradient(
    circle at 50% 50%,
    rgba(155, 151, 144, 0.85) 0%,
    rgba(155, 151, 144, 0.45) 40%,
    rgba(155, 151, 144, 0) 75%
  );
  mix-blend-mode: difference;
  transform: translate3d(-50px, -50px, 0);
  filter: blur(2px);
  transition: width 0.2s ease, height 0.2s ease;
}
#cursor-blob.is-hover {
  width: 44px;
  height: 44px;
}
@media (hover: none) {
  #cursor-blob { display: none; }
}

/* ============================================================
   TOP NAV — pill buttons (Figma spec v15)
   ============================================================ */
.top-nav {
  position: fixed;
  /* Subtract button's top padding (10px) so text aligns with mood text */
  top: calc(clamp(1.5rem, 2.2vw, 2rem) - 10px);
  /* Left = button's own top padding so edge matches the padding rhythm */
  left: 10px;
  z-index: 5;
  pointer-events: none;
}
/* Bare button stack — no wrapper frame */
.top-nav ul {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  pointer-events: auto;
}

/* ── Enabled (resting) ── */
.top-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.75rem;            /* 12px */
  letter-spacing: 0.03em;
  color: rgba(20, 22, 28, 0.65);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 32px;
  /* Semi-transparent so backdrop blur is visible through */
  background: rgba(217, 215, 222, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6),
              inset 0 -1px 0 rgba(0,0,0,0.04);
  transition: background 0.22s ease, color 0.22s ease,
              box-shadow 0.22s ease, border-color 0.22s ease;
  white-space: nowrap;
  line-height: 1;
}

/* ── Hover — Figma gradient + glass border ── */
.top-nav a:hover {
  background: linear-gradient(9deg, rgba(255,255,255,0.10) 64%, rgba(225,37,31,0.70) 336.24%);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 3px 6px 12px 0 rgba(0,0,0,0.04),
              inset 0 1px 0 rgba(255,255,255,0.5);
  color: rgba(20, 22, 28, 0.75);
}

/* ── Selected — Figma gradient + glass border + coral text ── */
.top-nav a[aria-current="true"] {
  padding: 12px 20px;
  font-size: 0.75rem;            /* 12px — keep consistent */
  background: linear-gradient(9deg, rgba(255,255,255,0.10) 64%, rgba(225,37,31,0.70) 336.24%);
  border: 1px solid rgba(255,255,255,0.35);
  color: rgb(225, 37, 31);
  box-shadow: 3px 6px 12px 0 rgba(0,0,0,0.04),
              inset 0 1px 0 rgba(255,255,255,0.5);
}

/* ============================================================
   HERO — absolute-positioned blocks per Figma 246:4662
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  padding: var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-block { pointer-events: auto; }

/* ----- Top-RIGHT: Mood. Items first, "State:" label on the right.
   Each name uses the same word-mask hover-slide as the nav.       ----- */
.hero-mood {
  position: absolute;
  top: clamp(1.5rem, 2.2vw, 2rem);
  right: clamp(1.5rem, 2.5vw, 2.5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--ink);
  white-space: nowrap;
}
.mood-label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
  color: rgba(20, 22, 28, 0.65);
}
.mood-list {
  display: inline-flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}
.mood-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-feature-settings: "tnum" 1;
  cursor: default;
  transition: opacity 220ms ease;
}
.mood-name {
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}
.mood-divider {
  display: inline-block;
  width: 1.6em;
  height: 1px;
  background: var(--pearl-2);
  background-size: 200% 100%;
  background-position: 100% 0;
  transition: width 0.35s ease, background-position 0.5s ease;
}
.mood-item:hover .mood-divider {
  width: 2.1em;
  background: linear-gradient(90deg, #a8c8e8, var(--pearl-2));
  background-size: 200% 100%;
  background-position: 0% 0;
  animation: gradient-sweep 1.8s ease infinite alternate;
}
@keyframes gradient-sweep {
  0%   { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}
.mood-value {
  font-weight: 500;
  color: rgba(20, 22, 28, 0.85);
  font-feature-settings: "tnum" 1;
}
.mood-max { color: rgba(20,22,28,0.4); font-weight: 400; font-size: 1em; }
/* Mood-name uses the shared .word-mask / .word slide mask. Override
   sizes so it sits on the baseline of the row. */
.hero-mood .word-mask {
  display: inline-block;
  overflow: hidden;
  position: relative;
  height: 1.2em;
  vertical-align: top;
  line-height: 1;
}
.hero-mood .word {
  display: block;
  position: relative;
  line-height: 1;
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.5, 0, 0.5, 1);
}
.hero-mood .word::after {
  content: attr(data-text);
  position: absolute;
  top: 1.2em; left: 0; width: 100%;
  white-space: nowrap;
  line-height: 1;
}
.mood-item:hover .word { transform: translateY(-100%); }

/* Canvas hosting the WebGL fluid simulation. Sized large around the
   title centre so the dye has plenty of room to spread without being
   clipped at the edges. The HTML #hero-title is visually-hidden. */
#title-fluid {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width:  min(94vw, 1500px);
  height: clamp(360px, 56vh, 620px);
  pointer-events: none;
  display: block;
}

/* ----- Bio: anchored to the 10th column's right edge ≈ 16.7% in
   from the right gutter; lifted off the bottom so it doesn't crowd
   the page edge. ----- */
.hero-bio {
  position: absolute;
  bottom: clamp(4rem, 9vh, 7rem);
  right: 16.667%;
  width: min(22em, 24vw);
  text-align: left;
}
/* BIO label: Panchang Regular at 14px, mixed-case (Figma 246:4783) */
.bio-label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.875rem;        /* 14px */
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-bottom: 0.65rem;
}
/* Bio body: Satoshi Regular 14/19.5 with 0.02em tracking (Figma 246:4784) */
.bio-text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.40;          /* tightened from 1.55 (-10%) */
  letter-spacing: 0.02em;
  color: var(--ink);
  text-wrap: pretty;
}
.bio-text + .bio-text { margin-top: 0.85rem; }

/* ----- Time: anchored to col 2 from left, baseline-matched to bio ----- */
.hero-time {
  position: absolute;
  bottom: clamp(4rem, 9vh, 7rem);
  left: 8.333%;                     /* start of col 2 */
}
.time-now {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-time);
  letter-spacing: 0;
  font-feature-settings: "tnum" 1;
  color: var(--ink);
  line-height: 1.0;
  display: inline-flex;
  gap: 0.25em;
  align-items: baseline;
  transition: color 0.4s ease;
}
/* JS adds `.time--changing` to .hero-time during the last ~5s of each
   minute. Time + location subtly shift to the active accent. */
.hero-time.time--changing .time-now,
.hero-time.time--changing .time-loc {
  color: var(--accent-active);
}
.time-period { font-family: var(--font-body); font-size: 0.55em; letter-spacing: 0.04em; vertical-align: super; }
.time-loc {
  margin-top: -0.1rem;
  font-weight: 300;
  font-size: var(--fs-body);
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ============================================================
   WORK SECTION
   ============================================================ */
#work {
  position: relative;
  z-index: 4;
  margin-top: 0;
  padding: clamp(8rem, 14vw, 14rem) 0 clamp(6rem, 10vw, 10rem);
  color: var(--pearl-1);
  background: #0e0e0e;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}
.work-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: clamp(1.5rem, 4vw, 4rem);
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 2.7fr) minmax(0, 3.7fr);
  gap: clamp(2rem, 4.5vw, 5rem);
  align-items: start;
}
/* Middle card hangs lower for editorial asymmetry. Done with margin
   so .work-item's transform stays free for tilt + scroll reveal. */
.work-grid > .work-item:nth-child(1) { margin-top: 0; }
.work-grid > .work-item:nth-child(2) { margin-top: clamp(3rem, 5vw, 5.5rem); }
.work-grid > .work-item:nth-child(3) { margin-top: 0; }

.work-item {
  display: flex;
  flex-direction: column;
  min-width: 0;

  /* Scroll-reveal initial state — IO toggles .is-visible */
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.work-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ----- Card hover — image scale + arrow reveal + title shift -----
   .work-image also gets a 3D tilt driven by --tilt-x / --tilt-y
   (set per-card by JS on mousemove). */
.work-image {
  width: 100%;
  aspect-ratio: 1.45 / 1;
  margin-bottom: clamp(0.85rem, 1.3vw, 1.25rem);
  background: linear-gradient(135deg, #1f1c1a 0%, #0c0a08 100%);  /* warm neutral, no blue */
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: perspective(1000px) rotateY(var(--tilt-x)) rotateX(var(--tilt-y));
  transform-style: preserve-3d;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s ease;
  will-change: transform;
}
.work-image::before {
  /* Inner image surface that scales on hover */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(184,232,255,0.08), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255,217,184,0.06), transparent 50%);
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-image::after {
  content: "↗";
  position: absolute;
  right: 0.85rem; top: 0.85rem;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-blue);
  color: var(--pearl-1);
  font-size: 0.85rem;
  opacity: 0;
  transform: translate(8px, -8px) scale(0.8);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-item:hover .work-image { border-color: rgba(184,232,255,0.25); }
.work-item:hover .work-image::before { transform: scale(1.06); }
.work-item:hover .work-image::after { opacity: 1; transform: translate(0,0) scale(1); }

.work-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-h3);
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--pearl-1);
  margin-bottom: 0.45rem;
  transition: color 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-item:hover .work-title {
  color: var(--accent-cyan);
  transform: translateX(0.35rem);
}

.work-summary {
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: rgba(235,231,224, 0.7);
  max-width: 32em;
}

/* "Selected Work" — Panchang Extrabold roman at bottom of dark panel */
.work-banner {
  margin-top: clamp(3rem, 7vw, 7rem);
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
  font-size: var(--fs-banner);
  line-height: 0.9;
  letter-spacing: var(--tracking-display);
  color: var(--accent-blue);
  text-transform: capitalize;
  text-align: center;
  white-space: nowrap;
}

/* ============================================================
   WORK — Project grid (new layout)
   ============================================================ */

/* Grain overlay canvas — lives in #work (position: relative) */
#work-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.65;
  mix-blend-mode: overlay;
}

/* Work progress pill — fixed, visible only while work section is active */
#work-progress {
  position: fixed;
  top: clamp(0.9rem, 2vw, 1.4rem);
  right: var(--gutter);
  z-index: 50;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
#work-progress.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.work-progress__label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(235,231,224,0.45);
}
.work-progress__counter {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(235,231,224,0.45);
}
#work-counter-current {
  font-weight: 600;
  color: rgba(235,231,224,1);
}
#work-counter-total {
  opacity: 0.8;
}

/* Project items — stacked vertically, full-bleed within work section */
.project-item {
  max-width: var(--max-w);
  margin: 0 auto clamp(4rem, 9vw, 9rem);
  padding-inline: clamp(1.5rem, 4vw, 4rem);
  position: relative;
  z-index: 4;

  /* Scroll-reveal initial state */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.project-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Staggered delay per item index */
.project-item[data-index="02"] { transition-delay: 0.1s; }
.project-item[data-index="03"] { transition-delay: 0.18s; }
.project-item[data-index="04"] { transition-delay: 0.26s; }

/* Two grid orientations: A = featured-left, B = featured-right */
.project-grid {
  display: grid;
  gap: clamp(0.6rem, 1.2vw, 1rem);
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  position: relative;         /* anchor for cursor-following CTA */
}
.project-grid--a {
  /* Figma: featured 1665px, side 686px → ratio 1665:686 = 2.427 */
  grid-template-columns: minmax(0, 2.427fr) minmax(0, 1fr);
}
.project-grid--b {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.427fr);
}

/* Side column — two vertically-stacked smaller cards */
.project-side {
  display: flex;
  flex-direction: column;
  gap: clamp(0.6rem, 1.2vw, 1rem);
}

/* Base card */
.project-card {
  background: linear-gradient(145deg, #1a1714 0%, #0e0c0a 100%);
  border: 1px solid rgba(255,255,255,0.05);
  /* Default radius — overridden per project below */
  border-radius: clamp(8px, 0.95vw, 14px);
  overflow: hidden;
  position: relative;
  transition: border-color 0.4s ease;
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}
.project-item:hover .project-card::after { opacity: 0.25; }
.project-card--featured {
  /* Figma: 1665 × 858 */
  aspect-ratio: 1665 / 858;
}
/* Side cards share remaining height equally */
.project-side .project-card {
  flex: 1;
  min-height: 100px;
}
.project-card--editorial-tall {
  flex: 1.5 !important;
}

/* Subtle inner highlight so cards don't read as flat black */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255,250,240,0.04), transparent 65%);
  pointer-events: none;
}
.project-item:hover .project-card--featured {
  border-color: rgba(255,255,255,0.10);
}

/* Placeholder cards for items 03 & 04 */
.project-card--placeholder {
  background: linear-gradient(145deg, #111009 0%, #090807 100%);
  border-color: rgba(255,255,255,0.025);
}
.project-card--placeholder-main {
  aspect-ratio: 16 / 11;
}
.project-item--soon .project-grid {
  opacity: 0.35;
  filter: grayscale(0.3);
}

/* ============================================================
   BOG APP (data-index="01") — card thumbnails
   Proportions from Figma node 246:4757:
     featured  1665 × 858  (ratio 1.941)  radius 32 → clamp(10px,1.27vw,18px)
     top-right  686 × 536  (ratio 1.280)  radius 24 → clamp(8px,0.95vw,14px)
     bot-right  686 × 293  (ratio 2.341)  radius 24 → clamp(8px,0.95vw,14px)
   ============================================================ */
[data-index="01"] .project-card--featured {
  background-image: url('/assets/card-featured-left.jpg');
  background-size: cover;
  background-position: center;
  border-radius: clamp(10px, 1.27vw, 18px);
}
/* Side cards — flex heights match Figma (536 : 293) */
[data-index="01"] .project-card--editorial {
  flex: 536 !important;
  background-image: url('/assets/screens/card-right-top.png');
  background-size: cover;
  background-position: center;
}
[data-index="01"] .project-card--app {
  flex: 293 !important;
  background-image: url('/assets/screens/card-right-bottom.png');
  background-size: cover;
  background-position: center;
}

/* ============================================================
   BOG APP — cursor-following "View Case Study" button
   ============================================================ */
.project-cta {
  /* JS sets top/left; transform centres it on the cursor */
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 16px;
  border-radius: 32px;
  background: rgba(28, 45, 219, 0.28);
  border: 1px solid rgba(28, 45, 219, 0.85);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.625rem;        /* 10 px */
  letter-spacing: 0.04em;
  color: rgb(220, 225, 255);
  text-decoration: none;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25),
              0 6px 20px rgba(28,45,219,0.22);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;       /* grid captures clicks */
  /* opacity + transform driven by animation on .is-visible */
  z-index: 10;
}
.project-cta.is-visible {
  animation: cta-appear 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cta-appear {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Always hide native cursor over the BOG grid — CTA button is the cursor */
#bog-grid {
  cursor: none;
}

/* Suppress the blob dot while over the grid */
#cursor-blob.is-hidden {
  opacity: 0;
  transition: opacity 0.18s ease;
}

/* Meta row — logo + description below the card grid */
/* Meta row mirrors the card-grid column ratio so description
   aligns exactly with the right card stack */
.project-meta {
  display: grid;
  grid-template-columns: minmax(0, 2.427fr) minmax(0, 1fr);
  gap: clamp(0.6rem, 1.2vw, 1rem);
  align-items: start;
}
.project-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pearl-1);
  white-space: nowrap;
}
.project-logo__thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}
.project-desc {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.58;
  color: rgba(235,231,224,0.55);
}

/* ============================================================
   EXPERIENCE BLOCK — lives inside #footer, inherits its bg
   ============================================================ */
.exp-block {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

/* Header: label + big display title + intro */
.exp-block__head {
  max-width: 680px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Magazine rubric */
.exp-label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  margin-bottom: 0.75rem;
}

/* Large display heading */
.exp-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

/* Intro sentence */
.exp-intro {
  font-family: var(--font-body);
  font-size: var(--fs-prose);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 58ch;
}

/* 2×2 entries grid */
.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 1.5vw, 1rem) clamp(0.75rem, 1.5vw, 1rem);
}

.exp-entry {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-radius: 12px;
  padding: clamp(1rem, 2vw, 1.25rem);
  text-decoration: none;
  background: transparent;
  transition: background 0.18s ease;
}

.exp-entry:hover {
  background: rgba(20, 22, 28, 0.05);
}

.exp-company {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-prose);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  transition: color 0.18s ease;
}

.exp-entry:hover .exp-company {
  color: var(--accent-blue);
}

.exp-role {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--ink-mute);
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.exp-desc {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* Cannes block — separated by generous space above, logo slot later */
.exp-cannes-block {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid rgba(20,22,28,0.08);
}

.exp-cannes {
  font-family: var(--font-body);
  font-size: var(--fs-prose);
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

.exp-education {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.exp-education p {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--ink-mute);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .exp-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER (placeholder — user is redesigning)
   Section labelled "THOUGHTS" in the nav.
   ============================================================ */
#footer {
  position: relative;
  z-index: 4;
  /* No background — transparent so avatar shows below the exp-block */
  color: var(--ink);
  padding: 0 0 calc(1rem + 60px + 16px);  /* 16px avatar gap + strip height + bottom offset */
}

/* exp-block carries the opaque pearl slab — avatar shows below it */
.exp-block {
  background: var(--pearl-1);
  padding-top: clamp(4rem, 9vw, 9rem);
  padding-inline: var(--gutter);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  max-width: var(--max-w);
  margin: 0 auto;
  align-items: start;
}
.footer-title { grid-column: 1 / span 7; }
.footer-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-h2);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  color: var(--accent-brick);
  text-transform: uppercase;
  margin-bottom: clamp(2rem, 4vw, 4rem);
}
.footer-headline .line {
  display: block;
  white-space: nowrap;
  margin-block: -0.04em;
}
.footer-form {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(20,22,28,0.4);
  max-width: 34rem;
  padding: 0.85rem 0;
}
.footer-input {
  flex: 1;
  background: transparent;
  border: 0; outline: 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--fs-body);
  color: var(--ink);
  padding-right: 1rem;
}
.footer-input::placeholder { color: var(--ink-soft); font-style: italic; }
.footer-submit {
  background: transparent;
  border: 0; cursor: pointer;
  color: var(--ink);
  font-size: 1.05rem;
  padding: 0 0.25rem;
  transition: transform 0.25s ease;
}
.footer-submit:hover { transform: translateX(2px); }

.footer-qa {
  grid-column: 8 / span 4;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2vw, 2rem);
  font-size: var(--fs-prose);
}
.qa-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.qa-item.is-visible { opacity: 1; transform: none; }

.qa-item dt {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}
.qa-item dd {
  font-weight: 300;
  color: var(--ink);
  line-height: 1.55;
  text-wrap: pretty;
  max-width: 28em;
  margin-left: auto;
}
.footer-socials {
  grid-column: 12 / span 1;
  text-align: right;
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  align-self: end;
}
.socials-label {
  font-weight: 300;
  font-style: italic;
  color: var(--ink-soft);
  font-size: var(--fs-prose);
}
.socials-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 0.35rem;
}
.socials-list a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.socials-list a:hover { color: var(--accent-brick); }
.footer-fineprint {
  margin: clamp(4rem, 8vw, 8rem) auto 0;
  max-width: var(--max-w);
  font-size: var(--fs-meta);
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--ink-soft);
}


/* ============================================================
   SITE FINEPRINT — outside main, hugs the bottom edge
   ============================================================ */
.site-fineprint {
  position: relative;
  z-index: 4;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0.55rem var(--gutter) 0.6rem;
}

/* ============================================================
   GLASS FOOTER STRIP
   ============================================================ */
.glass-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  /* Sit at the bottom of the transparent avatar-stage */
  position: absolute;
  bottom: 1rem;
  left: var(--gutter);
  right: var(--gutter);
  padding: 0 clamp(0.75rem, 1.5vw, 1.25rem);
  height: 60px;
  border-radius: 14px;
  /* Glass on light background */
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 2px 18px rgba(20, 22, 28, 0.07),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Left: pill buttons */
.glass-strip__left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 24px;
  background: rgba(20, 22, 28, 0.06);
  border: 1px solid rgba(20, 22, 28, 0.10);
  font-family: var(--font-body);
  font-size: 0.6875rem;     /* 11px */
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.glass-pill:hover {
  background: rgba(20, 22, 28, 0.11);
  border-color: rgba(20, 22, 28, 0.18);
}

/* Right: email row + form */
.glass-strip__right {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.glass-email-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.glass-email-addr {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.glass-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid rgba(20, 22, 28, 0.14);
  font-family: var(--font-body);
  font-size: 0.625rem;    /* 10px */
  font-weight: 500;
  color: var(--ink-mute);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.glass-copy-btn:hover {
  background: rgba(20, 22, 28, 0.07);
  color: var(--ink);
  border-color: rgba(20, 22, 28, 0.22);
}
.glass-copy-btn.is-copied {
  color: #1a6b3c;
  border-color: rgba(26, 107, 60, 0.35);
  background: rgba(26, 107, 60, 0.07);
}

/* Message form */
.glass-form {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(20, 22, 28, 0.22);
  padding: 0;
  gap: 0.25rem;
  min-width: 180px;
  max-width: 260px;
  flex: 1;
}

.glass-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--ink);
  padding: 4px 0;
  min-width: 0;
}
.glass-input::placeholder {
  color: var(--ink-mute);
  font-style: italic;
}

.glass-send-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--ink-mute);
  padding: 2px 2px 2px 4px;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}
.glass-send-btn:hover {
  color: var(--ink);
  transform: translateX(2px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  #hero-title { top: 32%; }
  .hero-bio   { top: auto; bottom: 30vh; right: var(--gutter); width: min(20em, calc(100vw - 2 * var(--gutter))); }
  .hero-time  { bottom: 8vh; }
  .work-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .work-grid > .work-item:nth-child(2) {
    margin-bottom: 0;
    transform: none;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
  .footer-title    { grid-column: 1; }
  .footer-qa       { grid-column: 1; text-align: left; }
  .qa-item dd      { margin-left: 0; }
  .footer-socials  { grid-column: 1; align-items: flex-start; text-align: left; }
}
@media (max-width: 540px) {
  :root {
    --fs-display: clamp(2.25rem, 13vw, 4rem);
    --fs-banner:  clamp(2.25rem, 13vw, 4rem);
    --fs-h2:      clamp(1.75rem, 9vw, 3rem);
  }
  .bio-text { font-size: 0.78rem; }
  .top-nav ul { padding: 5px; }
  .top-nav a { font-size: 0.75rem; height: 42px; padding: 0 0.9rem; }
  .top-nav a[aria-current="true"] { height: 45px; font-size: 0.85rem; padding: 0 1rem; }
}

/* ============================================================
   AVATAR FOG OVERLAY — pearl-tinted radial vignette.
   Using background gradient instead of backdrop-filter so the
   WebGL canvas (which lives in its own GPU compositor layer)
   is reliably affected. Transparent at the cursor; fades to
   the page's pearl colour outward, dimming the avatar into
   atmosphere. Canvas itself is kept at 0px blur — fully sharp.
   ============================================================ */
#avatar-fog {
  position: fixed;
  inset: 0;
  z-index: 2;              /* sits above avatar-canvas */
  pointer-events: none;
  --cx: 50vw;
  --cy: 50vh;
  --reveal: 200px;
  --reveal-soft: 110px;
  background: radial-gradient(
    circle var(--reveal) at var(--cx) var(--cy),
    transparent 0%,
    transparent calc(var(--reveal) - var(--reveal-soft)),
    rgba(236, 240, 243, 0.82) 100%
  );
  /* Fade out as the page scrolls into the dark work zone */
  opacity: var(--glass-opacity, 1);
  transition: opacity 0.4s ease;
}
