:root {
  --paper: #ffffff;
  --text: #202421;
  --muted: #69716c;
  --rule: #d8dcd9;
  --accent: #963f2c;
  --accent-dark: #67281b;
  --wash: #f4f6f3;
}

html,
body,
div,
span,
h1,
h2,
h3,
p,
a,
img,
figure,
figcaption,
strong,
ul,
ol,
li,
header,
nav,
main,
article,
section,
hr {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: none;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: Baskerville, Georgia, serif;
  font-size: 19px;
  line-height: 1.58;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

h1,
h2,
h3 {
  font-weight: normal;
  letter-spacing: 0;
}

h1 {
  font-size: 46px;
  line-height: 1.08;
}

h2 {
  font-size: 31px;
  line-height: 1.16;
}

h3 {
  font-size: 23px;
  line-height: 1.25;
}

ul,
ol {
  padding-left: 24px;
}

li {
  margin-bottom: 10px;
}

#wrapper {
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
}

#header {
  padding: 42px 0 24px;
  border-bottom: 1px solid var(--text);
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.site-title {
  font-size: 34px;
  line-height: 1;
}

.site-title a {
  color: var(--text);
}

.site-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-description {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  font-style: italic;
}

.navigation {
  font-size: 17px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 10;
  padding: 7px 10px;
  background: var(--paper);
  color: var(--accent);
}

.skip-link:focus {
  top: 8px;
}

.intro {
  max-width: 700px;
  padding: 54px 0 62px;
  font-size: 22px;
  line-height: 1.52;
}

.intro p + p {
  margin-top: 14px;
}

.intro-contact {
  font-size: 17px;
}

.section-label {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.archive {
  padding-bottom: 80px;
  border-top: 1px solid var(--text);
}

.archive > .section-label {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.post-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  padding: 38px 0 42px;
  border-bottom: 1px solid var(--rule);
}

.post-preview.has-image {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
}

.post-preview-meta,
.post-meta {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.post-preview h3 {
  margin-top: 9px;
  font-size: 31px;
  line-height: 1.16;
}

.post-preview h3 a {
  color: var(--text);
}

.post-preview h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-preview-subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 18px;
  font-style: italic;
}

.post-preview-excerpt {
  max-width: 650px;
  margin-top: 16px;
  color: #3f4641;
  font-size: 18px;
}

.read-more {
  display: inline-block;
  margin-top: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.post-preview-image {
  align-self: start;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--wash);
}

.post-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.post {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 58px 0 80px;
  font-size: 20px;
}

.post-header {
  margin-bottom: 42px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

.post-header h1 {
  margin-top: 12px;
}

.post-subtitle {
  margin-top: 14px;
  color: #4d554f;
  font-size: 22px;
  font-style: italic;
}

.post-meta {
  margin-top: 18px;
}

.post-hero {
  margin-top: 30px;
}

.post-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
}

.post-hero figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.post-content p {
  margin-bottom: 28px;
}

.post-content h2 {
  margin: 50px 0 24px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.post-content h3 {
  margin: 38px 0 18px;
}

.memoir-figure {
  width: min(100%, 680px);
  margin: 40px auto 46px;
  scroll-margin-top: 24px;
  text-align: center;
}

.memoir-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.memoir-media img {
  display: block;
  width: auto;
  max-width: min(100%, 620px);
  height: auto;
  max-height: 380px;
  margin: 0 auto;
  object-fit: contain;
}

.memoir-figure--gallery {
  width: min(850px, calc(100vw - 48px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.memoir-media--gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.memoir-media--gallery img {
  width: auto;
  max-width: none;
  height: min(275px, calc((100vw - 66px) / 3));
  max-height: min(275px, calc((100vw - 66px) / 3));
  margin: 0;
}

.memoir-media--stacked {
  flex-direction: column;
  gap: 22px;
}

.memoir-figure figcaption {
  max-width: 620px;
  margin: 13px auto 0;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.back-link {
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid var(--text);
  font-size: 16px;
}

.error-page {
  padding: 64px 0;
}

@media (max-width: 700px) {
  #wrapper {
    width: min(920px, calc(100% - 30px));
  }

  #header {
    padding: 28px 0 18px;
  }

  .site-title {
    font-size: 28px;
  }

  .site-description {
    font-size: 14px;
  }

  .intro {
    padding: 38px 0 44px;
    font-size: 19px;
  }

  .post-preview,
  .post-preview.has-image {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 0 34px;
  }

  .post-preview-image {
    grid-row: 1;
    width: 100%;
  }

  .post-preview h3 {
    font-size: 27px;
  }

  .post-preview-excerpt {
    font-size: 17px;
  }

  .post {
    padding: 42px 0 60px;
    font-size: 18px;
  }

  .post-header h1 {
    font-size: 37px;
  }

  .post-subtitle {
    font-size: 19px;
  }

  .post-content p {
    margin-bottom: 24px;
  }

  .post-content h2 {
    margin-top: 42px;
    font-size: 27px;
  }

  .memoir-figure {
    margin: 34px auto 40px;
  }

  .memoir-media img {
    max-width: min(100%, 540px);
    max-height: 330px;
  }

  .memoir-figure--gallery {
    width: min(100%, 680px);
    margin-left: auto;
    transform: none;
  }

  .memoir-media--gallery {
    gap: 10px;
  }

  .memoir-media--gallery img {
    width: auto;
    max-width: none;
  }

  .memoir-media--stacked {
    gap: 14px;
  }
}

@media (max-width: 420px) {
  .masthead {
    align-items: flex-start;
  }

  .site-title {
    font-size: 25px;
  }

  .navigation {
    font-size: 15px;
  }

  .post-header h1 {
    font-size: 32px;
  }
}
