@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --bg: #FAFAF9;
  --bg-sunk: #F4F2EE;
  --fg: #111111;
  --fg-soft: #1d1d1d;
  --muted: #6b6b6b;
  --muted-2: #9a9893;
  --line: #E7E5E1;
  --line-strong: #D6D3CE;
  --accent: #1d4ed8;
  --max-width: 1240px;
  --prose-width: 680px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--accent); color: #fff; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.15s ease;
}
a:hover { opacity: 0.65; }

a.plain {
  color: var(--fg);
  border-bottom: none;
}
a.plain:hover { opacity: 0.55; }

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

/* ---- container ---- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.wrap-wide {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 32px;
}

.prose {
  max-width: var(--prose-width);
}
.prose p {
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 1.3em;
  color: var(--fg-soft);
  text-wrap: pretty;
}
.prose p:last-child { margin-bottom: 0; }
.prose p .em { font-style: italic; color: var(--fg); }

.mono {
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

.label {
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
}

.section-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-label::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

/* ---- header ---- */
header.site {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 50;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--fg);
  border-bottom: none;
}
.brand-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--fg);
  transform: translateY(0px);
  border-radius: 1px;
}
.brand-tag {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

nav.primary ul {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}
nav.primary a {
  font-size: 14px;
  color: var(--fg);
  border-bottom: none;
  position: relative;
  padding-bottom: 2px;
}
nav.primary a[aria-current="page"] { color: var(--fg); }
nav.primary a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--fg);
}
nav.primary a.email {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 0;
}

/* ---- language selector ---- */
.lang {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  margin: 0 -4px;
  height: 24px;
}
.lang button {
  background: none;
  border: none;
  padding: 4px 4px 5px;
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  cursor: pointer;
  text-transform: uppercase;
  position: relative;
  line-height: 1;
  transition: color 0.15s ease;
}
.lang button:hover { color: var(--fg); }
.lang button[aria-pressed="true"] { color: var(--fg); }
.lang button[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -1px;
  height: 1px;
  background: var(--fg);
}
.lang-li { display: flex; }

/* ---- hero ---- */
.hero {
  padding: 144px 0 120px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.hero .eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero .eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.hero h1 {
  font-size: clamp(40px, 5.4vw, 76px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.04;
  max-width: 19ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
}
.hero .lede {
  margin-top: 36px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
}
.hero .cta {
  margin-top: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 18px;
}
.hero .cta .arrow {
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.2s ease;
}
.hero .cta a:hover .arrow { transform: translateX(4px); }
.hero .cta .secondary {
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  font-size: 15px;
}

/* ---- trust strip ---- */
.trust {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.trust .wrap {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.trust .label {
  white-space: nowrap;
}
.trust-logos {
  display: flex;
  align-items: center;
  gap: 48px;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.trust-logo {
  font-size: 17px;
  color: var(--fg);
  opacity: 0.55;
  font-weight: 500;
  letter-spacing: -0.012em;
  transition: opacity 0.2s ease;
}
.trust-logo .glyph {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--fg);
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  opacity: 0.7;
}
.trust-logo.box .glyph { border-radius: 1px; }
.trust-logo.diamond .glyph { transform: rotate(45deg); border-radius: 0; }
.trust-logo.bar .glyph { width: 14px; height: 4px; border-radius: 0; }
.trust-logo:hover { opacity: 0.85; }

/* ---- selected work ---- */
section.work {
  padding: 112px 0 32px;
  border-bottom: 1px solid var(--line);
}
.work-list { display: flex; flex-direction: column; }

.work-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.work-row:last-child { border-bottom: 1px solid var(--line); }
.work-row.reverse .work-thumb { order: 2; }
.work-row.reverse .work-meta { order: 1; }

.work-thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-sunk);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.work-thumb .ph-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 18px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.work-thumb svg.stripes {
  width: 100%;
  height: 100%;
}

.work-meta .row-index {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.work-meta .row-index .yr { color: var(--muted-2); }
.work-meta h3 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.15;
  margin-bottom: 18px;
  text-wrap: balance;
}
.work-meta h3 a {
  color: var(--fg);
  border-bottom: none;
}
.work-meta h3 a:hover {
  opacity: 1;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
}
.work-meta .one-line {
  color: var(--fg-soft);
  font-size: 17px;
  line-height: 1.55;
  margin-bottom: 28px;
  max-width: 46ch;
  text-wrap: pretty;
}
.work-meta .one-line .arrow {
  color: var(--muted-2);
  margin: 0 8px;
}
.work-meta .stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.tag {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
}
.work-meta .read-more {
  font-size: 14px;
  color: var(--fg);
  border-bottom: 1px solid var(--line-strong);
}
.work-meta .read-more:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* ---- prose section ---- */
section.prose-section {
  padding: 128px 0;
  border-bottom: 1px solid var(--line);
}
section.prose-section h2 {
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 48px;
  max-width: 16ch;
  text-wrap: balance;
}

/* ---- footer ---- */
footer.site {
  padding: 112px 0 40px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  margin-bottom: 96px;
}
.footer-big {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  max-width: 18ch;
  text-wrap: balance;
}
.footer-big a { color: var(--accent); border-bottom: 1px solid currentColor; }
.footer-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 12px;
}
.footer-side .label { margin-bottom: 4px; }
.footer-side p {
  font-size: 15px;
  color: var(--fg-soft);
  line-height: 1.55;
  max-width: 36ch;
}
.footer-side .small-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.footer-side .small-links a {
  color: var(--fg);
  border-bottom: none;
  font-size: 14px;
}
.footer-side .small-links a:hover { color: var(--accent); }

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-meta a { color: var(--muted); border-bottom: none; }
.footer-meta a:hover { color: var(--fg); }
.footer-meta .meta-right { display: flex; gap: 28px; }

/* ---- page header (non-home) ---- */
.page-head {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--line);
}
.page-head .eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 28px;
}
.page-head h1 {
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 400;
  letter-spacing: -0.028em;
  line-height: 1.05;
  max-width: 18ch;
  text-wrap: balance;
  margin-bottom: 28px;
}
.page-head .lede {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 58ch;
}

/* ---- case study detail ---- */
.cs-meta {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.cs-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.cs-meta-grid .item .k {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}
.cs-meta-grid .item .v {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--fg);
}

.cs-hero {
  padding: 64px 0 24px;
}
.cs-hero-shot {
  aspect-ratio: 16 / 9;
  background: var(--bg-sunk);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.cs-hero-caption {
  margin-top: 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.cs-section {
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}
.cs-section h2 {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.022em;
  margin-bottom: 32px;
  text-wrap: balance;
}
.cs-section h2 .num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  vertical-align: super;
  margin-right: 16px;
}

.diagram {
  background: var(--bg-sunk);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 48px;
  margin: 16px 0 32px;
}
.diagram-caption {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 32px;
}

.code-block {
  background: #f6f4ef;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 24px 28px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg);
  overflow-x: auto;
  margin: 16px 0 12px;
}
.code-block .c { color: var(--muted); }
.code-block .k { color: var(--accent); }

.showcase {
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.showcase-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-sunk);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  overflow: hidden;
}
.showcase-shot.tall { aspect-ratio: 16 / 11; }
.showcase-caption {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.55;
}
.showcase-caption .label-inline {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg);
  margin-right: 10px;
}

/* ---- outcome metrics ---- */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  overflow: hidden;
}
.metric {
  background: var(--bg);
  padding: 40px 32px 36px;
}
.metric .v {
  font-size: 52px;
  font-weight: 400;
  letter-spacing: -0.028em;
  line-height: 1.05;
  color: var(--fg);
  margin-bottom: 12px;
  font-feature-settings: "tnum";
}
.metric .v .unit {
  font-size: 22px;
  color: var(--muted);
  margin-left: 2px;
  letter-spacing: -0.01em;
}
.metric .v .arrow {
  color: var(--accent);
  font-size: 22px;
  margin: 0 6px;
}
.metric .k {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.metric .ctx {
  font-size: 14px;
  color: var(--fg-soft);
  line-height: 1.45;
  max-width: 32ch;
}

/* ---- about / team ---- */
.team-list {
  border-top: 1px solid var(--line);
}
.team-member {
  display: grid;
  grid-template-columns: 80px 1.4fr 2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.team-member .pf {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-sunk);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  position: relative;
}
.team-member .pf svg { width: 100%; height: 100%; }
.team-member .nm {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--fg);
}
.team-member .nm .role {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}
.team-member .bio {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-soft);
  text-wrap: pretty;
}
.team-member .since {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: right;
}

/* about narrative */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: start;
}
.about-grid h2 {
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

.studio-shot {
  aspect-ratio: 4 / 5;
  background: var(--bg-sunk);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

/* ---- services ---- */
.svc-section {
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}
.svc-section:last-of-type { border-bottom: 1px solid var(--line); }
.svc-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 80px;
}
.svc-grid .svc-title h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--fg);
  position: sticky;
  top: 96px;
}
.svc-grid .svc-title .num {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  margin-bottom: 14px;
  display: block;
}
.svc-body h3 {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 32px 0 14px;
}
.svc-body h3:first-child { margin-top: 0; }
.svc-body p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-soft);
  max-width: 60ch;
  margin-bottom: 1em;
  text-wrap: pretty;
}
.svc-body .ex {
  margin-top: 16px;
  font-size: 14px;
  font-family: 'Geist Mono', monospace;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.svc-body .ex a {
  color: var(--fg);
  border-bottom: 1px solid var(--line-strong);
}
.svc-body .ex a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- case study index list ---- */
.cs-index {
  border-top: 1px solid var(--line);
}
.cs-index-row {
  display: grid;
  grid-template-columns: 48px 2fr 3fr 1fr 24px;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  border-top: none;
}
a.cs-index-row { border-bottom: 1px solid var(--line); }
a.cs-index-row:hover { background: var(--bg-sunk); opacity: 1; }
a.cs-index-row:hover .arrow { transform: translateX(4px); color: var(--accent); }
.cs-index-row .n {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}
.cs-index-row .ti {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.2;
}
.cs-index-row .ti .sub {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
}
.cs-index-row .desc {
  color: var(--fg-soft);
  font-size: 15.5px;
  line-height: 1.5;
  max-width: 52ch;
  text-wrap: pretty;
}
.cs-index-row .yr {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-align: right;
}
.cs-index-row .arrow {
  font-family: 'Geist Mono', monospace;
  color: var(--muted-2);
  font-size: 16px;
  transition: transform 0.2s ease, color 0.2s ease;
  text-align: right;
}

/* ---- reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.1, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.1, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- utility / page-specific classes ---- */
.section-pad-lg { padding: 112px 0; }
.team-section {
  padding: 64px 0 112px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-period { margin: 28px 0 16px; }

.earlier-work {
  margin-top: 80px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.earlier-work p {
  max-width: 56ch;
  color: var(--fg-soft);
  font-size: 15px;
  line-height: 1.55;
}
.earlier-cta { align-self: end; }

.svc-stack { font-size: 14px; color: var(--muted); }

.cs-arch-intro { margin-bottom: 56px; }
.cs-code-cap { margin-top: 12px; }
.cs-showcase-h2 {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.022em;
  margin-bottom: 56px;
}
.metrics { margin-bottom: 48px; }
.cs-next { padding: 96px 0 32px; }
.cs-next-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 24px;
}
.cs-next-label { margin-bottom: 12px; }
.cs-next-link {
  font-size: 22px;
  color: var(--fg);
  border-bottom: none;
  font-weight: 500;
  letter-spacing: -0.018em;
}
.cs-next-link:hover { color: var(--accent); }

/* ---- mobile nav toggle ---- */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  z-index: 60;
}
.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--fg);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* prevent horizontal overflow at all sizes */
html, body { overflow-x: hidden; }
img, svg, video { max-width: 100%; height: auto; }

/* ---- responsive: tablet (<= 1024px) ---- */
@media (max-width: 1024px) {
  .wrap { padding: 0 28px; }
  .wrap-wide { padding: 0 28px; }
  nav.primary ul { gap: 20px; }
  .about-grid { gap: 56px; }
  .svc-grid { grid-template-columns: 160px 1fr; gap: 48px; }
  .work-row { gap: 48px; }
  .footer-grid { gap: 48px; }
  .hero { padding: 112px 0 96px; }
  .hero h1 { max-width: 22ch; }
  section.work { padding: 88px 0 24px; }
  section.prose-section { padding: 96px 0; }
  footer.site { padding: 88px 0 32px; }
  .cs-meta-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

/* ---- responsive: mobile (<= 768px) ---- */
@media (max-width: 768px) {
  .wrap, .wrap-wide { padding: 0 20px; }

  header.site { padding: 14px 0; }
  header.site .wrap { flex-wrap: wrap; gap: 12px; }
  .brand-tag { display: none; }
  .nav-toggle { display: flex; }
  nav.primary {
    width: 100%;
    display: none;
    border-top: 1px solid var(--line);
    margin-top: 12px;
    padding-top: 12px;
  }
  nav.primary.open { display: block; }
  nav.primary ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  nav.primary li { width: 100%; }
  nav.primary a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  nav.primary a[aria-current="page"]::after { display: none; }
  nav.primary a.email {
    padding-top: 16px;
    border-bottom: none;
    color: var(--accent);
    font-size: 16px;
  }
  nav.primary .lang-li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    justify-content: flex-start;
  }
  nav.primary .lang {
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    padding: 6px 10px;
    height: auto;
    margin: 0;
  }
  nav.primary .lang button { font-size: 11px; padding: 4px 6px; }
  body.nav-open { overflow: hidden; }

  .hero { padding: 72px 0 64px; }
  .hero h1 { letter-spacing: -0.025em; max-width: 100%; }
  .hero .lede { font-size: 18px; margin-top: 28px; }
  .hero .cta { margin-top: 40px; flex-wrap: wrap; gap: 20px; font-size: 16px; }

  .page-head { padding: 56px 0 44px; }
  .page-head h1 { font-size: clamp(34px, 8vw, 52px); }
  .page-head .lede { font-size: 17px; }

  .trust { padding: 24px 0; }
  .trust .wrap { gap: 20px; }
  .trust-logos { gap: 20px 32px; justify-content: flex-start; }
  .trust-logo { font-size: 15px; }

  section.work { padding: 64px 0 16px; }
  .work-row {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 0;
  }
  .work-row.reverse .work-thumb { order: 0; }
  .work-row.reverse .work-meta { order: 0; }
  .work-meta h3 { font-size: 24px; }
  .work-meta .one-line { font-size: 16px; }

  section.prose-section { padding: 72px 0; }
  .prose p { font-size: 16.5px; }

  footer.site { padding: 72px 0 28px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 56px;
  }
  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-meta .meta-right {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }

  .cs-meta { padding: 22px 0; }
  .cs-meta-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .cs-section { padding: 64px 0; }
  .cs-section h2 { font-size: 26px; margin-bottom: 24px; }
  .cs-section h2 .num { display: block; margin: 0 0 8px; vertical-align: baseline; }
  .metrics { grid-template-columns: 1fr; }
  .metric { padding: 28px 24px; }
  .metric .v { font-size: 42px; }
  .code-block { font-size: 12px; padding: 18px 20px; }
  .diagram { padding: 24px; }
  .cs-next { padding: 64px 0 16px; }
  .cs-next-link { font-size: 18px; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .team-section { padding: 48px 0 80px; }
  .team-member {
    grid-template-columns: 56px 1fr;
    gap: 16px 18px;
    padding: 24px 0;
  }
  .team-member .pf { width: 56px; height: 56px; }
  .team-member .nm { font-size: 17px; }
  .team-member .bio { grid-column: 1 / -1; font-size: 14.5px; }
  .team-member .since {
    grid-column: 1 / -1;
    text-align: left;
    font-size: 10.5px;
  }
  .section-pad-lg { padding: 72px 0; }

  .svc-section { padding: 64px 0; }
  .svc-grid { grid-template-columns: 1fr; gap: 24px; }
  .svc-grid .svc-title h2 { position: static; font-size: 24px; }
  .svc-body p { font-size: 16px; }

  .cs-index-row {
    grid-template-columns: 36px 1fr 20px;
    gap: 14px;
    padding: 24px 0;
  }
  .cs-index-row .desc, .cs-index-row .yr { display: none; }
  .cs-index-row .ti { font-size: 18px; }

  .earlier-work {
    margin-top: 48px;
    flex-direction: column;
    gap: 16px;
  }
  .earlier-cta { align-self: flex-start; }

  .section-label { margin-bottom: 40px; }
}

/* ---- responsive: small mobile (<= 480px) ---- */
@media (max-width: 480px) {
  .wrap, .wrap-wide { padding: 0 16px; }
  header.site .wrap { gap: 8px; }
  .brand { font-size: 14px; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero .lede { font-size: 16.5px; }
  .hero .cta { font-size: 15px; gap: 14px; }
  .hero .cta .secondary { font-size: 14px; }
  .page-head h1 { font-size: clamp(28px, 9vw, 40px); }
  .work-meta h3 { font-size: 22px; }
  .work-meta .one-line { font-size: 15px; }
  .work-row { padding: 36px 0; gap: 22px; }
  .footer-big { font-size: clamp(26px, 7vw, 36px) !important; }
  .cs-meta-grid { grid-template-columns: 1fr; gap: 16px; }
  .metric .v { font-size: 36px; }
  .metric .v .unit { font-size: 18px; }
  .metric .v .arrow { font-size: 18px; }
  .code-block { font-size: 11.5px; padding: 14px 14px; }
  .diagram { padding: 16px; }
  .cs-section { padding: 56px 0; }
  .cs-section h2 { font-size: 22px; }
  .cs-showcase-h2 { font-size: 22px; margin-bottom: 36px; }
  .showcase { gap: 40px; }
  .team-member {
    grid-template-columns: 48px 1fr;
    gap: 12px 14px;
  }
  .team-member .pf { width: 48px; height: 48px; }
  .tweaks-panel { right: 12px; left: 12px; bottom: 12px; }
  .tag { font-size: 10px; padding: 3px 7px; }
}
