:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #767676;
  --rule: #e6e6e6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --text: #ededed;
    --muted: #8a8a8a;
    --rule: #262626;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9375rem;
  line-height: 1.75;
}

main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 6rem 1.25rem 4rem;
}

.avatar {
  display: block;
  width: 12rem;
  height: 12rem;
  margin-bottom: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

h1 {
  margin: 0;
  font-size: inherit;
  font-weight: 600;
}

section {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

h2 {
  margin: 0;
  color: var(--muted);
  font-size: inherit;
  font-weight: 400;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

a::after {
  content: " \2197";
  color: var(--muted);
}

a.internal::after {
  content: none;
}

.back {
  margin-bottom: 2rem;
}

.muted {
  color: var(--muted);
}

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

@media (max-width: 30rem) {
  section {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.post {
  margin-top: 3rem;
}

.post h2 {
  margin: 2.5rem 0 0.75rem;
  color: var(--text);
  font-weight: 600;
}

/* Blog: IBM Plex Mono for the frame (name, headings, dates), Newsreader for reading. */
body.blog {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.post p,
.post .refs {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
}

.post p {
  font-size: 1.15625rem;
  line-height: 1.6;
}

.post .refs {
  font-size: 1rem;
  line-height: 1.55;
}

.post p + p {
  margin-top: 1.25rem;
}

a.cite {
  text-decoration: none;
  color: var(--muted);
}

.refs {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.8125rem;
}

.refs li + li {
  margin-top: 0.5rem;
}

.refs a {
  overflow-wrap: anywhere;
}
