/* ─────────────────────────────────────────────────────────────
   AURORA — Sophia Guild
   Dark gradient · grain · editorial
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

:root {
  /* Palette — sampled from the aurora gradient */
  --void:         #05122E;
  --paper:        #0B1B3A;       /* page background (dark) */
  --paper-2:      #0E2240;       /* secondary surface */
  --paper-3:      #122B52;       /* tertiary surface */
  --ink:          #FFFFFF;       /* primary text on dark = warm cream */
  --ink-soft:     rgba(255, 255, 255, 0.72);
  --cream:        #FFFFFF;
  --line:         #2F6BFF;       /* signature magenta accent */
  --line-deep:    #1B4FD6;       /* hover / darker accent */
  --line-soft:    rgba(47, 107, 255, 0.16);
  --line-faint:   rgba(47, 107, 255, 0.08);
  --steel:        #6BA6FF;       /* cool periwinkle accent */
  --steel-soft:   rgba(107, 166, 255, 0.18);
  --rule:         rgba(255, 255, 255, 0.10);
  --rule-strong:  rgba(255, 255, 255, 0.22);
  --muted:        rgba(255, 255, 255, 0.55);
  --muted-soft:   rgba(255, 255, 255, 0.40);
  --muted-faint:  rgba(255, 255, 255, 0.06);

  /* Legacy aliases so old inline-style references still resolve */
  --rust: var(--line);
  --bronze: var(--steel);
  --stone: var(--muted);
  --cream-2: var(--paper-2);

  /* The signature gradient — used in heroes and accent surfaces */
  --aurora: radial-gradient(120% 90% at 18% -10%, #05122E 0%, #081A3D 28%, transparent 58%),
            radial-gradient(100% 75% at 105% 18%, #1E4E8C 0%, #0E2B57 36%, transparent 62%),
            radial-gradient(75% 55% at 50% 118%, #1E5BB0 0%, #102A55 32%, #0A1E45 58%, transparent 78%),
            linear-gradient(180deg, #05122E 0%, #081A3D 35%, #081A3D 70%, #0A1E45 100%);

  /* Type */
  --sans:    'Helvetica Neue', Helvetica, Arial, 'Albert Sans', sans-serif;
  --body:    'Albert Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Geometry */
  --stop-size: 14px;
  --route-thickness: 1px;
  --pill-radius: 9999px;
  --card-radius: 14px;
}

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100%;
}
/* Off-white overscroll / margin backdrop on phones & tablets (base html is dark navy) */
@media (max-width: 1024px) {
  html { background: #FDFCFB; }
}

/* Default body baseline — full-page aurora gradient fixed behind everything */
body {
  background: var(--aurora);
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
  position: relative;
}

/* Film grain overlay — fixed across the viewport */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* Subtle additional grain that blends in shadow for depth */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.10;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='1' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ═══════════════════════════════════════════
   HEADER — glass bar on the aurora
   ═══════════════════════════════════════════ */
header {
  position: sticky; top: 0; z-index: 100;
  /* Extend the glass bar up into the iPhone status-bar safe area so the blur
     keeps the time/battery legible and scrolled content never shows above it. */
  padding-top: env(safe-area-inset-top);
  background: rgba(11, 27, 58, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
header::after {
  /* thin gradient accent under header */
  content: '';
  display: block;
  height: var(--route-thickness);
  background: linear-gradient(90deg, transparent 0%, var(--line) 30%, var(--steel) 70%, transparent 100%);
  opacity: 0.7;
}
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 32px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.wordmark {
  font-family: var(--sans);
  font-weight: 700; font-size: 15px;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex; align-items: center;
  position: relative;
}
.available-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--pill-radius);
  padding: 5px 12px;
}
.available-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2DBE60;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(45,190,96,0.18);
}
nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  background: none; border: none; cursor: pointer;
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  color: var(--ink);
  padding: 8px 14px;
  letter-spacing: 0.10em; text-transform: uppercase;
  opacity: 0.55;
  border-radius: var(--pill-radius);
  transition: opacity 180ms, background 180ms, color 180ms;
  position: relative;
}
.nav-link:hover {
  opacity: 1;
  background: var(--line-deep);
  color: #FFFFFF;
}
.resume-btn {
  background: #1B4FD6;
  color: #FFFFFF;
  border: 1.5px solid #1B4FD6;
  border-radius: 11px;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  cursor: pointer;
  margin-left: 10px;
  transition: background 180ms, transform 180ms, box-shadow 180ms, border-color 180ms;
  display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 0 6px 18px -10px rgba(27, 79, 214, 0.6);
}
.resume-btn .btn-arrow { color: #FFFFFF; }
.resume-btn:hover {
  background: #1543C0;
  border-color: #1543C0;
  box-shadow: 0 10px 26px -10px rgba(27, 79, 214, 0.7);
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  overflow: hidden;
}
/* Modern gradient shape field */
.hero-shapes {
  position: absolute;
  top: -40px;
  left: -120px;
  right: -120px;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hero-shapes .shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.85;
  will-change: transform;
}
.shape-blob-a {
  width: 540px; height: 540px;
  top: -120px; right: 8%;
  background: radial-gradient(circle at 30% 30%,
    oklch(0.78 0.13 230) 0%,
    oklch(0.55 0.20 250) 45%,
    oklch(0.40 0.22 260 / 0) 75%);
  opacity: 0.6;
  animation: floatA 18s ease-in-out infinite;
}
.shape-blob-b {
  width: 420px; height: 420px;
  top: 180px; right: -60px;
  background: radial-gradient(circle at 60% 40%,
    oklch(0.85 0.09 210) 0%,
    oklch(0.65 0.16 235) 50%,
    oklch(0.45 0.20 250 / 0) 80%);
  opacity: 0.55;
  animation: floatB 22s ease-in-out infinite;
}
.shape-blob-c {
  width: 360px; height: 360px;
  top: 280px; right: 28%;
  background: radial-gradient(circle at 50% 50%,
    oklch(0.72 0.16 270) 0%,
    oklch(0.55 0.20 265) 45%,
    oklch(0.40 0.22 260 / 0) 80%);
  opacity: 0.45;
  animation: floatA 26s ease-in-out infinite reverse;
}
.shape-ring {
  width: 280px; height: 280px;
  top: 80px; right: 4%;
  border-radius: 50%;
  border: 1.5px solid oklch(0.45 0.20 255 / 0.4);
  background: transparent;
  filter: none;
  opacity: 0.7;
  animation: spinSlow 60s linear infinite;
}
.shape-ring::before {
  content: '';
  position: absolute;
  top: -8px; left: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.45 0.22 260), oklch(0.70 0.14 230));
  transform: translateX(-50%);
  box-shadow: 0 4px 12px oklch(0.45 0.20 260 / 0.5);
}
.shape-pill {
  width: 180px; height: 64px;
  top: 410px; right: 38%;
  border-radius: 9999px;
  background: linear-gradient(120deg,
    oklch(0.40 0.22 260) 0%,
    oklch(0.62 0.18 240) 60%,
    oklch(0.78 0.12 220) 100%);
  filter: none;
  opacity: 0.92;
  transform: rotate(-12deg);
  box-shadow: 0 20px 40px -10px oklch(0.45 0.22 260 / 0.45);
  animation: floatB 14s ease-in-out infinite;
}
.shape-squircle {
  width: 110px; height: 110px;
  top: 320px; right: 18%;
  border-radius: 32px;
  background: linear-gradient(140deg,
    oklch(0.82 0.10 215) 0%,
    oklch(0.55 0.20 250) 100%);
  filter: none;
  opacity: 0.9;
  transform: rotate(18deg);
  box-shadow: 0 16px 30px -10px oklch(0.50 0.20 250 / 0.45);
  animation: floatA 16s ease-in-out infinite reverse;
}
.shape-grain {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, oklch(0 0 0 / 0.04) 1px, transparent 1.5px);
  background-size: 4px 4px;
  filter: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
}
@keyframes floatA {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-30px, 20px); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0, 0) rotate(-12deg); }
  50%      { transform: translate(20px, -30px) rotate(-8deg); }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.hero > .meta-strip,
.hero > .headline-block,
.hero > .below-fold {
  position: relative;
  z-index: 1;
}

/* Modern hero polish */
.hero .headline {
  background: linear-gradient(180deg,
    #FFFFFF 0%,
    rgba(255, 255, 255, 0.72) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .headline-italic {
  background: linear-gradient(110deg,
    #5B9BFF 0%,
    #2F6BFF 35%,
    #5B9BFF 65%,
    #6BA6FF 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
.hero .headline-italic::after {
  height: 10px !important;
  border-radius: 8px !important;
  background: linear-gradient(90deg,
    rgba(47, 107, 255, 0.45),
    rgba(107, 166, 255, 0.30)) !important;
  opacity: 0.8 !important;
  bottom: -0.02em !important;
  filter: blur(2px);
}

.meta-strip {
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--rule);
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
}
.meta-item {
  font-family: var(--sans);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.meta-item::before {
  /* tiny stop marker */
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
}
.meta-sep { display: none; }

.headline-block {
  padding: 72px 0 28px;
  position: relative;
}
.headline-block::before {
  /* a thin route running down the left of headline */
  content: '';
  position: absolute;
  left: -18px; top: 78px; bottom: 0;
  width: var(--route-thickness);
  background: var(--line);
  opacity: 0;
}
.headline {
  font-family: var(--sans);
  font-size: clamp(56px, 8vw, 104px) !important;
  font-weight: 700;
  color: var(--ink);
  line-height: 0.96;
  letter-spacing: -0.035em;
}
.headline-italic {
  /* repurpose: transit-blue route word */
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  color: var(--line) !important;
  position: relative;
  display: inline-block;
  padding: 0 0.08em;
}
.headline-italic::after {
  /* underline route */
  content: '';
  position: absolute;
  left: 0.08em; right: 0.08em;
  bottom: 0.04em;
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  opacity: 0.18;
}

.below-fold {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: 24px 0 56px;
}
.bio-col p {
  font-family: var(--body);
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 440px;
}
.bio-col p a, .bio-inline-link {
  color: var(--line);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.stats-col {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 0;
}
.stats-row {
  display: flex; gap: 56px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.stat-item { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.stat-num {
  font-family: var(--sans);
  font-size: 40px; font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.025em;
}
.stat-label {
  font-family: var(--sans);
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.view-more-link {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  color: var(--line);
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-end;
}
.view-more-link:hover { color: var(--line-deep); }

/* ═══════════════════════════════════════════
   MARQUEE — transit line indicator
   ═══════════════════════════════════════════ */
.skills-strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  padding: 16px 0;
  background: var(--paper);
  position: relative;
}
.skills-strip::before,
.skills-strip::after {
  content: '';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 80px; height: 100%;
  z-index: 2; pointer-events: none;
}
.skills-strip::before {
  left: 0;
  background: linear-gradient(to right, var(--paper), transparent);
}
.skills-strip::after {
  right: 0;
  background: linear-gradient(to left, var(--paper), transparent);
}
.marquee-track {
  display: flex; gap: 0;
  animation: marquee 32s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.marquee-item {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink);
  padding: 0 32px;
  border-right: none;
  display: inline-flex; align-items: center; gap: 28px;
}
.marquee-item::after {
  /* station dot between items */
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════
   WORK SECTION
   ═══════════════════════════════════════════ */
.work-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--rule);
  gap: 16px;
}
.section-index,
.section-label {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
}
.section-index::before {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line);
}

/* ── Case entry — a station on the route ── */
.case-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 48px;
  padding: 64px 0 64px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
/* Route line running through the number column */
.case-entry::before {
  content: '';
  position: absolute;
  left: 50px; top: 0; bottom: 0;
  width: var(--route-thickness);
  background: var(--line-soft);
}
.case-entry:first-of-type::before {
  top: 64px;
}
.case-entry:last-of-type::before {
  bottom: auto;
  height: 90px;
}

/* The case number becomes a transit "station" badge */
.case-num {
  position: relative;
  z-index: 2;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--line);
  color: var(--line);
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center; justify-content: center;
  line-height: 1;
  transition: background 220ms, color 220ms, transform 220ms;
}
.case-entry:hover .case-num {
  background: var(--line);
  color: #fff;
  transform: scale(1.04);
}

.case-body { display: flex; flex-direction: column; gap: 18px; }
.case-tags {
  display: flex; gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.tag-company {
  font-family: var(--sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--line);
  display: inline-flex; align-items: center; gap: 8px;
}
.tag-company::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line);
}
.tag-sep { display: none; }
.tag-pill {
  font-family: var(--sans);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule-strong);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--pill-radius);
  padding: 4px 12px;
  backdrop-filter: blur(8px);
  transition: border-color 180ms, color 180ms, background 180ms;
}
.case-entry:hover .tag-pill {
  border-color: rgba(47, 107, 255, 0.5);
  color: var(--ink);
}
.case-title {
  font-family: var(--sans);
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.case-desc {
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  opacity: 0.78;
  line-height: 1.65;
  max-width: 640px;
}
.case-desc em {
  font-style: normal;
  color: var(--line);
  opacity: 1;
  font-weight: 600;
}
.read-btn {
  display: inline-flex; align-items: center;
  gap: 9px;
  background: transparent;
  color: #1543C0;
  border: 1.5px solid #1B4FD6;
  border-radius: 11px;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  cursor: pointer;
  margin-top: 8px;
  width: fit-content;
  transition: background 180ms, color 180ms, border-color 180ms;
  box-shadow: none;
}
.read-btn:hover {
  background: rgba(27, 79, 214, 0.06);
  border-color: #1543C0;
  box-shadow: none;
}
.read-btn-line {
  display: none;
}

.btn-arrow {
  display: inline-block;
  transform-origin: left center;
  transition: transform 220ms ease;
}
.read-btn:hover .btn-arrow,
.resume-btn:hover .btn-arrow,
.footer-contact-btn:hover .btn-arrow,
.next-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ── Case study image presentation ── */
.case-images {
  margin-top: 24px;
}
.images-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 0 10px;
}
.images-title {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 10px;
}
.images-title::before {
  content: '→';
  color: var(--line);
  font-weight: 700;
}
.before-after {
  font-family: var(--sans);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--muted);
}
.image-grid.single { grid-template-columns: 1fr; }
.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.img-placeholder {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.img-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(6,69,150,0.05) 10px,
    rgba(6,69,150,0.05) 11px
  );
}
.img-placeholder img {
  border-radius: 10px !important;
  transition: transform 320ms ease, box-shadow 320ms ease;
}
.img-placeholder:hover img {
  box-shadow: 0 12px 32px -12px rgba(6,69,150,0.35), 0 0 0 1px var(--line-soft);
}
.img-label {
  font-family: var(--body);
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  position: relative;
  font-style: normal;
  padding-left: 2px;
}
.img-badge {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--sans);
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--pill-radius);
  padding: 3px 10px;
  background: var(--paper);
  z-index: 2;
}

/* ═══════════════════════════════════════════
   FOOTER — terminal station
   ═══════════════════════════════════════════ */
footer {
  background: linear-gradient(180deg, transparent 0%, #05122E 40%, #05122E 100%);
  color: var(--ink);
  padding: 80px 32px 48px;
  margin-top: 96px;
  position: relative;
  overflow: hidden;
}
footer::before {
  /* terminal accent line */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--line) 50%, transparent 100%);
  opacity: 0.5;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
}
.footer-cta {
  font-family: var(--sans);
  font-size: clamp(36px, 4.4vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  max-width: 720px;
  color: var(--ink);
}
.footer-sub {
  font-family: var(--body);
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 540px;
  line-height: 1.6;
}
.footer-contact-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: #E4EDFF;
  color: #1543C0;
  border: 1.5px solid #1B4FD6;
  border-radius: 11px;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.01em; text-transform: none;
  cursor: pointer;
  transition: background 180ms, box-shadow 180ms, border-color 180ms;
  box-shadow: 0 6px 18px -10px rgba(27, 79, 214, 0.4);
}
.footer-contact-btn:hover {
  background: #D2E0FF;
  border-color: #1543C0;
  box-shadow: 0 10px 26px -10px rgba(27, 79, 214, 0.5);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--rule);
  padding-top: 32px;
  margin-top: 72px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted-soft);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.footer-links { display: flex; gap: 24px; }
.footer-link {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms;
}
.footer-link:hover { color: var(--line); }

/* ═══════════════════════════════════════════
   CASE STUDY PAGES
   ═══════════════════════════════════════════ */
.page { max-width: 960px; margin: 0 auto; padding: 0 32px; }

.back-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--line);
  cursor: pointer;
  padding: 32px 0 0;
  background: none; border: none;
  transition: color 180ms, gap 220ms;
}
.back-link:hover { color: var(--line-deep); gap: 14px; }

.case-hero {
  padding: 56px 0 72px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
/* Halo of the aurora bleeding into the case-hero */
.case-hero::before {
  content: '';
  position: absolute;
  pointer-events: none;
  top: -80px;
  right: -120px;
  width: 720px;
  height: 520px;
  background:
    radial-gradient(60% 60% at 40% 40%, rgba(47, 107, 255, 0.30) 0%, rgba(47, 107, 255, 0) 70%),
    radial-gradient(50% 50% at 70% 60%, rgba(107, 166, 255, 0.22) 0%, rgba(107, 166, 255, 0) 70%);
  filter: blur(20px);
  z-index: 0;
}
.case-hero > * { position: relative; z-index: 1; }
.case-meta-row {
  display: flex; gap: 8px;
  align-items: center; flex-wrap: wrap;
  margin-bottom: 36px;
}

.case-title-block { margin-bottom: 48px; }
.case-display-title {
  font-family: var(--sans);
  font-size: clamp(54px, 6.5vw, 96px) !important;
  font-weight: 700;
  color: var(--ink);
  line-height: 0.96;
  letter-spacing: -0.035em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.5);
}
.case-display-title .italic-word {
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  color: var(--line) !important;
  position: relative;
  display: inline-block;
}
.case-display-title .italic-word {
  background: linear-gradient(110deg, #5B9BFF 0%, #2F6BFF 35%, #5B9BFF 65%, #6BA6FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
}
/* Tight line-height + background-clip:text clips glyph descenders (e.g. the "g" in
   Redesign) — extend the box downward without shifting layout. */
.italic-word.no-underline { padding-bottom: 0.14em; margin-bottom: -0.14em; }
.case-display-title .italic-word::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0.04em;
  height: 8px;
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.45), rgba(107, 166, 255, 0.30));
  border-radius: 6px;
  opacity: 0.7;
  filter: blur(2px);
}

.case-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: start;
}
.case-intro-text p {
  font-family: var(--body);
  font-size: 16.5px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 18px;
}
.case-intro-text p:last-child { margin-bottom: 0; }

.case-intro-meta {
  display: flex; flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.meta-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: baseline;
}
.meta-block-label {
  font-family: var(--sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--line);
  margin-bottom: 0;
  display: inline-flex; align-items: center; gap: 8px;
}
.meta-block-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 8px rgba(47, 107, 255, 0.7);
}
.meta-block-value {
  font-family: var(--body);
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ── Metrics ── */
.metrics-bar {
  display: flex; gap: 0;
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(10px);
  margin: 56px 0;
  overflow: hidden;
  position: relative;
}
.metrics-bar::before {
  /* gradient accent track */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--line) 0%, var(--steel) 60%, transparent 100%);
}
.metric-item {
  flex: 1;
  padding: 36px 32px 28px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.metric-item:last-child { border-right: none; }
.metric-num {
  font-family: var(--sans);
  font-size: 56px; font-weight: 700;
  background: linear-gradient(170deg, #FFFFFF 0%, #5B9BFF 65%, #2F6BFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.metric-num sup { font-size: 22px; vertical-align: super; }
.metric-label {
  font-family: var(--sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── Section ── */
.cs-section {
  padding: 96px 0;
  border-bottom: none;
  position: relative;
  isolation: isolate;
}
.cs-section:last-of-type { border-bottom: none; }

/* Full-bleed alternating backgrounds: dark → light → gradient.
   Classes are stamped at runtime by a small inline script in each case-study page,
   so the cycle counts only .cs-section siblings (not .case-hero/.metrics-bar/.next-project). */
.cs-section::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
}
.cs-section.is-dark::before {
  background: #0B1B3A;
}
.cs-section.is-light::before {
  background: #FFFFFF;
}
.cs-section.is-gradient::before {
  background:
    radial-gradient(70% 90% at 100% 50%, #5B9BFF 0%, #5B9BFF 22%, #1B4FD6 48%, transparent 75%),
    radial-gradient(60% 90% at 78% 50%, #6BA6FF 0%, #2E6BD6 35%, transparent 70%),
    linear-gradient(90deg, #05122E 0%, #081A3D 28%, #0A1E45 55%, #0E2B57 75%, #14407F 100%);
}

/* ── Light section overrides ── */
.cs-section.is-light .section-heading,
.cs-section.is-light .quote-text {
  color: #0B1B3A;
  text-shadow: none;
}
.cs-section.is-light .section-body,
.cs-section.is-light .two-col-text .section-body {
  color: rgba(11, 27, 58, 0.84);
}
.cs-section.is-light .finding-text {
  color: rgba(11, 27, 58, 0.84);
}
.cs-section.is-light .finding-text strong {
  color: #0B1B3A;
}
.cs-section.is-light .finding-item {
  border-bottom-color: rgba(11, 27, 58, 0.10);
}
.cs-section.is-light .callout-box {
  background: rgba(11, 27, 58, 0.035);
  border-color: rgba(11, 27, 58, 0.10);
  backdrop-filter: none;
}
.cs-section.is-light .callout-box [style*="color:var(--rust)"],
.cs-section.is-light .callout-box [style*="color: var(--rust)"] {
  color: var(--line-deep) !important;
}
.cs-section.is-light .callout-box p[style*="color:var(--ink)"] {
  color: rgba(11, 27, 58, 0.84) !important;
  opacity: 1 !important;
}
.cs-section.is-light .finding-num {
  color: var(--line-deep);
  border-color: rgba(27, 79, 214, 0.45);
  background: rgba(27, 79, 214, 0.06);
}
.cs-section.is-light .section-eyebrow {
  color: var(--line-deep);
  border-color: rgba(27, 79, 214, 0.40);
  background: rgba(27, 79, 214, 0.05);
}
.cs-section.is-light .section-eyebrow::before {
  background: var(--line-deep);
  box-shadow: 0 0 8px rgba(27, 79, 214, 0.4);
}
.cs-section.is-light .section-heading .italic-word {
  background: linear-gradient(110deg, var(--line-deep) 0%, #3D7BE8 60%, #2E6BD6 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
.cs-section.is-light .section-heading .italic-word::after {
  background: linear-gradient(90deg, rgba(27, 79, 214, 0.35), rgba(74, 93, 150, 0.25));
}
.cs-section.is-light .img-block > div:not(.img-caption) {
  background: rgba(11, 27, 58, 0.03);
  border-color: rgba(11, 27, 58, 0.10) !important;
  box-shadow: 0 8px 28px -16px rgba(11, 27, 58, 0.25);
}
.cs-section.is-light .img-block:hover > div:not(.img-caption) {
  border-color: rgba(27, 79, 214, 0.40) !important;
  box-shadow: 0 18px 48px -20px rgba(27, 79, 214, 0.35);
}
.cs-section.is-light .img-caption {
  color: rgba(11, 27, 58, 0.7);
  border-left-color: var(--line-deep);
}
.cs-section.is-light .quote-block {
  border-image: linear-gradient(180deg, var(--line-deep), #2E6BD6) 1;
}
.cs-section.is-light .quote-source {
  color: var(--line-deep);
}
.cs-section.is-light .quote-source::before {
  background: var(--line-deep);
}

/* ── Gradient section overrides ── */
.cs-section.is-gradient .section-heading,
.cs-section.is-gradient .quote-text {
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}
.cs-section.is-gradient .callout-box {
  background: rgba(11, 27, 58, 0.30);
  border-color: rgba(255, 255, 255, 0.16);
}
.cs-section.is-gradient .section-eyebrow {
  background: rgba(11, 27, 58, 0.32);
  border-color: rgba(255, 255, 255, 0.30);
  color: #fff;
}
.cs-section.is-gradient .section-eyebrow::before {
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}
.cs-section.is-gradient .img-block > div:not(.img-caption) {
  background: rgba(11, 27, 58, 0.28);
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.section-eyebrow {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--line);
  margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 12px;
  position: relative;
  z-index: 2;
}
.section-eyebrow::before {
  display: none;
}

/* Terminus caps on the line — open circles at the very start and end */
.cs-section:first-of-type {
  position: relative;
}
.cs-section:first-of-type > .section-eyebrow::after,
.cs-section:last-of-type > .section-eyebrow::after {
  display: none;
}
.section-heading {
  font-family: var(--sans);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  max-width: 760px;
}
.section-heading .italic-word {
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  background: linear-gradient(110deg, #5B9BFF 0%, #2F6BFF 50%, #6BA6FF 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  position: relative;
  display: inline-block;
}
.section-heading .italic-word::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0.05em;
  height: 6px;
  background: linear-gradient(90deg, rgba(47, 107, 255, 0.5), rgba(107, 166, 255, 0.35));
  border-radius: 4px;
  opacity: 0.7;
  filter: blur(1.5px);
}
.section-body {
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 720px;
  margin-bottom: 16px;
}
.section-body:last-child { margin-bottom: 0; }

.two-col-text {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 32px;
}
.two-col-text .section-body { max-width: none; margin-bottom: 0; }

/* ── Image rows ── */
.img-row { display: grid; gap: 18px; margin-top: 36px; }
.img-row.cols-2 { grid-template-columns: 1fr 1fr; }
.img-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.img-row.cols-1 { grid-template-columns: 1fr; }

.img-block { display: flex; flex-direction: column; gap: 14px; }
.img-block > div:not(.img-caption) {
  border-radius: var(--card-radius) !important;
  border: 1px solid var(--rule) !important;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: box-shadow 320ms ease, border-color 320ms ease, transform 320ms ease;
  box-shadow: 0 8px 28px -12px rgba(0, 0, 0, 0.6);
}
.img-block:hover > div:not(.img-caption) {
  border-color: rgba(47, 107, 255, 0.45) !important;
  box-shadow: 0 18px 48px -16px rgba(47, 107, 255, 0.35), 0 0 0 1px rgba(47, 107, 255, 0.2);
  transform: translateY(-2px);
}
.img-block img { display: block; width: 100%; }
.img-ph {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.img-ph::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 10px,
    rgba(6,69,150,0.05) 10px, rgba(6,69,150,0.05) 11px
  );
}
.img-ph.tall { aspect-ratio: 4/3; }
.img-ph.wide { aspect-ratio: 16/7; }
.img-ph.square { aspect-ratio: 1/1; }
.img-ph.short { aspect-ratio: 16/5; }
/* When a real image is present, size the frame to the image (fully responsive) */
.img-ph.tall:has(img),
.img-ph.wide:has(img),
.img-ph.square:has(img),
.img-ph.short:has(img),
.img-ph:has(img) { aspect-ratio: auto; background: none; }
.img-ph:has(img)::before { display: none; }
.img-ph img { width: 100%; height: auto; display: block; }
.img-ph-label-top {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--sans);
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--pill-radius);
  padding: 3px 10px;
  background: var(--paper);
  z-index: 2;
}
.img-caption {
  font-family: var(--body);
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  font-style: normal;
}

/* ── Findings list — routed steps ── */
.findings-list {
  margin-top: 28px;
  display: flex; flex-direction: column;
  gap: 0;
  position: relative;
}
.finding-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.finding-item:last-child { border-bottom: none; }
.finding-num {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  color: var(--line);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid rgba(47, 107, 255, 0.5);
  border-radius: var(--pill-radius);
  background: rgba(47, 107, 255, 0.08);
  width: fit-content;
  text-align: center;
  align-self: start;
}
.finding-text {
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.finding-text strong {
  font-weight: 600;
  color: var(--ink);
}

.callout-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  padding: 32px 36px;
  margin-top: 28px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.callout-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--line) 0%, var(--steel) 100%);
}
.callout-box .findings-list { margin-top: 0; }

.quote-block {
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--line), var(--steel)) 1;
  padding: 16px 0 16px 32px;
  margin: 40px 0;
  position: relative;
}
.quote-text {
  font-family: var(--sans);
  font-style: normal !important;
  font-weight: 400;
  font-size: 26px;
  color: var(--ink);
  line-height: 1.4;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.quote-source {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--line);
  display: inline-flex; align-items: center; gap: 10px;
}
.quote-source::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line);
}

/* ── Divider label ── */
.divider-label {
  display: flex; align-items: center; gap: 16px;
  padding: 40px 0 0;
}
.divider-label-text {
  font-family: var(--sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--line);
  white-space: nowrap;
}
.divider-line {
  flex: 1; height: 1px; background: var(--line-soft);
}

/* ── Next project — aurora ticket ── */
.next-project {
  padding: 48px 36px 48px 56px;
  margin: 64px 0 0;
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  background:
    linear-gradient(135deg, rgba(47, 107, 255, 0.10) 0%, rgba(107, 166, 255, 0.08) 60%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(12px);
  display: flex; justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; gap: 24px;
  position: relative;
  overflow: hidden;
}
.next-project::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--line) 0%, var(--steel) 60%, transparent 100%);
  border: 0;
}
.next-project::after {
  /* aurora glow corner */
  content: '';
  position: absolute;
  right: -80px;
  top: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(47, 107, 255, 0.35) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
.next-project > * { position: relative; z-index: 3; }
.next-label {
  font-family: var(--sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--line);
  margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 10px;
}
.next-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 0 0 10px rgba(47, 107, 255, 0.7);
}
.next-title {
  font-family: var(--sans);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.next-btn {
  background: #1B4FD6; color: #FFFFFF;
  border: 1.5px solid #1B4FD6;
  border-radius: 11px;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.01em; text-transform: none;
  cursor: pointer;
  transition: background 180ms, box-shadow 180ms, border-color 180ms;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 0 6px 18px -10px rgba(27, 79, 214, 0.4);
}
.next-btn .btn-arrow { color: #FFFFFF; }
.next-btn:hover {
  background: #1543C0;
  border-color: #1543C0;
  box-shadow: 0 10px 26px -10px rgba(27, 79, 214, 0.5);
}

/* Case-study footer (slim variant) */
footer .footer-inner > .footer-bottom:only-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* ═══════════════════════════════════════════
   TWEAKS PANEL (reskin)
   ═══════════════════════════════════════════ */
#tweaks-panel {
  display: none;
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 22px;
  z-index: 1000;
  width: 280px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.40);
  font-family: var(--sans);
  border: 1px solid rgba(255,255,255,0.10);
}
#tweaks-panel.open { display: block; }
.tweaks-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--line);
  margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.tweaks-title::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.tweak-row { margin-bottom: 16px; }
.tweak-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(245,241,233,0.55);
  margin-bottom: 8px;
}
.tweak-select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  color: var(--paper);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
}
.tweak-toggle {
  display: flex; gap: 6px;
}
.tweak-opt {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: rgba(245,241,233,0.70);
  padding: 7px 8px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  transition: all 180ms;
}
.tweak-opt.active {
  background: var(--line);
  border-color: var(--line);
  color: #fff;
}
.tweaks-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  color: rgba(245,241,233,0.55);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .case-intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .below-fold { grid-template-columns: 1fr; gap: 32px; }
  .stats-col { align-items: flex-start; }
  .stat-item { text-align: left; }
  .view-more-link { align-self: flex-start; }
}
/* Tablet: stack two-column text + before/after image pairs */
@media (max-width: 1024px) {
  .two-col-text { grid-template-columns: 1fr; gap: 28px; }
  .img-row.cols-2, .img-row.cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .image-grid { grid-template-columns: 1fr; }
  .case-entry { grid-template-columns: 1fr; gap: 16px; padding: 40px 0; }
  .case-entry::before { display: none; }
  .case-num { width: 64px; height: 64px; font-size: 16px; }
  .header-inner { padding: 0 16px; height: 56px; }
  .hero, .work-section, .page { padding-left: 16px; padding-right: 16px; }
  .image-grid img { height: auto !important; }
  .two-col-text { grid-template-columns: 1fr; gap: 24px; }
  .img-row.cols-2, .img-row.cols-3 { grid-template-columns: 1fr; }
  .metrics-bar { flex-direction: column; }
  .metric-item {
    border-right: none;
    border-bottom: 1px dashed var(--rule-strong);
    padding: 22px 18px;
  }
  .metric-item:last-child { border-bottom: none; }
  .next-project { flex-direction: column; align-items: flex-start; padding: 36px 24px; }
  .meta-block { grid-template-columns: 1fr; gap: 4px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 28px; }
  nav .nav-link { padding: 6px 8px; font-size: 11px; }
  .resume-btn { padding: 8px 14px; font-size: 11px; }
}

/* Keep content clear of the notch/speaker in landscape on phones. Insets are 0 in
   portrait and on non-notched devices, so this only bites when it needs to. */
@media (max-width: 1024px) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}

/* Phone landscape — shrink body copy; text-size-adjust:100% keeps sizes stable across rotation */
@media (orientation: landscape) and (max-height: 500px) {
  .section-body, .case-intro-text p { font-size: 15px; line-height: 1.68; }
  .finding-text { font-size: 14px; }
  .bio-col p, .case-desc, .footer-sub { font-size: 15px; }
  .stmt-body { font-size: 15px; }
  .img-label, .img-caption, .meta-block-value { font-size: 13.5px; }
}
