/* Imported Fonts */
.crimson-text-regular {
  font-family: "Crimson Text", serif;
  font-weight: 400;
  font-style: normal;
}

.crimson-text-semibold {
  font-family: "Crimson Text", serif;
  font-weight: 600;
  font-style: normal;
}

.crimson-text-bold {
  font-family: "Crimson Text", serif;
  font-weight: 700;
  font-style: normal;
}

.crimson-text-regular-italic {
  font-family: "Crimson Text", serif;
  font-weight: 400;
  font-style: italic;
}

.crimson-text-semibold-italic {
  font-family: "Crimson Text", serif;
  font-weight: 600;
  font-style: italic;
}

.crimson-text-bold-italic {
  font-family: "Crimson Text", serif;
  font-weight: 700;
  font-style: italic;
}

/* Global reset and baseline */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Colors */
:root {
  --bg-color: #ffffff;
  --text-color: #252525;
  --link-color: #252525;
}

[data-theme="dark"] {
  --bg-color: #000000;
  --text-color: #ffffff;
  --link-color: #ffffff;
}

[data-theme="dark"] img {
  filter: invert(1);
}

/* Base layout */
body {
   background-color: var(--bg-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    font-family: Georgia;
    font-size: 15px;
    line-height: 1.6;
    text-align: justify;
    hyphens: auto;
    color: var(--text-color);
}

.site-header {
    text-align: center;
    padding: 1rem 0;
    color: var(--text-color);
}

.site-header img {
    max-width: 150px;   /* adjust */
    height: auto;
}

.page-title h1 {
    font-family: Crimson Text;
    font-style: italic;
    font-size: 45px;
    margin-top: 0.2rem;
    margin-bottom: 0.3rem;
    text-align: center;
    color: var(--text-color);
}

.page-title h2 {
    color: var(--text-color);
}

.subtitle {
    text-align: center;
    font-style: italic;
    font-size: 14px;
    margin-top: 0;        /* eliminates extra gap */
    margin-bottom: 1rem;  /* space before the rest of the text */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
}

/* Hyperlinks */
a {
  text-decoration: underline; /* always underlined */
    color: var(--link-color);
}

a:hover {
  text-decoration: none;      /* remove underline on hover */
    color: var(--link-color);
}

/* Icon for Dark Mode */
.theme-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;

  background-color: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--text-color);
  border-radius: 50%;

  width: 3rem;
  height: 3rem;

  font-size: 1.2rem;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  opacity: 0.8;
}

/* Bullet Points */
ul, ol {
  margin-left: 1.5em;
  padding-left: 1.5em;
}

/* Equations */
.equation-row {
  display: grid;
  grid-template-columns: 1fr 3ch; /* 3ch comfortably fits "(99)" */
  align-items: center;
  margin: 1em 0;
}

.equation {
  text-align: center;
}

.eq-number {
  text-align: right;
}
