.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  border-radius: var(--radius-sm);
  background: var(--color-cyan);
  color: #02101d;
  padding: 10px 14px;
  font-weight: 800;
  transition: transform 160ms var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid rgba(112, 224, 255, 0.1);
  background: rgba(3, 6, 19, 0.64);
  backdrop-filter: blur(18px);
  transition: background 220ms var(--ease-out), border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

.site-header.is-scrolled,
.site-header.is-menu-open {
  border-color: rgba(112, 224, 255, 0.22);
  background: rgba(3, 7, 20, 0.86);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.34);
}

.site-header__inner {
  width: min(100% - 48px, var(--container));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(61, 231, 255, 0.58);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 50%, rgba(61, 231, 255, 0.95) 0 3px, transparent 4px),
    conic-gradient(from 120deg, rgba(61, 231, 255, 0.9), rgba(155, 107, 255, 0.88), rgba(77, 140, 255, 0.9), rgba(61, 231, 255, 0.9));
  box-shadow: var(--shadow-neon);
}

.brand__text {
  display: grid;
  gap: 2px;
}

.brand__text strong {
  font-size: 1.08rem;
  letter-spacing: 0;
  line-height: 1.05;
}

.brand__text small {
  color: #c7d7f2;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.1;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 12px;
  transition: color 180ms var(--ease-out), background 180ms var(--ease-out);
}

.primary-nav a:hover {
  background: rgba(112, 224, 255, 0.1);
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.global-search {
  position: relative;
  width: clamp(190px, 18vw, 280px);
}

.global-search__form {
  display: flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid rgba(112, 224, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 11, 28, 0.72);
  overflow: hidden;
}

.global-search__input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-text);
  padding: 0 12px;
  font: inherit;
  font-size: 0.82rem;
}

.global-search__input::placeholder {
  color: rgba(199, 215, 242, 0.58);
}

.global-search__button {
  align-self: stretch;
  border: 0;
  border-left: 1px solid rgba(112, 224, 255, 0.14);
  background: rgba(61, 231, 255, 0.1);
  color: var(--color-cyan);
  padding: 0 12px;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.global-search__form:focus-within {
  border-color: rgba(61, 231, 255, 0.54);
  box-shadow: 0 0 24px rgba(61, 231, 255, 0.14);
}

.global-search__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: min(440px, 92vw);
  border: 1px solid rgba(112, 224, 255, 0.18);
  border-radius: 18px;
  background: rgba(4, 10, 28, 0.98);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.48);
  padding: 10px;
}

.global-search__status {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.global-search__results {
  display: grid;
  gap: 6px;
  max-height: min(460px, 62vh);
  overflow-y: auto;
}

.global-search__result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--color-text);
  padding: 9px;
}

.global-search__result:hover,
.global-search__result[aria-selected="true"],
.global-search__result:focus-visible {
  border-color: rgba(61, 231, 255, 0.34);
  background: rgba(61, 231, 255, 0.08);
  outline: none;
}

.global-search__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  border-radius: 999px;
  background: rgba(155, 107, 255, 0.14);
  color: #c7b5ff;
  padding: 6px 8px;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.global-search__content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.global-search__content strong,
.global-search__content small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search__content strong {
  font-size: 0.9rem;
}

.global-search__content small {
  color: var(--color-muted);
  font-size: 0.76rem;
}

.hero-search--global {
  position: relative;
}

.hero-search--global .global-search__panel {
  left: 0;
  right: auto;
  width: 100%;
  text-align: left;
}

.header-cta,
.mobile-menu__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(61, 231, 255, 0.42);
  border-radius: 999px;
  background: rgba(61, 231, 255, 0.1);
  color: var(--color-text);
  padding: 0 16px;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 22px rgba(61, 231, 255, 0.14);
  transition: border-color 180ms var(--ease-out), background 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.header-cta:hover,
.mobile-menu__cta:hover {
  border-color: rgba(61, 231, 255, 0.72);
  background: rgba(61, 231, 255, 0.16);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(112, 224, 255, 0.22);
  border-radius: 12px;
  background: rgba(9, 18, 38, 0.74);
  color: var(--color-text);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms var(--ease-out), opacity 180ms var(--ease-out);
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  width: min(100% - 32px, var(--container));
  margin: 0 auto 14px;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background: rgba(4, 10, 28, 0.95);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  padding: 14px;
}

.mobile-menu__nav {
  display: grid;
  gap: 4px;
}

.mobile-menu__nav a {
  border-radius: 12px;
  color: var(--color-muted);
  padding: 12px;
}

.mobile-menu__nav a:hover {
  background: rgba(112, 224, 255, 0.1);
  color: var(--color-text);
}

.mobile-menu__cta {
  width: 100%;
  margin-top: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: var(--gradient-primary);
  color: #02101d;
  box-shadow: 0 16px 44px rgba(61, 231, 255, 0.22);
}

.button--ghost {
  border: 1px solid rgba(149, 112, 255, 0.52);
  background: rgba(155, 107, 255, 0.1);
  color: var(--color-text);
}
