/* Base Reset */
* {
  margin: 2;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--text);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  color: var(--heading);
  line-height: 1.3;
  margin-bottom: 0.5em;
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1em;
  font-size: 1rem;
}

/* Links */
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Buttons */
button {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6em 1.2em;
  border: none;
  border-radius: 0.5em;
  background-color: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

/* Tables */
table {
  width: 80%;
  border-collapse: collapse;
  margin: 1em 0;
  background-color: var(--table-bg);
  color: var(--text);
}

th, td {
  padding: 0.75em 1em;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  background-color: var(--th-bg);
  color: var(--th-text);
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: var(--tr-alt-bg);
}

/* Utility */
.text-muted {
  color: var(--muted);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5em;
}

/* LIGHT MODE VARIABLES */
:root {
  --bg: #f4f4f6;
  --text: #2d2d2d;
  --heading: #1c1c1c;
  --link: #1d4ed8;          /* Blue-600 */
  --link-hover: #3b82f6;     /* Blue-500 */
  --button-bg: #dbeafe;      /* Blue-100 */
  --button-bg-hover: #bfdbfe;/* Blue-200 */
  --button-text: #1e3a8a;    /* Blue-800 */
  --link-visited: #333333;
  --table-bg: #ffffff;
  --th-bg: #e0e0e0;
  --th-text: #1c1c1c;
  --tr-alt-bg: #f0f0f2;
  --border: #cccccc;
  --muted: #666666;
}

/* DARK MODE OVERRIDES */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e1e;
    --text: #eaeaea;
    --heading: #ffffff;
    --link: #93c5fd;         /* Blue-300 */
    --link-hover: #60a5fa;   /* Blue-400 */
    --button-bg: #1e3a8a;    /* Blue-800 */
    --button-bg-hover: #1d4ed8; /* Blue-600 */
    --button-text: #ffffff;
    --link-visited: #999999;
    --table-bg: #2b2b2b;
    --th-bg: #3a3a3a;
    --th-text: #ffffff;
    --tr-alt-bg: #242424;
    --border: #444;
    --muted: #aaaaaa;
  }
}
