@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #fbfaf7;
  --ink: #1d1c1a;
  --muted: #6d6a64;
  --rule: #e3e0d8;
  --accent: #1f4e8c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151514;
    --ink: #e9e6e0;
    --muted: #9c988f;
    --rule: #2e2d2a;
    --accent: #9dbdea;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Charter, "Iowan Old Style", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 47rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-bottom: 4.5rem;
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
}

nav a {
  text-decoration-color: transparent;
}

section {
  scroll-margin-top: 1.5rem;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

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

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

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

header {
  max-width: 36rem;
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

header p + p {
  margin-top: 1rem;
}

.contact a,
footer a {
  margin-right: 1.25rem;
}

section {
  margin-top: 4.5rem;
}

h2 {
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}

article {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  margin-top: 1.75rem;
}

time {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.95rem;
  color: var(--muted);
}

h3 {
  font-size: inherit;
  font-weight: 600;
  line-height: 1.6;
}

article p {
  max-width: 36rem;
}

figure {
  margin-top: 1.1rem;
  margin-bottom: 0.75rem;
}

img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.pair img {
  aspect-ratio: 1;
  object-fit: cover;
}

figcaption {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

footer {
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 1rem;
  color: var(--muted);
}

footer p + p {
  margin-top: 0.4rem;
}

@media (max-width: 40rem) {
  body {
    font-size: 1.0625rem;
  }

  main {
    padding: 1.25rem 1.25rem 3.5rem;
  }

  nav {
    margin-bottom: 2.75rem;
  }

  section {
    margin-top: 3.5rem;
  }

  article {
    display: block;
  }

  time {
    display: block;
    line-height: 1.4;
  }
}
