:root {
  color-scheme: light;
  --paper: #fffdf4;
  --ink: #241f19;
  --muted: #6d6257;
  --rule: #d8cbb8;
  --accent: #8f2d2d;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 42rem;
  margin: 3rem auto;
  padding: 0 1rem;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 0.16em;
}

header {
  margin-bottom: 2rem;
}

header h1 {
  margin-bottom: 0.2rem;
}

header p {
  margin-top: 0;
  color: var(--muted);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto;
}

figure {
  width: fit-content;
  max-width: 100%;
  margin: 1.25rem auto;
}

figure img {
  margin: 0 auto;
}

figcaption {
  margin-top: 0.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.writing-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}

.writing-heading a {
  font-size: 0.9rem;
}

.note {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.note h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.note h2 a {
  color: var(--muted);
  text-decoration-thickness: 1px;
}

.note > :last-child {
  margin-bottom: 0;
}

.note-back {
  margin-bottom: 1.5rem;
}

.note-single h1 {
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

.note-single time {
  color: var(--muted);
}

@media (max-width: 34rem) {
  body {
    margin-top: 1.5rem;
  }

  .writing-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}
