header {
  background: rgba(10, 10, 15, 0.65);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  transition: all var(--transition-base);
}

header.scrolled {
  padding: 14px 40px;
  background: rgba(10, 10, 15, 0.9);
  box-shadow: 0 4px 30px rgba(139, 92, 246, 0.1);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.4),
    rgba(109, 40, 217, 0.2)
  );
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 8px;
  padding: 8px 12px;
  letter-spacing: 3px;
  animation: logoPulse 2.5s ease-in-out infinite alternate;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

@keyframes logoPulse {
  0% {
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
  }
  100% {
    box-shadow:
      0 0 20px rgba(139, 92, 246, 0.6),
      0 0 40px rgba(139, 92, 246, 0.2);
  }
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.logo-title {
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  color: var(--primary);
  letter-spacing: 2px;
}

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

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition-fast);
}

nav a:hover,
nav a.active {
  color: var(--primary);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary-light),
    var(--accent),
    var(--primary-light)
  );
  border-radius: 2px;
  transition: width var(--transition-fast);
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.6);
}

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 10px;
  z-index: 101;
  transition: all 0.3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.hamburger:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.6);
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-close {
  display: none;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 35px;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    border-left: 1px solid rgba(139, 92, 246, 0.2);
    z-index: 100;
  }

  nav ul.open {
    right: 0;
    z-index: 999;
  }

  nav ul li {
    opacity: 0;
    transform: translateX(30px);
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }

  nav ul.open li {
    opacity: 1;
    transform: translateX(0);
  }

  nav ul.open li:nth-child(1) { transition-delay: 0.1s; }
  nav ul.open li:nth-child(2) { transition-delay: 0.15s; }
  nav ul.open li:nth-child(3) { transition-delay: 0.2s; }
  nav ul.open li:nth-child(4) { transition-delay: 0.25s; }
  nav ul.open li:nth-child(5) { transition-delay: 0.3s; }
  nav ul.open li:nth-child(6) { transition-delay: 0.35s; }

  .nav-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: transparent;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    color: #8b5cf6;
    font-size: 0.8rem;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-close:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    color: #ffffff;
    transform: rotate(90deg);
  }

  header {
    padding: 16px 20px;
  }
}
