/* Navigation (toggle, panel) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 0;
  transition: all 0.2s ease;
}

.nav-toggle:focus { outline: 2px solid rgba(255, 255, 255, 0.25); }
.nav-toggle:hover { background: rgba(255, 255, 255, 0.15); }

body.beige-theme .nav-toggle {
  background: rgba(0, 0, 0, 0.08);
  color: #5a5a5a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.beige-theme .nav-toggle:focus { outline: 2px solid rgba(0, 0, 0, 0.25); }
body.beige-theme .nav-toggle:hover { background: rgba(0, 0, 0, 0.15); }

.nav-toggle.active {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

body.beige-theme .nav-toggle.active {
  background: rgba(0, 0, 0, 0.2);
}

/* Theme Toggle Button */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  padding: 0;
}

.theme-toggle:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.1); }
.theme-toggle:focus { outline: 2px solid rgba(255, 255, 255, 0.25); }

/* Main nav - desktop layout */
.main-nav {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  padding: 1rem 2rem;
  background: transparent;
  position: relative;
  transition: none;
  z-index: 100;
}

/* Link styles - desktop */
.main-nav a {
  padding: 0.5rem 0;
  border-bottom: 3px solid transparent;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.main-nav a:hover, 
.main-nav a.active { 
  border-color: white; 
  color: white; 
}

.nav-close {
  display: none;
}

/* ==================== MOBILE STYLES ==================== */
@media (max-width: 700px) {
  .nav-toggle { 
    display: flex !important; 
  }
  
  .theme-toggle { 
    right: 70px; 
  }

  /* Mobile nav panel with glass morphism */
  .main-nav {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 75% !important;
    max-width: 300px !important;
    height: 100vh !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3), inset 1px 0 rgba(255, 255, 255, 0.1) !important;
    z-index: 140 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    flex-direction: column !important;
    gap: 0 !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
  }

  .main-nav.open {
    transform: translateX(0) !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Mobile nav close button with glass morphism */
  .nav-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-size: 20px !important;
    cursor: pointer !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 1rem 0 0.5rem 1rem !important;
    flex-shrink: 0 !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  }

  .nav-close:hover { 
    transform: rotate(90deg) scale(1.1) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
  }

  .nav-close:active {
    transform: rotate(90deg) scale(0.95) !important;
  }

  /* Mobile nav links */
  .main-nav a {
    display: block !important;
    padding: 1rem 1rem !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    margin: 0 !important;
  }

  .main-nav a:last-of-type { 
    border-bottom: none !important; 
  }

  .main-nav a:hover,
  .main-nav a.active {
    background-color: rgba(255, 255, 255, 0.08) !important;
    padding-left: 1.5rem !important;
    border-left: 3px solid #fff !important;
  }

  .profile-header { 
    justify-content: center !important; 
    gap: 1.5rem !important; 
    padding-left: 0 !important; 
    flex-direction: column !important; 
  }

  .profile-img { 
    width: 80px !important; 
    height: 80px !important; 
  }
}

/* ==================== DESKTOP STYLES ==================== */
@media (min-width: 760px) {
  .nav-toggle { 
    display: none !important; 
  }
  
  .nav-close { 
    display: none !important; 
  }
  
  .main-nav { 
    display: flex !important; 
    position: relative !important; 
    right: auto !important; 
    height: auto !important; 
    width: 100% !important; 
    transform: none !important; 
    pointer-events: auto !important; 
    opacity: 1 !important;
    visibility: visible !important;
  }

  .main-nav a {
    border-bottom: 3px solid transparent !important;
    border-left: none !important;
  }

  .main-nav a:hover,
  .main-nav a.active {
    border-bottom-color: white !important;
    border-left: none !important;
    background-color: transparent !important;
  }
}

/* Base link styling */
.main-nav a, 
.nav-toggle, 
.nav-close { 
  text-decoration: none; 
}
