:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --ink: #191816;
  --muted: #676159;
  --line: #cbc3b7;
  --accent: #b43b24;
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
}

.shell {
  width: min(42rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 10vh 0 4rem;
}

h1, h2, p { margin-top: 0; }

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

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

.breadcrumb {
  display: flex;
  gap: 0.55rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

.archive-header, .post-header { margin-top: 4rem; }

.archive-header h1, .post-header h1 {
  margin-bottom: 0;
  font-size: clamp(2.5rem, 9vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.subtitle {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.archive-intro {
  max-width: 34rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.years { margin-top: 5rem; }

.year {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.year h2 {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 600;
}

.year-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.year-list li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
}

.year-list time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  text-transform: lowercase;
}

.year-list a {
  font-size: 1.08rem;
  line-height: 1.35;
}

.post-header time {
  display: block;
  margin-top: 1.25rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

.post-body {
  max-width: 38rem;
  margin-top: 4rem;
  font-size: 1.18rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.post-body p, .post-body div { margin: 0 0 1.4rem; }

.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
}

.missing-image {
  padding: 1rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.original {
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.post-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  line-height: 1.35;
}

.post-nav .newer { text-align: right; }

.post-nav span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}

@media (max-width: 36rem) {
  .shell {
    width: min(100% - 2rem, 42rem);
    padding-top: 7vh;
  }

  .archive-header, .post-header { margin-top: 3rem; }
  .years, footer { margin-top: 3.5rem; }

  .year {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .year-list li {
    grid-template-columns: 3.8rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .post-body {
    margin-top: 3rem;
    font-size: 1.1rem;
  }

  .post-nav { gap: 1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 140ms ease; }
}
