:root {
  color-scheme: dark;
  --bg: #020202;
  --text: #f4f1ea;
  --muted: #aaa39a;
  --soft: #d7d1c8;
  --line: rgba(244, 241, 234, 0.16);
  --line-soft: rgba(244, 241, 234, 0.08);
  --accent: #ff4d32;
  --sans:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --serif:
    "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, Cambria,
    "Times New Roman", serif;
  --page: min(100% - 40px, 43rem);
  --measure: 39rem;
  font-family: var(--serif);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: grid;
  grid-template-rows: auto 1fr auto;
  font-family: var(--serif);
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  cursor: pointer;
  text-decoration-color: rgba(244, 241, 234, 0.48);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease;
}

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

a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 0.28rem;
}

p,
h1,
h2,
ul,
figure {
  margin: 0;
}

.site-header,
.site-footer,
.page {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(1.25rem, 3vw, 2rem);
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
  color: var(--text);
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
}

.site-mark img {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
}

.site-nav,
.content-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.55rem;
}

.site-nav {
  justify-content: flex-end;
  color: var(--soft);
  font-family: var(--sans);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.site-nav a,
.content-links a {
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-mark:hover,
.site-nav a:hover,
.content-links a:hover {
  color: var(--accent);
}

.page {
  padding-block: clamp(1.35rem, 4vw, 2.75rem) clamp(4.5rem, 10vw, 7rem);
}

.home-page {
  max-width: var(--measure);
  padding-block: clamp(1rem, 3vw, 2rem) 2.25rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
}

.intro-copy {
  max-width: var(--measure);
  color: var(--soft);
  font-size: clamp(1.06rem, 1.6vw, 1.16rem);
  line-height: 1.62;
}

.intro-copy .opening-line {
  color: var(--text);
  font-size: clamp(1.2rem, 1.9vw, 1.36rem);
  line-height: 1.42;
}

.intro-copy p + p {
  margin-top: 0.95rem;
}

.prose-page {
  display: block;
}

.prose {
  max-width: var(--measure);
}

.development-prose {
  max-width: 48rem;
}

.short-prose {
  max-width: 38rem;
}

.prose h1 {
  margin-bottom: clamp(1.75rem, 5vw, 3rem);
  font-size: clamp(1.85rem, 4.5vw, 2.45rem);
}

.prose h2 {
  margin-top: 3rem;
  margin-bottom: 0.85rem;
  font-family: var(--serif);
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 400;
  letter-spacing: 0;
}

.prose p,
.prose li {
  color: var(--soft);
  font-size: clamp(1rem, 1.35vw, 1.07rem);
  line-height: 1.68;
}

.prose p + p {
  margin-top: 1.35rem;
}

.prose ul {
  padding-left: 1.25rem;
  color: var(--soft);
}

.prose li + li {
  margin-top: 0.8rem;
}

.site-footer {
  padding-block: 0 3.25rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
}

.site-footer p {
  line-height: 1.45;
}

@media (max-width: 720px) {
  :root {
    --page: min(100% - 28px, 46rem);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .page {
    padding-block: 1.75rem 4.5rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
