/* English-site only: language switch + a few typography tweaks for longer English labels.
   Does not change shared Chinese CSS. Keep the mobile thin bar (logo + hamburger) intact. */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-switch a {
  color: #8B949E;
  text-decoration: none;
  padding: 2px 0;
}

.lang-switch a:hover {
  color: #FFFFFF;
}

.lang-switch a[aria-current="page"] {
  color: #4DD4AC;
  pointer-events: none;
}

.lang-switch-sep {
  color: #8B949E;
  opacity: 0.7;
}

/* Drawer: put the switch on its own row so it does not sit in the 48px top bar. */
.lang-switch--panel {
  display: flex;
  margin: 16px 0 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(64, 201, 255, 0.15);
}

.lang-switch--panel a {
  color: #8B949E;
}

header nav .lang-switch,
.nav .lang-switch,
body > nav .lang-switch {
  margin-left: 12px;
}

header nav ul.nav-links .lang-switch {
  margin-left: 0;
}

.lang-switch-item {
  list-style: none;
}

/* Home hero: English tagline is longer than 智造/未来 */
html[lang="en"] .hero h1 {
  font-size: clamp(32px, 6vw, 84px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 18ch;
}

html[lang="en"] .hero .subtitle {
  max-width: 820px;
}

/* Desktop pill nav: English labels need a bit more wrap room */
html[lang="en"] .nav {
  gap: 18px;
  padding: 8px 18px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100vw - 32px);
}

html[lang="en"] body > nav {
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100vw - 32px);
  row-gap: 8px;
}

@media (max-width: 919px) {
  /* Language switch lives in the drawer, not the thin top bar. */
  header nav .lang-switch,
  .nav .lang-switch,
  body > nav > .lang-switch,
  header nav ul.nav-links .lang-switch {
    /* mobile.css already hides desktop nav; keep this as a safety net */
  }
}
