:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #20261f;
  --muted: #566052;
  --accent: #344c37;
  --rule: #deded3;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.125rem / 1.6 var(--serif);
}

.page {
  width: min(46rem, calc(100% - clamp(3rem, 9vw, 7rem)));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}

.site-header a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.24em;
}

.site-header a:hover {
  text-decoration: underline;
}

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

.wordmark {
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -0.035em;
}

nav {
  font-size: 0.875rem;
  font-weight: 520;
}

.bio {
  padding-block: clamp(3.75rem, 10vw, 6.75rem) clamp(3.25rem, 8vw, 4.875rem);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.45rem, 8.8vw, 4.65rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.067em;
  overflow-wrap: anywhere;
}

.bio p {
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  line-height: 1.45;
}

.writing {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 5rem;
}

h2 {
  width: fit-content;
  scroll-margin-top: 1.5rem;
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.writing p {
  margin-top: 0.65rem;
  color: var(--muted);
}

@media (max-width: 38rem) {
  .site-header {
    min-height: 4.25rem;
  }

  h1 {
    max-width: 11ch;
    letter-spacing: -0.055em;
  }

  .writing {
    padding-top: 1.65rem;
  }
}
