/* Montserrat Variable 5.3.0 (fontsource, OFL-1.1), alojada localmente. Ver sitio/fonts/LICENSE-OFL.txt */

/* montserrat-latin-ext-wght-normal */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/montserrat-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;
}

/* montserrat-latin-wght-normal */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/montserrat-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;
}

/* montserrat-latin-ext-wght-italic */
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/montserrat-latin-ext-wght-italic.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;
}

/* montserrat-latin-wght-italic */
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/montserrat-latin-wght-italic.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;
}

/*
  Tokens de diseño — fuente de verdad: Manual de estilo HACKEAR.
  Fondos permitidos por el manual: negro, blanco, turquesa #4FABB2 y violeta #9040C8.
  El gris #2C2C2C se usa solo para texto (el manual no lo admite como fondo).
*/
:root {
  --black: #000000;
  --white: #ffffff;
  --pink: #ff7ea4;
  --cyan: #7effff;
  --ink: #2c2c2c;
  --teal: #4fabb2;
  --purple: #9040c8;

  --line: rgba(255, 255, 255, 0.18);
  --line-strong: rgba(255, 255, 255, 0.4);
  --muted: rgba(255, 255, 255, 0.76);
  --surface: rgba(255, 255, 255, 0.035);

  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --header-h: 72px;
  --gutter: clamp(20px, 4vw, 44px);
  --maxw: 1200px;
  --section-y: clamp(72px, 10vw, 136px);
  --glitch: 0.035em;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
.section--white :focus-visible,
.section--teal :focus-visible,
.page--light :focus-visible {
  outline-color: var(--black);
}
.section--purple :focus-visible {
  outline-color: var(--white);
}

.container {
  width: min(var(--maxw), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--white);
  color: var(--black);
  padding: 10px 16px;
  font-weight: 700;
}
.skip-link:focus {
  top: 12px;
}

/* ───────── Efecto glitch de identidad: desfase rosa (izq.) y cian (der.) como en el logo ───────── */
.glitch-text {
  text-shadow:
    calc(var(--glitch) * -1) 0 var(--pink),
    var(--glitch) 0 var(--cyan);
}
.section--teal .glitch-text {
  text-shadow:
    calc(var(--glitch) * -1) 0 var(--pink),
    var(--glitch) 0 var(--white);
}

.gbars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.gbars__bar {
  position: absolute;
}
.gbars__bar--pink {
  background: var(--pink);
}
.gbars__bar--cyan {
  background: var(--cyan);
}
.gbars__bar--white {
  background: var(--white);
}
.gbars__bar--h1 { top: 12%; right: 6%; width: 74px; height: 8px; }
.gbars__bar--h2 { top: 31%; right: 2%; width: 38px; height: 6px; }
.gbars__bar--h3 { top: 58%; right: 9%; width: 96px; height: 6px; }
.gbars__bar--h4 { top: 77%; right: 4%; width: 52px; height: 10px; }
.gbars__bar--h5 { top: 40%; left: 1.5%; width: 44px; height: 6px; }
.gbars__bar--h6 { top: 84%; left: 4%; width: 70px; height: 6px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ───────── Botones ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 2px;
  background: transparent;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  transition:
    box-shadow 0.15s,
    background-color 0.15s,
    color 0.15s,
    transform 0.15s;
}
.btn--lg {
  min-height: 54px;
  padding: 0 28px;
  font-size: 1rem;
}
.btn:hover {
  box-shadow:
    -4px 0 0 var(--pink),
    4px 0 0 var(--cyan);
}
.btn--pink {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--black);
}
.btn--pink:hover {
  box-shadow: 4px 4px 0 var(--cyan);
}
.btn--cyan {
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn--cyan:hover {
  background: var(--cyan);
  color: var(--black);
  box-shadow: 4px 4px 0 var(--pink);
}
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--white);
}
.btn--ghost:hover {
  border-color: var(--white);
}
.btn--white {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn--white:hover {
  box-shadow: 4px 4px 0 var(--black);
}
.btn--outline-white {
  border-color: var(--white);
  color: var(--white);
}
.btn--outline-white:hover {
  background: var(--white);
  color: var(--black);
  box-shadow: 4px 4px 0 var(--black);
}
/* Destino todavía no configurado: se ve como botón pero no navega */
.btn--off {
  opacity: 0.55;
  border-style: dashed;
  cursor: not-allowed;
}
.btn--off:hover {
  box-shadow: none;
  background: transparent;
  color: var(--cyan);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}
.link-arrow::after {
  content: '→';
  transition: transform 0.15s;
}
.link-arrow:hover::after {
  transform: translateX(4px);
}
.link-arrow--back::after {
  content: none;
}
.link-arrow--back::before {
  content: '←';
}
.section--black .link-arrow,
.pillars .link-arrow {
  color: var(--cyan);
}

/* ───────── Etiquetas ───────── */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid currentColor;
  line-height: 1.3;
}
.tag--cyan {
  color: var(--cyan);
}
.demo-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  background: var(--pink);
  color: var(--black);
  line-height: 1.3;
  font-weight: 700;
}
.demo-badge--dark {
  background: var(--black);
  color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ───────── Header (sin JavaScript: el menú móvil usa :target) ───────── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}
.header__logo img {
  height: 42px;
  width: auto;
}
.header__toggle {
  display: none;
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.header__links {
  display: flex;
  gap: 4px;
}
.header__links a {
  display: block;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.header__links a:hover {
  color: var(--white);
  border-bottom-color: var(--pink);
}
.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 1080px) {
  /* backdrop-filter crearía un bloque contenedor para el menú fijo y haría saltar la página */
  .header {
    backdrop-filter: none;
  }
  /* Abrir el menú = ir a #menu-principal (:target). Cualquier enlace del menú cambia el destino y lo cierra. */
  .header__toggle {
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
  }
  .header__toggle--open {
    display: inline-flex;
  }
  .header__nav:target ~ .header__toggle--open {
    display: none;
  }
  .header__nav:target ~ .header__toggle--close {
    display: inline-flex;
  }
  .header__toggle-icon,
  .header__toggle-icon::before {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--white);
    position: relative;
  }
  .header__toggle--open .header__toggle-icon::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    box-shadow: 0 12px 0 var(--white);
  }
  .header__toggle--close .header__toggle-icon {
    background: transparent;
  }
  .header__toggle--close .header__toggle-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(45deg);
  }
  .header__toggle--close .header__toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 2px;
    background: var(--white);
    transform: rotate(-45deg);
  }

  .header__nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--black);
    border-bottom: 1px solid var(--line);
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
  }
  .header__nav:target {
    display: flex;
  }
  .header__links {
    flex-direction: column;
    gap: 0;
  }
  .header__links a {
    padding: 18px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .header__actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 24px;
  }
  .header__actions .btn {
    width: 100%;
    min-height: 52px;
  }
}
@media (max-width: 420px) {
  .header__logo img {
    height: 34px;
  }
}

/* ───────── Hero ───────── */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(860px, calc(100svh - var(--header-h)));
  display: flex;
  align-items: center;
  padding-block: clamp(48px, 8vw, 96px) clamp(72px, 9vw, 110px);
  border-bottom: 1px solid var(--line);
}
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% 50%;
  opacity: 0.62;
  z-index: -3;
}
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, #000 4%, rgba(0, 0, 0, 0.62) 52%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 32%);
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow__mark {
  width: 28px;
  height: 4px;
  background: var(--pink);
  box-shadow: 8px 0 0 var(--cyan);
  margin-right: 8px;
}
.hero__title {
  font-size: clamp(2.5rem, 6.2vw, 5.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-shadow:
    calc(var(--glitch) * -1) 0 var(--pink),
    var(--glitch) 0 var(--cyan);
  animation: glitch-in 0.7s steps(7) 1;
}
.hero__line {
  display: block;
}
.hero__line--glitch {
  text-shadow:
    -0.06em 0 var(--pink),
    0.06em 0 var(--cyan);
}
.hero__lead {
  max-width: 34em;
  margin-top: 28px;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.6;
  color: var(--muted);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}
.hero__brand {
  position: relative;
}
.hero__brand img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(0, 0, 0, 0.6));
}
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.hero__scroll::after {
  content: '';
  width: 2px;
  height: 28px;
  background: linear-gradient(var(--pink), var(--cyan));
}

@keyframes glitch-in {
  0% {
    text-shadow: -0.14em 0 var(--pink), 0.14em 0 var(--cyan);
    transform: translateX(-6px);
  }
  30% {
    text-shadow: 0.1em 0 var(--pink), -0.1em 0 var(--cyan);
    transform: translateX(5px);
  }
  60% {
    text-shadow: -0.08em 0 var(--pink), 0.08em 0 var(--cyan);
    transform: translateX(-2px);
  }
  100% {
    transform: none;
  }
}

@media (max-width: 860px) {
  .hero {
    align-items: flex-start;
    padding-top: 40px;
  }
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero__brand {
    order: -1;
    width: min(340px, 78%);
  }
  .hero__shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), #000 82%);
  }
  .hero__photo {
    object-position: 20% 30%;
  }
  .hero__cta .btn {
    flex: 1 1 100%;
  }
  .hero__scroll {
    display: none;
  }
}

/* ───────── Footer ───────── */
.footer {
  background: var(--black);
  border-top: 1px solid var(--line);
  padding-top: clamp(48px, 7vw, 80px);
}
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(32px, 6vw, 80px);
}
.footer__brand img {
  width: min(280px, 70%);
  height: auto;
}
.footer__brand p {
  margin-top: 22px;
  max-width: 28em;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.footer__h {
  margin-bottom: 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.footer__cols li + li {
  margin-top: 0;
}
.footer__cols a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--white);
}
.footer__cols a:hover {
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.footer__pending {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  font-weight: 300;
}
.footer__bottom {
  margin-top: clamp(40px, 6vw, 72px);
  padding-block: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
@media (max-width: 860px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .footer__cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* En móvil solo se conservan las barras glitch que no pisan texto */
@media (max-width: 860px) {
  .hero .gbars__bar:nth-child(n + 3) {
    display: none;
  }
}

/* ───────── Secciones: temas de fondo (solo colores permitidos por el manual) ───────── */
.section {
  position: relative;
  padding-block: var(--section-y);
  scroll-margin-top: var(--header-h);
}
#inicio {
  scroll-margin-top: 0;
}
.section--black {
  background: var(--black);
  color: var(--white);
}
.section--white {
  background: var(--white);
  color: var(--black);
}
.section--teal {
  background: var(--teal);
  color: var(--black);
}
.section--purple {
  background: var(--purple);
  color: var(--white);
}

/* Encabezado de sección */
.sh {
  margin-bottom: clamp(32px, 5vw, 56px);
  max-width: 46rem;
}
.sh__kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sh__index {
  font-family: var(--mono);
  padding: 3px 8px;
  background: var(--pink);
  color: var(--black);
  letter-spacing: 0.04em;
}
.sh__title {
  font-size: clamp(1.9rem, 4.2vw, 3.3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.sh__title em {
  font-style: normal;
}
.section--black .sh__title em {
  color: var(--pink);
}
.section--white .sh__title em {
  background: linear-gradient(transparent 60%, var(--pink) 60%);
}
.section--teal .sh__title em {
  background: linear-gradient(transparent 60%, var(--white) 60%);
}
.sh__intro {
  margin-top: 22px;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--muted);
}
.section--white .sh__intro,
.section--teal .sh__intro {
  color: var(--ink);
}
.section--teal .sh__intro {
  color: var(--black);
}
.section--white .sh__kicker {
  color: var(--ink);
}

/* ───────── Pilares ───────── */
.pillars__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.pillars .sh {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  margin-bottom: 0;
}
.pillars__list {
  border-bottom: 1px solid var(--line);
}
.pillar {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 20px;
  padding-block: 36px;
  border-top: 1px solid var(--line);
}
.pillar__n {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--cyan);
}
.pillar__title {
  font-size: 1.55rem;
  line-height: 1.2;
  margin-bottom: 12px;
}
.pillar__text {
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 34em;
}
@media (max-width: 900px) {
  .pillars__layout {
    grid-template-columns: 1fr;
  }
  .pillars .sh {
    position: static;
  }
}
@media (max-width: 480px) {
  .pillar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pillar__n {
    font-size: 2.4rem;
  }
}

/* ───────── Investigaciones (editorial sobre blanco) ───────── */
.research {
  display: grid;
  gap: 56px;
}
.acard__cover {
  display: block;
  overflow: hidden;
  border: 2px solid var(--black);
}
.acard__cover svg,
.acard__cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.4s;
}
.acard:hover .acard__cover svg,
.acard:hover .acard__cover img {
  transform: scale(1.03);
}
.acard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.section--white .tag {
  color: var(--black);
}
.acard__title {
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.acard__title a {
  text-decoration: none;
}
.acard__title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.acard__summary {
  margin-top: 12px;
  color: var(--ink);
  font-size: 0.98rem;
}
.acard__by {
  margin-top: 14px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.acard--featured {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.acard--featured .acard__title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.12;
}
.acard--featured .acard__summary {
  font-size: 1.08rem;
}

.research__rest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 36px;
  padding-top: 48px;
  border-top: 2px solid var(--black);
}
.research__rest .acard {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.research__rest .acard__cover svg,
.research__rest .acard__cover img {
  aspect-ratio: 5 / 4;
}
.research__rest .acard__summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 980px) {
  .acard--featured {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .research__rest {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .research__rest .acard {
    grid-template-columns: 1fr;
  }
  .research__rest .acard__cover svg,
  .research__rest .acard__cover img {
    aspect-ratio: 16 / 10;
  }
}

/* ───────── Laboratorios ───────── */
.labs__count {
  margin: 28px 0 22px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.labs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.lab {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lab:hover {
  border-color: var(--cyan);
  box-shadow: -4px 0 0 var(--pink), 4px 0 0 var(--cyan);
}
.lab__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.level {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.level__bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
}
.level__bars span {
  width: 5px;
  background: var(--line-strong);
}
.level__bars span:nth-child(1) {
  height: 8px;
}
.level__bars span:nth-child(2) {
  height: 13px;
}
.level__bars span:nth-child(3) {
  height: 18px;
}
.level__bars span.on {
  background: var(--pink);
}
.lab__title {
  font-size: 1.25rem;
  line-height: 1.25;
  margin-top: 6px;
}
.lab__summary {
  color: var(--muted);
  font-size: 0.97rem;
}
.lab__label {
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.lab__learn li {
  position: relative;
  padding-left: 18px;
  font-size: 0.93rem;
}
.lab__learn li + li {
  margin-top: 6px;
}
.lab__learn li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 2px;
  background: var(--pink);
}
.lab .demo-badge {
  align-self: flex-start;
  margin-top: auto;
}
.lab__learn {
  margin-bottom: 10px;
}

/* ───────── Recursos (sobre turquesa) ───────── */
.rlist {
  border-bottom: 2px solid var(--black);
}
.ritem {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding-block: 28px;
  border-top: 2px solid var(--black);
}
.ritem__n {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
}
.ritem__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ritem__title {
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.2;
}
.ritem__title a {
  text-decoration: none;
}
.ritem__title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.ritem__summary {
  margin-top: 8px;
  max-width: 44em;
  font-size: 0.97rem;
}
@media (max-width: 720px) {
  .ritem {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ritem .link-arrow {
    justify-self: start;
  }
}

/* ───────── Últimas publicaciones ───────── */
.latest__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.lpost--lead {
  grid-column: span 2;
}
.lpost__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lpost__link:hover {
  border-color: var(--cyan);
  box-shadow: -4px 0 0 var(--pink), 4px 0 0 var(--cyan);
}
.lpost__cover {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
}
.lpost--lead .lpost__cover {
  aspect-ratio: 21 / 9;
}
.lpost__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  flex: 1;
}
.lpost__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}
.lpost__title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.lpost--lead .lpost__title {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}
.lpost__date {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.latest__more {
  margin-top: 40px;
}
@media (max-width: 980px) {
  .latest__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .latest__grid {
    grid-template-columns: 1fr;
  }
  .lpost--lead {
    grid-column: auto;
  }
  .lpost--lead .lpost__cover {
    aspect-ratio: 16 / 9;
  }
}

/* ───────── Participación ───────── */
.join__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.join .sh__kicker {
  margin-bottom: 20px;
}
.join .sh__index {
  background: var(--black);
  color: var(--white);
}
.join__title {
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.join__title em {
  font-style: normal;
  background: var(--black);
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.join__text {
  margin-top: 24px;
  max-width: 34em;
  font-size: 1.12rem;
}
.join__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}
.join__logo {
  width: 100%;
  height: auto;
}
@media (max-width: 900px) {
  .join__inner {
    grid-template-columns: 1fr;
  }
  .join__logo {
    width: min(300px, 70%);
    order: -1;
  }
  .join__cta .btn {
    flex: 1 1 100%;
  }
}

/* ───────── Estados vacíos ───────── */
.vacio {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}
.vacio--claro {
  border-color: rgba(0, 0, 0, 0.5);
  color: var(--ink);
}
.vacio--turquesa {
  border-color: rgba(0, 0, 0, 0.6);
  color: var(--black);
}

/* ───────── Páginas internas (archivo y detalle) ───────── */
.page {
  padding-block: clamp(40px, 6vw, 80px) var(--section-y);
  min-height: 70svh;
}
.page--center {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 22px;
}
.page .link-arrow--back {
  margin-bottom: 36px;
  color: var(--cyan);
}
.page__title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.page__lead {
  margin-top: 18px;
  max-width: 40em;
  font-size: 1.1rem;
  color: var(--muted);
}

.archive__list {
  border-bottom: 1px solid var(--line);
}
.archive__list a {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 210px 150px;
  gap: 8px 24px;
  align-items: baseline;
  padding: 22px 8px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.15s;
}
.archive__list a:hover {
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--pink);
}
.archive__kind {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}
.archive__title {
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.35;
}
.archive__cat,
.archive__date {
  font-size: 0.88rem;
  color: var(--muted);
}
.archive__date {
  font-family: var(--mono);
  font-size: 0.78rem;
}
@media (max-width: 900px) {
  .archive__list a {
    grid-template-columns: 1fr;
    padding-inline: 4px;
  }
}

/* Detalle */
.article {
  max-width: 860px;
}
.demo-banner {
  margin-bottom: 36px;
  padding: 14px 18px;
  border-left: 5px solid var(--pink);
  background: var(--surface);
  font-size: 0.92rem;
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.article__title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: calc(var(--glitch) * -1) 0 var(--pink), var(--glitch) 0 var(--cyan);
}
.article__lead {
  margin-top: 22px;
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
}
.article__by {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.article__cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  margin-block: 40px;
  border: 1px solid var(--line);
}
.article__content {
  max-width: 40rem;
  font-size: 1.1rem;
  line-height: 1.75;
}
.article__content p + p {
  margin-top: 1.3em;
}
.article__content h2 {
  margin: 2em 0 0.7em;
  font-size: 1.4rem;
}
.article__content li {
  position: relative;
  padding-left: 22px;
}
.article__content li + li {
  margin-top: 10px;
}
.article__content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 10px;
  height: 3px;
  background: var(--pink);
}
.article__next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.article__next a:first-child {
  display: grid;
  gap: 4px;
  max-width: 28em;
  font-weight: 700;
  text-decoration: none;
}
.article__next a:first-child span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.article__next a:first-child:hover {
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Contacto */
.contacto {
  display: grid;
  gap: 40px;
  max-width: 44rem;
  margin-top: 48px;
}
.contacto section {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.contacto h2 {
  font-size: 1.5rem;
  line-height: 1.2;
}
.contacto__pendiente {
  padding: 12px 14px;
  border-left: 4px solid var(--pink);
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--muted);
}

/* Portada real del artículo: se ve completa (un gráfico o una captura con texto no debe recortarse).
   La portada abstracta generada (svg) conserva su proporción fija. */
img.article__cover {
  aspect-ratio: auto;
  object-fit: contain;
  max-height: 70svh;
}

/* Navegación por categorías y paginado */
.catnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.catnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}
.catnav a:hover {
  border-color: var(--white);
}
.catnav a[aria-current='page'] {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
  font-weight: 700;
}
.archive__list {
  margin-top: 32px;
}
.archive__title .demo-badge {
  margin-left: 10px;
  vertical-align: 2px;
}
.paginas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
}
.paginas a {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
}
.article__meta a.tag {
  text-decoration: none;
}

/* Contenido de los artículos (HTML que viene de Ghost, ya sanitizado) */
.article__content a {
  color: var(--cyan);
  text-underline-offset: 3px;
}
.article__content h3,
.article__content h4 {
  margin: 1.8em 0 0.6em;
  font-size: 1.2rem;
  line-height: 1.3;
}
.article__content ul,
.article__content ol {
  margin-block: 1.2em;
}
.article__content ol {
  list-style: decimal;
  padding-left: 1.6em;
}
.article__content ol li {
  padding-left: 6px;
}
.article__content ol li::before {
  content: none;
}
.article__content img,
.article__content figure {
  max-width: 100%;
  height: auto;
  margin-block: 1.6em;
}
.article__content figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.article__content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--pink);
  font-style: italic;
  color: var(--muted);
}
.article__content code {
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.article__content pre {
  margin-block: 1.6em;
  padding: 16px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  line-height: 1.5;
  font-size: 0.92rem;
}
.article__content pre code {
  padding: 0;
  background: none;
  border: 0;
}
.article__content hr {
  margin-block: 2em;
  border: 0;
  border-top: 1px solid var(--line);
}
.article__content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin-block: 1.6em;
  font-size: 0.95rem;
}
.article__content th,
.article__content td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

