nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.header-brand,
.header-brand:hover,
.header-brand:visited,
.header-brand:active,
.header-brand:focus-visible {
  color: #000;
  text-decoration: none;
}

nav .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.site-navigation {
  position: relative;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-menu a {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-menu a:hover {
  color: var(--teal-light);
}

.site-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
  background: var(--bg-alt);
}

.site-menu-icon,
.site-menu-icon::before,
.site-menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transition: transform 0.2s ease;
}

.site-menu-icon::before {
  transform: translateY(-6px);
}

.site-menu-icon::after {
  transform: translateY(4px);
}

.site-menu-toggle[aria-expanded="true"] .site-menu-icon {
  background: transparent;
}

.site-menu-toggle[aria-expanded="true"] .site-menu-icon::before {
  transform: translateY(1px) rotate(45deg);
}

.site-menu-toggle[aria-expanded="true"] .site-menu-icon::after {
  transform: translateY(-1px) rotate(-45deg);
}

.site-logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  flex: 0 0 28px;
}

@media (max-width: 768px) {
  nav {
    padding: 16px 20px;
  }

  .site-menu-toggle {
    display: block;
  }

  .site-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    display: none;
    min-width: 230px;
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(29, 29, 31, 0.12);
  }

  .site-menu.is-open {
    display: flex;
  }

  .site-menu a {
    padding: 12px;
  }

  .site-menu a:hover {
    background: var(--bg-alt);
  }
}

@media (max-width: 420px) {
  nav {
    padding: 12px;
  }

  nav .logo {
    font-size: 1rem;
  }

  nav .btn {
    padding: 8px 12px !important;
  }

  .site-logo-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }
}
