@font-face { font-family: "Cardo"; src: url("fonts/cardo-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("fonts/cardo-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("fonts/cardo-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya SC"; src: url("fonts/alegreya-sc-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #f7f0e1;
  --ink: #1d1a16;
  --ink-soft: #6b6052;
  --rubric: #23367e;
  --rule: #d9ccb0;
  --sc: "Alegreya SC", "Cardo", serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cardo", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.5;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
  hanging-punctuation: first;
  -webkit-font-smoothing: antialiased;
}

/* small caps: always the real ones */
.sc, nav, footer, .posts .date, .section-head {
  font-family: var(--sc);
  letter-spacing: 0.04em;
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 1.5rem 2rem 0;
  font-size: 1.1rem;
}
nav a { color: var(--ink-soft); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--rubric); }

main {
  flex: 1;
  width: 100%;
  max-width: 36rem;
  padding: 4.5rem 2rem 2rem;
}
main p { margin: 0 0 1rem; }

/* links: colour carries them; the rule appears on hover */
a { color: var(--rubric); text-decoration: none; }
main a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.page-title {
  font-weight: 400;
  font-style: italic;
  font-size: 2.2rem;
  line-height: 1.15;
  margin: 0 0 2.5rem;
}
.section-head {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin: 0 0 1.2rem;
}

/* post lists */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { margin: 0 0 1.8rem; }
.posts a.title { font-size: 1.3rem; color: var(--ink); }
.posts a.title:hover { color: var(--rubric); text-decoration: none; }
.posts .preview {
  margin: 0.15rem 0 0;
  text-align: justify;
  hyphens: auto;
  color: var(--ink-soft);
}
.posts .date { margin: 0.3rem 0 0; font-size: 1rem; color: var(--ink-soft); }

.links { margin-top: 1.5rem; display: flex; gap: 1.5rem; }

/* poems */
.poem { margin: 0 0 2rem; }
.poem p { margin: 0 0 1.5rem; text-align: left; }
.poem p:first-child::first-line { font-family: var(--sc); letter-spacing: 0.03em; }
.colophon { font-style: italic; color: var(--ink-soft); margin: 0 0 2.5rem; }
.note { font-style: italic; color: var(--ink-soft); margin: -1.5rem 0 2.5rem; }
.back { font-family: var(--sc); letter-spacing: 0.04em; }

footer {
  padding: 1.5rem 2rem;
  color: var(--ink-soft);
  font-size: 1rem;
}
@media (max-width: 480px) {
  body { font-size: 1.1rem; }
  nav, main, footer { padding-left: 1rem; padding-right: 1rem; }
  main { padding-top: 3rem; }
  .page-title { font-size: 1.9rem; }
}
main:has(.poem) { max-width: 44rem; }
