header {
  position: fixed;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 6%;
  transition: 0.4s;
}

header.scrolled {
  padding: 10px 6%;
  border-bottom: 1px solid var(--border);
  background: rgba(3, 10, 26, 0.8);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.brand small {
  display: block;
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 2px;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

nav a.link {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  transition: 0.3s;
}

nav a.link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: 0.3s;
}

nav a.link:hover,
nav a.link.active {
  color: white;
}

nav a.link:hover::after,
nav a.link.active::after {
  width: 100%;
}

.burger {
  position: relative;
  display: none;
  width: 30px;
  height: 22px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: white;
  transition: 0.3s;
}

.burger span:nth-child(1) {
  top: 0;
}

.burger span:nth-child(2) {
  top: 10px;
}

.burger span:nth-child(3) {
  top: 20px;
}

.burger.open span:nth-child(1) {
  top: 10px;
  transform: rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  top: 10px;
  transform: rotate(-45deg);
}

@media (max-width: 960px) {
  .burger {
    display: block;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 75%;
    height: 100vh;
    border-left: 1px solid var(--border);
    background: rgba(3, 10, 26, 0.98);
    backdrop-filter: blur(18px);
    transition: 0.5s;
  }

  nav.open {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 28px;
  }

  nav a.link {
    font-size: 1.2rem;
  }
}