/* Tinkerhaus v2 ("Rams"): zinc neutrals, one signal orange. Dark-first; light follows the OS. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0A0A0B;
  --panel: #141416;
  --panel2: #1B1B1E;
  --line: #26262A;
  --ink: #FAFAFA;
  --mute: #A1A1AA;
  --acc: #F26B1D;
  --ok: #22C55E;
  --ok-halo: rgba(34, 197, 94, .18);
  --dots: rgba(255, 255, 255, .06);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .45);
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #FFFFFF;
    --panel: #FAFAFA;
    --panel2: #F4F4F5;
    --line: #E4E4E7;
    --ink: #18181B;
    --mute: #71717A;
    --acc: #E2570C;
    --ok: #16A34A;
    --ok-halo: rgba(22, 163, 74, .18);
    --dots: rgba(0, 0, 0, .06);
    --shadow: 0 24px 60px -32px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--acc); }
a:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, dl, dd, figure, ol { margin: 0; }
code, .mono { font-family: var(--mono); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { border-bottom: 1px solid var(--line); }
.section > .wrap { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); display: flex; flex-direction: column; gap: 32px; }
.dotgrid { background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 20px 20px; }
.muted { color: var(--mute); }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { padding-top: 12px; padding-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.mark { flex: none; }
.mark .tile { fill: var(--ink); }
.mark .cut { fill: var(--bg); }
.mark .dot { fill: var(--acc); }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 24px); font-size: 14px; }
.nav a { color: var(--mute); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover { color: var(--acc); }

.site-footer .wrap { padding-top: clamp(40px, 6vw, 64px); padding-bottom: 32px; display: flex; flex-direction: column; gap: 40px; }
.footline { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.footline > div { display: flex; align-items: center; gap: 8px; }
.footline .mark .tile { fill: var(--mute); }
.footline .tag { font-family: var(--mono); font-size: 12px; }

/* Type */
.eyebrow { font: 500 12px var(--mono); color: var(--acc); letter-spacing: .04em; text-transform: uppercase; }
.heading { display: flex; flex-direction: column; gap: 10px; }
.h1 { font-size: clamp(40px, 6.2vw, 72px); line-height: 1.02; font-weight: 600; letter-spacing: -0.045em; text-wrap: balance; }
.h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
.lede { max-width: 32em; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.6; color: var(--mute); text-wrap: pretty; }
.body { font-size: 16px; line-height: 1.65; color: var(--mute); max-width: 36em; text-wrap: pretty; }

/* Controls and chips */
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; padding: 11px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.btn:hover { border-color: var(--mute); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .88; color: var(--bg); }
.pill { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); color: var(--mute); border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; align-self: flex-start; }
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 11px var(--mono); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; white-space: nowrap; color: var(--mute); }
.status.ok { color: var(--ok); }
.status.acc { color: var(--acc); }
.led { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.led.acc { background: var(--acc); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; font: 400 12px var(--mono); color: var(--mute); }
.chips span { padding: 4px 8px; background: var(--panel2); border-radius: 6px; }

/* Landing hero */
.hero .wrap { padding-top: clamp(56px, 10vw, 120px); padding-bottom: clamp(48px, 7vw, 88px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: clamp(40px, 6vw, 72px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }

.bench { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.bench-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 400 12px var(--mono); color: var(--mute); }
.bench-bar .lights { display: flex; gap: 6px; }
.bench-bar .lights span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.bench-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bench-row:last-child { border-bottom: 0; }
.bench-row .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bench-row .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bench-row .txt.indent { padding-left: 38px; }
.bench-row b { font-size: 14px; font-weight: 500; }
.bench-row small { font: 400 11px var(--mono); color: var(--mute); overflow-wrap: anywhere; }

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .2s, transform .2s; }
a.card:hover { border-color: var(--mute); transform: translateY(-2px); color: var(--ink); }
.card.todo { background: none; border-style: dashed; }
.card-art { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.card-art.owl { background: #141A33; }
.card-art.owl img { width: 30%; height: auto; }
.card-art .ghost { stroke: var(--mute); }
.card-art .dot { fill: var(--acc); }
.card.todo .card-art { border-bottom-style: dashed; background-size: 16px 16px; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.card p { font-size: 15px; line-height: 1.6; color: var(--mute); text-wrap: pretty; }
.card .more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 500; }

/* Grids of cells separated by 1px lines */
.cells { display: grid; background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cells > * { background: var(--bg); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.cells.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.cells.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.cells .num { font: 500 12px var(--mono); color: var(--mute); }
.cells b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.cells span.d { font-size: 14.5px; line-height: 1.6; color: var(--mute); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(24px, 5vw, 64px); align-items: end; }

.note { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: clamp(24px, 4vw, 40px); }
.note > div { display: flex; flex-direction: column; gap: 8px; }
.note b { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; letter-spacing: -0.03em; }
.note span { font-size: 15px; line-height: 1.6; color: var(--mute); max-width: 40em; }

/* Project page */
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--mute); }
.crumbs a { color: var(--mute); }
.crumbs [aria-current] { color: var(--ink); }
.proj-hero .wrap { padding-top: clamp(28px, 4vw, 40px); padding-bottom: clamp(48px, 7vw, 80px); display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); }
.proj-hero .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 5vw, 64px); align-items: center; }
.proj-id { display: flex; align-items: center; gap: 14px; }
.proj-id > div { display: flex; flex-direction: column; gap: 6px; }
.proj-title { font-size: clamp(44px, 6.5vw, 72px); line-height: 1; font-weight: 600; letter-spacing: -0.05em; }
.meta { display: grid; grid-template-columns: 1fr 1fr; background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.meta > div { background: var(--panel); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.meta dt { font: 400 12px var(--mono); color: var(--mute); }
.meta dd { font-size: 15px; font-weight: 500; line-height: 1.45; }

.diagram { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background-color: var(--panel); }
.diagram .stages { padding: clamp(16px, 4vw, 40px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.stage { display: flex; flex-direction: column; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.stage.key { border: 1px dashed var(--acc); }
.stage-top { display: flex; justify-content: space-between; gap: 8px; font: 500 11px var(--mono); color: var(--mute); text-transform: uppercase; }
.stage-top .acc { color: var(--acc); }
.stage b { font-size: 16px; font-weight: 600; }
.stage span.d { font-size: 13.5px; line-height: 1.5; color: var(--mute); }
.stage .to { margin-top: auto; font: 400 12px var(--mono); color: var(--mute); }
.svc { display: flex; flex-direction: column; gap: 6px; font: 400 12.5px var(--mono); }
.svc span { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; background: var(--panel2); border-radius: 6px; }
.svc em { font-style: normal; color: var(--ok); }
.svc em.opt { color: var(--mute); }
.diagram figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 12px 20px; font: 400 12px var(--mono); color: var(--mute); }

.big { font-size: clamp(40px, 4.4vw, 52px); line-height: 1; font-weight: 600; letter-spacing: -0.05em; }
.big.acc { color: var(--acc); }
.big small { font-size: .42em; font-weight: 500; letter-spacing: 0; color: var(--mute); }
.footnote { font: 400 12px/1.6 var(--mono); color: var(--mute); }

.adrs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.adr { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.adr .num { font: 500 12px var(--mono); color: var(--mute); }
.adr h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.adr p { font-size: 14.5px; line-height: 1.6; color: var(--mute); text-wrap: pretty; }
.adr .trade { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; font-size: 13.5px; line-height: 1.5; color: var(--mute); }
.adr .trade span:first-child { font: 500 11px/1.9 var(--mono); color: var(--acc); flex: none; }

.section > .wrap.timeline-wrap { display: grid; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(28px, 5vw, 64px); }
.timeline { padding: 0; list-style: none; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 84px 18px 1fr; gap: 14px; padding-bottom: 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline time, .timeline .when { font: 400 12.5px/1.7 var(--mono); color: var(--mute); }
.timeline .rail { position: relative; display: flex; justify-content: center; }
.timeline .rail::before { content: ""; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--mute); position: relative; z-index: 1; }
.timeline .rail::after { content: ""; position: absolute; top: 6px; bottom: -26px; width: 1px; background: var(--line); }
.timeline li:last-child .rail::after { display: none; }
.timeline li.now .when { color: var(--ok); font-weight: 500; }
.timeline li.now .rail::before { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-halo); }
.timeline li > div { display: flex; flex-direction: column; gap: 4px; }
.timeline b { font-size: 16px; font-weight: 600; }
.timeline li > div span { font-size: 14.5px; color: var(--mute); line-height: 1.55; }

.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.pager > * { border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.pager a:hover { border-color: var(--mute); color: var(--ink); }
.pager .todo { border-style: dashed; text-align: right; }
.pager small { font: 400 12px var(--mono); color: var(--mute); }
.pager b { font-size: 16px; font-weight: 600; }
.pager .todo b { color: var(--mute); }

@media (max-width: 480px) {
  .meta { grid-template-columns: 1fr; }
  .bench-row .txt.indent { padding-left: 0; }
  .timeline li { grid-template-columns: 80px 14px 1fr; gap: 10px; }
  .timeline time, .timeline .when { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  a.card:hover { transform: none; }
}
