.nav nav { gap: clamp(18px, 3vw, 52px); }

.language-switch {
  position: relative;
  color: inherit;
  flex: 0 0 auto;
  font: 500 16px/1 Poppins, "Noto Sans SC", sans-serif;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.language-trigger:hover { opacity: .75; }
.language-trigger:focus-visible,
.language-options button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.language-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.language-trigger[aria-expanded="true"] .language-chevron { transform: translateY(2px) rotate(225deg); }

.language-options {
  position: absolute;
  display: grid;
  gap: 4px;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 148px;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .15);
  color: #191919;
}

.language-options[hidden] { display: none; }

.language-options button {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.language-options button:hover,
.language-options button[aria-current="true"] { background: #f0f3f5; }

@media (max-width: 800px) {
  .nav nav.open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 22px 20px;
    background: rgba(23, 30, 34, .97);
    color: #fff;
    box-shadow: 0 14px 24px rgba(0, 0, 0, .2);
  }

  .nav nav.open > a:not(.download) { padding: 13px 0; }
  .nav nav.open .download { align-self: flex-start; margin: 10px 0; }
  .nav nav.open .language-switch { align-self: flex-start; }
  .nav nav.open .language-options { left: 0; right: auto; }
}
