/* ═══════════════════════════════════════════════════════════
   WIKAIR shared navigation bar
   Dark navy frost. Load from every page:
   <link rel="stylesheet" href="nav.css">
   Palette: deep navy #081022 · accent #335DCD · mist #A0B4E8
   ═══════════════════════════════════════════════════════════ */

.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  height: 69px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3.5rem;
  padding: 0 2.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(8, 16, 34, 0.75);
  border-bottom: 1px solid rgba(160, 190, 230, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: -30px;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #f0f0f0;
  text-decoration: none;
  font-family: inherit;
}
.nav-brand:hover {
  color: #ffffff;
}
.nav-logo-img {
  height: 2.88rem;
  width: auto;
  display: block;
  pointer-events: none;
}
.nav-logo-text {
  position: relative;
  margin-left: -15px;
}
.nav-logo-text::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #335DCD, #A0B4E8);
  transition: width 0.35s ease;
}
.nav-brand:hover .nav-logo-text::after {
  width: 100%;
}
.nav-links {
  display: flex;
  gap: 2.2rem;
}
.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(240, 240, 240, 0.75);
  text-decoration: none;
  font-family: inherit;
  transition: color 0.3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #335DCD, #A0B4E8);
  transition: width 0.35s ease;
}
.nav-link:hover {
  color: #ffffff;
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link.active {
  color: #ffffff;
}
.nav-link.active::after {
  width: 100%;
  background: #335DCD;
}
.nav-link:focus-visible {
  outline: 2px solid #A0B4E8;
  outline-offset: 3px;
}

/* Hamburger (only present on the homepage) */
.hamburger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid rgba(240, 240, 240, 0.25);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: #f0f0f0;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-bar:has(.hamburger) .nav-links {
    display: none;
    position: absolute;
    top: 69px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    background: rgba(8, 16, 34, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(160, 190, 230, 0.08);
  }
  .nav-bar:has(.hamburger) .nav-links.open {
    display: flex;
  }
  .nav-bar:has(.hamburger) .nav-link {
    padding: 1rem 2.5rem;
    display: block;
  }
  .nav-bar:has(.hamburger) .nav-link::after {
    display: none;
  }
}

/* ---------- touch targets ------------------------------------------------
   Under a finger, 44px is the floor below which taps start missing. The
   hamburger sat at 41x34, which is the one control a phone user cannot avoid.
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hamburger {
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
}
