/*
 * ============================================================
 * css/nav.css — Navigation Bar
 * ============================================================
 * Responsible for:
 *   - #nav fixed top bar layout and scroll state (.scrolled)
 *   - .nav-logo display styles
 *   - .nav-links list and individual .nav-links a items
 *     including hover underline animation and .active state
 *   - .nav-back link (used on devblog / admin pages instead
 *     of the full nav-links list)
 * ============================================================
 */

/* ═══════════════════════════════════════════════════════
   7. NAVIGATION
═══════════════════════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--duration-med) ease,
              padding var(--duration-med) ease,
              border-bottom var(--duration-med) ease;
}

/* Scrolled state — applied via JS */
#nav.scrolled {
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(20px);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color var(--duration-fast) ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--duration-med) var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Back/secondary nav link — used on devblog and admin */
.nav-back {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--duration-fast) ease;
}
.nav-back:hover { color: var(--accent); }

/* ── Admin indicator (shown on landing page when authenticated) ── */
.nav-admin-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.nav-admin-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(232,213,163,0.2);
  border-radius: 2px;
}
.nav-admin-badge svg { flex-shrink: 0; }
.nav-admin-link {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--duration-fast) ease;
}
.nav-admin-link:hover { color: var(--accent); }

/* ── Debug dropdown ── */
.nav-debug-wrapper {
  position: relative;
}
.nav-debug-toggle {
  background: none;
  border: none;
  font-family: var(--font-body);
  cursor: none;
}
.nav-debug-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0;
  min-width: 160px;
  display: none;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  z-index: 1100;
}
.nav-debug-dropdown.open {
  display: flex;
}
.nav-debug-item {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.55rem 1rem;
  text-align: left;
  cursor: none;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
}
.nav-debug-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; } /* Add a hamburger menu here if needed */
}
