/* ─── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Sans:wght@400;500&display=swap');

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --bg:           #06070a;
  --surface:      #0c111f;
  --surface-2:    #121b2e;
  --border:       rgba(255, 255, 255, 0.08);
  --text:         #f0f4fa;
  --text-muted:   #8b96ab;
  --accent:       #8ab4ff;
  --accent-glow:  rgba(122, 168, 255, 0.14);

  /* Type scale */
  --display:  64px;
  --h1:       48px;
  --h2:       36px;
  --h3:       24px;
  --h4:       20px;
  --body-l:   18px;
  --body:     16px;
  --small:    14px;
  --label:    12px;

  --radius:   8px;
  --max-w:    1400px;
  /* 48px gutter left + right (all breakpoints); change once to update site-wide */
  --page-pad-x: 48px;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image: linear-gradient(180deg, #06070a 0%, #0a1225 12%, #101418 32%, #0a0c10 100%);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── Stars canvas ───────────────────────────────────────── */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-block: 0;
  padding-inline: var(--page-pad-x);
}

/* ─── Site header nav only (not .cs-toc / .cs-project-nav <nav>s) ── */
nav:has(.nav-inner) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(6, 7, 10, 0.78);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-block: 0;
  padding-inline: var(--page-pad-x);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  transition: opacity 0.2s;
}

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

.nav-logo img {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: var(--small);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* ─── Page wrapper ───────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 120px 0 100px;
}

.hero-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--h4);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 20px;
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
  width: 100%;
  max-width: 1200px;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--h2);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 640px;
}

.hero-bio {
  font-size: var(--body-l);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: var(--small);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #06070a;
}
.btn-primary:hover {
  background: #a8c8ff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}

/* ─── Scroll to top (all pages) ─────────────────────────── */
.scroll-to-top.btn.btn-ghost {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: calc(max(24px, var(--page-pad-x)) + env(safe-area-inset-right, 0px));
  z-index: 98;
  margin: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(6, 7, 10, 0.82);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-family: 'DM Sans', sans-serif;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease,
    border-color 0.2s, color 0.2s;
}
.scroll-to-top.btn.btn-ghost.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-to-top-arrow {
  font-size: 1.15em;
  line-height: 1;
}
.scroll-to-top.btn.btn-ghost:focus-visible {
  outline: 2px solid rgba(138, 180, 255, 0.55);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-to-top.btn.btn-ghost {
    transition-duration: 0.01ms;
    transform: none;
  }
  .scroll-to-top.btn.btn-ghost.is-visible {
    transform: none;
  }
}

/* ─── Section ────────────────────────────────────────────── */
.section {
  padding: 80px 0;
}

.section-label {
  font-size: var(--label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--h2);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
}

.section-header .section-title { margin-bottom: 0; }

.section-link {
  font-size: var(--small);
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.section-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ─── Case study cards (Figma Home 123:1994 — Case study component) ── */
.case-studies {
  display: grid;
  gap: 32px;
}

.card {
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38);
}

.card:focus-visible {
  outline: 2px solid rgba(138, 245, 227, 0.55);
  outline-offset: 3px;
}

.card-surface {
  display: grid;
  grid-template-columns: minmax(240px, 418fr) minmax(0, 982fr);
  align-items: stretch;
  overflow: hidden;
  background: transparent;
  min-height: clamp(300px, 52vw, 603px);
}

.card-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 40px);
  padding: clamp(28px, 6vw, 64px) clamp(18px, 3vw, 24px) clamp(20px, 3vw, 32px);
  box-sizing: border-box;
  min-height: 0;
  align-self: stretch;
}

.card-panel-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: var(--label);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: 4px;
}

.tag.tag--card {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(186, 200, 232, 0.95);
  background: rgba(85, 115, 181, 0.14);
  padding: 8px 12px;
  border-radius: 4px;
}

/* Logo pill — same box model as text .tag.tag--card (11px / 8×12 padding) */
.tag.tag--card.tag--card-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px 12px;
  background: rgba(69, 147, 134, 0.15);
  letter-spacing: normal;
  text-transform: none;
  line-height: 1;
}

.tag.tag--card.tag--card-brand img {
  display: block;
  height: 1em;
  width: auto;
  max-width: 100%;
}

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--h2);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

.card-desc {
  font-size: var(--small);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.card-meta-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: stretch;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--small);
}

.card-meta-primary {
  color: var(--text);
  font-weight: 500;
}

.card-meta-secondary {
  color: rgba(255, 255, 255, 0.45);
  text-align: right;
}

.card-meta-line {
  height: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.1);
}

.card-media {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  background: transparent;
  overflow: hidden;
}

.card-media img {
  flex: 1;
  width: 100%;
  min-height: clamp(240px, 45vw, 603px);
  object-fit: cover;
  display: block;
  transform-origin: center center;
  transition: transform 0.45s ease;
}

.card-media-placeholder {
  flex: 1;
  width: 100%;
  min-height: clamp(240px, 45vw, 603px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--small);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transform-origin: center center;
  transition: transform 0.45s ease;
}

.card:hover .card-media img,
.card:hover .card-media-placeholder {
  transform: scale(1.0);
}

@media (prefers-reduced-motion: reduce) {
  .card-media img,
  .card-media-placeholder {
    transition: none;
  }

  .card:hover .card-media img,
  .card:hover .card-media-placeholder {
    transform: none;
  }
}

@media (min-width: 901px) {
  .card-media img,
  .card-media-placeholder {
    border-radius: 0 8px 8px 0;
  }
}

@media (max-width: 1050px) {
  .card-surface {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .card-media {
    order: -1;
  }

  .card-media img,
  .card-media-placeholder {
    min-height: min(52vw, 360px);
    border-radius: 16px 16px 0 0;
  }

  .card-panel {
    padding: 28px 20px 32px;
  }
}

/* ─── Home — illustrations teaser (3 across, equal height, no crop) */
.illus-home-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2.5vw, 28px);
  align-items: stretch;
}

.illus-home-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.illus-home-item-visual {
  --illus-home-art-h: min(40vh, 380px);
  width: 100%;
  height: var(--illus-home-art-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.illus-home-item-visual img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.illus-home-item .illus-slide-meta {
  margin-top: clamp(12px, 2vw, 20px);
}

@media (max-width: 540px) {
  .illus-home-item-visual {
    --illus-home-art-h: min(32vh, 260px);
  }
}

/* ─── Illustrations — full-size lightbox (<dialog>)
   Must stay position: fixed + inset 0 so showModal() covers the viewport.
   (position: relative ties the dialog to the end of the document — looks “below the fold”.) */
.illus-lightbox {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 1000;
}

.illus-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.illus-lightbox-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(56px, 10vw, 96px) clamp(20px, 5vw, 48px) clamp(20px, 5vw, 36px);
  box-sizing: border-box;
  gap: clamp(12px, 3vw, 20px);
}

.illus-lightbox-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 24px);
  width: 100%;
  max-width: min(1180px, 100%);
  flex: 1 1 auto;
  min-height: 0;
}

.illus-lightbox-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.illus-lightbox-status {
  margin: 0;
  text-align: center;
  font-size: var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

.illus-lightbox-to-gallery {
  flex-shrink: 0;
  text-decoration: none;
}

.illus-lightbox-close {
  position: absolute;
  top: clamp(12px, 3vw, 24px);
  right: clamp(12px, 3vw, 24px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.illus-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.illus-lightbox-close:focus-visible {
  outline: 2px solid rgba(138, 245, 227, 0.55);
  outline-offset: 2px;
}

.illus-lightbox-img {
  max-width: 100%;
  max-height: calc(100svh - clamp(160px, 26vw, 220px));
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

/* ─── Illustrations — vertical gallery (details above each piece) */
.illus-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  width: 100%;
  max-width: min(920px, 100%);
  margin-inline: auto;
}

.illus-gallery-item {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.illus-gallery-visual {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.illus-gallery-visual img {
  max-width: 100%;
  max-height: min(78vh, 760px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin-inline: auto;
  cursor: zoom-in;
  border-radius: 4px;
}

@media (max-width: 540px) {
  .illus-gallery-visual img {
    max-height: min(62vh, 560px);
  }
}

/* ─── Illustrations — slideshow (one piece at a time, no crop) */
.illus-slideshow {
  outline: none;
}

.illus-slideshow:focus-visible {
  box-shadow: 0 0 0 2px rgba(138, 245, 227, 0.45);
  border-radius: 12px;
}

.illus-slideshow-frame {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
}

.illus-slideshow-stage {
  flex: 1;
  min-width: 0;
  min-height: min(72vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.illus-slideshow--compact .illus-slideshow-stage {
  min-height: min(48vh, 420px);
}

.illus-slide {
  margin: 0;
  width: 100%;
  display: none;
  text-align: center;
}

.illus-slide.is-active {
  display: block;
}

.illus-slide img {
  max-width: 100%;
  max-height: min(68vh, 640px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}

.illus-slideshow--compact .illus-slide img {
  max-height: min(42vh, 360px);
}

.illus-slide-meta {
  margin-top: clamp(16px, 2.5vw, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--small);
}

/* Illustrations page — caption sits above art; must override .illus-slide-meta margins */
.illus-gallery .illus-slide-meta {
  margin: 0 0 16px;
}

.illus-slide-title {
  color: var(--text);
  font-weight: 500;
}

.illus-slide-medium {
  color: var(--text-muted);
  font-weight: 400;
}

.illus-slideshow-nav,
.illus-lightbox-nav {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.illus-slideshow-nav:hover,
.illus-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.illus-slideshow-nav:focus-visible,
.illus-lightbox-nav:focus-visible {
  outline: 2px solid rgba(138, 245, 227, 0.55);
  outline-offset: 2px;
}

.illus-lightbox-nav[disabled],
.illus-lightbox-nav:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.illus-slideshow-status {
  margin-top: 16px;
  text-align: center;
  font-size: var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

@media (max-width: 540px) {
  .illus-slideshow-frame {
    gap: 10px;
  }

  .illus-slideshow-nav,
  .illus-lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .illus-slideshow-stage {
    min-height: min(58vh, 520px);
  }

  .illus-slideshow--compact .illus-slideshow-stage {
    min-height: min(44vh, 360px);
  }

  .illus-slide img {
    max-height: min(52vh, 480px);
  }

  .illus-slideshow--compact .illus-slide img {
    max-height: min(36vh, 300px);
  }
}

/* ─── Case study page ────────────────────────────────────── */
.cs-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 72px;
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--small);
  color: var(--text-muted);
  margin-bottom: 40px;
  transition: color 0.2s;
}
.cs-back:hover { color: var(--text); }

.cs-tags { margin-bottom: 20px; }

.cs-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--h1);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 760px;
  margin-bottom: 20px;
}

.cs-subtitle {
  font-size: var(--body-l);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 40px;
}

.cs-meta-row {
  display: flex;
  gap: 48px;
}

.cs-meta-item {}

.cs-meta-label {
  font-size: var(--label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cs-meta-value {
  font-size: var(--body);
  color: var(--text);
}

.cs-cover {
  width: 100%;
  aspect-ratio: 16/7;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--body);
  color: var(--text-muted);
  overflow: hidden;
}
.cs-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-block: 0;
  padding-inline: var(--page-pad-x);
}

.cs-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}

.cs-toc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-toc a {
  font-size: var(--small);
  color: var(--text-muted);
  transition: color 0.2s;
  line-height: 1.4;
}
.cs-toc a:hover { color: var(--text); }

.cs-content section {
  margin-bottom: 64px;
}

.cs-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--h3);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 20px;
}

.cs-content p {
  font-size: var(--body);
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cs-content p:last-child { margin-bottom: 0; }

.cs-image-block {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--small);
  color: var(--text-muted);
  overflow: hidden;
}
.cs-image-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-image-caption {
  font-size: var(--small);
  color: var(--text-muted);
  text-align: center;
  margin-top: -20px;
  margin-bottom: 32px;
}

/* ─── Divider ────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 80px 0;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-block: 0;
  padding-inline: var(--page-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--body);
  font-weight: 400;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: var(--small);
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

/* ─── Case study: sticky section nav + project links ─────── */
.cs-toc {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  justify-content: center;
  background: transparent;
  border: none;
  transform: translateY(-100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.22s ease, visibility 0.22s;
}
.cs-toc.is-visible {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}
.cs-toc-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px var(--page-pad-x);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  box-sizing: border-box;
}
.cs-toc-inner a {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.cs-toc-inner a:hover,
.cs-toc-inner a:focus-visible {
  color: var(--text);
}
.cs-toc-inner a:focus-visible {
  outline: 2px solid rgba(138, 245, 227, 0.5);
  outline-offset: 2px;
}

.cs-jump-target {
  scroll-margin-top: 118px;
}

/* Text links — same voice as .cs-back on case studies */
.cs-project-nav {
  position: static;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px 32px;
  padding: 16px var(--page-pad-x) 0;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.cs-project-nav-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 0;
  max-width: min(520px, 100%);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--small);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.cs-project-nav-link:hover {
  color: var(--text);
}
.cs-project-nav-link:focus-visible {
  color: var(--text);
  outline: 2px solid rgba(138, 245, 227, 0.45);
  outline-offset: 3px;
}
.cs-project-nav-link--next {
  align-items: flex-end;
  text-align: right;
}
.cs-project-nav-kicker {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: none;
}
.cs-project-nav-name {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: inherit;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --display: 40px;
    --h1: 32px;
    --h2: 26px;
    --h3: 20px;
    --h4: 18px;
  }

  .hero { padding: 64px 0 60px; }

  .case-studies {
    gap: 24px;
  }

  .cs-body {
    grid-template-columns: 1fr;
  }

  .cs-sidebar { display: none; }

  .cs-meta-row {
    gap: 28px;
    flex-wrap: wrap;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cs-toc-inner {
    gap: 6px 14px;
    padding-block: 8px;
  }

  .cs-toc-inner a {
    font-size: 11px;
  }

  .cs-jump-target {
    scroll-margin-top: 108px;
  }

  .cs-project-nav-link--next {
    align-items: flex-start;
    text-align: left;
  }
}
