:root {
  --bg: #fcfcfc;
  --bg-nav: rgba(252, 252, 252, 0.9);
  --surface-container: #f3f3f3;
  --text-primary: #333333;
  --text-faded: #999999;
  --outline: #e5e5e5;
  --accent: #94a3b8;
  --highlight: #EA4335;
  color-scheme: light;
}

html.dark {
  --bg: #111111;
  --bg-nav: rgba(17, 17, 17, 0.9);
  --surface-container: #1a1a1a;
  --text-primary: #e8e8e8;
  --text-faded: #888888;
  --outline: #262626;
  --accent: #94a3b8;
  --highlight: #EA4335;
  color-scheme: dark;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Geist', sans-serif;
}

html.theme-ready body,
html.theme-ready nav,
html.theme-ready footer,
html.theme-ready #mobile-menu,
html.theme-ready .theme-surface {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.text-faded {
  color: var(--text-faded);
}

.text-charcoal {
  color: var(--text-primary);
}

.bg-offwhite {
  background-color: var(--bg);
}

.theme-nav {
  background-color: var(--bg-nav);
}

.theme-mobile-menu {
  background-color: var(--bg);
}

.theme-surface {
  background-color: var(--surface-container);
}

/* Instant icon state without waiting for JS */
html.dark [data-theme-icon="moon"] {
  display: none;
}

html.dark [data-theme-icon="sun"] {
  display: block;
}

html:not(.dark) [data-theme-icon="moon"] {
  display: block;
}

html:not(.dark) [data-theme-icon="sun"] {
  display: none;
}
