html,
body {
  overflow-x: hidden;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  width: 100%;
  min-height: 68px;
  border-bottom: 1px solid rgba(139, 169, 255, .22);
  background: rgba(5, 7, 13, .9);
  backdrop-filter: blur(18px);
  overflow: clip;
}

.nav .wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 24px;
}

.nav-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #f3f7ff;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1;
  white-space: nowrap;
  min-width: max-content;
  max-width: none;
  overflow: visible;
  position: relative;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.brand:hover {
  color: #f6fbff;
  text-shadow: 0 0 18px rgba(99, 230, 168, .18);
}

.brand span:last-child {
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(71, 180, 255, .55);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 28px rgba(71, 180, 255, .34);
  animation: markBreath 4.8s ease-in-out infinite;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  overflow: hidden;
}

.brand:hover .mark {
  transform: translateY(-1px) scale(1.045);
  border-color: rgba(99, 230, 168, .68);
  box-shadow: 0 0 34px rgba(71, 180, 255, .44), 0 0 22px rgba(99, 230, 168, .18);
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 155, 69, .7);
  transform: rotate(45deg);
  animation: markCore 9s linear infinite;
}

.mark::after {
  inset: 14px;
  border-color: rgba(157, 124, 255, .8);
  background: rgba(71, 180, 255, .45);
  animation-direction: reverse;
  animation-duration: 7s;
}

.nav-links {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: #aab7cc;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(99, 230, 168, .82), rgba(71, 180, 255, .72), rgba(255, 178, 71, .5));
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease, opacity 220ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #f3f7ff;
}

.nav-links a.is-active,
.nav-links a[aria-current="page"] {
  color: #f3f7ff;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.is-active::after,
.nav-links a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.menu-button {
  display: none;
}

@keyframes markBreath {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(71, 180, 255, .22), 0 0 0 rgba(255, 155, 69, 0);
    border-color: rgba(71, 180, 255, .5);
  }
  50% {
    box-shadow: 0 0 30px rgba(71, 180, 255, .38), 0 0 22px rgba(255, 155, 69, .18);
    border-color: rgba(255, 155, 69, .55);
  }
}

@keyframes markCore {
  from { transform: rotate(45deg); }
  to { transform: rotate(405deg); }
}

@media (max-width: 1040px) {
  .nav-inner { gap: 14px; }
  .nav-links {
    gap: 12px;
    font-size: 13px;
  }
}

@media (max-width: 940px) {
  .menu-button {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 24px;
    right: 24px;
    top: 62px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid rgba(139, 169, 255, .25);
    border-radius: 14px;
    background: rgba(7, 11, 20, .96);
    white-space: normal;
  }

  .nav.open .nav-links {
    display: flex;
  }
}

@media (max-width: 820px) {
  body { padding-top: 0; }

  .nav {
    position: sticky;
  }

  .nav .wrap {
    padding: 0 18px;
  }

  .nav-inner {
    min-height: 64px;
  }

  .brand span:last-child {
    font-size: 15px;
  }
}
