/* Fonts are served from this site (no third-party requests). Licences: /fonts/OFL-*.txt */
@font-face { font-family: "Chivo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/chivo-latin-var.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-500-latin.woff2") format("woff2"); }

:root {
  --bg: #0a0d12;
  --ink: #eef2f6;
  --muted: #9aa6b5;
  --line: rgba(238, 242, 246, 0.12);
  --accent: #3c79f0; /* the blue from the schemattic logo */
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: "Chivo", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.5; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

header { position: sticky; top: 0; z-index: 10; background: rgba(10, 13, 18, 0.85); backdrop-filter: blur(10px); }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.logo img { display: block; height: 26px; width: auto; }
nav a { margin-left: 28px; text-decoration: none; font-weight: 500; color: var(--muted); }
nav a:hover { color: var(--ink); }

.hero { padding: 120px 0 96px; }
.eyebrow { font: 500 13px "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 24px; }
h1 { font-size: clamp(48px, 7.5vw, 88px); font-weight: 900; line-height: 0.98; letter-spacing: -0.035em; margin: 0 0 28px; max-width: 12ch; }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--muted); max-width: 34em; margin: 0 0 40px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.btn { display: inline-flex; align-items: center; height: 48px; padding: 0 30px; border-radius: 6px; background: var(--ink); color: var(--bg); font-weight: 500; text-decoration: none; }
.link { font-weight: 500; text-decoration: none; color: var(--muted); }
.link:hover { color: var(--ink); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 64px; padding: 64px 0 120px; border-top: 1px solid var(--line); }
.facts p { margin: 0; font-size: 20px; line-height: 1.4; }
.facts span { display: block; font: 500 12px "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 56px; }
h2 { font-size: clamp(32px, 3.6vw, 44px); font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; margin: 0; }

.project { display: grid; grid-template-columns: 1.25fr 1fr; gap: 72px; align-items: center; padding: 48px 0 120px; }
.project.flip .shots { order: 2; }
.shots { position: relative; padding: 0 0 48px 48px; }
.shots.solo { padding: 0; } /* no phone overlapping, so the screenshot gets the full column */
.desktop { border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0, 0, 0, 0.75); background: #161b23; }
.bar { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: #1a2029; }
.bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a4250; }
.desktop img { display: block; width: 100%; }
.phone { position: absolute; left: 0; bottom: 0; width: 26%; border-radius: 12.6% / 6%; overflow: hidden; border: 5px solid #1a2029; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -20px rgba(0, 0, 0, 0.8); background: #161b23; }
.phone img { display: block; width: 100%; aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; }
.tag { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.project h3 { font-size: clamp(32px, 3.4vw, 44px); font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 16px; }
.project p { color: var(--muted); font-size: 18px; margin: 0 0 20px; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.stack li { font: 500 12px "IBM Plex Mono", monospace; padding: 6px 10px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }

.screens img { display: block; width: 100%; height: auto; }
.screens img[hidden] { display: none; }
.stepper { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 16px; margin: 24px 0 0; }
.step { width: 40px; height: 40px; border: 0; border-radius: 6px; background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 500 18px "IBM Plex Mono", monospace; cursor: pointer; }
.step[hidden] { display: none; }
.step:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stepper .step-text { grid-column: 2; }
.showcase .step-name { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.step-count { color: var(--muted); margin-right: 8px; }
.showcase .caption { font-size: 15px; line-height: 1.45; color: var(--muted); margin: 0; min-height: 2.9em; }
.screens.zoomable { cursor: zoom-in; }
.screens.zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lightbox { width: min(1640px, 96vw); max-width: none; max-height: 96vh; padding: 20px; border: 0; border-radius: 8px; background: #0f131a; color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 40px 80px -20px rgba(0, 0, 0, 0.8); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(5, 7, 10, 0.88); }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.lb-head .step-name { margin: 0; }
.lb-frame { flex: 1; min-height: 0; overflow: auto; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.lb-frame img { display: block; width: 100%; height: auto; }
.lb-hint { display: none; font: 500 12px "IBM Plex Mono", monospace; color: var(--muted); margin: 10px 0 0; }
.lightbox .stepper { margin-top: 16px; }
.lightbox .caption { min-height: 0; }

.photo-slot { aspect-ratio: 4 / 3; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); background: repeating-linear-gradient(135deg, #10151c 0 14px, #0d1117 14px 28px); display: grid; place-items: center; text-align: center; color: var(--muted); font: 500 13px "IBM Plex Mono", monospace; }
.soon { display: inline-block; font: 500 11px "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 4px 8px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 16px; }

.diagram { display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0, 0, 0, 0.75); }
.diagram img { display: block; width: 100%; height: auto; }

/* Build-story pages (public/projects/) */
.post-head { padding: 96px 0 64px; max-width: 760px; }
.post-head h1 { font-size: clamp(40px, 5.4vw, 64px); line-height: 1.02; max-width: 18ch; }
.post-head .lead { margin-bottom: 0; }
.prose { max-width: 720px; padding: 56px 0 120px; border-top: 1px solid var(--line); font-size: 18px; line-height: 1.65; }
.prose p, .prose ul, .prose ol { color: var(--muted); margin: 0 0 22px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 10px; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose h2 { font-size: clamp(26px, 2.6vw, 32px); margin: 64px 0 20px; }
.prose figure { margin: 36px 0; }
.prose figure a { display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.prose figure img { display: block; width: 100%; height: auto; }
.prose figcaption { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: 0.04em; color: var(--muted); margin-top: 12px; }
.table-scroll { overflow-x: auto; margin: 0 0 28px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th { font: 500 11px "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 16px 10px 0; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.prose td { color: var(--ink); padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-back { margin-top: 56px; }
.prose figure a { cursor: zoom-in; }
.post-lb .step-name { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }
.post-lb .caption { font-size: 15px; line-height: 1.45; color: var(--muted); margin: 0; }
.post-lb .lb-frame img { width: auto; max-width: 100%; margin: 0 auto; }

.closing { padding: 120px 0; border-top: 1px solid var(--line); }
.closing h2 { max-width: 18ch; margin-bottom: 36px; font-size: clamp(36px, 4.4vw, 56px); }
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; color: var(--muted); font-size: 14px; }

@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  nav a { margin-left: 16px; font-size: 14px; }
  nav a.hide-sm { display: none; }
  .hero { padding: 72px 0 64px; }
  .facts { grid-template-columns: 1fr; gap: 28px; padding: 48px 0 80px; }
  .project, .project.flip { grid-template-columns: 1fr; gap: 36px; padding: 24px 0 88px; }
  .project.flip .shots { order: 0; }
  .shots { padding: 0 0 32px 24px; }
  .post-head { padding: 56px 0 40px; }
  .prose { padding: 40px 0 88px; font-size: 17px; }
  .prose h2 { margin-top: 48px; }
  .prose table { min-width: 520px; }
  footer .wrap { flex-direction: column; gap: 8px; }
  .lightbox { width: 100vw; height: 100dvh; max-height: none; padding: 16px; border-radius: 0; }
  .lb-frame img { width: 1200px; max-width: none; }
  .lb-hint { display: block; }
  .post-lb .lb-frame img { max-width: none; }
}

/* 404 page */
.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.page-404 main { flex: 1; display: flex; align-items: center; padding: 64px 0; }
