/* =============================================
   NIXBIT — NAV
   ============================================= */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 0 clamp(20px, 5vw, 60px);
  height: 68px;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s ease, border-color 0.35s ease;
}
.nav.scrolled {
  background: rgba(10,10,10,0.97);
}
html.light .nav {
  background: rgba(245,245,247,0.85);
}
html.light .nav.scrolled {
  background: rgba(245,245,247,0.97);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.nav-logo-img {
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
  background: #000;
}

.nav-links {
  display: flex;
  gap: 52px;
  margin-left: 16px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--grad);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border-radius: 6px;
  transition: var(--transition);
}
.nav-cta:hover { opacity: 0.85; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  padding: 24px clamp(20px, 5vw, 60px);
  gap: 20px;
  z-index: 99;
  transform: translateY(-20px);
  opacity: 0;
  transition: var(--transition);
}
.nav-mobile.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.nav-mobile a {
  font-size: 1rem;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.nav-mobile a:last-child { border-bottom: none; }

/* ── THEME TOGGLE SWITCH ── */
.theme-switch {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  transition: border-color var(--transition);
}
.theme-switch:hover { border-color: rgba(255,255,255,0.2); }

.theme-switch-icon {
  display: none; /* hide old emoji icons */
}

.theme-btn {
  width: 30px;
  height: 28px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  color: var(--text-dim);
}
.theme-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
/* Dark mode active = moon lit */
#themeBtnDark {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
#themeBtnLight {
  background: transparent;
  color: var(--text-dim);
}
/* Light mode active = sun lit */
html.light #themeBtnDark {
  background: transparent;
  color: var(--text-dim);
}
html.light #themeBtnLight {
  background: rgba(0,0,0,0.07);
  color: var(--text);
}
html.light .theme-switch {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.12);
}
html.light .theme-switch:hover { border-color: rgba(0,0,0,0.25); }

/* hide old track/thumb */
.theme-switch-track { display: none; }
.theme-switch-thumb { display: none; }

/* ── LIGHT MODE NAV ── */
html.light .nav-links a { color: #444; }
html.light .nav-links a:hover { color: #0d0d0d; }
html.light .nav-logo { color: #0d0d0d; }
