:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #15171b;
  --ink-2: #454a52;
  --ink-3: #6b717a;
  --line: #dedad1;
  --accent: #0a6b5c;
  --accent-soft: #e2efe9;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
  --read: 680px;
  --pad: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.read { max-width: var(--read); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--serif); font-size: 20px; text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { display: block; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
}

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(40px, 6.4vw, 76px); }
h2 { font-size: clamp(30px, 3.8vw, 44px); }
h3 { font-size: clamp(22px, 2.2vw, 27px); line-height: 1.25; }
p { margin: 0 0 1em; }
.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 18px; }
.lede { font-size: clamp(19px, 1.9vw, 22px); line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--ink-3); }

section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.rule { border-top: 1px solid var(--line); }

/* Hero */
.hero { padding-top: clamp(56px, 10vw, 128px); padding-bottom: clamp(56px, 8vw, 96px); }
.hero h1 { max-width: 17ch; }
.hero .lede { max-width: 40ch; margin-top: 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 36px; font-size: 15px; color: var(--ink-3); }
.hero-meta span::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; margin-right: 10px; vertical-align: 2px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; text-decoration: none;
  padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 500;
  transition: background .15s;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 28px 24px 28px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat b { white-space: nowrap; display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 48px); line-height: 1; letter-spacing: -.02em; }
.stat span { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) { .stat b { font-size: 28px; } .stat { padding-right: 14px; } .stat + .stat { padding-left: 14px; } .stat:nth-child(3) { padding-left: 0; } }

/* Work cards */
.work-list { display: grid; gap: clamp(56px, 7vw, 88px); }
.work-card { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; text-decoration: none; }
.work-card:nth-child(even) { grid-template-columns: 1fr 1.35fr; }
.work-card:nth-child(even) .work-media { order: 2; }
.work-card:hover { color: inherit; }
.work-media { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10.5; }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .5s ease; }
.work-card:hover .work-media img { transform: scale(1.025); }
.work-card h3 { margin-bottom: 14px; }
.work-card p { color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; padding: 0; list-style: none; }
.tags li { font-size: 13px; padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.more { font-weight: 500; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.more::after { content: "→"; transition: transform .2s; }
.work-card:hover .more::after { transform: translateX(4px); }
@media (max-width: 820px) {
  .work-card, .work-card:nth-child(even) { grid-template-columns: 1fr; }
  .work-card:nth-child(even) .work-media { order: 0; }
}

/* Approach */
.approach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.approach > div { padding: 32px 32px 8px 0; }
.approach > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.approach h3 { font-size: 22px; margin-bottom: 12px; }
.approach p { color: var(--ink-2); font-size: 16px; }
.num { font-family: var(--serif); color: var(--accent); font-size: 15px; display: block; margin-bottom: 16px; }
@media (max-width: 820px) {
  .approach { grid-template-columns: 1fr; }
  .approach > div, .approach > div + div { padding: 28px 0 8px; border-left: 0; }
  .approach > div + div { border-top: 1px solid var(--line); }
}

.split { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(32px, 6vw, 96px); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Experience */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { font-size: 14px; color: var(--ink-3); padding-top: 3px; }
.timeline h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.timeline .org { color: var(--ink-3); font-weight: 400; }
.timeline p { margin: 6px 0 0; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 56px; }
.creds h3 { font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); margin-bottom: 14px; }
.creds ul { list-style: none; padding: 0; margin: 0; }
.creds li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15.5px; }
.creds li span { color: var(--ink-3); }
@media (max-width: 600px) { .creds { grid-template-columns: 1fr; } }

/* Contact */
.contact { background: var(--ink); color: #f1efe9; }
.contact h2 { max-width: 18ch; }
.contact .lede { color: #b9bcc2; max-width: 46ch; margin-top: 20px; }
.contact .btn { background: #f1efe9; color: var(--ink); }
.contact .btn:hover { background: #fff; color: var(--accent); }
.contact .btn.ghost { background: transparent; color: #f1efe9; box-shadow: inset 0 0 0 1px #4a4e56; }
.contact .btn.ghost:hover { box-shadow: inset 0 0 0 1px #f1efe9; color: #fff; }
.email-big { display: inline-block; font-family: var(--serif); font-size: clamp(24px, 3.6vw, 40px); margin-top: 40px; text-decoration: none; border-bottom: 1px solid #4a4e56; padding-bottom: 4px; word-break: break-all; }
.email-big:hover { color: #fff; border-bottom-color: #f1efe9; }

.site-footer { background: var(--ink); color: #8d929a; font-size: 14px; border-top: 1px solid #2a2d33; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; }
.site-footer a { color: #c7cad0; text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* Case study */
.cs-hero { padding-top: clamp(48px, 8vw, 104px); padding-bottom: 40px; }
.back { display: inline-flex; gap: 8px; font-size: 15px; text-decoration: none; color: var(--ink-3); margin-bottom: 40px; }
.back::before { content: "←"; }
.cs-hero h1 { font-size: clamp(40px, 6vw, 68px); max-width: 16ch; }
.cs-hero .lede { margin-top: 24px; max-width: 46ch; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 15.5px; line-height: 1.45; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }

.cs-section { padding: clamp(48px, 7vw, 88px) 0; }
.cs-section + .cs-section { border-top: 1px solid var(--line); }
.cs-text { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 5vw, 72px); }
.cs-text h2 { font-size: clamp(26px, 3vw, 36px); }
.cs-text .body p { color: var(--ink-2); font-size: 18px; }
@media (max-width: 820px) { .cs-text { grid-template-columns: 1fr; gap: 16px; } }

.figs { display: grid; gap: 20px; margin-top: 48px; }
.figs.two { grid-template-columns: 1fr 1fr; }
.figs.three { grid-template-columns: repeat(3, 1fr); }
.figs.feature { grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 760px) { .figs.two, .figs.three, .figs.feature { grid-template-columns: 1fr; } }
figure { margin: 0; }
figure .frame { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
figure .frame.pad { padding: clamp(12px, 2vw, 24px); }
figure .frame.dark { background: #15171b; border-color: #15171b; }
figcaption { font-size: 13.5px; color: var(--ink-3); margin-top: 10px; line-height: 1.45; }
.stack { display: grid; gap: 20px; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.quotes blockquote { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; font-family: var(--serif); font-size: 19px; line-height: 1.45; }
.quotes blockquote::before { content: "“"; display: block; font-size: 48px; line-height: .6; color: var(--accent); margin-bottom: 8px; }
.quotes cite { display: block; margin-top: 16px; font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--ink-3); }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }

.result-band { background: var(--accent); color: #fff; border-radius: 16px; padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.result-band b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1; }
.result-band span { display: block; margin-top: 10px; font-size: 14.5px; opacity: .9; line-height: 1.45; }
@media (max-width: 760px) { .result-band { grid-template-columns: 1fr; } }

.next { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 40px 0; border-top: 1px solid var(--line); text-decoration: none; }
.next .label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.next h3 { margin-top: 6px; }
.next .arrow { font-size: 32px; transition: transform .2s; }
.next:hover .arrow { transform: translateX(6px); }
.next:hover { color: var(--ink); }
.next:hover h3 { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
