/* ============================================
   NAVIGATION BAR
   Fixed top navigation with responsive behavior
   ============================================ */

nav, .navbar {
  /* Layout */
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;

  /* Visual */
  background: var(--nav-bg);
  backdrop-filter: blur(0.625rem);
}


/* ============================================
   LOGO
   ============================================ */

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--nav-logo-color);
  letter-spacing: 0.0625rem;
  cursor: pointer;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover {
  color: var(--color-text-white);
}


/* ============================================
   NAVIGATION LINKS
   Desktop navigation menu
   ============================================ */

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.875rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  /* Typography */
  position: relative;
  color: var(--color-text-white);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  
  /* Animation */
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links li a:hover {
  text-shadow: 0 0 1.25rem var(--nav-link-shadow);
}


/* ============================================
   LINK UNDERLINE EFFECT
   Animated underline on hover
   ============================================ */

.nav-links li a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -0.3125rem;
  width: 0;
  height: 0.1875rem;
  background: var(--nav-link-underscore);
  border-radius: 0.125rem;
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links li a:hover::after {
  width: 100%;
  animation: expandFromCenter 0.3s ease-out;
}

@keyframes expandFromCenter {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
  }
  50% {
    opacity: 0.5;
    transform: translateX(-50%) scaleX(1.1);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
}


/* ============================================
   HAMBURGER MENU
   Mobile menu toggle (hidden on desktop)
   ============================================ */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 1.875rem;
  height: 1.5625rem;
  cursor: pointer;
  z-index: 11;
}

.hamburger .line {
  background-color: var(--color-text-white);
  height: 0.25rem;
  width: 100%;
  border-radius: 0.3125rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger animation when open */
nav.open .hamburger .line:nth-child(1) {
  transform: rotate(45deg) translate(0.3125rem, 0.3125rem);
}

nav.open .hamburger .line:nth-child(2) {
  opacity: 0;
}

nav.open .hamburger .line:nth-child(3) {
  transform: rotate(-45deg) translate(0.3125rem, -0.3125rem);
}


/* ============================================
   SOCIAL ICONS
   Header social media links
   ============================================ */

.social-icons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.social-icons i {
  width: 2.1875rem;
  height: 2.1875rem;
  font-size: 2.1875rem;
  color: var(--social-icon-color);
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.social-icons i:hover {
  color: var(--social-icon-hover);
  transform: scale(1.1);
}


/* ============================================
   RESPONSIVE DESIGN
   Mobile navigation adjustments
   ============================================ */

@media (max-width: 48rem) {
  nav {
    padding: 0.75rem 1.25rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .nav-links {
    gap: 1rem;
    margin-left: 1.25rem;
    width: 100%;
    justify-content: flex-end;
  }

  .nav-links li a {
    font-size: 0.8rem;
  }

  .social-icons i {
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
  }
}
