/* ONLYDROP v122 — compact bilingual control and bilingual index typography.
   Keep the existing HUD/collage system and never alter media animations. */
html body .language-switch {
  position: fixed !important;
  top: clamp(16px, 2.4vh, 28px) !important;
  right: calc(clamp(16px, 2.6vw, 44px) + 285px) !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 8650 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 40px !important;
  min-height: 40px !important;
  gap: 3px !important;
  padding: 4px 6px !important;
  background: #101a20 !important;
  border: 1px solid rgba(194,215,213,.42) !important;
  border-left: 3px solid #d2ff4a !important;
  border-radius: 0 !important;
  box-shadow: 3px 3px 0 rgba(0,0,0,.65) !important;
  font: 700 10px/1 'IBM Plex Mono', monospace !important;
  letter-spacing: .04em !important;
  color: #c3cdd0 !important;
  white-space: nowrap !important;
  pointer-events: auto !important;
}
html body .language-switch button.language-choice {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 33px;
  height: 28px;
  padding: 0 4px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #c3cdd0;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  transition: background .16s ease, color .16s ease;
}
html body .language-switch button.language-choice:hover { color: #d2ff4a; }
html body .language-switch button.language-choice.is-current {
  background: #d2ff4a;
  color: #101618;
}
html body .language-switch button.language-choice:focus-visible {
  outline: 2px solid #f7f3ec;
  outline-offset: 2px;
}
html body .language-switch .language-divider {
  font: 700 9px/1 'IBM Plex Mono', monospace;
  opacity: .5;
}
html body #home .index-description .od-bio-heading {
  display: block;
  margin: 0 0 7px;
  padding: 0;
  color: #d2ff4a;
  font: 700 clamp(11px, .95vw, 14px)/1.2 'IBM Plex Mono', monospace;
  letter-spacing: .075em;
  text-transform: none;
}
html body #home .index-description > p { margin: 0 !important; }

/* Both localized titles are actual SVG exports. They occupy exactly the
   same wordmark slot and inherit the same sizing and transform rules. */
html body #home .category-menu > a.cat-anim3d > h2.category-title.category-title-svg > img.od-title-art-3d {
  display: none !important;
}
html[data-locale="en"] body #home .category-menu > a.cat-anim3d > h2.category-title.category-title-svg > img.od-title-art-3d-en {
  display: block !important;
}
html[data-locale="es"] body #home .category-menu > a.cat-anim3d > h2.category-title.category-title-svg > img.od-title-art-3d-es {
  display: block !important;
}
@media (min-width:701px) and (max-width:1100px) {
  html body .language-switch { right: calc(18px + 270px) !important; }
}
@media (max-width:700px) {
  html body .language-switch {
    top: calc(14px + env(safe-area-inset-top,0px)) !important;
    left: calc(13px + env(safe-area-inset-left,0px)) !important;
    right: auto !important;
    height: 40px !important;
    min-height: 40px !important;
  }
  html body #home .index-description .od-bio-heading { font-size: 12px !important; }
}
@media (max-width:370px) {
  html body .language-switch { padding: 3px !important; gap: 0 !important; }
  html body .language-switch button.language-choice { min-width: 30px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body .language-switch button.language-choice { transition: none !important; }
}

/* Translate the tiny CSS-generated category stamps as well. */
html[data-locale="es"] body #home .cat-anim2d .category-title::before {
  content: "OD / 01 • MOVIMIENTO" !important;
}
html[data-locale="es"] body #home .cat-anim3d .category-title::before {
  content: "OD / 02 • ESPACIO" !important;
}
html[data-locale="es"] body #home .cat-art2d .category-title::before {
  content: "OD / 03 • IMAGEN" !important;
}
html[data-locale="es"] body #home .cat-story .category-title::before {
  content: "OD / 04 • SECUENCIA" !important;
}
html[data-locale="es"] body #home .cat-projects .category-title::before {
  content: "OD / 05 • ARCHIVO" !important;
}
html[data-locale="es"] body #home .index-name-block::after {
  content: "VISUAL / MOVIMIENTO / IMAGEN" !important;
}

/* v124: The heading belongs to the same vertical bio column and reveal.
   Align it with the paragraph's 18px inset and keep the text block centered. */
html body #home .index-description {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}
html body #home .index-description .od-bio-heading {
  box-sizing: border-box !important;
  width: 100% !important;
  padding: 0 0 0 18px !important;
  margin: 0 0 clamp(5px, .65vh, 9px) !important;
  line-height: 1.25 !important;
  text-align: left !important;
}
html body #home .index-description > p {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding-left: 18px !important;
  text-align: left !important;
}
/* Both title and bio use exactly the same clipping motion and delay. */
html.od-entry-armed:not(.motion-paused) body #home .index-description .od-bio-heading {
  clip-path: inset(0 100% 0 0) !important;
}
html.od-entry-playing:not(.motion-paused) body #home .index-description .od-bio-heading {
  animation: odBioReveal 1.14s cubic-bezier(.45,0,.18,1) 1.73s both !important;
}
@media (prefers-reduced-motion:reduce) {
  html.od-entry-armed body #home .index-description .od-bio-heading,
  html.od-entry-playing body #home .index-description .od-bio-heading {
    animation: none !important;
    clip-path: none !important;
    translate: none !important;
  }
}
html.motion-paused.od-entry-armed body #home .index-description .od-bio-heading,
html.motion-paused.od-entry-playing body #home .index-description .od-bio-heading {
  animation: none !important;
  clip-path: none !important;
  translate: none !important;
}
/* Stronger specificity prevents generic link/button rules overriding the
   active state with pale ink on pale fill. */
html body .language-switch button.language-choice.is-current,
html body .language-switch button.language-choice[aria-pressed="true"],
html body .language-switch button.language-choice.is-current:hover,
html body .language-switch button.language-choice[aria-pressed="true"]:hover {
  background-color: #d2ff4a !important;
  color: #101a20 !important;
  -webkit-text-fill-color: #101a20 !important;
  border-color: transparent !important;
}
html body .language-switch button.language-choice:not(.is-current) {
  color: #c3cdd0 !important;
  -webkit-text-fill-color: #c3cdd0 !important;
}

/* v168 — Stable header geometry in both languages. The Spanish labels are
   wider, so the old independently sized nav grew leftward over EN / ES.
   Reserve the same three-button grid and exact companion offset for both. */
@media (min-width:701px) {
  html body #nav.portfolio-navigation {
    position:fixed !important;
    top:clamp(16px,2.4vh,28px) !important;
    right:clamp(16px,2.6vw,44px) !important;
    bottom:auto !important;
    left:auto !important;
    display:grid !important;
    grid-template-columns:minmax(0,.90fr) minmax(0,1.24fr) minmax(0,1.06fr) !important;
    align-items:stretch !important;
    justify-content:stretch !important;
    gap:7px !important;
    width:clamp(312px,26vw,352px) !important;
    min-width:0 !important;
    max-width:calc(100vw - 32px) !important;
    box-sizing:border-box !important;
  }
  html body #nav.portfolio-navigation > a.view-link {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    min-height:40px !important;
    padding:9px 8px !important;
    white-space:nowrap !important;
    text-align:center !important;
  }
  html body .language-switch {
    left:auto !important;
    right:calc(clamp(16px,2.6vw,44px) + clamp(312px,26vw,352px) + 13px) !important;
  }
}

/* On phones the navigation stays at the bottom, with identical slots for
   INICIO / ACERCA DE / CONTACTO; EN / ES remains at the top. */
@media (max-width:700px) {
  html body #nav.portfolio-navigation {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    justify-content:stretch !important;
    align-items:stretch !important;
    gap:6px !important;
    box-sizing:border-box !important;
  }
  html body #nav.portfolio-navigation > a.view-link {
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    justify-content:center !important;
    padding:10px 5px !important;
    white-space:nowrap !important;
    font-size:clamp(9px,2.4vw,10px) !important;
    letter-spacing:.035em !important;
  }
}
