* {
  box-sizing: border-box;
}

html {
  background: #fbfaf7;
  color: #282822;
}

body {
  max-width: 1160px;
  margin: auto;
  padding: 0 clamp(16px, 5vw, 64px);
  font-family: Georgia, serif;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

header, footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

header {
  border-bottom: 1px solid #c8c6bb;
}

header a {
  font: bold 28px Arial, sans-serif;
  letter-spacing: -2.5px;
  text-decoration: none;
}

footer {
  border-top: 1px solid #c8c6bb;
}

header h1 {
  margin: 0;
  font: 400 15px/1.3 Arial, sans-serif;
}

footer, figcaption {
  font: 14px/1.5 Arial, sans-serif;
}

.timeline {
  --heading-width: clamp(150px, 24%, 240px);
  --gutter: clamp(18px, 3vw, 38px);
  margin: 18px 0;
}

.timeline section {
  position: relative;
  display: grid;
  grid-template-columns: var(--heading-width) minmax(0, 1fr);
  padding-bottom: clamp(20px, 3vw, 34px);
  scroll-margin-top: 20px;
}

.timeline section::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 var(--heading-width);
  width: 1px;
  background: #cac7be;
}

.timeline section:first-child::before {
  top: 7px;
}

.timeline section:last-child {
  padding-bottom: 0;
}

.chapter-heading {
  position: sticky;
  top: 24px;
  align-self: start;
  padding-right: var(--gutter);
  text-align: right;
}

.chapter-heading::after {
  content: '';
  position: absolute;
  top: 4px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9a5139;
}

small, dt {
  font: 11px/1.5 monospace;
  letter-spacing: .06em;
  color: #8b422d;
}

small {
  display: block;
}

h2 {
  margin: 5px 0 0;
  font-size: clamp(20px, 2.5vw, 31px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.chapter-content {
  padding-left: var(--gutter);
}

.chapter-content > p {
  max-width: 58ch;
  margin: 0;
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.5;
}

.image-group {
  margin-top: 16px;
}

.image-group:first-child {
  margin-top: 0;
}

.image-group h3 {
  margin: 0 0 6px;
  font: 400 17px/1.35 Arial, sans-serif;
}

.plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.plates--single {
  grid-template-columns: minmax(0, 1fr);
}

.plates--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

figure {
  margin: 0;
}

figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 300px;
}

.plates--single img {
  max-height: 420px;
}

figure a {
  display: block;
  cursor: zoom-in;
}

figcaption {
  margin-top: 4px;
  color: #56564e;
}

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 14px 0;
}

dd {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}

dialog {
  width: min(900px, 94vw);
  padding: 20px;
  border: 0;
  background: #fbfaf7;
}

dialog::backdrop {
  background: #171716cf;
}

dialog img {
  display: block;
  width: 100%;
  height: 65vh;
  object-fit: contain;
}

dialog button {
  display: block;
  margin-left: auto;
  padding: 8px 15px;
  background: white;
  cursor: pointer;
}

dialog p {
  font: 16px/1.5 Arial, sans-serif;
}

@media (max-width: 640px) {
  .timeline {
    --heading-width: clamp(92px, 29%, 145px);
    --gutter: 13px;
  }

  .chapter-heading {
    top: 16px;
  }

  h2 {
    font-size: clamp(16px, 4.5vw, 25px);
  }

  small {
    font-size: 10px;
    letter-spacing: 0;
  }

  .plates, .plates--three, dl {
    grid-template-columns: 1fr;
  }

  dl {
    row-gap: 4px;
  }

  dd + dt {
    margin-top: 8px;
  }
}
