/* ============================================================
   Lucas Janvier — Portfolio · v3
   ============================================================ */

:root {
  --white:  #FFFFFF;
  --off:    #FAFBFF;
  --ink:    #0D0D17;
  --ink-60: rgba(13,13,23,0.60);
  --ink-35: rgba(13,13,23,0.35);
  --ink-15: rgba(13,13,23,0.15);
  --ink-07: rgba(13,13,23,0.07);

  --f-head: 'Fraunces', serif;
  --f-body: 'DM Sans', sans-serif;
  --f-mono: 'DM Mono', monospace;
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--f-body);
  background: var(--white);
  color: var(--ink);
  overflow: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
button { border: none; background: none; font: inherit; cursor: none; color: inherit; }
img { display: block; }

/* ============================================================
   OPAL BACKGROUND — barely there
   ============================================================ */
.opal {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
#b1 {
  width: 80vw; height: 80vw;
  background: radial-gradient(circle, rgba(200,215,255,0.4) 0%, transparent 70%);
  filter: blur(140px);
  top: -30%; left: -20%;
  animation: drift1 24s ease-in-out infinite alternate;
}
#b2 {
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(255,205,230,0.3) 0%, transparent 70%);
  filter: blur(120px);
  top: 20%; right: -15%;
  animation: drift2 19s ease-in-out infinite alternate;
}
#b3 {
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(215,200,255,0.28) 0%, transparent 70%);
  filter: blur(130px);
  bottom: -20%; left: 20%;
  animation: drift3 28s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(4%, 6%) scale(1.05); } }
@keyframes drift2 { to { transform: translate(-6%, 4%) scale(0.96); } }
@keyframes drift3 { to { transform: translate(5%, -5%) scale(1.04); } }

/* ============================================================
   CURSOR
   ============================================================ */
/* PNG cursor (iridescent image) */
.cur-png {
  position: fixed;
  width: 46px;
  height: auto;
  pointer-events: none;
  z-index: 10000;
  top: 0; left: 0;
  transform: translate(-4px, -4px); /* hotspot: tip at top-left */
  will-change: left, top;
  display: none; /* shown via JS when image loads */
}

/* Dot + ring fallback */
.c-dot {
  position: fixed;
  width: 7px; height: 7px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
}
.c-ring {
  position: fixed;
  width: 30px; height: 30px;
  border: 1px solid var(--ink-35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease), height .35s var(--ease), background .25s;
}
body.cur-hover .c-ring { width: 50px; height: 50px; border-color: var(--ink-60); }
body.cur-item  .c-ring {
  width: 70px; height: 70px;
  border-color: transparent;
  background: rgba(13,13,23,.05);
  backdrop-filter: blur(4px);
}

/* ============================================================
   SECTIONS — each is a fixed full-screen layer
   ============================================================ */
.section {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.section--scroll {
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  padding: 80px 60px 60px;
}

/* ============================================================
   BACK BUTTON
   ============================================================ */
.back-btn {
  position: absolute;
  top: 28px; left: 36px;
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-35);
  transition: color 0.2s;
  z-index: 20;
  pointer-events: auto;
}
.back-btn:hover { color: var(--ink-60); }

/* ============================================================
   S1 — COVER
   ============================================================ */
#s-cover { background: var(--white); z-index: 50; align-items: flex-end; justify-content: center; }

.cover-wrap {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Ambient glow — centered at ~50% (where the stone sits) */
.cover-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 50vmin; height: 50vmin;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 80% 80% at 48% 42%, rgba(255,175,225,0.6) 0%, transparent 60%),
    radial-gradient(ellipse 90% 90% at 52% 55%, rgba(205,185,255,0.5) 0%, transparent 70%);
  filter: blur(50px);
  animation: glowPulse 5s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glowPulse {
  to {
    background:
      radial-gradient(ellipse 80% 80% at 52% 38%, rgba(255,185,240,0.65) 0%, transparent 60%),
      radial-gradient(ellipse 90% 90% at 48% 58%, rgba(215,195,255,0.55) 0%, transparent 70%);
  }
}

/* CSS fallback opal sphere (shown when hand image missing) */
.cover-fallback {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40vmin; height: 40vmin;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%,
      rgba(255,215,245,0.95) 0%, rgba(210,195,255,0.85) 25%,
      rgba(185,220,255,0.75) 55%, rgba(255,230,245,0.9) 80%,
      rgba(250,248,255,0.95) 100%);
  box-shadow:
    0 20px 80px rgba(220,180,255,0.5), 0 0 120px rgba(255,200,235,0.3),
    inset 0 -20px 40px rgba(200,185,255,0.3), inset 10px 10px 30px rgba(255,255,255,0.6);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

/* Hand image — bottom of hand = bottom of screen, stone at ~50vh */
.cover-hand {
  position: relative;
  z-index: 2;
  height: 75vh;         /* tune here if needed */
  width: auto;
  object-fit: contain;
  object-position: bottom center;
  mix-blend-mode: multiply;
  flex-shrink: 0;
  pointer-events: none;
}

/* "click here" — appears above the hand on hover */
.cover-mind {
  position: absolute;
  z-index: 3;
  top: 22%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  font-family: var(--f-mono);
  font-size: clamp(0.6rem, 1.1vw, 0.75rem);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-35);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.cover-wrap:hover .cover-mind {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   S2 — FOLDERS
   ============================================================ */
#s-folders { background: var(--white); z-index: 40; }

.folders-row {
  display: flex;
  align-items: flex-end;
  gap: clamp(32px, 6vw, 80px);
}

.folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
  padding: 8px;
  /* Prevent Safari double-click focus issue */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.folder-img-wrap {
  position: relative;
  width: clamp(120px, 16vw, 200px);
  height: clamp(96px, 13vw, 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Scale lives on the wrap — NOT overridden by GSAP (GSAP targets the img inside) */
  transition: transform 0.35s var(--ease), filter 0.35s;
  will-change: transform;
}

/* This is pure CSS — no GSAP touching this element */
.folder:hover .folder-img-wrap {
  transform: scale(1.12) translateY(-8px);
  filter: drop-shadow(0 12px 24px rgba(200,180,255,0.35));
}

.folder-img {
  width: 100%; height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  transition: opacity 0.2s;
}

/* CSS folder shape fallback */
.folder-css-shape {
  position: absolute;
  inset: 0;
  border-radius: 8px 12px 8px 8px;
  display: none;
}
.folder-css-shape::before {
  content: '';
  position: absolute;
  top: -14px; left: 8px;
  width: 45%; height: 14px;
  border-radius: 6px 6px 0 0;
  background: inherit;
  filter: brightness(0.92);
}
.folder-css-shape--pink {
  background: linear-gradient(145deg, rgba(255,210,235,0.95), rgba(235,210,255,0.9));
  box-shadow:
    inset 0 2px 6px rgba(255,255,255,0.8),
    0 8px 32px rgba(255,180,220,0.35),
    0 2px 8px rgba(200,160,220,0.2);
}
/* Show CSS shape only when img fails */
.folder-img-wrap.folder-css .folder-img    { display: none; }
.folder-img-wrap.folder-css .folder-css-shape { display: block; }
.folder-img-wrap.folder-css .folder-css-icon  { display: flex; }

.folder-css-icon {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(180,140,200,0.7);
  z-index: 3;
}

.folder-label {
  font-family: var(--f-mono);
  font-size: clamp(0.6rem, 1.1vw, 0.75rem);
  letter-spacing: 0.06em;
  color: var(--ink-60);
  text-align: center;
}

/* ============================================================
   S3 — BIO / WHO AM I
   ============================================================ */
#s-bio { z-index: 30; background: var(--white); }

.bio-layout {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding-top: 24px;
}

/* Left: text + stats */
.bio-name {
  font-family: var(--f-body);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 200;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}
.bio-tagline {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--ink-60);
  line-height: 1.7;
  margin-bottom: 16px;
}
.bio-text {
  font-size: 0.88rem;
  line-height: 1.95;
  color: var(--ink-60);
  font-weight: 300;
  margin-bottom: 20px;
}
.bio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 32px;
}
.bio-tags span {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-35);
  padding: 5px 12px;
  border: 1px solid var(--ink-07);
  border-radius: 100px;
}

/* Stats */
.bio-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 28px;
}
.bstat { display: flex; flex-direction: column; gap: 3px; }
.bstat__n {
  font-family: var(--f-body);
  font-size: 1.5rem;
  font-weight: 200;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.bstat__l {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-35);
}
.bio-available {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--ink-35);
  border-top: 1px solid var(--ink-07);
  padding-top: 16px;
}

/* Right: timeline */
.tl-section {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-35);
  margin-bottom: 12px;
}

.tl-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--ink-07);
}

.tl-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.tl-company {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ink);
}

/* Now Hiring badge */
.now-hiring {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(220, 90, 0, 0.08);
  color: #C05800;
  border: 1px solid rgba(200, 80, 0, 0.35);
  border-radius: 100px;
  font-family: var(--f-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: none;
  transition: background 0.2s;
}
.now-hiring:hover {
  background: rgba(220, 90, 0, 0.14);
  animation: jiggle 0.45s ease-in-out;
}
@keyframes jiggle {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-4deg) scale(1.06); }
  45%  { transform: rotate(4deg) scale(1.06); }
  65%  { transform: rotate(-2deg) scale(1.02); }
  85%  { transform: rotate(2deg) scale(1.02); }
  100% { transform: rotate(0deg); }
}

.tl-bot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.tl-role {
  font-family: var(--f-body);
  font-size: 0.78rem;
  color: var(--ink-60);
  font-weight: 300;
  line-height: 1.5;
}
.tl-year {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--ink-35);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   S4 — PROJECTS
   ============================================================ */
#s-projects { z-index: 30; background: var(--white); }

.stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 80px 80px;
}

.world-meta {
  position: absolute;
  bottom: 36px; left: 36px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  opacity: 0;
}
.world-title {
  font-family: var(--f-body);
  font-size: 0.88rem;
  font-weight: 300;
}
.world-sep {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--ink-15);
}
.world-year {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--ink-35);
}

/* Grid */
.world-grid {
  display: grid;
  gap: 5px;
  width: 100%;
  max-width: 1060px;
}

.g-item {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  cursor: none;
  min-height: 0;
  will-change: transform, opacity;
  /* Subtle opal glow at rest */
  box-shadow: 0 3px 18px rgba(200,180,255,0.12), 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.4s var(--ease);
}
.g-item:hover {
  box-shadow:
    0 6px 40px rgba(200,180,255,0.32),
    0 4px 16px rgba(255,185,225,0.18),
    0 1px 6px rgba(0,0,0,0.05);
  z-index: 5;
}

.g-item__thumb {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at var(--gx,30%) var(--gy,30%),
      rgba(var(--c1,195,215,255),0.55) 0%, transparent 65%),
    radial-gradient(ellipse 70% 70% at var(--gx2,70%) var(--gy2,70%),
      rgba(var(--c2,255,200,230),0.45) 0%, transparent 65%),
    rgb(238,240,248);
  transition: transform 0.6s var(--ease);
}
.g-item__thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.g-item__shimmer {
  position: absolute; inset: 0;
  background: radial-gradient(circle 55% at var(--mx,50%) var(--my,50%),
    rgba(255,255,255,0.4) 0%, rgba(210,225,255,0.15) 35%, transparent 65%);
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.3s;
  pointer-events: none;
}

.g-item__role {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 6px 9px;
  font-family: var(--f-mono);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  transform: translateY(100%);
  transition: transform 0.28s var(--ease);
}
.g-item:hover .g-item__shimmer { opacity: 1; }
.g-item:hover .g-item__role    { transform: translateY(0); }
.g-item:hover .g-item__thumb   { transform: scale(1.04); }

/* Text world */
.text-world { width: 100%; max-width: 880px; pointer-events: auto; }
.text-item {
  display: grid;
  grid-template-columns: 2.5rem 1fr 1.3fr 4.5rem;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--ink-07);
  align-items: baseline;
  opacity: 0;
  transform: translateX(-20px);
}
.text-item__num  { font-family: var(--f-mono); font-size: 0.62rem; color: var(--ink-15); }
.text-item__client { font-size: 0.95rem; font-weight: 300; }
.text-item__role { font-family: var(--f-mono); font-size: 0.58rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-35); line-height: 1.7; }
.text-item__year { font-family: var(--f-mono); font-size: 0.62rem; color: var(--ink-35); text-align: right; }

/* Glass arrow navigation — background split from single nav-arrows.png */
.glass-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  /* Size: each arrow is half the combined image width */
  width:  clamp(55px, 7vw, 88px);
  height: clamp(55px, 7vw, 88px);
  z-index: 20;
  pointer-events: auto;
  opacity: 0;               /* revealed by JS when projects loads */
  transition: opacity 0.25s, transform 0.3s var(--ease);
  padding: 0;
  border: none;
  /* Split the single file: left half = prev, right half = next */
  background-image: url('../assets/nav-arrows.png');
  background-repeat: no-repeat;
  background-size: 200% 100%;
  /* Fallback label (hidden when image loads) */
  font-size: 1.5rem;
  color: var(--ink-35);
  display: flex;
  align-items: center;
  justify-content: center;
}
.glass-arr--prev { left: 12px;  background-position: 0% center; }
.glass-arr--next { right: 12px; background-position: 100% center; }
.glass-arr:hover { opacity: 1 !important; transform: translateY(-50%) scale(1.1); }

/* Hide fallback text when the background image loads (detected via JS) */
.glass-arr.has-img { color: transparent; }

/* World dots */
.world-dots {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  pointer-events: auto;
}
.nav-dot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px;
  cursor: none;
}
.nav-dot__circle {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-15);
  transition: all 0.3s var(--ease);
}
.nav-dot__label {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-35);
  max-width: 0; overflow: hidden; white-space: nowrap;
  transition: max-width 0.4s var(--ease), opacity 0.3s;
  opacity: 0;
}
.nav-dot.is-active .nav-dot__circle { background: var(--ink-60); width: 7px; height: 7px; }
.nav-dot.is-active .nav-dot__label,
.nav-dot:hover    .nav-dot__label  { max-width: 100px; opacity: 1; }

/* ============================================================
   S5 — CONTACT
   ============================================================ */
#s-contact { z-index: 30; background: var(--white); }

.contact-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.contact-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-35);
}
.contact-email {
  font-family: var(--f-head);
  font-size: clamp(1.6rem, 4.5vw, 4rem);
  font-weight: 200;
  letter-spacing: -0.025em;
  color: var(--ink);
  transition: opacity 0.2s;
}
.contact-email:hover { opacity: 0.5; }
.contact-note {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--ink-35);
}

/* ============================================================
   ROLE TOOLTIP
   ============================================================ */
.role-tip {
  position: fixed;
  z-index: 9000;
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid var(--ink-07);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -160%) scale(0.9);
  transition: opacity 0.18s, transform 0.18s var(--ease);
  white-space: nowrap;
}
.role-tip.is-visible {
  opacity: 1;
  transform: translate(-50%, -160%) scale(1);
}

/* ============================================================
   CASE STUDY — clickable tile
   ============================================================ */
.g-item--case { cursor: none; }
.g-item--case .g-item__thumb {
  background:
    radial-gradient(ellipse 90% 90% at 30% 25%, rgba(255,210,225,0.65) 0%, transparent 62%),
    radial-gradient(ellipse 80% 80% at 75% 80%, rgba(210,200,255,0.55) 0%, transparent 62%),
    rgb(244,240,250);
}
.g-item--case .g-item__badge {
  position: absolute;
  top: 8px; left: 8px;
  font-family: var(--f-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(6px);
  padding: 3px 7px;
  border-radius: 3px;
}
.g-item--case .g-item__title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 11px 11px;
  font-family: var(--f-head);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink);
  background: linear-gradient(to top, rgba(255,255,255,0.92) 40%, transparent);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.g-item--case .g-item__arrow {
  font-family: var(--f-body);
  font-size: 0.8rem;
  color: var(--ink-35);
  transition: transform 0.3s var(--ease);
}
.g-item--case:hover .g-item__arrow { transform: translate(2px, -2px); }

/* ============================================================
   CASE STUDY — full panel
   ============================================================ */
.case-panel {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: none;
  opacity: 0;
}
.case-panel.is-open { display: block; }
.case-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(250,251,255,0.72);
  backdrop-filter: blur(14px);
}
.case-panel__inner {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: clamp(24px, 6vh, 64px) clamp(20px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-close {
  position: fixed;
  top: 28px; left: 28px;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-60);
  padding: 8px 14px;
  border-radius: 40px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--ink-07);
  transition: color 0.2s, transform 0.3s var(--ease);
}
.case-close:hover { color: var(--ink); transform: translateX(-3px); }

.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  max-width: 1100px;
  width: 100%;
  margin: auto;
}

/* Left — the two stacked "dossiers" */
.case-visual {
  display: flex;
  gap: clamp(24px, 4vw, 56px);
  justify-content: center;
  align-items: flex-end;
  padding: 20px 0;
}
.stack {
  position: relative;
  width: clamp(150px, 15vw, 210px);
  aspect-ratio: 3 / 4;
  will-change: transform, opacity;
}
/* Empty pages fanned out behind the cover (no content shown) */
.stack__page {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 8px 30px rgba(120,110,180,0.10);
  border: 1px solid var(--ink-07);
}
.stack__page--1 { transform: translate(6px, 6px)   rotate(1.4deg); }
.stack__page--2 { transform: translate(11px, 11px) rotate(2.8deg); opacity: 0.85; }
.stack__page--3 { transform: translate(15px, 16px) rotate(4deg);   opacity: 0.6; }
.stack__cover {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 30% 20%, rgba(255,210,225,0.7) 0%, transparent 60%),
    radial-gradient(ellipse 80% 80% at 75% 85%, rgba(205,195,255,0.6) 0%, transparent 60%),
    rgb(240,238,248);
  box-shadow: 0 16px 50px rgba(120,110,180,0.22), 0 4px 12px rgba(0,0,0,0.06);
}
.stack__cover img { width: 100%; height: 100%; object-fit: cover; }
.stack__cover.is-empty img { display: none; }
.stack__badge {
  position: absolute;
  bottom: -12px; right: -8px;
  z-index: 3;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--ink-07);
  padding: 5px 10px;
  border-radius: 40px;
  box-shadow: 0 6px 20px rgba(120,110,180,0.18);
}

/* Right — the 5 blocks */
.case-eyebrow {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-35);
}
.case-title {
  font-family: var(--f-head);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  margin: 8px 0 2px;
}
.case-meta {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: 24px;
}
.case-blocks {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.case-block {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-07);
}
.case-block__label {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-35);
  padding-top: 3px;
}
.case-block__body {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink);
}
.case-confidential {
  margin-top: 22px;
  font-size: 0.8rem;
  font-weight: 300;
  font-style: italic;
  color: var(--ink-60);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.case-confidential span { font-style: normal; }

/* ============================================================
   BUTTER BABY — full-page case world (inline, no click)
   ============================================================ */
.case-world {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3vh, 34px);
  pointer-events: auto;
}
.case-world .anim { opacity: 0; }   /* revealed by GSAP */

.case-head { text-align: center; max-width: 640px; }
.case-head__eyebrow {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-35);
}
.case-head__title {
  font-family: var(--f-head);
  font-weight: 300;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.05;
  margin: 6px 0;
}
.case-head__meta {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: 12px;
}
.case-head__context {
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-60);
}

.case-decks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 84px);
  width: 100%;
  max-width: 860px;
}

.deck {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.deck__stack {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 9;
  margin-bottom: 26px;
  cursor: none;
}
.deck__page,
.deck__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}
.deck__page {
  filter: blur(3px) saturate(1.05) brightness(1.02);
  border: 1px solid var(--ink-07);
  box-shadow: 0 10px 30px rgba(120,110,180,0.12);
  transition: transform 0.55s var(--ease), opacity 0.55s;
}
.deck__page--1 { transform: translate(8px, 8px)   rotate(1.6deg); opacity: 0.92; }
.deck__page--2 { transform: translate(15px, 15px) rotate(3deg);   opacity: 0.72; }
.deck__page--3 { transform: translate(21px, 22px) rotate(4.4deg); opacity: 0.52; }
.deck__cover {
  z-index: 2;
  box-shadow: 0 18px 50px rgba(120,110,180,0.26), 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}
.deck__stack:hover .deck__page--1 { transform: translate(15px, 11px) rotate(2.6deg); }
.deck__stack:hover .deck__page--2 { transform: translate(28px, 24px) rotate(4.8deg); }
.deck__stack:hover .deck__page--3 { transform: translate(41px, 40px) rotate(6.6deg); }
.deck__stack:hover .deck__cover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 26px 60px rgba(120,110,180,0.34), 0 6px 16px rgba(0,0,0,0.07);
}

.deck__kicker {
  font-family: var(--f-mono);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-35);
}
.deck__title {
  font-family: var(--f-head);
  font-weight: 300;
  font-size: 1.15rem;
  margin: 3px 0 12px;
}
.deck__topics {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.deck__topics li {
  position: relative;
  padding-left: 16px;
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.4;
  color: var(--ink-60);
}
.deck__topics li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.5em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,180,215,0.9), rgba(200,185,255,0.9));
}

.case-confidential {
  font-size: 0.78rem;
  font-weight: 300;
  font-style: italic;
  color: var(--ink-60);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.case-confidential span { font-style: normal; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .case-decks { grid-template-columns: 1fr; gap: 40px; max-width: 340px; margin: 0 auto; }
  .case-world { gap: 22px; }
  .case-head__context { font-size: 0.82rem; }
  .section--scroll { padding: 72px 28px 40px; }
  .bio-layout { grid-template-columns: 1fr; gap: 32px; }
  .bio-stats  { grid-template-columns: 1fr 1fr; }
  .text-item  { grid-template-columns: 2rem 1fr auto; }
  .text-item__role { display: none; }
  .glass-arr { width: 50px; }
  .folders-row { gap: 20px; }
  .case-grid { grid-template-columns: 1fr; gap: 36px; }
  .case-visual { padding-top: 8px; }
  .case-block { grid-template-columns: 100px 1fr; gap: 12px; }
}
@media (max-width: 480px) {
  .folders-row { gap: 14px; }
  .folder-img-wrap { width: 90px; height: 72px; }
  .case-block { grid-template-columns: 1fr; gap: 4px; }
}
