.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0;
  padding-left: calc(200 / 1440 * 100%);
  padding-right: calc(200 / 1440 * 100%);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-nav-bg);
}

.nav__left {
  display: flex;
  gap: 40px;
  flex: 0 0 auto;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 0 0 auto;
}

/* EN / SV — the current language is plain text, the other one a link to the same page */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* Same underline as the active nav item */
.lang-switch__current {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-switch__sep {
  color: var(--color-text-dim);
}

.nav .lang-switch a,
.lang-switch a {
  color: var(--color-text);
  font-size: inherit;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.nav .lang-switch a:hover,
.lang-switch a:hover {
  opacity: 1;
}

.nav__center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav a {
  font-size: 16px;
  color: var(--color-text);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 1;
}

.nav__logo {
  display: flex;
  align-items: center;
  opacity: 1 !important;
}

.nav__logo img {
  display: block;
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: light) {
  .nav__logo img {
    filter: brightness(0);
  }
}

.nav a.active {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .nav {
    padding-left: 24px;
    padding-right: 24px;
  }

  .nav__left {
    gap: 20px;
  }

  .nav a {
    font-size: 13px;
  }

  .nav__logo img {
    height: 24px;
  }
}
