/* Dark mode CSS variables and theme system */

:root {
  --bg: #fafafa;
  --text: #1f2933;
  --muted: #6b7280;
  --accent: #2563eb;
  --border: #e5e7eb;
  --nav-bg: #ffffff;
  --card-bg: #ffffff;
}

html.dark {
  --bg: #0f172a;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --border: #334155;
  --nav-bg: #1e293b;
  --card-bg: #1e293b;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.3s, color 0.3s;
}

/* Mobile menu transitions */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

#mobile-menu.open {
  max-height: 500px;
}

@media (min-width: 768px) {
  #mobile-menu {
    display: none !important;
  }
}

/* Dark mode toggle button */
.dark-mode-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Navigation styling */
nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.nav-link {
  color: var(--text);
}

/* Card backgrounds */
.card-bg {
  background: var(--card-bg);
}
