/* ==========================================================================
   emmabydesign. — design system
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poetsen+One&family=Poppins:wght@600;700;900&family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* vibrant rainbow pastel palette */
  --powder-blush: #ffadad;
  --apricot-cream: #ffd6a5;
  --cream: #fdffb6;
  --tea-green: #caffbf;
  --electric-aqua: #9bf6ff;
  --baby-blue-ice: #a0c4ff;
  --periwinkle: #bdb2ff;
  --mauve: #ffc6ff;
  --porcelain: #fffffc;

  --grad-1: var(--powder-blush);
  --grad-2: var(--apricot-cream);
  --grad-3: var(--cream);
  --grad-4: var(--tea-green);
  --grad-5: var(--electric-aqua);
  --grad-6: var(--baby-blue-ice);
  --grad-7: var(--periwinkle);
  --grad-8: var(--mauve);

  --ink: #2c2622;
  --ink-dim: #4a4038;
  --ink-faint: #6b5f54;
  --ink-on-light: #fbf4ef;
  --line: rgba(44, 38, 34, 0.18);
  --surface: rgba(255, 255, 255, 0.5);
  --surface-strong: rgba(255, 255, 255, 0.72);
  --shadow: rgba(60, 46, 36, 0.25);
  --star-color: rgba(255, 255, 255, 0.75);
  --bg-glow: rgba(255, 255, 255, 0.5);
  --header-scroll-bg: rgba(255, 250, 246, 0.65);
  --header-scroll-line: rgba(44, 38, 34, 0.08);
  --chip-bg: rgba(44, 30, 26, 0.4);
  --chip-border: rgba(255, 255, 255, 0.5);
  --placeholder-bg: linear-gradient(155deg, rgba(255, 255, 255, 0.55), rgba(44, 38, 34, 0.1));
  --placeholder-ink: rgba(44, 38, 34, 0.35);

  --font-display: 'Poppins', ui-rounded, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --gutter: clamp(1.5rem, 5vw, 4.5rem);
  --prose-width: 65ch;
  --section-space: clamp(4.5rem, 10vw, 9rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --grad-1: #3d2129;
  --grad-2: #3d3120;
  --grad-3: #383a1c;
  --grad-4: #1a3323;
  --grad-5: #17383c;
  --grad-6: #1b2a3d;
  --grad-7: #241f3d;
  --grad-8: #331d35;

  --ink: #f5efe8;
  --ink-dim: #d8cec2;
  --ink-faint: #b3a89b;
  --ink-on-light: #241f1b;
  --line: rgba(255, 255, 255, 0.16);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --shadow: rgba(0, 0, 0, 0.5);
  --star-color: rgba(44, 38, 34, 0.55);
  --bg-glow: rgba(0, 0, 0, 0.35);
  --header-scroll-bg: rgba(20, 16, 22, 0.55);
  --header-scroll-line: rgba(255, 255, 255, 0.1);
  --chip-bg: rgba(0, 0, 0, 0.4);
  --chip-border: rgba(255, 255, 255, 0.25);
  --placeholder-bg: linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.3));
  --placeholder-ink: rgba(255, 255, 255, 0.3);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --grad-1: #3d2129;
    --grad-2: #3d3120;
    --grad-3: #383a1c;
    --grad-4: #1a3323;
    --grad-5: #17383c;
    --grad-6: #1b2a3d;
    --grad-7: #241f3d;
    --grad-8: #331d35;

    --ink: #f5efe8;
    --ink-dim: #d8cec2;
    --ink-faint: #b3a89b;
    --ink-on-light: #241f1b;
    --line: rgba(255, 255, 255, 0.16);
    --surface: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.14);
    --shadow: rgba(0, 0, 0, 0.5);
    --star-color: rgba(44, 38, 34, 0.55);
    --bg-glow: rgba(0, 0, 0, 0.35);
    --header-scroll-bg: rgba(20, 16, 22, 0.55);
    --header-scroll-line: rgba(255, 255, 255, 0.1);
    --chip-bg: rgba(0, 0, 0, 0.4);
    --chip-border: rgba(255, 255, 255, 0.25);
    --placeholder-bg: linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.3));
    --placeholder-ink: rgba(255, 255, 255, 0.3);
    color-scheme: dark;
  }
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--soft-blush);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   Background
   ========================================================================== */

.bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    170deg,
    var(--grad-1) 0%,
    var(--grad-2) 14%,
    var(--grad-3) 28%,
    var(--grad-4) 43%,
    var(--grad-5) 57%,
    var(--grad-6) 71%,
    var(--grad-7) 86%,
    var(--grad-8) 100%
  );
  transition: background 0.6s var(--ease);
}

.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 45% at 12% 8%, var(--bg-glow), transparent 60%),
    radial-gradient(50% 40% at 90% 95%, rgba(120, 90, 70, 0.08), transparent 65%);
  pointer-events: none;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-space);
}

.section--tight {
  padding-block-start: 0;
}

/* Bottom padding reduced 20% from the standard --section-space */
#about-background {
  padding-block-end: clamp(3.6rem, 8vw, 7.2rem);
}

/* Space above "My approach" (the next section down) — reduced 55% from the standard --section-space */
#about-teaser {
  padding-block-end: clamp(2.025rem, 4.5vw, 4.05rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.75rem;
}

.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.big-heading {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.01em;
  font-size: clamp(2.4rem, 6.4vw, 5rem);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.2;
  max-width: 42ch;
}

.body-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-dim);
  max-width: var(--prose-width);
}

.cursor-blink {
  display: inline-block;
  opacity: 0;
}

[data-typewriter].is-typing .cursor-blink {
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---- Typewriter headline reveal (word by word, no rise) ---- */

[data-typewriter] .word {
  display: inline-block;
  opacity: 0;
}

[data-typewriter].is-typing .word {
  animation: word-in 0.45s ease forwards;
}

@keyframes word-in {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  [data-typewriter] .word,
  [data-typewriter] .cursor-blink {
    opacity: 1;
    animation: none;
  }
}

/* ==========================================================================
   Buttons / links
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.btn--solid {
  background: var(--ink);
  color: var(--ink-on-light);
}

.btn--solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px var(--shadow);
}

.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.text-link {
  text-underline-offset: 4px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.25s var(--ease), opacity 0.25s var(--ease);
}

.text-link:hover {
  text-decoration-color: var(--ink);
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding: clamp(1.1rem, 2.5vw, 1.6rem) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.site-header.is-scrolled {
  background: var(--header-scroll-bg);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--header-scroll-line);
}

.logo {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo .dot {
  color: var(--ink);
  opacity: 0.9;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.5vw, 2.4rem);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.5vw, 2.4rem);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding-block: 0.2rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: currentColor;
  transition: right 0.3s var(--ease);
}

.nav-links a:hover::after,
.nav-links a[aria-current='page']::after {
  right: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.theme-toggle:hover {
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle-icon--moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle-icon--sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle-icon--moon {
  display: block;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
}

.nav-toggle-icon { width: 18px; height: 18px; }

.nav-toggle-icon--close { display: none; }

.nav-toggle[aria-expanded='true'] .nav-toggle-icon--menu { display: none; }

.nav-toggle[aria-expanded='true'] .nav-toggle-icon--close { display: block; }

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 0;
    top: 0;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(170deg, var(--grad-2), var(--grad-4), var(--grad-6));
    font-size: 1.4rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
    pointer-events: none;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-actions {
    position: relative;
    z-index: 20;
  }
}

/* ==========================================================================
   Loading screen
   ========================================================================== */

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(170deg, var(--grad-1), var(--grad-3), var(--grad-5), var(--grad-7));
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.loader-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 9vw, 5.5rem);
  color: var(--ink);
  letter-spacing: -0.01em;
  animation: loader-pulse 1.8s var(--ease) infinite;
}

.loader-logo .dot {
  color: var(--ink);
}

@keyframes loader-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.72; transform: scale(1.035); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-logo {
    animation: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(6rem, 12vw, 8rem) var(--section-space);
}

.hero-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}

.hero h1 {
  max-width: 20ch;
}

/* ---- Infinite galaxy starfield (site-wide backdrop) ---- */

.galaxy {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.galaxy-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  background: var(--star-color);
  transform: translate(-50%, -50%);
  animation: galaxy-zoom 18s ease-in-out infinite alternate;
}

.galaxy-layer--far {
  animation-duration: 26s;
}

.galaxy-layer--near {
  animation-duration: 15s;
}

@keyframes galaxy-zoom {
  0% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.6); }
}

@media (prefers-reduced-motion: reduce) {
  .galaxy-layer {
    animation: none;
  }
}

.hero-sub {
  margin-top: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-meta {
  margin-top: 3.5rem;
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
}

.hero-meta div {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

.hero-meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.hero-meta span {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ==========================================================================
   Work grid
   ========================================================================== */

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

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

.work-card {
  position: relative;
  display: block;
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.5s var(--ease), background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.work-card:hover {
  transform: translateY(-6px);
  background: var(--surface-strong);
  box-shadow: 0 24px 50px -20px var(--shadow);
}

.work-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
}

.work-card-media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--placeholder-bg);
}

.work-card-media--placeholder span {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  color: var(--placeholder-ink);
}

.work-card-media--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background: linear-gradient(155deg, #2c2622, #17130f);
}

.work-card-media--logo img {
  width: auto;
  height: auto;
  max-width: 65%;
  max-height: 65%;
  object-fit: contain;
}

.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s var(--ease);
}

.work-card:hover .work-card-media img {
  transform: scale(1.04);
}

.work-card-body {
  padding: clamp(1.5rem, 2.6vw, 2.2rem);
}

.work-card--feature {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.work-card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.work-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
}

.work-card p {
  color: var(--ink-dim);
  font-size: 0.98rem;
  max-width: 42ch;
}

.work-card-arrow {
  position: absolute;
  top: clamp(1.5rem, 3vw, 2.2rem);
  right: clamp(1.5rem, 3vw, 2.2rem);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: #ffffff;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}

.work-card--feature .work-card-arrow {
  position: static;
  background: none;
  backdrop-filter: none;
  color: var(--ink);
  border-color: var(--line);
}

.work-card:hover .work-card-arrow {
  transform: rotate(45deg);
  background: var(--ink);
  color: var(--ink-on-light);
}

.work-card-arrow svg { width: 16px; height: 16px; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-email {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 6vw, 3.6rem);
  word-break: break-word;
  display: inline-block;
  border-bottom: 3px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.contact-email:hover {
  border-color: var(--ink);
}

.contact-note {
  margin-top: 1.75rem;
  color: var(--ink-dim);
  max-width: var(--prose-width);
}

/* ---- Brands worked with ---- */

.brand-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.brand-strip li {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84px;
  flex: 0 1 160px;
  box-shadow: 0 16px 36px -20px var(--shadow);
}

.brand-strip img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: 2.5rem clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal-stagger.in-view > * {
  opacity: 1;
  transform: none;
}

.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 0.18s; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 0.34s; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 0.42s; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > *,
  .loader-mark path,
  .cursor-blink {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Cross-document View Transitions
   ========================================================================== */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-out 0.5s var(--ease) both;
}

::view-transition-new(root) {
  animation: page-in 0.5s var(--ease) both;
}

@keyframes page-out {
  to { opacity: 0; transform: scale(0.985) translateY(10px); }
}

@keyframes page-in {
  from { opacity: 0; transform: scale(1.015) translateY(-10px); }
}

/* ==========================================================================
   Focus visibility
   ========================================================================== */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Case study page
   ========================================================================== */

.case-hero {
  padding-block: clamp(6.5rem, 12vw, 9rem) 3rem;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.case-meta div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.case-meta div span {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.case-section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}

.case-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.case-body > p,
.case-body > ul {
  max-width: var(--prose-width);
}

.case-section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}

.case-body p + p,
.case-body ul + p,
.case-body p + ul {
  margin-top: 1.1rem;
}

.case-body ul {
  display: grid;
  gap: 0.6rem;
}

.case-body li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--ink-dim);
}

.case-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.quote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.4;
  max-width: 42ch;
  padding-left: 1.25rem;
  border-left: 3px solid var(--ink);
}

/* ---- Case study imagery ---- */

.case-hero-media {
  margin-top: clamp(2rem, 5vw, 3rem);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
}

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

.case-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 1.75rem;
}

.case-gallery figure {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
}

.case-gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.case-gallery figcaption {
  padding: 0.85rem 1.1rem;
  font-size: 0.85rem;
  color: var(--ink);
  border-top: 1px solid var(--line);
}

.image-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 2rem;
  text-align: center;
  background: var(--placeholder-bg);
  border: 1px dashed var(--line);
}

.case-hero-media .image-placeholder {
  aspect-ratio: 16 / 9;
}

.image-placeholder svg {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--placeholder-ink);
}

.image-placeholder-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--placeholder-ink);
  max-width: 34ch;
}

.image-placeholder-note {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 400;
  font-style: italic;
  opacity: 0.85;
}

/* ---- Lightbox trigger (wraps case-study images via JS) ---- */

.lightbox-trigger {
  all: unset;
  display: block;
  position: relative;
  cursor: zoom-in;
  width: 100%;
}

.lightbox-trigger::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(2, 16, 14, 0);
  transition: background 0.3s var(--ease);
  pointer-events: none;
}

.lightbox-trigger:hover::after,
.lightbox-trigger:focus-visible::after {
  background: rgba(2, 16, 14, 0.18);
}

.lightbox-trigger:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Lightbox overlay ---- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 12, 11, 0.9);
  color: #ffffff;
  padding: clamp(1rem, 6vw, 3rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

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

.lightbox-figure {
  margin: 0;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 14px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.65);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

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

.lightbox-caption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  text-align: center;
  max-width: var(--prose-width);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
  width: 20px;
  height: 20px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.06);
}

.lightbox-close {
  top: clamp(1rem, 3vw, 1.75rem);
  right: clamp(1rem, 3vw, 1.75rem);
}

.lightbox-prev {
  left: clamp(0.75rem, 3vw, 1.75rem);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: clamp(0.75rem, 3vw, 1.75rem);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.06);
}

@media (max-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    width: 38px;
    height: 38px;
  }
}

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

.case-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: clamp(3rem, 6vw, 5rem);
}

.case-nav a {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ==========================================================================
   Process timeline (about page)
   ========================================================================== */

.timeline {
  margin-top: 3rem;
  display: grid;
  gap: 1.25rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.5rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline-index {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink-faint);
}

.timeline-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin-bottom: 0.5rem;
}

.timeline-item p {
  color: var(--ink-dim);
  max-width: var(--prose-width);
}

/* ==========================================================================
   CV page
   ========================================================================== */

.page-cv .eyebrow::after {
  content: none;
}

.page-cv .section {
  padding-block-end: clamp(3.6rem, 8vw, 7.2rem);
}

.cv-name-row {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.5rem);
}

.cv-avatar {
  flex-shrink: 0;
  width: clamp(56px, 8vw, 76px);
  height: clamp(56px, 8vw, 76px);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 24px -12px var(--shadow);
}

.cv-narrow {
  max-width: 806px;
}

.cv-list {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.75rem;
}

.cv-entry {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 1rem;
}

.cv-entry-dates {
  padding-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.cv-entry-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.cv-entry-at {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-dim);
}

.cv-entry-body p {
  margin-top: 0.5rem;
  color: var(--ink-dim);
}

.cv-simple-list {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.75rem;
}

.cv-simple-list li {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 1rem;
}

.cv-simple-list li > span {
  padding-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.cv-simple-list strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.cv-simple-list li > div > span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

@media (max-width: 480px) {
  .cv-entry,
  .cv-simple-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* ==========================================================================
   About photo
   ========================================================================== */

.about-intro {
  display: grid;
  grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.about-photo {
  aspect-ratio: 2560 / 3158;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px var(--shadow);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .about-intro {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 320px;
    margin-inline: auto;
  }
}
