/* header.css — Premium Floating Glass Pill */

.header {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1080px; /* Aligns perfectly with main container */
  z-index: 1000;
  /* Hardware-accelerated smooth transitions */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* Smart Auto-Hide Logic */
.header.header--hidden {
  transform: translate(-50%, -150%);
  opacity: 0;
  pointer-events: none;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px; /* Slimmer, modern height */
  padding: 0 24px;
  background: var(--bg-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 100px; /* Perfect pill shape */
  box-shadow: var(--glass-highlight), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.logo a {
  display: flex;
  align-items: center;
  outline: none;
}

.main-logo-img {
  height: 64px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.1));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.logo a:hover .main-logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.3));
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 100px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.3px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Premium Active State: Solid contrast with subtle glow */
.nav-link.active {
  color: #000;
  background: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.nav-link.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* ── Mobile Responsiveness ── */
@media (max-width: 768px) {
  .header {
    top: 16px;
    width: calc(100% - 32px); /* Tighter margins on mobile */
  }

  .header-content {
    height: 56px;
    padding: 0 16px; /* Reduced inner padding */
  }

  .main-logo-img {
    height: 50px; /* Slightly smaller logo */
  }

  .main-nav {
    gap: 2px;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 6px 12px;
  }
}

/* Ultra-small phones */
@media (max-width: 380px) {
  .nav-link {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}