:root {
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --accent: #15803d;
  --code: #f5f5f4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0b;
    --fg: #e7e5e4;
    --muted: #a8a29e;
    --line: #292524;
    --accent: #4ade80;
    --code: #1c1917;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell {
  max-width: 680px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--fg); text-decoration-color: var(--line); text-underline-offset: 3px; text-decoration-thickness: 1.5px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Header and footer */
.top { padding: 32px 0 8px; }
.name { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }

.bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 40px 0 32px;
  color: var(--muted);
  font-size: 14px;
}
.icon-link { display: inline-flex; color: var(--muted); }
.icon-link:hover { color: var(--fg); }

/* Home */
.hero { padding: 22vh 0 0; }
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 9vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.links { margin: 16px 0 0; font-size: 17px; }
.muted { color: var(--muted); }

/* Text pages */
.prose { padding: 40px 0 0; }
.prose h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.prose h2, .prose h3 {
  margin: 2.2em 0 .5em;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.prose p, .prose ul { margin: 0 0 1.1em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--muted); }
.prose em:first-child { color: var(--muted); font-style: normal; font-size: 15px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0 1.5em; }
.prose hr + p { color: var(--muted); font-size: 15px; }
.prose code { background: var(--code); padding: .1em .35em; border-radius: 5px; font-size: .9em; }
