@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ---------- page geometry ---------- */

body {
  font-family: "TeX Gyre Pagella", "Palatino Linotype", Palatino, serif;
  color: #2f2a24;
  background: #fcfbf7;
  line-height: 1.55;
  font-size: 1.18rem;
  font-variant-numeric: oldstyle-nums;
  font-feature-settings: "onum" 1, "pnum" 1;
}

/* Make the main page feel more like a book page */
#quarto-content main.content {
  max-width: 72.5rem;
}

/* ---------- headings ---------- */

h1, h2, h3, h4 {
  font-family: "TeX Gyre Pagella", "Palatino Linotype", Palatino, serif;
  font-weight: 500;
  color: #6b1f1f; /* classicthesis-like maroon */
  letter-spacing: 0.03em;
}

h1.title,
h1 {
  font-variant: small-caps;
  font-size: 2.2rem;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(60, 50, 45, 0.35);
}

h2 {
  font-variant: small-caps;
  font-size: 1.55rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  font-style: italic;
  margin-top: 1.5rem;
}

/* ---------- body text ---------- */

p {
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: justify;
}

/* Force classic oldstyle numerals in running text and list items */
p,
li,
dd,
dt,
blockquote,
figcaption,
.column-margin,
.aside {
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-feature-settings: "onum" 1, "pnum" 1;
}

/* Render acronyms in small caps, similar to ClassicThesis */
abbr,
acronym,
.smallcaps {
  font-variant-caps: all-small-caps;
  font-feature-settings: "smcp" 1, "c2sc" 1;
  letter-spacing: 0.04em;
  text-decoration: none;
}

/* optional classic print feel: do not indent first para after headings */
h1 + p, h2 + p, h3 + p {
  text-indent: 0;
}

/* ClassicThesis-style drop cap only for the first paragraph after the title block */
#title-block-header + p::first-letter {
  float: left;
  font-family: "TeX Gyre Pagella", "Palatino Linotype", Palatino, serif;
  font-size: 4.2rem;
  line-height: 0.82;
  padding-right: 0.08em;
  margin-top: 0.06em;
  color: #6b1f1f;
}

/* ---------- links and citations ---------- */

a {
  color: #2f5ea8;   /* royal-blue-ish */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* citation links */
a[role="doc-biblioref"] {
  color: #2d6a2d;   /* green-ish citation color */
}

/* ---------- margin content ---------- */

.column-margin,
.aside {
  color: #5b544c;
  font-size: 0.95rem;
  line-height: 1.35;
}

.column-margin p,
.aside p {
  text-align: left;
}

/* ---------- code ---------- */

code, pre {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92em;
}

/* ---------- figures ---------- */

figure {
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}

figcaption {
  color: #5b544c;
  font-size: 0.95rem;
}

/* ---------- blockquotes ---------- */

blockquote {
  border-left: 2px solid rgba(60, 50, 45, 0.25);
  margin-left: 0;
  padding-left: 1rem;
  color: #5b544c;
  font-style: italic;
}

/* ---------- mobile fallback ---------- */

@media (max-width: 991px) {
  body {
    font-size: 1.08rem;
  }

  #quarto-content main.content {
    max-width: 100%;
  }
}

/* ClassicThesis-style drop cap for the first paragraph after a chapter/title */
h1 + p::first-letter {
  float: left;
  font-family: "EB Garamond", Garamond, serif;
  font-size: 4.2rem;
  line-height: 0.82;
  padding-right: 0.08em;
  margin-top: 0.06em;
  color: #6b1f1f;
}
