/* Keep the hamburger centered against the shell header, not a guessed offset. */
@media (min-width: 1025px) {
  body.shell-page .desktop-works-menu {
    position: fixed !important;
    top: 39px !important;
    right: 190px !important;
    z-index: 100003 !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(16px, 1.5vw, 26px);
    max-width: calc(100vw - 410px);
    transform: translateY(-50%);
    white-space: nowrap;
  }

  body.shell-page .desktop-works-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 2px;
    position: relative;
    color: rgba(203, 228, 239, 0.78);
    font-size: clamp(11px, 0.8vw, 14px);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s ease, text-shadow 0.2s ease;
  }

  body.shell-page .desktop-works-menu a::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 2px;
    left: 2px;
    height: 1px;
    background: #5dd7ff;
    box-shadow: 0 0 8px rgba(93, 215, 255, 0.65);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
  }

  body.shell-page .desktop-works-menu a:hover,
  body.shell-page .desktop-works-menu a:focus-visible {
    color: #5dd7ff;
    text-shadow: 0 0 12px rgba(93, 215, 255, 0.42);
  }

  body.shell-page .desktop-works-menu a:hover::after,
  body.shell-page .desktop-works-menu a:focus-visible::after {
    transform: scaleX(1);
  }

  body.shell-page .desktop-works-menu a.is-active {
    color: #5dd7ff;
    text-shadow: 0 0 12px rgba(93, 215, 255, 0.42);
  }

  body.shell-page .hamburger {
    top: 39px !important;
    transform: translateY(-50%) !important;
  }
}

@media (max-width: 1024px) {
  body.shell-page .desktop-works-menu {
    display: none !important;
  }

  body.shell-page .hamburger {
    top: calc(env(safe-area-inset-top, 0px) + 30px) !important;
    transform: translateY(-50%) !important;
  }
}

/* ===== Language dropdown: shows the current language, reveals the other one on hover ===== */
body.shell-page .lang-switch {
  position: fixed;
  top: 39px;
  right: 92px;
  z-index: 100004;
  transform: translateY(-50%);
}

body.shell-page .lang-current {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 12px;
  box-sizing: border-box;
  background: rgba(6, 22, 36, 0.8);
  border: 1px solid rgba(93, 215, 255, 0.25);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #5dd7ff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

body.shell-page .lang-chev { transition: transform 0.25s ease; }

body.shell-page .lang-switch:hover .lang-current,
body.shell-page .lang-switch.is-open .lang-current,
body.shell-page .lang-current:focus-visible {
  border-color: rgba(93, 215, 255, 0.6);
  box-shadow: 0 0 14px rgba(93, 215, 255, 0.18);
  outline: none;
}

body.shell-page .lang-switch:hover .lang-chev,
body.shell-page .lang-switch.is-open .lang-chev { transform: rotate(180deg); }

body.shell-page .lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 100%;
  padding-top: 8px; /* invisible hover bridge */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

body.shell-page .lang-switch:hover .lang-menu,
body.shell-page .lang-switch.is-open .lang-menu,
body.shell-page .lang-switch:focus-within .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

body.shell-page .lang-menu button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
  text-align: left;
  background: rgba(6, 22, 36, 0.94);
  border: 1px solid rgba(93, 215, 255, 0.25);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(214, 238, 247, 0.9);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.shell-page .lang-menu button:hover,
body.shell-page .lang-menu button:focus-visible {
  color: #5dd7ff;
  border-color: rgba(93, 215, 255, 0.6);
  background: rgba(10, 36, 56, 0.96);
  outline: none;
}

/* Only the language you can switch to is offered. */
body.shell-page .lang-menu button.is-active { display: none; }

@media (max-width: 1024px) {
  body.shell-page .lang-switch {
    top: calc(env(safe-area-inset-top, 0px) + 30px);
    right: 72px;
  }
}
