/* ============================================================
   Design tokens — see docs/design/visual_identity.md
   ============================================================ */

:root {
  --bg: #f1ece4;
  --surface: #e8e1d6;
  --text: #2a2723;
  --text-muted: #746c60;
  --accent: #3d6b62;
  --border: #d8d0c2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #201e1c;
    --surface: #2a2724;
    --text: #ede7de;
    --text-muted: #a39b8e;
    --accent: #5b9089;
    --border: #3a3632;
  }
}

/* ============================================================
   Reset
   ============================================================ */

html {
  box-sizing: border-box;
}

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

/* ============================================================
   Global typography — applies everywhere, every page
   ============================================================ */

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 1.5rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;
  font-weight: 500;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.25;
}

p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
}

a {
  color: var(--accent);
}

/* ============================================================
   Layout primitive — the centered column every page uses
   ============================================================ */

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
  max-width: 42rem;
  text-align: center;
}

/* ============================================================
   Homepage
   ============================================================ */

.wordmark {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

a.wordmark {
  color: var(--accent);
}

.mascot {
  width: 96px;
  height: 96px;
  color: var(--accent);
}

.mascot circle,
.mascot path {
  fill: none;
  stroke: currentColor;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: no-preference) {
  .mascot {
    animation: settle 6s ease-in-out infinite;
    transform-origin: 50% 90%;
  }
}

@keyframes settle {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) rotate(-1deg);
  }
}

.rule {
  width: 2.5rem;
  height: 1px;
  background: var(--border);
  border: none;
}

.blurb {
  max-width: 32ch;
}

/* ============================================================
   Blog — post pages and the index list
   ============================================================ */

article {
  text-align: left;
}

article p {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.post-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0.75rem;
}

article .post-date {
  margin: 0.5rem 0 1.5rem;
}

.post-breadcrumb {
  font-size: 0.8125rem;
  align-self: flex-start;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.post-nav-next:only-child {
  margin-left: auto;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.post-list h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}
