
/* ===== Base typography ===== */


body {
  background-color: #f4f1ea;
  color: #2a2a2a;
  line-height: 1.75;
  font-size: 18px;
}

.page {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);  
  border-radius: 4px;
  background: white;
}

.markdown-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem;
  font-family: "PT Serif", Georgia, serif;
  background: white;
}

/* ===== navbar ===== */

.site-nav {
  font-family: "Special Elite", monospace;
  font-size: 0.85em;
  letter-spacing: 0.03em;
  padding-top: 0.5em;
  padding-right: 0.5em;

  text-align: right;
  margin: 1.5rem 0 0.5rem 0;
  font-size: 0.9em;
}

.site-nav a {
  color: rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline 1px rgba(0, 0, 0, 0.5);
  text-underline-offset: 5px;
}

.site-nav a:hover.active {
  text-decoration: underline 1px rgba(122, 0, 0, 0.4);
  text-underline-offset: 5px;
}

.site-nav .active {
  font-weight: 700;
  color: #7a0000;
  cursor: default;
}

.nav-sep {
  margin: 0 0.5em;
  color: rgba(0, 0, 0, 0.5);
  font-family: "Special Elite", monospace;
}

/* ===== Headings ===== */

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  font-family: "PT Serif", Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  color: #7a0000;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.markdown-body h1 {
  font-size: 2.4rem;
  letter-spacing: -0.01em;
}

.markdown-body h2 {
  font-size: 1.6rem;
  color: #444;
}

.markdown-body h3 {
  font-size: 1.25rem;
  color: #555;
}

/* ===== Paragraphs ===== */

.markdown-body p {
  margin: 1.2em 0;
  text-align: justify;
  hyphens: auto;
}

/* First paragraph emphasis */
.markdown-body p:first-of-type {
  font-size: 1.05em;
}

/* Optional: elegant drop cap */
.markdown-body h2 + p::first-letter {
  float: left;
  font-size: 3em;
  line-height: 0.9;
  margin-right: 0.1em;
  color: #7a0000;
}


/* ===== Links ===== */

.markdown-body a {
  color: #7a0000;
  text-decoration: underline dotted rgba(122, 0, 0, 0.4);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.markdown-body a:hover {
  color: #7a0000;
  text-decoration-color: #7a0000;
  text-decoration: underline rgba(122, 0, 0, 0.4);
}

/* ===== Blockquotes ===== */

.markdown-body blockquote {
  margin: 2em 0;
  padding-left: 1.5em;
  border-left: 3px solid #ddd;
  color: #555;
  font-style: italic;
}

/* author line aligns to the right */
.markdown-body blockquote p:last-child {
  text-align: right;
}

/* ===== Code ===== */

.markdown-body code {
  font-family: "Courier New", monospace;
  background: #f4f4f4;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.markdown-body pre {
  background: #f4f4f4;
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
}

/* ===== Lists ===== */

.markdown-body ul,
.markdown-body ol {
  margin: 1.5em 0;
  padding-left: 2em;
}

.markdown-body li {
  margin: 0.4em 0;
}

/* Remove bullets from ANY checklist-like list */
.markdown-body ul.task-list,
.markdown-body ul:has(input[type="checkbox"]) {
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  accent-color: #7a0000 !important; /* matches your link color */
}

/* Kill marker explicitly */
.markdown-body ul.task-list li::marker,
.markdown-body ul:has(input[type="checkbox"]) li::marker {
  content: "" !important;
}

/* Safety: also remove list style from items */
.markdown-body li.task-list-item {
  list-style: none !important;
}

/* ===== Horizontal rules ===== */

.markdown-body hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 3em 0;
}

/* ===== Footnotes ===== */

.markdown-body .footnotes {
  font-size: 0.9em;
  color: #444;
  margin-top: 3em;
  border-top: 1px solid #ddd;
  padding-top: 1em;
}

.markdown-body .footnotes {
  border-top: none;
}

/* Hide default HR */
.markdown-body hr {
  display: none;
}

/* Footnotes container */
.markdown-body .footnotes {
  margin-top: 3em;
  position: relative;
}

/* Horizontal line */
.markdown-body .footnotes::before {
  content: "";
  display: block;
  border-top: 1px solid #7a0000;
  margin: 3em 0;
}

/* Centered label */
.markdown-body .footnotes::after {
  content: "Footnotes";
  position: absolute;
  left: 50%;
  padding: 0 1em;
  font-style: italic;
  background: white;
  letter-spacing: 0.05em;
  font-size: 0.95em;
  color: #7a0000;
  top: calc(3.5em - 0.1em);
  transform: translateX(-50%);
}

/* ===== Bibliography ===== */

#refs {
  margin-top: 2em;
  font-size: 0.95em;
}

.csl-entry {
  margin-bottom: 0.8em;
}

/* ===== TOC ===== */

.toc {
  margin: 2em 0;
  padding: 1.5em;
  border: 1px solid #eee;
  background: #faf9f6;
  border-radius: 6px;
}

.toc h2 {
  margin-top: 0;
}

.toc ul {
  list-style: none;
  padding-left: 1em;
}

.markdown-body .toc a {
  color: #444;
  text-decoration: underline dotted rgba(122, 0, 0, 0.4);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;}

.markdown-body .toc a:hover {
  color: #7a0000;
  text-decoration: underline #7a0000;
  text-underline-offset: 3px;
}

/* ===== Author line ===== */

.author {
  font-style: italic;
  color: #666;
  margin-bottom: 2em;
}

/* ===== Site footer ===== */


.site-footer {
  padding-top: 2em;
  border-top: 1px solid #ddd;

  text-align: center;
  font-size: 0.8em;
  color: #666;
}


.footer-links {
  margin-top: 0.5em;
}

.footer-links a {
  color: #7a0000;
  text-decoration: underline dotted rgba(122, 0, 0, 0.35);
  text-underline-offset: 3px;
}

.footer-links a:hover {
  text-decoration: underline dotted #7a0000;
}

.footer-meta {
  margin-top: 0.5em;
  font-size: 0.8em;
  color: #999;
}

/* ===== Figures ===== */

figcaption {
  font-size: 0.8em;
  color: #555;
  text-align: center;
  margin-top: 0.5em;
  text-align: center;
}

/* ===== Tables ===== */

caption {
  font-size: 0.8em;
  color: #555;
  text-align: center;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  text-align: center;
}

.markdown-body table {
  display: block;
  width: fit-content;
  border-collapse: collapse !important;
  margin: 2em auto !important;
  font-size: 0.95em !important;
  max-width: 100% !important;
}



/* Remove heavy GitHub borders */
.markdown-body table,
.markdown-body th,
.markdown-body td {
  border: none !important;
}

/* Subtle horizontal rules only */
.markdown-body thead tr {
  border-bottom: 2px solid #7a0000 !important;
}

.markdown-body tbody tr {
  border-bottom: 1px solid #ddd !important;
}

.markdown-body tbody tr:last-child {
  border-bottom: none !important;
}

/* Cell spacing */
.markdown-body th,
.markdown-body td {
  padding: 0.4em 0.6em !important;
  text-align: left !important;
}

/* Header styling */
.markdown-body th {
  font-weight: 700 !important;
  color: #7a0000 !important;
}

/* Align numbers nicely  */
.markdown-body td {
  vertical-align: top !important;
}

/* Subtle row striping  */
.markdown-body tbody tr:nth-child(even) {
  background-color: #faf9f6 !important;
}

/* ===== Subtle polish ===== */



::selection {
  background: #faf9f6;
  color: #000;
}

::-moz-selection {
  background: #faf9f6;
  color: #000;
}


* {
  text-rendering: optimizeLegibility;
}
