/* --- Reset and base --- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ul, ol, li, hr, footer, header, main, section, article, time { margin: 0; padding: 0; }

:root {
  --paper: #f7f3ec;
  --ink: #1d1a17;
  --muted: #6b6258;
  --hairline: #cdc4b6;
  --oxblood: #7a3b2e;
}

html { color-scheme: light; }

body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text", Charter, Georgia, serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  max-width: 32rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}

/* --- Header --- */
header {
  margin-bottom: 2.5rem;
  text-align: center;
}

h1 {
  font-weight: 500;
  font-size: 1.85rem;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin-bottom: 0.4rem;
  text-decoration: underline;
  text-decoration-color: var(--oxblood);
  text-decoration-style: wavy;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.tagline {
  color: var(--muted);
  font-style: italic;
  font-size: 0.98rem;
}

/* --- Sections --- */
section {
  margin: 0;
}

section h2 {
  font-weight: 500;
  font-size: 1.15rem;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 1rem;
  text-align: center;
}

section.about p {
  margin-bottom: 1.05em;
  text-indent: 0;
}

section.about p:first-of-type {
  text-indent: 0;
}

section.about p + p {
  text-indent: 1.5em;
}

/* --- The "* * *" centred rule --- */
.rule {
  text-align: center;
  color: var(--muted);
  letter-spacing: 0.6em;
  margin: 2.5rem 0;
  font-size: 0.9rem;
}

/* --- Notes: dated entries with the date in the left margin --- */
.notes article {
  display: grid;
  grid-template-columns: 6em 1fr;
  gap: 1.2rem;
  padding: 0.9rem 0;
  border-bottom: 1px dotted var(--hairline);
}

.notes article:last-of-type {
  border-bottom: none;
}

.notes time {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-feature-settings: "tnum", "onum";
  font-variant-numeric: oldstyle-nums tabular-nums;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
  padding-top: 0.25rem;
}

.notes h3 {
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.notes p {
  color: var(--ink);
  font-size: 0.97rem;
  line-height: 1.5;
}

/* --- Correspondence --- */
.correspondence p {
  text-align: center;
  font-style: italic;
  color: var(--muted);
}

/* --- Inline links --- */
a {
  color: var(--oxblood);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover, a:focus {
  background: var(--oxblood);
  color: var(--paper);
  text-decoration: none;
}

/* --- Footer --- */
footer {
  margin-top: 4rem;
  text-align: center;
  font-style: italic;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

footer em, footer i {
  font-style: italic;
  color: var(--oxblood);
}

/* --- Responsive --- */
@media (max-width: 480px) {
  body {
    font-size: 16px;
    padding: 2.5rem 1.1rem 3rem;
  }
  h1 { font-size: 1.55rem; }
  .notes article {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .notes time {
    padding-top: 0;
  }
}

/* --- Print: drop the accent, tighten --- */
@media print {
  :root {
    --paper: #fff;
    --ink: #000;
    --muted: #444;
    --hairline: #999;
    --oxblood: #000;
  }
  body {
    max-width: none;
    font-size: 12pt;
    padding: 0;
  }
  h1 {
    text-decoration: none;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  .rule {
    margin: 1.5rem 0;
  }
}
