:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #595959;
  --display: 'Cormorant Garamond', 'Times New Roman', serif;
  --text: 'EB Garamond', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #a6a6a6;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--text);
  font-size: 1.25rem;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

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

.site-title {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 3.75rem);
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

.subtitle {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1.3;
  margin: 0 0 1.25rem;
}

.byline {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 3.5rem;
}

.post-body p {
  margin: 0 0 1.15em;
  hyphens: auto;
  text-wrap: pretty;
}

.post-body h2 { font-size: 2.1rem; margin: 2.6em 0 0.6em; }
.post-body h3 { font-size: 1.6rem; margin: 2em 0 0.5em; }

.post-body blockquote {
  margin: 1.6em 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--fg);
  font-style: italic;
}
.post-body blockquote p { margin-bottom: 0.6em; }

.post-body ul, .post-body ol { padding-left: 1.5rem; margin: 0 0 1.15em; }
.post-body li { margin-bottom: 0.4em; }

.post-body hr {
  border: 0;
  text-align: center;
  margin: 2.5em 0;
}
.post-body hr::after { content: "\2767"; font-size: 1.4rem; }

.post-body img { max-width: 100%; height: auto; }

.post-body code {
  font-size: 0.85em;
  border: 1px solid var(--muted);
  padding: 0 0.25em;
}

/* Drop cap on the first paragraph; turn off per post with `dropcap: false` */
.dropcap > p:first-of-type::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 500;
  font-size: 5em;
  line-height: 0.74;
  padding: 0.06em 0.09em 0 0;
}

/* Reference markers and the list at the bottom */
sup a.footnote {
  text-decoration: none;
  font-size: 0.8em;
  padding: 0 0.08em;
}

.footnotes {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--fg);
  font-size: 1.05rem;
  line-height: 1.5;
}
.footnotes::before {
  content: "References";
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.8rem;
  margin-bottom: 0.9rem;
}
.footnotes ol { padding-left: 1.5rem; margin: 0; }
.footnotes li { margin-bottom: 0.7rem; }
.footnotes p { margin: 0; hyphens: manual; overflow-wrap: anywhere; }
.footnotes a.reversefootnote { text-decoration: none; margin-left: 0.25em; }

/* Home page */
.home-title { margin-bottom: 3rem; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { margin-bottom: 2.25rem; }
.post-list a {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
}
.post-list a:hover { text-decoration: underline; }
.post-list time { display: block; color: var(--muted); font-size: 1.05rem; margin-top: 0.2rem; }

@media (max-width: 30rem) {
  body { font-size: 1.15rem; }
  .wrap { padding-top: 1.75rem; }
  .site-header { margin-bottom: 3rem; }
}
