/* Personal site — shared styles
   Plain CSS, no build step for styles. Hand-edit freely.

   Design system in five lines:
   - Sans:  Inter Tight, self-hosted from /fonts (no Google — GDPR)
   - Mono:  ui-monospace stack (SF Mono / Consolas / Menlo)
   - Ink:   #0a0a0a · Mute: #6b6b6b · Quiet: #767676 (lightest grey that passes 4.5:1)
   - Soft:  #fafafa for code and tiles
   - Whitespace separates things; lines only where they mean something.
*/

@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a0a0a;
  --body: #1a1a1a;
  --mute: #6b6b6b;
  --quiet: #767676;
  --hair: #ededed;
  --soft: #fafafa;
  --paper: #ffffff;
  --code-bg: #0a0a0a;
  --code-ink: #e6e6e6;
  --inline-code: #f4f4f4;
  --content: 760px;

  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ededed;
    --body: #d4d4d4;
    --mute: #9a9a9a;
    --quiet: #8f8f8f;
    --hair: #2a2a2a;
    --soft: #1c1c1c;
    --paper: #121212;
    --code-bg: #1c1c1c;
    --inline-code: #222222;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Site chrome ─────────────────────────── */

.site {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 24px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0;
}

.topbar .logo {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.topbar .logo:hover { text-decoration: none; }

/* "MN / writing": the slash and section name in a thin weight */
.topbar .crumbs { font-size: 15px; letter-spacing: -0.3px; }
.topbar .crumb { font-weight: 300; }

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-family: var(--mono);
  font-size: 13px;
}
.topbar nav a {
  color: var(--mute);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .12s, border-color .12s;
}
.topbar nav a:hover { color: var(--ink); text-decoration: none; }
.topbar nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ── Footer ──────────────────────────────── */

.site-foot {
  margin-top: 120px;
  padding: 0 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  color: var(--mute);
  text-transform: uppercase;
}
.site-foot .foot-links { display: flex; flex-wrap: wrap; gap: 14px; }
.site-foot a { color: var(--mute); }
.site-foot a:hover { color: var(--ink); }

/* ── Mono helpers ────────────────────────── */

.eyebrow,
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.6px;
  color: var(--mute);
  text-transform: uppercase;
  margin: 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  color: var(--mute);
  text-transform: uppercase;
}
.links a.primary { color: var(--ink); }

.empty { color: var(--mute); }

/* ── Pages ───────────────────────────────── */

.page { padding-top: 88px; }
.page > .eyebrow { margin-bottom: 28px; }

.page .prose h1 {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.7px;
  margin: 0 0 28px;
  text-wrap: balance;
}

.home .links { margin: 18px 0 72px; }

/* ── Lists (home, writing, recipes) ──────── */

.list { margin: 56px 0 0; }
.home .list:first-of-type { margin-top: 0; }

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.label-row .all { color: var(--ink); }

.row {
  display: grid;
  grid-template-columns: 40px 70px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 8px 0;
  align-items: baseline;
}
.row.r3 { grid-template-columns: 126px minmax(0, 1fr) auto; }
.row:hover { text-decoration: none; }
.row:hover .title { text-decoration: underline; text-underline-offset: 3px; }

.row .n,
.row .d,
.row .t {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--quiet);
}
.row .d { color: var(--mute); }
.row .t {
  text-align: right;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.row .title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.2px;
}

/* ── Games ───────────────────────────────── */

.shot {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--soft);
}
.shot.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mute);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding-top: 10px;
}
.game-card { display: flex; flex-direction: column; gap: 10px; }
.game-card .title { font-size: 15px; font-weight: 500; }

.games { display: flex; flex-direction: column; gap: 72px; margin-top: 56px; }
.game { display: flex; flex-direction: column; gap: 14px; }
.game-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
}
.game h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.6px; }
.game .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mute);
}
.game p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--body); }

/* ── Reading view (post, recipe, pages) ──── */

.post { padding-top: 64px; }
.post > .eyebrow { margin-bottom: 20px; }

.post h1 {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -1px;
  margin: 0 0 22px;
  text-wrap: balance;
}

.post .dek {
  font-size: 18px;
  line-height: 1.5;
  color: var(--body);
  margin: 0 0 40px;
}

.prose p,
.prose ul,
.prose ol {
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  margin: 0 0 18px;
}
.prose ul,
.prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { text-decoration: underline; text-decoration-color: var(--quiet); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }

.prose h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.6px;
  margin: 40px 0 14px;
}
.prose h3 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin: 30px 0 12px;
}

.prose blockquote {
  margin: 32px -8px;
  padding: 4px 24px;
  border-left: 2px solid var(--ink);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.prose blockquote p { font-size: inherit; line-height: inherit; color: inherit; margin: 0; }

.prose code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--inline-code);
  padding: 1px 5px;
  border-radius: 2px;
}

.prose pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 20px 22px;
  margin: 0 0 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
}
.prose pre code { background: transparent; padding: 0; color: inherit; font-size: inherit; }

.prose figure { margin: 0 0 32px; }
.prose figcaption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  margin-top: 8px;
  letter-spacing: 0.3px;
}

/* A section break is space plus three dots, not a line. */
.prose hr {
  border: 0;
  margin: 48px 0;
  text-align: center;
}
.prose hr::before {
  content: "· · ·";
  font-family: var(--mono);
  color: var(--quiet);
  letter-spacing: 4px;
}

/* Number tiles: <dl class="stats"><div><dt>Data</dt><dd>3.5 TB</dd></div>…</dl> */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 8px 0 28px;
}
.stats > div { background: var(--soft); padding: 16px 18px; }
.stats dt,
.facts dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mute);
}
.stats dd { margin: 4px 0 0; font-size: 22px; font-weight: 500; letter-spacing: -0.4px; }

.post-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 64px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--mute);
}

/* ── Recipe ──────────────────────────────── */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 48px;
}
.facts dd { margin: 2px 0 0; font-size: 17px; font-weight: 500; }

.recipe h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--mute);
  margin: 48px 0 8px;
}
.recipe h2:first-child { margin-top: 0; }

/* Ingredients: "- **400 g** Passata" → amount column + item */
.recipe ul { list-style: none; padding: 0; }
.recipe ul li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 6px 0;
}
.recipe ul li strong {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--mute);
  padding-top: 2px;
}

/* Method: "1. Step" → 01 02 03 */
.recipe ol { list-style: none; padding: 0; counter-reset: step; }
.recipe ol li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 10px 0;
}
.recipe ol li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--mute);
  padding-top: 3px;
}

/* ── Small screens ───────────────────────── */

@media (max-width: 620px) {
  .site { padding: 0 18px; }

  .page { padding-top: 56px; }
  .page .prose h1 { font-size: 28px; }

  .row { grid-template-columns: 60px minmax(0, 1fr); }
  .row .n,
  .row .t { display: none; }
  .row.r3 { grid-template-columns: 70px minmax(0, 1fr); }

  .post { padding-top: 40px; }
  .post h1 { font-size: 28px; letter-spacing: -0.6px; }
  .post .dek { font-size: 16px; }
  .prose blockquote { font-size: 18px; margin: 24px 0; }

  .topbar nav { gap: 4px 14px; font-size: 12px; }
}
