@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/geist-e09adc.woff2) format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: oklch(0.985 0.003 85);
  --bg-2: oklch(0.955 0.004 85);
  --ink: oklch(0.21 0.008 265);
  --mute: oklch(0.46 0.008 265);
  --line: oklch(0.88 0.004 85);
  --accent: oklch(0.56 0.19 33);
  --sig-rest: oklch(0.21 0.008 265 / 0.16);
  --gut: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --r: 10px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --z-head: 10;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: oklch(0.165 0.006 265);
    --bg-2: oklch(0.205 0.006 265);
    --ink: oklch(0.95 0.004 85);
    --mute: oklch(0.71 0.006 265);
    --line: oklch(0.3 0.006 265);
    --accent: oklch(0.74 0.16 45);
    --sig-rest: oklch(0.95 0.004 85 / 0.18);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: oklch(0.165 0.006 265);
  --bg-2: oklch(0.205 0.006 265);
  --ink: oklch(0.95 0.004 85);
  --mute: oklch(0.71 0.006 265);
  --line: oklch(0.3 0.006 265);
  --accent: oklch(0.74 0.16 45);
  --sig-rest: oklch(0.95 0.004 85 / 0.18);
}
:root[data-theme='light'] { color-scheme: light; }

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gut); top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; z-index: 20; text-decoration: none; }
.skip:focus { top: 10px; }

/* Header */
.head { position: sticky; top: 0; z-index: var(--z-head); background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.sig { display: block; padding: 4px 2px; margin-left: -2px; -webkit-tap-highlight-color: transparent; }
.sig svg { display: block; height: 42px; width: auto; overflow: visible; }
.sig .rest { fill: var(--sig-rest); }
.sig .gold { fill: var(--ink); transition: fill 0.4s var(--ease); }
.sig .pen path { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.sig.on .pen path { animation-name: sig-write; animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1); animation-fill-mode: both; }
@keyframes sig-write { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (hover: hover) and (pointer: fine) { .sig:hover .gold { fill: var(--accent); } }

.nav { display: flex; align-items: center; gap: clamp(2px, 1.6vw, 20px); font-size: 0.9375rem; }
.nav a, .theme { color: var(--mute); text-decoration: none; padding: 12px 8px; min-height: 44px; display: inline-flex; align-items: center; transition: color 0.2s var(--ease); }
.theme { font: inherit; background: none; border: 0; cursor: pointer; }
.nav a[aria-current='page'] { color: var(--ink); }
.tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-2); outline: 1px solid var(--line); outline-offset: -1px; }
.tabs a { min-height: 38px; padding: 0 16px; border-radius: 999px; position: relative; }
.tabs a::after { content: ''; position: absolute; inset: -4px 0; }
.tabs a[aria-current='page'] { background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1px var(--line); view-transition-name: tab; }
.tabs .short { display: none; }
.sec-p.side { margin-top: 0; }
.teaser { margin-top: clamp(40px, 6vw, 72px); }
.band.contact { padding-block: clamp(72px, 11vw, 144px); }
@media (hover: hover) and (pointer: fine) { .nav a:hover, .theme:hover { color: var(--ink); } }
.theme::before { content: ''; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); margin-right: 7px; }

/* Links and buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-weight: 500; font-size: 1rem; text-decoration: none; white-space: nowrap; transition: transform 0.16s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
  .btn.ghost:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
}
.link { text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 5px; transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease); }
.link::after { content: ' \2197'; font-size: 0.85em; color: var(--mute); }
.link.in::after { content: ' \2192'; }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: var(--accent); } }

/* Hero */
.hero { padding-block: clamp(56px, 10vh, 104px) clamp(48px, 8vh, 88px); }
.hero h1 { font-size: clamp(2.375rem, 6.4vw, 5.25rem); line-height: 1.04; letter-spacing: -0.035em; max-width: 15em; }
.hero p { margin-top: clamp(20px, 3vh, 32px); max-width: 34em; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.5; color: var(--mute); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4vh, 40px); }

/* Sections */
.sec { padding-block: clamp(72px, 11vw, 144px); }
.sec-h { font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.028em; max-width: 18em; }
.sec-p { margin-top: 18px; max-width: 36em; color: var(--mute); font-size: 1.125rem; }

/* Work */
.work { padding-bottom: clamp(72px, 11vw, 144px); }
.work-head { margin-bottom: clamp(40px, 6vw, 72px); }
.eng { padding-top: clamp(24px, 4vw, 56px); }
.skills { margin-top: 32px; max-width: 30em; }
.skills > div { padding-block: 14px; border-top: 1px solid var(--line); }
.skills dt { font-weight: 500; }
.skills dd { margin-top: 2px; color: var(--mute); font-size: 0.9375rem; }
.proj + .proj { margin-top: clamp(88px, 13vw, 176px); }
.shot { border-radius: var(--r); overflow: hidden; background: var(--bg-2); outline: 1px solid var(--line); outline-offset: -1px; }
.shot img { width: 100%; }
.phone { border-radius: 22px; }

.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.2888fr); gap: clamp(10px, 2vw, 24px); align-items: stretch; text-decoration: none; }
.pair.flip { grid-template-columns: minmax(0, 0.2888fr) minmax(0, 1fr); }
.pair .shot img { height: 100%; object-fit: cover; object-position: top; }
@media (hover: hover) and (pointer: fine) {
  a.pair .shot img { transition: transform 0.9s var(--ease); }
  a.pair:hover .shot img { transform: scale(1.012); }
}

.meta { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px clamp(24px, 5vw, 80px); margin-top: clamp(28px, 4vw, 48px); align-items: start; }
.meta h3 { font-size: clamp(1.625rem, 3vw, 2.375rem); line-height: 1.1; letter-spacing: -0.028em; }
.meta .where { margin-top: 8px; color: var(--mute); }
.meta .say { font-size: 1.125rem; max-width: 34em; }
.facts { margin-top: 18px; color: var(--mute); max-width: 34em; }
.links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 24px; }

/* What you get */
.band { background: var(--bg-2); }
.gets { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 80px); }
.gets > div { padding-block: 26px; border-top: 1px solid var(--line); }
.gets dt { font-weight: 500; font-size: 1.1875rem; letter-spacing: -0.01em; }
.gets dd { margin-top: 8px; color: var(--mute); max-width: 30em; }

/* Engineering */
.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(24px, 5vw, 80px); align-items: start; }
.rows > li { padding-block: 22px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: baseline; }
.rows > li:first-child { border-top: 0; padding-top: 4px; }
.rows h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
.rows .tech { color: var(--mute); font-size: 0.9375rem; text-align: right; }
.rows p { grid-column: 1 / -1; color: var(--mute); max-width: 36em; }

/* About */
.about p { font-size: clamp(1.1875rem, 2vw, 1.5rem); line-height: 1.45; letter-spacing: -0.012em; max-width: 30em; }
.about p + p { margin-top: 1em; color: var(--mute); }

/* Contact */
.contact h2 { font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: 1.04; letter-spacing: -0.035em; max-width: 13em; }
.contact .sec-p { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); }
.ways { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; color: var(--mute); }
.ways a { color: var(--ink); }

.foot { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--mute); font-size: 0.9375rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Case study */
.case-head { padding-block: clamp(48px, 8vh, 88px) clamp(36px, 5vw, 56px); }
.case-head h1 { font-size: clamp(2.125rem, 5.2vw, 4rem); line-height: 1.06; letter-spacing: -0.032em; max-width: 17em; }
.case-head .lead { margin-top: 24px; max-width: 38em; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--mute); }
.spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; margin-top: clamp(32px, 5vw, 56px); }
.spec > div { border-top: 1px solid var(--line); padding-top: 14px; }
.spec dt { color: var(--mute); font-size: 0.9375rem; }
.spec dd { margin-top: 2px; }
.csec { padding-block: clamp(56px, 8vw, 104px); }
.ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(24px, 5vw, 80px); margin-top: clamp(32px, 4vw, 48px); }
.ba h3 { font-size: 1.25rem; letter-spacing: -0.012em; padding-bottom: 14px; }
.ba h3 span { color: var(--mute); }
.ba li { padding-block: 13px; border-top: 1px solid var(--line); color: var(--mute); }
.ba .after li { color: var(--ink); }
.nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: clamp(32px, 4vw, 48px); }
.nums dt { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -0.035em; font-weight: 500; font-variant-numeric: tabular-nums; }
.nums dd { margin-top: 12px; color: var(--mute); font-size: 0.9375rem; max-width: 18em; }
.note { margin-top: 28px; color: var(--mute); font-size: 0.9375rem; max-width: 46em; }
.phones { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); margin-top: clamp(32px, 4vw, 48px); }
.phones figcaption, .split figcaption { margin-top: 12px; color: var(--mute); font-size: 0.9375rem; line-height: 1.45; }
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px clamp(24px, 6vw, 96px); margin-top: clamp(32px, 4vw, 48px); align-items: start; }
.how > li { padding-block: 20px; border-top: 1px solid var(--line); }
.how > li:first-child { border-top: 0; padding-top: 0; }
.how h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
.how p { margin-top: 6px; color: var(--mute); max-width: 36em; }
.stack { margin-top: 28px; color: var(--mute); font-size: 0.9375rem; }

/* Entrance: content is visible by default; script opts in */
.js .rv { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .meta, .cols, .split, .ba { grid-template-columns: minmax(0, 1fr); }
  .gets { grid-template-columns: minmax(0, 1fr); }
  .spec, .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .phones { grid-template-columns: repeat(5, 62%); overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scroll-padding-inline: var(--gut); padding-bottom: 8px; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phones figure { scroll-snap-align: start; }
  .split figure { max-width: 300px; }
  .phone { border-radius: 16px; }
  .rows > li { grid-template-columns: minmax(0, 1fr); }
  .rows .tech { text-align: left; grid-row: 3; }
}
@media (max-width: 520px) {
  .head .wrap { height: 64px; }
  .sig svg { height: 38px; }
  .nav { font-size: 0.875rem; gap: 2px; }
  .nav-c { display: none !important; }
  .tabs a { padding-inline: 11px; }
  .tabs .long { display: none; }
  .tabs .short { display: inline; }
  .theme span { display: none; }
  .theme::before { margin-right: 0; width: 14px; height: 14px; }
  .cta .btn { flex: 1 1 100%; }
  .pair, .pair.flip { grid-template-columns: minmax(0, 1fr); }
  .pair .phone { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sig.on .pen path { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
  @view-transition { navigation: none; }
}
