/* styles.css — custom styles for a Quarto book/website
   Loaded in addition to the theme set in _quarto.yml */

/* ---------- Variables ---------- */
:root {
  --body-font: "Georgia", "Times New Roman", serif;
  --heading-font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --code-font: "Fira Code", "SFMono-Regular", Consolas, Menlo, monospace;
  --accent: #2c5f9e;
  --muted: #6c757d;
  --code-bg: #f6f8fa;
  --border: #e1e4e8;
}

/* ---------- Typography ---------- */
body {
  font-family: var(--body-font);
  font-size: 1.05rem;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
.sidebar nav,
.quarto-title-block .title {
  font-family: var(--heading-font);
  font-weight: 600;
  line-height: 1.25;
}

h1.title { margin-bottom: 1rem; }

h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

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

/* ---------- Code ---------- */
code, pre, .sourceCode {
  font-family: var(--code-font);
}

code {
  font-size: 0.875em;
  padding: 0.15em 0.35em;
  border-radius: 4px;
  background-color: var(--code-bg);
  color: #c7254e;
}

pre, div.sourceCode {
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

pre code {
  padding: 0;
  background: none;
  color: inherit;
}

/* Code output blocks */
.cell-output pre {
  border-left: 3px solid var(--accent);
}

/* ---------- Callouts ---------- */
.callout {
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

th {
  font-family: var(--heading-font);
  background-color: var(--code-bg);
  text-align: left;
}

th, td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover { background-color: rgba(0, 0, 0, 0.025); }

/* ---------- Figures ---------- */
figure { margin: 2rem 0; }

figure img,
.quarto-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

figcaption,
.figure-caption {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* ---------- Blockquotes ---------- */
blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  border-left: 4px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

/* ---------- Sidebar & navigation ---------- */
.sidebar-navigation .sidebar-item a.active {
  color: var(--accent);
  font-weight: 600;
}

.sidebar-title { font-weight: 700; }

.page-navigation { margin-top: 3rem; }

/* ---------- Footnotes & margins ---------- */
.footnotes { font-size: 0.9rem; color: var(--muted); }

/* ---------- Print ---------- */
@media print {
  a { color: inherit; text-decoration: none; }
  pre, blockquote, figure { page-break-inside: avoid; }
}