/* ============================================
   SELF-HOSTED VARIABLE FONTS (latin subsets)
   Bricolage carries opsz 12-96, wdth 75-100, wght 200-800:
   the width axis is the site's display voice.
   ============================================ */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('../assets/fonts/bricolage-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/inter-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================
   JUAN DAVID COLORADO — PORTFOLIO
   Design System & Styles
   ============================================ */

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

:root {
  /* Colors — CV-aligned neutral palette */
  --color-bg: #FAFAF8;
  --color-bg-alt: #F2F1EF;
  --color-surface: #FFFFFF;
  --color-bg-dark: #111111;
  --color-text: #1A1A1A;
  --color-text-secondary: #6B6B6B;
  --color-text-light: #595959;
  --color-text-on-dark: #A3A3A3;
  --color-text-inverse: #FAFAF8;
  --color-accent: #0F766E;
  --color-accent-hover: #0B5A54;
  --color-border: #E5E5E3;
  --color-border-light: #F0F0EE;
  --color-nda: #57534E;
  --color-nda-bg: #F5F4F1;
  --color-nda-text: #57534E;
  --color-nda-border: #E2DFD9;
  --color-nav-bg: rgba(250, 250, 248, 0.92);
  --color-bg-dark-hover: #333333;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Smooth page load */
body.loading {
  opacity: 0;
}

body.loaded {
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* Custom selection */
::selection {
  background: var(--color-accent);
  color: white;
}

/* Display typeface — headings carry the owned voice; body/labels stay Inter */
.hero__title,
.section__title,
.case-hero__title,
.case-card__title,
.case-section__heading,
.templates-showcase__title,
.contact__title,
.next-project__title,
.nav__name {
  font-family: var(--font-display);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* Firefox scrollbar */
html {
  scrollbar-color: var(--color-border) var(--color-bg);
  scrollbar-width: thin;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- SKIP LINK (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-accent);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  font-size: 0.875rem;
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  transition: transform var(--transition-base);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.nav__links {
  position: relative;
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

/* Travelling active-underline indicator (additive over the scroll-spy; desktop only) */
.nav__indicator {
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
  list-style: none;
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.2s ease;
}
/* When JS drives the travelling indicator, drop the static per-link active underline on desktop */
.nav__links--js .nav__link--active::after { width: 0; }
@media (prefers-reduced-motion: reduce) {
  .nav__indicator { display: none; }
  .nav__links--js .nav__link--active::after { width: 100%; }
}

.nav__link {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 1px;
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--active {
  color: var(--color-text);
}

.nav__link--active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-text);
}

.nav__toggle svg {
  width: 24px;
  height: 24px;
}

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-4xl) var(--space-lg) var(--space-3xl);
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg);
}

/* Living aura: two slow-drifting teal radials. Brand-tied, works in both themes,
   sits behind everything (z 0). This is the "alive" feel without a rainbow-mesh cliché. */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(45, 212, 191, 0.07) 0%, transparent 58%),
    radial-gradient(circle at 82% 18%, rgba(15, 118, 110, 0.05) 0%, transparent 50%);
  animation: heroAuraDrift 22s ease-in-out infinite alternate;
}

@keyframes heroAuraDrift {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.06) translate(-1.8%, 1.8%); }
}

/* Whisper-fine film grain. Low opacity + sits beneath the content layer (z 1 < inner z 2),
   so the headline stays razor-crisp; it only textures the empty background. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.1;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 170px 170px;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2xl);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.hero__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-size: clamp(2.75rem, 6.5vw, 5rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--color-text);
  margin-bottom: var(--space-xl);
}

.hero__hook {
  font-size: clamp(1.1rem, 1.9vw, 1.3rem);
  line-height: 1.5;
  color: var(--color-text);
  font-weight: 600;
  max-width: 620px;
  margin: 0 auto var(--space-md);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.hero--loaded .hero__hook {
  opacity: 1; transform: translateY(0); transition-delay: 0.35s;
}
.hero__subtitle {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.hero__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.hero__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hero__meta-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding: 14px 28px;
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.hero__cta:hover {
  background: var(--color-bg-dark-hover);
  color: var(--color-text-inverse);
}

/* Premium tactile CTA: a single shine-sweep on hover + a lift with a soft teal glow.
   overflow:hidden clips the sweep; position:relative anchors it. */
.hero__cta {
  position: relative;
  overflow: hidden;
}
.hero__cta::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -120%;
  width: 60%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transition: left 0.6s var(--ease-out-quint, cubic-bezier(0.22, 1, 0.36, 1));
}
.hero__cta:hover::after { left: 130%; }

/* Scoped under .hero--loaded so it beats the entrance rule's transform: translateY(0). */
.hero--loaded .hero__cta:hover { transform: translateY(-3px); }
.hero--loaded .hero__cta:not(.hero__cta--secondary):hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(15, 118, 110, 0.22);
}

.hero__cta svg {
  transition: transform var(--transition-base);
}

.hero__cta:hover svg {
  transform: translateX(3px);
}

.hero__clients-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.hero__clients-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

/* --- HERO METRICS BAR (centered editorial layout) --- */
.hero__metrics-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.hero__clients-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
}

.hero__clients-row .hero__clients-label {
  margin-bottom: 0;
}

.hero__clients-row .hero__clients-list {
  justify-content: center;
}

/* --- SOCIAL PROOF (recommendation) --- */
.social-proof {
  padding: var(--space-3xl) var(--space-lg);
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.social-proof__inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.social-proof__mark {
  display: block;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 0.5;
  color: var(--color-accent);
  opacity: 0.55;
  margin-bottom: var(--space-sm);
  user-select: none;
}

.social-proof__quote {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-wrap: balance;
}

.social-proof__author {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.social-proof__author strong {
  color: var(--color-text);
  font-weight: 600;
}

/* --- SECTION --- */
.section {
  padding: var(--space-3xl) var(--space-lg);
}

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.section--dark .section__label {
  color: var(--color-text-on-dark);
}

.section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2xl);
}

.section__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-2xl);
}

/* --- CASE STUDY CARDS (Homepage Grid) --- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

/* Behance CTA in work section */
.work-cta {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  background: transparent;
}

.work-cta__text {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.work-cta__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.work-cta__link:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.12);
}

.work-cta__link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.case-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
}

/* Higher specificity than .fade-in so the spatial shadow + border transition smoothly
   on hover, while the scroll-reveal (opacity/transform) is preserved. */
.work-grid .case-card {
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease;
}

@media (hover: hover) {
  /* Spatial depth: stacked shadows mimic real distance from the surface,
     so the card reads as physically lifting rather than just gaining a drop shadow. */
  .case-card:hover {
    border-color: var(--color-text-light);
    transform: translateY(-6px);
    box-shadow:
      0 4px 6px rgba(0, 0, 0, 0.02),
      0 10px 15px rgba(0, 0, 0, 0.04),
      0 20px 30px rgba(0, 0, 0, 0.06),
      0 40px 60px rgba(0, 0, 0, 0.08);
    color: inherit;
  }
  /* Dark mode: shadow alone is invisible on near-black, so add a hairline inner
     highlight ring — the card reads as elevated by catching light on its top edge. */
  [data-theme="dark"] .case-card:hover {
    border-color: var(--color-border);
    box-shadow:
      0 10px 15px rgba(0, 0, 0, 0.30),
      0 20px 40px rgba(0, 0, 0, 0.45),
      inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  }
}

.case-card__image {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--color-bg-alt);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.case-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) {
  .case-card:hover .case-card__image img {
    transform: scale(1.04);
  }
}

.case-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-align: center;
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--color-bg-alt) 0%, #E8E7E5 100%);
}

.case-card__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.case-card__company {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.case-card__description {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.case-card__metrics {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-sm);
}

.case-card__metric {
  display: flex;
  flex-direction: column;
}

.case-card__metric-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
}

.case-card__metric-label {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 2px;
}

.case-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.tag {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--color-bg-alt);
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

.tag--nda {
  background: var(--color-nda-bg);
  color: var(--color-nda-text);
}

.case-card__arrow {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: auto;
  padding-top: var(--space-md);
  transition: gap var(--transition-base), color var(--transition-base);
}

@media (hover: hover) {
  .case-card:hover .case-card__arrow {
    gap: var(--space-md);
    color: var(--color-accent);
  }
}

/* --- CASE STUDY DETAIL PAGE --- */
.case-hero {
  padding: var(--space-4xl) var(--space-lg) var(--space-2xl);
}

.case-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.case-hero__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  transition: color var(--transition-fast);
}

.case-hero__back:hover {
  color: var(--color-text);
}

.case-hero__company {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.case-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  max-width: 800px;
}

.case-hero__subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin-bottom: var(--space-xl);
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.case-meta__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-meta__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-meta__value {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Case study content sections */
.case-section {
  padding: var(--space-3xl) var(--space-lg);
}

.case-section__inner {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.case-section__heading {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.case-section__text {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 68ch;
}

.case-section__inner .case-bullets,
.case-nda-note {
  max-width: 68ch;
}

.case-section__text strong {
  color: var(--color-text);
  font-weight: 600;
}

/* Case Study Recommendations */
.case-recommendations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.case-recommendation {
  padding: var(--space-xl);
  background: var(--color-bg-alt);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.case-recommendation__quote {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: var(--space-md);
}

.case-recommendation__author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-recommendation__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.case-recommendation__role {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.case-recommendation__source {
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  margin-top: var(--space-xs);
}

/* Thumbnail image card */
.case-image {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  cursor: pointer;
}

.case-image__container {
  position: relative;
  background: var(--color-bg-alt);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Expand icon overlay */
.case-image__container::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") no-repeat center;
  border-radius: 50%;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.case-image:focus-visible .case-image__container::before {
  opacity: 1;
  transform: scale(1);
}

/* Card hover lift */
.case-image:focus-visible .case-image__container {
  transition-duration: 0.4s;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

@media (hover: hover) {
  .case-image:hover .case-image__container::before {
    opacity: 1;
    transform: scale(1);
  }

  .case-image:hover .case-image__container {
    transition-duration: 0.4s;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  }
}

/* Intentional reduced-motion guard for the hover surfaces (not reliant on the global wildcard) */
@media (prefers-reduced-motion: reduce) {
  .principle-card, .template-card, .metric-card, .case-image__container { transition: none; }
}

.case-image__placeholder {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-light);
  text-align: center;
  padding: var(--space-xl);
  line-height: 1.8;
}

.case-image__caption {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  text-align: center;
  margin-top: var(--space-md);
  font-style: italic;
}

/* --- CASE IMAGE GRID --- */
.case-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.case-image-grid > .case-image {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Multi-image grids: uniform card height for visual rhythm */
.case-image-grid > .case-image:not(:only-child) .case-image__container {
  aspect-ratio: 16/10;
}

.case-image-grid > .case-image:not(:only-child) .case-image__screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.case-image-grid > .case-image:not(:only-child) .case-image__diagram {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: var(--space-lg);
}

/* Transparent containers get visible background for SVG diagrams in grids */
.case-image-grid .case-image__container--transparent {
  background: var(--color-bg-alt);
}

/* Case image container variants */
.case-image__container--contained {
  aspect-ratio: auto;
}

.case-image__container--transparent {
  aspect-ratio: auto;
  background: transparent;
}

.case-image__container--phone {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

/* Browser-window chrome on contained UI screenshots — matches the flagship
   case covers so on-page screenshots read as one framed system. Excludes
   phone screenshots (they get device treatment, not browser chrome). */
.case-image__container--contained:not(.case-image__container--phone) {
  padding-top: 30px;
  background: #14181A;
}

.case-image__container--contained:not(.case-image__container--phone)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background:
    radial-gradient(circle 5px at 20px 15px, #FF5F56 94%, rgba(0, 0, 0, 0) 100%),
    radial-gradient(circle 5px at 38px 15px, #FFBD2E 94%, rgba(0, 0, 0, 0) 100%),
    radial-gradient(circle 5px at 56px 15px, #27C93F 94%, rgba(0, 0, 0, 0) 100%),
    #14181A;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1;
  pointer-events: none;
}

/* Nudge the expand icon clear of the new title bar */
.case-image__container--contained:not(.case-image__container--phone)::before {
  top: 40px;
}

/* Screenshot images inside containers */
.case-image__screenshot {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.case-image__container:hover .case-image__screenshot {
  transform: scale(1.02);
}

/* SVG diagram images inside containers */
.case-image__diagram {
  width: 100%;
  height: auto;
}

/* Logo images in case study heroes */
.case-hero__logo {
  height: auto;
  width: auto;
  max-height: 48px;        /* tall cap — gives squarish logos (Nvidia, YMA) real presence */
  max-width: 175px;        /* width cap — stops wide logos from dominating */
  object-fit: contain;
  object-position: left center;
  margin-bottom: 16px;
  image-rendering: -webkit-optimize-contrast;
}

/* Bucket full wordmark (icon + bucket.io + tagline): wider allowance so it reads */
.case-hero__logo--lg {
  max-height: 48px;
  max-width: 210px;
}

/* Nvidia: nudge a little larger than the rest */
.case-hero__logo--nvidia {
  max-height: 72px;
}

/* --- METRICS ROW --- */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.metric-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  text-align: center;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.22s ease;
}

@media (hover: hover) {
  .metric-card:hover {
    transition-duration: 0.32s;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: var(--color-accent);
  }
}

.metric-card__value {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.metric-card__label {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* --- NDA BADGE --- */
.nda-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-nda-bg);
  border: 1px solid var(--color-nda-border);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-nda-text);
  margin-bottom: var(--space-lg);
}
.nda-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-accent);
}

/* --- CLIENT LOGOS (Marquee) --- */
.clients {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.clients__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--space-lg);
}

.clients__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
}

.clients__marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.clients__track {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  animation: marquee 35s linear infinite;
  flex-shrink: 0;
  padding-right: var(--space-2xl);
}

.clients__marquee:hover .clients__track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.clients__logo {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
  transition: color var(--transition-base);
  white-space: nowrap;
  flex-shrink: 0;
}

.clients__logo:hover {
  color: var(--color-text);
}

/* Fallback static grid */
.clients__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-xl) var(--space-2xl);
}

/* --- PRODUCTION TEMPLATES SHOWCASE --- */
.templates-showcase {
  padding: var(--space-3xl) 0;
  background: var(--color-bg-alt);
}

.templates-showcase__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.templates-showcase__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.templates-showcase__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.templates-showcase__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-text);
}

.templates-showcase__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.template-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.22s ease;
  text-decoration: none;
  display: block;
}

@media (hover: hover) {
  .template-card:hover {
    transition-duration: 0.34s;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  }
}

.template-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.template-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) {
  .template-card:hover .template-card__image img {
    transform: scale(1.03);
  }
}

.template-card__info {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-card__brand {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.template-card__type {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
}

/* Live-site cards: "Live" badge + accent label to signal these are clickable, running builds */
.template-card__image {
  position: relative;
}

.template-card__live {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(10, 15, 14, 0.78);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.template-card__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2DD4BF;
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.55);
  animation: livedotPulse 2.2s ease-out infinite;
}

@keyframes livedotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

.template-card--live .template-card__type {
  color: var(--color-accent);
}

@media (prefers-reduced-motion: reduce) {
  .template-card__live-dot { animation: none; }
}

/* --- ABOUT --- */
#about .section__label,
#about .section__title {
  text-align: center;
}

.about__content {
  max-width: 800px;
  margin: 0 auto;
}

.about__content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.about__content p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.about__philosophy {
  padding: var(--space-xl);
  background: var(--color-bg-alt);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  margin-top: var(--space-xl);
}

.about__philosophy blockquote {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.about__philosophy p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* --- ABOUT: scannable principles + "I code" highlight --- */
.about__content .about__lead {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--color-text);
  max-width: 680px;
  margin: 0 auto var(--space-2xl);
  text-align: center;
}

.about__principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.principle-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-lg);
  /* Asymmetric, no bounce: snappy exit (0.22s), deliberate enter (overridden on :hover) */
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease;
}

@media (hover: hover) {
  .principle-card:hover {
    transition-duration: 0.34s;
    transform: translateY(-4px);
    border-color: var(--color-text-light);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.07);
  }
  [data-theme="dark"] .principle-card:hover {
    border-color: var(--color-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  }
}

.about__principles .principle-card__title {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.about__principles .principle-card__text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.about__highlight {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-xl) var(--space-2xl);
  border-radius: 14px;
  margin-bottom: var(--space-xl);
}

[data-theme="dark"] .about__highlight {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.about__highlight-icon {
  flex-shrink: 0;
  line-height: 0;
}

.about__highlight-icon svg {
  width: 44px;
  height: 44px;
  color: var(--color-accent);
}

.about__highlight .about__highlight-text h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
  color: var(--color-text-inverse);
}

.about__highlight .about__highlight-text p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-on-dark);
  margin-bottom: 0;
}

.about__highlight em {
  color: #2DD4BF; /* bright teal: AA on the dark panel, brand-accent stays for light surfaces */
  font-style: normal;
  font-weight: 500;
}

@media (max-width: 768px) {
  .about__highlight {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
    padding: var(--space-xl);
  }
}

/* Testimonials */
.testimonials__heading {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.testimonial-card {
  padding: var(--space-xl);
  background: var(--color-bg-alt);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

@media (hover: hover) {
  .testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  }
}

.testimonial-card__quote {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.testimonial-card__author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-card__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.testimonial-card__role {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* Leadership callouts (case studies) */
.leadership-callout {
  padding: var(--space-xl);
  background: var(--color-bg-alt);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.leadership-callout__title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.leadership-callout__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.leadership-callout__list li {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.6;
  padding-left: var(--space-lg);
  position: relative;
}

.leadership-callout__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.leadership-callout__list li strong {
  color: var(--color-text);
}

/* Core expertise strip */

/* Skills grid */

/* --- CAREER TIMELINE --- */
.timeline {
  margin-top: var(--space-2xl);
  padding-left: var(--space-xl);
  border-left: 2px solid var(--color-border);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-xl);
  padding-left: var(--space-lg);
  transition: transform var(--transition-fast);
}

@media (hover: hover) {
  .timeline__item:hover {
    transform: translateX(4px);
  }
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl) - 5px);
  top: 6px;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  border: 2px solid var(--color-bg);
}

.timeline__item--current::before {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.2);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.timeline__role {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.timeline__company {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.timeline__desc {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  line-height: 1.5;
  margin-top: 6px;
  max-width: 500px;
}

/* SproutLoud expanded progression */
.timeline__progression {
  margin-top: var(--space-md);
  padding-left: var(--space-md);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.timeline__sub-role {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline__sub-date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
}

.timeline__sub-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.timeline__sub-role .timeline__desc {
  margin-top: 2px;
}

/* Languages grid */

/* Certifications grid */

/* --- CONTACT --- */
.contact {
  text-align: center;
}

.contact__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.contact__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.contact__link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(15, 118, 110, 0.04), transparent);
  transition: left 0.5s ease;
}

.contact__link:hover::before {
  left: 100%;
}

.contact__link:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.12);
}

.contact__link svg {
  width: 18px;
  height: 18px;
}

.section--dark .contact__title {
  color: var(--color-text-inverse);
}

.section--dark .contact__subtitle {
  color: var(--color-text-on-dark);
}

/* Subtle gradient accent on dark contact section */
.section--dark.section--contact {
  background: linear-gradient(180deg, #111111 0%, #0F172A 100%);
  position: relative;
  overflow: hidden;
}

.section--dark.section--contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.contact__link--dark {
  color: var(--color-text-inverse);
  border-color: rgba(255, 255, 255, 0.2);
}

.contact__link--dark::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.contact__link--dark:hover {
  color: var(--color-text-inverse);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- FOOTER --- */
.footer {
  padding: var(--space-xl) var(--space-lg);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__text {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.footer__link {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-text);
}

/* --- NEXT PROJECT NAVIGATION --- */
.next-project {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-lg);
  border-top: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-base), padding var(--transition-base);
}

.next-project:hover {
  background: var(--color-bg-alt);
  color: inherit;
  padding-left: calc(var(--space-lg) + 8px);
}

.next-project__title {
  transition: letter-spacing var(--transition-base);
}

.next-project:hover .next-project__title {
  letter-spacing: 0.01em;
}

.next-project__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.next-project__title {
  font-size: 1.5rem;
  font-weight: 700;
}

/* --- LIGHTBOX MODAL --- */
body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.lightbox--visible .lightbox__overlay {
  opacity: 1;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 92vw;
  max-height: 92vh;
  padding: var(--space-lg);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.lightbox.lightbox--visible .lightbox__content {
  opacity: 1;
  transform: scale(1);
}

.lightbox__image-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.lightbox__image-wrapper img,
.lightbox__image-wrapper video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

/* SVG images need explicit width since they use viewBox-relative sizing */
.lightbox__image-wrapper img[src$=".svg"] {
  width: 100%;
}

.lightbox__caption {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  text-align: center;
  margin-top: var(--space-md);
  max-width: 600px;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .case-image {
    max-width: 480px;
  }

  .case-image-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .case-image-grid > .case-image {
    max-width: none;
  }

  .metrics-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .case-image {
    max-width: 100%;
  }

  .case-image-grid {
    grid-template-columns: 1fr;
  }

  .case-image-grid > .case-image:not(:only-child) .case-image__container {
    aspect-ratio: auto;
  }

  .case-image-grid > .case-image:not(:only-child) .case-image__screenshot {
    height: auto;
    object-fit: unset;
  }

  .case-image-grid > .case-image:not(:only-child) .case-image__diagram {
    height: auto;
    padding: 0;
  }

  .case-recommendations {
    grid-template-columns: 1fr;
  }

  .templates-showcase__grid {
    grid-template-columns: 1fr;
  }

  .nav__links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-md);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  }

  /* Travelling indicator is meaningless in the vertical dropdown: hide it, restore the per-link underline */
  .nav__indicator { display: none; }
  .nav__links--js .nav__link--active::after { width: 100%; }

  .nav__toggle {
    display: block;
  }

  .nav__links--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    visibility: visible;
  }

  .nav__link::after {
    display: none;
  }

  .hero {
    padding-top: var(--space-3xl);
    min-height: auto;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .case-card {
    padding: var(--space-lg);
  }

  .case-card__metrics {
    flex-direction: column;
    gap: var(--space-md);
  }

  .metrics-row {
    grid-template-columns: 1fr;
  }

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

  .contact__links {
    flex-direction: column;
    align-items: center;
  }

  .footer__inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .clients__grid {
    gap: var(--space-lg) var(--space-xl);
  }
}

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

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1), transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays for grid children */
.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1), transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.fade-in-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.fade-in-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }
.fade-in-stagger.visible > *:nth-child(9) { transition-delay: 0.45s; }
.fade-in-stagger.visible > *:nth-child(10) { transition-delay: 0.5s; }
.fade-in-stagger.visible > *:nth-child(11) { transition-delay: 0.55s; }
.fade-in-stagger.visible > *:nth-child(12) { transition-delay: 0.6s; }

.fade-in-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Spacing utilities */
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

/* Hero entrance animation */
.hero__label,
.hero__title,
.hero__subtitle,
.hero__meta,
.hero__cta {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero--loaded .hero__label {
  opacity: 1; transform: translateY(0); transition-delay: 0.15s;
}
.hero--loaded .hero__title {
  opacity: 1; transform: translateY(0); transition-delay: 0.3s;
}
.hero--loaded .hero__subtitle {
  opacity: 1; transform: translateY(0); transition-delay: 0.45s;
}
.hero--loaded .hero__meta {
  opacity: 1; transform: translateY(0); transition-delay: 0.6s;
}
.hero--loaded .hero__cta {
  opacity: 1; transform: translateY(0); transition-delay: 0.75s;
}

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

  html {
    scroll-behavior: auto;
  }

  .fade-in,
  .fade-in-stagger > * {
    opacity: 1;
    transform: none;
  }

  .hero__label,
  .hero__hook,
  .hero__title,
  .hero__subtitle,
  .hero__meta,
  .hero__cta {
    opacity: 1;
    transform: none;
  }

  .clients__track {
    animation: none;
  }
}

/* ============================================
   REVIEW FIXES — a11y · responsive · polish
   ============================================ */

/* Fixed-nav offset so in-page anchors don't tuck headings under the navbar */
html { scroll-padding-top: 72px; }

/* WCAG 2.4.7 — visible focus ring on the image cards and a global interactive fallback */
.case-image:focus-visible .case-image__container {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Coarse pointers: always reveal the "expand" affordance (it was hover/focus-only) */
@media (hover: none) {
  .case-image__container::before { opacity: 1; transform: scale(1); }
}

/* Comfortable touch targets on phones for text-only nav/footer links */
@media (pointer: coarse) {
  .nav__link,
  .footer__link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Lightbox: let wide montages be pinch-zoomed / panned so they're legible on small screens */
.lightbox__image-wrapper {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pinch-zoom;
}

/* NDA note — turns the withheld Nvidia screens into a confident, deliberate signal */
.case-nda-note {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-xl);
  background: var(--color-nda-bg);
  border: 1px solid var(--color-nda-border);
  border-radius: 10px;
  color: var(--color-nda-text);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Translated testimonial */
.case-recommendation__translation {
  margin-top: var(--space-md);
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.case-recommendation__translation span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
}

/* Certs curation note */
.certs-note {
  margin-top: var(--space-lg);
  color: var(--color-text-light);
  font-size: 0.875rem;
}

.certs-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Tighter rhythm on small screens — less empty scroll, more readable column */
@media (max-width: 640px) {
  .hero { padding: var(--space-3xl) var(--space-md) var(--space-2xl); }
  .section { padding: var(--space-2xl) var(--space-md); }
  .case-hero { padding: var(--space-3xl) var(--space-md) var(--space-2xl); }
  .case-section { padding: var(--space-2xl) var(--space-md); }
}

/* ============================================
   SIGNATURE INTERACTION — "scan / declassify" sweep
   A teal light passes down each case-card cover on hover, nodding to
   the AI-analysis + NDA narrative. Impeccable motion laws: transform/
   opacity only, ease-out-expo curve, no bounce, reduced-motion safe.
   ============================================ */
.case-card__image::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 45%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(15, 118, 110, 0.30) 50%,
    transparent 100%);
  transform: translateY(-130%);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: multiply;
}

@media (hover: hover) {
  .case-card:hover .case-card__image::after {
    animation: scan-sweep 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes scan-sweep {
  0%   { transform: translateY(-130%); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(230%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .case-card__image::after { display: none; }
  .hero::before { animation: none; }
  .hero__cta::after { display: none; }
}

/* --- CURRENT ROLE BAND (Symplast) --- */
.current-role {
  padding: var(--space-2xl) var(--space-lg);
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.current-role__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.current-role__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0A5D55; /* darker than the accent: 11px text needs 4.5:1 on the tinted pill */
  background: rgba(15, 118, 110, 0.10);
  border: 1px solid rgba(15, 118, 110, 0.28);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: var(--space-lg);
}
.current-role__badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}
.current-role__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}
.current-role__title span {
  color: var(--color-accent);
}
.current-role__desc {
  max-width: 68ch;
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}
.current-role__points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md) var(--space-xl);
}
.current-role__points li {
  position: relative;
  padding-left: 24px;
  color: var(--color-text);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.current-role__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}
@media (max-width: 640px) {
  .current-role { padding: var(--space-2xl) var(--space-md); }
}

/* --- HERO CTAs (primary + Download CV) --- */
.hero__ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.hero__ctas .hero__cta { margin-top: 0; }
.hero__cta--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.hero__cta--secondary:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-color: var(--color-text-light);
  box-shadow: none;
}

/* --- Case bullet list (scannable prose) --- */
.case-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}
.case-bullets li {
  position: relative;
  padding-left: 26px;
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.6;
}
.case-bullets li strong { color: var(--color-text); }
.case-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ============================================
   BENTO — featured lead case (asymmetric work grid)
   ============================================ */
.case-card--feature {
  grid-column: 1 / -1;
  position: relative;
  flex-direction: row;
  align-items: stretch;
  gap: var(--space-2xl);
  padding: var(--space-xl);
}
.case-card--feature .case-card__image {
  flex: 1.2;
  aspect-ratio: auto;
  min-height: 340px;
  margin-bottom: 0;
}
.case-card--feature .case-card__content {
  flex: 1;
  justify-content: center;
}
.case-card--feature .case-card__title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}
.case-card--feature .case-card__description {
  font-size: 1.0625rem;
}

/* "Featured case" pill — solid (no glassmorphism), on-brand teal */
.case-card__featured {
  position: absolute;
  top: var(--space-lg);
  left: var(--space-lg);
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-bg);
  border: 1px solid rgba(15, 118, 110, 0.32);
  padding: 5px 11px;
  border-radius: 999px;
}

@media (max-width: 760px) {
  .case-card--feature {
    flex-direction: column;
    gap: 0;
    padding: var(--space-lg);
  }
  .case-card--feature .case-card__image {
    aspect-ratio: 16/10;
    min-height: 0;
    margin-bottom: var(--space-md);
  }
  .case-card__featured {
    top: calc(var(--space-lg) + var(--space-xs));
    left: calc(var(--space-lg) + var(--space-xs));
  }
}

/* --- CASE TL;DR (Problem / What I did / Outcome) — skim payoff under each hero --- */
.case-tldr__inner {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-2xl);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--color-border);
}
.case-tldr__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}
.case-tldr__col--out .case-tldr__label { color: var(--color-accent); }
.case-tldr__col p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.case-tldr__col--out p { color: var(--color-text); font-weight: 500; }
@media (max-width: 700px) {
  .case-tldr__inner { grid-template-columns: 1fr; gap: var(--space-md); padding-bottom: var(--space-xl); }
}

/* ============================================
   DARK MODE — system preference + manual toggle (data-theme on <html>)
   ============================================ */
[data-theme="dark"] {
  --color-bg: #0E1413;
  --color-bg-alt: #161E1C;
  --color-surface: #141B1A;
  --color-bg-dark: #1A2422;
  --color-bg-dark-hover: #243230;
  --color-text: #ECEFEE;
  --color-text-secondary: #9FAAA8;
  --color-text-light: #889390;
  --color-text-on-dark: #B8C2C0;
  --color-text-inverse: #ECEFEE;
  --color-accent: #2DD4BF;
  --color-accent-hover: #5EEAD4;
  --color-border: #2A3432;
  --color-border-light: #202927;
  --color-metric: #ECEFEE;
  --color-nda-bg: rgba(255, 255, 255, 0.06);
  --color-nda-text: #A8A29E;
  --color-nda-border: rgba(255, 255, 255, 0.13);
  --color-nav-bg: rgba(14, 20, 19, 0.82);
}

/* Primary CTA stays a clear light button on dark */
[data-theme="dark"] .hero__cta { background: var(--color-text); color: #0E1413; }
[data-theme="dark"] .hero__cta:hover { background: #ffffff; color: #0E1413; }
/* Contact section: subtle elevated dark instead of the light-mode gradient */
[data-theme="dark"] .section--dark.section--contact {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}
/* Light screenshots/diagrams: dark frame + slightly tame the glare */
[data-theme="dark"] .case-image__container,
[data-theme="dark"] .case-card__image { background: #0A0F0E; }
[data-theme="dark"] .case-image__screenshot,
[data-theme="dark"] .case-card__image img { filter: brightness(0.94); }
[data-theme="dark"] ::selection { color: #0E1413; }

/* Client logos in dark mode: keep EXACT brand colors (Nvidia green, Bucket orange,
   Solving's palette) on a subtle light "brand plate". An invert/hue-rotate filter
   would distort all three — only a pure-black logo survives it, and only YMA is pure black. */
[data-theme="dark"] .case-hero__logo {
  box-sizing: content-box;
  background: #FAFAF8;
  padding: 11px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* --- Theme toggle button --- */
.nav__name { margin-right: auto; }
.theme-toggle {
  background: none; border: none; cursor: pointer;
  padding: 8px; margin-right: var(--space-sm);
  color: var(--color-text-secondary);
  display: inline-flex; align-items: center;
  border-radius: 6px; transition: color var(--transition-fast), background var(--transition-fast);
}
.theme-toggle:hover { color: var(--color-text); background: var(--color-bg-alt); }
.theme-toggle:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }

/* --- Section stepper: compact "where am I" rail (desktop only) --- */
.section-nav {
  position: fixed;
  top: 50%;
  right: 26px;
  transform: translateY(-50%);
  z-index: 55;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.section-nav:hover { opacity: 1; }

.section-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.section-nav__item {
  position: relative;
  display: block;
  padding: 6px 0;
  line-height: 0;
  text-decoration: none;
  cursor: pointer;
}

.section-nav__dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--color-text-light);
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* labels are absolutely positioned, so the idle rail is just dots and never
   reserves gutter space; they slide out on hover/focus */
.section-nav__label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-text-light);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.2s ease;
}

.section-nav:hover .section-nav__label,
.section-nav__item:focus-visible .section-nav__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.section-nav__item:hover .section-nav__dot { border-color: var(--color-accent); }
.section-nav__item:hover .section-nav__label { color: var(--color-text); }

/* active step: filled teal dot, scaled up */
.section-nav__item--active .section-nav__dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.3);
}
.section-nav__item--active .section-nav__label {
  color: var(--color-text);
  font-weight: 500;
}

.section-nav__item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 50%;
}

/* only render where there's gutter beside the 1200px content column */
@media (max-width: 1279px) {
  .section-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .section-nav__label,
  .section-nav:hover .section-nav__label,
  .section-nav__item:focus-visible .section-nav__label { transform: translateY(-50%); }
  .section-nav__item--active .section-nav__dot { transform: none; }
}

/* ============================================
   SPEC MODE — the Design ⇄ Spec toggle.
   The portfolio's thesis made tangible: flip any
   flagship case image into its annotated thinking layer.
   ============================================ */
.spec-figure .case-image__container { position: relative; }

.spec-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  background: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(17, 17, 17, 0.12);
}

.spec-toggle span {
  padding: 4px 10px;
  border-radius: 100px;
  transition: background var(--transition-base), color var(--transition-base);
}

.spec-toggle span:first-child {
  background: var(--color-text);
  color: var(--color-bg);
}

.spec-toggle[aria-pressed="true"] span:first-child {
  background: transparent;
  color: var(--color-text-light);
}

.spec-toggle[aria-pressed="true"] span:last-child {
  background: var(--color-accent);
  color: #FAFAF8;
}

.spec-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Annotation layer */
.spec-layer {
  list-style: none;
  margin: 0;
  padding: 0;
}

.spec-figure:not(.spec-figure--on) .spec-layer { display: none; }

.spec-figure--on .case-image__screenshot,
.spec-figure--on .case-image__diagram {
  filter: saturate(0.2) brightness(0.55) contrast(0.9);
  transition: filter 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.spec-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  max-width: min(280px, 44%);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  animation: spec-pin-in 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: calc(var(--i) * 90ms);
}

@keyframes spec-pin-in {
  to { opacity: 1; transform: translateY(0); }
}

.spec-pin__dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.35);
}

.spec-pin__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #FAFAF8;
  background: rgba(14, 20, 19, 0.92);
  border: 1px solid rgba(15, 118, 110, 0.55);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
}

[data-theme="dark"] .spec-pin__label {
  background: rgba(10, 15, 14, 0.94);
  border-color: rgba(45, 212, 191, 0.45);
}

[data-theme="dark"] .spec-pin__dot {
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.3);
}

/* Small screens: the overlay would collide — render pins as a list under the image */
@media (max-width: 700px) {
  .spec-figure--on .case-image__container { aspect-ratio: auto; }
  .spec-figure--on .spec-layer {
    display: block;
    padding: var(--space-sm) 0 0;
  }
  .spec-pin {
    position: static;
    max-width: none;
    margin-bottom: 8px;
    animation: none;
    opacity: 1;
    transform: none;
  }
  .spec-pin__label {
    color: var(--color-text);
    background: var(--color-bg-alt);
    border-color: var(--color-border);
  }
  .spec-figure--on .case-image__screenshot,
  .spec-figure--on .case-image__diagram { filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .spec-pin { animation: none; opacity: 1; transform: none; }
}

/* Compact spec figures (narrow grid cells): same list fallback as mobile.
   Overlay pins need ~560px of image to breathe; below that they smother it. */
.spec-figure { container-type: inline-size; }

@container (max-width: 460px) {
  /* The container is aspect-locked (grid uniformity rule wins on specificity);
     match it so the list can grow the box */
  .case-image-grid > .spec-figure--on:not(:only-child) .case-image__container,
  .spec-figure--on .case-image__container { aspect-ratio: auto; }
  .spec-figure--on .spec-layer {
    display: block;
    padding: var(--space-sm) 0 0;
  }
  .spec-pin {
    position: static;
    max-width: none;
    margin-bottom: 8px;
    animation: none;
    opacity: 1;
    transform: none;
  }
  .spec-pin__label {
    color: var(--color-text);
    background: var(--color-bg-alt);
    border-color: var(--color-border);
  }
  .spec-figure--on .case-image__screenshot,
  .spec-figure--on .case-image__diagram { filter: none; }
}

/* CTAs reused outside the home hero (404 page) skip the entrance animation
   that only .hero--loaded ever releases */
.case-hero .hero__cta {
  opacity: 1;
  transform: none;
}

.case-hero .hero__ctas {
  justify-content: flex-start;
}

/* Spec stage: after the a11y restructure the lightbox trigger is the
   container alone; toggle and pins are its siblings inside this wrapper */
.spec-stage { position: relative; }

.spec-hint {
  margin: 6px 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* One-time attention pulse when the toggle first scrolls into view */
@keyframes spec-pulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(15, 118, 110, 0); }
}

.spec-toggle--pulse { animation: spec-pulse 1.1s ease-out 2; }

@media (prefers-reduced-motion: reduce) {
  .spec-toggle--pulse { animation: none; }
}

/* Pause control for the looping product demo (WCAG 2.2.2) */
.video-control {
  text-align: center;
  margin: var(--space-sm) 0 0;
}

.video-pause {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 6px 14px;
  cursor: pointer;
}

.video-pause:hover {
  color: var(--color-text);
  border-color: var(--color-text-light);
}

.video-pause:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ============================================
   MORE WORK — the quieter row under the three flagship cases
   ============================================ */
.more-work__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin: var(--space-2xl) 0 var(--space-md);
}

.more-work {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.more-work__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  text-decoration: none;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.more-work__item:hover {
  border-color: var(--color-text-light);
  transform: translateY(-2px);
}

.more-work__kicker {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.more-work__title {
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
}

.more-work__arrow {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-accent);
}

/* ============================================
   NOTES — thinking in public
   ============================================ */
.note-card {
  display: block;
  max-width: 720px;
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-bg);
  text-decoration: none;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.note-card:hover {
  border-color: var(--color-text-light);
  transform: translateY(-2px);
}

.note-card__date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.note-card__title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 8px 0;
  color: var(--color-text);
}

.note-card__excerpt {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 10px;
  font-size: 0.9375rem;
  max-width: 62ch;
}

.note-card__arrow {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
}


/* ============================================
   TYPE VOICE — the display register: condensed, heavy, close-set.
   Bricolage's width axis at ~82% with weight 800 is the one move
   that makes the big moments unmistakably this site's.
   ============================================ */
.hero__title,
.case-hero__title,
.section__title,
.contact__title,
.templates-showcase__title,
.note-card__title,
.next-project__title {
  font-stretch: 82%;
  font-weight: 800;
  font-variation-settings: 'opsz' 96;
}

.hero__title {
  font-size: clamp(3rem, 7.5vw, 6rem);
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.case-hero__title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.section__title,
.contact__title,
.templates-showcase__title {
  letter-spacing: -0.02em;
}

/* Sub-display level keeps a gentler stretch so body pages breathe */
.case-section__heading,
.case-card__title,
.current-role__title {
  font-stretch: 90%;
}

/* ============================================
   SITE SPEC MODE — press S: the whole portfolio shows its work.
   Same visual language as the per-figure spec layer.
   ============================================ */
.spec-mode-btn {
  font-family: var(--font-mono);
  font-size: inherit;
  letter-spacing: 0.04em;
  color: var(--color-text-light);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.spec-mode-btn:hover { color: var(--color-accent); }

.spec-mode-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.spec-mode-btn[aria-pressed="true"] { color: var(--color-accent); }

/* 12-column rhythm overlay */
body.site-spec::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to right,
      rgba(15, 118, 110, 0.05) 0,
      rgba(15, 118, 110, 0.05) calc((100% - 11 * 24px) / 12),
      transparent calc((100% - 11 * 24px) / 12),
      transparent calc((100% - 11 * 24px) / 12 + 24px)
    );
  max-width: 1200px;
  margin: 0 auto;
}

/* Exit hint */
body.site-spec::after {
  content: 'SPEC · shift+S to exit';
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FAFAF8;
  background: rgba(14, 20, 19, 0.92);
  border: 1px solid rgba(15, 118, 110, 0.55);
  border-radius: 100px;
  padding: 8px 14px;
}

/* Annotated elements */
body.site-spec [data-spec] {
  position: relative;
  outline: 1px dashed rgba(15, 118, 110, 0.45);
  outline-offset: 6px;
}

.spec-chip {
  position: absolute;
  top: -14px;
  left: 0;
  z-index: 60;
  max-width: min(340px, 80vw);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #FAFAF8;
  background: rgba(14, 20, 19, 0.92);
  border: 1px solid rgba(15, 118, 110, 0.55);
  border-radius: 8px;
  padding: 6px 10px;
  pointer-events: none;
}

[data-theme="dark"] .spec-chip,
[data-theme="dark"] body.site-spec::after {
  background: rgba(10, 15, 14, 0.94);
  border-color: rgba(45, 212, 191, 0.45);
}

/* Spec mode is a desktop instrument */
@media (max-width: 899px) {
  .spec-mode-btn { display: none; }
}

/* Case-study hero cover — staged spatial scene (real UI in an AI-generated backdrop) */
.case-hero__cover {
  margin-top: var(--space-2xl);
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}
.case-hero__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}



/* ============================================================
   EVIDENCE SYSTEM — dark opening movement
   The hero and the featured case share one ink surface, so the
   page opens dark and lifts into paper. See DESIGN.md.
   ============================================================ */

:root {
  --paper:        oklch(0.982 0.005 175);
  --paper-sunk:   oklch(0.955 0.008 175);
  --ink:          oklch(0.175 0.018 195);
  --ink-raised:   oklch(0.235 0.022 195);
  --teal-bright:  oklch(0.78 0.13 178);
  --signal:       oklch(0.82 0.145 74);
  --on-ink:       oklch(0.96 0.004 175);
  --on-ink-soft:  oklch(0.745 0.011 195);
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
}

.hero--ink {
  background: var(--ink);
  color: var(--on-ink);
  min-height: 0;
  padding-block: clamp(4.5rem, 7vw, 6.5rem) clamp(3rem, 5vw, 4.5rem);
  align-items: stretch;
  overflow: hidden;
}
.hero--ink .hero__inner {
  max-width: 1280px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: center;
  text-align: left;
}
.hero__copy { min-width: 0; }

.hero__eyebrow {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--on-ink-soft);
  margin: 0 0 var(--space-lg);
}
.hero__eyebrow span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-bright); flex: none;
}

/* Tight, heavy, and set so the line breaks land on meaning. */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  font-weight: 800;
  font-stretch: 92%;
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--on-ink);
  margin: 0 0 var(--space-lg);
  text-transform: none;
}
.hero__title em { font-style: normal; color: var(--teal-bright); }

.hero__lede {
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.66;
  color: var(--on-ink-soft);
  max-width: 46ch;
  margin: 0 0 var(--space-xl);
}

.hero--ink .hero__ctas { justify-content: flex-start; margin-bottom: var(--space-xl); }
.hero--ink .hero__cta {
  background: var(--on-ink); color: var(--ink);
  border: 1px solid transparent;
}
.hero--ink .hero__cta:hover { background: #fff; }
.hero--ink .hero__cta--secondary {
  background: transparent; color: var(--on-ink);
  border-color: oklch(0.42 0.02 195);
}
.hero--ink .hero__cta--secondary:hover { background: oklch(0.26 0.022 195); color: var(--on-ink); }

/* --- The stage: three real interfaces, overlapped --- */
.stage { position: relative; min-width: 0; aspect-ratio: 1 / 0.82; }
.stage__card {
  position: absolute; display: block; text-decoration: none;
  border-radius: 10px; overflow: hidden;
  border: 1px solid oklch(0.36 0.022 195);
  background: var(--ink-raised);
  box-shadow: 0 30px 70px -34px oklch(0.05 0.01 195 / 0.95);
  transition: transform 0.5s var(--ease-out-quart), border-color 0.5s var(--ease-out-quart);
}
.stage__card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.stage__card:hover, .stage__card:focus-visible {
  transform: translateY(-6px); border-color: var(--teal-bright); z-index: 4;
}
.stage__card--main { left: 0;   top: 14%; width: 74%; aspect-ratio: 16/10; z-index: 1; }
.stage__card--top  { right: 0;  top: 0;   width: 52%; aspect-ratio: 16/10; z-index: 2; }
.stage__card--low  { right: 6%; bottom: 0; width: 34%; aspect-ratio: 4/5;  z-index: 3; }

.stage__tag {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.55rem 0.7rem;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--on-ink-soft);
  background: linear-gradient(to top, oklch(0.13 0.014 195 / 0.94), transparent);
}
.stage__tag b { color: var(--on-ink); font-weight: 600; }

.stage__note {
  position: absolute; z-index: 5;
  font-family: var(--font-mono); font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--ink); background: var(--teal-bright);
  padding: 4px 9px; border-radius: 3px; white-space: nowrap;
}
.stage__note--a { left: 2%;  bottom: 12%; }
.stage__note--b { right: 2%; top: 40%; }

/* --- Receipt on ink --- */
.receipt--ink { background: var(--ink-raised); border-color: oklch(0.34 0.022 195); }
.receipt--ink .receipt__claim { color: var(--on-ink); }
.receipt--ink .receipt__summary:hover { background: oklch(0.28 0.024 195); }
.receipt--ink .receipt__rows { border-top-color: oklch(0.32 0.02 195); }
.receipt--ink .receipt__row { border-bottom-color: oklch(0.27 0.018 195); }
.receipt--ink .receipt__rows dt { color: var(--on-ink-soft); }
.receipt--ink .receipt__rows dd { color: var(--on-ink); }
.receipt--ink .receipt__row--caveat dd { color: var(--on-ink-soft); }
.receipt--ink .receipt__row--caveat dt,
.receipt--ink .receipt__marker { color: oklch(0.86 0.13 74); }
.receipt--ink .receipt__marker { background: oklch(0.31 0.06 74); border-color: oklch(0.44 0.085 74); }
.receipt--ink .receipt__out { color: var(--teal-bright); }
.receipt--ink .receipt__out:hover { border-bottom-color: var(--teal-bright); }

@media (max-width: 980px) {
  .hero--ink .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .stage { aspect-ratio: 1 / 0.7; order: -1; }
  .hero__title { font-size: clamp(2.2rem, 8vw, 3.2rem); }
}
@media (max-width: 620px) {
  .stage { aspect-ratio: 1 / 0.78; }
  .stage__note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage__card { transition: none; }
  .stage__card:hover { transform: none; }
}
/* ============================================================
   EVIDENCE SYSTEM
   The site's premise: every quantitative claim opens and shows
   its method, its sample and the caveat that weakens it. Amber
   is reserved for that and nothing else. See DESIGN.md.
   ============================================================ */



/* --- The receipt --- */

.receipt {
  background: var(--paper-sunk);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.receipt__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding: clamp(1rem, 2vw, 1.4rem) clamp(1.1rem, 2.2vw, 1.6rem);
  transition: background 0.3s var(--ease-out-quart);
}
.receipt__summary::-webkit-details-marker { display: none; }
.receipt__summary:hover { background: oklch(0.93 0.012 175); }
.receipt__summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.receipt__claim {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  font-weight: 700;
  font-stretch: 88%;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
}

/* Amber means: this opens. Reserved, never decorative. */
.receipt__marker {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: oklch(0.52 0.11 74);
  background: oklch(0.94 0.055 74);
  border: 1px solid oklch(0.86 0.09 74);
  border-radius: 2px;
  padding: 3px 7px;
  white-space: nowrap;
}
.receipt__marker::after { content: ' +'; }
.receipt[open] .receipt__marker::after { content: ' \2212'; }

.receipt__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out-quart);
}
.receipt[open] .receipt__body { grid-template-rows: 1fr; }
.receipt__body > div { overflow: hidden; }

.receipt__rows {
  margin: 0;
  padding: 0 clamp(1.1rem, 2.2vw, 1.6rem);
  border-top: 1px solid var(--color-border);
}

.receipt__row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-md);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-border-light);
}
.receipt__row:last-of-type { border-bottom: 0; padding-bottom: 0; }

.receipt__rows dt {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  padding-top: 0.22rem;
}

.receipt__rows dd {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--color-text);
}
.receipt__rows dd b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* The caveat is mandatory and is marked as the honest part. */
.receipt__row--caveat dt { color: oklch(0.52 0.11 74); }
.receipt__row--caveat dd { color: var(--color-text-secondary); }

.receipt__out {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: var(--space-md) clamp(1.1rem, 2.2vw, 1.6rem) clamp(1.15rem, 2.2vw, 1.55rem);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out-quart);
}
.receipt__out:hover { border-bottom-color: var(--color-accent); }

/* --- Full-bleed ink band: the committed colour --- */

.band-ink {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border: 0;
}
.band-ink__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: var(--space-lg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.band-ink__label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: var(--space-md);
}
.band-ink__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 800;
  font-stretch: 84%;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--on-ink);
  margin: 0 0 var(--space-md);
}
.band-ink__text {
  font-size: 1rem;
  line-height: 1.66;
  color: var(--on-ink-soft);
  max-width: 46ch;
  margin: 0 0 var(--space-lg);
}
.band-ink__figure { margin: 0; }
.band-ink__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  /* The artwork is dark; without this it dissolves into the ink. */
  border: 1px solid oklch(0.34 0.026 192);
  box-shadow: 0 24px 60px -30px oklch(0.08 0.02 192 / 0.9);
}
.band-ink__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--teal-bright);
  padding: 0.7rem 1.1rem;
  border-radius: 3px;
  text-decoration: none;
  transition: transform 0.35s var(--ease-out-quart), background 0.35s var(--ease-out-quart);
}
.band-ink__cta:hover { transform: translateY(-2px); background: var(--on-ink); }

@media (max-width: 940px) {
  .hero__split,
  .band-ink__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__title { font-stretch: 82%; }
  .receipt__row { grid-template-columns: 5.5rem minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .receipt__body { transition: none; }
  .band-ink__cta { transition: none; }
  .band-ink__cta:hover { transform: none; }
}

/* --- Evidence system in dark mode ---
   The paper/ink relationship inverts: the page goes deep, and the ink
   band lifts instead of sinking so it still reads as a distinct movement. */
[data-theme="dark"] {
  --paper:       oklch(0.19 0.013 175);
  --paper-sunk:  oklch(0.235 0.016 175);
  --ink:         oklch(0.275 0.030 192);
  --ink-raised:  oklch(0.325 0.032 192);
  --signal:      oklch(0.84 0.135 74);
  --on-ink:      oklch(0.95 0.006 175);
  --on-ink-soft: oklch(0.78 0.012 192);
}

[data-theme="dark"] .receipt__summary:hover { background: oklch(0.28 0.018 175); }

[data-theme="dark"] .receipt__marker {
  color: oklch(0.86 0.13 74);
  background: oklch(0.30 0.055 74);
  border-color: oklch(0.42 0.08 74);
}

[data-theme="dark"] .receipt__row--caveat dt { color: oklch(0.82 0.12 74); }

[data-theme="dark"] .band-ink__figure img {
  border-color: oklch(0.40 0.028 192);
  box-shadow: 0 24px 60px -30px oklch(0.05 0.02 192 / 0.95);
}

[data-theme="dark"] .band-ink__cta { color: oklch(0.16 0.02 192); }

/* --- Ink band as the featured slot inside Selected Work ---
   It is no longer a full-bleed section, so it becomes an inset panel that
   still owns its colour and still reads as a different movement. */
.band-ink--inset {
  border-radius: 6px;
  padding-block: clamp(2.25rem, 4vw, 3.25rem);
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
.band-ink--inset .band-ink__inner {
  padding-inline: clamp(1.5rem, 3.5vw, 3rem);
  /* More room for the headline: at the inset width it was breaking to three lines. */
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
}
.band-ink--inset .band-ink__title { font-size: clamp(1.75rem, 2.9vw, 2.5rem); }

/* --- One display voice across the page ---
   The hero set the register: compressed, uppercase, heavy. Section titles
   were still title-case at normal width, which read as two different sites. */
.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 82%;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.98;
}

/* Every number on a card carries where it came from. The cards are anchors,
   so they cannot nest a <details>; the sourcing goes inline instead and the
   full receipt lives on the case page. */
.case-card__source {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.case-card__source::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  margin-right: 0.5rem;
  vertical-align: 0.12em;
}

/* Same display voice as the hero and the section titles. */
.current-role__title {
  font-stretch: 84%;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  font-weight: 800;
}

/* ============================================================
   WCAG 2.2 SC 2.5.8 — target size (minimum 24x24)
   Measured 2026-07-29: nav links were ~41x16, the section-stepper
   dots 9x21. The hit areas grow; nothing moves visually.
   ============================================================ */

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding-block: 4px;
}

.section-nav__item {
  padding: 6px;
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* The marquee clips names mid-word at both edges, which reads as a
   rendering fault rather than as motion. Mask the edges so the cut
   is legible as deliberate. */
.clients {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

/* Same criterion, the rest of the inline links and small controls. */
.receipt__out,
.spec-mode-btn,
.footer__link,
.footer a,
.more-work__item {
  min-height: 24px;
  padding-block: 3px;
}
.receipt__out,
.spec-mode-btn,
.footer__link,
.footer a {
  display: inline-flex;
  align-items: center;
}

.certs-note a { min-height: 24px; padding-block: 3px; display: inline-flex; align-items: center; }

/* --- Receipt on ink: raised specificity ---
   The base .receipt rules are declared later in this file, so a single
   .receipt--ink class loses on source order. Doubling the class wins
   without resorting to !important. */
.receipt.receipt--ink { background: var(--ink-raised); border-color: oklch(0.34 0.022 195); }
.receipt.receipt--ink .receipt__claim { color: var(--on-ink); }
.receipt.receipt--ink .receipt__summary:hover { background: oklch(0.28 0.024 195); }
.receipt.receipt--ink .receipt__rows { border-top-color: oklch(0.32 0.02 195); }
.receipt.receipt--ink .receipt__row { border-bottom-color: oklch(0.27 0.018 195); }
.receipt.receipt--ink .receipt__rows dt { color: var(--on-ink-soft); }
.receipt.receipt--ink .receipt__rows dd { color: var(--on-ink); }
.receipt.receipt--ink .receipt__rows dd b { color: var(--teal-bright); }
.receipt.receipt--ink .receipt__row--caveat dd { color: var(--on-ink-soft); }
.receipt.receipt--ink .receipt__row--caveat dt,
.receipt.receipt--ink .receipt__marker { color: oklch(0.87 0.13 74); }
.receipt.receipt--ink .receipt__marker { background: oklch(0.30 0.06 74); border-color: oklch(0.44 0.085 74); }
.receipt.receipt--ink .receipt__out { color: var(--teal-bright); }
.receipt.receipt--ink .receipt__out:hover { border-bottom-color: var(--teal-bright); }

/* The captured interfaces are mostly light, so the label needs a real
   scrim rather than a soft gradient, or it sits on white and vanishes. */
.stage__card .stage__tag {
  padding: 0.75rem 0.75rem 0.6rem;
  background: linear-gradient(to top,
    oklch(0.12 0.012 195 / 0.97) 0%,
    oklch(0.12 0.012 195 / 0.88) 55%,
    oklch(0.12 0.012 195 / 0) 100%);
  text-shadow: 0 1px 2px oklch(0.10 0.01 195 / 0.8);
}

/* The copy column runs tall because the receipt is open by default, so the
   stage stretches to match rather than floating in the middle of a void. */
.hero--ink .hero__inner { align-items: stretch; }
.stage { aspect-ratio: auto; min-height: clamp(30rem, 46vw, 41rem); }
.stage__card--main { left: 0;   top: 8%;   width: 76%; }
.stage__card--top  { right: 0;  top: 0;    width: 54%; }
.stage__card--low  { right: 4%; bottom: 4%; width: 36%; }
.stage__note--a { left: 3%;  bottom: 20%; }
.stage__note--b { right: 3%; top: 38%; }

@media (max-width: 980px) {
  .stage { min-height: clamp(20rem, 62vw, 28rem); }
}
