header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1100;
  padding: 24px 0;
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(20px);
  padding: 14px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 3;
}

header .container {
  max-width: 100dvw;
}

.menu-toggle {
  display: none;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.55);
}

.menu-toggle-line {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #fff;
}

.btn-header {
  padding: 10px 24px;
  font-size: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-left: 10px;
  backdrop-filter: blur(10px);
}

.btn-header:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 16, 0.55);
  backdrop-filter: blur(14px);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu {
  position: fixed;
  top: 96px;
  left: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 16, 31, 0.88);
  backdrop-filter: blur(24px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  z-index: 2;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.mobile-menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.mobile-menu-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-right: 4px;
  color: rgba(129, 140, 248, 0.95);
}

.mobile-menu-link-accent {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(217, 70, 239, 0.14));
  border-color: rgba(99, 102, 241, 0.35);
}

.mobile-menu-link-accent .mobile-menu-icon {
  color: #fff;
}


.page-shell {
  transition: filter 0.35s ease, opacity 0.35s ease;
}

html.menu-open,
body.menu-open {
  overflow: hidden;
}

body.menu-open .page-shell {
  filter: blur(10px);
  opacity: 0.7;
  pointer-events: none;
  user-select: none;
  -webkit-filter: blur(10px);
}

body.menu-open .mobile-menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.menu-open .mobile-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body.menu-open .menu-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .menu-toggle-line:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .mobile-menu {
    top: 88px;
    left: 16px;
    right: 16px;
    padding: 16px;
    border-radius: 24px;
  }

  .menu-toggle {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
}