/* Fixed language URLs stay stable; the neutral entry selects a preference. */
.language-switch {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line, #dce4df);
  border-radius: 5px;
  background: var(--surface, #f1f5f2);
  font: 11px/1.5 var(--sans, sans-serif);
}
.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 3px;
  color: var(--muted, #58645e);
  text-decoration: none;
  white-space: nowrap;
}
.language-switch a[aria-current="page"] {
  color: #182411;
  background: var(--lime, #d8eadc);
  font-weight: 600;
}
.language-switch a:hover { color: var(--text, #18251f); }
.language-switch a[aria-current="page"]:hover { color: #182411; }
.nav-actions { gap: 16px; }
.seo-header > nav { flex-wrap: wrap; }
.toolbar .language-switch { margin-left: auto; }

html[lang="en"] .hero h1 {
  white-space: normal;
  font-size: clamp(40px, 4.2vw, 60px);
  line-height: 1.17;
  letter-spacing: -2px;
}
html[lang="en"] .hero-description { max-width: 530px; line-height: 1.85; }
html[lang="en"] .hero-proofline { grid-template-columns: 1fr 1fr 1.25fr; }
html[lang="en"] .hero-proofline strong { font-size: 23px; }
html[lang="en"] .desktop-nav { gap: clamp(12px, 1.4vw, 22px); }
html[lang="en"] .graph-node { font-size: 10px; }
html[lang="en"] .graph-controls button { padding-inline: 10px; }
html[lang="en"] .service-name h3 { line-height: 1.4; }
html[lang="en"] .service-description p { line-height: 1.85; }
html[lang="en"] .project-kicker { flex-wrap: wrap; gap: 7px 12px; }
html[lang="en"] .project-content h3 { line-height: 1.4; }
html[lang="en"] .project-angle strong { line-height: 1.65; }
html[lang="en"] .timeline-date { flex-wrap: wrap; }
html[lang="en"] .toolkit-column li { font-size: 11px; line-height: 2.5; }
html[lang="en"] .lab-step strong,
html[lang="en"] .lab-step small,
html[lang="en"] .case-flow b,
html[lang="en"] .case-flow span { overflow-wrap: anywhere; }
html[lang="en"] .case-decision p { line-height: 1.85; }
html[lang="en"] .case-dialog .dialog-bottom .text-link { white-space: nowrap; }
html[lang="en"] .commerce-diagram strong,
html[lang="en"] .quant-diagram strong { font-size: 12px; line-height: 1.5; }
html[lang="en"] .commerce-diagram span,
html[lang="en"] .quant-diagram span { font-size: 9px; line-height: 1.6; }
html[lang="en"] .workflow-diagram em { font-size: 8px; }
html[lang="en"] .contact-copy h2 { max-width: 760px; }

@media (max-width: 1100px) {
  html[lang="en"] .hero h1 { font-size: 46px; }
  html[lang="en"] .graph-node { font-size: 8px; }
  html[lang="en"] .graph-controls button { font-size: 9px; padding-inline: 7px; }
  html[lang="en"] .hero-proofline strong { font-size: 20px; }
}
@media (max-width: 850px) {
  html[lang="en"] .hero h1 { font-size: 38px; letter-spacing: -1.3px; }
  html[lang="en"] .desktop-nav { gap: 12px; font-size: 11px; }
  html[lang="en"] .hero-description { font-size: 12px; }
  html[lang="en"] .hero-proofline strong { font-size: 18px; }
  html[lang="en"] .hero-proofline small { font-size: 9px; }
  html[lang="en"] .graph-node { font-size: 7px; }
  html[lang="en"] .toolkit-column li { font-size: 10px; }
}
@media (max-width: 650px) {
  .nav-actions { gap: 10px; }
  .nav-actions .github-link { display: none; }
  .language-switch a { min-width: 28px; min-height: 32px; padding-inline: 5px; }
  .toolbar { flex-wrap: wrap; gap: 10px; }
  .toolbar .language-switch { order: 2; }
  .toolbar > button { order: 3; }
  .seo-header { gap: 12px; }
  .seo-header > nav { gap: 8px; }
  .seo-header .seo-home-link { display: none; }
  html[lang="en"] .hero h1 { font-size: clamp(35px, 9.5vw, 48px); line-height: 1.2; }
  html[lang="en"] .hero-description { font-size: 14px; }
  html[lang="en"] .hero-proofline strong { font-size: 20px; }
  html[lang="en"] .hero-proofline small { font-size: 10px; }
  html[lang="en"] .section-heading h2,
  html[lang="en"] .section-intro h2,
  html[lang="en"] .experience-intro h2 { font-size: 28px; line-height: 1.35; }
  html[lang="en"] .graph-node { font-size: 8px; }
  html[lang="en"] .graph-controls button { font-size: 10px; padding-inline: 6px; }
  html[lang="en"] .stats strong { font-size: 31px; }
  html[lang="en"] .stats strong > small { font-size: 10px; }
  html[lang="en"] .stats p { font-size: 9px; }
  html[lang="en"] .project-filters button { font-size: 10px; }
  html[lang="en"] .case-dialog .dialog-bottom { gap: 10px; }
  html[lang="en"] .case-dialog .dialog-bottom .text-link { font-size: 11px; padding-inline: 10px; }
  html[lang="en"] .case-permalink { font-size: 11px; }
  html[lang="en"] .toolkit-column h3 { font-size: 14px; }
  html[lang="en"] .toolkit-column li { font-size: 10px; }
  html[lang="en"] .contact-copy h2 { font-size: 30px; line-height: 1.3; }
}
@media (max-width: 360px) {
  .nav-shell { gap: 10px; }
  .language-switch { font-size: 10px; padding: 2px; }
  .language-switch a { min-width: 25px; padding-inline: 4px; }
  html[lang="en"] .hero h1 { font-size: 34px; }
  html[lang="en"] .hero-proofline > span + span { padding-left: 10px; }
  html[lang="en"] .hero-proofline strong { font-size: 18px; }
  html[lang="en"] .case-dialog .dialog-bottom .text-link { font-size: 10px; padding-inline: 8px; }
  html[lang="en"] .case-permalink { font-size: 10px; }
}
@media print { .language-switch { display: none !important; } }
