/* Compact terminal-style language controls in both themes. */
.language-switch { display: inline-flex; flex-shrink: 0; border: 1px solid var(--line); border-radius: 3px; padding: 2px; gap: 2px; background: var(--cream); }
.language-switch button { display: grid; place-items: center; min-width: 34px; min-height: 38px; padding: 0 6px; border: 0; border-radius: 1px; background: transparent; color: var(--muted); font: 11px/1 var(--mono); cursor: pointer; }
.language-switch button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.language-switch button:hover { box-shadow: inset 0 0 0 1px var(--line); }
.language-switch button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.welcome-language { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.welcome-language .language-switch button { min-width: 40px; }
.nav-wrap { gap: 20px; }
#navigation { gap: 24px; }
.header-controls { gap: 10px; }
@media (max-width: 1120px) {
  .header-controls { margin-left: auto; }
  .nav-wrap { height: 76px; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 6px; background: none; border: 1px solid var(--line); width: 44px; height: 44px; border-radius: 3px; padding: 11px; flex-shrink: 0; }
  .menu-toggle span { height: 1px; width: 20px; background: var(--ink); transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  #navigation { display: none; position: absolute; top: 100%; left: 0; width: 100%; padding: 24px; background: var(--cream); border-bottom: 1px solid var(--line); align-items: stretch; flex-direction: column; gap: 0; box-shadow: 0 20px 20px #00000012; }
  #navigation.open { display: flex; }
  #navigation > a:not(.button) { padding: 16px 0; font-size: 15px; }
  #navigation .button { margin-top: 13px; justify-content: center; }
  html[data-theme="dark"] #navigation { background: #101010; border-color: var(--line); box-shadow: 0 20px 20px #00000030; }
}
@media (max-width: 600px) {
  .nav-wrap { width: calc(100% - 32px); height: 73px; gap: 8px; }
  .nav-wrap .brand { font-size: 21px; gap: 7px; }
  .nav-wrap .brand-icon { width: 24px; height: 24px; }
  .header-controls { gap: 6px; }
  .theme-toggle { width: 58px; padding: 9px 7px; }
  .theme-toggle::before { width: 24px; height: 24px; top: 9px; left: 3px; }
  html[data-theme="dark"] .theme-toggle::before { transform: translateX(27px); }
  .language-switch button { min-width: 29px; padding-inline: 4px; }
  html[lang="en"] .terminal-command { white-space: normal; }
}
@media (max-width: 360px) {
  .nav-wrap .brand { font-size: 19px; gap: 6px; }
  .nav-wrap .brand-icon { width: 20px; height: 20px; }
  .header-controls { gap: 5px; }
  .header-controls .language-switch { gap: 0; }
  .header-controls .language-switch button { min-width: 27px; }
  .header-controls .theme-toggle { width: 44px; justify-content: center; }
  .header-controls .theme-toggle::before { display: none; }
  .header-controls .theme-moon { display: none; }
  html[data-theme="dark"] .header-controls .theme-sun { display: none; }
  html[data-theme="dark"] .header-controls .theme-moon { display: block; color: var(--ink); }
  .welcome-body { padding: 20px; }
}
