/* ============================================================
   Cupi Ng — Portfolio
   8% page gutters · 2-col section layout (title left, content right)
   14px min text · serif editorial heads.
   ============================================================ */

:root {
  --bg: #09080a;
  --bg-2: #111113;
  --ink: #f4f4f5;
  --ink-2: #c9c9cd;
  --ink-3: #9a9a9f;
  --ink-4: #74747a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);

  --r-sm: 6px;
  --r-md: 14px;
  --r-pill: 999px;

  --easing: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
  --t-med: 360ms;

  --pad: 8%;
  --col-gap: clamp(40px, 5vw, 96px);
  /* ---- Site frame & nav spacing (tweak these to adjust the outer frame
     and how far the floating nav sits from the top of the viewport) ---- */
  --site-frame-margin: 20px; /* Desktop: thickness of inner inset (frame) */
  --site-frame-radius: 24px; /* Desktop: inner corner radius */
  --site-frame-margin-mobile: 8px; /* Mobile: thinner frame margin */
  --site-frame-radius-mobile: 16px; /* Mobile: slightly smaller radius */
  --nav-island-top-base: 18px; /* Base nav top; add frame margin on top */
  /* ---- Case study sizing helpers (tweak these to add a few px) ---- */
  --case-card-thumb-extra: 8px; /* Add this value to the card thumbnail height */
  --case-images-extra: 8px; /* Add this value to the carousel/case image height */
  --case-card-aspect: 4 / 3; /* Card thumbnail aspect ratio — change to '16 / 9' for widescreen */
  /* ---- Transition timing helpers (tweak to slow/soften image fades) ---- */
  --case-preview-transition: 1000ms; /* Hover preview fade duration (increase to reduce flash) */
  --case-images-transition: 1000ms; /* Carousel image crossfade duration (increase to soften change) */
  --case-card-thumb-transition: 1000ms; /* Card thumbnail image transform/hover transition */
  /* ---- Card-view label cursor (hover 'View Details') ---- */
  --card-cursor-size: 110px; /* Diameter of the circular label */
  --card-cursor-scale: 1.11; /* Scale applied when .is-scaling is active */
  --card-cursor-border: none; /* Set to 'none' to remove outline */
  --card-cursor-bg: #000; /* Background color of the label */
  --card-cursor-font-size: 8px; /* Label text size */
  --card-cursor-transition: 180ms; /* Transition for opacity/size changes */
  /* ---- Case detail spacing ---- */
  --case-detail-side-gap: 12px; /* Right-side padding inside opened case details (tweak as needed) */
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

::selection {
  background-color: #E2DDFF;
  color: #111;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: -0.005em;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* ===== Orphan prevention =====
   text-wrap: balance  → headings: spreads words evenly so no lone word on its own line
   text-wrap: pretty   → body copy: avoids a single orphan word on the last line
   Both are pure CSS, zero JS, fully responsive. Gracefully ignored by older browsers. */
h1, h2, h3, h4,
.hero-title, .section-title, .case-title, .case-client,
.tl-body h3, .tl-body h4 {
  text-wrap: balance;
}

p, li, .case-copy p, .about-body p, .tl-body p {
  text-wrap: pretty;
}

.serif {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  /* allow a tiny extra height (use --case-images-extra to tweak, e.g. 4px) */
  box-sizing: content-box;
  padding-bottom: var(--case-images-extra);
  body, a, button, [role="button"] { cursor: none; }
}

/* ===== Custom cursor ===== */
.cursor-ring, .cursor-dot {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  will-change: transform, width, height, opacity;
}
.cursor-ring {
  width: 34px; height: 34px;
  /* use --case-images-transition to control the crossfade duration between slides */
  transition: opacity var(--case-images-transition) var(--easing);
  border-radius: 50%;
  transition: width var(--t-fast) var(--easing),
.case-images img { width: 100%; height: 100%; object-fit: cover; background: var(--bg-2); }
              opacity var(--t-fast) var(--easing),
              background var(--t-fast) var(--easing);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 4px; height: 4px;
  background: #fff;
  border-radius: 50%;
  transition: width var(--t-fast) var(--easing),
              height var(--t-fast) var(--easing),
              opacity var(--t-fast) var(--easing);
  mix-blend-mode: difference;
}
body.is-hovering .cursor-ring { width: 60px; height: 60px; background: rgba(255,255,255,0.06); }
body.is-hovering .cursor-dot { width: 8px; height: 8px; }
body.is-previewing .cursor-ring,
body.is-previewing .cursor-dot { opacity: 0; }

@media (hover: none), (pointer: coarse) {
  .cursor-ring, .cursor-dot { display: none; }
}

/* ===== Card-view label cursor ===== */
.cursor-card-label {
  position: fixed; top: 0; left: 0;
  width: var(--card-cursor-size);
  height: var(--card-cursor-size);
  border-radius: 50%;
  background: var(--card-cursor-bg);
  border: var(--card-cursor-border);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--card-cursor-font-size);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  line-height: 1.4;
  pointer-events: none;
  z-index: 10002;
  opacity: 0;
  transform: translate(-9999px, -9999px) translate(-50%, -50%);
  transition: opacity var(--card-cursor-transition) var(--easing), width var(--card-cursor-transition) var(--easing), height var(--card-cursor-transition) var(--easing);
  will-change: transform, opacity;
}
.cursor-card-label.is-visible { opacity: 1; }
.cursor-card-label.is-scaling { width: calc(var(--card-cursor-size) * var(--card-cursor-scale)); height: calc(var(--card-cursor-size) * var(--card-cursor-scale)); }

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

/* ===== Case-preview floating thumbnail ===== */
.case-preview {
  position: fixed; top: 0; left: 0;
  /* Hover preview size — change these to alter the preview dimensions on list hover */
  width: 620px; /* try 420px or 600px */
  height: 490px; /* try 320px or 460px */
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  /* Adjust the scale for subtle shrink/expand effect on appear */
  transform: translate(-9999px, -9999px) scale(0.94); /* change 0.94 → 1 to remove shrink */
  /* Transition controls how quickly the preview appears and moves — increase times to slow it down */
  transition: opacity 220ms var(--easing), transform 220ms var(--easing);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7);
}
.case-preview.is-active {
  opacity: 1;
}
.case-preview img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  /* background prevents a white flash during crossfade; change timing via --case-preview-transition */
  background: var(--bg-2);
  transition: opacity var(--case-preview-transition) var(--easing);
}
.case-preview img.is-current { opacity: 1; }

@media (hover: none), (pointer: coarse) {
  .case-preview { display: none; }
}

/* ===== Custom Outer Frame Overlay ===== */
.site-frame-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none; /* Lets you click and scroll through it */
  z-index: 99990; /* Keeps it on top, but right below the custom cursor and navbar */
  /* 1) Adjust thickness of the frame (tweak via --site-frame-margin) */
  margin: var(--site-frame-margin);

  /* 2) Adjust inner corner roundness (tweak via --site-frame-radius) */
  border-radius: var(--site-frame-radius);

  /* 3) Adjust frame color (change the color value below) */
  box-shadow: 0 0 0 100vmax #E2DDFF;
}
@media (max-width: 920px) {
  .site-frame-overlay {
    /* Mobile-friendly overrides — use --site-frame-margin-mobile / --site-frame-radius-mobile */
    margin: var(--site-frame-margin-mobile);
    border-radius: var(--site-frame-radius-mobile);
  }
}

/* ===== Floating Nav Island ===== */
.nav-island {
  /* Nav top combines a base offset with the outer frame margin so you can
     control the frame independently and nudge the nav via --nav-island-top-base */
  position: fixed;
  top: calc(var(--nav-island-top-base) + var(--site-frame-margin));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: rgba(15, 15, 17, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 60px -30px rgba(0,0,0,0.6);
  max-width: calc(100vw - 28px);
}
/* Desktop: remove border/outline for the nav island (adjust breakpoint if needed) */
@media (min-width: 921px) {
  .nav-island {
    border: none; /* remove the solid border on desktop */
    /* remove the subtle inset highlight while keeping drop shadow */
    box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
  }
}

/* ===== Sticky Note Interactions ===== */
.note-area {
  flex: 1;
  min-height: 240px;
  position: relative;
  cursor: crosshair;
  margin-top: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.note-area:hover {
  background: rgba(255,255,255,0.02);
}
.note-cursor-hint {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  font-size: 13px;
  color: var(--ink-3);
  background: var(--bg);
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  opacity: 0;
  transition: opacity 0.2s;
  /* Start hidden, follows mouse */
}
.sticky-note {
  position: absolute;
  width: 240px;
  min-height: 240px;
  padding: 16px 16px 24px;
  box-shadow: 0 10px 24px -5px rgba(0,0,0,0.3);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -50%) rotate(var(--note-rot, 0deg));
  z-index: 10;
  animation: noteDropIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  cursor: default;
}
@keyframes noteDropIn {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 90px)) rotate(var(--note-rot, 0deg)) scale(0.88);
  }
  74% {
    opacity: 1;
    transform: translate(-50%, calc(-50% + 7px)) rotate(var(--note-rot, 0deg)) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--note-rot, 0deg)) scale(1);
  }
}
/* =============================================
   STICKY NOTE COLORS — edit these 3 values
   ============================================= */
.sticky-note[data-color="purple"] {
  background-color: #E2DDFF; /* note 1 — light purple */
  color: #111;
}
.sticky-note[data-color="yellow"] {
  background-color: #FFF59D; /* note 2 — vibrant yellow */
  color: #111;
}
.sticky-note[data-color="teal"] {
  background-color: #BBF3F8; /* note 3 — teal blue */
  color: #111;
}
/* ============================================= */
.sticky-header {
  font-size: 11px;
  opacity: 0.6;
  margin-bottom: 12px;
  font-family: inherit;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}
.sticky-content {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #111;
  line-height: 1.5;
  outline: none;
  padding: 0;
  margin: 0;
}
.sticky-content::placeholder {
  color: rgba(0,0,0,0.3);
}
.clear-notes-btn {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s var(--easing);
  margin-left: 4px;
  white-space: nowrap;
}
.clear-notes-btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.nav-brand {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 4px;
}
.nav-brand img { width: 100%; height: 100%; object-fit: cover; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  display: inline-flex; align-items: center;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color var(--t-fast) var(--easing), background var(--t-fast) var(--easing);
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.nav-links a.is-active { color: #000; background: var(--ink); }

/* Hamburger — hidden on desktop */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--t-fast) var(--easing);
}
.nav-burger:hover { background: rgba(255,255,255,0.08); }
.nav-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s var(--easing), opacity 0.22s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Fullscreen nav overlay */
.nav-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--easing);
}
.nav-fullscreen.is-open {
  opacity: 1;
  pointer-events: auto;
}
.nav-fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast) var(--easing);
}
.nav-fullscreen-close:hover { background: rgba(255, 255, 255, 0.12); }
.nav-fullscreen-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.nav-fullscreen-links a {
  font-size: clamp(32px, 9vw, 52px);
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  color: var(--ink-2);
  padding: 8px 28px;
  border-radius: var(--r-md);
  transition: color var(--t-fast) var(--easing), background var(--t-fast) var(--easing);
  text-align: center;
  line-height: 1.1;
}
.nav-fullscreen-links a:hover,
.nav-fullscreen-links a.is-active { color: var(--ink); background: rgba(255,255,255,0.05); }

@media (max-width: 640px) {
  /* Move island to top-right, show burger, hide desktop links */
  .nav-island { left: auto; right: 16px; transform: none; padding: 6px; }
  .nav-links { display: none; }
  .clear-notes-btn { display: none !important; }
  .nav-burger { display: flex; }

  /* Smaller sticky notes in hero on mobile */
  .sticky-note { width: 155px; min-height: 145px; padding: 10px 10px 14px; font-size: 11.5px; }
  .sticky-content { font-size: 11.5px; }

  /* Hide note areas in all sections except the hero */
  .col-left .note-area { display: none; }
}

/* ===== Section frame ===== */
main { position: relative; z-index: 1; }

.section {
  padding: clamp(80px, 10vw, 140px) var(--pad);
  position: relative;
}
.section + .section { border-top: 1px solid var(--line); }

/* 2-col layout: title (left) + content (right) */
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: var(--col-gap);
  align-items: start;
}
.col-left { position: sticky; top: 110px; }
.col-left .section-index {
  display: inline-block;
  font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.col-left .section-title {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.0;
  margin: 0 0 18px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.col-left .section-sub {
  color: var(--ink-2); font-size: 16px; margin: 0;
  max-width: 36ch;
}

@media (max-width: 920px) {
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .col-left { position: static; }
}

/* ===== Hero (2-col, edge-to-page-margin) ===== */
.hero { 
  /* hero top padding. Reduced by 30px to tighten spacing.
     To adjust, change the `30px` value below or remove the `- 30px` to restore original spacing. */
  padding-top: calc(clamp(120px, 14vw, 180px) - 80px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: clamp(120px, 14vw, 180px) - 30px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--col-gap);
  align-items: start;
}
.hero-left { display: flex; flex-direction: column; }
.profile {
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  margin-bottom: 28px;
}
.profile img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 32px;
  align-self: flex-start;
}
.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6ee7a3;
  box-shadow: 0 0 0 4px rgba(110, 231, 163, 0.18);
  animation: pulse 2.4s var(--easing) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(38px, 5.6vw, 80px);
  line-height: 1.02;
  margin: 0;
  text-wrap: balance; /* already covered by h1 above; explicit for clarity */
}
.hero-title .line { display: block; }
.hero-title .muted { color: var(--ink-3); }

.hero-right {
  position: relative;
  min-height: 460px;
  align-self: stretch;
  overflow: visible;
  border-radius: var(--r-md);
}
/* Looping video background behind sticky notes */
.hero-bg-video {
  /* Temporarily hide the hero mp4 video. Remove or set to `display: block` to re-enable. */
  display: none !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: auto;
  object-fit: contain;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}
/* Note canvas sits on top of video */
.hero-right .note-area {
  position: absolute;
  inset: 0;
  min-height: 0;
  margin-top: 0;
  flex: unset;
  z-index: 1;
}
.meta-stack {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.meta-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  position: relative; /* needed for countries tooltip */
}
.meta-item:last-child { border-bottom: 0; }
.meta-label {
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-3);
  flex-shrink: 0;
}
.meta-value { font-size: 15px; color: var(--ink); text-align: right; }

@media (max-width: 640px) {
  .meta-item { align-items: flex-start; }
  .meta-label { width: 130px; flex-shrink: 0; }
  .meta-value { text-align: left; flex: 1; }
}

/* Countries visited tooltip */
.countries-trigger {
  position: relative;
  display: inline-block;
  cursor: default;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.28);
}
.countries-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 340px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 14px 16px 16px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 200ms var(--easing), transform 200ms var(--easing);
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.6);
}
.countries-trigger:hover .countries-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.tooltip-header {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.tooltip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-top: 2px;
}
.tooltip-entry { display: flex; flex-direction: column; gap: 2px; }
.tooltip-entry strong { font-size: 12px; font-weight: 600; color: var(--ink); }
.tooltip-entry span { font-size: 11px; color: var(--ink-3); line-height: 1.3; }

/* Profile identity tags */
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.profile-tag {
  font-size: 13px;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.03);
  transition: border-color var(--t-fast) var(--easing), color var(--t-fast) var(--easing);
}
.profile-tag:hover { border-color: rgba(255,255,255,0.3); color: var(--ink); }

.about-body {
  display: flex; flex-direction: column; gap: 16px;
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.7;
}
.about-body strong { color: var(--ink); font-weight: 500; }
.muted { color: var(--ink-3); }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-right { padding-top: 0; }
}

/* ===== Ticker ===== */
.ticker {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  overflow: hidden;
  background: rgba(255,255,255,0.015);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: scroll-x 40s linear infinite;
}
.ticker-row {
  display: flex; align-items: center; gap: 36px;
  padding-right: 36px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.ticker-row span:nth-child(even) { 
  color: var(--ink-4); 
  font-size: 0.25em; /* Star icons at 25% size */
  vertical-align: middle; 
}
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ===== Timeline ===== */
.timeline {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.tl-item {
  display: grid;
  grid-template-columns: 180px 56px 1fr;
  gap: clamp(16px, 2vw, 32px);
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 0.9s var(--easing), transform 0.9s var(--easing), background var(--t-med) var(--easing);
}
.tl-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.tl-item:hover { background: rgba(255,255,255,0.02); }
.tl-date { color: var(--ink-3); font-size: 14px; padding-top: 14px; }
.tl-logo {
  width: 56px; height: 56px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.tl-logo img { width: 100%; height: 100%; object-fit: cover; }
.tl-body { padding-top: 4px; }
.tl-body h3 {
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
  color: var(--ink);
}
.tl-company {
  font-size: clamp(15px, 1.4vw, 16px);
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.tl-tag {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-3);
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
}
.tl-body p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.65; max-width: 70ch; }

.tl-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  opacity: 0.6;
}
.tl-divider-line {
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}
.tl-divider-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Timeline expand / collapse */
.tl-expand-row,
.tl-more-row { list-style: none; }
.tl-expand-row {
  border-bottom: 1px solid var(--line);
}
.tl-expand-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  gap: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-2);
  transition: color var(--t-fast) var(--easing);
}
.tl-expand-btn:hover { color: var(--ink); }
.tl-expand-icon {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.35s var(--easing);
  color: var(--ink-3);
}
.tl-expand-btn:hover .tl-expand-icon { color: var(--ink); }
.tl-expand-btn[aria-expanded="true"] .tl-expand-icon { transform: rotate(45deg); }
.tl-more-inner {
  height: 0;
  overflow: hidden;
  transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 720px) {
  .tl-item { grid-template-columns: 48px 1fr; gap: 14px; padding: 24px 0; }
  .tl-logo { width: 48px; height: 48px; }
  .tl-date { grid-column: 1 / -1; padding-top: 0; }
  .tl-company { margin-bottom: 6px; }
}

.chip-short { display: none; }

/* ===== Filters ===== */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--ink-2);
  transition: all var(--t-fast) var(--easing);
}
.chip:hover { color: var(--ink); border-color: rgba(255,255,255,0.32); }
.chip.is-active { background: var(--ink); color: #000; border-color: var(--ink); }
.chip-count { font-size: 14px; color: var(--ink-3); padding-left: 4px; }
.chip.is-active .chip-count { color: rgba(0,0,0,0.5); }

/* ===== Case list ===== */
.case-list {
  margin-top: 24px;
}
.case-row {
  border-bottom: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.6s var(--easing), transform 0.8s var(--easing), background var(--t-med) var(--easing);
}
.case-row.is-entered {
  opacity: 1;
  transform: translateY(0);
}
.case-row.is-hidden { display: none; }
.case-row:hover { background: var(--bg-2); }

.case-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto 40px;
  align-items: center;
  gap: 28px;
  /* Horizontal padding: small 2px gap each side so images/text don't touch the edge.
     Change this value to increase/decrease the side spacing (e.g. 8px). */
  padding: 36px 4px;
  text-align: left;
}
.case-num { font-size: 14px; color: var(--ink-3); letter-spacing: 0.06em; }
.case-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.case-client {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.case-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
}
.case-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag {
  font-size: 14px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.05);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.case-year { font-size: 14px; color: var(--ink-3); white-space: nowrap; }

.case-arrow {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 18px;
  color: var(--ink-2);
  transition: transform var(--t-med) var(--easing),
              background var(--t-fast) var(--easing),
              color var(--t-fast) var(--easing),
              border-color var(--t-fast) var(--easing);
}
.case-toggle:hover .case-arrow { color: var(--ink); border-color: rgba(255,255,255,0.32); }
.case-row.is-open .case-arrow {
  transform: rotate(45deg);
  background: var(--ink);
  color: #000;
  border-color: var(--ink);
}

/* Click-locked accordion. */
.case-detail {
  height: 0;
  overflow: hidden;
  transition: height var(--t-med) var(--easing);
}
/* .case-row.is-open .case-detail height is set by JS */

.case-detail-inner {
  display: flex; flex-direction: column;
  gap: 36px;
  /* Add a small right-side padding so images/text do not touch the edge when case is opened.
     Right-side value uses --case-detail_side_gap for easy tweaking. */
  padding: 12px var(--case-detail-side-gap) 56px 84px;
}
.case-copy {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 80ch;
}
.case-copy p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.case-copy p strong { color: var(--ink); font-weight: 500; }
/* Simple inline link inside case copy */
.case-copy a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.2);
  transition: color var(--t-fast) var(--easing), text-decoration-color var(--t-fast) var(--easing);
}
.case-copy a:hover {
  color: var(--ink);
  text-decoration-color: rgba(255,255,255,0.6);
}
/* All-caps section label inside a case study (e.g. PROBLEM, MY ROLE) */
.case-section-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-top: 8px;
  margin-bottom: 0;
}
/* Tags inside case copy */
.case-copy .profile-tags { margin-top: 4px; }
.case-context {
  font-size: 14px !important;
  color: var(--ink-3) !important;
  letter-spacing: 0.01em;
  margin-bottom: 6px !important;
}
/* Slideshow — one big image, cycles 3 s each when case is open */
.case-images {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  /* allow a tiny extra height (use --case-images-extra to tweak, e.g. 4px) */
  box-sizing: content-box;
  padding-bottom: var(--case-images-extra);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
}
.case-images figure {
  position: absolute;
  inset: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 600ms var(--easing);
}
.case-images figure.is-current { opacity: 1; }
.case-images img { width: 100%; height: 100%; object-fit: cover; }

/* Slide indicator dots */
.case-slide-dots {
  position: absolute;
  /* Account for any extra height added via --case-images-extra so dots stay
     visually anchored to the image bottom even when aspect ratio or padding changes */
  bottom: calc(12px + var(--case-images-extra));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.case-slide-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 300ms var(--easing), transform 300ms var(--easing);
}
.case-slide-dot.is-current {
  background: #fff;
  transform: scale(1.3);
}

@media (max-width: 720px) {
  .case-toggle {
    grid-template-columns: 32px minmax(0, 1fr) 38px;
    gap: 14px;
    /* keep the same small side spacing on mobile (2px) so content doesn't touch edges */
    padding: 28px 2px;
  }
  .case-tags, .case-year { display: none; }
  /* Use the same side gap variable on mobile so opened details don't feel cropped
     — left and right will be balanced using the same value. */
  .case-detail-inner { padding: 8px var(--case-detail-side-gap) 40px var(--case-detail-side-gap); gap: 24px; }
  /* case-images is already a single-image slideshow on all sizes */
}

/* ===== View toggle (List / Card) ===== */
.case-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.view-toggle {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-self: flex-start;
}
.view-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--t-fast) var(--easing),
              border-color var(--t-fast) var(--easing),
              background var(--t-fast) var(--easing);
}
.view-btn.is-active {
  background: var(--bg-2);
  color: var(--ink);
  border-color: var(--line-strong);
}
.view-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* ===== Card view ===== */
/* Default: thumb hidden in list mode */
.case-card-thumb {
  display: none;
  width: 100%;
  /* aspect controlled by --case-card-aspect (default 4:3). Change in :root to tweak. */
  aspect-ratio: var(--case-card-aspect);
  /* allow padding to increase outer height so we can add a few pixels easily */
  box-sizing: content-box;
  padding-bottom: var(--case-card-thumb-extra);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-2);
}
.case-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* prevent white flash on hover/scale; adjust via --case-card-thumb-transition */
  background: var(--bg-2);
  transition: transform var(--case-card-thumb-transition) var(--easing);
}
/* toggle-meta is a grid passthrough in list mode */
.case-toggle-meta { display: contents; }

/* Card view overrides */
.case-list.is-card-view {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  border-top: none;
}
.case-list.is-card-view .case-row {
  border-bottom: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
  transition: border-color var(--t-med) var(--easing), background var(--t-med) var(--easing);
}
.case-list.is-card-view .case-row:hover { background: #18181a; border-color: var(--line-strong); }
.case-list.is-card-view .case-row.is-hidden { display: none; }
.case-list.is-card-view .case-card-thumb { display: block; }
.case-list.is-card-view .case-toggle:hover .case-card-thumb img { transform: scale(1.04); }
.case-list.is-card-view .case-toggle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  gap: 0;
}
.case-list.is-card-view .case-toggle-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px 18px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
.case-list.is-card-view .case-num,
.case-list.is-card-view .case-year { display: none; }
.case-list.is-card-view .case-main { min-width: 0; width: 100%; padding-right: 44px; }
.case-list.is-card-view .case-title { font-size: clamp(17px, 1.8vw, 22px); }
.case-list.is-card-view .case-tags { justify-content: flex-start; }
.case-list.is-card-view .case-arrow {
  position: absolute;
  top: 14px;
  right: 16px;
}
.case-list.is-card-view .case-detail-inner { padding: 0 16px 28px; }

@media (max-width: 800px) {
  .case-list.is-card-view { grid-template-columns: 1fr; }
}

/* ===== Case modal (card view popup) ===== */
body.modal-open { overflow: hidden; }

.case-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms var(--easing);
}
.case-modal.is-open {
  opacity: 1;
  pointer-events: all;
}
.case-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
}
.case-modal-panel {
  position: relative;
  width: 100%;
  max-width: 860px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.9);
  transform: translateY(22px) scale(0.97);
  transition: transform 260ms var(--easing);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.case-modal.is-open .case-modal-panel {
  transform: translateY(0) scale(1);
}
.case-modal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 14px 14px 0;
  background: var(--bg-2);
}
.case-modal-close {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color var(--t-fast) var(--easing),
              border-color var(--t-fast) var(--easing),
              background var(--t-fast) var(--easing);
}
.case-modal-close:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.08);
  border-color: var(--line-strong);
}
.case-modal-header {
  padding: 12px 32px 24px;
}
.case-modal-client {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
}
.case-modal-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 16px;
}
.case-modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.case-modal-body {
  padding: 0 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.case-modal-body .case-detail-inner { padding: 0; gap: 24px; }
.case-modal-body .case-copy { max-width: 100%; }
.case-modal-body .case-copy p { font-size: 15px; }

@media (max-width: 600px) {
  .case-modal-header { padding: 8px 20px 20px; }
  .case-modal-body { padding: 0 20px 28px; }
  .case-modal-panel { max-height: 92vh; }
}

/* ===== Side projects (3 x 2 grid) ===== */
.side-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.side-card {
  background: #000;
  padding: 30px 26px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 220px;
  transition: background var(--t-med) var(--easing);
}
.side-card:hover { background: var(--bg-2); }
.side-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.side-card h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}
.side-card p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.side-link {
  margin-top: auto;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  align-self: flex-start;
  transition: border-color var(--t-fast) var(--easing);
}
.side-link:hover { border-color: var(--ink); }

@media (max-width: 920px) {
  .side-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .side-grid { grid-template-columns: 1fr; }
}

/* ===== Quote (full-width centered band) ===== */
.quote-section {
  padding: clamp(100px, 14vw, 180px) var(--pad);
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.quote-floral {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 48px;
  animation: floralBreath 5s ease-in-out infinite;
}
@keyframes floralBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); /* Adjust 1.15 to a larger/smaller number for more/less movement */ }
}
.pull-quote { margin: 0 auto 28px; max-width: 1100px; }
.pull-quote blockquote {
  font-size: clamp(34px, 5.4vw, 84px);
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}
.quote-mark {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4em;
  color: var(--ink-4);
  margin-right: 8px;
  line-height: 0;
  vertical-align: -0.2em;
}
.pull-quote figcaption { margin-top: 32px; color: var(--ink-2); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.quote-note {
  max-width: 56ch;
  margin: 24px auto 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* ===== Contact (centered) ===== */
.contact {
  text-align: center;
  padding-bottom: clamp(60px, 8vw, 100px);
}
.contact .section-index { color: var(--ink-3); }
.contact .section-head {
  margin: 0 auto 32px;
  max-width: 1100px;
}
.contact-floral {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 32px;
  animation: floralBreath 5s ease-in-out infinite;
}
.contact .section-title.big {
  font-size: clamp(44px, 7vw, 104px);
  line-height: 1.0;
  margin: 8px 0 0;
}
.contact-lead {
  max-width: 56ch;
  margin: 0 auto 40px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-3);
}
.contact-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  margin-bottom: 80px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 16px 22px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform var(--t-fast) var(--easing),
              background var(--t-fast) var(--easing),
              color var(--t-fast) var(--easing),
              border-color var(--t-fast) var(--easing);
  position: relative;
  overflow: hidden;
}
.btn-primary { background: var(--ink); color: #000; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.28); }
.btn-icon { display: inline-flex; }

.btn-label, .btn-feedback {
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform var(--t-med) var(--easing), opacity var(--t-med) var(--easing);
}
.btn-feedback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transform: translateY(110%);
  opacity: 0;
}
.btn.is-copied .btn-label { transform: translateY(-110%); opacity: 0; }
.btn.is-copied .btn-feedback { transform: translateY(0); opacity: 1; }

/* ===== Footer ===== */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-3);
  text-align: left;
}
.foot-l { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dot-sep { color: var(--ink-4); }
.foot-r a { color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.foot-r a:hover { color: var(--ink); border-color: var(--ink); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--easing), transform 700ms var(--easing); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ──────────────────────────────────────────
   Work Wall
─────────────────────────────────────────── */

/* Outer div provides scroll room; inner sticky div pins the canvas */
.work-wall-outer {
  height: 620vh;
}
.work-wall-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.work-wall {
  background: #000000;
  height: 100%;
  padding: clamp(20px, 3vh, 36px) var(--pad);
  border-top: none;
}
.work-wall-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 18px);
  align-items: start;
}
.work-wall-col {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vw, 18px);
  will-change: transform;
}
.ww-page {
  margin: 0;
  width: 100%;
  /* aspect-ratio replaces the fixed height so cards scale with column width
     and images are never cropped sideways — change 3/4 to e.g. 2/3 or 4/5 */
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
  background: #1b1b1e;
  border-radius: 8px;
  overflow: hidden;

  /* --- WORK WALL HOVER EFFECT --- */
  /* Adjust '0.6' to change how dark they are (0.1 is very dark, 1 is normal). Change to '1' to remove the effect entirely. */
  opacity: 0.5;
  /* Adjust '0.4s' to make the smooth transition faster or slower */
  transition: opacity 0.4s ease-in-out;
}
.ww-page:hover {
  opacity: 1; /* Lights back up to normal when you hover */
}
.ww-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ──────────────────────────────────────────
   Mobile Work Wall — scroll-hijack horizontal
─────────────────────────────────────────── */
.wwm-outer {
  display: none;
}
.wwm-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.work-wall-mobile {
  display: none;
  width: 100%;
  height: 100%;
  background: #080809;
  align-items: center;
}
.work-wall-mobile-track {
  display: flex;
  gap: 12px;
  padding: 0 var(--pad);
  will-change: transform;
}
.wwm-card {
  margin: 0;
  flex-shrink: 0;
  width: 78vw;
  border-radius: 8px;
  overflow: hidden;
  background: #1b1b1e;
}
.wwm-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* ──────────────────────────────────────────
   Bottom Reveal Layer (overlaps Work Wall)
─────────────────────────────────────────── */
.bottom-reveal-layer {
  position: relative;
  z-index: 10;
  margin-top: -100vh;
  background: var(--bg);
  box-shadow: 0 -20px 40px rgba(0,0,0,0.8);
}

@media (max-width: 768px) {
  /* Switch to horizontal mobile wall on tablets and below */
  .work-wall-outer { display: none; }
  .wwm-outer { display: block; height: 550vh; }
  .work-wall-mobile { display: flex; }
  .bottom-reveal-layer { margin-top: 0; box-shadow: none; }

  /* Stack contact buttons vertically on mobile: one per row */
  .contact-actions { gap: 12px; flex-direction: column; align-items: stretch; }
  .contact-actions .btn {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0; /* allow flex to shrink correctly */
    padding-left: 14px;
    padding-right: 14px;
  }
  .contact-actions .btn .btn-label { display: inline-flex; width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
  /* Filters: single scrollable row with toggle on the right */
  .case-controls { flex-wrap: nowrap !important; align-items: stretch; max-width: 100%; }
  .filters { 
    flex: 1; 
    min-width: 0; 
    margin-bottom: 0; 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
    padding-bottom: 2px;
    padding-right: 28px; /* space for the fade */
    -webkit-mask-image: linear-gradient(to right, black 82%, transparent 100%);
    mask-image: linear-gradient(to right, black 82%, transparent 100%);
    align-items: center;
  }
  .filters::-webkit-scrollbar { display: none; }
  .chip-full { display: none; }
  .chip-short { display: inline; }
  .chip-count { display: none !important; }
  
  .view-toggle { align-self: stretch; height: auto; }
  .view-btn { height: auto; width: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .ticker-track { animation: none; }
}
