/* Public site header — scoped to .nexus-navbar to avoid Bootstrap / style.css wars */

.nexus-navbar {
  --nav-h: 64px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  height: var(--nav-h);
  background: rgba(5, 8, 14, 0.94);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nexus-nav-spacer {
  height: 64px;
}

.nexus-nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--nav-h);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.nexus-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  text-decoration: none;
  min-height: 44px;
}

.nexus-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.nexus-wordmark {
  font-family: Orbitron, Manrope, sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: var(--chrome);
  white-space: nowrap;
}

.nexus-pro {
  background: linear-gradient(180deg, #00CCFF 0%, #0055FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nexus-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nexus-burger {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}

.nexus-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nexus-panel {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 1rem;
}

.nexus-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nexus-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.7rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  position: relative;
}

.nexus-link:hover,
.nexus-link:focus-visible {
  color: var(--text-primary);
  background: rgba(0, 168, 255, 0.08);
  outline: none;
}

.nexus-link.is-active {
  color: var(--accent-color);
}

.nexus-link.is-active::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 4px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

.nexus-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.nexus-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border-color);
}

.nexus-icon-btn span {
  display: none;
}

.nexus-icon-btn:hover,
.nexus-icon-btn:focus-visible {
  color: var(--accent-color);
  background: rgba(0, 168, 255, 0.1);
  outline: none;
}

.nexus-text-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.7rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}

.nexus-text-btn:hover,
.nexus-text-btn:focus-visible {
  color: var(--text-primary);
  outline: none;
}

.nexus-text-btn.is-active {
  color: var(--accent-color);
}

.nexus-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 0.95rem;
  background: var(--gradient-primary);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 168, 255, 0.28);
}

.nexus-cta:hover,
.nexus-cta:focus-visible {
  color: #ffffff !important;
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.nexus-cta:active {
  transform: scale(0.98);
}

.nexus-dim {
  display: none;
}

.nexus-brand:hover,
.nexus-brand:focus-visible {
  color: var(--chrome) !important;
  outline: none;
}

.nexus-brand:focus-visible,
.nexus-burger:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (max-width: 1023.98px) {
  .nexus-navbar {
    --nav-h: 56px;
  }

  .nexus-nav-spacer {
    height: 56px;
  }

  .nexus-burger {
    display: flex;
  }

  .nexus-panel {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem 1rem 1.1rem;
    background: rgba(8, 12, 20, 0.98);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    z-index: 2;
  }

  .nexus-toggle:checked ~ .nexus-panel {
    display: flex;
  }

  .nexus-toggle:checked ~ .nexus-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nexus-toggle:checked ~ .nexus-burger span:nth-child(2) {
    opacity: 0;
  }

  .nexus-toggle:checked ~ .nexus-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nexus-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .nexus-link {
    min-height: 44px;
    padding: 0 0.9rem;
    font-size: 0.95rem;
  }

  .nexus-link.is-active::after {
    display: none;
  }

  .nexus-link.is-active {
    background: rgba(0, 168, 255, 0.12);
  }

  .nexus-actions {
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
  }

  .nexus-icon-btn {
    width: auto;
    min-height: 44px;
    padding: 0 0.9rem;
    gap: 0.45rem;
    flex: 1 1 calc(50% - 0.25rem);
  }

  .nexus-icon-btn span {
    display: inline;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .nexus-text-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-height: 44px;
    justify-content: center;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
  }

  .nexus-cta {
    flex: 1 1 100%;
    min-height: 44px;
  }

  .nexus-dim {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 14, 0.55);
    z-index: 1;
  }

  .nexus-toggle:checked ~ .nexus-dim {
    display: block;
  }
}

@media (max-width: 420px) {
  .nexus-brand-tool {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nexus-burger span,
  .nexus-cta,
  .nexus-link {
    transition: none;
  }
}

body.nexus-nav-open {
  overflow: hidden;
}
