/* ==========================================================================
   Juan José Forero Hernández — hoja de estilos
   Mobile-first · Puntos de corte: 640px (tablet), 960px (escritorio)
   ========================================================================== */

/* ---------- 1. Fuentes (Inter variable, alojada en el propio sitio) ---------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- 2. Variables ---------- */

:root {
  --navy-950: #061238;
  --navy-900: #0a1a4a;
  --navy-800: #0c2766;
  --navy-700: #0b3a83;
  --blue-700: #0a4a9c;
  --blue-600: #1257b5;
  --blue-500: #2a7be0;
  --blue-400: #5aa0ee;
  --blue-300: #93c2f6;
  --blue-200: #c6e0fc;
  --blue-100: #e2effd;
  --blue-50: #eff6fe;

  --text: #252d4f;
  --text-soft: #4a5577;
  --muted: #6a7491;
  --bg: #f8fafd;
  --surface: #ffffff;
  --line: #dce8f7;
  --line-strong: #c8dbf3;

  --grad-primary: linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  --grad-primary-hover: linear-gradient(180deg, #1159b9 0%, #0a4597 100%);
  --grad-card: linear-gradient(160deg, #f0f7ff 0%, #e5f0fd 100%);
  --grad-dark: linear-gradient(100deg, #062863 0%, #0f4a8d 52%, #06478b 100%);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgb(10 26 74 / 0.05), 0 2px 8px -4px rgb(10 40 100 / 0.08);
  --shadow-sm: 0 1px 2px rgb(10 26 74 / 0.05), 0 8px 22px -10px rgb(10 40 100 / 0.18);
  --shadow: 0 2px 4px rgb(10 26 74 / 0.04), 0 22px 44px -20px rgb(10 50 120 / 0.32);
  --shadow-btn: 0 10px 20px -10px rgb(9 60 134 / 0.7);

  --container: 1200px;
  --gutter: clamp(16px, 4.5vw, 32px);
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-math: "STIX Two Math", "Cambria Math", "Latin Modern Math", "STIXGeneral", "Times New Roman", serif;

  color-scheme: light;
}

@media (min-width: 960px) {
  :root { --header-h: 76px; }
}

/* ---------- 3. Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }
img, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: 700; }
math { font-family: var(--font-math); }

:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus { outline: none; }

::selection { background: var(--blue-200); color: var(--navy-900); }

.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
}

/* ---------- 4. Utilidades ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -120px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-xs);
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 12px; }

/* Opciones que existen y funcionan pero no se muestran (ver recursos/OCULTO.txt
   para volver a mostrarlas: basta con quitar el atributo data-oculto). */
[data-oculto] { display: none !important; }

@media (max-width: 639.98px) {
  .mobile-hidden { display: none !important; }
}

@media (min-width: 640px) {
  .mobile-only { display: none !important; }
}

/* ---------- 5. Botones ---------- */

.btn {
  --btn-h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: var(--btn-h);
  padding: 0 1.5em;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.25s, transform 0.25s var(--ease);
}

.btn .icon { width: 1.1em; height: 1.1em; }
.btn .icon--arrow { transition: transform 0.25s var(--ease); }
.btn:hover .icon--arrow { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--sm { --btn-h: 42px; padding: 0 1.25em; font-size: 0.9375rem; }
.btn--lg { --btn-h: 54px; padding: 0 1.7em; font-size: 1.0625rem; }
.btn--pill { border-radius: var(--radius-pill); }
.btn--block { width: 100%; }

/* El degradado va escrito tal cual (sin var()) y con un azul debajo: Safari, en
   los enlaces ya visitados, no pintaba el degradado de la variable y el botón
   se quedaba blanco con el texto blanco. */
.btn--primary,
.btn--primary:visited {
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
  background: #0e50a8 linear-gradient(180deg, #1159b9 0%, #0a4597 100%);
  box-shadow: 0 14px 26px -12px rgb(9 60 134 / 0.75);
  transform: translateY(-1px);
}

.btn--outline {
  background: #fff;
  border-color: #2b5ca6;
  color: var(--navy-700);
}

.btn--outline:hover {
  background: var(--blue-50);
  border-color: var(--blue-600);
  color: var(--blue-700);
}

.btn--light {
  background: #fff;
  color: var(--navy-700);
  box-shadow: 0 10px 22px -12px rgb(0 0 0 / 0.5);
}

.btn--light:hover {
  background: var(--blue-50);
  transform: translateY(-1px);
}

/* ---------- 6. Cabecera y navegación ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.88);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgb(220 232 247 / 0.6);
  transition: box-shadow 0.25s, border-color 0.25s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 28px -20px rgb(10 26 74 / 0.4);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-block;
  padding: 6px 0;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--navy-900);
  transition: color 0.2s;
}

.brand:hover { color: var(--blue-700); }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--navy-900);
}

.nav-toggle:hover { background: var(--blue-50); }

.nav-toggle .icon {
  grid-area: 1 / 1;
  width: 28px;
  height: 28px;
  transition: opacity 0.2s, transform 0.25s var(--ease);
}

.nav-toggle__close { opacity: 0; transform: rotate(-90deg); }
.site-header.is-open .nav-toggle__open { opacity: 0; transform: rotate(90deg); }
.site-header.is-open .nav-toggle__close { opacity: 1; transform: none; }

/* Panel móvil */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: 6px var(--gutter) 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 28px 40px -28px rgb(10 26 74 / 0.45);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s 0.25s;
}

.site-header.is-open .site-nav {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s;
}

.site-nav__link {
  display: flex;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid var(--blue-50);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy-900);
}

.site-nav__link[aria-current="page"] { color: var(--blue-700); }
.site-nav__cta { width: 100%; margin-top: 18px; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    display: flex;
    flex: 1;
    align-items: center;
    gap: 24px;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .site-nav__list {
    display: flex;
    align-items: center;
    gap: clamp(22px, 3vw, 46px);
    margin-inline: auto;
  }

  .site-nav__link {
    position: relative;
    min-height: auto;
    padding: 8px 0;
    border: 0;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s;
  }

  .site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--blue-700);
    transform: scaleX(0);
    transition: transform 0.3s var(--ease);
  }

  .site-nav__link:hover { color: var(--blue-700); }
  .site-nav__link:hover::after { transform: scaleX(0.4); }
  .site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

  .site-nav__cta { width: auto; margin: 0; }

  /* Sin botón a la derecha, el menú se alinea a la derecha */
  .site-nav__list:last-child { margin-inline-end: 0; }
}

/* ---------- 7. Portada (hero) ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(55% 60% at 86% 38%, rgb(226 239 253 / 0.75) 0%, rgb(226 239 253 / 0) 72%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "heading"
    "visual"
    "contact";
  padding-top: clamp(26px, 6vw, 44px);
}

.hero__content { display: contents; }

.hero__heading {
  grid-area: heading;
  position: relative;
  z-index: 2;
}

.hero__title {
  font-size: clamp(2.1rem, 1rem + 5.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--navy-900);
}

.hero__title span { display: block; }

/* Línea de acento bajo el nombre */
.hero__rule {
  display: block;
  width: 72px;
  height: 3px;
  margin-top: clamp(16px, 3vw, 24px);
  border-radius: 2px;
  background: var(--blue-500);
}

.hero__visual {
  grid-area: visual;
  position: relative;
  display: flex;
  justify-content: center;
  margin-inline: calc(var(--gutter) * -1);
  margin-top: clamp(4px, 2vw, 14px);
}

/* Ondas de líneas finas */
.hero__lines {
  position: absolute;
  left: 0;
  bottom: 8%;
  z-index: 0;
  width: 100%;
  height: 58%;
  pointer-events: none;
  user-select: none;
}

.hero__figure {
  position: relative;
  z-index: 1;
  width: min(62vw, 300px);
}

/* Círculo detrás del retrato (la cabeza sobresale por arriba) */
.hero__figure::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 17%;
  left: 50%;
  width: 132%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 32%, #ebf3fe 0%, #dfebfc 60%, #d5e5fb 100%);
}

.hero__photo img { width: 100%; }

/* Borde inferior curvo que corta el retrato y enlaza con la página */
.hero__curve {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 2;
  width: 100%;
  height: clamp(34px, 9vw, 58px);
  fill: var(--bg);
  filter: drop-shadow(0 -6px 14px rgb(10 50 120 / 0.07));
  pointer-events: none;
}

/* Móvil: correo y redes debajo del retrato */
.hero__contact {
  grid-area: contact;
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 8px var(--gutter) 6px;
  background: var(--bg);
}

@media (min-width: 640px) {
  .hero__figure { width: 310px; }
  .hero__contact { justify-items: center; }
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    grid-template-areas: "content visual";
    min-height: clamp(560px, 46vw, 680px);
    padding-top: 0;
  }

  .hero__content {
    grid-area: content;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 40px clamp(104px, 9vw, 136px);
  }

  .hero__title { font-size: clamp(2.9rem, 1rem + 3.6vw, 4.15rem); }

  .hero__rule {
    width: 88px;
    margin-top: clamp(24px, 2.4vw, 34px);
  }

  .hero__contact {
    justify-items: start;
    gap: 20px;
    margin: clamp(30px, 3vw, 42px) 0 0;
    padding: 0;
    background: none;
  }

  /* Las líneas y la curva se colocan respecto a toda la portada */
  .hero__visual {
    position: static;
    align-self: end;
    justify-content: center;
    margin: 0;
  }

  .hero__lines {
    bottom: clamp(16px, 2vw, 30px);
    width: min(66%, 1000px);
    height: 54%;
  }

  .hero__figure { width: auto; }
  .hero__photo img { width: auto; height: clamp(500px, 44vw, 640px); }

  .hero__curve { height: clamp(62px, 6.5vw, 96px); }
}

/* ---------- 8. Correo y redes ---------- */

.email-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.email-chip__link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-right: 10px;
  border-radius: var(--radius-pill);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.08rem);
  font-weight: 650;
  color: var(--navy-900);
}

.email-chip__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  box-shadow: var(--shadow-btn);
  color: #fff;
}

.email-chip__icon .icon { width: 19px; height: 19px; }

.email-chip__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

.email-chip__link:hover .email-chip__text {
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.email-chip__copy {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--navy-800);
  transition: background-color 0.2s, color 0.2s;
}

.email-chip__copy[hidden] { display: none; }
.email-chip__copy:hover { background: var(--blue-100); color: var(--blue-700); }

.email-chip__copy .icon {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  transition: opacity 0.2s, transform 0.25s var(--ease);
}

.email-chip__done-icon { opacity: 0; transform: scale(0.5); }

.email-chip.is-copied .email-chip__copy { background: #e7f8ef; color: #067647; }
.email-chip.is-copied .email-chip__copy-icon { opacity: 0; transform: scale(0.5); }
.email-chip.is-copied .email-chip__done-icon { opacity: 1; transform: none; }

.email-chip__toast {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--navy-900);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s var(--ease);
}

.email-chip.is-copied .email-chip__toast { opacity: 1; transform: none; }

@media (min-width: 640px) {
  .email-chip { width: auto; max-width: 100%; }
}

.social-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.social-btn {
  --brand: var(--blue-600);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: var(--shadow-xs);
  color: var(--navy-900);
  font-size: 0.875rem;
  font-weight: 650;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}

.social-btn__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--navy-800);
  transition: background-color 0.25s, color 0.25s;
}

.social-btn__icon .icon { width: 17px; height: 17px; }

.social-btn__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-btn:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, #ffffff);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.social-btn:hover .social-btn__icon {
  background: var(--brand);
  color: #fff;
}

.social-btn--linkedin { --brand: #0a66c2; }
.social-btn--scholar { --brand: #4285f4; }
.social-btn--github { --brand: #181717; }
.social-btn--researchgate { --brand: #00b3a4; }
.social-btn--arxiv { --brand: #b31b1b; }
.social-btn--orcid { --brand: #7fae1d; }

@media (min-width: 640px) {
  .social-buttons--hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 640px;
  }

  .social-btn { gap: 10px; padding: 6px 14px 6px 6px; font-size: 0.95rem; }
  .social-btn__icon { width: 34px; height: 34px; }
  .social-btn__icon .icon { width: 18px; height: 18px; }
}

/* Escritorio estrecho: la columna del texto no da para 3 botones por fila */
@media (min-width: 960px) and (max-width: 1139px) {
  .social-buttons--hero { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; }
}

.social-buttons--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: auto;
}

.social-buttons--compact .social-btn {
  min-height: 40px;
  padding: 4px 14px 4px 4px;
  font-size: 0.88rem;
}

.social-buttons--compact .social-btn__icon { width: 30px; height: 30px; }
.social-buttons--compact .social-btn__icon .icon { width: 15px; height: 15px; }

/* ---------- 9. Secciones ---------- */

.section { padding-block: clamp(40px, 6.5vw, 80px); }
.section--tight { padding-block: clamp(22px, 3.5vw, 40px); }
.section--alt { background: linear-gradient(180deg, #f1f7fe 0%, #f8fafd 100%); }

.section-head { margin-bottom: clamp(18px, 2.6vw, 30px); }
.section-head--center { text-align: center; }

.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
}

.section-title {
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.028em;
  color: var(--navy-900);
  text-wrap: balance;
}

.section-title--lined {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 44px);
  text-align: center;
}

.section-title--lined::before,
.section-title--lined::after {
  content: "";
  flex: 1 1 0;
  max-width: 220px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgb(42 123 224 / 0), rgb(42 123 224 / 0.6));
}

.section-title--lined::after { transform: scaleX(-1); }

.section-lead {
  max-width: 40rem;
  margin-top: 0.45rem;
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.08rem);
  color: var(--text-soft);
}

.section-foot {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* ---------- 10. Sobre mí e intereses ---------- */

.section--about { padding-bottom: clamp(14px, 2.5vw, 28px); }

.about-text {
  max-width: 50rem;
  margin: clamp(18px, 2.6vw, 30px) auto 0;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.85;
  color: var(--text);
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.about-text p + p { margin-top: 1.1em; }

/* "Ver más": con JavaScript el texto se corta a mitad del segundo párrafo
   (main.js calcula esa altura) y se despliega al pulsar. Sin JavaScript se ve
   completo. */
.about-text.is-collapsible {
  position: relative;
  overflow: hidden;
  transition: max-height 0.6s var(--ease);
}

.about-text.is-collapsible:not(.is-expanded) {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 3.6em), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 3.6em), transparent 100%);
}

.about-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(10px, 1.6vw, 16px) auto 0;
  padding: 6px 8px 6px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: var(--shadow-xs);
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--navy-800);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.25s var(--ease), color 0.2s, transform 0.25s var(--ease);
}

.about-toggle[hidden] { display: none; }

.about-toggle:hover {
  border-color: var(--blue-300);
  color: var(--blue-700);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.about-toggle:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 3px;
}

.about-toggle__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  color: #fff;
  box-shadow: 0 6px 12px -6px rgb(9 60 134 / 0.7);
  transition: transform 0.35s var(--ease);
}

.about-toggle__icon .icon { width: 17px; height: 17px; stroke-width: 2.4; }

.about-toggle[aria-expanded="true"] .about-toggle__icon { transform: rotate(180deg); }

.about-text strong {
  font-weight: 650;
  color: var(--navy-900);
}

.about-text a {
  color: var(--blue-600);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(18 87 181 / 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.about-text a:hover {
  color: var(--blue-700);
  text-decoration-color: currentColor;
}

.about-text a:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 3px;
}

.section--interests { padding-top: clamp(30px, 4.5vw, 54px); }

.interests {
  display: grid;
  gap: 10px;
  margin-top: clamp(20px, 3vw, 34px);
}

.interest {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgb(255 255 255 / 0.85);
  border-radius: 14px;
  background: var(--grad-card);
  box-shadow: var(--shadow-xs);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.interest__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(10 26 74 / 0.06), 0 6px 14px -8px rgb(10 50 120 / 0.3);
  color: var(--navy-800);
}

.interest__icon .icon { width: 23px; height: 23px; }
.interest__icon .icon--spline,
.interest__icon .icon--network,
.interest__icon .icon--code { color: var(--blue-600); }

.interest__body { min-width: 0; }

.interest__title {
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--navy-900);
  text-wrap: balance;
}

.interest__text {
  margin-top: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-soft);
}

/* Tablet: 2 por fila, todas del mismo tamaño; si queda una suelta, va centrada */
@media (min-width: 640px) {
  .interests {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 16px;
  }

  .interest {
    grid-column: span 2;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius);
  }

  .interest:nth-child(2n + 1):nth-last-child(1) { grid-column: 2 / span 2; }

  .interest__icon { width: 54px; height: 54px; border-radius: 15px; }
  .interest__icon .icon { width: 27px; height: 27px; }
  .interest__title { font-size: 1.15rem; }
  .interest__text { margin-top: 6px; font-size: 0.94rem; }
  .interest:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
}

/* Escritorio: 4 por fila, todas del mismo tamaño; la última fila va centrada
   (7 tarjetas → 4 + 3) */
@media (min-width: 960px) {
  .interests {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 20px;
  }

  .interest { padding: 26px; }

  .interest:nth-child(2n + 1):nth-last-child(1) { grid-column: span 2; }
  .interest:nth-child(4n + 1):nth-last-child(3) { grid-column: 2 / span 2; }
  .interest:nth-child(4n + 1):nth-last-child(2) { grid-column: 3 / span 2; }
  .interest:nth-child(4n + 1):nth-last-child(1) { grid-column: 4 / span 2; }
}

/* ---------- 11. Últimas publicaciones (tarjetas) ---------- */

.papers {
  display: grid;
  gap: 12px;
}

.papers > li { display: flex; }

/* Móvil: tarjeta vertical (los títulos de los artículos son largos) */
.paper-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: var(--shadow-xs);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}

.paper-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  margin-bottom: 10px;
}

.paper-card__media img {
  width: 100%;
  height: 100px;
  object-fit: contain;
}

.paper-card .tags { margin: 0 0 8px; padding-right: 20px; }

.paper-card__title {
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}

.paper-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.paper-card__title a:focus-visible { outline: none; }

.paper-card__title a:focus-visible::after {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.paper-card__authors { display: none; }

.paper-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.paper-card__meta .icon { width: 14px; height: 14px; color: var(--blue-600); }

.paper-card__corner {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--navy-700);
}

.paper-card__corner .icon { display: block; width: 17px; height: 17px; }

.paper-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #e3eefc;
  color: #16438c;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.5;
}

.tag--soft {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text-soft);
}

@media (min-width: 640px) {
  .papers { gap: 16px; }

  .paper-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 18px 22px 18px 12px;
  }

  .paper-card__media { height: auto; margin-bottom: 0; }
  .paper-card__media img { height: auto; }

  .paper-card .tags { padding-right: 28px; }
  .paper-card__title { font-size: 1.1rem; }

  .paper-card__authors {
    display: block;
    margin-top: 8px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-soft);
  }

  .paper-card__authors strong { font-weight: 650; color: var(--navy-900); }
  .paper-card__corner { top: 16px; right: 16px; }
  .paper-card__corner .icon { width: 20px; height: 20px; }
  .tag { padding: 4px 13px; font-size: 0.76rem; }
  .paper-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
}

@media (min-width: 900px) {
  .papers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  .paper-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px 22px 20px;
  }

  .paper-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 128px;
    margin-bottom: 14px;
  }

  .paper-card__media img {
    width: 100%;
    height: 128px;
    object-fit: contain;
  }

  .paper-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .paper-card__meta { margin-top: auto; padding-top: 12px; }
  .paper-card:hover { transform: translateY(-4px); }
}

/* ---------- 12. Banner oscuro (CTA) ---------- */

.section-cta { padding-block: clamp(26px, 4vw, 44px) clamp(28px, 4vw, 40px); }

.cta-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 26px 22px 112px;
  border-radius: 20px;
  background:
    radial-gradient(60% 120% at 62% 0%, rgb(44 100 164 / 0.55) 0%, rgb(44 100 164 / 0) 70%),
    var(--grad-dark);
  box-shadow: 0 26px 50px -30px rgb(6 40 99 / 0.8);
  color: #fff;
}

.cta-banner__title {
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

.cta-banner__text {
  max-width: 34rem;
  margin-top: 8px;
  font-size: clamp(0.92rem, 0.88rem + 0.2vw, 1.05rem);
  line-height: 1.55;
  color: rgb(255 255 255 / 0.88);
}

.cta-banner__btn {
  position: relative;
  z-index: 2;
  justify-self: start;
}

.cta-banner__art {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: 140px;
  pointer-events: none;
}

.cta-banner__mesh {
  position: absolute;
  right: -24px;
  bottom: -30px;
  width: min(560px, 125%);
  max-width: none;
}

.cta-banner__eq { display: none; }

@media (min-width: 960px) {
  .cta-banner {
    grid-template-columns: minmax(0, 1.05fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 28px;
    min-height: 168px;
    padding: 30px 44px 32px;
  }

  .cta-banner__btn { margin-bottom: 2px; }

  .cta-banner__art {
    left: auto;
    top: 0;
    width: 45%;
    height: auto;
  }

  .cta-banner__mesh {
    right: 0;
    bottom: -64px;
    width: 100%;
  }

  .cta-banner__eq {
    display: block;
    position: absolute;
    top: 22px;
    right: clamp(40px, 9%, 110px);
    font-size: 1.6rem;
    white-space: nowrap;
    color: #fff;
  }

  .cta-banner__eq math { margin: 0; }
}

/* ---------- 13. Pie de página ---------- */

.site-footer { padding-bottom: 28px; }

.site-footer__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 14px 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-brand__divider {
  width: 1.5px;
  height: 24px;
  background: var(--line-strong);
}

.footer-brand__text {
  line-height: 1.35;
}

.footer-brand__text strong {
  font-size: 0.95rem;
  color: var(--navy-900);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.footer-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy-900);
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--blue-700); }

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.social { display: flex; gap: 8px; }

.social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--navy-800);
  transition: background-color 0.2s, color 0.2s;
}

.social a:hover { background: var(--blue-100); color: var(--blue-700); }
.social .icon { width: 18px; height: 18px; }

@media (max-width: 639.98px) {
  .footer-nav { display: none; }
}

/* Acceso discreto al panel de administración */
.footer-admin {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: 8px;
  border-radius: 50%;
  vertical-align: -6px;
  color: var(--muted);
  opacity: 0.32;
  transition: opacity 0.2s, color 0.2s, background-color 0.2s;
}

.footer-admin:hover,
.footer-admin:focus-visible {
  opacity: 1;
  color: var(--blue-700);
  background: var(--blue-50);
}

.footer-admin .icon { width: 15px; height: 15px; }

/* ---------- 14. Cabecera de páginas interiores ---------- */
/* Mismo estilo que la portada (línea de acento, ondas de líneas, círculo y
   borde curvo), sin foto */

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(26px, 5vw, 56px) clamp(92px, 12vw, 164px);
  background:
    radial-gradient(55% 60% at 86% 38%, rgb(226 239 253 / 0.75) 0%, rgb(226 239 253 / 0) 72%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}

.page-hero__inner {
  position: relative;
  z-index: 2;
}

/* Ondas de líneas finas */
.page-hero__lines {
  position: absolute;
  left: 0;
  bottom: clamp(8px, 2vw, 26px);
  z-index: 1;
  width: 100%;
  height: clamp(110px, 21vw, 250px);
  pointer-events: none;
  user-select: none;
}

/* Borde inferior curvo que enlaza con la página */
.page-hero__curve {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 3;
  width: 100%;
  height: clamp(34px, 9vw, 58px);
  fill: var(--bg);
  filter: drop-shadow(0 -6px 14px rgb(10 50 120 / 0.07));
  pointer-events: none;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--blue-300);
}

.breadcrumb a { font-weight: 600; color: var(--blue-700); }
.breadcrumb a:hover { text-decoration: underline; }

.page-hero__title {
  font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--navy-900);
}

/* Sin texto de introducción la cabecera es más baja: las ondas también,
   para que no pasen por detrás del título */
.page-hero--compact .page-hero__lines { height: clamp(80px, 13vw, 170px); }

/* La curva ya separa: la primera sección necesita menos aire arriba */
.page-hero + .section { padding-top: clamp(24px, 3.5vw, 48px); }

/* Línea de acento bajo el título (como en la portada) */
.page-hero__rule {
  display: block;
  width: 72px;
  height: 3px;
  margin-top: clamp(14px, 2.4vw, 22px);
  border-radius: 2px;
  background: var(--blue-500);
}

.page-hero__lead {
  max-width: 40rem;
  margin-top: clamp(14px, 2vw, 20px);
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.2rem);
  color: var(--text);
}

@media (min-width: 960px) {
  .page-hero__rule { width: 88px; }

  .page-hero__curve { height: clamp(56px, 6vw, 88px); }

  /* Círculo suave a la derecha, como el de la portada; las ondas pasan por
     delante para que se lea como decoración y no como el hueco de una foto */
  .page-hero::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: clamp(30px, 4vw, 60px);
    right: max(4vw, calc((100% - var(--container)) / 2 + 20px));
    width: clamp(300px, 30vw, 430px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, rgb(235 243 254 / 0.9) 0%, rgb(223 235 252 / 0.75) 62%, rgb(213 229 251 / 0.55) 100%);
    pointer-events: none;
  }
}

/* ---------- 15. Componentes de páginas interiores ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-800);
}

.chip--soft {
  border-color: transparent;
  background: var(--blue-50);
}

/* Proyectos */
.project-list {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}

.project-detail {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-h) + 20px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.project-detail:target {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 4px rgb(90 160 238 / 0.2), var(--shadow-sm);
}

.project-detail__media {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--grad-card);
}

.project-detail__media img { width: min(100%, 380px); }

.project-detail__title {
  margin-top: 12px;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--navy-900);
}

.project-detail__text {
  margin-top: 10px;
  color: var(--text-soft);
}

.project-detail .tags { margin-top: 0; }

.checklist {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
}

.checklist .icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--blue-600);
}

.project-detail__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .project-detail {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 40px;
  }

  .project-list > li:nth-child(even) .project-detail__media { order: 2; }
}

/* Investigación (publicaciones de arXiv) */
.research-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 28px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.paper-list {
  display: grid;
  gap: clamp(16px, 2.5vw, 24px);
}

.paper {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-h) + 20px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.paper:target {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 4px rgb(90 160 238 / 0.2), var(--shadow-sm);
}

.paper__media {
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--grad-card);
}

.paper__media img { width: min(100%, 300px); }
.paper .tags { margin-top: 0; }

.paper__title {
  margin-top: 12px;
  font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.paper__title a { transition: color 0.2s; }

.paper__title a:hover {
  color: var(--blue-700);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.paper__authors {
  margin-top: 8px;
  color: var(--text-soft);
}

.paper__authors strong { font-weight: 700; color: var(--navy-900); }

.paper__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.paper__meta .icon { width: 16px; height: 16px; color: var(--blue-600); }

.paper__journal {
  margin-top: 6px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-soft);
}

.paper__abstract {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.paper__abstract summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 2px 4px;
  font-weight: 650;
  color: var(--blue-700);
  cursor: pointer;
  list-style: none;
}

.paper__abstract summary::-webkit-details-marker { display: none; }
.paper__abstract summary:hover { color: var(--blue-600); }

.paper__abstract-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease);
}

.paper__abstract[open] .paper__abstract-icon { transform: rotate(180deg); }

.paper__abstract p {
  margin-top: 8px;
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--text);
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.paper__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.paper__actions .icon { width: 16px; height: 16px; }

.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--navy-700);
}

.btn--ghost:hover { background: var(--blue-50); color: var(--blue-700); }

@media (min-width: 860px) {
  .paper {
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 32px;
  }

  .paper__media { min-height: 190px; }
}

/* Contacto */
.contact-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: 40px;
  }
}

.contact-info {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 3vw, 36px) clamp(22px, 3vw, 36px) 130px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 60% at 70% 0%, rgb(44 100 164 / 0.55) 0%, rgb(44 100 164 / 0) 70%),
    var(--grad-dark);
  box-shadow: 0 26px 50px -30px rgb(6 40 99 / 0.8);
  color: #fff;
}

.contact-info h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.contact-info > p {
  margin-top: 10px;
  color: rgb(255 255 255 / 0.86);
}

.contact-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-list .icon-wrap {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.12);
}

.contact-list .icon { width: 20px; height: 20px; }
.contact-list a { font-weight: 600; text-decoration: underline; text-decoration-color: rgb(255 255 255 / 0.4); text-underline-offset: 3px; }
.contact-list a:hover { text-decoration-color: #fff; }

.contact-info .chips { margin-top: 12px; }

.contact-info .chip {
  border-color: rgb(255 255 255 / 0.25);
  background: rgb(255 255 255 / 0.08);
  color: #fff;
}

.contact-info__subtitle {
  margin-top: 26px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.7);
}

.contact-info .social a { background: rgb(255 255 255 / 0.12); color: #fff; }
.contact-info .social { margin-top: 14px; }

.contact-info__mesh {
  position: absolute;
  right: -40px;
  bottom: -46px;
  z-index: -1;
  width: 150%;
  max-width: none;
  opacity: 0.8;
}

.form-card {
  padding: clamp(20px, 3.4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.form-card h2 {
  margin-bottom: 20px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.form-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--full { grid-column: 1 / -1; }
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--navy-900);
}

.field .optional { font-weight: 500; color: var(--muted); }

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fbfdff;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

textarea.input {
  min-height: 170px;
  line-height: 1.55;
  resize: vertical;
}

.input::placeholder { color: #9aa3bd; }
.input:hover { border-color: #a9c7ec; }

.input:focus {
  outline: none;
  border-color: var(--blue-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgb(42 123 224 / 0.16);
}

.input[aria-invalid="true"] { border-color: #d14343; }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgb(209 67 67 / 0.15); }

.field__error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #b42318;
}

.field__error .icon { width: 16px; height: 16px; }

.hp-field {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.form-note {
  max-width: 22rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.alert .icon { width: 22px; height: 22px; margin-top: 1px; }
.alert strong { display: block; }
.alert--success { border: 1px solid #abefc6; background: #ecfdf3; color: #05603a; }
.alert--error { border: 1px solid #fecdca; background: #fef3f2; color: #b42318; }

/* 404 */
.error-page {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-block: clamp(56px, 10vw, 120px);
  text-align: center;
}

.error-page__code {
  font-size: clamp(5rem, 20vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, var(--blue-500), var(--navy-800));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page h1 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.error-page p { max-width: 32rem; color: var(--text-soft); }

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

/* ---------- 15b. Herramientas ---------- */

/* Lista de herramientas */
.tool-list {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}

.tool-card {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.tool-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.tool-card__media {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--grad-card);
}

.tool-card__media img { width: min(100%, 420px); }

.tool-card .tags { margin-top: 0; }

.tool-card__title {
  margin-top: 12px;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--navy-900);
}

.tool-card__title a:hover { color: var(--blue-700); }

.tool-card__body > .tool-card__title:first-child { margin-top: 0; }

/* Herramienta bloqueada (se abre con la clave de 6 dígitos del panel) */
.tool-card__locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: #fef3f2;
  color: #b42318;
  font-size: 0.76rem;
  font-weight: 700;
}

.tool-card__locked .icon { width: 14px; height: 14px; }

.tool-lock-section { padding-top: clamp(12px, 2vw, 24px); }

.tool-lock {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(380px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.tool-lock__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--blue-50);
  color: var(--blue-600);
}

.tool-lock__icon .icon { width: 28px; height: 28px; }

.tool-lock__title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.tool-lock__code {
  max-width: 240px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-align: center;
  text-indent: 0.45em;
  font-variant-numeric: tabular-nums;
}

.tool-lock__error {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #b42318;
}

.tool-lock__error .icon { width: 18px; height: 18px; }

.tool-card__text {
  margin: 10px 0 16px;
  color: var(--text-soft);
}

.tool-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .tool-card {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 40px;
  }
}

/* Herramienta: imagen a malla */
.mesher-section { padding-top: clamp(20px, 3vw, 36px); padding-bottom: clamp(36px, 5vw, 64px); }

.mesher {
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
  align-items: start;
}

@media (min-width: 960px) {
  .mesher { grid-template-columns: minmax(330px, 390px) minmax(0, 1fr); }
  .mesher-result { position: sticky; top: calc(var(--header-h) + 16px); }
}

.mesher-panel {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 2.6vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.mesher-step {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.mesher-step + .mesher-step {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Leyenda flotante: así no se dibuja sobre el borde superior del fieldset. */
.mesher-step__title {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  padding: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--navy-900);
}

.mesher-step__title + * { clear: both; }

.mesher-step__num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 750;
}

.mesher-help {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

.mesher-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue-700);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgb(18 87 181 / 0.35);
  text-underline-offset: 3px;
}

.mesher-link:hover { color: var(--blue-600); text-decoration-color: currentColor; }

/* Zona para soltar la imagen */
.dropzone {
  position: relative;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fbfdff;
  transition: border-color 0.2s, background-color 0.2s;
}

.dropzone:hover,
.dropzone.is-dragging { border-color: var(--blue-400); background: var(--blue-50); }

.dropzone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone__input:focus-visible ~ .dropzone__label,
.dropzone__input:focus-visible ~ .dropzone__preview { outline: 3px solid var(--blue-400); outline-offset: 2px; border-radius: 12px; }

.dropzone__label {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
}

.dropzone__label[hidden] { display: none; }

.dropzone__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 14px;
  background: var(--blue-100);
  color: var(--blue-600);
}

.dropzone__icon .icon { width: 24px; height: 24px; }
.dropzone__text { color: var(--navy-900); }
.dropzone__text strong { color: var(--blue-700); }
.dropzone__hint { max-width: 18rem; font-size: 0.82rem; line-height: 1.45; color: var(--muted); }

.dropzone__preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.dropzone__preview[hidden] { display: none; }

.dropzone__canvas {
  flex: 0 0 auto;
  width: 96px;
  height: 72px;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  image-rendering: pixelated;
}

.dropzone__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.dropzone__meta strong {
  overflow: hidden;
  font-size: 0.92rem;
  color: var(--navy-900);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone__change {
  justify-self: start;
  margin-top: 4px;
  font-weight: 650;
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.mesher-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 0.86rem;
  color: var(--muted);
}

.mesher-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}

.mesher-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy-900);
  cursor: pointer;
}

.mesher-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue-600);
}

.mesher-range {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy-900);
}

.mesher-range input { width: 120px; accent-color: var(--blue-600); }

.mesher-range output {
  min-width: 2.6em;
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
}

/* Interruptor vértices / triángulos */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  border: 1px solid var(--line);
}

.segmented__option { position: relative; }

.segmented__option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented__option span {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 650;
  text-align: center;
  color: var(--text-soft);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.segmented__option input:checked + span {
  background: #fff;
  color: var(--navy-800);
  box-shadow: var(--shadow-xs);
}

.segmented__option input:focus-visible + span { outline: 3px solid var(--blue-400); outline-offset: 1px; }

/* Malla no obtusa */
.mesher-switch {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  cursor: pointer;
}

.mesher-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mesher-switch__track {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  margin-top: 1px;
  border-radius: var(--radius-pill);
  background: #c3d3ea;
  transition: background-color 0.2s;
}

.mesher-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(10 26 74 / 0.3);
  transition: transform 0.2s var(--ease);
}

.mesher-switch input:checked + .mesher-switch__track { background: var(--blue-600); }
.mesher-switch input:checked + .mesher-switch__track::after { transform: translateX(18px); }
.mesher-switch input:focus-visible + .mesher-switch__track { outline: 3px solid var(--blue-400); outline-offset: 2px; }

.mesher-switch__text { display: grid; gap: 2px; font-size: 0.86rem; color: var(--text-soft); }
.mesher-switch__text strong { font-size: 0.95rem; color: var(--navy-900); }

.mesher-advanced {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.mesher-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--navy-800);
  list-style: none;
  cursor: pointer;
}

.mesher-advanced summary::-webkit-details-marker { display: none; }
.mesher-advanced__icon { width: 18px; height: 18px; transition: transform 0.2s; }
.mesher-advanced[open] .mesher-advanced__icon { transform: rotate(180deg); }

.mesher-advanced__grid {
  display: grid;
  gap: 14px;
  padding: 2px 14px 14px;
}

.mesher-panel .input { min-height: 46px; padding: 10px 12px; }

.mesher-actions { display: grid; gap: 12px; }
.mesher-actions .btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.mesher-actions .alert { margin: 0; }
.mesher-error[hidden] { display: none; }

.mesher-progress { display: grid; gap: 8px; }
.mesher-progress[hidden] { display: none; }

.mesher-progress__bar {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--blue-100);
}

.mesher-progress__bar span {
  display: block;
  width: 3%;
  height: 100%;
  border-radius: inherit;
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  transition: width 0.3s var(--ease);
}

.mesher-progress__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.is-running .mesher-step { opacity: 0.6; pointer-events: none; }

/* Visor */
.mesher-result { display: grid; gap: 14px; min-width: 0; }

.viewer {
  position: relative;
  height: clamp(320px, 62vw, 620px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  touch-action: none;
}

.viewer__canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.viewer.is-dragging .viewer__canvas { cursor: grabbing; }

.viewer__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background:
    linear-gradient(rgb(220 232 247 / 0.55) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgb(220 232 247 / 0.55) 1px, transparent 1px) 0 0 / 28px 28px,
    #fbfdff;
  pointer-events: none;
}

.viewer__empty[hidden] { display: none; }

.viewer__empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 6px;
  border-radius: 16px;
  background: var(--blue-100);
  color: var(--blue-600);
}

.viewer__empty-icon .icon { width: 28px; height: 28px; }
.viewer__empty p { font-weight: 650; color: var(--navy-800); }
.viewer__empty .viewer__empty-hint { font-size: 0.85rem; font-weight: 500; color: var(--muted); }

.viewer__tools {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  gap: 6px;
}

.viewer__tools[hidden] { display: none; }

.viewer__btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.92);
  color: var(--navy-800);
  box-shadow: var(--shadow-xs);
}

.viewer__btn:hover { background: var(--blue-50); color: var(--blue-700); }
.viewer__btn .icon { width: 18px; height: 18px; }

.viewer__legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  max-width: calc(100% - 24px);
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.92);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
  pointer-events: none;
}

.viewer__legend[hidden],
.viewer__legend li[hidden] { display: none; }

.viewer__legend li { display: inline-flex; align-items: center; gap: 6px; }

.viewer__swatch { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }
.viewer__swatch--outer { background: #1257b5; }
.viewer__swatch--holes { background: #d14343; }
.viewer__swatch--obtuse { height: 10px; width: 12px; background: rgb(220 38 38 / 0.75); }

.viewer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.viewer-options[hidden] { display: none; }

.mesh-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.mesh-stats[hidden] { display: none; }

@media (min-width: 640px) {
  .mesh-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.mesh-stats div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.mesh-stats dt { font-size: 0.78rem; font-weight: 600; color: var(--muted); }

.mesh-stats dd {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}

.mesher-note {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.mesher-note[hidden] { display: none; }

.mesher-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mesher-downloads[hidden] { display: none; }

/* Código y explicación */
.mesher-docs .section-lead { max-width: 52rem; }

.mesher-docs code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--blue-100);
  font-size: 0.9em;
  color: var(--navy-800);
}

.code-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.code-tabs__list button {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text-soft);
}

.code-tabs__list button[aria-selected="true"] {
  border-color: transparent;
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  color: #fff;
}

.code-block {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy-950);
  box-shadow: var(--shadow-sm);
}

.code-block[hidden] { display: none; }

.code-block pre {
  margin: 0;
  padding: 52px 22px 20px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #dce8f7;
}

.mesher-docs .code-block code { padding: 0; border-radius: 0; background: none; font-size: inherit; color: inherit; }

.code-block__copy {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.code-block__copy:hover { background: rgb(255 255 255 / 0.16); }
.code-block__copy .icon { width: 15px; height: 15px; }

.mesher-steps {
  display: grid;
  gap: 16px;
  counter-reset: paso;
}

@media (min-width: 860px) {
  .mesher-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.mesher-steps li {
  position: relative;
  padding: 22px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-xs);
  counter-increment: paso;
}

.mesher-steps li::before {
  content: counter(paso);
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--blue-100);
  font-weight: 750;
  color: var(--blue-700);
}

.mesher-steps h3 {
  margin-bottom: 8px;
  font-size: 1.06rem;
  font-weight: 750;
  color: var(--navy-900);
}

.mesher-steps p { font-size: 0.93rem; color: var(--text-soft); }
.mesher-steps a { font-weight: 600; color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }

.mesher-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.mesher-privacy .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--blue-600); }
.mesher-privacy a { font-weight: 600; color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }
.mesher-github { margin-top: 16px; }

/* Herramienta: píxel a nodo (usa también los componentes de "imagen a malla") */
[data-nodo] .mesher-step[hidden],
[data-nodo] .field[hidden],
[data-nodo] .mesher-check[hidden],
[data-nodo] .mesher-help[hidden] { display: none; }

.nodo-modes { display: grid; gap: 10px; }

.nodo-run-icon { display: inline-flex; }
.nodo-run-icon[hidden] { display: none; }

[data-nodo] select.input {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c2766' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 18px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* Mínimo, barra de colores y máximo */
.nodo-scale {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(40px, 0.9fr) minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.nodo-scale__bar {
  width: 100%;
  height: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

.nodo-help-tight { margin-top: -8px; }

/* Leyenda del visor */
.nodo-swatch {
  display: inline-block;
  width: 18px;
  height: 10px;
  border: 1px solid #9aa3bd;
  border-radius: 2px;
}

.nodo-swatch--white { background: #fff; }
.nodo-swatch--black { background: #000; border-color: #000; }

.nodo-colorbar { font-variant-numeric: tabular-nums; }

.nodo-colorbar__bar {
  width: 120px;
  height: 10px;
  border: 1px solid rgb(10 26 74 / 0.18);
  border-radius: 3px;
}

.nodo-views {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-right: 16px;
  border-right: 1px solid var(--line-strong);
}

.nodo-views[hidden] { display: none; }

/* ---------- 15c. Presentaciones ---------- */
/* La lista (/presentaciones) y la ficha de cada charla (/presentaciones/<slug>).
   La presentación en sí tiene su propia hoja: assets/presentaciones/visor/. */

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  color: var(--navy-800);
  font: 650 0.78rem/1 var(--font);
  white-space: nowrap;
}

/* Lista: agrupada por años */
.talk-year + .talk-year { margin-top: clamp(28px, 4vw, 48px); }

.talk-year__title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(14px, 2vw, 22px);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--blue-700);
}

.talk-year__title::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgb(42 123 224 / 0.45), rgb(42 123 224 / 0));
}

.talk-year__title span {
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
}

.talk-list {
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
}

.talk-card {
  display: grid;
  gap: 20px;
  padding: clamp(14px, 2.2vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.talk-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.talk-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--blue-50);
}

.talk-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.talk-card:hover .talk-card__media img { transform: scale(1.03); }

/* Un filo fino sobre las diapositivas: las de fondo blanco no se funden con la tarjeta */
.talk-card__media::after,
.talk-hero__cover::after,
.talk-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(10 26 74 / 0.08);
  pointer-events: none;
}

.talk-card__count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgb(6 18 56 / 0.62);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 650;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.talk-card__count .icon { width: 15px; height: 15px; }

.talk-card .tags { margin-top: 0; }

.talk-card__title {
  margin-top: 12px;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  text-wrap: balance;
}

.talk-card__title a { transition: color 0.2s; }
.talk-card__title a:hover { color: var(--blue-700); }

.talk-card__meta {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}

.talk-card__meta .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--blue-600); }

.talk-card__text {
  margin-top: 10px;
  color: var(--text-soft);
}

.talk-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.talk-card__actions .icon { width: 16px; height: 16px; }

@media (min-width: 860px) {
  .talk-card {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 32px;
  }
}

/* Ficha: la cabecera con la portada a la derecha */
.talk-hero { padding-bottom: clamp(96px, 12vw, 150px); }

.talk-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

@media (min-width: 980px) {
  .talk-hero__inner { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
  .talk-hero::before { display: none; }
}

.talk-hero .tags { margin-top: 0; }

.talk-hero__title {
  margin-top: 14px;
  font-size: clamp(1.6rem, 1.05rem + 2.1vw, 2.55rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--navy-900);
  text-wrap: balance;
}

.talk-hero__en {
  margin-top: 10px;
  font-size: clamp(0.98rem, 0.92rem + 0.3vw, 1.12rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--text-soft);
}

.talk-hero__authors {
  margin-top: clamp(12px, 2vw, 18px);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  color: var(--text-soft);
}

.talk-hero__authors strong { font-weight: 700; color: var(--navy-900); }

.talk-hero__advisor {
  display: block;
  margin-top: 2px;
  font-size: 0.92em;
  color: var(--muted);
}

.talk-hero__meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.talk-hero__meta li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.talk-hero__meta .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--blue-600); }

.talk-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(18px, 2.6vw, 26px);
}

.talk-hero__actions .icon { width: 18px; height: 18px; }

.talk-hero__note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  max-width: 34rem;
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--muted);
}

.talk-hero__note .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--blue-600); }

.talk-hero__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--blue-50);
  box-shadow: 0 34px 60px -30px rgb(10 40 100 / 0.6), 0 0 0 1px rgb(10 26 74 / 0.06);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.talk-hero__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.talk-hero__play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 12px;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.94);
  color: var(--navy-700);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 14px 30px -12px rgb(0 0 0 / 0.55);
  transition: transform 0.3s var(--ease), background-color 0.3s;
}

.talk-hero__play .icon {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 6px 5px 6px 7px;
  border-radius: 50%;
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  color: #fff;
}

.talk-hero__cover:hover { transform: translateY(-3px); box-shadow: 0 40px 70px -30px rgb(10 40 100 / 0.7), 0 0 0 1px rgb(10 26 74 / 0.06); }
.talk-hero__cover:hover img { transform: scale(1.03); }
.talk-hero__cover:hover .talk-hero__play { transform: translateY(-2px); background: #fff; }

@media (max-width: 979.98px) {
  .talk-hero__cover { max-width: 640px; }
}

/* En el móvil el botón grande está justo encima: en la portada basta el icono */
@media (max-width: 639.98px) {
  .talk-hero__play { right: 10px; bottom: 10px; padding: 5px; gap: 0; font-size: 0; }
  .talk-hero__play .icon { width: 30px; height: 30px; padding: 8px 7px 8px 9px; }
}

/* Cifras */
.talk-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

@media (min-width: 860px) {
  .talk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
}

.talk-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: var(--shadow-xs);
}

.talk-stat__icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-600);
}

.talk-stat__icon .icon { width: 21px; height: 21px; }

.talk-stat__value {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.talk-stat__label {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--muted);
}

/* De qué trata + contenido */
.talk-about {
  display: grid;
  gap: clamp(22px, 3vw, 40px);
  align-items: start;
}

@media (min-width: 980px) {
  .talk-about { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr); }
}

.talk-prose p {
  margin-top: 1em;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.8;
  color: var(--text);
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.talk-prose .section-title + p { margin-top: clamp(14px, 2vw, 20px); }
.talk-prose a { color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }
.talk-prose__tags { margin-top: 20px; }

.talk-outline {
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 980px) {
  .talk-outline { position: sticky; top: calc(var(--header-h) + 20px); }
}

.talk-outline__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--navy-900);
}

.talk-outline__title .icon { width: 20px; height: 20px; color: var(--blue-600); }

.talk-outline__list {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.talk-outline__list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--blue-50);
  font-size: 0.95rem;
  line-height: 1.4;
}

.talk-outline__list li:first-child { border-top: 0; }
.talk-outline__list strong { display: block; font-weight: 700; color: var(--navy-900); }

.talk-outline__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 750;
}

.talk-outline__detail {
  display: block;
  margin-top: 2px;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.talk-outline__made {
  margin: 18px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-700);
}

/* Objetivos y conclusiones */
.talk-panel {
  margin-top: clamp(24px, 3.5vw, 40px);
  padding: clamp(18px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--grad-card);
}

.talk-panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.talk-panel__title .icon { width: 22px; height: 22px; color: var(--blue-600); }

.talk-panel__lead {
  margin-top: 12px;
  line-height: 1.7;
  color: var(--text);
}

.talk-panel__lead strong { color: var(--navy-900); }

.talk-panel__list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.talk-panel__list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  line-height: 1.6;
}

.talk-panel__num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--blue-300);
  color: var(--blue-700);
  font-size: 0.78rem;
  font-weight: 750;
}

.talk-panel .checklist { margin-top: 14px; gap: 10px; }
.talk-panel .checklist li { line-height: 1.6; }

/* Un vistazo */
.talk-slides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 18px);
}

@media (min-width: 900px) {
  .talk-slides { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.talk-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  box-shadow: 0 16px 32px -20px rgb(10 40 100 / 0.55), 0 0 0 1px rgb(10 26 74 / 0.06);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.talk-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.talk-slide__num {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgb(6 18 56 / 0.62);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.talk-slide:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -22px rgb(10 40 100 / 0.7), 0 0 0 1px rgb(10 26 74 / 0.08);
}

.talk-all {
  margin-top: clamp(16px, 2.4vw, 24px);
  border-top: 1px solid var(--line);
}

.talk-all summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 2px 4px;
  font-weight: 650;
  color: var(--blue-700);
  cursor: pointer;
  list-style: none;
}

.talk-all summary::-webkit-details-marker { display: none; }
.talk-all summary:hover { color: var(--blue-600); }
.talk-all summary .icon { width: 18px; height: 18px; }
.talk-all__icon { transition: transform 0.25s var(--ease); }
.talk-all[open] .talk-all__icon { transform: rotate(180deg); }

.talk-all__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 700px) { .talk-all__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .talk-all__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.talk-all__grid a {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: var(--blue-50);
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.2s, transform 0.2s var(--ease);
}

.talk-all__grid img { width: 100%; height: 100%; object-fit: cover; }

.talk-all__grid span {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgb(6 18 56 / 0.66);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 650;
}

.talk-all__grid a:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--blue-400); }

/* Material */
.talk-material {
  display: grid;
  gap: clamp(22px, 3vw, 34px);
}

.talk-material__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.talk-material__label .icon { width: 17px; height: 17px; }

.talk-papers {
  display: grid;
  gap: 14px;
}

.talk-paper {
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.talk-paper .tags { margin-top: 0; }

.talk-paper__title {
  margin-top: 10px;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--navy-900);
}

.talk-paper__title a:hover { color: var(--blue-700); text-decoration: underline; text-underline-offset: 4px; }

.talk-paper__authors {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.talk-paper__authors strong { font-weight: 700; color: var(--navy-900); }

.talk-paper__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.talk-paper__actions .icon { width: 16px; height: 16px; }

.talk-docs { display: grid; gap: 12px; }

.talk-doc {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s var(--ease);
}

.talk-doc:hover { border-color: var(--blue-300); box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.talk-doc__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #0b4494 linear-gradient(180deg, #0d4ca3 0%, #093b85 100%);
  color: #fff;
}

.talk-doc__icon .icon { width: 22px; height: 22px; }

.talk-doc__text { flex: 1; min-width: 0; }
.talk-doc__text strong { display: block; color: var(--navy-900); font-weight: 750; }
.talk-doc__text span { display: block; margin-top: 2px; font-size: 0.86rem; color: var(--muted); }

.talk-doc__go { color: var(--blue-700); }
.talk-doc__go .icon { width: 22px; height: 22px; }

/* El paso a otras charlas */
.talk-nav {
  display: grid;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 34px);
}

@media (min-width: 760px) {
  .talk-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .talk-nav__link--next { grid-column: 2; text-align: right; }
}

.talk-nav__link {
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s, box-shadow 0.25s;
}

.talk-nav__link:hover { border-color: var(--blue-300); box-shadow: var(--shadow-sm); }

.talk-nav__dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.talk-nav__link--next .talk-nav__dir { justify-content: flex-end; }
.talk-nav__dir .icon { width: 15px; height: 15px; }

.talk-nav__title {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy-900);
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---------- 16. Animación de aparición ---------- */

.reveal-ready {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
}

/* ---------- 17. Accesibilidad e impresión ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .skip-link,
  .hero__lines,
  .hero__curve,
  .page-hero__lines,
  .page-hero__curve,
  .cta-banner__art,
  .social { display: none !important; }

  body { background: #fff; }
  .reveal-pending { opacity: 1 !important; transform: none !important; }
  .cta-banner { color: #000; background: none; box-shadow: none; border: 1px solid #ccc; }
  .cta-banner__title,
  .cta-banner__text { color: #000; }
}
