:root {
  --bg-color: #f9f3e5;
  --text-color: #333;
  --link-color: #8B0000;
  --table-border: #e0e0e0;
  --table-header-border: #333;
  --table-hover: #f5f5f5;
  --button-bg: #8B0000;
  --button-hover: #6B0000;
  --button-text: white;
  --serif-font: 'Libre Baskerville', serif;
  --sansserif-font: 'Inter', sans-serif;
  --monospace-font: 'IBM Plex Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --link-color: #ff8c8c;
    --table-border: #444;
    --table-header-border: #888;
    --table-hover: #333;
    --button-bg: #ff8c8c;
    --button-hover: #ff6c6c;
    --button-text: black;
  }
}

body {
    background-color: var(--bg-color);
    padding-top: 5%;
    line-height: 2;
    color: var(--text-color);
}
  
h1, h2, h3, h4, h5 {
  font-family: var(--sansserif-font);
  padding-top: 2%;
}

p, a {
  font-family: var(--serif-font);
  text-align: justify;
}

a {
  color: var(--link-color);
}

ul, li { 
  font-family: var(--serif-font);
}

ul.no-bullets {
  list-style-type: none;
  padding: 0 0;
}

li.no-bullets {
  line-height: 1.2;
}

li.no-bullets + li.no-bullets {
    margin-top: 0px;
}

@media (max-width: 1000px) {
  li.no-bullets {
    line-height: 1.5;
    margin-top: 20px;
  }
}

table {
  background-color: var(--bg-color);
  color: var(--text-color);
  border-bottom: 1px solid var(--table-border);
  font-family: var(--sansserif-font);
  width: 100%;
  border-collapse: collapse;
  margin: 3rem 0;
}

th, td {
  padding: 12px 16px;
  text-align: left;
}

th {
  font-weight: 600;
  text-align: center;
  border-bottom: 2px solid var(--table-header-border);
}

tr:hover {
  background-color: var(--table-hover);
}

figcaption {
  font-family: var(--sansserif-font);
  width: 100%;
  font-style: italic;
}

.caption-link {
  font-family: var(--sansserif-font);
  text-decoration: none;
  font-style: italic;
}

.caption-link:hover {
  text-decoration: underline;
}

.title {
  padding-bottom: 0%;
  margin-bottom: 0%;
}

.subtitle {
  font-family: var(--sansserif-font);
  font-style: italic;
  line-height: 0;
  padding-bottom: 3%;
}

.style-button {
  background-color: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 5px 10px;
  font-family: var(--sansserif-font);
  font-weight: 600;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: background-color 0.2s;
}

.style-button:hover {
  background-color: var(--button-hover);
}

#back-to-top {
  opacity: 0;
  visibility: hidden;
  background-color: var(--button-bg);
  color: var(--button-text);
  border: none;
  width: 50px;
  height: 50px;
  right: 20px;
  bottom: 20px;
  font-family: var(--sansserif-font);
  font-weight: 600;
  font-size: 20pt;
  text-align: center;
  border-radius: 4px;
  align-items: center;
  text-decoration: none;
  position: fixed;
  cursor: pointer;
  z-index: 1000;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, background-color 0.3s;
}

#back-to-top:hover {
  background-color: var(--button-hover);
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.clickable-img {
  width: 100%;
  cursor: pointer;
}

video {
  width: 100%;
}

.footnote-ref {
  text-decoration: none;
}

.footnote-ref:hover {
  text-decoration: underline;
}

.footnote-back {
  text-decoration: none;
}

.footnote-back:hover {
  text-decoration: underline;
}

.date {
  font-family: var(--monospace-font);
  padding-right: 20px;
}

@media (max-width: 1000px) {
  .date {
    margin-bottom: 5px;
  }
}

.post-link {
  display: inline-block;
}

#footnotes {
  overflow-wrap: break-word;
  margin-top: 50px;
}

#copyright-notice {
  font-size: 9pt;
  margin-top: 30px;
}

.email {
  color: var(--link-color);
}
