/* mabel.ink stylesheet.
   Copied to dist/css/ by the passthrough rule in eleventy.config.js. Without that rule
   this file is silently never published. */

:root {
  color-scheme: light dark;

  --ink: light-dark(#1a1a1a, #e8e6e3);
  --ink-soft: light-dark(#5a5a5a, #a8a49f);
  --bg: light-dark(#fdfdfc, #16161a);
  --bg-soft: light-dark(#f2f1ee, #1f1f24);
  --rule: light-dark(#e0ded9, #32323a);
  --accent: light-dark(#1f5f8b, #7db3d8);

  --measure: 40rem;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

/* ---------- header ---------- */

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
  margin-bottom: 3rem;
}

header .brand {
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

header nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

header nav a:hover { color: var(--accent); }

/* ---------- typography ---------- */

h1 {
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem;
  text-wrap: balance;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.85rem;
  text-wrap: balance;
}

p { margin: 0 0 1.25rem; }

a { color: var(--accent); }

a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 650; }

ul, ol { padding-left: 1.25rem; }

li { margin-bottom: 0.4rem; }

/* ---------- code ---------- */

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-soft);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

pre {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  overflow-x: auto;         /* long lines scroll instead of breaking the layout */
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
}

/* ---------- blockquote ---------- */

blockquote {
  margin: 0 0 1.5rem;
  padding-left: 1.15rem;
  border-left: 3px solid var(--rule);
  color: var(--ink-soft);
}

blockquote p:last-child { margin-bottom: 0; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}

th { font-weight: 650; }

/* ---------- post list ---------- */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
}

.post-list li {
  margin: 0;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-list li:first-child { border-top: 1px solid var(--rule); }

.post-list a {
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.2rem;
}

.post-list a:hover { text-decoration: underline; }

.post-list .desc {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.post-list time {
  display: block;
  color: var(--ink-soft);
  font-size: 0.825rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- post meta ---------- */

.post-meta {
  color: var(--ink-soft);
  font-size: 0.875rem;
  margin: -1.25rem 0 2.5rem;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

footer p { margin: 0; }

/* ---------- figures / images ---------- */

img, svg { max-width: 100%; height: auto; }

figure { margin: 0 0 1.75rem; }

figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}
