/* 📚 Charter Font Family */
@font-face {
  font-family: 'Charter';
  src: url('https://luthebold.github.io/fonts/charter/charter_regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Charter';
  src: url('https://luthebold.github.io/fonts/charter/charter_italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Charter';
  src: url('https://luthebold.github.io/fonts/charter/charter_bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Charter';
  src: url('https://luthebold.github.io/fonts/charter/charter_bolditalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* 🔧 Core Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 🔧 Root Variables */

:root {
  --background-color: #ded8cc;
  --text-color: #4b4b4b;
  --heading-color: #1f1b1a;
}

/* ✍️ Auto Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #181514;
    --text-color: #b4b4b4;
    --heading-color: #ddd9d4;

  }
}

/* ✍️ Body Text */
body {
  font-family: 'Charter', 'Georgia', serif;
  font-size: 18px;
  line-height: 1.5;
  background: var(--background-color);
  color: var(--text-color);
  padding: 2.5rem 1.25rem;
  max-width: 68ch;
  margin: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  hanging-punctuation: first last;
  font-feature-settings: "liga", "kern", "onum", "pnum";
}

/* 🪶 Paragraph Rhythm */
p {
  margin-bottom: 1.5rem;
}

/* 🧱 Headings */
h1, h2, h3 {
  color: var(--heading-color);
  font-weight: 700;
  line-height: 1.25;
  margin: 2.5rem 0 1rem;
  font-feature-settings: "liga", "kern";
}
h1 {
  font-size: 2.4rem;
  letter-spacing: -0.015em;
}
h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
}
h3 {
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 600;
}

/* 🔗 Links */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* 📷 Images + Figures */
img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
}

figure {
  margin: 2rem 0;
  text-align: center;
}

figcaption {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 0.5rem;
  font-style: italic;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* 📌 Lists */
ul {
  list-style-type: disc;
  list-style-position: outside;
  padding-left: 1.25em;
  margin: 1.5rem 0;
}

ul li {
  margin-bottom: 0.4rem;
}

/* 📱 Mobile Optimization */
@media (max-width: 700px) {
  body {
    font-size: 17px;
    line-height: 1.55;
    padding: 1.5rem 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  figure {
    margin: 1.5rem 0;
  }

  img {
    margin: 1.5rem auto;
  }
}
