@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/EBGaramond-VariableFont_wght.ttf') format('truetype-variations');
}

@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/EBGaramond-Italic-VariableFont_wght.ttf') format('truetype-variations');
}


:root {
  /* Light mode - current colors */
  --eaton-blue-very-dark: #0f1410;
  --eaton-blue-dark: #1e2820;
  --eaton-blue: #96C8A2;
  --eaton-blue-light: #a1ceab;
  --eaton-blue-very-light: #b7ebc3;
  --british-racing-green: #004225; /* British Racing Green */
  --dartmouth-green: #00693e; /* Dartmouth Green */
  --dark: #050a05;
  
  /* Theme variables */
  --bg-color: var(--eaton-blue-light);
  --text-color: var(--eaton-blue-dark);
  --link-color: var(--british-racing-green);
  --link-hover-color: var(--dartmouth-green);
  --selection-bg: var(--dartmouth-green);
  --selection-text: var(--eaton-blue-very-light);
}

[data-theme="dark"] {
  /* Dark mode - inverted */
  --bg-color: var(--eaton-blue-very-dark);
  --text-color: var(--eaton-blue-light);
  --link-color: var(--eaton-blue); /* Slightly less bright for better contrast */
  --link-hover-color: var(--eaton-blue-very-light);
}

/* Text selection highlight */
::selection {
  background-color: var(--selection-bg);
  color: var(--selection-text);
}

/* Firefox compatibility */
::-moz-selection {
  background-color: var(--selection-bg);
  color: var(--selection-text);
}


body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.3; /* Bumped up slightly for readability */
  font-family: 'EB Garamond';
  font-size: 1.5rem;
  margin: 0;
  padding: 2rem 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

main {
  max-width: 68ch;
  margin: 0 auto;
  padding: 3rem 2.5rem;
}

h1 {
  font-size: 1.8em; /* Much more reasonable */
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 1.2em 0;
  line-height: 1.3;
}

h2 {
  font-size: 1.3em;
  font-weight: 700;
  margin: 2em 0 0.8em 0;
  line-height: 1.4;
}

h3 {
  font-size: 1.2em;
  font-weight: 500;
  margin: 1.5em 0 0.6em 0;
  line-height: 1.4;
}

h4 {
  font-size: 1.1em;
  font-weight: 700;
  margin: 1.25em 0 0.4em 0;
  line-height: 1.4;
}

p {
  margin-bottom: 1.2em;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: var(--link-color);
  text-underline-offset: 0.15em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

/* Dark mode toggle button */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--text-color);
  color: var(--bg-color);
  border: none;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0.8;
}

.theme-toggle:hover {
  transform: scale(1.1);
  opacity: 1;
}