/* ============================================================
   Štefan Kukla — Portfolio
   Aesthetic reference: Linear, Vercel, Marco Cornacchia.
   Monochrome, fast, technically literate.
   ============================================================ */

:root {
  /* ============================================================
     Design system — dark editorial palette
     Warm near-black surfaces, brass/gold accents, subtle dividers.
     Same token names; values inverted for dark mode.
     ============================================================ */

  /* Surface neutrals (warm near-black family) */
  --paper-light: #0e0d0b;     /* primary page background, deepest */
  --paper: #16140f;            /* elevated surfaces, cards */
  --paper-kraft: #1f1c16;      /* further elevated panels */
  --desk: #28241c;             /* highest-tier surfaces, framed regions */
  --cork: #3a3326;             /* warm brown for accent surfaces */

  /* Ink (warm off-white text on dark) */
  --ink: #f4eedc;              /* primary text — ~17:1 contrast on bg */
  --ink-2: #d4cab2;            /* secondary text — ~11:1 contrast */
  --ink-muted: #a89e87;        /* tertiary / muted text — ~6.5:1 (passes AA) */
  --ink-faint: #6e6655;        /* very faint, placeholders only */

  /* Hairlines and dividers */
  --hairline: #2a2620;         /* 1px borders, subtle dividers */
  --hairline-strong: #3e382e;  /* stronger borders, emphasis */
  --rule: #c7bca6;             /* hard rules (under titles) */

  /* Accents — brass / lacquer, brightened for dark surfaces */
  --gold: #d8b965;             /* primary gold accent */
  --gold-deep: #b08a4e;        /* darker gold, hover state */
  --gold-light: #ecd49a;       /* highlight gold */
  --tan: #a48b5a;              /* warm tan (manila / folder surfaces) */
  --tan-deep: #6b5a3c;         /* tan shadow side */
  --washi: #d4b94e;            /* warm yellow (sticky note) */
  --washi-deep: #a3893a;       /* yellow crease shadow */
  --mustard: #c4a743;          /* mustard accent */
  --hanko: #d65a4e;            /* hanko-stamp red, brightened for dark */
  --hanko-deep: #a83a2e;       /* hanko shadow */

  /* Aliases kept for legacy code in this stylesheet */
  --bg: var(--paper-light);
  --bg-elevated: var(--paper);
  --bg-strong: var(--ink);
  --text: var(--ink);
  --text-muted: var(--ink-2);
  --text-faint: var(--ink-muted);
  --text-inverse: var(--paper-light);
  --border: var(--hairline);
  --border-strong: var(--hairline-strong);

  --accent-shipped: #6fa873;   /* moss green, brightened for dark */
  --accent-preview: #c4894e;   /* earth orange */
  --accent-todo: #d0b350;      /* ochre */

  /* Typography — STRICT TWO-FONT SYSTEM
     ----------------------------------------------------------------
     IBM Plex Sans (sans) for ABSOLUTELY EVERYTHING except display h1.
     Fraunces (display) ONLY for hero/page h1 headings.
     There is NO mono variable. <code>/<pre> get a system monospace
     stack inline on the .mono class. */
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", "Apple Garamond", "Baskerville", "Times New Roman", serif;

  /* Spacing scale — 8px rhythm */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --space-9: 120px;

  /* Layout widths */
  --max-prose: 680px;
  --max-content: 1080px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Radii — restrained */
  --radius-1: 2px;
  --radius-2: 4px;
  --radius-3: 8px;
  --radius: var(--radius-1);

  /* Shadows — deeper, ink-on-black feel */
  --shadow-soft:
    0 1px 1px rgba(0, 0, 0, 0.4),
    0 4px 12px -4px rgba(0, 0, 0, 0.55);
  --shadow-medium:
    0 2px 4px rgba(0, 0, 0, 0.45),
    0 12px 28px -8px rgba(0, 0, 0, 0.6);
  --shadow-deep:
    0 4px 8px rgba(0, 0, 0, 0.5),
    0 20px 48px -12px rgba(0, 0, 0, 0.65),
    0 40px 80px -24px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
}

::selection {
  background: var(--bg-strong);
  color: var(--text-inverse);
}

/* ---------- Layout ---------- */

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

.prose {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Nav ---------- */

.nav {
  border-bottom: 1px solid var(--hairline);
  background: rgba(14, 13, 11, 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  max-width: var(--max-content);
  margin: 0 auto;
}

.nav-brand {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-decoration: none;
}

.nav-brand span {
  color: var(--ink-muted);
  font-weight: 400;
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 32px);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.18s ease;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a.active {
  color: var(--ink);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
}

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 2.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  letter-spacing: -0.015em;
  line-height: 1.02;
  margin-top: 0;
  font-weight: 400;
}

h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
}

h3 {
  font-size: 1.125rem;
  margin-top: 2rem;
}

p {
  margin: 0 0 1.25em;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: var(--text);
}

ul, ol {
  padding-left: 1.25em;
  margin: 0 0 1.25em;
}

li {
  margin: 0.25em 0;
}

blockquote {
  margin: 2.5em 0;
  padding: 0;
  border: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 500;
  color: var(--text);
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.mono {
  /* Legacy hook; intentionally NOT monospace per the design system */
  font-family: var(--font-sans);
}

.label {
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  display: inline-block;
}

.muted {
  color: var(--ink-2);
}

/* ---------- Hero ---------- */

/* Ticker tape — scrolling skill marquee at the very top of the page.
   Two passes of the content sit in one track so the wrap is seamless. */
.hero-ticker {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--paper-light);
  overflow: hidden;
  padding: 14px 0;
  margin-top: -1px;   /* let it sit flush against nav border */
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  animation: ticker-scroll 70s linear infinite;
  will-change: transform;
}

.ticker-track > * {
  display: inline-block;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
    /* Show one frozen pass with a fade to suggest more beyond */
    transform: translateX(0);
  }
}

.hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(44px, 7vw, 80px);
  max-width: 920px;
  margin: 0 auto;
}

/* Status pill — "Available · Senior interaction design" with a pulsing
   moss-green dot. Designer-portfolio trope, executed restrained. */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  background: rgba(74, 122, 78, 0.08);
  border: 1px solid var(--accent-shipped);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-shipped);
  font-weight: 600;
  margin-bottom: 20px;
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-shipped);
  display: inline-block;
  flex-shrink: 0;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent-shipped);
  opacity: 0.4;
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0;   transform: scale(1.8); }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot::after {
    animation: none;
    opacity: 0.4;
    transform: scale(1);
  }
}

/* Editorial statement — display serif, tighter scale so it lands
   on two lines, not four. */
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 14px;
  max-width: 22ch;
}

.hero-subline {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--ink-2);
  max-width: 520px;
  line-height: 1.45;
  margin: 0 0 24px;
}

/* Hero bio — single sentence with inline illuminated stat-numbers
   (italic gold display serif inside body sans) and a small-caps
   tracked skills list. Replaces the definition list. */
.hero-bio {
  max-width: 580px;
  margin: 22px 0 22px;
  padding: 0;
  border: 0;
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.4vw, 16.5px);
  line-height: 1.55;
  color: var(--ink);
}

.hero-bio .bio-stat {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.7em;
  font-weight: 400;
  color: var(--gold-deep);
  letter-spacing: -0.03em;
  line-height: 0.85;
  display: inline-block;
  vertical-align: -0.08em;
  margin-right: 0.04em;
}

.hero-bio .bio-skills {
  /* legacy hook — not used in copy anymore */
  font-family: var(--font-sans);
  font-size: 1em;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hero-bio {
    margin: 18px 0 18px;
  }
  .hero-bio .bio-skills {
    white-space: normal;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 640px) {
  .hero-ticker {
    padding: 11px 0;
  }
  .ticker-track {
    font-size: 9.5px;
    gap: 14px;
    letter-spacing: 0.18em;
  }
  .hero-status {
    font-size: 9.5px;
    letter-spacing: 0.14em;
    padding: 5px 12px;
    margin-bottom: 22px;
  }
  .hero-tagline {
    font-size: clamp(2.25rem, 11vw, 3.5rem);
    max-width: 12ch;
  }
  .hero-facts {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 20px 0;
    margin-bottom: 32px;
  }
  .hero-facts dt {
    padding-top: 14px;
  }
  .hero-facts dt:first-child {
    padding-top: 0;
  }
  .hero-facts dd {
    font-size: 14.5px;
  }
}

/* ---------- Work grid ---------- */

.section {
  padding: clamp(48px, 8vw, 96px) 0;
  position: relative;
  isolation: isolate;
}

/* Work section — clean desk surface for the case-file cards */
.section--work {
  background: linear-gradient(180deg, var(--desk) 0%, var(--paper-kraft) 100%);
  padding-top: 56px;
  padding-bottom: 128px;
}

.section--work::before {
  display: none;
}

/* ============================================================
   Case-file cards — the new Work page treatment. Each case shows
   up as a sheet of paper / project intake brief, with header bar,
   rubber-stamp status, title, summary, and footer metadata. Five
   cards in a clean grid on the desk. No kintsugi seams.
   ============================================================ */

.case-files {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 920px;
  margin: 32px auto 0;
}

@media (min-width: 760px) {
  .case-files {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.case-file {
  display: flex;
  flex-direction: column;
  background: var(--paper-light);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2);
  padding: 0;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.22s cubic-bezier(0.3, 0.7, 0.3, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  overflow: hidden;
}

.case-file:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
  border-color: var(--hairline-strong);
}

/* Top header — case file ID + rubber-stamp status, separated from
   body by a hairline rule */
.case-file .file-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}

.case-file .file-id {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

/* Rubber-stamp status badge — same treatment as case-meta, scaled
   down a notch for the card header */
.case-file .file-status {
  display: inline-block;
  flex-shrink: 0;
  background: transparent;
  color: var(--hanko);
  border: 2px solid var(--hanko);
  padding: 3px 9px 2px;
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  border-radius: 1px;
  box-shadow: 0 0 0 1px var(--hanko-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.8' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-blend-mode: lighten;
}

/* Body — title and short summary */
.case-file .file-body {
  padding: 24px 22px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.case-file h3 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--ink);
}

.case-file .file-summary {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Footer — meta (product / year) + Open file → action */
.case-file .file-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 22px 16px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}

.case-file .file-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.case-file .file-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 12px;
  color: var(--ink-faint);
}

.case-file .file-open {
  color: var(--ink);
  font-weight: 600;
  flex-shrink: 0;
  transition: color 0.22s ease;
}

.case-file:hover .file-open {
  color: var(--hanko);
}

/* Mobile case-files */
@media (max-width: 640px) {
  .case-files {
    margin: 24px auto 0;
    gap: 16px;
  }
  .case-file h3 {
    font-size: 19px;
  }
  .case-file .file-body {
    padding: 20px 18px 18px;
  }
  .case-file .file-head,
  .case-file .file-foot {
    padding-left: 18px;
    padding-right: 18px;
  }
  .case-file .file-foot {
    font-size: 9.5px;
    letter-spacing: 0.14em;
  }
}

/* The paper — top sheet that holds all five cases.
   Beneath it: a visible stack of FIVE more sheets, fanned slightly.
   The two closest (sheets 2 and 3) are pseudo-elements with subtle
   rotation, for a hand-stacked feel. Sheets 4, 5, 6 are layered via
   box-shadow (no rotation, only offset + edge). Only the top sheet
   is clickable. */
.paper {
  position: relative;
  max-width: 720px;
  margin: 40px auto 0;
  background: var(--paper-light);
  padding-top: 72px;
  border: 1px solid var(--hairline);
  box-shadow:
    /* Sheet 4: paper, with a 1px hairline edge behind it */
    16px 18px 0 0 var(--paper-kraft),
    16px 18px 0 1px var(--hairline),
    /* Sheet 5: darker, more offset */
    22px 26px 0 0 var(--desk),
    22px 26px 0 1px var(--hairline),
    /* Sheet 6: deepest */
    28px 34px 0 0 #c5bea6,
    28px 34px 0 1px var(--hairline-strong),
    /* Ambient drop shadow under the whole stack */
    12px 40px 64px -12px rgba(60, 50, 30, 0.30),
    4px 14px 28px -6px rgba(60, 50, 30, 0.16);
}

/* Sheet 2 — slightly rotated, peeking out down-right */
.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  border: 1px solid var(--hairline);
  transform: translate(5px, 7px) rotate(0.5deg);
  z-index: -1;
  pointer-events: none;
}

/* Sheet 3 — rotated the other way, peeking out further */
.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper-kraft);
  border: 1px solid var(--hairline);
  transform: translate(10px, 13px) rotate(-0.4deg);
  z-index: -2;
  pointer-events: none;
}

/* Clippy — wire paperclip on the right edge of the paper, half on,
   half hanging off. Tilted slightly for personality. */
.paper .clip {
  position: absolute;
  top: 26px;
  right: -14px;
  left: auto;
  width: 38px;
  height: 96px;
  z-index: 3;
  transform: rotate(6deg);
  transform-origin: 50% 30%;
  filter: drop-shadow(2px 3px 5px rgba(0, 0, 0, 0.22));
}

.paper .clip svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Inside the paper: the five shards on a gold "mended" layer.
   Very tight seams (2px) and shallow mating cuts so the gold reads as
   a real kintsugi crack — a thin winding line, not a fat band. */
.paper .work-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* Muted antique kintsugi gold, not bright orange-gold */
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-deep) 50%, var(--gold) 100%);
  grid-template-columns: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Each shard — a piece of paper, scissor-cut at top and bottom.
   Warm-white with a subtle fractal-noise paper texture so the cards
   read as fibre paper, not digital tiles. */
.paper .work-card {
  position: relative;
  display: block;
  padding: 38px 44px 42px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #fefdf8 0%, #fbf7eb 100%);
  background-blend-mode: multiply, normal;
  border: none;
  border-radius: 0;
  color: #0a0a0a;
  text-decoration: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  filter: none;
  box-shadow: none;
  z-index: 1;
  transition:
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.22s ease,
    background-color 0.22s ease;
}

/* All shards same size — uniform vertical rhythm down the sheet */

.paper .work-card:hover {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--paper-light) 0%, #fbf6e8 100%);
  transform: translateY(-5px);
  filter:
    drop-shadow(0 3px 4px rgba(60, 50, 30, 0.10))
    drop-shadow(0 8px 18px rgba(60, 50, 30, 0.14));
  z-index: 2;
}

.paper .work-card:hover .label {
  color: var(--ink-2);
}

/* Mated kintsugi cuts — each seam's top edge is the exact inverse of
   the previous card's bottom edge. Where one shard recedes by X%, the
   other extends by (4%-X%), so the gold band stays a constant ~4% +
   2px gap = ~7px thin winding line. Each seam uses a different
   pattern, so the gold crack varies as it travels down the sheet. */

/* Seam 1-2: 5-point zigzag (alternating 3% / 1% recessions). */
.paper .work-card:nth-child(1) {
  clip-path: polygon(
    0 0, 100% 0,
    100% 97%, 75% 99%, 50% 97%, 25% 99%, 0 97%
  );
}
.paper .work-card:nth-child(2) {
  clip-path: polygon(
    0 1%, 25% 3%, 50% 1%, 75% 3%, 100% 1%,
    100% 98%, 50% 96%, 0 98%
  );
}
/* Seam 2-3: gentle 3-point dip. */
.paper .work-card:nth-child(3) {
  clip-path: polygon(
    0 2%, 50% 0, 100% 2%,
    100% 96%, 66% 98%, 33% 96%, 0 98%
  );
}
/* Seam 3-4: asymmetric 4-point slope. */
.paper .work-card:nth-child(4) {
  clip-path: polygon(
    0 2%, 33% 0, 66% 2%, 100% 0,
    100% 97%, 83% 99%, 67% 97%, 50% 99%, 33% 97%, 17% 99%, 0 97%
  );
}
/* Seam 4-5: 7-point fine zigzag, then straight bottom. */
.paper .work-card:nth-child(5) {
  clip-path: polygon(
    0 1%, 17% 3%, 33% 1%, 50% 3%, 67% 1%, 83% 3%, 100% 1%,
    100% 100%, 0 100%
  );
}

/* Case label — mono caps per design system, includes case number + name */
.paper .work-card .label {
  display: block;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

/* The one-liner title — confident sans, generous line-height */
.paper .work-card h3 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--ink);
  max-width: 540px;
}

/* All shard titles same size — uniform rhythm down the sheet */

.paper .work-card:hover h3 {
  color: var(--ink);
}

/* Hide any leftover per-card kintsugi overlays (no longer used —
   the gold is between the cards, not on them). */
.paper .work-card .kintsugi {
  display: none;
}

/* Simple fade-in for the paper on load. */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.js-ready .paper {
  animation: fadeIn 200ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .js-ready .paper {
    animation: none;
    opacity: 1;
  }
}

/* ============================================================
   Recommendations as yellow sticky notes
   ============================================================ */

/* Corkboard wall background — warm tan with subtle grain */
body:has(.recs-zigzag) {
  background-color: var(--paper-light);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' seed='8'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

.recs-zigzag {
  list-style: none;
  padding: 0;
  margin: 4rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 44px 36px;
}

/* Cap at 3 columns at wide viewports so the grid doesn't read as a spreadsheet */
@media (min-width: 1100px) {
  .recs-zigzag {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rec-card {
  position: relative;
  display: block;
  padding: 30px 26px 28px;
  font-family: var(--font-sans);
  /* Sticky-note paper — always light, even on dark page bg */
  background: linear-gradient(135deg, #f3e7a8 0%, #e3d27e 100%);
  color: #1a1814;
  box-shadow: var(--shadow-medium);
  transition:
    transform 0.25s cubic-bezier(0.3, 0.7, 0.3, 1),
    box-shadow 0.25s ease;
}

/* Hanko-red pushpin pinning each sticky note to the corkboard.
   Sits in an outer top corner — left for odd notes, right for even. */
.rec-card::before {
  content: "";
  position: absolute;
  top: -10px;
  width: 22px;
  height: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 26'%3E%3Cdefs%3E%3CradialGradient id='pHead' cx='35%25' cy='30%25' r='65%25'%3E%3Cstop offset='0%25' stop-color='%23a8584c'/%3E%3Cstop offset='45%25' stop-color='%237a3a2e'/%3E%3Cstop offset='100%25' stop-color='%235a2218'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M 11 16 L 13 25 L 9 25 Z' fill='%234a4538'/%3E%3Cellipse cx='11' cy='9' rx='8' ry='7' fill='url(%23pHead)'/%3E%3Cellipse cx='7.5' cy='5.5' rx='2.5' ry='1.8' fill='rgba(255,250,240,0.35)'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 2px 3px rgba(40, 30, 10, 0.35));
  z-index: 3;
  pointer-events: none;
}

/* Odd notes pinned at top-left, even at top-right — outer corners */
.rec-card:nth-child(odd)::before { left: 14px; right: auto; }
.rec-card:nth-child(even)::before { right: 14px; left: auto; }

.rec-card:nth-child(odd) { transform: rotate(-1.8deg); }
.rec-card:nth-child(even) { transform: rotate(1.4deg); }
.rec-card:nth-child(3n) { transform: rotate(-0.6deg); }
.rec-card:nth-child(5n) { transform: rotate(2.2deg); }

.rec-card:hover {
  transform: rotate(0) translateY(-4px);
  box-shadow: var(--shadow-deep);
  z-index: 2;
}

/* Sticky-note quotes stay sans (readability). The site-wide serif
   treatment on blockquote is overridden here. */
.rec-card blockquote {
  margin: 0;
  font-family: var(--font-sans) !important;
  font-style: normal !important;
  font-size: 14.5px;
  line-height: 1.55;
  color: #1a1814;
  letter-spacing: normal;
}

.rec-card blockquote strong {
  font-weight: 600;
  background: rgba(40, 30, 10, 0.10);
  padding: 0 3px;
}

.rec-card .attribution {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(50, 40, 10, 0.35);
}

.rec-card .name {
  display: block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13.5px;
  color: #1a1814;
  letter-spacing: -0.005em;
}

.rec-card .role {
  display: block;
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a4538;
  margin-top: 4px;
}

.rec-cta {
  text-align: center;
  font-family: var(--font-sans);
  margin-top: 2rem;
}

/* ============================================================
   Contact page — Yellow Pages style classified listing
   ============================================================ */

body:has(.contact-yellow-pages) {
  background-color: var(--paper-light);
}

.contact-yellow-pages {
  font-family: var(--font-sans);
  color: var(--ink);
}

.contact-yellow-pages .label {
  font-family: var(--font-sans);
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10.5px;
  font-weight: 500;
}

.contact-yellow-pages h1 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
  text-transform: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.3em;
  margin-bottom: 0.7em;
  color: var(--ink);
}

.contact-yellow-pages > p,
.contact-yellow-pages p {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
}

.contact-yellow-pages .contact-links {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.contact-yellow-pages .contact-links li {
  display: flex;
  align-items: baseline;
  padding: 14px 6px;
  border-bottom: 1px solid rgba(26, 21, 5, 0.18);
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
}

.contact-yellow-pages .contact-links li:last-child {
  border-bottom: none;
}

.contact-yellow-pages .contact-links .key {
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10.5px;
  color: var(--ink-2);
  white-space: nowrap;
  margin-right: 6px;
  flex-shrink: 0;
}

/* Dot-leader fill between key and value */
.contact-yellow-pages .contact-links li::before {
  content: "";
  flex: 1;
  margin: 0 12px 6px;
  border-bottom: 1px dotted rgba(26, 21, 5, 0.4);
  height: 0;
  align-self: end;
  order: 1;
}

.contact-yellow-pages .contact-links li > a,
.contact-yellow-pages .contact-links li > span:not(.key) {
  order: 2;
  font-family: var(--font-sans);
  font-size: 16px;
  white-space: nowrap;
  color: var(--ink);
}

.contact-yellow-pages .contact-links a {
  text-decoration: underline;
  text-decoration-style: solid;
  text-underline-offset: 3px;
}

.contact-yellow-pages .contact-links a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.contact-yellow-pages .muted {
  font-family: var(--font-sans);
  color: var(--ink-2);
  text-align: center;
  border-top: 1px solid rgba(26, 21, 5, 0.18);
  padding-top: 14px;
  font-size: 13px;
}

/* ============================================================
   About page — Manila personnel file
   The page is a tan folder labeled with the name tab at the top.
   Inside: cream paper with subtle hole punches on the left edge.
   Each h2 becomes a numbered file section.
   ============================================================ */

body:has(.manila-folder) {
  background-color: var(--paper-light);
  background-image: none;
}

main.manila-folder {
  position: relative;
  max-width: 760px;
  margin: 120px auto 100px;
  padding: 48px 60px 56px;
  border: 26px solid transparent;
  border-radius: var(--radius-2) var(--radius-2) var(--radius-3) var(--radius-3);
  /* Cream paper inside (padding-box), manila tan outside (border-box) */
  background:
    linear-gradient(180deg, var(--paper-light) 0%, var(--paper) 100%) padding-box,
    linear-gradient(180deg, var(--tan) 0%, var(--tan-deep) 100%) border-box;
  box-shadow: var(--shadow-deep);
  counter-reset: filesection;
  color: var(--ink);
}

/* The labeled tab sticking out the top of the folder */
main.manila-folder::before {
  content: "KUKLA, ŠTEFAN";
  position: absolute;
  top: -34px;
  left: 44px;
  height: 40px;
  padding: 0 26px;
  background: linear-gradient(180deg, var(--tan) 0%, var(--tan-deep) 100%);
  border-radius: var(--radius-2) var(--radius-2) 0 0;
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.4),
    0 -1px 2px rgba(60, 50, 30, 0.10);
  z-index: 2;
}

/* Three-hole punch along the inner left edge of the page */
main.manila-folder::after {
  content: "";
  position: absolute;
  left: 38px;
  top: 110px;
  bottom: 110px;
  width: 11px;
  background-image: radial-gradient(circle at 50% 50%,
    rgba(0, 0, 0, 0.18) 3.5px,
    rgba(0, 0, 0, 0.06) 4px,
    transparent 4.5px
  );
  background-size: 11px 33%;
  background-repeat: repeat-y;
  background-position: 0 0;
  pointer-events: none;
  z-index: 0;
}

main.manila-folder > * {
  position: relative;
  z-index: 1;
}

/* File header — Instrument Serif, roman (not italic) */
main.manila-folder h1 {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 44px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 1.2em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--rule);
  color: var(--ink);
}

/* About section dividers — clean hairline rule, no decorative labels */
main.manila-folder h2 {
  position: relative;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 3em 0 1em;
  padding-top: 1.2em;
  border-top: 1px solid var(--hairline-strong);
  color: var(--ink);
}

main.manila-folder p,
main.manila-folder li {
  color: var(--ink-2);
}

main.manila-folder a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.18s ease;
}

main.manila-folder a:hover {
  text-decoration-color: var(--ink);
}

main.manila-folder hr {
  border: none;
  border-top: 1px dashed var(--hairline-strong);
  margin: 3em 0 2em;
}

/* Detail grid — Tools, skills, languages — styled for the file */
main.manila-folder .detail-grid dt {
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}

main.manila-folder .tag {
  background: var(--paper-light);
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: -0.005em;
}

main.manila-folder .cert-name {
  color: var(--ink);
  font-family: var(--font-sans);
}
main.manila-folder .cert-meta {
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Yellow Pages logo block — black rounded square with walking-fingers
   silhouette. Sits at the top of the contact page as the chapter mark. */
.yp-logo {
  width: 84px;
  height: 100px;
  margin-bottom: 28px;
  filter: drop-shadow(0 2px 4px rgba(80, 60, 0, 0.18));
}

.yp-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================================
   Unifying treatments across the portfolio
   - Quotes: faint serif italic everywhere (Instrument Serif)
   - Nav and footer: shared neutral palette that bridges all pages
   ============================================================ */

/* Faint serif on every blockquote, regardless of page metaphor */
blockquote {
  font-family: var(--font-display), Georgia, "Times New Roman", serif;
  font-style: italic;
  letter-spacing: -0.005em;
}

/* Nav: warm-neutral translucent across all pages — the bridge */
.nav {
  background: rgba(14, 13, 11, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}

/* Footer: dark, slightly more transparent than nav */
.footer {
  background: rgba(14, 13, 11, 0.78);
  -webkit-backdrop-filter: saturate(130%) blur(10px);
  backdrop-filter: saturate(130%) blur(10px);
  border-top: 1px solid var(--hairline);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.work-card {
  position: relative;
  display: block;
  padding: 44px 36px 48px;
  border-radius: 0;
  text-decoration: none;
  color: var(--text);
  /* Solid ceramic body — opaque cream, no glass */
  background:
    linear-gradient(180deg, #f8f1dc 0%, #f1e5c2 100%);
  border: none;
  /* Drop-shadow follows clip-path edges (box-shadow does not) */
  filter:
    drop-shadow(0 1px 1px rgba(80, 55, 20, 0.05))
    drop-shadow(0 6px 14px rgba(80, 55, 20, 0.08));
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.25s ease;
}

/* Each card is a fragment of one bowl. Similar size, irregular angular
   edges. Top and bottom edges are jagged where the ceramic broke.
   The 6px gap between cards shows the gold ground beneath = the seams. */
.work-card:nth-child(1) {
  clip-path: polygon(
    0 0, 100% 0,
    100% 86%, 72% 96%, 38% 88%, 0 97%
  );
}
.work-card:nth-child(2) {
  clip-path: polygon(
    0 6%, 32% 14%, 68% 3%, 100% 12%,
    100% 88%, 76% 97%, 42% 88%, 0 95%
  );
}
.work-card:nth-child(3) {
  clip-path: polygon(
    0 8%, 38% 3%, 72% 14%, 100% 5%,
    100% 88%, 68% 96%, 35% 90%, 0 99%
  );
}
.work-card:nth-child(4) {
  clip-path: polygon(
    0 3%, 30% 12%, 65% 4%, 100% 10%,
    100% 95%, 78% 98%, 44% 90%, 0 96%
  );
}
.work-card:nth-child(5) {
  clip-path: polygon(
    0 5%, 44% 3%, 78% 12%, 100% 4%,
    100% 100%, 0 100%
  );
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.35) 0%, transparent 35%);
  opacity: 0.9;
  transition: opacity 0.25s ease;
}

.work-card:hover {
  background:
    linear-gradient(180deg, #fbf5e3 0%, #f4e9c8 100%);
  transform: translateY(-2px);
  filter:
    drop-shadow(0 2px 3px rgba(80, 55, 20, 0.08))
    drop-shadow(0 12px 24px rgba(80, 55, 20, 0.14));
}

.work-card:hover::after {
  opacity: 1;
}

.work-card > * {
  position: relative;
  z-index: 1;
}

/* ---------- Kintsugi seam ---------- */

.work-card .kintsugi {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 0;
  z-index: 0;
  opacity: 0.75;
  transition: opacity 0.5s ease;
}

.work-card:hover .kintsugi {
  opacity: 1;
}

.work-card .kintsugi svg {
  width: 100%;
  height: 100%;
  display: block;
}

.work-card .kintsugi path {
  fill: none;
  stroke: #c89461;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px rgba(168, 112, 69, 0.7));
}

.work-card .kintsugi path.main {
  stroke-width: 2;
}

.work-card .kintsugi path.branch {
  stroke-width: 1.3;
  opacity: 0.75;
}

.work-card:hover .kintsugi path {
  filter: drop-shadow(0 0 3.5px rgba(200, 148, 97, 0.85));
}

/* Tighter card stack — the cards become fragments of one mended object,
   with the seams running continuously from one to the next. */
.section--work .work-grid {
  gap: 6px;
}

/* ---------- Napkin-fold corner accents (About page) ----------
   A small folded-corner glyph next to each h2 on the About page.
   References the fold-in-a-napkin metaphor already in the prose. */

/* .with-folds rules removed — class is no longer used. About page
   now uses .manila-folder. */

.work-card .label {
  margin-bottom: 8px;
}

.work-card h3 {
  margin: 0 0 6px;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.work-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
}

.work-card.deep {
  padding: 36px 36px;
}

.work-card.deep h3 {
  font-size: 1.625rem;
}

.work-card-meta {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  font-weight: 500;
}

.work-card-meta .status {
  text-transform: uppercase;
}

.status-shipped { color: var(--accent-shipped); }
.status-preview { color: var(--accent-preview); }

@media (min-width: 720px) {
  .work-grid.tier-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Manifesto ---------- */

.manifesto {
  background: var(--bg-strong);
  color: var(--text-inverse);
  padding: clamp(60px, 10vw, 120px) 0;
  margin-top: clamp(48px, 8vw, 96px);
}

.manifesto p {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.manifesto .label {
  color: var(--text-faint);
  margin-bottom: 1.5rem;
  display: block;
  text-align: left;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter);
}

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

.case-hero {
  padding: clamp(56px, 10vw, 120px) 0 clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
}

.case-hero .label {
  margin-bottom: 1.25rem;
  display: block;
}

.case-hero h1 {
  max-width: 880px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.012em;
  margin-bottom: 1.5rem;
  line-height: 1.05;
}

.case-hero p.lead {
  max-width: 620px;
  font-size: 1.1875rem;
  color: var(--text-muted);
  margin: 0;
}

.case-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  margin: 0 auto;
  max-width: var(--max-content);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

@media (min-width: 720px) {
  .case-meta {
    grid-template-columns: repeat(4, 1fr);
  }
}

.case-meta .label {
  display: block;
  margin-bottom: 4px;
}

.case-meta .value {
  font-size: 14px;
  color: var(--text);
}

.case-meta .value a {
  color: var(--text);
}

.case-body {
  padding: clamp(48px, 6vw, 80px) 0;
}

.case-body h2 {
  margin-top: 3.5rem;
}

.case-body h2:first-child {
  margin-top: 0;
}

/* ---------- Image / screenshot placeholder ---------- */

.figure {
  margin: 2.5rem 0;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.figure figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

.placeholder-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background: linear-gradient(180deg, #f7f7f5 0%, #efefec 100%);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 64px 32px;
  min-height: 280px;
  color: var(--text-muted);
}

.placeholder-image .label {
  margin-bottom: 12px;
  color: var(--accent-todo);
}

.placeholder-image .what {
  font-size: 15px;
  max-width: 420px;
  line-height: 1.5;
}

/* ---------- Video card (YouTube embed link) ---------- */

.video-card {
  display: block;
  margin: 2.5rem 0;
  text-decoration: none;
  color: var(--text);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.video-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -18px rgba(10, 10, 10, 0.18);
}

.video-card .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0a0a center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.video-card .play {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-card:hover .play {
  transform: scale(1.06);
  background: #ffffff;
}

.video-card .play::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 18px solid var(--text);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 5px;
}

.video-card .meta {
  padding: 18px 22px 20px;
}

.video-card .meta .label {
  margin-bottom: 6px;
  display: block;
}

.video-card .meta h3 {
  margin: 0 0 4px;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
  font-weight: 500;
}

.video-card .meta p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Reading-card grid (Further reading on cases) ---------- */

.reading-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 1.75rem 0 2.5rem;
  list-style: none;
  padding: 0;
}

@media (min-width: 720px) {
  .reading-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Break out of the prose width on wider screens, and add more columns
   as space allows. The negative margins extend the grid beyond the
   680px prose column, using the site's --max-content (1080px) as the cap. */

@media (min-width: 1080px) {
  .reading-grid {
    margin-left: calc((var(--max-prose) - var(--max-content)) / 2);
    margin-right: calc((var(--max-prose) - var(--max-content)) / 2);
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (min-width: 1280px) {
  .reading-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1600px) {
  .reading-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.reading-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 14px 36px 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease,
    background 0.15s ease;
}

.reading-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: 0 2px 4px rgba(10, 10, 10, 0.03);
  transform: translateY(-1px);
}

.reading-card::after {
  content: "↗";
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 13px;
  color: var(--text-faint);
  transition: color 0.15s ease, transform 0.15s ease;
}

.reading-card:hover::after {
  color: var(--text);
  transform: translate(2px, -2px);
}

/* ---------- TODO / blank prompts ---------- */

.todo {
  display: block;
  background: #fffaeb;
  border-left: 3px solid var(--accent-todo);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
  color: #5c4500;
  margin: 1.5em 0;
}

.todo .label {
  display: block;
  color: var(--accent-todo);
  margin-bottom: 6px;
}

.todo ul {
  margin: 8px 0 0;
}

.todo em {
  color: #7a5b00;
}

/* ---------- Quote card (PM/eng quote placeholder) ---------- */

.quote-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 28px 32px;
  border-radius: var(--radius);
  margin: 2.5rem 0;
}

.quote-card .label {
  margin-bottom: 12px;
}

.quote-card blockquote {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  letter-spacing: 0;
}

.quote-card cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Case footer / next ---------- */

.case-nav {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.case-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.case-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
}

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

.case-nav .next {
  text-align: right;
}

.case-nav .next strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-top: 2px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding: 64px 0 72px;
  margin-top: 0;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer a {
  color: var(--ink-2);
  margin-left: 20px;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer a:hover {
  color: var(--ink);
}

.footer a:first-of-type {
  margin-left: 0;
}


/* ---------- Writing list ---------- */

.writing-list {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0;
}

.writing-list li {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.writing-list li:first-child {
  border-top: 1px solid var(--border);
}

.writing-list h3 {
  margin: 0 0 4px;
  font-size: 1.125rem;
}

.writing-list h3 a {
  text-decoration: none;
}

.writing-list .meta {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 500;
}

.writing-list p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- Contact ---------- */

.contact-links {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  font-size: 1.0625rem;
}

.contact-links li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}

.contact-links .key {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.contact-links a {
  text-decoration: none;
}

/* ---------- Misc ---------- */

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

img {
  max-width: 100%;
}

.page-pad-top {
  padding-top: clamp(56px, 10vw, 96px);
}

/* ============================================================
   Scroll-driven animations (home page)
   The `.js-ready` class is set by inline JS so that without JS
   the page renders normally (no flash of invisible content).
   ============================================================ */

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {

  /* --- Cards/sections reveal as they enter viewport --- */
  .js-ready .reveal {
    opacity: 0;
    transform: translateY(32px) scale(0.965);
    transition:
      opacity   0.9s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
  }
  .js-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    will-change: auto;
  }

  /* Stagger delays for siblings entering together */
  .js-ready .stagger-1 { transition-delay: 0s; }
  .js-ready .stagger-2 { transition-delay: 0.08s; }
  .js-ready .stagger-3 { transition-delay: 0.16s; }
  .js-ready .stagger-4 { transition-delay: 0.24s; }
  .js-ready .stagger-5 { transition-delay: 0.32s; }

  /* --- Hero entrance on load --- */
  .js-ready .hero-tagline {
    animation: hero-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .js-ready .hero-subline {
    animation: hero-rise 1.1s 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  /* --- Hero fades and lifts as user scrolls past it --- */
  .js-ready .hero {
    --hero-progress: 0;
    transform: translateY(calc(var(--hero-progress) * -50px));
    opacity:   calc(1 - var(--hero-progress) * 1.5);
    will-change: opacity, transform;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero,
  .hero-tagline,
  .hero-subline {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Recommendations · zigzag/staircase ---------- */

.recs-zigzag {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  position: relative;
}

@media (min-width: 760px) {
  .recs-zigzag {
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 24px;
    grid-auto-rows: minmax(40px, auto);
  }
  /* Stagger: odd cards in col 1, even in col 2.
     Each card spans 5 row tracks. Card 3 starts at row 7 (was 6) and card 5 at row 13
     (was 11) so the in-column adjacencies get a full row of breathing space. */
  .recs-zigzag .rec-card:nth-child(1) { grid-column: 1; grid-row: 1 / span 5; }
  .recs-zigzag .rec-card:nth-child(2) { grid-column: 2; grid-row: 3 / span 5; }
  .recs-zigzag .rec-card:nth-child(3) { grid-column: 1; grid-row: 7 / span 5; }
  .recs-zigzag .rec-card:nth-child(4) { grid-column: 2; grid-row: 9 / span 5; }
  .recs-zigzag .rec-card:nth-child(5) { grid-column: 1; grid-row: 13 / span 5; }
}

.rec-card {
  padding: 28px 30px 24px;
  /* Keep the warm sticky-note paper from the base rule; just adjust geometry */
  border: 1px solid rgba(60, 50, 30, 0.35);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(10, 10, 10, 0.02),
    0 10px 28px -18px rgba(10, 10, 10, 0.10);
  display: flex;
  flex-direction: column;
  margin: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rec-card:hover {
  border-color: rgba(10, 10, 10, 0.18);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 4px rgba(10, 10, 10, 0.03),
    0 18px 40px -18px rgba(10, 10, 10, 0.14);
}

.rec-card blockquote {
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0;
  color: #1a1814;
  margin: 0 0 20px;
  flex: 1;
}

.rec-card .attribution {
  border-top: 1px solid rgba(60, 50, 30, 0.35);
}

.rec-card blockquote strong {
  font-weight: 600;
  color: #1a1814;
  background: linear-gradient(180deg, transparent 60%, rgba(184, 92, 0, 0.22) 60%);
  padding: 0 1px;
}

.rec-card .attribution {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
  padding-top: 16px;
  border-top: 1px dashed rgba(40, 30, 10, 0.55);
}

.rec-card .name {
  font-weight: 600;
  font-size: 14px;
  color: #1a1814;
  letter-spacing: -0.005em;
}

.rec-card .role {
  color: #4a4538;
}

/* ============================================================
   Case-study Problem | Solution cards — set side by side at the
   top of every case so the reader sees the gap and the move in one
   glance before reading anything else.
   ============================================================ */

.problem-solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 2.5em 0 3em;
  position: relative;
}

/* Bleed out beyond the prose container on wider screens so the
   two cards can breathe. Modest at laptop, more at full desktop. */
@media (min-width: 1024px) {
  .problem-solution {
    width: calc(100% + 200px);
    margin-left: -100px;
    margin-right: -100px;
    gap: 24px;
  }
  .problem-solution .ps-card {
    padding: 32px 30px 34px;
  }
}

@media (min-width: 1200px) {
  .problem-solution {
    width: calc(100% + 320px);
    margin-left: -160px;
    margin-right: -160px;
    gap: 28px;
  }
  .problem-solution .ps-card {
    padding: 36px 34px 38px;
  }
  .problem-solution p {
    font-size: 16.5px;
    line-height: 1.55;
  }
}

.problem-solution .ps-card {
  padding: 26px 24px 28px;
  background: var(--paper-light);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2);
  border-top-width: 3px;
}

.problem-solution .ps-problem {
  border-top-color: var(--hanko);
}

.problem-solution .ps-solution {
  border-top-color: var(--accent-shipped);
}

.problem-solution .ps-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.problem-solution p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

@media (max-width: 640px) {
  .problem-solution {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .problem-solution .ps-card {
    padding: 22px 20px;
  }
}

/* Final takeaways section — small numbered list with restraint */
.takeaways {
  list-style: none;
  padding: 0;
  margin: 1.5em 0 2em;
  counter-reset: takeaway;
}

.takeaways li {
  position: relative;
  padding: 16px 18px 16px 56px;
  margin-bottom: 10px;
  background: var(--paper-light);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2);
  counter-increment: takeaway;
}

.takeaways li::before {
  content: counter(takeaway, decimal);
  position: absolute;
  left: 18px;
  top: 16px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}

/* ============================================================
   Office-object metaphors inside case studies — rubber-stamp
   status, Polaroid video card, washi-tape dividers, index-card
   personas, zebra reading cards. Restrained execution so the
   page reads as designed, not as a costume party.
   ============================================================ */

/* Rubber-stamp status badges — replaces the pill style in case-meta.
   Red ink, double border, slight tilt and grain. Reads as physical
   stamp impression. Pairs with the hanko seal motif on Recommendations. */
.case-meta .status,
.case-meta .status-shipped,
.case-meta .status-preview {
  display: inline-block;
  background: transparent;
  color: var(--hanko);
  border: 2px solid var(--hanko);
  padding: 5px 12px 4px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(-2deg);
  position: relative;
  border-radius: 1px;
  /* Subtle outer ring for the rubber-stamp double-border feel */
  box-shadow:
    inset 0 0 0 1px transparent,
    0 0 0 1px var(--hanko-deep);
  /* Subtle SVG noise gives ink-grain feel without dominating */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.8' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-blend-mode: lighten;
  margin-right: 6px;
}

/* Polaroid frame around the video-card — instant photo on a desk.
   Restrained rotation, generous bottom border for the caption strip. */
.case-body .video-card {
  display: block;
  max-width: 560px;
  margin: 2.5em auto;
  background: var(--paper-light);
  border: 1px solid var(--hairline);
  padding: 18px 18px 0;
  text-decoration: none;
  color: var(--ink);
  box-shadow:
    0 1px 1px rgba(60, 50, 30, 0.04),
    0 12px 28px -8px rgba(60, 50, 30, 0.22),
    0 24px 48px -16px rgba(60, 50, 30, 0.10);
  transform: rotate(-0.75deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.case-body .video-card:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow:
    0 2px 3px rgba(60, 50, 30, 0.06),
    0 16px 36px -10px rgba(60, 50, 30, 0.26),
    0 32px 60px -20px rgba(60, 50, 30, 0.14);
}

.case-body .video-card .thumb {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 16/9;
  position: relative;
  border: 1px solid rgba(60, 50, 30, 0.08);
}

.case-body .video-card .thumb .play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20, 20, 16, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-body .video-card .thumb .play::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 16px solid var(--paper-light);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

/* The caption strip — the bottom margin of a Polaroid */
.case-body .video-card .meta {
  padding: 18px 4px 28px;
  text-align: center;
}

.case-body .video-card .meta .label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.case-body .video-card .meta h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.case-body .video-card .meta p {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* Washi-tape dividers — selectively above key h2s. Subtle gold-tan
   strip with translucent edges, slight tilt. Only on the major
   sections (Final takeaways, Public proof) to avoid overuse. */
.case-body h2.tape-section,
.case-body .takeaways-h2,
.case-body h2 + ol.takeaways {
  /* hook for explicit-class usage if you want to opt in per-section */
}

/* Washi tape removed. The hairline rule above h2 stays (defined in
   the main "Case-study visual elements" block below). */

/* Subtle index-card treatment for personas — red top stripe like the
   header bar on a 4x6 index card. The line-art icon stays. */
.case-body .persona {
  position: relative;
  padding-top: 30px;
  border-top: none;
  background: var(--paper-light);
}

.case-body .persona::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--hanko);
  border-radius: var(--radius-2) var(--radius-2) 0 0;
}

/* Subtle ruled-line under persona-name like a real index card */
.case-body .persona-name {
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(60, 50, 30, 0.18);
}

/* Zebra striping on Further reading cards — alternating cream and
   slightly darker paper, like dot-matrix tractor-feed printer paper.
   Very subtle so it reads as texture, not stripes. */
.case-body .reading-grid .reading-card:nth-child(even) {
  background: var(--paper);
}

.case-body .reading-grid .reading-card:nth-child(odd) {
  background: var(--paper-light);
}

@media (max-width: 640px) {
  .case-body .video-card {
    margin: 2em auto;
    padding: 12px 12px 0;
    transform: rotate(-0.5deg);
  }
  .case-body .video-card .meta {
    padding: 14px 4px 20px;
  }
  .case-body .video-card .meta h3 {
    font-size: 16px;
  }
  .case-body h2::before {
    width: 56px;
    height: 12px;
    margin-bottom: 18px;
  }
}

/* ============================================================
   Case-study visual elements — break up walls of text without
   relying on screenshots. Pull quotes, stat callouts, numbered
   step badges, highlight boxes, decorated section headers.
   ============================================================ */

/* Pull quote — big italic serif callout breaking the prose flow */
.case-body .pull-quote {
  margin: 2.5em 0;
  padding: 8px 0 8px 28px;
  border-left: 3px solid var(--gold);
  background: none;
}

.case-body .pull-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.case-body .pull-quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}

/* Stat callout — big number + label for hero metrics */
.case-body .stat-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  margin: 2.5em 0;
  padding: 32px 36px;
  background: var(--paper-light);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-2);
}

.case-body .stat-callout .stat-number {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.case-body .stat-callout .stat-label {
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--ink-2);
  font-weight: 500;
}

@media (max-width: 640px) {
  .case-body .stat-callout {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 22px;
    text-align: left;
  }
}

/* Numbered step badge for Key UX moves */
.case-body .step {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.case-body .step .step-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  font-style: italic;
  color: var(--gold-deep);
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

/* Highlight box — "Key insight" callout boxes */
.case-body .highlight-box {
  margin: 2em 0;
  padding: 22px 26px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

.case-body .highlight-box::before {
  content: "Key insight";
  display: block;
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 10px;
}

.case-body .highlight-box p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Case-study side TOC — fixed on the LEFT at wide viewports,
   collapses to a horizontal scrollable strip at the top on mobile.
   Built dynamically by case-toc.js from the page's h2 elements
   plus the Problem|Solution section. Acts like jump-link tabs.
   ============================================================ */

.case-toc {
  position: fixed;
  left: 24px;
  top: 96px;
  width: 210px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding: 18px 16px 18px 18px;
  z-index: 50;
  font-family: var(--font-sans);
  display: none;
  background: rgba(14, 13, 11, 0.88);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

@media (min-width: 1100px) {
  .case-toc {
    display: block;
  }
}

.case-toc .toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0 0 10px 0;
  margin: 0 0 10px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--ink-muted);
  transition: color 0.18s ease;
}

.case-toc .toc-header:hover {
  color: var(--ink);
}

.case-toc .toc-label {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
}

.case-toc .toc-caret {
  font-size: 14px;
  line-height: 1;
  transition: transform 0.2s ease;
  display: inline-block;
}

.case-toc.collapsed .toc-caret {
  transform: rotate(-90deg);
}

.case-toc.collapsed .toc-header {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.case-toc.collapsed ol {
  display: none;
}

.case-toc.collapsed {
  width: auto;
  padding: 10px 14px;
}

.case-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.case-toc li {
  margin: 0;
}

.case-toc a {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 7px 10px 7px 10px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 12.5px;
  line-height: 1.3;
  border-left: 2px solid transparent;
  border-radius: 2px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.case-toc a:hover {
  color: var(--ink);
  border-left-color: var(--hairline-strong);
  background: rgba(241, 234, 215, 0.05);
}

.case-toc a.active {
  color: var(--ink);
  border-left-color: var(--gold);
  background: rgba(216, 185, 101, 0.12);
  font-weight: 600;
}

.case-toc .toc-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--gold-deep);
  line-height: 1;
  text-align: right;
}

.case-toc .toc-lead .toc-num {
  font-size: 17px;
  line-height: 0.9;
}

.case-toc .toc-text {
  display: block;
}

/* Mobile / tablet — collapse to a horizontal scrollable strip
   under the nav bar. */
@media (max-width: 1099px) {
  .case-toc {
    position: sticky;
    top: 54px;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-height: none;
    padding: 10px 0;
    background: rgba(14, 13, 11, 0.92);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    backdrop-filter: saturate(140%) blur(10px);
    border: 0;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    box-shadow: none;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 50;
  }

  .case-toc .toc-header {
    padding: 4px 16px 6px;
    margin: 0 0 4px 0;
    border-bottom: 1px solid var(--hairline);
    justify-content: flex-start;
    gap: 8px;
  }

  .case-toc .toc-label {
    font-size: 9.5px;
  }

  .case-toc .toc-caret {
    font-size: 12px;
  }

  .case-toc.collapsed {
    width: 100%;
    padding: 10px 0;
  }

  .case-toc ol {
    display: flex;
    gap: 0;
    padding: 0 16px;
    white-space: nowrap;
  }

  .case-toc li {
    flex-shrink: 0;
  }

  .case-toc a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-left: none;
    border-bottom: 2px solid transparent;
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .case-toc a:hover {
    border-left: none;
    border-bottom-color: var(--hairline-strong);
  }

  .case-toc a.active {
    border-left: none;
    border-bottom-color: var(--gold);
  }

  .case-toc .toc-num {
    font-size: 13px;
    text-align: left;
  }

  .case-toc .toc-text {
    display: inline;
  }
}

/* Numbered section markers — big italic display-serif counters
   in gold sit to the left of each h2 inside a case study. The h2
   itself gets a bottom hairline. h3 sub-sections get their own
   italic chapter-mark counters that reset at every h2. */
.case-body {
  counter-reset: case-section subsection;
}

.case-body h2 {
  display: flex;
  align-items: baseline;
  gap: 24px;
  position: relative;
  margin-top: 4em;
  margin-bottom: 1.4em;
  padding: 0 0 16px;
  border-top: none;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 2.8vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.2;
  color: var(--ink);
  counter-increment: case-section;
  counter-reset: subsection;
}

.case-body h2::before {
  content: counter(case-section, decimal);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 400;
  line-height: 0.85;
  color: var(--gold-deep);
  letter-spacing: -0.04em;
  flex-shrink: 0;
  align-self: flex-start;
  /* Override the older washi-tape pseudo content if it still exists */
  display: inline-block;
  background: none;
  width: auto;
  height: auto;
  transform: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  mask-image: none;
  -webkit-mask-image: none;
  opacity: 1;
}

/* h3 sub-sections — italic gold chapter mark above the title.
   Magazine chapter-beat treatment, distinct from h2 but in the
   same visual language. */
.case-body h3 {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 3em;
  margin-bottom: 0.7em;
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.25;
  counter-increment: subsection;
}

.case-body h3::before {
  content: counter(subsection, lower-alpha) ")";
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--gold-deep);
  line-height: 0.95;
}

/* Video-card h3 is part of a card, not a section. Skip the alpha counter
   AND skip the counter-increment so following sections stay in sequence. */
.case-body .video-card h3 {
  counter-increment: none;
}
.case-body .video-card h3::before {
  content: none;
  display: none;
}

@media (max-width: 640px) {
  .case-body h2 {
    margin-top: 3em;
    gap: 16px;
    font-size: 1.4rem;
    padding-bottom: 12px;
  }
  .case-body h2::before {
    font-size: 2.25rem;
  }
  .case-body h3 {
    font-size: 1.2rem;
    margin-top: 2.4em;
  }
  .case-body h3::before {
    font-size: 1.85rem;
  }
}

@media (max-width: 640px) {
  .case-body h2 {
    margin-top: 3em;
    gap: 16px;
    font-size: 1.4rem;
    padding-bottom: 12px;
  }
  .case-body h2::before {
    font-size: 2.25rem;
  }
}

/* Process timeline — horizontal stepper showing the journey */
.case-body .process-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 2em 0;
  position: relative;
  counter-reset: timeline;
}

.case-body .process-timeline .step-card {
  position: relative;
  padding: 24px 20px 22px;
  background: var(--paper-light);
  border: 1px solid var(--hairline);
  border-right: none;
  counter-increment: timeline;
}

.case-body .process-timeline .step-card:first-child {
  border-radius: var(--radius-2) 0 0 var(--radius-2);
}

.case-body .process-timeline .step-card:last-child {
  border-right: 1px solid var(--hairline);
  border-radius: 0 var(--radius-2) var(--radius-2) 0;
}

.case-body .process-timeline .step-card::before {
  content: counter(timeline, decimal);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--gold-deep);
  display: block;
  margin-bottom: 6px;
}

.case-body .process-timeline .step-card .step-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

@media (max-width: 640px) {
  .case-body .process-timeline {
    grid-template-columns: 1fr;
  }
  .case-body .process-timeline .step-card {
    border-right: 1px solid var(--hairline);
    border-bottom: none;
  }
  .case-body .process-timeline .step-card:not(:last-child) {
    border-bottom: 1px solid var(--hairline);
  }
  .case-body .process-timeline .step-card:first-child {
    border-radius: var(--radius-2) var(--radius-2) 0 0;
  }
  .case-body .process-timeline .step-card:last-child {
    border-radius: 0 0 var(--radius-2) var(--radius-2);
  }
}

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

/* Selected outcomes strip — sits between hero and case files.
   Four big stats with italic gold serif numbers + short context.
   Recruiter sees the headlines without opening a single case. */
.hero-highlights {
  padding: 24px 0 56px;
}

.highlights-eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 28px;
}

.highlight {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.highlight .hl-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 0.9;
  color: var(--gold-deep);
  letter-spacing: -0.035em;
  display: inline-block;
}

.highlight .hl-suffix {
  font-size: 0.65em;
  letter-spacing: -0.02em;
}

.highlight .hl-text {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 220px;
}

.highlight .hl-source {
  font-family: var(--font-sans);
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  margin-top: 6px;
  text-decoration: none;
  max-width: 220px;
}

a.hl-source {
  transition: color 0.18s ease;
}

a.hl-source:hover {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

@media (max-width: 480px) {
  .hero-highlights {
    padding-bottom: 36px;
  }
  .highlight-grid {
    gap: 24px 20px;
  }
  .highlight .hl-num {
    font-size: 2.5rem;
  }
  .highlight .hl-text {
    font-size: 12.5px;
  }
}

/* About page CTA — prominent end-of-page contact / CV strip */
.about-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 2.5em 0 1em;
  padding: 0;
}

.about-cta a {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  border-radius: var(--radius-2);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.about-cta a.cta-primary {
  background: var(--ink);
  color: var(--paper-light);
}

.about-cta a.cta-primary:hover {
  background: var(--hanko);
  transform: translateY(-1px);
}

.about-cta a.cta-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.about-cta a.cta-secondary:hover {
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-1px);
}

/* Footer CV link — gets a small outline-button treatment so a
   skimming recruiter can grab the PDF without hunting for it. */
.footer a[href$="cv.pdf"] {
  border: 1px solid var(--ink);
  padding: 4px 10px;
  border-radius: var(--radius-2);
  letter-spacing: 0.14em;
  color: var(--ink);
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.footer a[href$="cv.pdf"]:hover {
  background: var(--ink);
  color: var(--paper-light);
}

/* Featured recommendation quote under the home hero — compact */
.hero-quote {
  margin: 12px 0 0;
  padding: 10px 0 8px 16px;
  border-left: 2px solid var(--hanko);
  max-width: 580px;
}

.hero-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 1.8vw, 1.1875rem);
  line-height: 1.3;
  color: var(--ink);
}

.hero-quote cite {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}

/* ============================================================
   Persona grid — used in case studies where multiple personas
   are introduced. Side-by-side cards with line icon, name, desc.
   ============================================================ */

.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 2em 0 2.5em;
}

.persona {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px 24px;
  background: var(--paper-light);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2);
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.persona:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.persona-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: var(--ink);
}

.persona-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.persona-name {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
}

.persona-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------- Backlog board (Writing) — design-system aligned ---------- */

.jira-board {
  margin: 2.5rem 0 1.5rem;
  padding: 32px 28px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 760px) {
  .jira-board {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
  }
  .jira-board.jira-board--two-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* Collapsible backlog at bottom of Writing page */
.jira-backlog {
  margin: 32px auto 0;
  max-width: var(--max-content);
  padding: 0 var(--gutter);
}

.jira-backlog > summary {
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.18s ease;
}

.jira-backlog > summary::-webkit-details-marker { display: none; }

.jira-backlog > summary::after {
  content: "+";
  font-size: 16px;
  font-weight: 400;
  transition: transform 0.2s ease;
}

.jira-backlog[open] > summary::after {
  content: "−";
}

.jira-backlog > summary:hover { color: var(--ink); }

.jira-backlog > .jira-column {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 760px) {
  .jira-backlog > .jira-column {
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
  }
}

.jira-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.jira-column-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 4px 12px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 4px;
}

.jira-column-head .count {
  color: var(--ink-faint);
  font-weight: 400;
}

.jira-ticket {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper-light);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-1);
  padding: 16px 18px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.jira-ticket:hover {
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.jira-ticket .ticket-id {
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

.jira-ticket .ticket-title {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.jira-ticket .ticket-title a {
  color: inherit;
  text-decoration: none;
}

.jira-ticket .ticket-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--ink-muted);
  text-underline-offset: 3px;
}

.jira-tag {
  align-self: flex-start;
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-1);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
  border: 1px solid currentColor;
  background: transparent;
}

/* Muted earth-tone tags per design system */
.tag-portfolio { color: var(--ink-2); }
.tag-aggregation { color: var(--accent-preview); }
.tag-rbac { color: var(--hanko); }
.tag-systems { color: var(--accent-shipped); }
.tag-ai { color: var(--accent-todo); }
.tag-done-dim { color: var(--ink-muted); }

.ticket-done .ticket-title,
.ticket-done .ticket-title a {
  color: var(--ink-muted);
  font-weight: 400;
}

.rec-cta {
  margin: 3rem 0;
  padding: 28px 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
}

.rec-cta a {
  color: var(--text);
}

/* ---------- Skills / Tools / Certs (on About) ---------- */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin: 2.5rem 0;
}

@media (min-width: 640px) {
  .detail-grid {
    grid-template-columns: 200px 1fr;
    gap: 24px 48px;
  }
}

.detail-grid .group {
  display: contents;
}

.detail-grid dt {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 2px;
  font-weight: 500;
}

.detail-grid dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
}

.detail-grid dd + dt {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
}

.detail-grid dd + dt + dd {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
}

.cert-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.cert-list li {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 16px;
  font-size: 15px;
  line-height: 1.4;
}

.cert-list .cert-name {
  color: var(--text);
}

.cert-list .cert-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-align: right;
  text-transform: uppercase;
  font-weight: 500;
}

/* ============================================================
   MOBILE — comprehensive pass for phones.
   Two tiers: ≤640px (typical phone), ≤420px (small phone).
   Goal: nothing overflows the viewport, nav fits, every page
   metaphor scales down legibly.
   ============================================================ */

/* Prevent horizontal scroll site-wide. Most overflow on this site
   comes from the paper-stack box-shadows on Work, the manila folder
   border, and sticky-note rotations. Clip on root keeps it contained. */
html, body {
  overflow-x: clip;
}

@media (max-width: 640px) {

  /* --- NAV --- */
  .nav-inner {
    padding: 12px 16px;
    gap: 8px;
  }
  .nav-brand {
    font-size: 13px;
  }
  .nav-brand span {
    display: none;            /* hide "· Interaction Designer" subtitle */
  }
  .nav-links {
    gap: 14px;
    font-size: 10.5px;
    letter-spacing: 0.14em;
  }

  /* --- HERO --- */
  .hero {
    padding: 72px 0 56px;
  }
  .hero-tagline {
    font-size: 38px;
    line-height: 1.05;
  }
  .hero-subline {
    font-size: 16px;
  }

  /* --- HEADINGS GLOBAL --- */
  h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
  h2 {
    font-size: 1.25rem;
  }

  /* --- CONTAINERS --- */
  .container,
  .prose {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* --- WORK SECTION (kintsugi paper) --- */
  .section--work {
    padding: 32px 0 80px;
  }
  .paper {
    max-width: calc(100% - 40px);
    margin: 16px auto 0;
    padding-top: 48px;
    /* Smaller paper-stack offsets so the stack doesn't cause overflow */
    box-shadow:
      6px 8px 0 0 var(--paper-kraft),
      6px 8px 0 1px var(--hairline),
      11px 14px 0 0 var(--desk),
      11px 14px 0 1px var(--hairline),
      16px 20px 0 0 #c5bea6,
      16px 20px 0 1px var(--hairline-strong),
      8px 24px 36px -8px rgba(60, 50, 30, 0.25);
  }
  .paper::before {
    transform: translate(3px, 5px) rotate(0.4deg);
  }
  .paper::after {
    transform: translate(6px, 9px) rotate(-0.3deg);
  }
  .paper .clip {
    top: 16px;
    right: -10px;
    width: 30px;
    height: 76px;
  }
  .paper .work-card {
    padding: 26px 22px 30px;
  }
  .paper .work-card .label {
    font-size: 9.5px;
    letter-spacing: 0.13em;
    margin-bottom: 10px;
  }
  .paper .work-card h3 {
    font-size: 17px;
    line-height: 1.25;
  }
  .paper .work-card:nth-child(1) h3,
  .paper .work-card:nth-child(5) h3 {
    font-size: 17px;            /* keep uniform on mobile */
  }

  /* --- ABOUT (manila folder) --- */
  main.manila-folder {
    max-width: calc(100% - 32px);
    margin: 80px 16px 60px;
    padding: 28px 24px 36px;
    border: 14px solid transparent;
    border-radius: 4px;
  }
  main.manila-folder::before {
    /* tab */
    left: 14px;
    height: 30px;
    padding: 0 14px;
    font-size: 10px;
    letter-spacing: 0.18em;
    top: -28px;
  }
  main.manila-folder::after {
    /* hole punches — move closer to edge */
    left: 12px;
    top: 64px;
    bottom: 64px;
    width: 8px;
    background-size: 8px 33%;
  }
  main.manila-folder h1 {
    font-size: 30px;
    padding-bottom: 0.3em;
    margin-bottom: 0.9em;
  }
  main.manila-folder h2 {
    font-size: 19px;
    margin-top: 2.4em;
    padding-top: 0.9em;
  }
  main.manila-folder p,
  main.manila-folder li {
    font-size: 15.5px;
  }

  /* Detail grid (Tools / Skills / Languages) — stack on mobile */
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Tag pills — smaller on mobile */
  .tag {
    font-size: 11.5px;
    padding: 4px 9px;
  }

  /* --- RECOMMENDATIONS (sticky notes) --- */
  .recs-zigzag {
    grid-template-columns: 1fr;
    gap: 40px 0;
    margin: 2rem 16px 4rem;
    padding: 0;
  }
  .rec-card {
    padding: 30px 22px 24px;
  }
  /* Reduce rotation on small screens so notes don't overflow */
  .rec-card:nth-child(odd) { transform: rotate(-0.8deg); }
  .rec-card:nth-child(even) { transform: rotate(0.8deg); }
  .rec-card:nth-child(3n) { transform: rotate(-0.4deg); }
  .rec-card:nth-child(5n) { transform: rotate(1deg); }
  .rec-card blockquote {
    font-size: 14px;
  }

  /* --- CONTACT (yellow pages) --- */
  .contact-yellow-pages h1 {
    font-size: 36px;
  }
  .contact-yellow-pages > p,
  .contact-yellow-pages p {
    font-size: 15.5px;
  }
  .contact-yellow-pages .contact-links li {
    /* Stack key above value on phones — dot leaders don't fit */
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 4px;
    gap: 4px;
  }
  .contact-yellow-pages .contact-links li::before {
    display: none;            /* hide dot leader on mobile */
  }
  .contact-yellow-pages .contact-links .key {
    margin-right: 0;
    margin-bottom: 2px;
  }
  .contact-yellow-pages .contact-links li > a,
  .contact-yellow-pages .contact-links li > span:not(.key) {
    font-size: 16px;
    white-space: normal;
    word-break: break-word;
  }

  /* --- PERSONA GRID (case studies) --- */
  .persona-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .persona {
    padding: 22px 14px 18px;
  }
  .persona-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
  }
  .persona-name {
    font-size: 13.5px;
  }
  .persona-desc {
    font-size: 12px;
  }

  /* --- CASE STUDIES --- */
  .case-hero {
    padding: 48px 0 24px;
  }
  .case-hero h1 {
    font-size: 30px;
    line-height: 1.1;
  }
  .case-hero .lead {
    font-size: 16px;
  }
  .case-meta {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }
  .case-body h2 {
    font-size: 22px;
    margin-top: 2.5em;
  }
  .case-body h3 {
    font-size: 17px;
  }
  .case-body p,
  .case-body li {
    font-size: 15.5px;
  }
  .case-body ul {
    padding-left: 1.1em;
  }

  /* Reading grid + video card */
  .reading-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .video-card {
    grid-template-columns: 1fr;
  }
  .video-card .thumb {
    aspect-ratio: 16/9;
  }

  /* Case nav */
  .case-nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  /* --- FOOTER --- */
  .footer {
    padding: 40px 0 56px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 0 20px;
  }
  .footer a {
    margin-left: 0;
    margin-right: 16px;
  }
}

/* Small phones (≤420px) — pull in further */
@media (max-width: 420px) {
  .nav-links {
    gap: 10px;
    font-size: 9.5px;
    letter-spacing: 0.10em;
  }
  .nav-brand {
    font-size: 12px;
  }
  .hero-tagline {
    font-size: 32px;
  }
  .paper .work-card h3 {
    font-size: 16px;
  }
  main.manila-folder {
    border-width: 10px;
    padding: 24px 18px 30px;
  }
  main.manila-folder h1 {
    font-size: 26px;
  }
  main.manila-folder::after {
    left: 8px;
  }
  .persona-grid {
    grid-template-columns: 1fr;
  }
  .case-hero h1 {
    font-size: 26px;
  }
  .contact-yellow-pages h1 {
    font-size: 30px;
  }
}
