/* ----- Meaghan Long — Design System v1 (March 2026) ----- */
:root {
  /* Layout: base-4 spacing scale + page padding */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --space-80: 80px;
  --space-96: 96px;
  --space-100: 100px;
  --space-120: 120px;
  --space-128: 128px;
  --space-160: 160px;
  --space-200: 200px;
  --page-padding-x: var(--space-200);

  /* Colour — Violet family */
  --color-deep-night:     #241828;
  --color-ultra-violet:   #6248A0;
  --color-deep-violet:    #7A60A8;
  --color-violet:         #A882CC;
  --color-lavender:       #D2BCEA;

  /* Colour — Warm family */
  --color-peach-light:    #F8CEB8;
  --color-peach:          #F0906E;
  --color-honey:          #F0BE58;
  --color-gold:           #D8944A;

  /* Colour — Sky family */
  --color-sky-light:      #D8EAF4;
  --color-sky:            #90BDD8;

  /* Colour — Neutral family */
  --color-white:          #FFFFFF;
  --color-off-white:      #FDFCFA;
  --color-cream:          #FAF5EE;
  --color-warm-white:     #FDF9F4;
  --color-parchment:      #F5EDE0;
  --color-text-dark:      #2C1F14;
  --color-text-mid:       #7A6255;
  --color-text-light:     #B09080;

  /* Colour — Grey scale */
  --color-grey-50:        #FAFAFA;
  --color-grey-100:       #F4F4F4;
  --color-grey-200:       #E8E8E8;
  --color-grey-300:       #D4D4D4;
  --color-grey-400:       #ADADAD;
  --color-grey-500:       #858585;
  --color-grey-600:       #636363;
  --color-grey-700:       #454545;
  --color-grey-800:       #2E2E2E;
  --color-grey-900:       #1A1A1A;

  /* Colour — Semantic */
  --color-negative-base:   #A54747;
  --color-negative-light:  #DFC3C3;
  --color-negative-bg:     #F5EFEF;
  --color-positive-base:   #48997B;
  --color-positive-light:  #C3DFD5;
  --color-positive-bg:     #EFF5F3;
  --color-warning-base:    #AE7432;
  --color-warning-light:   #E6D2BC;
  --color-warning-bg:      #F7F3EE;
  --color-info-base:      #4B6EA0;
  --color-info-light:     #C4CFDE;
  --color-info-bg:        #F0F2F5;

  /* Gradients */
  --gradient-full-arc:    linear-gradient(135deg, #241828, #6248A0, #A882CC, #D2BCEA, #F0CE7A, #F0906E, #D8944A);
  --gradient-last-light:  linear-gradient(135deg, #F8CEB8, #F0906E, #D2BCEA, #A882CC);
  --gradient-first-light: linear-gradient(135deg, #FAF5EE, #F0CE7A, #F0BE58, #D8944A);
  --gradient-into-dusk:   linear-gradient(135deg, #FAF5EE, #D2BCEA, #7A60A8, #6248A0);
  --gradient-dusk:        linear-gradient(135deg, #F0BE58, #D2BCEA, #7A60A8);

  /* Typography */
  --font-display:   'EB Garamond', Georgia, serif;
  --font-body:      'Jost', sans-serif;
  --font-accent:    'Caveat', cursive;

  /* Type scale (base 18px) */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:    1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;
  --text-6xl:   3.75rem;

  /* Letter spacing */
  --tracking-body:   0.01em;
  --tracking-label:  0.22em;
  --tracking-wide:   0.3em;

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Shadows */
  --shadow-m: 0 var(--space-4) 6px rgba(44, 31, 20, 0.07), 0 2px var(--space-4) rgba(44, 31, 20, 0.06);

  /* Legacy aliases (blob, cursor, and existing refs) — point to new palette */
  --primary-100:   var(--color-lavender);
  --primary-400:   var(--color-violet);
  --primary-500:   var(--color-deep-violet);
  --primary-600:   var(--color-ultra-violet);
  --grey-50:       var(--color-cream);
  --grey-100:      var(--color-parchment);
  --grey-200:      var(--color-grey-200);
  --grey-300:      var(--color-grey-300);
  --grey-400:      var(--color-grey-400);
  --grey-700:      var(--color-text-mid);
  --grey-900:      var(--color-text-dark);
  --coral-50:      var(--color-peach-light);
  --indigo-50:     var(--color-lavender);
  --teal-50:       var(--color-sky-light);
  --teal-100:      var(--color-sky);
  --accent-red:    var(--color-negative-base);
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--color-white);
  color: var(--color-text-dark);
  overflow-x: hidden;
  overflow-y: hidden;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Bold in body text: ultra violet throughout the site */
strong,
b {
  color: var(--color-ultra-violet);
}

/* Prevent images from being dragged or selected (save protection) */
img,
svg {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: auto;
}

/* ----- Custom cursor: oval with text/emoji only on specific hovers ----- */
/* Hide system cursor only where we show the custom oval (so default cursor shows everywhere else) */
.about-photo-stack,
.about-photo-stack-wrap,
.about-cards-track,
.about-card,
.js-lightbox,
.hero-bg-blob-trigger {
  cursor: none;
}
.about-photo-stack a,
.about-cards-track a {
  cursor: none;
}
.project-card-media-link {
  cursor: pointer;
}
/* Default: no visible cursor (only oval with text/emoji on hover) */
.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}
.custom-cursor .custom-cursor-text {
  display: none;
  font-size: 0;
}
.custom-cursor .custom-cursor-zoom-icon {
  display: none;
  width: 16px;
  height: 16px;
  color: #fff;
}
.custom-cursor.cursor-zoom {
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 50%;
  background: var(--color-deep-violet);
  mix-blend-mode: normal;
  color: var(--color-white);
}
.custom-cursor.cursor-zoom .custom-cursor-zoom-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}
.custom-cursor.cursor-card {
  width: max-content;
  height: 32px;
  padding: 0 14px;
  margin: 0;
  border-radius: 24px;
  background: var(--color-deep-violet);
  mix-blend-mode: normal;
}
.custom-cursor.cursor-card .custom-cursor-text {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
  white-space: nowrap;
}

/* ----- Links with line + arrow (reusable) ----- */
.link-line-arrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  text-decoration: none;
}

.link-line-arrow-text {
  position: relative;
  display: inline-block;
}

.link-line-arrow-text::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  background: currentColor;
  width: 0;
  transition: width 0.25s ease;
}

.link-line-arrow:hover .link-line-arrow-text::after {
  width: 100%;
}

.link-line-arrow .link-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.link-line-arrow .link-arrow.ph {
  font-size: 0.9em;
  vertical-align: 0.05em;
}

.link-line-arrow:hover .link-arrow {
  transform: translate(3px, -3px);
}

/* ----- Nav (from header-snippet) ----- */
/* Only the top-level site header nav; case study sub-nav is in .case-study-layout */
body > nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-24) var(--page-padding-x);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}

body > nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Home only: nav is fully clear until scroll */
body.page-home > nav {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.page-home > nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-dark);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: var(--space-24);
  list-style: none;
}
.nav-links a {
  position: relative;
  display: inline-block;
  width: fit-content;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 2px;
  transition: color var(--transition-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-violet);
  transition: width var(--transition-base);
}
.nav-links a:hover    { color: var(--color-violet); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active   { color: var(--color-deep-violet); font-weight: 500; }
.nav-links a.active::after { width: 100%; background: var(--color-deep-violet); }

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-40);
  height: var(--space-40);
  border-radius: var(--radius-full);
  color: var(--color-text-dark);
  text-decoration: none;
  transition: color var(--transition-base), background var(--transition-base), transform var(--transition-base);
  transform-origin: center;
}
.nav-icon .ph {
  font-size: 1.25rem;
}
.nav-icon:hover {
  color: var(--color-deep-night);
  background: var(--color-lavender);
  transform: scale(1.15);
}

/* ----- Hero wrapper ----- */
.hero {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: clamp(var(--space-48), 6vh, var(--space-80));
  position: relative;
  overflow: visible; /* let blob extend behind footer */
}

/* ----- Blobs (from blob-snippet / header-snippet) ----- */
/* Main blob: large, light, transparent — lavender (design system) */
.hero-bg-blob {
  position: absolute;
  top: -240px; right: -200px;
  width: 1100px; height: 1100px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 40%,
    #F5EFFA 0%,
    rgba(210, 188, 234, 0.45) 45%,
    transparent 75%
  );
  opacity: 0.6;
  pointer-events: none;
  will-change: transform;
  animation: blobBreathe 7s ease-in-out infinite;
}

/* Hover overlay: light peach and gold when cursor is near */
.hero-bg-blob-warm {
  position: absolute;
  top: -240px; right: -200px;
  width: 1100px; height: 1100px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 40%,
    rgba(248, 206, 184, 0.5) 0%,
    rgba(240, 144, 110, 0.35) 40%,
    rgba(240, 190, 88, 0.25) 60%,
    transparent 75%
  );
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  animation: blobBreathe 7s ease-in-out infinite;
  transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-bg-blob-warm.warm { opacity: 0.65; }

/* Clickable overlay to trigger blob burst (same position as main blob) */
.hero-bg-blob-trigger {
  position: absolute;
  top: -240px; right: -200px;
  width: 1100px; height: 1100px;
  cursor: pointer;
  z-index: 1;
}

/* Container for plop/float circles (fixed so dot left/top match viewport) */
.hero-blob-burst-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Burst dots: mostly stars, a few light circles */
.hero-blob-burst-dot {
  position: absolute;
  will-change: transform, opacity;
  pointer-events: none;
}
.hero-blob-burst-dot svg {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-blob-burst-circle {
  border-radius: 50%;
}

/* Secondary blob: larger, fills more of bottom-left */
.hero-bg-blob2 {
  position: absolute;
  bottom: -120px; left: -180px;
  width: 780px; height: 780px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 60% 60%,
    var(--coral-50) 0%,
    transparent 70%
  );
  opacity: 0.5;
  pointer-events: none;
  will-change: transform;
  animation: blobBreathe2 9s ease-in-out infinite;
}

@keyframes blobBreathe {
  0%,  100% { transform: translate(  0px,   0px) scale(1.00); }
  33%       { transform: translate(-18px,  12px) scale(1.04); }
  66%       { transform: translate( 10px, -16px) scale(0.97); }
}
@keyframes blobBreathe2 {
  0%,  100% { transform: translate( 0px,   0px) scale(1.00); }
  40%       { transform: translate(14px, -10px) scale(1.05); }
  70%       { transform: translate(-8px,  14px) scale(0.96); }
}

/* ----- Hero content ----- */
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(var(--space-24), 4vh, var(--space-80)) var(--space-24) clamp(var(--space-24), 4vh, var(--space-80)) var(--page-padding-x);
  position: relative;
  z-index: 2;
  min-height: 0;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 clamp(var(--space-8), 1.5vh, var(--space-16));
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4.5vw, var(--text-6xl));
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: var(--tracking-body);
  color: var(--color-text-dark);
  margin: 0 0 clamp(var(--space-12), 2vh, var(--space-32));
}
.hero-headline em {
  font-style: italic;
  color: var(--color-violet);
}

.hero-sub {
  font-size: clamp(var(--text-sm), 1.8vw, var(--text-base));
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-dark);
  letter-spacing: var(--tracking-body);
  max-width: 600px;
  margin-bottom: clamp(var(--space-16), 2.5vh, var(--space-48));
}

.hero-actions {
  display: flex;
  gap: var(--space-12);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-32);
}

.btn-primary-hero {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  background: var(--color-honey);
  color: var(--color-deep-night);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: box-shadow var(--transition-base);
}
.btn-primary-hero:hover {
  box-shadow: 0 0 0 4px rgba(240, 190, 88, 0.25), 0 6px 24px rgba(240, 190, 88, 0.45);
}

.btn-secondary-hero {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  background: var(--color-white);
  color: var(--color-violet);
  padding: 13px 27px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-violet);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: none;
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.btn-secondary-hero:hover {
  background: var(--color-lavender);
  color: var(--color-deep-night);
  border-color: var(--color-lavender);
  box-shadow: 0 2px 12px rgba(210, 188, 234, 0.25);
}

/* ----- Entrance animations ----- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate { opacity: 0; }
.animate.in { animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) forwards; }
.delay-1 { animation-delay: 0.10s; }
.delay-2 { animation-delay: 0.22s; }
.delay-3 { animation-delay: 0.34s; }
.delay-4 { animation-delay: 0.46s; }

/* ----- Footer (same on all pages) ----- */
.site-footer,
footer.site-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(var(--space-12), 1.5vh, var(--space-24)) var(--page-padding-x);
  color: var(--color-text-light);
  font-size: var(--text-sm);
  background: none !important;
  background-color: transparent !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.site-footer .footer-left,
.site-footer .footer-center,
.site-footer .footer-right { margin: 0; }

.footer-left {
  justify-self: start;
}
.footer-center {
  justify-self: center;
}
.footer-right {
  justify-self: end;
}

.footer-ai-wrap {
  position: relative;
}

.footer-ai-trigger {
  font: inherit;
  font-size: var(--text-sm);
  color: var(--color-violet);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.footer-ai-trigger::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  width: 0;
  transition: width 0.2s ease;
}

.footer-ai-trigger:hover {
  color: var(--color-deep-violet);
}

.footer-ai-trigger:hover::after {
  width: 100%;
}

/* Footer AI popup – small container above the text, no overlay */
@keyframes footer-ai-popup-open {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(10px);
  }
  65% {
    transform: scale(1.04) translateY(-3px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes footer-ai-popup-close {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
  }
}

.footer-ai-popup {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.footer-ai-popup[hidden] {
  display: none;
}

.footer-ai-popup[aria-hidden="false"],
.footer-ai-popup.is-open {
  opacity: 1;
  visibility: visible;
}

.footer-ai-popup-panel {
  position: relative;
  width: 280px;
  max-width: 90vw;
  padding: 1rem 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-grey-200);
  box-shadow: var(--shadow-m);
}

.footer-ai-popup.is-open .footer-ai-popup-panel {
  animation: footer-ai-popup-open 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.footer-ai-popup.is-closing .footer-ai-popup-panel {
  animation: footer-ai-popup-close 0.25s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.footer-ai-popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--grey-400);
  background: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.footer-ai-popup-close:hover {
  color: var(--color-text-dark);
  background: var(--grey-100);
}

.footer-ai-popup-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--grey-900);
  margin: 0 0 0.5rem;
  padding-right: 1.5rem;
}

.footer-ai-popup-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-dark);
  margin: 0;
}

/* ----- About page: Testimonials (outside about-hero) ----- */
.about-testimonials {
  padding: 3rem var(--page-padding-x) 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.testimonials-header {
  text-align: left;
  margin-bottom: 2rem;
}

.testimonials-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--grey-900);
  margin: 0 0 0.5rem;
}

.testimonials-subtitle {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-dark);
  margin: 0;
  line-height: 1.4;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

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

.testimonial-card {
  min-width: 0;
  background: var(--color-white);
  border: 1px solid var(--color-grey-200);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-m);
}

.testimonial-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--color-text-dark);
  margin: 0;
}

.testimonial-quote em {
  color: var(--primary-500);
  font-style: normal;
  font-weight: 700;
}

.testimonial-author {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-light);
  border-top: 1px solid var(--color-grey-200);
  padding-top: 1rem;
  margin-top: auto;
}

.testimonial-author span {
  color: var(--color-text-mid);
  font-weight: 500;
}

/* ----- Giving back (Community & Impact) – stat numbers style ----- */
.giving-back {
  padding: 3rem var(--page-padding-x) 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.giving-back-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

.giving-back-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--grey-900);
  margin: 0;
}

.giving-back-block {
  margin-bottom: 4rem;
}

.giving-back-block:last-child {
  margin-bottom: 0;
}

.giving-back-grid {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 2.5rem;
  align-items: stretch;
}

.giving-back-content-left .giving-back-content {
  order: 1;
}

.giving-back-content-left .giving-back-visuals {
  order: 2;
}

.giving-back-visuals {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
}

.giving-back-placeholder {
  flex: 1;
  min-height: 80px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.giving-back-placeholder.giving-back-image {
  overflow: hidden;
  padding: 0;
}

.giving-back-placeholder.giving-back-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mentoring block: gradient + star speckles (home-page star shape) + Phosphor icon */
.giving-back-placeholder.giving-back-mentor-illus {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 140px;
}
.giving-back-mentor-svg {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: block;
}
.giving-back-mentor-icon-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.giving-back-mentor-icon {
  font-size: 120px;
  color: var(--color-deep-night);
}

.giving-back-placeholder span {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--grey-300);
}

.giving-back-placeholder-dark {
  background: var(--grey-700);
}

.giving-back-placeholder-dark span {
  color: var(--grey-200);
}

.giving-back-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.giving-back-block-eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.giving-back-block-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 26px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--grey-900);
  margin: 0;
}

.giving-back-desc {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-dark);
  margin: 0;
}

/* Stat numbers: large bold black numbers, suffix in primary, label in grey (screenshot guidance) */
/* Reusable stat numbers (used in giving-back and elsewhere) */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 2.5rem;
  margin-top: 0.25rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-deep-violet);
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 0.5em;
  font-weight: 500;
  color: var(--color-deep-violet);
}

.stat-num--text {
  font-size: 2.5rem;
  line-height: 1.2;
  display: block;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-mid);
}

.stat-label::first-letter {
  text-transform: uppercase;
}

.giving-back-link {
  width: fit-content;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-500);
  margin-top: 0.25rem;
}

.giving-back-link:hover {
  color: var(--primary-600);
}

@media (max-width: 900px) {
  .giving-back-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .giving-back-visuals-left .giving-back-visuals {
    order: 1;
  }

  .giving-back-visuals-left .giving-back-content {
    order: 2;
  }

  .giving-back-content-left .giving-back-content {
    order: 1;
  }

  .giving-back-content-left .giving-back-visuals {
    order: 2;
  }
}

/* ----- About page: About this website (terminal card) ----- */
.about-this-site {
  margin-top: 3rem;
  padding: 0 var(--page-padding-x) 4rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.site-terminal-card {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-grey-200);
  overflow: hidden;
  box-shadow: var(--shadow-m);
  transition: box-shadow 0.2s ease;
}

.site-terminal-card:hover {
  box-shadow: 0 8px 24px rgba(1, 1, 9, 0.08);
}

.site-terminal-titlebar {
  background: var(--color-grey-100);
  border-bottom: 1px solid var(--color-grey-200);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.site-terminal-filename {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 12px;
  color: var(--color-text-dark);
  margin-left: 8px;
}

.site-terminal-body {
  padding: 1.5rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.site-terminal-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.65;
}

.site-terminal-prompt {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 13px;
  color: var(--color-grey-600);
  flex-shrink: 0;
  padding-top: 2px;
  user-select: none;
}

.site-terminal-text {
  font-family: var(--font-body);
  color: var(--color-text-dark);
}

.site-terminal-text em {
  font-style: normal;
  color: var(--color-deep-violet);
  font-weight: 500;
}

.site-terminal-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-left: 26px;
}

.site-terminal-chip {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  background: var(--color-lavender);
  border: 1px solid rgba(210, 188, 234, 0.6);
  color: var(--color-deep-night);
}

.site-terminal-footer {
  padding-left: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 11px;
  color: var(--color-text-dark);
  margin-top: 4px;
}

.site-terminal-footer::before {
  content: '//';
  color: var(--color-text-mid);
}

.site-terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--color-violet);
  margin-left: 3px;
  vertical-align: middle;
  animation: site-terminal-blink 1s step-end infinite;
}

@keyframes site-terminal-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ----- About page (scrollable) ----- */
body.page-about {
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  height: 100vh;
  max-height: 100vh;
  scrollbar-gutter: stable;
}

.about-page {
  padding-top: 160px;
  padding-bottom: 2rem;
}

.about-hero {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 4rem;
  align-items: start;
  padding: 2rem var(--page-padding-x) 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.about-intro {
  position: sticky;
  top: 100px;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--grey-900);
  margin-bottom: 1.5rem;
}

.about-bio {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-dark);
}

.about-bio p {
  margin: 0 0 1rem;
}

.about-bio p:last-child {
  margin-bottom: 0;
}

/* Experience list (expandable items) – matches .about-card and section patterns */
.experience {
  margin-top: 3.5rem;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.experience .about-section-title {
  margin-bottom: 0.25rem;
}

.exp-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-grey-200);
}
.exp-item:last-of-type {
  border-bottom: none;
}

.exp-body {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.exp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.exp-company {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--grey-900);
  line-height: 1.2;
  margin: 0;
}

.exp-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  margin: 0;
  background: rgba(210, 188, 234, 0.2);
  color: var(--color-deep-violet);
  border: 1px solid rgba(168, 130, 204, 0.3);
}

.exp-role {
  font-size: 14px;
  color: var(--color-text-dark);
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.exp-desc {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}

.exp-desc.open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.exp-desc-inner {
  overflow: hidden;
  font-size: 16px;
  color: var(--color-text-dark);
  line-height: 1.7;
  width: 100%;
  min-width: 0;
}

.exp-right {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.exp-year {
  font-size: 13px;
  color: var(--color-text-light);
  white-space: nowrap;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}

.exp-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-grey-300);
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--color-grey-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.exp-toggle:hover {
  color: var(--color-grey-700);
  border-color: var(--color-grey-400);
}

.exp-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-base);
  transform: rotate(0deg);
}

.exp-toggle.open svg {
  transform: rotate(180deg);
}

.exp-linkedin {
  margin-top: 8px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-violet);
  transition: color var(--transition-fast);
}

.exp-linkedin:hover {
  color: var(--color-deep-violet);
}

/* Stacked photo cards (left column) – drag to cycle */
.about-photo-stack-wrap {
  position: relative;
}

.about-photo-stack {
  position: relative;
  width: 400px;
  height: 420px;
  max-width: 100%;
}

.about-stack-card {
  position: absolute;
  width: 320px;
  height: 368px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-grey-200);
  box-shadow: 0 4px 20px rgba(1,1,9,0.08), 0 2px 8px rgba(1,1,9,0.04);
  background: var(--color-white);
  padding: 10px 10px 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease, box-shadow 0.4s ease, z-index 0s;
}

.about-stack-card .polaroid-image {
  width: 100%;
  height: 290px;
  overflow: hidden;
  background: var(--color-white);
}

.about-stack-card .polaroid-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
}

.about-stack-card .polaroid-caption {
  flex: 1;
  min-height: 56px;
  padding: 10px 4px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: 1.2rem;
  color: var(--color-text-dark);
  line-height: 1.3;
  text-align: center;
}

.about-stack-card.stack-front {
  left: 14px;
  top: 0;
  transform: rotate(0deg);
  z-index: 5;
  box-shadow: 0 12px 40px rgba(1,1,9,0.12), 0 4px 12px rgba(1,1,9,0.06);
}

.about-stack-card.stack-back-1 {
  left: 10px;
  top: 6px;
  transform: scale(0.97) rotate(3deg);
  z-index: 4;
}

.about-stack-card.stack-back-2 {
  left: 6px;
  top: 12px;
  transform: scale(0.94) rotate(-5deg);
  z-index: 3;
}

.about-stack-card.stack-back-3 {
  left: 2px;
  top: 18px;
  transform: scale(0.91) rotate(2deg);
  z-index: 2;
}

.about-stack-card.stack-back-4 {
  left: -2px;
  top: 24px;
  transform: scale(0.88) rotate(-3deg);
  z-index: 1;
}

/* Intro (right column) */
/* Experience section (below hero) */
.about-experience-section {
  padding: 2rem var(--page-padding-x) 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.about-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--grey-900);
  margin: 0 0 1rem;
}

.about-cards-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-cards-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.about-cards-track::-webkit-scrollbar {
  display: none;
}

.about-card {
  flex: 0 0 auto;
  width: 280px;
  min-height: 200px;
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-grey-200);
  box-shadow: var(--shadow-m);
  transition: box-shadow 0.2s, transform 0.2s;
}

.about-card:hover {
  box-shadow: 0 8px 24px rgba(1,1,9,0.08);
}

.about-card-company {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--grey-900);
  margin: 0 0 0.5rem;
}

.about-card-role {
  font-size: 14px;
  color: var(--color-text-dark);
  line-height: 1.5;
  margin: 0 0 0.25rem;
}

.about-card-dates {
  font-size: 13px;
  color: var(--grey-400);
  margin: 1rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-grey-200);
}

.about-linkedin {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-500);
  transition: color 0.2s;
}

.about-linkedin:hover {
  color: var(--primary-600);
}

@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-intro {
    position: static;
  }
  .about-photo-stack {
    width: 100%;
    max-width: 360px;
    height: 385px;
    margin: 0 auto;
  }
  .about-stack-card {
    width: 280px;
    height: 322px;
    padding: 8px 8px 0;
  }
  .about-stack-card .polaroid-image {
    height: 254px;
  }
  .about-stack-card .polaroid-caption {
    min-height: 56px;
    padding: 8px 4px 12px;
    font-size: 1.05rem;
  }
  .about-stack-card.stack-front {
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
  }
  .about-stack-card.stack-back-1 {
    left: calc(50% - 140px + 10px);
    top: 6px;
  }
  .about-stack-card.stack-back-2 {
    left: calc(50% - 140px + 6px);
    top: 12px;
  }
  .about-stack-card.stack-back-3 {
    left: calc(50% - 140px + 2px);
    top: 18px;
  }
  .about-stack-card.stack-back-4 {
    left: calc(50% - 140px - 2px);
    top: 24px;
  }
}

/* ----- Password gate page ----- */
body.page-password {
  min-height: 100vh;
  overflow: auto;
  background: var(--color-white);
}

body.page-password .custom-cursor {
  display: none;
}

/* Case study pages: use default cursor (no purple circle / magnifying glass) */
body.page-case-study .custom-cursor {
  display: none;
}
body.page-case-study .js-lightbox {
  cursor: pointer;
}

.page-password main.password-gate {
  flex: 1 1 0;
  min-height: 0;
  align-self: center;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-64) var(--page-padding-x) var(--space-64);
  text-align: center;
}

.password-gate {
  width: 100%;
  max-width: 680px;
}

.password-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text-dark);
  margin: 0 0 var(--space-16);
}

.password-description {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-dark);
  margin: 0 0 var(--space-40);
  line-height: 1.5;
}
.password-description a {
  color: var(--color-violet);
  text-decoration: none;
  position: relative;
}
.password-description a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  background: currentColor;
  width: 0;
  transition: width 0.25s ease;
}
.password-description a:hover {
  color: var(--color-deep-violet);
}
.password-description a:hover::after {
  width: 100%;
}

.password-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-24);
}

.password-field-row {
  display: flex;
  align-items: center;
  gap: var(--space-24);
  width: 100%;
}

.password-row {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  border-bottom: 1px solid rgba(168, 130, 204, 0.3);
  padding: var(--space-12) 0 var(--space-12);
  gap: var(--space-12);
  transition: border-color var(--transition-fast);
}

.password-row:focus-within {
  border-bottom-color: var(--color-violet);
}

.password-submit-wrap {
  flex-shrink: 0;
}

.password-error-wrap {
  min-height: var(--space-32);
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
}

.password-icon {
  flex-shrink: 0;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-dark);
  outline: none;
}

.password-input::placeholder {
  color: var(--color-text-light);
}

.password-submit {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-deep-night);
  background: var(--color-honey);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow var(--transition-base);
}

.password-submit:hover {
  box-shadow: 0 0 0 4px rgba(240, 190, 88, 0.25), 0 6px 24px rgba(240, 190, 88, 0.45);
}

.password-error {
  font-size: var(--text-sm);
  color: var(--color-negative-base);
  margin: 0;
  font-weight: 500;
}

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

/* ----- Work / Projects page ----- */
body.page-work {
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  height: 100vh;
  max-height: 100vh;
  scrollbar-gutter: stable;
}

.work-page {
  padding-top: var(--space-120);
  padding-bottom: var(--space-64);
  padding-left: var(--page-padding-x);
  padding-right: var(--page-padding-x);
}

.work-section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--grey-900);
  margin: 0 0 var(--space-12);
}

.work-section-intro {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-dark);
  margin: 0 0 var(--space-40);
  max-width: 640px;
}

.projects-section {
  margin-bottom: var(--space-64);
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-40);
  align-items: center;
  padding: var(--space-64) 0;
  border-bottom: none;
}

/* Force no divider lines between work page projects (overrides cache/other rules) */
.work-page .projects-section .project-card,
.work-page .project-card {
  border-bottom: none !important;
  border-top: none !important;
}

.project-card-content {
  min-width: 0;
}

.project-context {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-gold);
  display: block;
  margin-bottom: var(--space-8);
}

.project-context-sep {
  color: var(--color-gold);
  margin: 0 0.25em;
  font-size: 1.2em;
  vertical-align: 0.05em;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--grey-900);
  margin: 0 0 var(--space-12);
}

.project-desc {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text-dark);
  margin: 0 0 var(--space-24);
}

.project-card-wins {
  margin-top: var(--space-40);
  padding-top: var(--space-24);
}

.project-card-wins .stat-row {
  gap: 1.5rem 2rem;
  margin-top: 0;
}

.project-card-wins .stat-num,
.project-card-wins .stat-num .stat-suffix {
  color: var(--color-deep-violet);
}

.project-card-wins .stat-label {
  color: var(--color-text-mid);
}

.project-case-study-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-500);
  text-decoration: none;
  margin-bottom: var(--space-24);
  padding: var(--space-8) 0;
  border-bottom: 1.5px solid var(--primary-500);
  transition: color 0.2s, border-color 0.2s;
}

.project-case-study-btn:hover {
  color: var(--primary-600);
  border-color: var(--primary-600);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

/* Pill badges with icons (Product design, Strategy, Research) */
.project-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-dark);
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-full);
  border: 1px solid var(--grey-700);
  background: transparent;
}

.project-badge-icon {
  flex-shrink: 0;
  color: var(--color-text-dark);
}

/* Legacy link-style tags (e.g. snapshots) */
.project-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-dark);
  text-decoration: none;
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-grey-200);
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
}

.project-tag:hover {
  border-color: var(--grey-200);
  color: var(--primary-500);
}

.project-card-media {
  min-width: 0;
}

a.project-card-media-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-media-placeholder {
  aspect-ratio: 16/9;
  background: var(--grey-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: var(--space-160);
  position: relative;
  flex-shrink: 0;
}

.project-media-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-media-placeholder:hover img {
  transform: scale(1.06);
}

/* Project snapshots */
.snapshots-section {
  padding-top: var(--space-16);
}

.snapshots-container {
  width: 100%;
  max-width: none;
  margin: 0;
}

.snapshots-section .work-section-intro {
  margin-bottom: var(--space-32);
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-24);
}

.snapshot-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.snapshot-media {
  margin-bottom: var(--space-16);
}

.snapshot-placeholder {
  aspect-ratio: 16/9;
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: var(--space-96);
  position: relative;
  flex-shrink: 0;
}

.snapshot-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(1.5px);
}

.snapshot-placeholder:hover img {
  transform: none;
}

.snapshot-lock {
  position: absolute;
  top: var(--space-8);
  left: var(--space-8);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(60, 62, 78, 0.78);
  border-radius: 999px;
  color: #fff;
  pointer-events: none;
}

.snapshot-lock svg,
.snapshot-lock .ph {
  width: 14px;
  height: 14px;
  font-size: 14px;
}

.snapshot-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Snapshot uses shared .project-context and .project-context-sep for eyebrow */

.snapshot-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--grey-900);
  margin: 0;
}

.snapshot-category {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text-dark);
  margin: 0 0 var(--space-8);
}

/* Snapshot uses shared .project-tags and .project-badge */

@media (max-width: 900px) {
  .project-card {
    grid-template-columns: 1fr;
    gap: var(--space-24);
  }

  .project-card-media {
    order: -1;
  }

  .snapshot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ----- Case study page ----- */
/* Case study page: scroll like about (body scrolls, footer at bottom) */
body.page-case-study {
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  height: 100vh;
  max-height: 100vh;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

/* Scroll targets: leave room for fixed nav so section titles aren't hidden.
   Any section with an id gets scroll-margin so subnav links never hide under the nav. */
.page-case-study section[id] {
  scroll-margin-top: 120px;
}

.page-case-study .case-study-layout {
  display: flex;
  padding-top: var(--space-120);
  padding-left: 40px;
}

.case-study-nav {
  flex-shrink: 0;
  width: var(--space-160);
  padding: var(--space-32) var(--space-16) var(--space-32) 0;
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex;
  flex-direction: column;
}

.case-study-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-400);
  text-decoration: none;
  margin-bottom: var(--space-24);
}

.case-study-back:hover {
  color: var(--color-text-dark);
}

.case-study-back-arrow {
  flex-shrink: 0;
}

.case-study-subnav {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.case-study-subnav-link {
  align-self: flex-start;
  width: fit-content;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-400);
  text-decoration: none;
  transition: color 0.2s ease;
}

.case-study-subnav-link:hover {
  color: var(--color-text-dark);
}

.case-study-subnav-link.active {
  color: var(--grey-900);
  font-weight: 500;
}

.case-study-main {
  flex: 1;
  min-width: 0;
  padding: var(--space-32) var(--space-48) var(--space-64) var(--space-24);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.case-study-content {
  max-width: 1280px;
  width: 100%;
  overflow-x: visible;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.case-study-content + .case-study-content {
  margin-top: var(--space-64);
}

.case-study-h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--grey-900);
  margin: 0 0 var(--space-64);
}

.case-study-section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--grey-900);
  margin: 0 0 var(--space-24);
}

/* Section header with gold eyebrow treatment (Context, Problem, Discovery, etc.) */
.case-study-section-header {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 var(--space-24);
  line-height: 1.2;
}

.case-study-section-title--primary {
  color: var(--primary-400);
}

.case-study-section-title em {
  font-style: italic;
  color: var(--color-violet);
}

.case-study-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-dark);
  margin: 0;
}

/* Case study sections: consistent spacing (section gap 64, block gap 48, title gap 24) */
.case-study-section {
  margin-bottom: var(--space-64);
}

.case-study-section:last-child {
  margin-bottom: 0;
}

/* Context section: two columns + data-details component */

.case-study-context-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-32);
  align-items: start;
}

.case-study-context-content {
  min-width: 0;
}

.case-study-context-block {
  margin-bottom: var(--space-24);
}

.case-study-context-heading {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--grey-900);
  margin: 0 0 var(--space-12);
}

.case-study-context-block .link-line-arrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-500);
  margin-top: var(--space-12);
  display: inline-flex;
}

.case-study-context-block .link-line-arrow:hover {
  color: var(--primary-600);
}

.case-study-context-divider {
  border: none;
  border-top: 1px solid var(--color-grey-200);
  margin: var(--space-24) 0;
}

/* Data details component (e.g. Industry statistics) */
.data-details {
  padding: var(--space-24) 0 0;
}

/* When data-details follows section prose (e.g. Problem > Industry stats), match Context section text column width */
.case-study-section-prose + .data-details {
  max-width: 50%;
}

.data-details-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 var(--space-16);
}

.data-details-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.data-details-item {
  margin: 0;
  padding: var(--space-16) 0;
  border-bottom: 1px solid var(--color-grey-200);
}

.data-details-item:first-of-type {
  padding-top: 0;
}

.data-details-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.data-details-term {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-900);
  margin: 0 0 var(--space-8);
}

.data-details-desc {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-mid);
  margin: 0;
}

.case-study-context-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  align-self: start;
}

.case-study-context-media .case-study-figure {
  margin-top: 0;
}

.case-study-context-media img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .case-study-context-layout {
    grid-template-columns: 1fr;
  }

  .case-study-context-media {
    order: -1;
  }
}

/* Shared case study section prose: constrains heading + body to readable width (all sections) */
.case-study-section-prose {
  max-width: 65ch;
  margin-bottom: var(--space-48);
}

/* Extra space when prose follows a figure (e.g. text between two images) */
.case-study-section .case-study-figure + .case-study-section-prose {
  margin-top: var(--space-48);
}

.case-study-section-prose .case-study-text + .case-study-text {
  margin-top: var(--space-16);
}

/* Prose from markdown/HTML: use site fonts so body text and headings match */
.case-study-prose-body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-dark);
  max-width: 65ch;
}

.case-study-prose-body p {
  margin: 0 0 var(--space-16);
}

.case-study-prose-body p:last-child {
  margin-bottom: 0;
}

.case-study-prose-body h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--grey-900);
  margin: 0 0 var(--space-12);
}
.case-study-prose-body h2:not(:first-child) {
  margin-top: var(--space-48);
}

.case-study-prose-body h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--grey-900);
  margin: 0 0 var(--space-12);
}

.case-study-prose-body ul,
.case-study-prose-body ol {
  margin: 0 0 var(--space-16);
  padding-left: 1.5em;
}

.case-study-prose-body strong {
  font-weight: 500;
  color: var(--color-ultra-violet);
}

/* Prose links (e.g. markdown [text](url)): design system link styling */
.case-study-prose-body a {
  display: inline;
  width: fit-content;
  color: var(--color-violet);
  text-decoration: none;
  position: relative;
}
.case-study-prose-body a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  background: currentColor;
  width: 0;
  transition: width 0.25s ease;
}
.case-study-prose-body a:hover {
  color: var(--color-deep-violet);
}
.case-study-prose-body a:hover::after {
  width: 100%;
}

/* Shared case study full-width image + caption (used across sections) */
.case-study-figure {
  margin: var(--space-48) 0;
  width: 100%;
}

/* Two-column layout (reusable for images, body text, or mixed content) */
.case-study-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-32);
  margin-top: var(--space-48);
  width: 100%;
}

.case-study-cols .case-study-figure {
  margin-top: 0;
  min-width: 0;
}

.case-study-cols--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Text left, image right (e.g. Research section) */
.case-study-cols--text-image {
  align-items: start;
}
.case-study-cols--text-image .case-study-section-prose {
  margin-top: 0;
}

/* Discovery section: consistent spacing between prose and gallery */
.case-study-discovery .case-study-section-prose {
  margin-bottom: var(--space-48);
}

.case-study-discovery .case-study-section-prose + .case-study-section-prose {
  margin-top: 0;
}

.case-study-discovery .case-study-discovery-gallery {
  margin-top: var(--space-48);
  display: grid;
  gap: var(--space-24);
  width: 100%;
}

.case-study-discovery .case-study-gallery--3 {
  grid-template-columns: repeat(3, 1fr);
}

.case-study-discovery .case-study-gallery--4 {
  grid-template-columns: repeat(4, 1fr);
}

.case-study-discovery .case-study-discovery-gallery .case-study-figure {
  margin: 0;
  min-width: 0;
}

.case-study-discovery .case-study-discovery-gallery + .case-study-section-prose {
  margin-top: var(--space-48);
}

/* Earning trust / discovery: space between figures and following prose */
.case-study-discovery .case-study-figure + .case-study-section-prose {
  margin-top: var(--space-48);
}

/* Strategy section: more spacing between content blocks */
.case-study-strategy .case-study-section-prose {
  margin-bottom: var(--space-48);
}
.case-study-strategy .case-study-prose-body h2:not(:first-child) {
  margin-top: var(--space-48);
}
.case-study-strategy .case-study-prose-body h3:not(:first-child) {
  margin-top: var(--space-24);
}

.case-study-video-wrap {
  width: 100%;
  margin-top: var(--space-48);
}

.case-study-video-wrap .case-study-video {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  display: block;
  border-radius: var(--radius-md);
}

/* Oven case study: video fits its natural size (no forced 16:9 height) */
.page-case-study-oven .case-study-video-wrap .case-study-video {
  aspect-ratio: auto;
  width: 100%;
  height: auto;
  max-height: none;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .case-study-cols {
    grid-template-columns: 1fr;
  }

  .case-study-cols--3 {
    grid-template-columns: 1fr;
  }

  .case-study-discovery .case-study-gallery--3,
  .case-study-discovery .case-study-gallery--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .case-study-discovery .case-study-gallery--3,
  .case-study-discovery .case-study-gallery--4 {
    grid-template-columns: 1fr;
  }
}

/* Take-aways section: Impact (3 cols) + Learnings (2 cols) */
.case-study-takeaways-block {
  margin-top: var(--space-48);
}

.case-study-takeaways-block:first-of-type {
  margin-top: var(--space-24);
}

.case-study-takeaways-block .case-study-section-title {
  margin-bottom: var(--space-24);
}
.case-study-takeaways-block .case-study-cols {
  margin-top: var(--space-24);
}

.case-study-takeaways-subhead {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 500;
  color: var(--grey-900);
  margin: 0 0 var(--space-16);
  line-height: 1.3;
}

.case-study-takeaways-col {
  min-width: 0;
}

.case-study-takeaways-col .case-study-context-heading {
  margin-bottom: var(--space-12);
}

.case-study-takeaways-col .case-study-text {
  margin: 0;
}

.case-study-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.case-study-caption {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--grey-400);
  margin: var(--space-8) 0 0;
  line-height: 1.5;
}

/* Last section: Let's work together + Next project (image zoom on hover) */
.case-study-cta .case-study-cols {
  align-items: start;
}

.case-study-cta-work .case-study-section-title {
  margin-bottom: var(--space-24);
}

.case-study-cta-work .case-study-text {
  margin: 0 0 var(--space-24);
  max-width: 65ch;
}

.case-study-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  background: var(--color-honey);
  color: var(--color-deep-night);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: box-shadow var(--transition-base);
}

.case-study-cta-btn:hover {
  box-shadow: 0 0 0 4px rgba(240, 190, 88, 0.25), 0 6px 24px rgba(240, 190, 88, 0.45);
}

.case-study-cta-next .case-study-section-title {
  margin-bottom: var(--space-24);
}

.case-study-cta-next-link {
  display: block;
  text-decoration: none;
}

.case-study-cta-next-img-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--grey-100);
}

.case-study-cta-next-img-wrap .case-study-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease-out;
  transform-origin: center center;
}

.case-study-cta-next-img-wrap:hover .case-study-img {
  transform: scale(1.08);
}

.case-study-cta-next-title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-text-dark);
  margin-top: var(--space-16);
}

/* User quote cards: two columns — design system visual language */
.case-study-quote-cards {
  margin-top: var(--space-48);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-32);
}

.case-study-quote-card {
  width: 100%;
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-lavender);
  padding: var(--space-24);
  font-family: var(--font-body);
  border-left-width: 4px;
  border-left-color: var(--color-negative-base);
  margin: 0;
  display: flex;
  gap: var(--space-16);
  align-items: flex-start;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.case-study-quote-card:hover {
  border-color: var(--color-negative-base);
  box-shadow: 0 2px 12px rgba(165, 71, 71, 0.15);
}

@media (max-width: 900px) {
  .case-study-quote-cards {
    grid-template-columns: 1fr;
  }
}

/* Problem section: header + GIF that scales in on scroll */
.case-study-problem-visual {
  margin-top: var(--space-48);
  text-align: center;
}

/* Problem section: more space between figure → quote cards and cards → gif */
/* Problem section: first image size and centered (simplified-onboarding only) */
.page-case-study-simplified-onboarding .case-study-problem-first-fig {
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
}
.page-case-study-simplified-onboarding .case-study-problem-first-fig .case-study-img {
  width: 100%;
  height: auto;
}

.case-study-problem .case-study-figure + .case-study-quote-cards {
  margin-top: var(--space-48);
}
.case-study-problem .case-study-quote-cards + .case-study-problem-visual {
  margin-top: var(--space-64);
}

.case-study-problem-visual-header {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  color: var(--grey-900);
  margin: 0 auto var(--space-24);
  max-width: 45ch;
  line-height: 1.3;
}

.case-study-problem-gif-wrap {
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-m);
}

.case-study-quote-emoji {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.case-study-quote-content {
  min-width: 0;
}

.case-study-quote-text {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.55;
  color: var(--color-text-dark);
  margin: 0 0 var(--space-12);
  max-width: 52ch;
}

.case-study-quote-highlight {
  background: none;
  color: var(--color-negative-base);
  font-weight: 500;
  padding: 0;
}

.case-study-quote-attribution {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-gold);
  font-style: normal;
}

.case-study-wins-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-12);
}

.case-study-wins .stat-row + .stat-row {
  margin-top: var(--space-32);
}

.case-study-placeholder {
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.case-study-loading {
  font-family: var(--font-body);
  color: var(--grey-400);
  padding: var(--space-48) 0;
}

.case-study-error {
  padding: var(--space-48) 0;
}

.case-study-error .link-line-arrow {
  margin-top: var(--space-16);
}

.case-study-load-file-label {
  display: inline-block;
  margin-top: var(--space-8);
  padding: var(--space-8) var(--space-16);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-dark);
  background: var(--grey-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.case-study-load-file-label:hover {
  background: var(--grey-200);
}

.case-study-hero-wrap {
  position: relative;
  width: 100%;
  margin-top: var(--space-48);
  margin-bottom: var(--space-48);
  min-height: 640px;
  padding: var(--space-32);
  box-sizing: border-box;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.case-study-hero-texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      150deg,
      var(--color-sky-light) 0%,
      var(--color-sky-light) 25%,
      var(--color-sky) 100%
    ),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: var(--radius-md);
}

/* VUI case study: Sky gradient */
.page-case-study-vui .case-study-hero-texture {
  background-image:
    linear-gradient(
      155deg,
      var(--color-sky-light) 0%,
      var(--color-sky-light) 25%,
      var(--color-sky) 100%
    ),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* VUI: hero image size */
.page-case-study-vui .case-study-hero-wrap {
  min-height: 560px;
}
.page-case-study-vui .case-study-hero-container .case-study-img {
  max-width: 100%;
  max-height: 560px;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  display: block;
  object-fit: contain;
}

/* Simplified onboarding: hero image size */
.page-case-study-simplified-onboarding .case-study-hero-wrap {
  min-height: 600px;
}
.page-case-study-simplified-onboarding .case-study-hero-container .case-study-img {
  max-width: 100%;
  max-height: 600px;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  display: block;
  object-fit: contain;
}

/* Oven case study: hero image centered */
.page-case-study-oven .case-study-hero-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-case-study-oven .case-study-hero-figure {
  width: 100%;
  display: flex;
  justify-content: center;
}
.page-case-study-oven .case-study-hero-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.page-case-study-oven .case-study-hero-container .case-study-img {
  margin-left: auto;
  margin-right: auto;
}

.case-study-hero-container {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.case-study-hero-container .case-study-img {
  box-shadow: var(--shadow-m);
  max-width: 100%;
  max-height: 640px;
  width: auto;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  display: block;
  object-fit: contain;
}

.case-study-meta-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-32);
  margin-bottom: var(--space-48);
}

.case-study-meta-col {
  min-width: 0;
}

/* All body text in meta cols (Role, Team, Timeline) matches page prose */
.case-study-meta-col .case-study-meta-value,
.case-study-meta-col p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-dark);
  margin: 0 0 var(--space-8);
}

.case-study-meta-col .case-study-meta-value *,
.case-study-meta-col p * {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.case-study-meta-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 var(--space-8);
}

.case-study-meta-value {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-dark);
  margin: 0 0 var(--space-8);
}

.case-study-meta-value,
.case-study-meta-value * {
  font-family: var(--font-body);
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.case-study-meta-value,
.case-study-meta-value p {
  font-weight: 400;
}

.case-study-meta-value:last-child,
.case-study-meta-col p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .case-study-layout {
    flex-direction: column;
  }

  .case-study-nav {
    position: static;
    width: 100%;
    padding: 0 0 var(--space-24);
  }

  .case-study-subnav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-12);
  }

  .case-study-main {
    padding-left: var(--page-padding-x);
    padding-right: var(--page-padding-x);
  }


  .case-study-wins-cols {
    grid-template-columns: 1fr;
  }

  .case-study-meta-cols {
    grid-template-columns: 1fr;
  }
}

/* ----- Case study lightbox ----- */
.case-study-figure .js-lightbox {
  cursor: none;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox.is-open .lightbox-inner {
  transform: scale(1);
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 1, 9, 0.75);
  border: none;
  cursor: pointer;
  padding: 0;
}

.lightbox-inner {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - var(--space-48));
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: var(--shadow-m);
  border-radius: var(--radius-md);
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: calc(-1 * var(--space-40));
  right: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-md);
  transition: color 0.2s, background 0.2s;
}

.lightbox-close:hover {
  color: var(--primary-100);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(1, 1, 9, 0.5);
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(1, 1, 9, 0.75);
  color: var(--primary-100);
}

.lightbox-prev {
  left: var(--space-16);
}

.lightbox-prev::before {
  content: '‹';
}

.lightbox-next {
  right: var(--space-16);
}

.lightbox-next::before {
  content: '›';
}

.lightbox-counter {
  position: absolute;
  bottom: calc(-1 * var(--space-32));
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

/* Case study edit mode banner (below fixed nav) */
.case-study-edit-banner {
  position: sticky;
  top: 72px; /* below fixed nav */
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  margin-top: 72px;
  padding: var(--space-12) var(--page-padding-x);
  background: var(--grey-100);
  border-bottom: 1px solid var(--grey-200);
  font-family: var(--font-body);
  font-size: 14px;
}

.case-study-edit-banner[hidden] {
  display: none;
}

.case-study-edit-banner-label {
  color: var(--color-text-dark);
}

.case-study-edit-banner-label strong {
  color: var(--grey-900);
  font-weight: 500;
}

.case-study-edit-banner-actions {
  display: flex;
  align-items: center;
  gap: var(--space-16);
}

.case-study-edit-save-btn {
  padding: var(--space-8) var(--space-16);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-100);
  background: var(--grey-900);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.case-study-edit-save-btn:hover {
  background: var(--grey-800);
}

.case-study-edit-exit {
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-600);
  text-decoration: none;
}

.case-study-edit-exit:hover {
  color: var(--grey-900);
}

.case-study-edit-load-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-600);
  cursor: pointer;
}

.case-study-edit-load-label:hover {
  color: var(--grey-900);
}

.case-study-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  box-sizing: border-box;
}

.case-study-edit-modal[hidden] {
  display: none;
}

.case-study-edit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.case-study-edit-modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: var(--space-24);
  background: var(--grey-50);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-l);
  font-family: var(--font-body);
}

.case-study-edit-modal-title {
  margin: 0 0 var(--space-16);
  font-size: 18px;
  font-weight: 500;
  color: var(--grey-900);
}

.case-study-edit-modal-body {
  margin-bottom: var(--space-24);
}

.case-study-edit-field {
  margin-bottom: var(--space-16);
}

.case-study-edit-field label {
  display: block;
  margin-bottom: var(--space-4);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-dark);
}

.case-study-edit-field input[type="text"] {
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: 15px;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

.case-study-edit-url-row {
  display: flex;
  gap: var(--space-8);
}

.case-study-edit-url-row input {
  flex: 1;
  min-width: 0;
}

.case-study-edit-upload-btn {
  flex-shrink: 0;
  padding: var(--space-8) var(--space-16);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-dark);
  background: var(--grey-200);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.case-study-edit-upload-btn:hover:not(:disabled) {
  background: var(--grey-300);
}

.case-study-edit-upload-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.case-study-edit-lightbox-row {
  margin-bottom: var(--space-16);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid var(--grey-200);
}

.case-study-edit-lightbox-row:last-child {
  border-bottom: none;
}

.case-study-edit-hint {
  margin: var(--space-12) 0 0;
  font-size: 12px;
  color: var(--grey-500);
}

.case-study-edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-12);
}

.case-study-edit-modal-actions button {
  padding: var(--space-8) var(--space-16);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

#case-study-edit-modal-cancel {
  background: transparent;
  border: 1px solid var(--grey-300);
  color: var(--color-text-dark);
}

#case-study-edit-modal-apply {
  background: var(--grey-900);
  border: none;
  color: var(--primary-100);
}

/* ----- Responsive (mobile only: desktop unchanged) ----- */
@media (max-width: 768px) {
  :root { --page-padding-x: var(--space-24); }
  body > nav {
    padding: var(--space-12) var(--page-padding-x);
    flex-wrap: wrap;
    gap: var(--space-12);
  }
  .nav-logo { font-size: 18px; }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: var(--space-24);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-grey-200);
  }
  body > nav .nav-right {
    margin-left: auto;
  }
  .nav-icon {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }
  .hero { grid-template-columns: 1fr; }
  .hero-left {
    padding: 88px var(--page-padding-x) var(--space-48);
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary-hero,
  .btn-secondary-hero {
    justify-content: center;
    min-height: 44px;
    padding: var(--space-14) var(--space-24);
  }
  body:not(.page-about):not(.page-work):not(.page-case-study):not(.page-password) {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .about-page { padding-top: 120px; }
  .work-page { padding-top: 100px; }
  .site-footer {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: var(--space-12);
    padding: var(--space-24) var(--page-padding-x);
    text-align: center;
  }
  .site-footer .footer-left,
  .site-footer .footer-center,
  .site-footer .footer-right {
    justify-self: center;
  }
  .footer-ai-popup {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  :root { --page-padding-x: var(--space-16); }
  body > nav { padding: var(--space-12) var(--page-padding-x); }
  .hero-left { padding: 80px var(--page-padding-x) var(--space-40); }
  .site-footer {
    font-size: 13px;
    padding: var(--space-20) var(--page-padding-x);
  }
}

/* Case study mobile: full-width problem visuals */
@media (max-width: 768px) {
  .page-case-study-simplified-onboarding .case-study-problem-first-fig {
    max-width: 100%;
  }
  .case-study-problem-gif-wrap {
    max-width: 100%;
  }
  .case-study-section-prose + .data-details {
    max-width: 100%;
  }
  .case-study-layout {
    padding-left: 0;
  }
  .case-study-main {
    padding-left: var(--page-padding-x);
    padding-right: var(--page-padding-x);
  }
}

/* Password page mobile */
@media (max-width: 768px) {
  .page-password main.password-gate {
    padding: var(--space-48) var(--page-padding-x) var(--space-48);
  }
}
