#site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  pointer-events: none;
  transform: translateY(0);
  transition: transform 0.32s ease;
}

#site-header.is-hidden {
  transform: translateY(calc(-100% - 12px));
}

#site-header .header-bar {
  padding-top: 14px;
}

#site-header.is-scrolled .header-inner {
  background: rgba(12, 12, 18, 0.78);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#site-header .container {
  position: relative;
}

#site-header .header-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 14px;
  border-radius: 22px;
  background: rgba(18, 18, 24, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

#site-header .header-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);

  transition: all 0.25s ease;
}

#site-header .header-brand img {
  width: 70%;
  height: auto;
  opacity: 0.95;
}

#site-header .header-nav {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
}

#site-header .header-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px;
  border-radius: 22px;
  background: rgba(18, 18, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#site-header .header-nav li {
  margin: 0;
}

#site-header .header-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.4rem;
  font-weight: 500;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

#site-header .header-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

#site-header .header-nav li.active a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

#site-header .mobile-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#site-header .mobile-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: #ffffff;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

#site-header.is-open .header-nav {
  display: block;
}

#site-header.is-open .mobile-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#site-header.is-open .mobile-toggle span:nth-child(2) {
  opacity: 0;
}

#site-header.is-open .mobile-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#site-header.is-scrolled .header-inner {
  background: rgba(12, 12, 18, 0.78);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
  #site-header .header-bar {
    padding-top: 18px;
  }

  #site-header .header-inner {
    min-height: 68px;
    padding: 10px 12px 10px 16px;
    border-radius: 24px;
  }

  #site-header .mobile-toggle {
    display: none;
  }

  #site-header .header-nav {
    position: static;
    display: block;
    left: auto;
    right: auto;
    top: auto;
  }

  #site-header .header-nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  #site-header .header-nav a {
    position: relative;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 1.3rem;
  }

  #site-header .header-nav li.active a {
    background: rgba(255, 255, 255, 0.08);
  }

  #site-header .header-nav li.active a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(135deg, #8d8ad8 0%, #666ab0 100%);
  }
}