/* ---------------------------------------------------------------------------
   Johannes schrijft — typewriter, paper, rust.
   --------------------------------------------------------------------------- */

@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/CourierPrime-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/CourierPrime-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/CourierPrime-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("../fonts/CourierPrime-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f4f1ea;
  --ink: #23201b;
  --muted: #6f685c;
  --rule: #d9d3c6;
  --font: "Courier Prime", ui-monospace, "SFMono-Regular", "Menlo", monospace;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191714;
    --ink: #e9e3d6;
    --muted: #948c7d;
    --rule: #37322a;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem);
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

a:hover,
a:focus-visible {
  border-color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Skip link ------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  border: 0;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10;
}

/* Masthead — quiet wordmark, always links home. One word, no menu. -------- */
.masthead {
  text-align: center;
  padding: 2rem 1.25rem 0;
}

.masthead a {
  font-size: 0.85rem;
  text-transform: lowercase;
  letter-spacing: 0.28em;
  color: var(--muted);
  border-bottom-color: transparent;
}

.masthead a:hover,
.masthead a:focus-visible {
  color: var(--ink);
  border-bottom-color: transparent;
}

/* Homepage greeting — "alles goed?" as an oversized poem title ----------- */
.home-question {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.2rem, 1.5rem + 4.5vw, 3.6rem);
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-align: center;
}

/* Poem ------------------------------------------------------------------ */
.poem {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.poem--home {
  padding-top: 2.5rem;
}

.poem__title {
  margin: 0 0 2rem;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  text-align: center;
}

.poem__body {
  white-space: normal;
}

.poem__body p {
  margin: 0 0 1.6rem;
}

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

/* Thin centered divider ------------------------------------------------- */
.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  width: 6rem;
  margin: 2.5rem auto;
}

/* Prev / next navigation ------------------------------------------------ */
.poem-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.poem-nav a {
  border-bottom-color: transparent;
  color: var(--muted);
}

.poem-nav a:hover,
.poem-nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--rule);
}

/* Overview -------------------------------------------------------------- */
.overview {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5rem 1.25rem;
}

.overview__title {
  margin: 0 0 2.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  text-align: center;
}

.overview__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.overview__list li {
  margin: 0;
}

.overview__list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

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

.overview__date {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* "Nieuwe gedichten" block on the homepage — a quiet, centered contents
   list, not a bordered index. --------------------------------------------- */
.recent {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
  text-align: center;
}

.recent__label {
  margin: 2rem 0 3rem;
  font-size: 0.8rem;
  text-transform: lowercase;
  letter-spacing: 0.25em;
  color: var(--muted);
}

.recent__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recent__item {
  margin: 0 0 2.25rem;
}

.recent__link {
  font-size: 1.3rem;
  border-bottom-color: transparent;
}

.recent__link:hover,
.recent__link:focus-visible {
  border-bottom-color: var(--rule);
}

.recent__date {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.recent__all {
  margin: 3.25rem 0 0;
  font-size: 0.9rem;
}

.recent__all a {
  color: var(--muted);
  border-bottom-color: transparent;
}

.recent__all a:hover,
.recent__all a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--rule);
}

/* Footer ---------------------------------------------------------------- */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 3rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.footer a {
  color: var(--muted);
  border-bottom-color: transparent;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--ink);
}

.footer span {
  margin: 0 0.5rem;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
