/* ===== Brand tokens (palette B, locked) ===== */
:root {
  --bg: #FAF7F2;        /* sandstone page */
  --sand: #F1EBE1;      /* section surface */
  --ink: #1F1B16;       /* text */
  --taupe: #6B5E52;     /* supporting text */
  --body: #4A4038;      /* paragraph text */
  --accent: #A84B25;    /* terracotta, the only accent */
  --accent-dark: #8A3C1D;
  --line: #E6DCCD;
  --dark: #1F1B16;
  --kpi: #F2B38F;       /* accent on dark */
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(var(--max), calc(100% - 64px)); margin: 0 auto; }

/* ===== Type ===== */
h1, h2, h3 { margin: 0; }
.section-title, .page-title, h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.section-title { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.1; }
.page-title { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.08; margin: 16px 0 14px; }
.eyebrow { margin: 0 0 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.section-intro { margin: 10px 0 0; color: var(--body); max-width: 620px; }
.section-intro.wide { max-width: 760px; margin-bottom: 40px; }
.link { font-size: 14px; font-weight: 600; color: var(--accent); }
.link:hover { color: var(--ink); }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 6px; font-size: 15px; font-weight: 500; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border-color: #CDBFAD; color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost-dark { border-color: #5A4F45; color: var(--bg); }
.btn-ghost-dark:hover { border-color: var(--kpi); color: var(--kpi); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(250, 247, 242, .95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.brand-cred { font-size: 12px; letter-spacing: 0.08em; color: var(--taupe); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { color: var(--accent); }
.nav a.active { border-bottom-color: var(--accent); }
.nav .nav-cta { padding: 9px 16px; border: 1px solid var(--ink); border-radius: 6px; }
.nav .nav-cta:hover { border-color: var(--accent); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }

/* ===== Hero ===== */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(38px, 4.4vw, 62px); line-height: 1.08; margin: 0 0 24px; white-space: pre-line; }
.hero-text { font-size: 19px; color: var(--body); max-width: 600px; margin: 0 0 36px; }
/* Circular portrait, head and shoulders. To adjust the framing:
   scale = zoom (higher = closer), the 2nd number in transform-origin = how far down the face sits */
.hero-portrait { width: min(380px, 100%); aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; justify-self: end; background: var(--sand); border: 6px solid #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(31, 27, 22, .12); }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(1.3); transform-origin: 50% 22%; }

/* ===== KPI band ===== */
.kpis { background: var(--dark); color: var(--bg); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 0; padding: 12px 24px; border-left: 1px solid #3A332C; }
.kpi:first-child { border-left: 0; padding-left: 0; }
a.kpi:hover .kpi-label { color: var(--kpi); }
.kpi-value { font-family: var(--serif); font-size: clamp(20px, 1.7vw, 24px); line-height: 1; color: var(--kpi); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.02em; }
.kpi-label { font-size: 12px; line-height: 1.4; color: #D9CFC1; max-width: 220px; transition: color .15s; }
.kpi-result { margin: 0; padding: 22px 0; font-family: var(--serif); font-size: clamp(20px, 2vw, 26px); line-height: 1.3; color: var(--kpi); }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section-sand { background: var(--sand); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 32px 80px; }
.about-copy p { margin: 0 0 18px; color: var(--body); font-size: 17px; }
.about-copy .lead { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.45; color: var(--ink); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; margin-bottom: 40px; }

/* What I Do */
.what-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 40px; }
.what-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 26px 22px; }
.what-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.what-card h3 { font-size: 16px; font-weight: 600; line-height: 1.35; margin: 14px 0 10px; }
.what-card p { margin: 0; font-size: 14px; color: var(--body); }

/* Case cards */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.case-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.case-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(31, 27, 22, .10); }
.case-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--sand); }
.case-img img { width: 100%; height: 100%; object-fit: cover; }
.case-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px 24px; flex: 1; }
.tag { align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-dark); background: #F6E3D6; padding: 5px 10px; border-radius: 999px; }
.case-body h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.25; }
.case-result { margin: auto 0 0; padding-top: 12px; border-top: 1px solid #EEE6DA; font-size: 14px; color: var(--taupe); }

/* Experience */
.timeline { display: flex; flex-direction: column; }
.job { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 32px; padding: 26px 0; border-top: 1px solid #DDD1C1; }
.job:first-child { border-top: 0; padding-top: 0; }
.job-years { margin: 2px 0 0; font-size: 14px; color: var(--taupe); }
.job h3 { font-size: 18px; font-weight: 600; }
.job-org { margin: 2px 0 8px; font-size: 14px; font-weight: 500; color: var(--accent); }
.job p:last-child { margin: 0; color: var(--body); font-size: 15px; }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.project-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.project-shot { aspect-ratio: 16 / 10; background: #E9DDCC; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.project-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.project-shot span { font-size: 13px; color: var(--taupe); }
.project-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.25; }
.project-body p { margin: 0; font-size: 14px; color: var(--body); }
.project-body .stack { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--taupe); }

/* Case library + detail */
.page-head { padding: 56px 0 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.filter { font: inherit; font-size: 13px; font-weight: 500; padding: 9px 16px; border-radius: 999px; border: 1px solid #CDBFAD; background: #fff; color: var(--ink); cursor: pointer; }
.filter.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.case-hero { border-bottom: 1px solid var(--line); }
.case-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 48px 0; }
.case-hero-grid .tag { display: inline-block; margin-top: 24px; }
.case-hero-img { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.case-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.skills { margin: 0; color: var(--taupe); font-size: 15px; }
.sai { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.sai p:last-child { margin: 0; font-size: 17px; line-height: 1.7; color: #2E2621; }
.tools { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--body); }
.tools .eyebrow { display: inline; margin-right: 10px; }
.next-case { background: var(--sand); }
.next-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding: 40px 0; }
.next { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--serif); font-size: 22px; text-align: right; }
.next span { font-family: var(--sans); font-size: 13px; color: var(--taupe); }

/* ===== Footer / Contact ===== */
.site-footer { background: var(--dark); color: var(--bg); padding: 96px 0 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.footer-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4vw, 52px); line-height: 1.1; margin-bottom: 16px; }
.footer-text { margin: 0; font-size: 19px; color: #D9CFC1; max-width: 620px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-bar { margin-top: 72px; padding: 22px 0 32px; border-top: 1px solid #3A332C; font-size: 13px; color: #B5A898; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid, .case-hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { justify-self: start; width: min(300px, 100%); }
  .split { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-left: 0; padding-left: 0; }
  .sai { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
  .nav .nav-cta { margin-top: 8px; text-align: center; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 56px; }
  .kpi { padding: 24px 16px; }
  .kpi:nth-child(odd) { border-left: 0; padding-left: 0; }
  .job { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
}

/* ===== Edit mode (only visible when opened from your computer) ===== */
.edit-bar { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 520px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(31, 27, 22, .18); font-size: 13px; }
.edit-bar button { font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 6px; border: 1px solid #CDBFAD; background: #fff; color: var(--ink); cursor: pointer; }
.edit-bar button:first-child { background: var(--accent); border-color: var(--accent); color: #fff; }
.edit-bar span { color: var(--taupe); }
body.editing [data-path] { outline: 1px dashed rgba(168, 75, 37, .5); outline-offset: 3px; cursor: text; }
body.editing [data-path]:focus { outline: 2px solid var(--accent); background: rgba(246, 227, 214, .5); }

/* ===== One page: What I Do read more ===== */
.what-card { display: flex; flex-direction: column; }
.what-more { display: none; }
.what-card.open .what-more { display: block; margin-bottom: 4px; }
.what-toggle, .case-toggle { align-self: flex-start; margin-top: auto; padding: 8px 0 0; background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; }
.what-toggle:hover, .case-toggle:hover { color: var(--ink); }
.what-card h3 { margin-bottom: 8px; }

/* ===== One page: cases open in place ===== */
.case-card.extra { display: none; }
.case-grid.show-all .case-card.extra, .case-card.extra.shown { display: flex; }
.case-card { scroll-margin-top: 90px; }
.case-more { display: none; }
.case-card.open { grid-column: 1 / -1; flex-direction: row; transform: none; }
.case-card.open .case-img { flex: 0 0 38%; aspect-ratio: auto; min-height: 100%; }
.case-card.open .case-body { padding: 32px 36px; }
.case-card.open .case-body h3 { font-size: 30px; }
.case-card.open .case-result { margin: 0; color: var(--accent); font-weight: 500; }
.case-card.open .case-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; margin-top: 8px; }
.sai-label { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.sai-block p:last-child { margin: 0; font-size: 15px; line-height: 1.7; color: #2E2621; }
.case-meta { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid #EEE6DA; }
.case-meta p { margin: 0; font-size: 14px; color: var(--body); }
.meta-label { display: inline-block; min-width: 56px; margin-right: 10px; font-weight: 600; color: var(--ink); }
.all-cases { display: flex; justify-content: center; margin-top: 36px; }
@media (max-width: 960px) {
  .case-card.open { flex-direction: column; }
  .case-card.open .case-img { flex: none; aspect-ratio: 16 / 9; }
  .case-card.open .case-more { grid-template-columns: 1fr; }
  .case-card.open .case-body { padding: 24px; }
}

/* ===== Round 3 ===== */
.what-grid { align-items: start; }
.case-kpis { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.kpi-chip { font-size: 12.5px; font-weight: 600; line-height: 1.35; color: #F6D2BA; background: var(--ink); padding: 6px 11px; border-radius: 6px; }
.case-card.open .case-kpis { margin-top: 0; }
.meta-row { display: flex; align-items: flex-start; gap: 12px; }
.meta-row .meta-label { padding-top: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip { font-size: 12.5px; font-weight: 500; color: var(--ink); background: #fff; border: 1px solid #CDBFAD; padding: 4px 10px; border-radius: 999px; }
.skill-chip { font-size: 12.5px; font-weight: 500; color: #5A4A3C; background: #EFE6D8; padding: 5px 11px; border-radius: 999px; }
.case-meta { gap: 12px; }
.project-body { padding: 18px 22px 20px; }
body.editing [data-list] { outline: 1px dashed rgba(168, 75, 37, .5); outline-offset: 2px; cursor: text; }
#projects .project-grid { margin-top: 40px; }

/* ===== Round 4 ===== */
.what-card h3 { white-space: pre-line; }
.case-kpis { gap: 10px; }
.kpi-label { max-width: none; }
@media (min-width: 1101px) { .kpi-label { white-space: nowrap; } }
.what-card { padding: 24px 18px; }
.what-card h3 { font-size: 15.5px; }
@media (min-width: 1200px) { .what-card h3 { white-space: pre; } }
.kpi { padding: 12px 20px; }

/* ===== Round 5 ===== */
.kpi-chip { white-space: nowrap; font-size: 12px; }
.case-body { padding: 22px 20px 22px; }
.project-grid { align-items: start; }
.project-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.project-line { margin: 0; font-size: 14px; color: var(--body); }
.project-more { display: none; }
.project-card { scroll-margin-top: 90px; }
.project-card.open { grid-column: 1 / -1; flex-direction: row; }
.project-card.open .project-shot { flex: 0 0 46%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); align-items: flex-start; }
.project-card.open .project-body { padding: 30px 34px; }
.project-card.open .project-body h3 { font-size: 28px; }
.project-card.open .project-more { display: grid; gap: 22px; margin-top: 6px; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; color: #2E2621; }
.project-card .meta-row p { margin: 0; padding-top: 4px; font-size: 14px; color: var(--body); }
.project-card .meta-label { min-width: 160px; }
@media (max-width: 960px) {
  .project-card.open { flex-direction: column; }
  .project-card.open .project-shot { flex: none; aspect-ratio: 16 / 10; border-right: 0; }
  .project-card .meta-row { flex-direction: column; gap: 6px; }
}

/* ===== Round 6: hold layout at laptop widths (about 1000 to 1300px) ===== */
@media (min-width: 900px) {
  .kpi-grid { display: flex; justify-content: space-between; }
  .kpi { flex: 0 1 auto; padding: 12px 18px; }
  .kpi-label { white-space: nowrap; }
}
@media (min-width: 1000px) {
  .what-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
  .what-card { padding: 22px 14px; }
  .what-card h3 { white-space: pre; font-size: clamp(13px, 1.15vw, 15.5px); }
}
.case-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

/* ===== Round 7 ===== */
.project-card.open { flex-direction: column; }
.project-card.open .project-shot { display: none; }
.project-card.open .project-body { padding: 26px 28px 24px; }
.project-card.open .project-more { display: block; }
.shot-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.shot { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
@media (max-width: 760px) { .shot-row { grid-template-columns: 1fr; } }
@media (min-width: 1000px) { .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ===== Round 8 ===== */
.hero-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
.hero h1 { white-space: nowrap; font-size: clamp(26px, 2.85vw, 40px); }
.hero-text { font-size: 17px; max-width: none; }
.hero-portrait { width: clamp(200px, 20vw, 270px); }
@media (max-width: 760px) { .hero h1 { white-space: normal; } .hero-grid { grid-template-columns: 1fr; } }
.project-card.open .project-body { padding: 28px 30px 26px; gap: 10px; }
.project-card.open .project-more { display: grid; gap: 24px; margin-top: 4px; }
.flow { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.flow li { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; background: var(--sand); border-radius: 8px; font-size: 13.5px; line-height: 1.45; color: #2E2621; }
.flow-n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; }
.shot { margin: 0; display: flex; flex-direction: column; gap: 8px; border: 0; background: none; }
.shot a { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.shot figcaption { font-size: 13px; color: var(--taupe); }
@media (max-width: 1100px) { .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .flow { grid-template-columns: 1fr; } }

/* ===== Round 9: name slightly larger, credentials clearer ===== */
.brand-name { font-size: 26px; font-weight: 500; }
.brand-cred { font-size: 12.5px; color: #4A4038; letter-spacing: 0.08em; }
.hero-portrait { width: clamp(190px, 17vw, 245px); }

.job-loc { font-weight: 400; color: var(--taupe); }
.hero-loc { display: flex; align-items: center; gap: 6px; margin: 18px 0 0; font-size: 14px; color: var(--taupe); }
.hero-loc svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Open case on smaller windows: short image banner on top, text visible straight away ===== */
@media (max-width: 1200px) {
  .case-card.open { flex-direction: column; }
  .case-card.open .case-img { flex: none; aspect-ratio: auto; min-height: 0; height: 220px; }
  .case-card.open .case-img img { width: 100%; height: 100%; object-fit: cover; }
  .case-card.open .case-more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-card.open .case-body { padding: 28px 32px; }
}
@media (max-width: 760px) {
  .case-card.open .case-img { height: 160px; }
  .case-card.open .case-more { grid-template-columns: 1fr; }
  .case-card.open .case-body { padding: 22px 20px; }
  .case-card.open .case-body h3 { font-size: 24px; }
}

/* ===== Experience note (career break) ===== */
.exp-note { margin: 32px 0 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: rgba(255, 255, 255, .55); border-radius: 0 6px 6px 0; font-size: 15px; font-style: italic; color: var(--body); }

/* ===== Mobile hero: photo above the text ===== */
@media (max-width: 760px) {
  .hero-portrait { order: -1; width: 150px; justify-self: center; border-width: 4px; }
  .hero-grid { gap: 28px; }
}

/* ===== Open case: more space between KPI chips ===== */
.case-card.open .case-kpis { display: grid; grid-template-columns: minmax(max-content, calc((100% - 64px) / 3)) auto; justify-content: start; justify-items: start; gap: 12px 32px; }
@media (max-width: 760px) { .case-card.open .case-kpis { display: flex; gap: 12px 16px; } }

/* ===== Very small phones: let long KPI chips wrap inside the card ===== */
@media (max-width: 420px) { .kpi-chip { white-space: normal; } }

/* ===== Smaller windows: headline may wrap; cases use one full width column on phones ===== */
@media (max-width: 960px) { .hero h1 { white-space: normal; } }
@media (max-width: 760px) { .case-grid { grid-template-columns: 1fr; } }
@media (min-width: 761px) and (max-width: 960px) { .nav { gap: 18px; font-size: 14px; } .nav a, .brand-name { white-space: nowrap; } }
