@font-face {
  font-family: "IM Fell Great Primer";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/im-fell-great-primer-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "IM Fell Great Primer";
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/im-fell-great-primer-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: light dark;
  --paper: light-dark(#f5eedb, #211b12);
  --paper-deep: light-dark(#ece2c8, #2b2418);
  --ink: light-dark(#332a1e, #e3d7ba);
  --muted: light-dark(#7d6f58, #a3906e);
  --rule: light-dark(#d8cba8, #453a26);
  --rule-strong: light-dark(#c2b184, #605134);
  --accent: light-dark(#8c4a2f, #d18e5f);
  --accent-deep: light-dark(#6b3520, #e2a97e);
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IM Fell Great Primer", Georgia, "Palatino Linotype", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

::selection {
  background: light-dark(#e6d7ae, #46381f);
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: "IM Fell Great Primer", Georgia, serif;
  font-weight: normal;
  color: var(--ink);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

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

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  border-bottom: 4px double var(--rule-strong);
  padding-bottom: 0.6rem;
  margin-bottom: 1.1rem;
}

.site-title {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 2.75rem);
  line-height: 1.1;
}

.site-role {
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
}

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

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

.site-nav a.active {
  color: var(--ink);
}

.site-nav .sep {
  color: var(--muted);
  margin: 0 0.6rem;
}

.theme-toggle {
  border: 0;
  padding: 0.2rem;
  background: none;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.theme-toggle:hover {
  color: var(--ink);
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
}

.page-title {
  font-family: "IM Fell Great Primer", Georgia, serif;
  font-style: italic;
  font-weight: normal;
  font-size: 1.55rem;
  line-height: 1.35;
  margin: 1.6rem 0 0.9rem;
}

.page-copy {
  max-width: 38rem;
  margin: 0 0 0.75rem;
  hanging-punctuation: first;
}

@media (max-width: 30rem) {
  .page-copy {
    hyphens: auto;
  }
}

.page-copy > p:first-child::first-letter {
  float: left;
  font-family: "IM Fell Great Primer", Georgia, serif;
  font-size: 4.5em;
  line-height: 0.65;
  padding-right: 0.08em;
  color: var(--accent);
}

@media (max-width: 30rem) {
  .page-copy > p:first-child::first-letter {
    font-size: 3.5em;
  }
}

.page-copy p {
  margin: 0 0 0.9rem;
}

.page-copy p:last-child {
  margin-bottom: 0;
}

.updated-note {
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.8rem 0 0;
}

.section {
  margin-top: 3rem;
}

.section::before {
  content: "* * *";
  display: block;
  text-align: center;
  color: var(--rule-strong);
  font-size: 0.85rem;
  word-spacing: 0.5em;
  margin-bottom: 1.8rem;
}

.section-title {
  font-size: 1.25rem;
  font-style: italic;
  margin: 0 0 1.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule);
}

.project {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
}

.project:first-child {
  padding-top: 0;
}

.project:last-child {
  border-bottom: none;
}

.project h3 {
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
}

.project h3 a {
  text-decoration: none;
}

.project h3 a:hover {
  text-decoration: underline;
}

.project .byline {
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.project p {
  margin: 0 0 0.5rem;
}

.project .tags {
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 2.2rem 1.6rem;
}

.book-cover {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--rule-strong);
  background: var(--paper-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.7rem;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.no-cover {
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.85rem;
}

.book-title {
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0 0 0.15rem;
}

.book-title a {
  text-decoration: none;
}

.book-title a:hover {
  text-decoration: underline;
}

.book-authors {
  font-style: italic;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.empty-note {
  font-style: italic;
  color: var(--muted);
  margin: 0;
  grid-column: 1 / -1;
}

.theorem {
  max-width: 38rem;
  margin: 0 0 2rem;
  padding: 1.1rem 1.4rem;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.theorem p {
  margin: 0 0 0.6rem;
}

.theorem p:last-child {
  margin-bottom: 0;
}

.theorem .tombstone {
  float: right;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
  text-align: center;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0 0 0.4rem;
}

.site-footer .colophon {
  font-size: 0.8rem;
}
