/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Base ──────────────────────────────────────────────── */
:root {
  --serif: 'Inria Serif', Georgia, 'Times New Roman', serif;
  --ink: #1a1a1a;
  --muted: #888;
  --bg: #faf9f7;
  --max: 640px;
  --gap: 2rem;
}

html {
  font-size: 20px;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--serif);
  line-height: 1.75;
  padding: 3rem var(--gap);
  max-width: var(--max);
  margin: 0 auto;
}

/* ─── Header ────────────────────────────────────────────── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0ded9;
}

.site-name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.site-name:hover { text-decoration: underline; }

nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
}

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

/* ─── Index listing ─────────────────────────────────────── */
.post-list {
  list-style: none;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e8e6e1;
}

.post-list li:first-child {
  border-top: 1px solid #e8e6e1;
}

.post-list a {
  color: var(--ink);
  text-decoration: none;
  flex: 1;
}

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

.post-list time {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  font-style: italic;
}

/* ─── Post page ─────────────────────────────────────────── */
.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.post-header time {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* Prose */
.post .post-body p {
  margin-bottom: 1.4em;
}

.post .post-body p:last-child {
  margin-bottom: 0;
}

/* Poetry — single newlines are already <br> via markdown-it breaks:true.
   We strip the paragraph bottom margin so stanzas breathe via blank lines only. */
.poem .post-body p {
  margin-bottom: 0;
  line-height: 1.9;
}

.poem .post-body p + p {
  margin-top: 1.5em;   /* blank line between stanzas */
}

/* ─── About / generic page ──────────────────────────────── */
.page-body p {
  margin-bottom: 1.4em;
}

.page-body p:last-child {
  margin-bottom: 0;
}

/* ─── Links in body ─────────────────────────────────────── */
a { color: inherit; }

main a:not(.site-name):not(.post-list a) {
  text-decoration-color: #bbb;
}

main a:not(.site-name):not(.post-list a):hover {
  text-decoration-color: var(--ink);
}
