/* Theme system: dark (default) / light + toggle button styles */

/* Light mode variable overrides */
html[data-theme="light"] {
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F4F4EE;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.16);
  --gold: #A0824A;
  --gold-light: #C5A065;
  --gold-dim: rgba(160,130,74,0.12);
  --text: #161616;
  --text-dim: #4B5563;
  --text-muted: #6B7280;
}

/* Override hardcoded rgba values from inline styles in light mode */
html[data-theme="light"] .nav {
  background: rgba(250,250,247,0.85) !important;
}
html[data-theme="light"] .tech-bg {
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px) !important;
}
html[data-theme="light"] .scanline {
  background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0) 50%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.5)) !important;
  opacity: 0.04 !important;
}
html[data-theme="light"] .mod-card {
  background: rgba(255,255,255,0.7) !important;
}
html[data-theme="light"] .mod-card:hover {
  background: rgba(255,255,255,1) !important;
}
html[data-theme="light"] .nav-pn:hover {
  background: rgba(0,0,0,0.04) !important;
}
html[data-theme="light"] #gate {
  background: var(--bg);
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-strong);
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  margin-left: 14px;
}
.theme-toggle:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.theme-toggle i {
  font-size: 11px;
}
.theme-toggle .theme-toggle-label {
  display: inline;
}
@media (max-width: 700px) {
  .theme-toggle {
    margin-left: 8px;
    padding: 6px 8px;
  }
  .theme-toggle .theme-toggle-label {
    display: none;
  }
}

/* Smooth transition between themes */
html, body, .nav, .mod-card, .nav-pn, .footer {
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
