/* ============================================
   📱 Mobile Menu — Hamburger + Overlay
   Completely standalone
   ============================================ */

/* ── Hamburger Button ── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 9999;
  position: relative;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

.hamburger-btn.is-open .hamburger-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.is-open .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.is-open .hamburger-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Mobile Overlay ── */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 16, 0.96);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 120px;
  gap: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── Close Button ── */
.mobile-close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border-2);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1;
}

.mobile-close-btn:hover {
  background: var(--glass-bg-3);
  border-color: var(--accent-red);
  color: var(--accent-red);
  transform: rotate(90deg);
}

[data-theme="light"] .mobile-overlay {
  background: rgba(240, 240, 245, 0.96);
}

/* ── Mobile Nav Links ── */
.mobile-nav-link {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-overlay.is-visible .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-overlay.is-visible .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-overlay.is-visible .mobile-nav-link:nth-child(2) { transition-delay: 0.10s; }
.mobile-overlay.is-visible .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-overlay.is-visible .mobile-nav-link:nth-child(4) { transition-delay: 0.20s; }
.mobile-overlay.is-visible .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }
.mobile-overlay.is-visible .mobile-nav-link:nth-child(6) { transition-delay: 0.30s; }
.mobile-overlay.is-visible .mobile-nav-link:nth-child(7) { transition-delay: 0.35s; }

.mobile-nav-link:hover {
  color: var(--accent-blue);
}

/* ── Show hamburger on mobile ── */
@media (max-width: 1024px) {
  .hamburger-btn {
    display: flex;
  }

  .nav-links {
    display: none !important;
  }

  .nav-cta {
    display: none !important;
  }
}
