body {
  margin: 40px auto;
  max-width: 700px;
  line-height: 1.6;
  font-size: 18px;
  background-color: #f5f5f5;
  color: #444;
  padding: 0 10px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

h1, h2, h3 {
  line-height: 1.2;
}

nav {
  margin-bottom: 40px;
}

nav a {
  margin-right: 15px;
  text-decoration: none;
  color: #444;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

nav a:visited {
  color: #444;
}

a:hover {
  color: #004999;
}

footer {
  margin-top: 60px;
  font-size: 14px;
  color: #666;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
  nav a {
    color: #e0e0e0;
  }
  footer {
    color: #999;
  }
  a {
    color: #4da3ff; /* brighter blue for dark backgrounds */
  }
  a:visited {
    color: #c084fc; /* lighter purple with better contrast */
  }
  a:hover {
    color: #82cfff; /* hover highlight */
  }
  nav a:visited {
    color: #e0e0e0; /* same as normal dark nav color */
  }
}

/* Table Styling */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 16px;
}

.simple-table th,
.simple-table td {
  text-align: left;
  padding: 10px 8px;
}

.simple-table thead {
  border-bottom: 2px solid #ccc;
}

.simple-table tbody tr {
  border-bottom: 1px solid #ddd;
}

.simple-table th {
  font-weight: 600;
}

/* Subtle table row hover */
.simple-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Table Dark mode support */
@media (prefers-color-scheme: dark) {
  .simple-table thead {
    border-bottom: 2px solid #555;
  }

  .simple-table tbody tr {
    border-bottom: 1px solid #333;
  }

  .simple-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
}

/* Resize/Center Images To Fit Viewport */
.special-image {
  display: block;
  margin: 20px auto;
  max-width: 100%;
  height: auto;
}

/* Image Captions */
figure {
  margin: 30px auto;
  text-align: center;
}

figure img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

/* Dark Mode Image Captions */
@media (prefers-color-scheme: dark) {
  figcaption {
    color: #aaa;
  }
}
