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

:root {
  --bg: #fff;
  --text: #171717;
  --muted: #525252;
  --line: #d4d4d4;
  --prose-line-height: 1.625;
  --font-serif: "Source Serif 4", ui-serif, Georgia, Cambria, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-serif);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

h1, h2 {
  margin: 0;
}

p {
  margin-block: 0.75em;
}

h1 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 500;
}

a {
  color: inherit;
  text-decoration-color: var(--line);
  text-underline-offset: 0.25rem;
  transition: text-decoration-color 0.15s;
}

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

::selection {
  color: var(--text);
  background: var(--line);
}

.page {
  max-width: 36rem;
  margin: 2.5rem auto;
  padding-inline: 1.5rem;
}

.bio {
  max-width: 50ch; /* isolated intro reads tight; .post p stays at .page width */
  line-height: var(--prose-line-height);
}

.bio strong {
  font-weight: 500;
}

.links {
  display: grid;
  gap: 0.25rem;
  margin-top: 1.5rem;
}

.links a {
  width: fit-content;
}

.posts {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}

.posts h2 {
  margin-bottom: 0.125rem;
  font-size: 1.125rem;
  font-weight: 500;
}

time {
  color: var(--muted);
  font-size: 0.875rem;
}

.back {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s;
}

.back:hover {
  color: var(--text);
}

.post header {
  margin-bottom: 2.5rem;
}

.post h1 {
  line-height: 1.25;
}

.post p {
  line-height: var(--prose-line-height);
}

.post h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 500;
}

@media (min-width: 40rem) {
  .post h1 {
    font-size: 1.875rem;
  }
}
