/* Portfolio mid-fi — Palette A: Bone + Ink + Apricot
   Warm & tactile direction */

:root {
  --bg: #faf6ef;
  --card: #ffffff;
  --ink: #141414;
  --soft: #4a4a48;
  --muted: #8a8a86;
  --rule: #e7e1d3;
  --rule-strong: #d4cdb8;
  --accent: #e85d2a;
  --accent-soft: #ffd9a8;
  --highlight: #fff3d6;
  --teal: #1f4d4a;
}

/* Three-up compare for iteration sequences */
.compare-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin: 32px 0;
}
@media (max-width: 900px) {
  .compare-three { grid-template-columns: 1fr; }
}
.compare-three figure { margin: 0; display: flex; flex-direction: column; }
.compare-three .label-strip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.compare-three .label-strip strong { color: var(--ink); font-weight: 600; }
.compare-three .label-strip.final strong { color: var(--accent); }
.compare-three .frame {
  background: #f2ece0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 12px;
  display: block;
  overflow: hidden;
}
.compare-three .frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.compare-three figcaption {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--soft);
  margin-top: 12px;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .compare-three { grid-template-columns: 1fr; }
}

/* ============ Featured list (homepage typographic case studies) ============ */
.featured-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 80px;
}
.feat-row {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1.3fr 1.4fr 40px;
  gap: 36px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  color: inherit;
  transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.feat-row:last-child { border-bottom: none; }
.feat-row::before {
  content: "";
  position: absolute;
  left: var(--feat-line-offset, -20px);
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: var(--feat-line-color, var(--accent));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.feat-row:hover::before { transform: scaleY(1); }
.feat-row .feat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  padding-top: 6px;
  transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.feat-row:hover .feat-num { color: var(--accent); }
.feat-row .feat-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.feat-row h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  line-height: 1.1;
  margin: 0 0 10px;
  font-weight: 400;
  letter-spacing: -0.005em;
  max-width: 440px;
}
.feat-row .feat-result {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--feat-result-color, var(--soft));
  line-height: 1.4;
  margin: 0;
  max-width: 440px;
}
.feat-row .feat-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  padding-top: 22px;
  max-width: 380px;
}
.feat-row .feat-arrow {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  color: var(--muted);
  justify-self: end;
  align-self: center;
  line-height: 1;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.feat-row:hover .feat-arrow {
  transform: translateX(8px);
  color: var(--accent);
}
@media (max-width: 900px) {
  .feat-row { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .feat-row .feat-desc { padding-top: 0; }
  .feat-row .feat-arrow { justify-self: start; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: 'Instrument Serif', 'Times New Roman', serif; font-weight: 400; }
.hand { font-family: 'Caveat', cursive; font-weight: 700; }
.mono { font-family: 'JetBrains Mono', monospace; }

a { color: inherit; text-decoration: none; }
a.link { border-bottom: 1px solid currentColor; }
a.link:hover { color: var(--accent); }

/* ============ Status bar (top of every page) ============ */
.status-bar {
  border-bottom: 1px solid var(--rule);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--soft);
  position: relative;
  z-index: 3;
}
.status-bar .inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.status-bar .live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.status-bar .live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(232, 93, 42, 0.55);
  animation: status-pulse 2.4s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(232, 93, 42, 0.45); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(232, 93, 42, 0); }
}
@media (max-width: 700px) {
  .status-bar .inner { padding: 12px 24px; flex-wrap: wrap; gap: 8px; }
}

/* ============ Paper-grain texture (every page) ============ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(circle at 17% 23%, rgba(60, 40, 15, 0.020) 0.8px, transparent 1.4px),
    radial-gradient(circle at 73% 67%, rgba(60, 40, 15, 0.024) 0.8px, transparent 1.4px),
    radial-gradient(circle at 41% 89%, rgba(60, 40, 15, 0.018) 0.8px, transparent 1.4px),
    radial-gradient(circle at 88% 12%, rgba(60, 40, 15, 0.022) 0.8px, transparent 1.4px);
  background-size: 9px 9px, 13px 13px, 11px 11px, 15px 15px;
  opacity: 0.7;
  mix-blend-mode: multiply;
}
.shell, .nav, .status-bar { position: relative; z-index: 2; }

/* ============ Layout ============ */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  max-width: 1280px;
  margin: 0 auto;
}
.nav-logo {
  font-family: 'Caveat', cursive;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 14px;
  color: var(--soft);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink);
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 17px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  letter-spacing: 0;
  text-transform: none;
  transition: color 0.2s;
}
.nav-links a.nav-cta:hover { background: transparent; color: var(--accent); }

/* Prototype pill — removed from design (kept blank for backward-compat) */
.proto-pill { display: none; }

/* ============ Home ============ */
.hero {
  padding: 64px 0 72px;
}
.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 104px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 1080px;
}
.hero h1 .hl {
  position: relative;
  white-space: nowrap;
  display: inline-block;
}
.hero h1 .hl .underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08em;
  width: 100%;
  height: 0.22em;
  pointer-events: none;
  overflow: visible;
}
.hero h1 .hl .underline path {
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--ul-len, 600);
  stroke-dashoffset: var(--ul-len, 600);
  animation: hand-underline 1.8s cubic-bezier(0.65, 0, 0.35, 1) 0.7s forwards;
}
@keyframes hand-underline {
  to { stroke-dashoffset: 0; }
}
.hero h1 i { font-style: italic; }
.hero-sub {
  margin-top: 36px;
  max-width: 540px;
  font-size: 18px;
  color: var(--soft);
  line-height: 1.55;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--soft);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.hero-lede {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  align-items: start;
}
.hero-lede p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--soft);
  max-width: 540px;
}
.hero-card {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 22px;
}
.hero-card .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.hero-card .body {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink);
}
@media (max-width: 880px) {
  .hero-lede { grid-template-columns: 1fr; gap: 32px; }
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
}
.section-heading .hand {
  font-size: 36px;
  line-height: 1;
}
.section-heading .meta {
  font-size: 13px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}

/* Featured cards */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 80px;
}
.case-card {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 380px;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
  color: inherit;
}
.case-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
}
.case-card.craft {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.case-card .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: lowercase;
}
.case-card.craft .tag { color: var(--accent); }
.case-card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg);
  border: 1px dashed var(--rule-strong);
  border-radius: 6px;
  flex: 1;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
.case-card.craft .thumb {
  background: #fff;
  border-color: var(--accent-soft);
}
.case-card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  line-height: 1;
  margin: 0;
  font-weight: 400;
}
.case-card p {
  font-size: 14px;
  color: var(--soft);
  margin: 6px 0 0;
}
.case-card .arrow {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
  margin-top: auto;
}
.case-card.craft .arrow { color: var(--accent); }

/* About-short + AI stack strip on home */
.home-about {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  margin-bottom: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.home-about h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 42px;
  line-height: 1.05;
  margin: 0 0 16px;
  font-weight: 400;
}
.home-about p { font-size: 17px; color: var(--soft); margin: 0 0 14px; line-height: 1.6; }
.home-about .heading-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Stack strip */
.stack-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 36px 0 72px;
  border-top: 1px solid var(--rule);
  margin-top: 32px;
}
.stack-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-weight: 500;
}
.stack-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: var(--ink);
}

/* Now building */
.building {
  padding: 48px 0 80px;
  border-top: 1px solid var(--rule);
}
.build-list {
  display: flex;
  flex-direction: column;
}
.build-row {
  display: grid;
  grid-template-columns: 60px 1fr 140px;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.build-row .n {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  font-style: italic;
  color: var(--muted);
}
.build-row h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  margin: 0 0 4px;
  font-weight: 400;
  line-height: 1;
}
.build-row p { font-size: 14px; color: var(--soft); margin: 0; }
.build-row .links {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--soft);
}
.build-row .links a:hover { color: var(--accent); }

/* Footer */
.footer {
  padding: 60px 0 80px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}
.footer h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 64px;
  line-height: 1;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.footer .email {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
}
.footer .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============ Case study ============ */
.case-header {
  padding: 24px 0 56px;
}
.case-header .back {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  display: inline-block;
}
.case-header .back:hover { color: var(--accent); }
.case-header .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.case-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 84px;
  line-height: 1;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.015em;
  max-width: 1050px;
}
.case-header .lede {
  margin-top: 36px;
  max-width: 720px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--soft);
}
.case-header .lede strong {
  color: var(--ink);
  font-weight: 600;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 48px;
}
.case-meta .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.case-meta .value { font-size: 15px; color: var(--ink); }

/* Case body with sidebar */
.case-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 80px;
  padding: 72px 0;
}
.case-sidebar {
  position: sticky;
  top: 32px;
  align-self: start;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.case-sidebar .side-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.case-sidebar ol {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-sidebar ol li a {
  color: var(--muted);
  transition: color 0.15s;
  display: block;
  padding: 4px 0;
}
.case-sidebar ol li a:hover { color: var(--ink); }
.case-sidebar ol li.active a {
  color: var(--ink);
  font-weight: 600;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  margin-left: -12px;
}
.case-sidebar .media-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  padding: 6px 0;
}
.case-sidebar .media-links a:hover { color: var(--accent); }

.case-content { max-width: 760px; }

.chapter { margin-bottom: 72px; }
.chapter-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.chapter h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 52px;
  line-height: 1;
  margin: 0 0 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.chapter h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 30px;
  line-height: 1.1;
  margin: 48px 0 16px;
  font-weight: 400;
}
.chapter p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 18px;
}
.chapter p.lede { font-size: 22px; line-height: 1.5; color: var(--ink); }
.chapter strong { font-weight: 600; }

/* Problem list */
.problem-list {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.problem-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.problem-item:last-child { border-bottom: 1px solid var(--rule); }
.problem-item .num {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}
.problem-item h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  margin: 0 0 10px;
  line-height: 1.15;
  font-weight: 400;
}
.problem-item p {
  font-size: 17px;
  color: var(--soft);
  margin: 0;
  line-height: 1.6;
}

/* Media placeholders */
.placeholder {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  aspect-ratio: 16 / 10;
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
}
.placeholder .kind {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.placeholder .caption {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--soft);
  max-width: 440px;
  line-height: 1.4;
}
.placeholder.video {
  aspect-ratio: 16 / 9;
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  position: relative;
}
.placeholder.video .caption { color: var(--accent-soft); }
.placeholder.video .play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 22px;
  color: var(--ink);
}
.placeholder.before-after {
  aspect-ratio: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  border: none;
  background: none;
}
.placeholder.before-after > div {
  aspect-ratio: 16 / 10;
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}
.placeholder.before-after .kind { font-size: 10px; }
.placeholder.gif { aspect-ratio: 16/9; }

/* Actual media — img + caption */
.media {
  margin: 32px 0;
}
.media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--card);
}
.media .caption {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--soft);
  text-align: center;
  margin-top: 14px;
  line-height: 1.45;
}
.media.dark img {
  background: var(--ink);
}
.media.pad img {
  padding: 36px;
  background: #f2ece0;
}
.media.pad-lg img {
  padding: 60px 80px;
  background: #f2ece0;
}
/* Real-world photography — no border/background, slight shadow, optional breakout */
.media.photo img {
  border: none;
  border-radius: 6px;
  background: transparent;
  box-shadow: 0 14px 40px -12px rgba(20, 20, 20, 0.18), 0 4px 12px -6px rgba(20, 20, 20, 0.12);
}
.media.photo .caption {
  text-align: left;
  margin-top: 18px;
  max-width: 560px;
}

/* Before / after — real images */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}
.compare figure {
  margin: 0;
}
.compare .label-strip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.compare .label-strip.after { color: var(--accent); }
.compare .frame {
  background: #f2ece0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/5;
}
.compare .frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}
.compare figcaption {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--soft);
  margin-top: 12px;
  line-height: 1.4;
}

/* Mobile triptych */
.phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
  padding: 40px 32px;
  background: #f2ece0;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.phones img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  border-radius: 8px;
}

/* Validation — three small frames */
.states {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
  padding: 32px 24px;
  background: var(--ink);
  border-radius: 4px;
}
.states figure {
  margin: 0;
}
.states img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--card);
}
.states figcaption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  text-align: center;
  margin-top: 14px;
}

/* Pull-quote / call-out */
.callout {
  margin: 36px 0;
  padding: 24px 28px;
  border-left: 3px solid var(--accent);
  background: var(--highlight);
  border-radius: 0 10px 10px 0;
}
.callout .hand {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.callout p {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.55;
}

/* Impact panel */
.impact {
  margin: 32px 0;
  padding: 40px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.impact .big {
  font-family: 'Instrument Serif', serif;
  font-size: 96px;
  line-height: 0.9;
  color: var(--accent-soft);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.impact .big em { font-style: italic; color: var(--accent); }
.impact .big-label {
  font-size: 14px;
  color: var(--bg);
  opacity: 0.75;
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}
.impact .secondary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.impact .secondary div {
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 16px;
  line-height: 1.45;
}

/* How I worked */
.relationship-note {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.relationship-note:last-child { border-bottom: 1px solid var(--rule); }
.relationship-note h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-style: italic;
  margin: 0;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.1;
}
.relationship-note p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--soft);
  margin: 0;
}

/* Next case */
.next-case {
  padding: 64px 0 80px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.next-case .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.next-case h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 52px;
  line-height: 1;
  margin: 0;
  font-weight: 400;
}
.next-case .arrow {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  margin-top: 16px;
  display: block;
}
.next-case .back-link {
  justify-self: end;
  text-align: right;
  font-size: 14px;
  color: var(--soft);
}

/* ============ Research case study additions ============ */

/* Hypotheses scorecard */
.hypotheses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 32px 0 8px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.hypotheses .col-head {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  margin: 0 0 20px;
  font-weight: 400;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.hypotheses .col-head .tally {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 10px;
  vertical-align: middle;
}
.hypotheses ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.hyp-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}
.hyp-item:last-child { border-bottom: none; padding-bottom: 0; }
.hyp-item .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
}
.hyp-item.off .dot {
  background: transparent;
  border: 1.5px solid var(--rule-strong);
}
.hyp-item h4 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.3;
  color: var(--ink);
}
.hyp-item.off h4 { color: var(--muted); }
.hyp-item p {
  font-size: 14px;
  color: var(--soft);
  margin: 0;
  line-height: 1.5;
}
.hyp-item.off p { color: var(--muted); }
.hyp-item .strike {
  text-decoration: line-through;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
}

/* Journey chart */
.journey {
  margin: 40px 0;
  padding: 40px 32px 32px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.journey .journey-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.journey h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  font-weight: 400;
  margin: 0 0 28px;
  line-height: 1.1;
}
.journey svg {
  display: block;
  width: 100%;
  height: auto;
}
.journey .legend {
  margin-top: 16px;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--soft);
  text-align: center;
  line-height: 1.45;
}

/* Critical stages table — breaks out of the 760px content column so 4 cols breathe */
.stages {
  margin: 40px 0;
  border-top: 1px solid var(--ink);
  /* break out so the 4-col table has room */
  width: calc(100% + 180px);
  max-width: none;
}

/* Desktop/mobile toggle for the stages section */
.stages.desktop-only { display: block; }
.stage-cards.mobile-only { display: none; }

/* Mobile stage cards — stage-grouped so each stage reads as a unit */
.stage-cards {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.stage-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.stage-card.flag {
  background: var(--highlight);
  border-color: var(--accent-soft);
}
.stage-card header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.stage-card.flag header { border-bottom-color: var(--accent-soft); }
.stage-card .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stage-card.flag .label { color: var(--accent); }
.stage-card h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  margin: 0;
  font-weight: 400;
  line-height: 1.1;
}
.stage-card .feel {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}
.stage-card .feel.flag { color: var(--accent); }
.stage-card .block .block-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.stage-card .block p {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.4;
  color: var(--soft);
  margin: 0 0 8px;
}
.stage-card .block p.plain {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
.stages .row {
  display: grid;
  grid-template-columns: 120px repeat(3, 1fr);
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.stages .row.head {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-strong);
}
.stages .row.head .stage-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.stages .row.head .stage-name.mid {
  color: var(--accent);
}
.stages .row.head .col-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stages .row .rowlabel {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stages .row .cell {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.stages .row .cell.quote {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.4;
  color: var(--soft);
}
.stages .row .cell.quote p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.4;
}
.stages .row .cell.quote p:last-child { margin-bottom: 0; }
.stages .row .cell.feeling {
  font-weight: 600;
  font-size: 15px;
}
.stages .row .cell.feeling.flag {
  color: var(--accent);
}
.stages .row .cell.mid { position: relative; }
.stages .row .cell.mid::before {
  content: "";
  position: absolute;
  inset: -24px -12px;
  background: var(--highlight);
  z-index: -1;
  border-radius: 4px;
}
.stages {
  position: relative;
  z-index: 0;
}

/* Insights — numbered */
.insights {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
}
.insight {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.insights .insight:last-child { border-bottom: 1px solid var(--rule); }
.insight .n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.1em;
  padding-top: 4px;
}
.insight h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  margin: 0 0 10px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.insight p {
  font-size: 17px;
  color: var(--soft);
  line-height: 1.55;
  margin: 0;
}

/* Recommendations — paired to insights */
.recs {
  margin: 32px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.rec {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.rec .rec-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.rec h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  margin: 0;
  font-weight: 400;
  line-height: 1.15;
}
.rec p {
  font-size: 16px;
  color: var(--soft);
  margin: 0;
  line-height: 1.55;
}

/* Methods strip — small facts about the research */
.methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.method .n {
  font-family: 'Instrument Serif', serif;
  font-size: 40px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.method .n em { font-style: italic; color: var(--accent); }
.method .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 8px;
  line-height: 1.4;
}

/* Reflection pull-quote */
.reflection {
  margin: 40px 0;
  padding: 48px 0 8px;
  border-top: 1px solid var(--rule);
}
.reflection p {
  font-family: 'Instrument Serif', serif;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  max-width: 680px;
  letter-spacing: -0.005em;
}
.reflection p em { font-style: italic; color: var(--accent); }
.reflection .attrib {
  margin-top: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Note card — the disclaimer about no live prototype */
.note-card {
  margin: 24px 0 40px;
  padding: 18px 22px;
  border: 1px dashed var(--rule-strong);
  border-radius: 8px;
  background: transparent;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.note-card .tag {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  line-height: 1.2;
  flex: 0 0 auto;
}
.note-card p {
  margin: 0;
  font-size: 15px;
  color: var(--soft);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .hypotheses { grid-template-columns: 1fr; gap: 24px; }
  .stages { width: 100%; }
  .stages.desktop-only { display: none; }
  .stage-cards.mobile-only { display: flex; }
  .methods { grid-template-columns: 1fr 1fr; }
  .reflection p { font-size: 26px; }
}

/* ============ About page ============ */
.about-hero {
  padding: 56px 0 48px;
  max-width: 1000px;
}
.about-hero .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.about-hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 88px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}
.about-hero h1 i { font-style: italic; }
.about-hero h1 .hl {
  position: relative;
  display: inline-block;
}
.about-hero h1 .hl .underline,
.work-hero h1 .hl .underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08em;
  width: 100%;
  height: 0.22em;
  pointer-events: none;
  overflow: visible;
}
.about-hero h1 .hl .underline path,
.work-hero h1 .hl .underline path {
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--ul-len, 600);
  stroke-dashoffset: var(--ul-len, 600);
  animation: hand-underline 1.8s cubic-bezier(0.65, 0, 0.35, 1) 0.7s forwards;
}

.about-bio {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 64px;
  padding: 56px 0 72px;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.about-portrait {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.about-portrait .frame-img {
  aspect-ratio: 4 / 5;
  background: #f2ece0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.about-portrait .frame-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Loom / video embed (used in case studies) */
.video-embed { margin: 32px 0; }
.video-embed .loom-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 1.5px solid var(--rule);
  background: var(--ink);
}
.video-embed .loom-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.about-portrait .caption-hand {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.35;
}
.about-portrait .caption-hand span { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; display: block; margin-top: 4px; }
.about-contact {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--soft);
}
.about-contact a { color: var(--soft); }
.about-contact a:hover { color: var(--accent); }
.about-contact .row {
  display: grid;
  grid-template-columns: 80px 1fr;
  padding: 6px 0;
  border-top: 1px dashed var(--rule-strong);
}
.about-contact .row:last-child { border-bottom: 1px dashed var(--rule-strong); }
.about-contact .row .k { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; padding-top: 2px; }

.about-bio-text p {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 20px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.about-bio-text p.smaller {
  font-size: 18px;
  font-family: 'Inter', sans-serif;
  color: var(--soft);
  line-height: 1.6;
  letter-spacing: 0;
}
.about-bio-text p strong { font-weight: 600; color: var(--ink); }
.about-bio-text p em { font-style: italic; color: var(--accent); }

.stack-strip.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Also worked with — small archive on Home */
.also-worked {
  padding: 8px 0 64px;
}
.also-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}
.also-row {
  display: grid;
  grid-template-columns: 220px 1fr 100px;
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.also-row h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  margin: 0;
  font-weight: 400;
  line-height: 1.1;
}
.also-row p {
  margin: 0;
  font-size: 15px;
  color: var(--soft);
  line-height: 1.55;
}
.also-row .yr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  justify-self: end;
}
@media (max-width: 900px) {
  .also-row { grid-template-columns: 1fr; gap: 4px; }
  .also-row .yr { justify-self: start; }
}

/* ============ Work index ============ */
.work-hero {
  padding: 56px 0 40px;
  max-width: 1080px;
}
.work-hero .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.work-hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 88px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}
.work-hero h1 i { font-style: italic; }
.work-hero h1 .hl {
  position: relative;
  display: inline-block;
}
.work-hero .work-sub {
  margin-top: 28px;
  max-width: 600px;
  font-size: 17px;
  color: var(--soft);
  line-height: 1.55;
}

.work-featured {
  padding: 48px 0 0;
  border-top: 1px solid var(--rule);
}
.work-featured .featured-grid { margin-bottom: 56px; }

.work-archive {
  padding: 48px 0 32px;
  border-top: 1px solid var(--rule);
}
.archive-list {
  display: flex;
  flex-direction: column;
}
.arch-row {
  display: grid;
  grid-template-columns: 130px 1fr 180px 180px;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.arch-row .yr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.arch-row .meat h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  margin: 0 0 6px;
  font-weight: 400;
  line-height: 1.1;
}
.arch-row .meat p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--soft);
  max-width: 580px;
}
.arch-row .kind {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}
.arch-row .state {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  justify-self: end;
  text-align: right;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px dashed var(--rule-strong);
  color: var(--muted);
  white-space: nowrap;
}
.arch-row.pending .state {
  color: var(--accent);
  border-color: var(--accent-soft);
}
.arch-row.private .state {
  color: var(--soft);
  background: var(--highlight);
  border-style: solid;
  border-color: var(--accent-soft);
}

.work-cta {
  padding: 64px 0 80px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 64px;
  align-items: end;
}
.work-cta .hand-label {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1.2;
}
.work-cta h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 52px;
  line-height: 1.05;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 640px;
}
.work-cta .cta-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
}
.work-cta .cta-side .email {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 26px;
  color: var(--accent);
}
.work-cta .cta-side .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .work-hero h1 { font-size: 54px; }
  .arch-row { grid-template-columns: 1fr; gap: 8px; }
  .arch-row .state, .arch-row .kind { justify-self: start; text-align: left; }
  .work-cta { grid-template-columns: 1fr; gap: 24px; }
  .work-cta .cta-side { align-items: flex-start; text-align: left; }
}
.about-pillars {
  padding: 64px 0 24px;
  border-top: 1px solid var(--rule);
}
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
  margin-top: 8px;
}
.pillar {
  padding: 4px 0 0;
}
.pillar-num {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 10px;
  line-height: 1;
}
.pillar h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  line-height: 1.05;
  margin: 0 0 14px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.pillar p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--soft);
  margin: 0;
}
.pillar p em { font-style: italic; color: var(--ink); }
.pillar p strong { font-weight: 600; color: var(--ink); }

/* How I work */
.about-how {
  padding: 72px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}
.about-how .how-lead .hand {
  font-size: 42px;
  line-height: 1;
  display: block;
}
.about-how .how-body {
  max-width: 720px;
}
.about-how .how-body p {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 22px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.about-how .how-body p em { font-style: italic; color: var(--accent); }

/* Timeline */
.about-timeline {
  padding: 56px 0 72px;
  border-top: 1px solid var(--rule);
}
.timeline-list {
  margin-top: 8px;
}
.tl-row {
  display: grid;
  grid-template-columns: 140px 1fr 180px;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.tl-row .yr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.tl-row h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  margin: 0 0 4px;
  font-weight: 400;
  line-height: 1.1;
}
.tl-row h4 em { font-style: italic; color: var(--muted); font-size: 20px; margin-left: 6px; }
.tl-row p {
  margin: 0;
  font-size: 15px;
  color: var(--soft);
  line-height: 1.5;
  max-width: 560px;
}
.tl-row .place {
  justify-self: end;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tl-row.current {
  background: var(--highlight);
  padding-left: 18px;
  padding-right: 18px;
  margin: 0 -18px;
  border-radius: 6px;
  border-bottom: none;
}
.tl-row.current .yr, .tl-row.current .place { color: var(--accent); }

/* Beyond work — small human facts */
.about-beyond {
  padding: 56px 0 80px;
  border-top: 1px solid var(--rule);
}
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 28px;
}
.beyond-item {
  padding: 20px 0 0;
}
.beyond-item .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.beyond-item h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  margin: 0 0 8px;
  line-height: 1.2;
  font-weight: 400;
}
.beyond-item p {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.55;
  margin: 0;
}

/* Responsive fallback */
@media (max-width: 900px) {
  .hero h1 { font-size: 64px; }
  .case-header h1 { font-size: 54px; }
  .case-body { grid-template-columns: 1fr; gap: 32px; }
  .case-sidebar { position: static; }
  .featured-grid, .home-about, .stack-strip, .impact, .next-case, .footer { grid-template-columns: 1fr; }
  .build-row { grid-template-columns: 1fr; }
  .shell, .nav { padding-left: 24px; padding-right: 24px; }
  .about-hero h1 { font-size: 54px; }
  .about-bio, .about-how { grid-template-columns: 1fr; gap: 32px; }
  .pillars-grid { grid-template-columns: 1fr; gap: 32px; }
  .tl-row { grid-template-columns: 80px 1fr; }
  .tl-row .place { display: none; }
  .beyond-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   SHARETRIBE / FREELANCE PAGES
   Independent of the main site: same brand language, separate IA.
   ============================================================ */

/* Hero — wider, calmer, with eyebrow badge */
.st-hero {
  padding: 56px 0 64px;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}
.st-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--accent-soft);
  background: #fff5e3;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.st-eyebrow-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.st-eyebrow-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.st-hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 76px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  text-wrap: balance;
}
.st-hero h1 i { font-style: italic; }
.st-hero h1 .hl {
  position: relative;
  display: inline;
  white-space: nowrap;
}
.st-hero h1 .hl .underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08em;
  width: 100%;
  height: 0.22em;
  pointer-events: none;
  overflow: visible;
}
.st-hero h1 .hl .underline path {
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--ul-len, 600);
  stroke-dashoffset: var(--ul-len, 600);
  animation: hand-underline 1.8s cubic-bezier(0.65, 0, 0.35, 1) 0.7s forwards;
}
.st-hero .lede {
  font-size: 19px;
  color: var(--soft);
  line-height: 1.55;
  margin: 0 auto 36px;
  max-width: 680px;
}

/* Primary call-to-action button */
.st-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: var(--ink);
  color: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.st-btn:hover { transform: translateY(-1px); background: var(--accent); color: #fff; }
.st-btn .arrow { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 18px; line-height: 1; }
.st-btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.st-btn.ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Section heading variant — centered for st pages */
.st-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.st-section-head .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.st-section-head h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 44px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.st-section-head h2 i { font-style: italic; }
.st-section-head p {
  font-size: 16px;
  color: var(--soft);
  line-height: 1.6;
  margin: 0;
}

/* Generic section spacing */
.st-section { padding: 72px 0; border-top: 1px solid var(--rule); }
.st-section:first-of-type { border-top: none; }

/* Service cards (2 columns on Services page; 3 small on Configuration page) */
.st-service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}
.st-service-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s;
  color: inherit;
}
.st-service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.st-service-card .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.st-service-card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 30px;
  line-height: 1.1;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.st-service-card p {
  font-size: 15px;
  color: var(--soft);
  line-height: 1.6;
  margin: 0;
}
.st-service-card .arrow {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--accent);
  margin-top: auto;
  padding-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Three-up icon-style feature trio (Configuration page top) */
.st-feature-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}
.st-feature {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.st-feature .glyph {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}
.st-feature h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  margin: 0;
  line-height: 1.15;
}
.st-feature p {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.55;
  margin: 0;
}

/* About card — portrait + text side-by-side, with badge */
.st-about-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}
.st-about-card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 36px;
  margin: 0 0 16px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.st-about-card p {
  font-size: 16px;
  color: var(--soft);
  line-height: 1.6;
  margin: 0 0 18px;
}
.st-about-card .badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--accent-soft);
  background: #fff5e3;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.st-about-card .badge-mini::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.st-about-card .portrait {
  aspect-ratio: 1 / 1;
  background: #f2ece0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.st-about-card .portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Trust strip — text-mark logos */
.st-trust {
  text-align: center;
  padding: 56px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.st-trust .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.st-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
  align-items: center;
}
.st-trust-mark {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--soft);
  letter-spacing: -0.005em;
}
.st-trust-mark em {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 8px;
}
.st-trust .footnote {
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  font-family: 'Instrument Serif', serif;
}

/* Why founders choose to work with me — typographic 2x2 grid (no cards) */
.st-why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 980px;
  margin: 0 auto;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.st-why {
  padding: 32px 36px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.st-why .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.st-why h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  margin: 0;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.st-why p {
  font-size: 15px;
  color: var(--soft);
  line-height: 1.6;
  margin: 0;
}

/* Process / What's Included — numbered list */
.st-process {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.st-process .step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.st-process .step:last-child { border-bottom: 1px solid var(--rule); }
.st-process .step .n {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
  padding-top: 4px;
}
.st-process .step h4 {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  margin: 0 0 8px;
  font-weight: 400;
  line-height: 1.2;
}
.st-process .step p {
  font-size: 15px;
  color: var(--soft);
  line-height: 1.6;
  margin: 0;
}

/* Whats included — two-column key/value grid */
.st-included {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}
.st-included-item {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 22px 24px;
}
.st-included-item .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.st-included-item h5 {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  margin: 0 0 6px;
  font-weight: 400;
  line-height: 1.2;
}
.st-included-item p {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.55;
  margin: 0;
}

/* FAQ */
.st-faq {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.st-faq details {
  border-top: 1px solid var(--rule);
  padding: 22px 0;
}
.st-faq details:last-child { border-bottom: 1px solid var(--rule); }
.st-faq summary {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.st-faq summary::-webkit-details-marker { display: none; }
.st-faq summary::after {
  content: '+';
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  color: var(--accent);
  flex: 0 0 auto;
  line-height: 1;
  transition: transform 0.2s;
}
.st-faq details[open] summary::after {
  content: '−';
  transform: none;
}
.st-faq details p {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--soft);
  line-height: 1.65;
  max-width: 700px;
}
.st-faq details p + p { margin-top: 12px; }
.st-faq details a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* Final CTA panel */
.st-cta-panel {
  margin: 32px auto 0;
  max-width: 920px;
  padding: 56px 40px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  text-align: center;
}
.st-cta-panel h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 38px;
  line-height: 1.1;
  margin: 0 0 14px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.st-cta-panel h3 i { font-style: italic; }
.st-cta-panel p {
  font-size: 16px;
  color: var(--soft);
  line-height: 1.55;
  margin: 0 auto 28px;
  max-width: 540px;
}

/* Sharetribe footer (different from main site) */
.st-footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.st-footer .col-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.st-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.st-footer ul a { color: var(--soft); }
.st-footer ul a:hover { color: var(--accent); }
.st-footer .brand {
  font-family: 'Caveat', cursive;
  font-size: 30px;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 8px;
  display: inline-block;
}
.st-footer .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 16px;
}

/* Testimonial card */
.st-testimonial {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 32px;
}
.st-testimonial blockquote {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 32px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 24px;
  letter-spacing: -0.005em;
}
.st-testimonial blockquote::before { content: '“'; color: var(--accent); margin-right: 2px; }
.st-testimonial blockquote::after { content: '”'; color: var(--accent); margin-left: 2px; }
.st-testimonial .attrib {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.st-testimonial .attrib span {
  display: block;
  font-weight: 400;
  color: var(--soft);
  margin-top: 2px;
  font-size: 13px;
}
@media (max-width: 700px) {
  .st-testimonial { padding: 28px 22px; }
  .st-testimonial blockquote { font-size: 22px; }
}

/* Testimonials — stacked rows, photo on left */
.st-testimonials {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.st-testimonial-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 32px 36px;
}
.st-testimonial-row .avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bone-2, #efe7d8);
}
.st-testimonial-row .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.st-testimonial-row .quote {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: -0.002em;
}
.st-testimonial-row .quote::before { content: '“'; color: var(--accent); margin-right: 2px; }
.st-testimonial-row .quote::after { content: '”'; color: var(--accent); margin-left: 2px; }
.st-testimonial-row cite {
  font-style: normal;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: block;
}
.st-testimonial-row cite span {
  display: block;
  font-weight: 400;
  color: var(--soft);
  margin-top: 2px;
  font-size: 13px;
}
@media (max-width: 700px) {
  .st-testimonial-row {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 22px;
    text-align: center;
  }
  .st-testimonial-row .avatar { width: 96px; height: 96px; margin: 0 auto; }
  .st-testimonial-row .quote { font-size: 17px; text-align: left; }
  .st-testimonial-row cite { text-align: left; }
}

/* Checklist — used in "Who this is for" and "Common challenges" sections */
.st-checklist {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.st-checklist li {
  position: relative;
  padding: 14px 18px 14px 56px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.st-checklist li:last-child { border-bottom: none; }
.st-checklist li::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8662f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
@media (max-width: 700px) {
  .st-checklist li { padding: 12px 0 12px 36px; font-size: 15px; }
  .st-checklist li::before { left: 4px; width: 18px; height: 18px; margin-top: -9px; }
}

/* Inline figure for screenshots / preview imagery */
.st-figure {
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}
.st-figure .frame {
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--card);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(42, 36, 30, 0.04), 0 12px 40px -20px rgba(42, 36, 30, 0.18);
}
.st-figure .frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--rule);
}
.st-figure figcaption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--soft);
  letter-spacing: 0.06em;
  margin-top: 16px;
}
@media (max-width: 700px) {
  .st-figure .frame { padding: 10px; }
  .st-figure figcaption { font-size: 11px; }
}

/* Selected past projects — image card grid */
.st-projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.st-project {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
  color: inherit;
}
.st-project:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.st-project .shot {
  background: #f2ece0;
  padding: 32px 28px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.st-project .shot img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: bottom;
}
.st-project .body {
  padding: 24px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.st-project .logo-wrap {
  height: 28px;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.st-project .logo-wrap img {
  max-height: 100%;
  max-width: 160px;
  width: auto;
  height: auto;
  display: block;
}
.st-project .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.st-project p {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.55;
  margin: 0;
}
.st-project .visit {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 900px) {
  .st-projects { grid-template-columns: 1fr; }
}

/* Sub-page header (Configuration / Custom Design) — back link + breadcrumb */
.st-back {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: inline-block;
  margin: 24px 0 0;
}
.st-back:hover { color: var(--accent); }
.st-back-top {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin: 0 0 22px;
}
.st-back-top:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 900px) {
  .st-hero { padding: 36px 0 48px; }
  .st-hero h1 { font-size: 48px; line-height: 1.05; }
  .st-hero .lede { font-size: 17px; }
  .st-section { padding: 48px 0; }
  .st-section-head h2 { font-size: 32px; }
  .st-service-grid { grid-template-columns: 1fr; }
  .st-feature-trio { grid-template-columns: 1fr; }
  .st-about-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px;
    text-align: left;
  }
  .st-about-card .portrait { max-width: 220px; }
  .st-why-grid { grid-template-columns: 1fr; }
  .st-included { grid-template-columns: 1fr; }
  .st-trust-row { gap: 28px; }
  .st-trust-mark { font-size: 18px; }
  .st-cta-panel { padding: 40px 24px; }
  .st-cta-panel h3 { font-size: 28px; }
  .st-footer { grid-template-columns: 1fr; gap: 28px; }
}

/* ============ Mobile fine-tuning (≤700px) ============ */
@media (max-width: 700px) {
  /* Tighter horizontal padding */
  .shell, .nav { padding-left: 20px; padding-right: 20px; }

  /* Hero — smaller display type, less vertical padding */
  .hero { padding: 36px 0 48px; }
  .hero h1 { font-size: 52px; line-height: 1.02; letter-spacing: -0.015em; }
  .hero-eyebrow { margin-bottom: 22px; }
  .hero-lede { margin-top: 32px; gap: 28px; }
  .hero-lede p { font-size: 16px; }
  .hero-card .body { font-size: 17px; }

  /* Nav — give the wordmark + links some breathing room */
  .nav { padding-top: 18px; padding-bottom: 18px; gap: 12px; }
  .nav-logo { font-size: 26px; }
  .nav-links { gap: 16px; font-size: 13px; }
  .nav-cta { font-size: 15px; }

  /* Section headings */
  .section-heading .hand { font-size: 28px; }
  .section-heading { margin-bottom: 20px; }

  /* Case header — recover vertical real estate */
  .case-header { padding: 16px 0 36px; }
  .case-header h1 { font-size: 40px; line-height: 1.04; }
  .case-header .lede { font-size: 17px; margin-top: 24px; }

  /* Case meta — 2 columns so values don't clip */
  .case-meta {
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    margin-top: 32px;
    padding: 20px 0;
  }
  .case-meta .value { font-size: 14px; }

  /* Case body padding */
  .case-body { padding: 40px 0; gap: 24px; }
  .chapter { margin-bottom: 48px; }
  .chapter h2 { font-size: 38px; margin-bottom: 20px; }
  .chapter h3 { font-size: 24px; margin: 32px 0 12px; }
  .chapter p { font-size: 16px; }
  .chapter p.lede { font-size: 19px; }

  /* Relationship notes ("How I worked") — stack label above body */
  .relationship-note {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 0;
  }
  .relationship-note h4 { font-size: 18px; }
  .relationship-note p { font-size: 16px; }

  /* Compact mobile chapter index — sidebar collapses to inline list */
  .case-sidebar {
    margin-bottom: 8px;
    padding: 16px 0 4px;
    border-top: 1px solid var(--rule);
  }
  .case-sidebar .side-label { margin-bottom: 10px; }
  .case-sidebar ol { gap: 4px; margin-bottom: 20px; }
  .case-sidebar ol li a { padding: 2px 0; font-size: 12px; }

  /* Status bar tweaks — keep dot aligned when wrapping */
  .status-bar .inner { padding: 10px 20px; }
  .status-bar { font-size: 10px; }

  /* Footer */
  .footer { padding: 48px 0 60px; gap: 24px; }
  .footer h2 { font-size: 40px; }
  .footer .email { font-size: 22px; }

  /* About hero */
  .about-hero { padding: 32px 0 32px; }
  .about-hero h1 { font-size: 40px; }
  .about-bio { padding: 32px 0 48px; gap: 28px; }
  .about-bio-text p { font-size: 20px; }
  .about-bio-text p.smaller { font-size: 16px; }

  /* Work hero */
  .work-hero { padding: 32px 0 24px; }
  .work-hero h1 { font-size: 40px; }

  /* Featured rows on home */
  .feat-row h3 { font-size: 24px; }
  .feat-row .feat-result { font-size: 15px; }
}
