:root {
  --paper: #eef1ec;
  --ink: #1d2433;
  --muted: #5a6273;
  --line: #c9d0c7;
  --accent: #2f5fd0;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161a22;
    --ink: #e7e9e4;
    --muted: #9aa1ae;
    --line: #2c3240;
    --accent: #86a6f5;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.15rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- header / wordmark ---------- */
.site-header {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.wordmark {
  position: relative;
  display: inline-block;
  padding-bottom: 1.3rem;
  color: var(--ink);
  text-decoration: none;
}
.plank {
  display: flex;
  gap: 0.35em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 0 0.2em 0.2em;
  border-bottom: 3px solid var(--ink);
  transform: rotate(-4deg);
  transform-origin: 62% 100%;
  animation: settle 1.6s cubic-bezier(.3, 1.6, .5, 1) both;
}
.plank span:last-child { font-weight: 400; }
.fulcrum {
  position: absolute;
  left: 62%;
  bottom: 0;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 0.75rem solid transparent;
  border-right: 0.75rem solid transparent;
  border-bottom: 1.3rem solid var(--accent);
}
@keyframes settle {
  0% { transform: rotate(5deg); }
  45% { transform: rotate(-7deg); }
  75% { transform: rotate(-2.5deg); }
  100% { transform: rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .plank { animation: none; }
}
.wordmark:hover .plank { border-color: var(--accent); }

.site-header nav { display: flex; gap: 1.25rem; font-family: var(--display); font-size: 1rem; }
.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }

main { max-width: 64rem; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }

/* ---------- home feed ---------- */
.feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 3.5rem 2.5rem;
  margin-top: 2rem;
}
/* every other drawing sits a little lower: nothing lines up perfectly */
@media (min-width: 44rem) {
  .entry:nth-child(even) { margin-top: 2.5rem; }
}
.entry-link { color: var(--ink); text-decoration: none; display: block; }
.entry img { border: 1px solid var(--line); background: #fff; }
.entry h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0.9rem 0 0.2rem;
}
.entry-link:hover h2 { color: var(--accent); }
.entry time, .post time { color: var(--muted); font-size: 0.95rem; }
.empty { color: var(--muted); font-style: italic; }

/* ---------- single post ---------- */
.post figure { margin: 1rem 0 2.5rem; }
.post figure img {
  margin: 0 auto;
  max-height: 85vh;
  border: 1px solid var(--line);
  background: #fff;
}
.post-text { max-width: 36rem; margin: 0 auto; }
.post h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}
.post time { display: block; margin-bottom: 1.6rem; }
.post p { margin: 0 0 1.15em; }
.page { margin-top: 2rem; }

.pager {
  max-width: 36rem;
  margin: 3.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: var(--display);
}
.pager a { text-decoration: none; color: var(--ink); max-width: 48%; }
.pager a:hover { color: var(--accent); }
.pager span { display: block; font-size: 0.85rem; color: var(--muted); }
.pager .next { text-align: right; }

/* ---------- footer ---------- */
.site-footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
