:root {
  --bg-light: #ffffff;
  --text-light: #111111;
  --link-light: #0077cc;
  --bg-dark: #0e0e0e;
  --text-dark: #e0e0e0;
  --link-dark: #66ccff;
  --link-dark-hover: #99ddff;

  --font-family: 'Segoe UI', sans-serif;
  --max-width: 800px;
}

body {
  font-family: var(--font-family);
  margin: 0;
  padding: 2rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  background-color: var(--bg-light);
  color: var(--text-light);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

/* Default (dark mode) heading colors */
h1 {
  color: #004080; /* light sky blue */
}

h2 {
  color: #66b2ff; /* medium blue */
}

h3, h4, h5, h6 {
  color: #3399ff; /* deeper blue */
}

/* Light mode overrides */
@media (prefers-color-scheme: light) {
  h1 {
    color: #004080; /* navy blue */
  }

  h2 {
    color: #0066cc; /* strong medium blue */
  }

  h3, h4, h5, h6 {
    color: #1a8cff; /* lighter blue for subheadings */
  }
}


a {
  color: var(--link-light);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code {
  background: #f4f4f4;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

.footer {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #555;
}

/* Dark mode overrides */
body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

body.dark-mode a {
  color: var(--link-dark);
}
body.dark-mode a:hover {
  color: var(--link-dark-hover);
}

body.dark-mode code {
  background-color: #1c1c1c;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 1rem;
  color: #e0e0e0; /* Default dark mode text */
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid #666;
}

th {
  background-color: #222;
  color: #ffc57a;
  font-weight: bold;
}

tr:nth-child(odd) {
  background-color: #181818;
}

tr:nth-child(even) {
  background-color: #111;
}

tr:hover {
  background-color: #333;
}

@media (prefers-color-scheme: light) {
  table {
    color: #111; /* Light mode text color */
  }

  th {
    background-color: #e0e0e0;
    color: #222;
  }

  td {
    border-color: #aaa;
  }

  tr:nth-child(odd) {
    background-color: #fff;
  }

  tr:nth-child(even) {
    background-color: #f6f6f6;
  }

  tr:hover {
    background-color: #ddd;
  }
}
