/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(15,17,21,0.55);
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.nav-brand {
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
}

/* === Hamburger Icon === */
.nav-toggle {
  width: 32px;
  height: 26px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 20px; }

/* Animate lines into X when active */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
}

/* === Slide-in menu panel === */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
  transition: color .3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width .3s ease;
}

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

/* === MOBILE PANEL === */
@media (max-width: 850px) {
  .nav-links {
    flex-direction: column;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(15,17,21,0.95);
    backdrop-filter: blur(8px);
    transform: translateY(-100%);
    transition: transform .6s cubic-bezier(0.16,1,0.3,1);
  }

  .nav-links.open { transform: translateY(0); }

  .nav-links li {
    opacity: 0;
    transform: translateY(20px);
    animation: slideFade 0.8s forwards;
  }

  .nav-links li:nth-child(1){animation-delay:0.2s;}
  .nav-links li:nth-child(2){animation-delay:0.35s;}
  .nav-links li:nth-child(3){animation-delay:0.5s;}
  .nav-links li:nth-child(4){animation-delay:0.65s;}
}

@keyframes slideFade {
  to { opacity: 1; transform: translateY(0); }
}
