/* ========== Navigation ========== */
/* Fixed header with blurred background */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(51, 51, 51, 0.3);
  z-index: 1000;
  transition: var(--transition);
}

.navbar {
  padding: 1rem 0;
}

/* Main navigation container */
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Gradient text logo */
.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  z-index: 1002;
}

/* Desktop navigation links */
.desktop-nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

/* Link with animated underline */
.nav-link {
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  font-size: 1.05rem;
}

.nav-link:hover {
  color: var(--secondary-color);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

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

/* Mobile bottom navigation bar */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(15px);
  border-top: 1px solid rgba(79, 195, 247, 0.2);
  padding: 0.8rem 0 calc(0.8rem + env(safe-area-inset-bottom));
  z-index: 1000;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
  justify-content: space-around;
  align-items: center;
}

/* Mobile navigation items */
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.4rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  text-decoration: none;
  border-radius: 12px;
  min-width: 60px;
  position: relative;
  overflow: hidden;
}

/* Gradient hover effect for mobile items */
.mobile-nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(108, 99, 255, 0.1),
    rgba(79, 195, 247, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.mobile-nav-item:hover::before,
.mobile-nav-item:active::before {
  opacity: 1;
}

.mobile-nav-item:hover {
  color: var(--secondary-color);
  transform: translateY(-2px);
}

.mobile-nav-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  transition: all 0.3s ease;
}

/* Active state for navigation items */
.mobile-nav-item.active {
  color: var(--primary-color);
}

.mobile-nav-item.active::before {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  /* Hide desktop nav on mobile */
  .desktop-nav {
    display: none;
  }

  /* Show mobile navigation */
  .mobile-nav {
    display: flex;
  }

  /* Adjust header for mobile */
  .header {
    position: static;
    background-color: transparent;
    backdrop-filter: none;
    border-bottom: none;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .nav-container {
    justify-content: center;
  }

  /* Enhanced mobile logo styling */
  .nav-logo {
    font-size: 1.1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    background-color: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(51, 51, 51, 0.3);
  }

  /* Body padding for mobile nav */
  body {
    padding-bottom: 60px;
  }

  /* Home section adjustments */
  #home {
    padding-top: 4rem;
    min-height: calc(100vh - 85px);
  }
}

/* Desktop-specific styles */
@media (min-width: 769px) {
  .mobile-nav {
    display: none !important;
  }

  .desktop-nav {
    display: flex !important;
  }

  /* Reset header for desktop */
  .header {
    top: 0;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(51, 51, 51, 0.3);
  }

  .nav-container {
    justify-content: space-between;
  }

  .nav-logo {
    font-size: 1.5rem;
    padding: 0;
    background-color: transparent;
    border: none;
    backdrop-filter: none;
  }
}
