/* ---------- tokens ---------- */
:root {
  --bg: #ECEAE4;
  --bg-2: #E3E0D8;
  --ink: #17181A;
  --ink-2: #4E5155;
  --ink-3: #686A6D;
  --line: rgba(23, 24, 26, .13);
  --glass: rgba(60, 90, 120, .06);
  --beam: #2436E6;
  --panel: #2436E6;
  --on-panel: #F3F1EA;
  --live: #2F7D5B;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --geez: "Noto Serif Ethiopic", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0F11; --bg-2: #13161A; --ink: #E8E5DE; --ink-2: #A6A9AC; --ink-3: #83878B;
    --line: rgba(232, 229, 222, .11); --glass: rgba(120, 160, 200, .055); --beam: #8C97FF; --live: #7FD1A6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D0F11; --bg-2: #13161A; --ink: #E8E5DE; --ink-2: #A6A9AC; --ink-3: #83878B;
  --line: rgba(232, 229, 222, .11); --glass: rgba(120, 160, 200, .055); --beam: #8C97FF; --live: #7FD1A6;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 18px/1.55 var(--serif); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .4s var(--ease), color .4s var(--ease);
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
b { font-weight: 500; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--beam); color: var(--bg); }
:focus-visible { outline: 1.5px solid var(--beam); outline-offset: 3px; border-radius: 2px; }
[lang="ti"] { font-family: var(--geez); font-weight: 300; }
.mono { font: 400 12px/1.5 var(--mono); letter-spacing: .02em; color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--ink); color: var(--bg); padding: 8px 12px; font: 13px var(--mono); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 56px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: 16px clamp(16px, 4vw, 56px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}
.nav__name { font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.nav__name span { color: var(--ink-3); margin-left: 8px; font-size: 14px; }
.nav__links { display: flex; gap: 24px; margin-left: auto; font: 13px var(--mono); color: var(--ink-2); }
.nav__links a { position: relative; transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__meta { display: flex; align-items: center; gap: 16px; }
.theme { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.theme path { fill: currentColor; stroke: none; }
.theme:hover { border-color: var(--ink-3); }
@media (max-width: 860px) { .nav__links { display: none; } .nav__meta { margin-left: auto; } }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: max(640px, 100svh); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px); padding-top: 92px; padding-bottom: clamp(20px, 3vw, 40px);
}
/* a faint dot field behind the hero. Static by design. */
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--ink) 14%, transparent) 1px, transparent 1.4px) 0 0 / 26px 26px;
  -webkit-mask: radial-gradient(90% 80% at 60% 45%, #000 30%, transparent 100%);
  mask: radial-gradient(90% 80% at 60% 45%, #000 30%, transparent 100%);
  pointer-events: none;
}
.hero__intro { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 8px; }
.hero__status { display: inline-flex; align-items: center; gap: 10px; margin-bottom: clamp(16px, 2.4vw, 28px); color: var(--ink-2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 18%, transparent); }
.hero__title {
  font-weight: 250; font-size: clamp(72px, 11.5vw, 196px); line-height: .86; letter-spacing: -.05em;
  font-variation-settings: "opsz" 72; margin-left: -.04em;
}
.hero__role { margin-top: clamp(24px, 2.6vw, 36px); font-size: clamp(21px, 1.9vw, 27px); line-height: 1.3; letter-spacing: -.01em; }
.hero__lede { margin-top: 16px; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; color: var(--ink-2); max-width: 28em; text-wrap: pretty; }
.hero__lede b { color: var(--ink); font-weight: 400; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__panel {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 520px; padding: clamp(20px, 2.2vw, 32px); border-radius: 6px; color: var(--on-panel);
  background: radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, .14), transparent 60%), var(--panel);
}
.hero__panel-top { position: relative; display: flex; justify-content: space-between; gap: 16px; color: rgba(243, 241, 234, .85); }
.hero__glyph {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); pointer-events: none;
  font: 300 clamp(240px, 22vw, 400px)/1 var(--geez); color: var(--on-panel);
}
.hero__now { position: relative; }
.hero__now div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .22); }
.hero__now dt { color: rgba(243, 241, 234, .85); }
.hero__now dd { font-size: 16px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 112px; }
  .hero__panel { min-height: 0; }
  .hero__panel-top { flex-direction: column; gap: 2px; }
  .hero__glyph { position: relative; left: auto; top: auto; transform: none; align-self: center; font-size: 210px; line-height: 1.2; margin: 12px 0 20px; }
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 24px; border-radius: 999px;
  border: 1px solid var(--line); background: none; cursor: pointer; font: 500 13px var(--mono); letter-spacing: .02em;
  transition: border-color .25s, background .25s, color .25s, transform .25s var(--ease);
}
.btn:hover { border-color: var(--ink-3); }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:hover { background: var(--beam); border-color: var(--beam); color: var(--bg); }
.btn:active { transform: scale(.98); }
.link { display: inline-block; margin-top: 16px; font: 13px var(--mono); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .2s, color .2s; }
.link:hover { color: var(--beam); border-color: var(--beam); }

/* ---------- proof ---------- */
.proof { padding-block: clamp(56px, 8vw, 112px) clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats > div { padding: 0 28px 0 0; }
.stats > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.stats dt { font-weight: 250; font-size: clamp(52px, 6vw, 92px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: lining-nums; }
.stats small { font: 13px var(--mono); letter-spacing: 0; color: var(--ink-3); margin-left: 6px; vertical-align: .25em; }
.stats dt small:first-child { margin: 0 4px 0 0; }
.stats dd { margin-top: 16px; color: var(--ink-2); font-size: 16px; max-width: 22em; }
.clients { margin-top: clamp(48px, 6vw, 80px); color: var(--ink-2); font-size: 17px; }
.clients .mono { margin-right: 16px; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
  .stats > div, .stats > div + div { padding: 0 0 28px; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- sections ---------- */
.sec { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(24px, 4vw, 64px); padding-block: clamp(64px, 8vw, 120px) clamp(72px, 10vw, 152px); }
.sec__head { position: sticky; top: 96px; align-self: start; }
.sec__label { margin-bottom: 24px; }
/* the section rule: label on the line, hairline running to the edge */
.sec > .sec__label { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin-bottom: clamp(40px, 5vw, 72px); color: var(--ink-2); }
.sec__label span { margin-right: 12px; color: var(--beam); font-variant-numeric: tabular-nums; }
.sec > .sec__label span { margin-right: 0; }
.sec > .sec__label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.h2 { font-weight: 300; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
.sec__sub { margin-top: 24px; color: var(--ink-2); max-width: 30em; text-wrap: pretty; }
@media (max-width: 900px) {
  .sec { grid-template-columns: 1fr; }
  .sec__head { position: static; margin-bottom: 44px; }
}

/* ---------- work ---------- */
.sec--wide { grid-template-columns: 1fr; }
.sec--wide .sec__head { position: static; max-width: 780px; margin-bottom: clamp(40px, 5vw, 72px); }
.projs__label { margin-bottom: 28px; }
/* sub-section label: accent tick, name, a quiet hairline running out, then the count */
.projs__label, .tools__title { display: flex; align-items: center; gap: 12px; color: var(--ink-2); }
.projs__label::before, .tools__title::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--beam); }
.projs__label::after, .tools__title::after { content: ""; flex: 1; height: 1px; background: var(--line); order: 1; }
.projs__label span, .tools__title span { order: 2; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.projs + .projs__label, .bench + .projs__label { margin-top: clamp(64px, 8vw, 112px); }
.projs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 6vw, 88px) clamp(24px, 3vw, 40px); }
.proj__art {
  position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
  background: var(--bg-2); border-radius: 6px; transition: background .5s var(--ease);
}
.proj__art > .mono { position: absolute; top: 16px; left: 16px; }
.proj__art > .proj__s { left: auto; right: 16px; }
.proj__art .art { width: 76%; }
.proj:hover .proj__art { background: color-mix(in srgb, var(--beam) 9%, var(--bg-2)); }
.proj__s { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid currentColor; border-radius: 999px; background: var(--bg); }
.proj__s::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
/* shipped: solid dot. pre-launch: hollow dot and a dashed frame round the drawing */
.proj__s.is-live { color: var(--live); }
.proj__s.is-live::before { background: currentColor; }
.proj__s.is-soon { color: var(--beam); }
.proj__s.is-soon::before { border: 1px solid currentColor; }
.proj__art:has(.is-soon) { outline: 1px dashed var(--line); outline-offset: -1px; }
.proj__meta { margin-top: 24px; }
.proj__t { margin-top: 8px; font-weight: 300; font-size: clamp(30px, 3vw, 44px); line-height: 1.1; letter-spacing: -.02em; }
.proj__h { margin-top: 8px; font-size: 19px; line-height: 1.4; }
.proj__text { margin-top: 16px; color: var(--ink-2); font-size: 16px; max-width: 36em; }
.more { margin-top: 16px; color: var(--ink-2); font-size: 16px; }
.more summary { cursor: pointer; width: fit-content; list-style: none; color: var(--ink-2); transition: color .2s; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--beam); }
.more[open] summary::before { content: "−"; }
.more summary:hover { color: var(--ink); }
.more > :not(summary) { margin-top: 12px; }
.proj > .link { justify-self: start; width: fit-content; }
.proj__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; }
.proj__links .link { margin-top: 0; }
/* feature cards: full width, drawing beside the story */
.proj--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(24px, 4vw, 56px); align-content: start; }
.proj--feature > * { grid-column: 2; }
.proj--feature .proj__art { grid-column: 1; grid-row: 1 / span 7; aspect-ratio: 16 / 10; }
.proj--feature .proj__meta { margin-top: 0; }
.proj--feature .proj__t { font-size: clamp(40px, 4.6vw, 68px); }
.proj--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.proj--flip > * { grid-column: 1; }
.proj--flip .proj__art { grid-column: 2; }
.tags { margin-top: 16px; }
.wins { margin-top: 16px; display: grid; gap: 12px; }
.wins li { padding-left: 20px; position: relative; }
.wins li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--beam); }
.wins b { color: var(--ink); }
@media (max-width: 800px) {
  .projs { grid-template-columns: 1fr; }
  .proj--feature { display: block; }
  .proj--feature .proj__meta { margin-top: 24px; }
}

/* line art inside work rows */
.art { width: 100%; height: auto; color: var(--ink); align-self: start; }
.art * { vector-effect: non-scaling-stroke; }
.a-fill { fill: var(--glass); stroke: var(--line); }
.a-hl { stroke: var(--beam); }
.a-stroke, .a-dash, .a-cut { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.a-dash { stroke-dasharray: 3 6; opacity: .5; }
.a-cut { stroke: var(--bg); opacity: 1; stroke-width: 2; }
.a-solid, .a-accent { fill: var(--beam); }
.a-accent { fill: none; stroke: var(--beam); stroke-width: 1.4; }
.a-ink { fill: currentColor; opacity: .75; }
.a-bg { fill: var(--bg); }
.a-bar { fill: var(--line); }
.a-label { font: 12px var(--mono); fill: var(--ink-2); }
.a-big { font: 300 26px var(--serif); fill: var(--ink); }
.a-typing circle { fill: var(--ink-3); }
.a-route { fill: none; stroke: var(--beam); stroke-width: 1.6; }
.a-grid circle { fill: var(--ink-3); opacity: .35; }

/* ---------- expertise ---------- */
.areas article { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 32px; padding: 28px 0 32px; border-bottom: 1px solid var(--line); }
.areas article:first-child { padding-top: 0; }
.areas h3 { grid-row: span 2; font-weight: 400; font-size: 25px; letter-spacing: -.01em; }
.areas h3 .mono { display: block; margin-bottom: 8px; color: var(--beam); }
.areas p:not(.mono) { color: var(--ink-2); font-size: 16px; }
.areas .mono { margin-top: 12px; }
@media (max-width: 640px) { .areas article { display: block; } .areas h3 { margin-bottom: 8px; } }

/* ---------- currently building ---------- */
.bench li { border-bottom: 1px solid var(--line); }
.bench summary { display: grid; grid-template-columns: minmax(0, 168px) minmax(0, 1fr) auto 16px; column-gap: 16px; align-items: baseline; padding: 20px 0; cursor: pointer; list-style: none; font-size: 16px; }
.bench summary::-webkit-details-marker { display: none; }
.bench summary::after { content: "+"; font: 15px var(--mono); color: var(--beam); text-align: right; }
.bench details[open] summary::after { content: "−"; }
.bench summary b { font-weight: 400; font-size: 19px; }
.bench summary > span:not(.mono) { color: var(--ink-2); }
.bench summary:hover b { color: var(--beam); }
.bench details > p { padding: 0 0 24px; max-width: 40em; color: var(--ink-2); font-size: 16px; }
@media (min-width: 701px) { .bench details > p { margin-left: 184px; } }
.bench .link { margin-top: 0; margin-left: 8px; }
@media (max-width: 700px) {
  .bench summary { grid-template-columns: minmax(0, 1fr) 16px; row-gap: 4px; }
  .bench summary > span { grid-column: 1; }
  .bench summary::after { grid-column: 2; grid-row: 1; }
}

/* ---------- experience ---------- */
.jobs li:first-child { border-top: 0; padding-top: 0; }
.jobs li { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.jobs li:last-child { border-bottom: 1px solid var(--line); }
.jobs .mono { padding-top: 8px; }
.jobs h3 { font-weight: 400; font-size: 23px; letter-spacing: -.01em; }
.jobs h3 span { display: block; font: 13px var(--mono); color: var(--ink-3); margin-top: 4px; letter-spacing: .02em; }
.jobs p { grid-column: 2; margin-top: 12px; color: var(--ink-2); font-size: 16px; max-width: 40em; }
.jobs p.mono { padding: 0; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.jobs__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.jobs__tags span { font: 11.5px/1 var(--mono); letter-spacing: .02em; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
@media (max-width: 560px) { .jobs li { grid-template-columns: 1fr; } .jobs p { grid-column: 1; } .jobs > li > .mono { padding: 0 0 8px; } }

/* ---------- toolkit ---------- */
.tools__title { margin: clamp(56px, 7vw, 88px) 0 28px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px; }
.tools__group h4 { margin-bottom: 12px; }
.tools__also { margin-top: 12px; font-size: 15px; color: var(--ink-3); }
@media (max-width: 640px) { .tools { grid-template-columns: 1fr; } }
.tools__group ul { display: flex; flex-wrap: wrap; gap: 8px; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 15px; color: var(--ink-2); transition: color .25s, border-color .25s;
}
.tool svg { width: 15px; height: 15px; fill: currentColor; opacity: .7; transition: fill .25s, opacity .25s; }
.tool:hover { color: var(--ink); border-color: var(--ink-3); }
.tool:hover svg { fill: var(--b, currentColor); opacity: 1; }

/* ---------- contact: the closing focal band, tokens remapped onto the panel colour ---------- */
.contact {
  --bg: var(--panel); --ink: var(--on-panel); --ink-2: rgba(243, 241, 234, .9); --ink-3: rgba(243, 241, 234, .85);
  --line: rgba(255, 255, 255, .22); --beam: #FFFFFF; --glass: rgba(255, 255, 255, .08);
  background: radial-gradient(90% 60% at 100% 0%, rgba(255, 255, 255, .12), transparent 60%), var(--panel); color: var(--ink);
  padding-block: clamp(80px, 11vw, 160px) clamp(60px, 8vw, 112px);
}
.contact__title { font-weight: 250; font-size: clamp(52px, 9vw, 140px); line-height: .92; letter-spacing: -.045em; margin-bottom: clamp(40px, 6vw, 80px); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact .sec__sub { margin-top: 0; }
.channels { border-top: 1px solid var(--line); }
.channels a { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; padding: 20px 0; border-bottom: 1px solid var(--line); transition: color .2s; }
.channels b { font-weight: 300; font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -.015em; }
.channels a:hover { color: var(--beam); }

@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 28px 40px; border-top: 1px solid var(--line); font-size: 15px; }

/* ---------- scroll reveals (CSS only, where supported) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
