:root {
  /* High contrast academic color scheme (Light Mode) */
  --primary: #C41E3A;
  --primary-dark: #9B1528;
  --primary-light: #E63946;
  --primary-foreground: #ffffff;
  --secondary: #2C3E50;
  --background: #ffffff;
  --foreground: #1a1a1a;
  --muted: #f5f5f5;
  --muted-foreground: #333333;
  --card: #ffffff;
  --border: #cccccc;
  --radius: 0.25rem;
  --accent: #8B0000;
}

/* Dark mode color scheme - system preference only */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #E63946;
    --primary-dark: #ff5a67;
    --primary-light: #C41E3A;
    --primary-foreground: #1a1a1a;
    --secondary: #4A5F7F;
    --background: #1a1a1a;
    --foreground: #f5f5f5;
    --muted: #2a2a2a;
    --muted-foreground: #cccccc;
    --card: #242424;
    --border: #444444;
    --accent: #ff6b6b;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  line-height: 1.75;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  font-weight: 400;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.font-serif {
  font-family: serif;
  font-weight: 600;
}

/* High contrast link styling */
a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-dark);
  text-decoration-thickness: 3px;
}

a:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.5;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  text-decoration: none;
}

.btn-secondary {
  border-color: var(--foreground);
  background: var(--background);
  color: var(--foreground);
}

.btn-secondary:hover {
  background: var(--muted);
  text-decoration: none;
}

/* Focus states for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Header - always dark background */
.header {
  background: #1a1a1a;
  color: #ffffff;
  padding: 1rem 0;
  border-bottom: 4px solid var(--primary);
}

.header a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
}

.header a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Cards */
.card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

/* Footer - always dark background */
footer {
  background: #1a1a1a !important;
  color: #ffffff !important;
  padding: 2rem 1rem;
  text-align: center;
  border-top: 4px solid var(--primary);
}

footer * {
  color: #ffffff !important;
}

footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: left;
  margin-bottom: 2rem;
}

footer h3,
footer h4 {
  color: #E63946 !important;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

footer p {
  color: #ffffff !important;
  line-height: 1.6;
}

footer a {
  color: #ffffff !important;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

footer a:hover {
  color: #E63946 !important;
  text-decoration-thickness: 3px;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer li {
  margin-bottom: 0.5rem;
}

footer .footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

footer iframe {
  border: none;
  width: 100%;
  height: 300px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--foreground);
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
}

th {
  background: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 1rem;
  border: 2px solid var(--border);
}

td {
  padding: 1rem;
  border: 1px solid var(--border);
}

tbody tr:hover {
  background: rgba(196, 30, 58, 0.05);
}

/* Badges */
.badge,
.year-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Section spacing */
section {
  padding: 4rem 1rem;
}

.section-alt {
  background: var(--muted);
}

/* High contrast form inputs */
input[type="text"],
input[type="search"],
select,
textarea {
  border: 2px solid var(--border);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
}

input[type="text"]:hover,
input[type="search"]:hover,
select:hover,
textarea:hover {
  border-color: var(--primary);
}
