@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4.005-roman.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.005-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --ink: #000000;
  --quiet: #6b6b6b;
  --link: #1a3fbf;
  --underline: #a9b8ea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161616;
    --ink: #e9e9e9;
    --quiet: #9a9a9a;
    --link: #93aaff;
    --underline: #4a5a8f;
  }
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Charter, "Iowan Old Style", Georgia, serif;
  font-size: 112.5%;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  max-width: 38rem;
  padding: 14vh 1.25rem 5rem;
}

h1 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.35rem;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 2.75rem 0 0.9rem;
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

em {
  font-style: italic;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

a:hover {
  text-decoration-color: currentColor;
}

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

.intro {
  margin-bottom: 2rem;
}

/* A small print above the name, like an author photo. The hairline keeps the
   bright edges of the photo from dissolving into the white page. */
.portrait {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 1.25rem;
  border-radius: 6px;
  object-fit: cover;
  outline: 1px solid rgba(0, 0, 0, 0.08);
  outline-offset: -1px;
}

@media (prefers-color-scheme: dark) {
  .portrait {
    outline-color: rgba(255, 255, 255, 0.1);
  }
}

.work {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  column-gap: 1.25rem;
  margin-bottom: 1.1rem;
}

.work .where,
.work .what {
  display: block;
}

.work .where {
  grid-column: 2;
}

.work .what {
  grid-column: 2;
}

.work .when {
  color: var(--quiet);
  font-variant-numeric: tabular-nums;
}

.work .what {
  text-wrap: pretty;
}

footer {
  margin-top: 4rem;
  color: var(--quiet);
}

footer p {
  margin: 0;
}

@media (max-width: 40rem) {
  html {
    font-size: 106.25%;
  }

  body {
    padding-top: 4rem;
  }

  .work li {
    grid-template-columns: 1fr;
    row-gap: 0;
    margin-bottom: 1.4rem;
  }

  .work .where,
  .work .what {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: text-decoration-color 120ms ease-out;
  }
}
