/* ============================================================ * 1. TOKENS — LIGHT MODE (single source of truth) * ============================================================ */
/* ===== Custom Properties ===== */
:root {
  /* ===== V2 FOUNDATIONS — single source of truth ===== */
  /* Canvas — light mode */
  --bg:              #FAF9F5;
  --ink:             #1A1815;
  --ink-muted:       #4A453E;
  --ink-subtle:      #7A746B;
  --rule:            #E8E4D9;
  --surface:         #FFFFFF;
  --surface-sunken:  #F2EFE7;
  --warning:         #8A6F50;

  /* Type scale */
  --t-display:  3.5rem;
  --t-h1:       2.5rem;
  --t-h2:       2rem;
  --t-h3:       1.5rem;
  --t-h4:       1.125rem;
  --t-body-lg:  1.125rem;
  --t-body:     1rem;
  --t-meta:     0.875rem;
  --t-label:    0.8125rem;
  --t-fine:     0.75rem;

  /* Weights — bold (700) deliberately omitted */
  --w-regular:   400;
  --w-medium:    500;
  --w-semibold:  600;

  /* Spacing — keep existing --space-1 to --space-11, already correct */
  /* Layout */
  --container-narrow: 720px;
  /* --container-max kept from existing tokens */

  /* Stack tokens */
  --stack-sm:  var(--space-3);
  --stack-md:  var(--space-5);
  --stack-lg:  var(--space-7);
  --stack-xl:  var(--space-9);

  /* Card padding scale — --card-pad already exists, add small */
  --card-pad-sm:  var(--space-5);

  /* ===== Typography — single source of truth =====
     One font family across the whole portfolio. Both --font-heading and
     --font-body resolve to Outfit so existing rules referencing either
     keep working. */
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  /* Display face — hero, page titles, section headings. Carries the personality;
     everything interface-level stays Outfit. */
  --font-display: 'Libre Baskerville', Georgia, serif;

  /* Type properties */
  --leading-tight: 1.1;       /* display, h1 */
  --leading-snug: 1.25;       /* h2, h3 */
  --leading-normal: 1.5;      /* body */
  --leading-relaxed: 1.65;    /* body-lg, body in narrow columns */
  --tracking-tight: -0.02em;  /* display, h1 */
  --tracking-snug: -0.01em;   /* h2, h3 */
  --tracking-normal: 0;       /* body */

  /* ===== Spacing scale — 4-px base ===== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --space-11: 160px;

  /* ===== Layout tokens ===== */
  --container-max: 1200px;
  --container-pad-x: var(--space-5);     /* 24px */
  --section-pad-y: var(--space-9);       /* 96px — default section vertical pad */
  --section-pad-y-lg: var(--space-10);   /* 128px — heroes, generous moments */
  --section-pad-y-sm: var(--space-8);    /* 64px — tight sections */
  --card-pad: var(--space-7);            /* 48px — inside cards */
  --stack-sm: var(--space-3);            /* 12px — between adjacent labels */
  --stack-md: var(--space-5);            /* 24px — between paragraphs */
  --stack-lg: var(--space-7);            /* 48px — between major elements */

  /* ===== Radii ===== */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-transition: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 160ms;
  --duration-normal: 240ms;
  --duration-reveal: 420ms;
}

/* ===== Responsive type scale — collapses on narrow viewports ===== */
@media (max-width: 768px) {
  :root {
    --t-display: 2.5rem;
    --t-h1:      2rem;
    --t-h2:      1.5rem;
    --t-h3:      1.25rem;
    --section-pad-y: var(--space-8);
    --section-pad-y-lg: var(--space-9);
    --section-pad-y-sm: var(--space-7);
    --card-pad: var(--space-5);
  }
}

/* ============================================================ * 2. TOKENS — DARK MODE * ============================================================ */
/* ===== Dark mode ===== */
[data-theme="dark"] {
  /* ===== V2 FOUNDATIONS — dark mode overrides ===== */
  --bg:              #1A1815;
  --ink:             #FAF9F5;
  --ink-muted:       #B5B0A5;
  --ink-subtle:      #837E73;
  --rule:            #3A352E;
  --surface:         #24211C;
  --surface-sunken:  #14120F;
  --warning:         #B59572;
}

/* Smooth theme swap — colour properties only, not all (perf) */
html { transition: background-color var(--duration-normal) var(--ease-transition),
                   color var(--duration-normal) var(--ease-transition); }
body { transition: background-color var(--duration-normal) var(--ease-transition),
                   color var(--duration-normal) var(--ease-transition); }

/* ============================================================ * 3. RESET + BASE * ============================================================ */
/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
}

/* Decorative shapes (hero blob, marquee tilt) may overhang the viewport;
   clip instead of scrolling */
html, body {
  overflow-x: clip;
}

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

ul {
  list-style: none;
}

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

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ============================================================ * 4. TYPOGRAPHY (+ animations, headline emphasis) * ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--t-h1);
  font-weight: var(--w-medium);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  font-weight: var(--w-medium);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: var(--w-semibold);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h4, .h4 {
  font-family: var(--font-display);
  font-size: var(--t-h4);
  font-weight: var(--w-semibold);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.t-display {
  font-family: var(--font-display);
  font-size: var(--t-display);
  font-weight: var(--w-medium);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body, p {
  font-size: var(--t-body);
  font-weight: var(--w-regular);
  line-height: 1.6;
  letter-spacing: 0;
}

.lead, .t-body-lg {
  font-size: var(--t-body-lg);
  font-weight: var(--w-regular);
  line-height: 1.55;
}

.t-meta {
  font-size: var(--t-meta);
}

.t-label {
  font-size: var(--t-label);
  font-weight: var(--w-medium);
  letter-spacing: 0.02em;
}

.t-fine {
  font-size: var(--t-fine);
}

/* Legacy utility aliases — retained until Task 10 sweep */
.display { font-size: var(--t-display); line-height: 1.1; letter-spacing: -0.02em; }
.text-body-lg { font-size: var(--t-body-lg); }
.text-caption { font-size: var(--t-meta); color: var(--ink-subtle); }
.text-fine { font-size: var(--t-fine); color: var(--ink-subtle); }

p {
  max-width: 68ch;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Logo entrance: slide up + fade + overshoot bounce */
@keyframes logoSlideUp {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  60% {
    opacity: 1;
    transform: translateY(-3px) scale(1.04);
  }
  80% {
    transform: translateY(1px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo-animate img {
  animation: logoSlideUp 700ms cubic-bezier(0.23, 1, 0.32, 1) 100ms both;
}

/* Continuous subtle pulse on logo to draw attention */
@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.logo-animate img,
.logo-animate .logo-nf {
  animation: logoSlideUp 700ms cubic-bezier(0.23, 1, 0.32, 1) 100ms both,
             logoPulse 4s ease-in-out 1.5s infinite;
}

/* Hero children staggered entrance — pre-hidden so JS reveal doesn't flash */
.hero-text > .intro-paragraph,
.hero-text > .equipped-heading,
.hero-text > .equipped-list,
.hero-text > .see-projects-row,
.hero-text > .hero-image-mobile {
  opacity: 0;
}

.hero-text > .reveal {
  animation: fadeInUp 500ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

/* No-JS / reduced-motion fallback — show everything */
@media (prefers-reduced-motion: reduce) {
  .hero-text > .intro-paragraph,
  .hero-text > .equipped-heading,
  .hero-text > .equipped-list,
  .hero-text > .see-projects-row,
  .hero-text > .hero-image-mobile {
    opacity: 1;
  }
}

/* ===== Headline emphasis (.hl) — V3: italic in the display face =====
   With Fraunces carrying the headings, emphasis is typographic: the accent
   word turns italic. No underline, no marker. */
.hl {
  font-style: italic;
}

/* Hero h1 typewriter — caret + cleanup */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 0.92em;
  background: var(--ink);
  vertical-align: -0.08em;
  margin-left: 3px;
  animation: cursor-blink 720ms steps(2, end) infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

/* While the hero h1 is being typed, the .hl wrapper is created empty —
   suppress its underline until the first character lands so the rule
   doesn't sit alone. */
.hero-text h1.is-typing .hl:empty { visibility: hidden; }

/* Reduced-motion: skip typewriter, just show the heading */
@media (prefers-reduced-motion: reduce) {
  .typing-cursor { display: none; }
}

.hero-image-desktop.reveal {
  animation: fadeIn 600ms cubic-bezier(0.23, 1, 0.32, 1) 200ms both;
}

/* Scroll-triggered reveal system */
.scroll-hidden {
  opacity: 0;
  transform: translateY(20px);
}

.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 500ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Nav shrink on scroll */
.header-scrolled {
  box-shadow: 0 1px 12px oklch(0.25 0.06 260 / 0.06);
}

.header-scrolled .nav-wrapper {
  padding-top: 10px;
  padding-bottom: 10px;
  transition: padding 240ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Logo hover interaction */
@media (hover: hover) and (pointer: fine) {
  .nav-logo a {
    transition: transform var(--duration-fast) var(--ease-out);
  }
  .nav-logo a:hover {
    transform: scale(1.05);
  }
  .nav-logo a:active {
    transform: scale(0.97);
  }
}

/* ============================================================ * 5. LAYOUT PRIMITIVES * ============================================================ */
/* ===== Utility ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad-x);
}

/* ============================================================ * 6. COMPONENTS (button, card, pill, link, input, nav, theme-toggle) * ============================================================ */
/* ===== Button — V2 canonical: 3 variants x 2 sizes ===== */
.btn {
  font-family: var(--font-body);
  font-size: var(--t-label);
  font-weight: var(--w-medium);
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  text-align: center;
  transition: opacity var(--duration-fast) var(--ease-transition),
              background-color var(--duration-fast) var(--ease-transition),
              color var(--duration-fast) var(--ease-transition);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { opacity: 0.85; }
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover {
    background: var(--ink);
    color: var(--bg);
  }
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  text-decoration: underline;
  text-decoration-color: var(--ink-subtle);
  text-underline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { text-decoration-color: var(--ink); }
}

.btn-large {
  padding: 16px 28px;
  font-size: var(--t-body);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

/* Icon + label button. Pairs an SVG glyph with text. */
.btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 200px;
  padding: var(--space-4) var(--space-7);
}
.btn-with-icon .btn-icon {
  flex: 0 0 auto;
  display: block;
}
.btn-with-icon span { line-height: 1; }

/* ===== Header / Nav ===== */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: transparent;
}

.site-header.header-scrolled {
  position: fixed;
  background-color: var(--bg);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(12px);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Match the body container so the logo aligns with page content (e.g. the
     hero greeting) on the left, and the nav-right with content on the right. */
  padding: 28px var(--container-pad-x);
  max-width: var(--container-max);
  margin: 0 auto;
  transition: padding 240ms cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-logo a {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 52px;
  width: auto;
}

/* ===== Animated nf. wordmark =====
   Looks like the original mark at rest: chunky lowercase "nf" with a solid
   ball as the full stop, all ink. On hover a colour gradient sweeps across
   the letters and the ball rolls away to the right, then rolls back. */
.logo-nf {
  display: block;
  overflow: visible;
}

.logo-nf text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  letter-spacing: -0.02em;
}

.logo-nf__base { fill: var(--ink); }

.logo-nf__fill {
  fill: url(#nfg);
  clip-path: inset(-10% 100% -10% 0);
  transition: clip-path 480ms var(--ease-out);
}

.nav-logo a:hover .logo-nf__fill,
.nav-logo a:focus-visible .logo-nf__fill {
  clip-path: inset(-10% -10% -10% 0);
}

.logo-nf__ball {
  fill: var(--ink);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 620ms cubic-bezier(0.34, 1.3, 0.45, 1),
              fill 300ms var(--ease-transition);
}

.nav-logo a:hover .logo-nf__ball,
.nav-logo a:focus-visible .logo-nf__ball {
  animation: nf-roll-away 620ms var(--ease-out) forwards;
  fill: #6B4EFF;
}

/* Rolls away: accelerates out with two tiny hops, like a ball let loose */
@keyframes nf-roll-away {
  0%   { transform: translate(0, 0); }
  35%  { transform: translate(11px, -2.5px); }
  55%  { transform: translate(17px, 0); }
  75%  { transform: translate(22px, -1.2px); }
  100% { transform: translate(26px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-nf__fill, .logo-nf__ball { transition: none; }
  .nav-logo a:hover .logo-nf__ball { animation: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-size: 1.05rem;
  font-weight: 400;
  position: relative;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--ink);
  transition: width var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    opacity: 0.7;
  }

  .nav-links a:hover::after {
    width: 100%;
  }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-right .btn {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 300px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

/* ============================================================ * 7. PAGE-SPECIFIC OVERRIDES (home, about, contact, projects, case studies) * ============================================================ */
/* ===== Hero Section ===== */
.hero {
  /* Extra top clearance so the greeting breathes below the transparent nav */
  padding: calc(var(--section-pad-y-lg) + 40px) 0 var(--section-pad-y);
  background-color: var(--bg);
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 80px;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-family: var(--font-display);
  /* Fluid: 1.4rem at 320px viewport up to 2.5rem at 1200px+ */
  font-size: clamp(1.4rem, 0.96rem + 2.2vw, 2.5rem);
  font-weight: var(--w-medium);
  letter-spacing: var(--tracking-tight);
  margin-bottom: 64px;
  line-height: 1.3;
  max-width: 720px;
}

/* The greeting headline — the loudest thing on the page */
.hero-text h1.hero-hello {
  font-size: clamp(2.6rem, 1.7rem + 4.5vw, 4.25rem);
  font-weight: var(--w-medium);
  line-height: 1.1;
  margin-bottom: 40px;
}

/* One line on desktop: hide the break so "Hi, I'm Noma" reads across. The
   trailing space typed after "Hi," keeps the words apart. */
.hero-hello__br { display: none; }

.hero-hello .wave {
  display: inline-block;
  margin-left: 0.18em;
  transform-origin: 70% 70%;
  animation: nf-wave 1.4s ease-in-out 300ms 1;
}

.hero-hello:hover .wave { animation: nf-wave 1.2s ease-in-out; }

@keyframes nf-wave {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(16deg); }
  40% { transform: rotate(-8deg); }
  60% { transform: rotate(12deg); }
  80% { transform: rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-hello .wave { animation: none; }
}

/* Decorative strikethrough on the word "built" */
.hero-text h1 .built-strike {
  position: relative;
  display: inline-block;
}

.hero-text h1 .built-strike::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  height: 2px;
  background-color: var(--ink);
  transform: rotate(-4deg);
}

.hero-text .intro-paragraph {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 36px;
  color: var(--ink);
  max-width: 600px;
}

.hero-text .intro-paragraph strong {
  font-weight: var(--w-semibold);
}

.hero-text .equipped-heading {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: var(--w-semibold);
  margin-bottom: 16px;
}

.hero-text .equipped-list {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 56px;
}

.hero-text .equipped-list li {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.85;
  margin-bottom: 8px;
  color: var(--ink);
}

/* See Projects button + arrow wrapper */
.see-projects-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 56px;
}

.see-projects-row .btn-large {
  padding: 20px 56px;
  font-size: 1.1rem;
}

.see-projects-row .arrow-down {
  display: inline-block;
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1;
  margin: 0;
  color: var(--ink);
  vertical-align: middle;
  transform-origin: center;
  animation: arrowBob 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes arrowBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (hover: hover) and (pointer: fine) {
  .see-projects-row:hover .arrow-down {
    animation-duration: 0.9s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .see-projects-row .arrow-down { animation: none; }
}

.hero-image {
  flex-shrink: 0;
}

.hero-image img {
  width: 380px;
  height: 540px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-image-mobile {
  display: none;
}

/* ===== Section Headings ===== */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 2.9rem);
  font-weight: var(--w-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  margin-bottom: 56px;
  text-align: left;
}

/* ===== Card — V2 canonical ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: var(--card-pad);
}

.card--feature {
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 0 var(--rule);
}

/* ===== Pill / tag — V2 canonical ===== */
.pill,
.project-tag {
  display: inline-flex;
  align-items: center;
  background: var(--surface-sunken);
  color: var(--ink-muted);
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: var(--t-label);
  font-weight: var(--w-medium);
  letter-spacing: 0.02em;
  line-height: 1;
}

/* ===== Link (inline body) — V2 canonical ===== */
.prose a, .case-body a, p a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-subtle);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--duration-fast) var(--ease-transition);
}
.prose a:hover, .case-body a:hover, p a:hover {
  text-decoration-color: var(--ink);
}
.prose a:visited, .case-body a:visited, p a:visited {
  color: var(--ink);
}

/* ===== Project Cards ===== */
.projects-section {
  padding: var(--section-pad-y-lg) 0 var(--section-pad-y);
  background-color: var(--bg);
}

/* On the home page the projects section follows the hero+divider, so the
   visual transition already provides the breathing room — collapse the top
   padding there. Inner pages (e.g. /projects/index.html) keep the full
   160px so the heading clears the fixed header. */
.section-divider + .projects-section {
  padding-top: 64px;
}

/* On the home page the projects section follows the hero directly. Tighten
   the top so the gap above "Case studies" is proportionate with the heading's
   own 48px bottom margin, rather than a cavernous 96px. */
.hero + .projects-section {
  padding-top: 56px;
}

.projects-section .section-heading {
  margin-bottom: 48px;
}

.project-card {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-bottom: 72px;
  transition: transform var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover {
    transform: translateY(-4px);
  }
  .project-card:hover .project-card-image {
    box-shadow: 0 40px 80px -30px rgba(25, 35, 64, 0.45), 0 16px 36px -16px rgba(25, 35, 64, 0.28);
  }
}

.project-card:last-child {
  margin-bottom: 0;
}

/* Standalone square image container - always on left */
.project-card-image {
  position: relative; /* anchors .cover-mini vignettes inside the card */
  flex: 0 0 460px;
  width: 460px;
  height: 460px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(25, 35, 64, 0.35), 0 12px 28px -14px rgba(25, 35, 64, 0.22);
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

.project-card-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  transition: transform var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .project-card-image img:hover {
    transform: scale(1.03);
  }
}

/* In-progress placeholder — CSS-rendered card that fills the same
   460×460 footprint as a project image until the real artwork is ready. */
.project-card-image--placeholder {
  background:
    radial-gradient(circle at 30% 25%, oklch(0.98 0.005 260) 0%, transparent 60%),
    radial-gradient(circle at 75% 80%, oklch(0.88 0.04 18 / 0.65) 0%, transparent 55%),
    var(--surface-sunken);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 32px;
  color: var(--ink);
}

.project-placeholder__brand {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

.project-placeholder__label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: var(--tracking-normal);
  
  padding: 8px 18px;
  border-radius: 300px;
  background: oklch(0.25 0.06 260 / 0.08);
  border: 1px solid oklch(0.25 0.06 260 / 0.18);
  backdrop-filter: blur(6px);
}

.btn-disabled {
  background: oklch(0.25 0.06 260 / 0.4) !important;
  color: var(--surface) !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* Swirl divider between project cards */
.project-divider {
  margin: 16px 0;
}

.project-divider svg {
  display: block;
  width: 100%;
  height: 40px;
}

.project-card-content {
  flex: 1;
  padding: var(--space-7) var(--space-6);
}

.project-card-content h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: var(--w-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  margin-bottom: var(--space-2);
}

.project-card-content .project-tag {
  margin-bottom: var(--space-4);
}

.project-card-content .project-desc {
  font-size: var(--t-body);
  font-weight: var(--w-regular);
  line-height: var(--leading-relaxed);
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
}

.project-card-content .project-disclaimer {
  font-size: var(--t-meta);
  font-style: italic;
  font-weight: var(--w-regular);
  line-height: var(--leading-normal);
  color: var(--ink-subtle);
  margin-bottom: var(--space-5);
  max-width: 56ch;
}

.project-meta {
  margin-bottom: var(--space-6);
}

.project-meta p {
  font-size: var(--t-meta);
  color: var(--ink-subtle);
  margin-bottom: var(--space-1);
}

.project-meta strong {
  color: var(--ink);
  font-weight: var(--w-medium);
}

.project-card-content .btn {
  font-size: 0.9rem;
  padding: 14px 48px;
}

/* ===== About Page ===== */
.about-section {
  padding: var(--section-pad-y-lg) 0 var(--section-pad-y);
  background-color: var(--bg);
}

/* About hero strip */
.about-hero {
  display: flex;
  gap: 64px;
  align-items: center;
  margin: 0 auto 96px;
  max-width: 1100px;
}

.about-hero-portrait {
  position: relative;
  flex: 0 0 300px;
  width: 300px;
  height: 360px;
}

.about-hero-portrait > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.about-hero-lens {
  display: none;
}

@media (min-width: 1024px) {
  .about-hero-lens {
    display: block;
    position: absolute;
    right: -44px;
    bottom: -36px;
    width: 168px;
    border-radius: 12px;
    overflow: hidden;
    transform: rotate(2.4deg);
    box-shadow: 0 18px 40px -22px oklch(0 0 0 / 0.12);
    z-index: 2;
  }
  .about-hero-lens img {
    width: 100%;
    height: auto;
    display: block;
  }
}

.about-hero-text {
  flex: 1;
  min-width: 0;
}

.about-hero-greeting {
  font-family: var(--font-heading);
  font-size: var(--t-h1);
  font-weight: var(--w-medium);
  color: var(--ink);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

.about-hero-tagline {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 52ch;
}

/* Quick facts bento */
.facts-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto 96px;
}

.fact-card {
  background-color: var(--surface);
  padding: var(--card-pad-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--rule);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .fact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -16px rgba(25, 35, 64, 0.22);
  }
}

.fact-emoji {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 10px;
  line-height: 1;
}

.fact-card h3 {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: var(--tracking-normal);
  
  color: var(--ink-subtle);
  margin-bottom: 6px;
}

.fact-card p {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

.fact-sub {
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 300;
}

/* Q&A section heading */
.qa-section-heading {
  font-family: var(--font-heading);
  font-size: var(--t-h2);
  font-weight: var(--w-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  text-align: center;
  margin-bottom: 56px;
  color: var(--ink);
}

/* Q&A blocks */
.qa-block {
  max-width: 900px;
  margin: 0 auto 24px;
  background-color: var(--surface);
  padding: 44px 56px;
  border-radius: 16px;
  border-left: 4px solid var(--rule);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.qa-block--pink {
  background-color: var(--surface-sunken);
  border-left-color: var(--ink-subtle);
}

.qa-block--navy {
  background-color: var(--surface-sunken);
  border-left-color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .qa-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -16px rgba(25, 35, 64, 0.2);
  }
}

.qa-block:last-of-type {
  margin-bottom: 0;
}

.qa-block .question {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
}

.qa-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.qa-block .answer {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: none;
}

/* About CTA */
.about-cta {
  text-align: center;
  padding: 64px 40px;
  background-color: var(--surface);
  border-radius: 24px;
  margin: 72px auto 0;
  max-width: 900px;
}

.about-cta h2 {
  font-family: var(--font-heading);
  font-size: var(--t-h2);
  font-weight: var(--w-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  margin-bottom: 28px;
}

.about-cta .cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Lens heading subtitle */
.lens-heading-sub {
  color: var(--ink-subtle);
  font-weight: 400;
}

/* ===== Contact Page ===== */
.contact-section {
  padding: var(--section-pad-y-lg) 0 var(--section-pad-y-sm);
  background-color: var(--bg);
  text-align: center;
}

.contact-section .section-heading {
  text-align: center;
  margin-bottom: 24px;
}

.contact-intro {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-muted);
  margin: 0 auto 40px;
  max-width: 620px;
  text-align: center;
}

.contact-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.contact-buttons .btn {
  min-width: 280px;
  padding: 18px 32px;
  font-size: 0.95rem;
}

.contact-form-section {
  padding: 56px 0 96px;
  background-color: var(--bg);
  text-align: center;
}

.contact-form-section .form-heading {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  font-weight: var(--w-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  margin-bottom: 40px;
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  flex: 1;
  margin-bottom: 20px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-section-label {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 12px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}

.form-group label .required {
  font-weight: 300;
  color: var(--ink-subtle);
  margin-left: 4px;
}

/* ===== Input + form — V2 canonical (token-driven, fixes dark mode) ===== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"],
input[type="password"],
textarea,
select {
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: var(--w-regular);
  line-height: 1.5;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--duration-fast) var(--ease-transition),
              box-shadow var(--duration-fast) var(--ease-transition);
  width: 100%;
  box-sizing: border-box;
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-subtle);
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--ink-muted);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ink);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 15%, transparent);
}

input:user-invalid,
textarea:user-invalid {
  border-color: var(--warning);
}

input:disabled,
textarea:disabled,
select:disabled {
  background: var(--surface-sunken);
  color: var(--ink-subtle);
  cursor: not-allowed;
}

.form-label {
  font-size: var(--t-label);
  font-weight: var(--w-medium);
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form .btn {
  margin-top: 8px;
}

/* ===== Case Study Hero ===== */
.case-study-hero {
  padding: var(--section-pad-y-lg) 0 var(--section-pad-y);
  text-align: left;
  background-color: var(--bg);
}

.case-study-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--ink);
}

.case-study-hero__subtitle {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  max-width: 720px;
}

.case-study-hero__subtitle strong {
  font-weight: 700;
}

.case-study-hero__subtitle em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-muted);
}

.case-study-hero .subtitle {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 20px;
  font-style: italic;
  font-weight: 700;
}

.case-study-hero .message {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 0 12px;
}

.case-study-hero .message-secondary {
  margin-top: 32px;
  max-width: 560px;
}

.case-study-hero .monash-link {
  display: inline-block;
  margin-top: 24px;
}

/* ===== Case Study Hero — Image variant (Kulcha, Vinnies) ===== */
.case-study-hero--image {
  padding: 120px 0 56px;
  text-align: center;
}

.case-study-hero__mockup {
  display: block;
  margin: 0 auto;
  max-width: 880px;
  width: 100%;
  height: auto;
}

/* ===== Title Banner (dark navy, sits after image hero) ===== */
.case-study-title-banner {
  background-color: var(--ink);
  color: var(--surface);
  padding: var(--section-pad-y-sm) 0;
  text-align: center;
}

.case-study-title-banner h1 {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--surface);
  margin-bottom: 16px;
  line-height: 1.2;
}

.case-study-title-banner__subtitle {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  color: oklch(0.95 0 0);
  max-width: 760px;
  margin: 0 auto;
}

.case-study-title-banner__subtitle strong {
  font-weight: 700;
  color: var(--surface);
}

.case-study-title-banner__subtitle em {
  font-style: italic;
  font-weight: 400;
  color: oklch(0.88 0.005 260);
}

@media (max-width: 768px) {
  .case-study-hero--image {
    padding: var(--section-pad-y) 0 40px;
  }

  .case-study-title-banner {
    padding: var(--space-7) 0;
  }

  .case-study-title-banner h1 {
    font-size: 1.9rem;
  }

  .case-study-title-banner__subtitle {
    font-size: 1.05rem;
  }
}

/* ===== Case Study Hero — 2-column variant (Theia placeholder) ===== */
.case-study-hero--two-col {
  text-align: left;
}

.case-study-hero--two-col .case-study-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.case-study-hero--two-col .case-study-hero__text h1 {
  text-align: left;
  margin-bottom: 24px;
}

.case-study-hero__description {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-muted);
  margin-bottom: 32px;
}

.case-study-hero__wip-heading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 16px;
}

.case-study-hero__wip-message {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-muted);
}

.case-study-hero__image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.case-study-hero__image img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .case-study-hero--two-col .case-study-hero__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .case-study-hero--two-col .case-study-hero__text h1 {
    text-align: center;
  }
}

/* ===== Case Study Metadata Grid ===== */
.case-study-meta {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.meta-grid .meta-item h3,
.meta-grid .meta-item h4,
.meta-grid .meta-item > strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 0;
  color: var(--ink);
}

.meta-grid .meta-item p,
.meta-grid .meta-item > span {
  display: block;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-muted);
}

.case-study-meta__role {
  max-width: 800px;
  margin: 32px auto 0;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-muted);
  text-align: center;
}

/* ===== Case Study Sections ===== */
.case-study-section {
  padding: 72px 0;
}

/* All body sections share the cream background; "alt" used to alternate pink
   but the original Squarespace runs one continuous cream colour through the
   body, with only phase-banner sections (.case-study-section--dark) inverting
   to navy. Keeping the --alt selector so existing HTML keeps validating. */
.case-study-section--alt {
  background-color: var(--bg);
}

/* Removed thin section divider — original Squarespace relies on padding alone. */

/* ===== Dark Phase Banner ===== */
.case-study-section--dark {
  background-color: var(--ink);
  color: var(--surface);
  padding: var(--section-pad-y) 0;
}

.case-study-section--dark .container h2,
.case-study-section--dark .container h3,
.case-study-section--dark .container h4,
.case-study-section--dark .container .section-heading--large,
.case-study-section--dark .container .problem-statement,
.case-study-section--dark .container .problem-statement strong,
.case-study-section--dark .container .research-goal-statement,
.case-study-section--dark .container .research-goal-statement strong {
  color: var(--surface);
}

.case-study-section--dark .container p,
.case-study-section--dark .container h3,
.case-study-section--dark .container h4 {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.case-study-section--dark .container p {
  color: oklch(0.95 0 0);
}

.case-study-section--dark .container ul li,
.case-study-section--dark .container ol li {
  color: oklch(0.95 0 0);
}

.case-study-section--dark .container strong,
.case-study-section--dark .container em {
  color: inherit;
}

/* Cards inside dark sections keep their own white background + dark text */
.case-study-section--dark .stat-card,
.case-study-section--dark .stat-item,
.case-study-section--dark .competitor-card,
.case-study-section--dark .journey-needs > div,
.case-study-section--dark .journey-stages > span,
.case-study-section--dark .journey-stages > div,
.case-study-section--dark .journey-emotions > span,
.case-study-section--dark .journey-emotions > div,
.case-study-section--dark .journey-scenario {
  background: var(--surface);
  color: var(--ink);
}

.case-study-section--dark .stat-card p,
.case-study-section--dark .stat-item p,
.case-study-section--dark .competitor-card p,
.case-study-section--dark .competitor-card h4,
.case-study-section--dark .journey-needs > div h4,
.case-study-section--dark .journey-scenario h4 {
  color: var(--ink);
  max-width: none;
}

.case-study-section--dark .stat-card p strong,
.case-study-section--dark .stat-item p strong {
  color: var(--ink);
}

.case-study-section--dark .section-heading--large {
  font-style: italic;
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 40px;
}

.section-heading--large.cs-heading--center,
.case-study-section--dark .section-heading--large.cs-heading--center {
  text-align: center;
}

/* ===== Section Heading Large (lives inside dark phase sections) ===== */
.section-heading--large {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 32px;
  line-height: 1.2;
}

.case-study-section .container > h2,
.case-study-section h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--ink);
}

.case-study-section h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 16px;
  margin-top: 36px;
  color: var(--ink);
}

.case-study-section p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: 880px;
  margin-bottom: 16px;
}

.case-study-section p:last-child {
  margin-bottom: 0;
}

.case-study-section ul,
.case-study-section ol,
.case-study-list {
  padding-left: 24px;
  margin-bottom: 20px;
  max-width: 800px;
}

.case-study-section ul li,
.case-study-section ol li,
.case-study-list li {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.case-study-section ol {
  list-style: decimal;
}

.case-study-section ul {
  list-style: disc;
}

/* ===== Phase Labels (small italic label above section heading) ===== */
.case-study-phase-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 24px;
  letter-spacing: 0;
  text-transform: none;
}

.case-study-section--dark .case-study-phase-label {
  color: var(--surface);
}

/* ===== Two Column Layout ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-top: 24px;
  align-items: start;
}

.two-col p {
  max-width: none;
}

/* Image+text variant: image fills its column, vertically centered with text */
.two-col--image {
  align-items: center;
}

.two-col--image img {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: block;
}

/* Reverse: put image first column visually on small screens for image-right variant */
.two-col__image-right {
  order: 2;
}

/* Centered heading modifier used on cream-background sections that match the
   original Squarespace center-aligned section titles. */
.cs-heading--center,
.case-study-section h2.cs-heading--center {
  text-align: center;
}

.cs-heading--center + p,
.case-study-section h2.cs-heading--center + p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .two-col__image-right {
    order: 0;
  }
}

/* ===== Stat Cards ===== */
.stat-grid,
.stat-cards,
.stats-callout {
  display: flex;
  gap: 32px;
  justify-content: center;
  padding: 36px 0;
  flex-wrap: wrap;
}

.stat-card,
.stat-item {
  background: var(--surface);
  border-radius: 20px;
  padding: 36px;
  text-align: center;
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  box-shadow: 0 4px 24px oklch(0 0 0 / 0.12);
}

.stat-card h3,
.stat-card .stat-number,
.stat-item .stat-number,
.stat-card h2 {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 12px;
}

.stat-card p,
.stat-item .stat-label {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink-subtle);
  line-height: 1.5;
  max-width: none;
}

/* ===== Insight Cards ===== */
.insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.insight-card {
  background: var(--ink);
  color: var(--surface);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 2px 16px oklch(0 0 0 / 0.06);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px oklch(0 0 0 / 0.12);
  }
}

.insight-card h3,
.insight-card h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
  color: var(--surface);
  line-height: 1.4;
}

.insight-card p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.65;
  color: oklch(0.95 0 0);
  max-width: none;
}

/* ===== Blockquotes ===== */
.case-study-blockquote,
.case-study-section blockquote {
  border-left: 3px solid var(--ink);
  padding: 24px 32px;
  margin: 32px 0;
  background: oklch(0.25 0.06 260 / 0.03);
  border-radius: 0 12px 12px 0;
  max-width: 800px;
}

.case-study-blockquote p,
.case-study-section blockquote p {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink);
  max-width: none;
}

/* ===== Journey Steps ===== */
.journey-steps {
  display: flex;
  gap: 16px;
  margin: 32px 0;
  overflow-x: auto;
  padding-bottom: 16px;
}

.journey-steps .step {
  flex: 1;
  min-width: 180px;
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 12px oklch(0 0 0 / 0.06);
}

.journey-steps .step h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}

.journey-steps .step p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink-muted);
  max-width: none;
}

/* ===== Journey Stages (Vinnies style) ===== */
.journey-stages,
.journey-emotions,
.journey-needs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 16px 0 32px;
}

.journey-stages > div,
.journey-stages > span,
.journey-emotions > div,
.journey-emotions > span,
.journey-needs > div {
  background: var(--surface);
  padding: 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 1px 8px oklch(0 0 0 / 0.06);
  color: var(--ink);
}

.journey-stages > span {
  
  letter-spacing: 1px;
  font-weight: 600;
  font-size: 0.75rem;
}

.journey-emotions > span {
  font-style: italic;
  font-weight: 300;
  color: var(--ink-muted);
}

.journey-needs > div h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}

.journey-scenario {
  background: var(--surface);
  border-radius: 14px;
  padding: 24px 28px;
  margin: 24px 0;
  box-shadow: 0 2px 12px oklch(0 0 0 / 0.06);
  max-width: 800px;
}

.journey-scenario h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 12px;
}

.journey-scenario h4:last-child {
  margin-bottom: 0;
}

/* ===== Competitor Tags ===== */
.case-study-competitors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}

.competitor-tag {
  display: inline-block;
  background: var(--ink);
  color: var(--surface);
  padding: 6px 16px;
  border-radius: 300px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Problem statement / research goal statement (Kulcha) ===== */
.problem-statement,
.research-goal-statement {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  max-width: 760px;
  margin: 24px auto;
  text-align: center;
}

.problem-statement strong,
.research-goal-statement strong {
  font-weight: var(--w-semibold);
}

/* ===== Quote list (italic user quotes) ===== */
.quote-list {
  list-style: none !important;
  padding-left: 0 !important;
}

.quote-list li {
  font-style: italic;
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-muted);
  border-left: 2px solid var(--rule);
  padding-left: 16px;
  margin-bottom: 14px;
  list-style: none;
}

/* ===== Case study takeaway (Vinnies-style standout line) ===== */
.case-study-takeaway {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
  max-width: 760px;
  margin: 16px 0 24px;
}

.case-study-list--takeaways {
  list-style: none !important;
  padding-left: 0 !important;
}

.case-study-list--takeaways li {
  list-style: none;
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.6;
}

/* ===== Case study link (Medium etc.) ===== */
.case-study-link {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--ink);
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  margin-top: 16px;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.case-study-link:hover {
  opacity: 0.7;
}

/* ===== Competitor Cards (Vinnies) ===== */
.competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.competitor-card {
  background: var(--surface);
  padding: 20px 22px;
  border-radius: 14px;
  box-shadow: 0 1px 8px oklch(0 0 0 / 0.06);
}

.competitor-card h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.competitor-card p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0;
}

/* ===== Accordion ===== */
.accordion {
  margin: 24px 0;
  max-width: 800px;
}

.accordion details {
  background: var(--surface);
  border-radius: 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 8px oklch(0 0 0 / 0.06);
  overflow: hidden;
}

.accordion summary {
  padding: 18px 24px;
  font-family: var(--font-heading);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .accordion summary:hover {
    background-color: oklch(0.97 0.01 70);
  }
}

.accordion summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  transition: transform var(--duration-normal) var(--ease-out);
}

.accordion details[open] summary::after {
  content: '\2212';
  transform: rotate(180deg);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion .accordion-content {
  padding: 0 24px 20px;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-muted);
}

/* Accordion inside dark phase sections — light card on dark bg */
.case-study-section--dark .accordion details {
  background: oklch(1 0 0 / 0.06);
  border: 1px solid oklch(1 0 0 / 0.12);
  box-shadow: none;
}

.case-study-section--dark .accordion summary,
.case-study-section--dark .accordion summary h3,
.case-study-section--dark .accordion summary::after {
  color: var(--surface);
}

.case-study-section--dark .accordion .accordion-content {
  color: oklch(0.95 0 0);
}

/* ===== Squarespace-style flat accordion =====
   Used inside dark navy sections (Kulcha Final Solution). Full-width rows
   with horizontal divider lines between items, no card chrome.
   Selectors are bumped to beat .cs-section--navy .accordion summary in
   case-study.css. */
.cs-section .accordion.accordion--flat,
.accordion.accordion--flat {
  max-width: 100%;
}

.cs-section .accordion.accordion--flat details,
.accordion.accordion--flat details {
  background: transparent !important;
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid oklch(1 0 0 / 0.22);
  margin-bottom: 0;
}

.cs-section .accordion.accordion--flat details:last-of-type,
.accordion.accordion--flat details:last-of-type {
  border-bottom: 1px solid oklch(1 0 0 / 0.22);
}

.cs-section--navy .accordion.accordion--flat summary,
.accordion.accordion--flat summary {
  padding: 28px 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.4rem;
  color: #FFFFFF;
  background: transparent;
}

.cs-section--navy .accordion.accordion--flat summary::after,
.accordion.accordion--flat summary::after {
  content: '+';
  font-size: 1.8rem;
  font-weight: 300;
  color: #FFFFFF;
}

.accordion.accordion--flat details[open] summary::after {
  content: '\2212';
  color: #FFFFFF;
}

@media (hover: hover) and (pointer: fine) {
  .accordion.accordion--flat summary:hover {
    background-color: oklch(1 0 0 / 0.05);
  }
}

.cs-section--navy .accordion.accordion--flat .accordion-content,
.cs-section--navy .accordion.accordion--flat .accordion-content *,
.accordion.accordion--flat .accordion-content,
.accordion.accordion--flat .accordion-content * {
  color: oklch(0.95 0 0);
}

.accordion.accordion--flat .accordion-content {
  padding: 0 8px 28px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
}

.accordion.accordion--flat .accordion-content ul {
  padding-left: 1.25em;
}

@media (max-width: 640px) {
  .accordion.accordion--flat summary { font-size: 1.1rem; padding: 22px 4px; }
  .accordion.accordion--flat .accordion-content { padding: 0 4px 22px; }
}

.case-study-section--dark .accordion .accordion-content p {
  color: oklch(0.95 0 0);
}

/* ===== Case Study Images ===== */
.case-study-section img {
  max-width: 100%;
  margin: 24px 0;
}

/* Width utility classes for case-study imagery. All vertically margined and
   left-aligned so they sit with the surrounding text column. */
img.img-full { max-width: 100%;  margin: 24px 0;    display: block; }
img.img-xl   { max-width: min(1040px, 100%); margin: 24px auto; display: block; }
img.img-lg   { max-width: min(800px, 100%);  margin: 24px auto; display: block; }
img.img-md   { max-width: min(620px, 100%);  margin: 24px auto; display: block; }
img.img-sm   { max-width: min(440px, 100%);  margin: 24px auto; display: block; }
img.img-xs   { max-width: min(300px, 100%);  margin: 24px auto; display: block; }

/* Modifier: subtle rounded corners + drop shadow for document-style images
   that sit on the cream background (e.g. persona cards). */
img.img-card {
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(25, 35, 64, 0.08);
}

/* ===== Video Embed (responsive 16:9) ===== */
.video-embed {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  margin: 24px 0 32px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px oklch(0 0 0 / 0.06);
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== Case Study Nav (Next/Prev) ===== */
.case-study-nav,
.next-project {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--rule);
  max-width: 800px;
  margin: 0 auto;
}

.case-study-nav a,
.next-project a {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--ink);
  transition: opacity var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .case-study-nav a:hover,
  .next-project a:hover {
    opacity: 0.7;
  }
}

/* ===== Contact Form inside Case Study ===== */
.case-study-section .contact-form {
  max-width: 600px;
}

.case-study-section .contact-form .form-row {
  display: flex;
  gap: 16px;
}

.case-study-section .contact-form .form-group {
  flex: 1;
  margin-bottom: 20px;
}

.case-study-section .contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  
}

.case-study-section .contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* ===== Testimonials ===== */
.testimonials-section {
  padding: var(--section-pad-y) 0 64px;
  background-color: var(--bg);
  text-align: left;
}

.testimonials-section .section-heading {
  margin-bottom: 24px;
}

.testimonials-lede {
  max-width: 56ch;
  margin: 0 0 40px;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-muted);
}

.testimonials-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.testimonials-cta-arrow {
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .testimonials-cta:hover .testimonials-cta-arrow {
    transform: translateX(4px);
  }
}

@media (max-width: 768px) {
  .testimonials-section {
    padding: 72px 0 48px;
  }
  .testimonials-cta {
    padding: 14px 36px;
    font-size: 0.95rem;
  }
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--bg);
  color: var(--ink);
  padding: 72px 0 36px;
  margin-top: 96px;
  border-top: 1px solid var(--rule);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad-x);
  text-align: center;
}

.footer-inner .reach-out {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 28px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 36px;
}

.footer-links a {
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 300;
  transition: color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: var(--ink);
  }
}

.footer-copyright {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink-subtle);
}

/* ===== Login link in nav ===== */
.nav-login {
  font-size: 1rem;
  font-weight: 300;
  transition: opacity 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-login:hover {
  opacity: 0.7;
}

/* ===== Arrow down (used in see-projects-row) ===== */
.arrow-down {
  font-size: 2.5rem;
  font-weight: 400;
}

/* ===== Life through my lens section ===== */
.lens-section {
  padding: 48px 0 64px;
}

.lens-heading {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 24px;
}

.lens-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.lens-carousel::-webkit-scrollbar {
  display: none;
}

.lens-carousel img {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  scroll-snap-align: start;
  transition: transform var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .lens-carousel img:hover {
    transform: scale(1.03);
  }
}

/* Carousel arrows */
.lens-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.carousel-arrow:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .carousel-arrow:hover {
    background: var(--ink);
    color: var(--surface);
  }
}

/* ===== Slideshow (Theia) ===== */
.slideshow {
  position: relative;
}

.slideshow-track {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
}

.slideshow-slide {
  display: none;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.slideshow-slide.active {
  display: block;
  animation: fadeIn 300ms ease-out;
}

.slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.slideshow-counter {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-subtle);
  min-width: 60px;
  text-align: center;
}

.lens-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.lens-carousel::-webkit-scrollbar {
  display: none;
}

.lens-carousel img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

/* ===== Page Header (for inner pages) ===== */
.page-header {
  padding: 72px 0 24px;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 500;
}

/* ===== Section Divider (SVG wave) ===== */
.section-divider {
  display: block;
  width: 100%;
  height: auto;
  margin-top: -2px;
  margin-bottom: -2px;
}

.section-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .project-card {
    animation: none;
  }
}

/* ============================================================ * 8. RESPONSIVE * ============================================================ */
/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
  .hero-inner {
    gap: 40px;
  }

  .hero-image img {
    width: 320px;
    height: 460px;
  }

  .project-card {
    gap: 32px;
  }

  .project-card-image {
    flex: 0 0 340px;
    width: 340px;
    height: 340px;
  }

  .project-card-content {
    padding: 0;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
  .nav-links,
  .nav-right {
    display: none;
  }

  .nav-links.active,
  .nav-right.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  /* Mobile nav dropdown */
  .nav-wrapper {
    flex-wrap: wrap;
  }

  .nav-links.active {
    flex-direction: column;
    width: 100%;
    padding: 16px 0;
    gap: 16px;
    order: 3;
  }

  body:has(.nav-links.active) .site-header {
    position: fixed;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 16px 32px -24px oklch(0 0 0 / 0.25);
    z-index: 200;
  }

  .nav-right.active {
    flex-direction: column;
    width: 100%;
    padding: 0 0 16px;
    gap: 12px;
    order: 4;
    align-items: flex-start;
  }

  /* Hero — top padding must clear the absolute header (~108px tall) */
  .hero {
    padding: 148px 0 40px;
  }

  /* Two lines on mobile: reveal the break after "Hi," */
  .hero-hello__br { display: block; }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: left;
    gap: 32px;
  }

  .hero-text h1 {
    max-width: none;
  }

  .hero-text .intro-paragraph {
    max-width: none;
  }

  .hero-text .equipped-list {
    text-align: left;
    max-width: 400px;
  }

  .hero-image-desktop {
    display: none;
  }

  /* The wrapper hugs the image width (not the full column) so the blob
     behind it wraps the photo tightly, exactly like the desktop arch,
     instead of ballooning into a giant oval around a skinny image. */
  .hero-inner .hero-image-mobile {
    display: block;
    position: relative;
    width: min(300px, 78vw);
    margin: 8px auto 20px;
  }

  .hero-inner .hero-image-mobile::before {
    content: '';
    position: absolute;
    inset: -18px -22px -12px -18px;
    background: var(--surface-sunken);
    border-radius: 44% 56% 48% 52% / 58% 44% 56% 42%;
    transform: rotate(4deg);
    z-index: 0;
  }

  /* Same proportions as the desktop portrait, just scaled to fit. Higher
     specificity than the base .hero-image img so width/height truly win. */
  .hero-inner .hero-image-mobile img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 380 / 540;
    object-fit: cover;
    display: block;
    margin: 0;
  }

  .hero-text .see-projects-wrapper::after {
    display: none;
  }

  /* Project cards */
  .project-card {
    flex-direction: column;
    gap: 24px;
  }

  .project-card-image {
    flex: none;
    width: 100%;
    height: 300px;
  }

  .project-card-content {
    padding: 0 4px;
  }

  .project-card-content h3 {
    font-size: 1.3rem;
  }

  /* About */
  .about-hero {
    flex-direction: column;
    gap: 28px;
    text-align: center;
    margin-bottom: 64px;
  }

  .about-hero-portrait {
    flex: none;
    width: 220px;
    height: 260px;
  }

  .about-hero-text {
    flex: none;
  }

  .about-hero-greeting {
    font-size: 1.5rem;
  }

  .about-hero-tagline {
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
  }

  .facts-bento {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 64px;
  }

  .qa-section-heading {
    font-size: 1.5rem;
    margin-bottom: 40px;
  }

  .qa-block {
    padding: 32px 28px;
  }

  .qa-block .question {
    font-size: 1.15rem;
  }

  .about-cta {
    padding: 40px 24px;
  }

  .about-cta h2 {
    font-size: 1.4rem;
  }

  /* Contact */
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row .form-group {
    margin-bottom: 20px;
  }

  .contact-links a {
    display: block;
    margin-right: 0;
    margin-bottom: 12px;
  }

  /* Footer */
  .site-footer {
    margin-top: 56px;
    padding: 48px 0 28px;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }

  /* Section heading */
  .section-heading {
    font-size: 2rem;
  }
}

/* ===== Responsive: Mobile Case Study ===== */
@media (max-width: 768px) {
  .meta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .stat-grid,
  .stat-cards,
  .stats-callout {
    flex-direction: column;
    align-items: center;
  }

  .stat-card {
    max-width: 100%;
    width: 100%;
  }

  .insight-cards {
    grid-template-columns: 1fr;
  }

  .journey-steps {
    flex-direction: column;
  }

  .case-study-hero {
    padding: 112px 0 56px;
  }

  .case-study-hero h1 {
    font-size: 2rem;
  }

  .case-study-hero__subtitle {
    font-size: 1.1rem;
  }

  .about-section,
  .contact-section,
  .projects-section {
    padding-top: 136px;
  }

  .case-study-section {
    padding: 48px 0;
  }

  .case-study-nav,
  .next-project {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .case-study-section .contact-form .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ===== Responsive: Small Mobile ===== */
@media (max-width: 480px) {
  .hero-image img {
    width: 200px;
  }

  .project-card-image img {
    height: 200px;
  }

  .case-study-hero h1 {
    font-size: 1.7rem;
  }

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

/* ===== Theme toggle ===== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
  background: var(--surface-sunken);
  border-color: var(--rule);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.theme-toggle__icon { display: block; }
.theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--moon { display: block; }

.nav-right { display: inline-flex; align-items: center; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
  .theme-toggle:hover { transform: none; }
}

/* ===== Recent work block (home + projects index) ===== */
.recent-work {
  margin: 0 0 96px;
}

.recent-work__label {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: var(--tracking-normal);
  
  color: var(--ink-subtle);
  margin-bottom: 24px;
}

.recent-work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .recent-work__grid { grid-template-columns: 1fr; }
}

.recent-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.recent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -18px oklch(0 0 0 / 0.12);
}

.recent-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--surface-sunken) 0%, var(--rule) 100%);
  padding: 20px;
  display: flex;
  align-items: flex-end;
}

.recent-card__media--placeholder {
  background: var(--ink);
  color: var(--bg);
  align-items: stretch;
  justify-content: space-between;
  flex-direction: column;
}

[data-theme="dark"] .recent-card__media--placeholder {
  background: #1A1A1F;
}

.recent-card__pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #161616;
  font-family: var(--font-body);
  font-size: var(--t-fine);
  font-weight: 600;
  letter-spacing: var(--tracking-normal);
  
}

.recent-card__pill--placeholder {
  background: var(--surface-sunken);
  color: var(--ink);
  align-self: flex-start;
}

.recent-card__placeholder-mark {
  align-self: flex-end;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-subtle);
  opacity: 0.85;
}

.recent-card__body {
  padding: 24px;
}

.recent-card__client {
  font-size: var(--t-meta);
  color: var(--ink-subtle);
  margin-bottom: 8px;
}

.recent-card__title {
  font-size: var(--t-h3);
  line-height: 1.2;
  margin-bottom: 12px;
}

.recent-card__meta {
  font-size: var(--t-meta);
  color: var(--ink);
  font-weight: 500;
}

.recent-card--placeholder {
  cursor: default;
}

.recent-card--placeholder:hover {
  transform: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .recent-card { transition: none; }
  .recent-card:hover { transform: none; }
}

/* Logo dark-mode treatment: the SVG wordmark inherits var(--ink), no filter needed */

/* ===== Recent project block (rebuilt to match project-card layout) ===== */
.projects-eyebrow {
  font-family: var(--font-body);
  font-size: var(--t-fine);
  font-weight: var(--w-semibold);
  letter-spacing: var(--tracking-normal);
  color: var(--ink-subtle);
  margin: 0 0 var(--space-5);
}

.project-card--recent {
  margin-bottom: var(--space-8);
}

/* Blurred placeholder cover — replaces the phone-montage so client content
   can't be read. The pseudo-elements create soft colour blobs and the whole
   image is heavily blurred. */
.project-card-image--blurred {
  position: relative;
  background: linear-gradient(135deg, var(--surface-sunken) 0%, var(--rule) 100%);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.project-card-image--blurred::before,
.project-card-image--blurred::after {
  content: '';
  position: absolute;
  width: 60%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.project-card-image--blurred::before {
  background: var(--rule);
  top: -8%;
  left: -10%;
}

.project-card-image--blurred::after {
  background: var(--surface-sunken);
  bottom: -12%;
  right: -8%;
}

.project-card-image--blurred a,
.project-card-image--blurred > * {
  position: relative;
  z-index: 1;
}

.project-card-image--blurred a {
  position: absolute;
  inset: 0;
  display: block;
}

.project-card-image--in-progress {
  background: linear-gradient(135deg, var(--rule) 0%, var(--surface-sunken) 100%);
}

.project-card-image--in-progress::before {
  background: var(--rule);
}

.project-card-image--in-progress::after {
  background: var(--surface-sunken);
}

/* Per-project accent — each featured case study carries a subtle identity
   colour through its cover vignette and card pill. All four are drawn from
   the same sunset family as the logo gradient (coral → violet) and the About
   page pastels, so colour reads as one system across the portfolio. */
.project-card--onboarding { --proj-accent: #D4826F; }   /* coral — logo gradient start */
.project-card--wizard     { --proj-accent: #A068B7; }   /* plum — midpoint of the logo gradient */
.project-card--myflow     { --proj-accent: #6B4EFF; }   /* violet — logo gradient end */
.project-card--kulcha     { --proj-accent: #C09A3E; }   /* amber — Kulcha's own yellow, muted */

[data-theme="dark"] .project-card--onboarding { --proj-accent: #E09A87; }
[data-theme="dark"] .project-card--wizard     { --proj-accent: #C39BD9; }
[data-theme="dark"] .project-card--myflow     { --proj-accent: #A896FF; }
[data-theme="dark"] .project-card--kulcha     { --proj-accent: #D9B968; }

.project-card--recent .project-tag {
  background: #E4EDDE;
  color: #47603E;
}

[data-theme="dark"] .project-card--recent .project-tag {
  background: #283223;
  color: #9DB891;
}

/* Kulcha cover: transparent phone montage over the same neutral gradient
   the recreated covers use */
.project-card-image img.kulcha-cover-phones {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

/* Mini wizard vignette — CSS-drawn cover for the Service Wizard card.
   A recreation, not a screenshot: progress bar + option rows. */
.cover-mini {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  width: 64%;
  max-width: 300px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 24px 48px -28px oklch(0 0 0 / 0.3);
  pointer-events: none;
  z-index: 1;
}

.cover-mini__progress {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.cover-mini__progress span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--rule);
}

.cover-mini__progress span.is-done { background: var(--proj-accent, var(--ink)); }

.cover-mini__title {
  height: 9px;
  width: 70%;
  border-radius: 3px;
  background: var(--ink-muted);
  margin-bottom: 12px;
  opacity: 0.85;
}

.cover-mini__row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

.cover-mini__row::before {
  content: '';
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--ink-subtle);
  border-radius: 2px;
  flex: 0 0 auto;
}

.cover-mini__row::after {
  content: '';
  height: 6px;
  border-radius: 3px;
  background: var(--surface-sunken);
  flex: 1;
}

.cover-mini__row--on { border-color: var(--proj-accent, var(--ink)); }
.cover-mini__row--on::before { background: var(--proj-accent, var(--ink)); border-color: var(--proj-accent, var(--ink)); }
.cover-mini__row--on::after { background: var(--rule); }

/* Phone-shaped variant — mobile onboarding vignette */
.cover-mini--phone {
  width: 44%;
  max-width: 190px;
  border-radius: 22px;
  padding: 18px 14px;
}

.cover-mini__cta {
  height: 26px;
  border-radius: 7px;
  background: var(--proj-accent, var(--ink));
  margin-top: 12px;
}

/* Dashboard variant — MyFlow / worker-portal vignette */
.cover-mini--dash {
  width: 62%;
  max-width: 300px;
}

.cover-mini__bar {
  height: 8px;
  width: 45%;
  border-radius: 3px;
  background: var(--ink-muted);
  opacity: 0.85;
  margin-bottom: 12px;
}

.cover-mini__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cover-mini__tile {
  height: 40px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface-sunken);
}

.cover-mini__tile--accent {
  background: var(--proj-accent, var(--ink));
  opacity: 0.9;
}

/* Pill — bottom-left of the cover, consistent across both recent cards */
.project-card-image__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  color: #161616;
  font-family: var(--font-body);
  font-size: var(--t-fine);
  font-weight: var(--w-semibold);
  letter-spacing: var(--tracking-normal);
  align-self: flex-end;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.18);
}

.project-card--in-progress .project-card-content .btn-outline {
  cursor: not-allowed;
  opacity: 0.72;
  pointer-events: none;
}

/* ===== Apple emoji images =====
   Emoticons render as Apple emoji artwork on every OS instead of the
   platform's native set. Monochrome glyph marks (arrows, dots) stay as text. */
img.emoji {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  margin: 0 0.02em;
}

/* ===== Hero portrait — stylised arch =====
   The photo sits in a full arch (rounded top, soft base) over a rotated
   warm blob, echoing the About page treatment in the monochrome palette. */
.hero-image-desktop {
  position: relative;
}

.hero-image-desktop::before {
  content: '';
  position: absolute;
  inset: -20px -26px -14px -18px;
  background: var(--surface-sunken);
  border-radius: 44% 56% 48% 52% / 58% 44% 56% 42%;
  transform: rotate(4deg);
  z-index: 0;
}

.hero-image-desktop img {
  position: relative;
  z-index: 1;
  border-radius: 190px 190px var(--radius-lg) var(--radius-lg);
}

.hero-image-mobile img {
  border-radius: 150px 150px var(--radius-lg) var(--radius-lg);
}
