:root {
  --text: #222;
  --muted: #777;
  --background: #fdfdfb;
  --link: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e6e3;
    --muted: #999;
    --background: #161616;
    --link: #ff8a80;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.65;
}

main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.portrait {
  display: block;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
  margin-bottom: 2rem;
}

h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin: 0 0 2rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 3rem 0 1rem;
}

p {
  margin: 0 0 1.4rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

figure {
  margin: 2.5rem 0;
}

figure img,
p img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

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

code {
  font-size: 0.85em;
}

footer {
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.95rem;
}
