/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 1000;
  transition: background 0.3s, border-color 0.3s;
}

.nav.scrolled {
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #222;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  padding: 0 4px;
}

.nav-logo .icon { font-size: 1.2rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--accent); background: rgba(168,85,247,0.1); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-toggle:active { background: rgba(255,255,255,0.05); }

/* ─── Mobile ─── */
@media (max-width: 600px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--black, #0a0a0a);
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 16px;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 24px);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 16px 20px;
    width: 100%;
    border-radius: 12px;
    min-height: 56px;
    display: flex;
    align-items: center;
  }

  .nav-links a:active { background: rgba(255,255,255,0.05); }
  .nav-links a.active { background: rgba(168,85,247,0.1); }
}
