.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  min-height: var(--header-height);
  grid-template-columns: minmax(300px, auto) 1fr auto;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid rgba(24, 231, 255, 0.16);
  padding: 0.8rem max(1.25rem, calc((100vw - var(--max)) / 2));
  background: rgba(2, 7, 17, 0.84);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  overflow-x: hidden;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
  font-weight: 950;
}

.brand-logo,
.footer-logo {
  border: 1px solid rgba(24, 231, 255, 0.48);
  border-radius: 50%;
  object-fit: cover;
  background: rgba(2, 7, 17, 0.86);
  box-shadow: 0 0 0 4px rgba(24, 231, 255, 0.035), var(--glow);
}

.brand-logo {
  width: 58px;
  height: 58px;
}

.brand-copy {
  display: grid;
  gap: 0.18rem;
}

.brand-copy strong {
  line-height: 1;
}

.brand-copy small {
  max-width: 290px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.25;
}

.main-nav,
.footer-links {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.36rem;
}

.main-nav {
  justify-content: center;
}

.main-nav a,
.footer-links a {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.55rem 0.72rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.main-nav a:hover,
.footer-links a:hover,
.main-nav a[aria-current] {
  transform: translateY(-1px);
  border-color: rgba(24, 231, 255, 0.22);
  background: rgba(24, 231, 255, 0.08);
  color: var(--teal);
}

.header-tools {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: flex-end;
}

.header-cta {
  min-height: 38px;
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}

.language-switcher {
  display: inline-flex;
  gap: 0.18rem;
  align-items: center;
  border: 1px solid rgba(24, 231, 255, 0.28);
  border-radius: var(--radius);
  padding: 0.22rem;
  background:
    linear-gradient(135deg, rgba(24, 231, 255, 0.09), rgba(7, 93, 255, 0.1)),
    rgba(3, 10, 24, 0.82);
  box-shadow: inset 0 0 18px rgba(24, 231, 255, 0.06), 0 0 22px rgba(7, 93, 255, 0.12);
}

.language-option {
  min-width: 42px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.language-option:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 231, 255, 0.24);
  color: #ffffff;
  background: rgba(24, 231, 255, 0.08);
}

.language-option[aria-pressed="true"] {
  border-color: rgba(24, 231, 255, 0.58);
  background: linear-gradient(135deg, rgba(24, 231, 255, 0.28), rgba(7, 93, 255, 0.46));
  color: #ffffff;
  box-shadow: 0 0 18px rgba(24, 231, 255, 0.24);
}

.site-footer {
  display: flex;
  min-height: 136px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(24, 231, 255, 0.16);
  padding: 1.4rem max(1.25rem, calc((100vw - var(--max)) / 2));
  background: rgba(2, 7, 17, 0.78);
  color: var(--muted);
}

.footer-brand {
  display: flex;
  max-width: 560px;
  align-items: center;
  gap: 0.9rem;
}

.footer-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}

.footer-brand > div {
  display: grid;
  gap: 0.3rem;
}

.site-footer strong,
.footer-brand strong {
  color: var(--ink);
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .header-tools {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: relative;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-copy small {
    max-width: 210px;
    font-size: 0.68rem;
  }

  .header-tools {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
  }

  .header-cta,
  .language-switcher {
    flex: 1;
  }

  .language-switcher {
    justify-content: space-between;
  }

  .language-option {
    min-width: 38px;
    flex: 1;
  }

  .site-footer,
  .footer-brand {
    align-items: flex-start;
    flex-direction: column;
  }
}
