/* Portfolio Base Styles - 2026 Portfolio Update */
/* A clean foundation for your design refresh */

:root {
  --color-text: #e5e5e5;
  --color-text-paragraph: rgba(255, 255, 255, 0.9);
  --color-text-muted: #9ca3af;
  --color-bg: #04030a;
  --color-bg-alt: #1a1a1a;
  --color-accent: #60a5fa;
  /* Match “View case study →” hover on feature cards (teal + glow) */
  --link-hover-color: #b8f5ea;
  --link-hover-glow: 0 0 28px rgba(95, 225, 210, 0.245);
  --color-border: #2a2a2a;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --max-width: 720px;
  --max-width-wide: 960px;

  /*
    Editorial content surface — same indigo family as homepage main/hero tail,
    flattened for readability (no grid, no horizon spectacle).
  */
  --content-surface-base: #050814;
  --content-surface-elevated: #060918;
  --content-surface-mid: #050a16;
  --content-surface-deep: #040716;
  --content-surface-floor: #030612;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

/*
  Internal pages (resume, approach, case studies): same world as the homepage,
  editorial quiet — stable dark field, whisper of cool/magenta ambient, trace grain only.
*/
body.content-page {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background-color: var(--content-surface-base);
  background-image: linear-gradient(
    180deg,
    var(--content-surface-elevated) 0%,
    var(--content-surface-base) 28%,
    var(--content-surface-base) 62%,
    var(--content-surface-mid) 88%,
    var(--content-surface-floor) 100%
  );
}

body.content-page::before,
body.content-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Single soft cool wash — no horizon line, no second focal lamp */
body.content-page::before {
  opacity: 1;
  background: radial-gradient(
    ellipse 130% 65% at 50% -25%,
    rgba(82, 48, 98, 0.055) 0%,
    rgba(42, 28, 58, 0.022) 45%,
    transparent 70%
  );
}

/* Film grain / scan — homepage-adjacent but barely there */
body.content-page::after {
  z-index: 0;
  opacity: 0.14;
  mix-blend-mode: soft-light;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.006) 3px,
    rgba(255, 255, 255, 0.006) 4px
  );
}

body.content-page > * {
  position: relative;
  z-index: 1;
}

body.content-page > .site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (prefers-reduced-motion: reduce) {
  body.content-page::after {
    opacity: 0.1;
  }
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.22s ease, text-shadow 0.28s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--link-hover-color);
  text-shadow: var(--link-hover-glow);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  a {
    transition-duration: 0.01ms;
  }
}

/* Layout — frosted bar only after scroll (see .site-header--scrolled + nav.js) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    background 0.32s ease,
    border-color 0.32s ease,
    backdrop-filter 0.32s ease,
    -webkit-backdrop-filter 0.32s ease;
}

.site-header.site-header--scrolled,
.site-header.is-nav-open {
  background: rgba(5, 8, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header.site-header--scrolled,
  .site-header.is-nav-open {
    background: rgba(5, 8, 20, 0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition-duration: 0.01ms;
  }
}

.site-nav {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xl);
  position: relative;
}

.site-nav .nav-logo {
  margin-right: auto;
}

.nav-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xl);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

.nav-toggle__icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.25rem;
  height: 0.875rem;
}

.nav-toggle__icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-nav-open .nav-toggle__icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle__icon span:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .nav-toggle__icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle__icon span {
    transition: none;
  }
}

@media (max-width: 700px) {
  /*
    Open drawer + parent backdrop-filter (esp. homepage glass) compositing in WebKit
    can make the fixed .nav-links panel paint as fully transparent. Drop blur on the
    header bar while the menu is open and keep the drawer on its own isolated layer.
  */
  .site-header.is-nav-open {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: rgba(5, 8, 20, 0.99);
  }

  .site-header {
    padding: var(--space-md) var(--space-md);
  }

  .nav-toggle {
    display: flex;
    flex-shrink: 0;
    z-index: 120;
  }

  .site-nav {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .site-nav .nav-logo {
    margin-right: auto;
    z-index: 120;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 110;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 5.25rem 1.25rem 2rem;
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    isolation: isolate;
    /* Opaque layer — must not depend on backdrop-filter (see .site-header.is-nav-open above) */
    background-color: #050814;
    background-image: linear-gradient(
      180deg,
      #060918 0%,
      #050814 38%,
      #030612 100%
    );
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, visibility 0.25s;
  }

  .site-header.is-nav-open .nav-links {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 0.875rem 0;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--color-border);
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .nav-links {
    transition: none;
  }
}

.nav-logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-logo:hover {
  opacity: 0.9;
}

.site-header a {
  color: var(--color-text);
}

.site-header a:hover {
  color: var(--link-hover-color);
  text-shadow: var(--link-hover-glow);
  text-decoration: none;
}

.site-footer {
  padding: var(--space-xl);
  margin-top: var(--space-3xl);
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: 100%;
}

.site-footer__closing {
  display: block;
}

.site-footer__statement {
  margin: 0;
}

.site-footer__cta {
  margin: 0;
}

.site-footer__cta a {
  text-decoration: none;
  color: rgba(229, 229, 229, 0.78);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  transition: color 0.25s ease, text-shadow 0.3s ease;
}

.site-footer__cta a:hover {
  color: var(--link-hover-color);
  text-shadow: var(--link-hover-glow);
  text-decoration: none;
}

.site-footer__legal {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  opacity: 0.45;
}

.site-footer a {
  color: var(--color-text-muted);
}

.site-footer a:hover {
  color: var(--link-hover-color);
  text-shadow: var(--link-hover-glow);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl);
}

/* Resume — director-level hierarchy, scannable, minimal dark */
.resume-page {
  max-width: min(46rem, 100%);
}

.resume-header {
  margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem);
  padding-bottom: clamp(1.15rem, 2.5vw, 1.65rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.resume-header h1 {
  margin-bottom: 0.15rem;
  letter-spacing: -0.02em;
}

.resume-title {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

.resume-tagline {
  margin: 0 0 var(--space-md);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(156, 165, 188, 0.5);
}

.resume-contact {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.resume-contact__sep {
  margin: 0 0.35em;
  opacity: 0.55;
}

.resume-contact a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.resume-contact a:hover {
  color: var(--link-hover-color);
  text-shadow: var(--link-hover-glow);
  text-decoration: none;
}

/* Section rhythm: air between blocks, tight inside */
.resume-page .resume-section {
  margin-top: 0;
}

.resume-page .resume-section + .resume-section {
  margin-top: clamp(1.85rem, 4.2vw, 2.65rem);
}

.resume-page .resume-section--experience {
  margin-top: clamp(2.35rem, 5vw, 3.15rem);
}

/* Default section labels (understated caps) */
.resume-page .resume-section h2 {
  margin: 0 0 clamp(0.75rem, 1.8vw, 1rem);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(176, 184, 204, 0.65);
}

.resume-page .resume-section h2.resume-section__title--primary {
  margin-bottom: clamp(1rem, 2.5vw, 1.35rem);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #f4f4f5;
}

.resume-lede {
  margin: 0;
  max-width: 40em;
  font-size: 1.05rem;
  line-height: 1.62;
  color: var(--color-text-paragraph);
}

/* Core expertise — grouped columns */
.resume-expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
  margin: 0;
}

@media (max-width: 720px) {
  .resume-expertise-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
}

.resume-expertise-group__label {
  margin: 0 0 0.45rem;
  padding: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 156, 176, 0.75);
}

.resume-expertise-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(229, 229, 229, 0.88);
}

.resume-expertise-list li {
  margin-bottom: 0.35rem;
}

.resume-expertise-list li:last-child {
  margin-bottom: 0;
}

/* Experience — primary role */
.resume-role--primary {
  margin-bottom: 0;
}

.resume-role--primary .resume-role__title {
  margin: 0 0 0.2rem;
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #fff;
}

.resume-role--primary .resume-role__dates {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(129, 200, 190, 0.75);
}

.resume-bullets {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.92rem;
  line-height: 1.58;
  color: rgba(229, 229, 229, 0.9);
}

.resume-bullets li {
  margin-bottom: 0.5rem;
}

.resume-bullets li:last-child {
  margin-bottom: 0;
}

.resume-bullets strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
}

/* Prior roles — clearly secondary */
.resume-role--secondary {
  margin-top: clamp(1.35rem, 3vw, 1.85rem);
  padding-top: clamp(1.1rem, 2.5vw, 1.45rem);
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.resume-role--secondary .resume-role__title {
  margin: 0 0 0.15rem;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(200, 205, 220, 0.78);
}

.resume-role--secondary .resume-role__dates {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: rgba(156, 163, 184, 0.55);
}

.resume-bullets--compact {
  font-size: 0.86rem;
  line-height: 1.52;
  color: rgba(210, 215, 228, 0.72);
}

.resume-bullets--compact li {
  margin-bottom: 0.35rem;
}

/* Selected impact — outcome statements */
.resume-impact-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.58;
  color: rgba(224, 228, 238, 0.88);
}

.resume-impact-list li {
  margin-bottom: 0.55rem;
}

.resume-impact-list li:last-child {
  margin-bottom: 0;
}

.resume-impact-list strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
}

/* Tools — compact scan */
.resume-tools-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1.5rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(196, 202, 218, 0.78);
}

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

/* Education — low emphasis, two columns on wide viewports */
.resume-page .resume-section--education h2 {
  margin-bottom: 0.5rem;
}

.resume-education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.1rem) clamp(1.25rem, 4vw, 2rem);
  margin: 0;
}

@media (max-width: 640px) {
  .resume-education-grid {
    grid-template-columns: 1fr;
  }
}

.resume-education-block {
  margin: 0;
  min-width: 0;
}

.resume-education-degree {
  margin: 0 0 0.15rem;
  font-size: 0.88rem;
  color: rgba(200, 206, 220, 0.65);
}

.resume-education-school {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(156, 163, 184, 0.5);
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-lg);
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: var(--space-2xl) 0 var(--space-md);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: var(--space-xl) 0 var(--space-sm);
}

h4, h5, h6 {
  font-size: 1rem;
  font-weight: 600;
  margin: var(--space-lg) 0 var(--space-sm);
}

p {
  margin: 0 0 var(--space-md);
  color: var(--color-text-paragraph);
}

ul, ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.5rem;
}

li {
  margin-bottom: var(--space-xs);
}

/* Hero shell — full-bleed image + copy in hero-ambient.css */
.hero {
  position: relative;
  overflow: hidden;
  text-align: left;
}

/* Process section */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  margin: var(--space-2xl) 0;
}

.process-item {
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border-radius: 4px;
  text-align: center;
}

.process-icon {
  width: 64px;
  height: auto;
  margin: 0 auto var(--space-md);
  display: block;
}

.process-item h4 {
  margin-top: 0;
}

/* Work grid */
.work-grid {
  display: grid;
  gap: var(--space-2xl);
  margin: var(--space-2xl) 0;
  align-items: stretch;
}

.work-grid > * {
  align-self: stretch;
  min-height: 0;
}

.work-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.work-card__media {
  display: block;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(145deg, #1c1c28 0%, #0a0a12 55%, #04030a 100%);
}

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.work-card__media:hover img {
  transform: scale(1.03);
}

.work-card__media--invert img {
  filter: invert(1);
}

.work-card__media--thumb-darken {
  position: relative;
}

.work-card__media--thumb-darken::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: 1;
}

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

.work-card__media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.work-card__media--placeholder::after {
  content: "";
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(96, 165, 250, 0.45);
  opacity: 0.9;
}

.work-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--space-xl);
}

/*
  Card body: lede grows to fill space above CTAs so row-mates share one body height
  and action baselines line up. Description region absorbs extra space below the <p>.
*/
.work-card__lede {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.work-card__meta {
  flex-shrink: 0;
}

.work-card__description {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.work-card__actions {
  flex-shrink: 0;
  padding-top: 0.25rem;
}

.work-card__actions .work-card__cta {
  margin-top: 0;
}

.work-card__actions .work-card__note {
  margin: 0;
}

.work-card__actions .btn {
  margin-top: 0;
}

.work-card .category {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.work-card .category.category--preserve-case {
  text-transform: none;
  letter-spacing: 0.02em;
}

.work-card h3 {
  margin-top: 0;
  color: var(--color-text);
}

@media (prefers-reduced-motion: reduce) {
  .work-card__media img {
    transition: none;
  }

  .work-card__media:hover img {
    transform: none;
  }
}

/* Case study layout */
.case-study .meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

.case-study .meta .category {
  display: inline-block;
  margin-right: var(--space-lg);
}

/* Buttons / CTAs */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-text);
  color: var(--color-bg) !important;
  border-radius: 4px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

a.btn:hover,
a.btn-cyan:hover,
a.btn-secondary:hover {
  text-shadow: none;
}

.btn-cyan {
  background: #4fd1c5;
  color: #050814 !important;
  font-weight: 700;
  border: none;
}

.btn-cyan:hover {
  opacity: 0.92;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border);
}

/* Editorial note (not a link): invite conversation when there’s no case study */
.work-card__note {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  font-style: italic;
  font-weight: 600;
  color: var(--color-text-paragraph);
}

/* Lightweight text CTAs (e.g. View case study →) */
.work-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  margin-top: 0.25rem;
  padding: 0.2rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.22s ease, text-shadow 0.28s ease, opacity 0.2s ease;
}

.work-card__cta:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.work-card__cta--primary {
  color: #5eead4;
  font-weight: 600;
  text-shadow: 0 0 16px rgba(56, 220, 200, 0.28);
}

/* Beats resting .work-card__cta--primary (and a:hover) so CTA hover isn’t flattened */
.work-card__cta--primary:hover {
  color: var(--link-hover-color);
  text-shadow: var(--link-hover-glow);
  text-decoration: none;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

/* Case study figures */
.case-study figure {
  margin: var(--space-xl) 0;
}

/* Carousel */
.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}

.carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  margin-bottom: 0;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.carousel-prev,
.carousel-next {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.25rem;
}

.carousel-prev:hover:not(:disabled),
.carousel-next:hover:not(:disabled) {
  background: var(--color-border);
}

.carousel-prev:disabled,
.carousel-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.carousel-counter {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Image grid */
.image-grid {
  display: grid;
  gap: var(--space-md);
}

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

.image-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

.image-grid-2 figure {
  margin: 0;
}

.before-after figure:first-child img {
  width: 100%;
  height: auto;
  display: block;
}

.before-after figure:last-child img {
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}


.image-grid img {
  width: 100%;
  margin-bottom: 0;
}

.image-grid figcaption {
  grid-column: 1 / -1;
}

.case-study figure img {
  margin-bottom: var(--space-sm);
}

/* Narrower assets (e.g. persona boards) — center in the content column; skips .carousel (img not direct child) */
.case-study figure > img {
  margin-left: auto;
  margin-right: auto;
}

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

.case-study figcaption {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-sm);
}

/* Placeholder for images */
.image-placeholder {
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: 4px;
  padding: var(--space-3xl);
  text-align: center;
  color: var(--color-text-muted);
  margin: var(--space-xl) 0;
}
