:root {
  --bg: #faf7f1;
  --text: #1c1a17;
  --text-muted: #6b655c;
  --border: #ddd6c9;
  --accent: #a8431e;
  --code-bg: #f0ebe0;
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17150f;
    --text: #ece7dc;
    --text-muted: #94897a;
    --border: #35301f;
    --accent: #e0703f;
    --code-bg: #211d14;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}

.wrap { max-width: 700px; margin: 0 auto; padding: 0 20px; }

a { color: var(--text); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

/* header, just words, no logo-badge, no nav pills */
.site-header { padding: 28px 0 20px; }
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.site-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-style: italic;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}
.site-title img { width: 18px; height: 18px; opacity: 0.75; }
.site-nav { font-family: var(--font-mono); font-size: 13px; }
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 16px;
}
.site-nav a:first-child { margin-left: 0; }
.site-nav a:hover { color: var(--accent); }

/* footer, plain */
.site-footer {
  margin-top: 90px;
  padding: 22px 0 60px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
}
.footer-links a { margin-right: 14px; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

.page { padding: 30px 0 40px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--text); font-weight: 600; }
h1 { font-size: 2.3em; margin: 0.1em 0 0.35em; }
h2 { font-size: 1.5em; margin: 1.7em 0 0.5em; font-style: italic; }
h3 {
  font-family: var(--font-mono);
  font-style: normal;
  margin: 1.4em 0 0.5em;
  color: var(--text-muted);
  font-size: 0.75em;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

p { margin: 0 0 1.15em; }

code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.85em;
}
pre {
  background: var(--code-bg);
  border-left: 3px solid var(--border);
  border-radius: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82em;
  line-height: 1.55;
}
pre code { background: none; padding: 0; }

blockquote {
  margin: 1.4em 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}

ul, ol { padding-left: 1.2em; }
li { margin-bottom: 0.4em; }

hr { border: none; border-top: 1px dashed var(--border); margin: 2.4em 0; }

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

/* no card, just a plain divider between title and body */
.hero { margin-bottom: 2em; }
.hero .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

/* post list = a log, not cards */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
  display: flex;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
  align-items: baseline;
}
.post-list li:first-child { padding-top: 0; }
.post-list-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.post-list-title { font-weight: 500; }
.post-list-excerpt { display: none; }

/* pager */
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
}
.pager-status { color: var(--text-muted); }
.pager-disabled { color: var(--border); }

/* single post */
.post-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.5em;
}
.tag {
  color: var(--text-muted);
}
.tag::before { content: "#"; }
.post-subtitle {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.05em;
}
.post-footer {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 14px;
}

/* diagrams, no card box, just the drawing on the page */
.diagram { margin: 1.8em 0; }
.diagram svg text { fill: var(--text); font-family: var(--font-mono); }
.diagram svg .muted { fill: var(--text-muted); }
.diagram-caption {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* callouts become a plain marked paragraph, not a box */
.callout {
  padding: 0 0 0 16px;
  border-left: 2px solid var(--text-muted);
  font-size: 0.95em;
  margin: 1.6em 0;
}
.callout code { background: var(--code-bg); }

table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.92em; }
th, td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px dashed var(--border); }
th { font-family: var(--font-mono); font-weight: 500; color: var(--text-muted); font-size: 0.85em; }

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .site-nav a { margin-left: 10px; }
  .post-list li { flex-direction: column; gap: 2px; }
}
