/* ============================================================================
   MORONES LAB — HOJA DE ESTILO
   Dirección: "panel de instrumentos para sistemas vivos". Dark-first, azul de
   marca como único acento, tipografía técnica (display + mono) y toques
   futuristas ganados desde la ciencia. Para cambiar el azul: edita --brand.
   ========================================================================== */

/* --- Tokens (tema oscuro por defecto) ---------------------------------- */
:root {
  --brand:        oklch(0.60 0.15 250);
  --brand-bright: oklch(0.70 0.16 248);
  --brand-deep:   oklch(0.45 0.13 255);
  --brand-strong: var(--brand-bright);
  --particle:     #4a94dd;            /* color del campo de partículas (canvas) */

  --bg:        oklch(0.17 0.02 258);
  --bg-2:      oklch(0.20 0.022 258);
  --surface:   oklch(0.225 0.024 258);
  --surface-2: oklch(0.27 0.026 258);
  --ink:       oklch(0.95 0.008 255);
  --ink-soft:  oklch(0.80 0.015 255);
  --muted:     oklch(0.66 0.02 255);
  --border:    color-mix(in oklch, white 11%, transparent);
  --border-2:  color-mix(in oklch, white 18%, transparent);

  /* Hero: siempre oscuro, independiente del tema */
  --hero-bg:   oklch(0.15 0.018 260);
  --hero-ink:  oklch(0.97 0.006 255);
  --hero-muted:oklch(0.76 0.02 255);

  --radius: 16px;
  --radius-sm: 11px;
  --wrap: 1140px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 0.4s;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3), 0 4px 16px oklch(0 0 0 / 0.28);
  --shadow-md: 0 12px 40px oklch(0 0 0 / 0.42);
  --glow: 0 0 0 1px color-mix(in oklch, var(--brand) 40%, transparent), 0 8px 30px -6px color-mix(in oklch, var(--brand) 55%, transparent);

  --display: "Space Grotesk", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

:root[data-theme="light"] {
  --brand-strong: var(--brand-deep);
  --particle:  #2f7fce;
  --bg:        oklch(0.98 0.006 255);
  --bg-2:      oklch(0.965 0.008 255);
  --surface:   oklch(1 0 0);
  --surface-2: oklch(0.975 0.006 255);
  --ink:       oklch(0.25 0.02 258);
  --ink-soft:  oklch(0.42 0.02 258);
  --muted:     oklch(0.52 0.02 258);
  --border:    color-mix(in oklch, oklch(0.2 0.03 258) 12%, transparent);
  --border-2:  color-mix(in oklch, oklch(0.2 0.03 258) 20%, transparent);
  --shadow-sm: 0 1px 2px oklch(0.5 0.03 260 / 0.07), 0 4px 16px oklch(0.5 0.03 260 / 0.06);
  --shadow-md: 0 14px 44px oklch(0.4 0.04 260 / 0.12);
}

/* --- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--sans); font-size: clamp(1rem, 0.96rem + 0.25vw, 1.1rem);
  line-height: 1.65; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
.mono { font-family: var(--mono); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; position: relative; }

/* Grano global sutil */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] .grain { opacity: 0.03; }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 200;
  background: linear-gradient(90deg, var(--brand), var(--brand-bright));
  transform: scaleX(0); transform-origin: left; will-change: transform;
}

.skip-link { position: absolute; left: -999px; top: 0; z-index: 300; background: var(--brand); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 3px; border-radius: 3px; }

.kicker { display: inline-block; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-strong); margin-bottom: 1rem; font-weight: 600; }
.section-head { margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-title { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 700; }

/* --- Wordmark ---------------------------------------------------------- */
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.03em; color: var(--ink); display: inline-flex; align-items: baseline; gap: 0.32rem; line-height: 1; white-space: nowrap; }
.wordmark:hover { text-decoration: none; }
.wordmark-main { color: var(--brand-bright); }
.wordmark-sub { color: var(--ink); }
.wordmark-ver { color: var(--brand-bright); font-size: 0.44em; font-weight: 600; top: -0.95em; margin-left: 0.05em; }
.wordmark-sm { font-size: 1.22rem; }
.brand-lockup { display: inline-flex; flex-direction: column; align-items: center; gap: 0.32rem; }
.brand-lockup:hover { text-decoration: none; }
.wordmark-tagline { font-family: var(--mono); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.06em; color: var(--muted); text-align: center; white-space: nowrap; }

/* --- Header ------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in oklch, var(--bg) 72%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease); }
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 1.4rem; height: 70px; }
.nav { margin-left: auto; }
.nav-links { display: flex; gap: 1.2rem; align-items: center; }
.nav-links a { font-family: var(--display); font-weight: 500; font-size: 0.92rem; color: var(--ink-soft); position: relative; padding: 0.4rem 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--brand-bright); transition: width 0.28s var(--ease); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a:hover::after { width: 100%; }
/* Menús desplegables del nav */
.nav-group { position: relative; }
.nav-group-btn { font-family: var(--display); font-weight: 500; font-size: 0.92rem; color: var(--ink-soft); background: none; border: none; cursor: pointer; padding: 0.4rem 0; display: inline-flex; align-items: center; gap: 0.3rem; }
.nav-group-btn::after { content: "▾"; font-size: 0.72em; opacity: 0.65; transition: transform 0.25s var(--ease); }
.nav-group:hover .nav-group-btn::after, .nav-group.open .nav-group-btn::after { transform: rotate(180deg); }
.nav-group-btn:hover { color: var(--ink); }
.nav-dropdown { position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%) translateY(8px); min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-md); padding: 0.4rem; opacity: 0; visibility: hidden; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); z-index: 120; }
.nav-group:hover .nav-dropdown, .nav-group.open .nav-dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown a { display: block; padding: 0.55rem 0.8rem; border-radius: 9px; font-family: var(--display); font-weight: 500; font-size: 0.9rem; color: var(--ink-soft); white-space: nowrap; }
.nav-dropdown a::after { content: none; }
.nav-dropdown a:hover { background: color-mix(in oklch, var(--brand) 12%, transparent); color: var(--brand-strong); text-decoration: none; }

.header-controls { display: flex; gap: 0.5rem; align-items: center; }
.toggle-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 0.6rem; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); color: var(--ink-soft); cursor: pointer; font-family: var(--mono); font-weight: 600; font-size: 0.8rem; transition: border-color 0.2s var(--ease), color 0.2s var(--ease); }
.toggle-btn:hover { border-color: var(--brand); color: var(--brand-strong); }
.toggle-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
.nav-cta { will-change: transform; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; width: 40px; height: 40px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); cursor: pointer; padding: 10px; }
.nav-toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); }

/* --- Botones ----------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-weight: 600; font-size: 0.98rem; padding: 0.78rem 1.5rem; border-radius: 11px; cursor: pointer; border: 1px solid transparent; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease); }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.9rem; }
.btn-primary { background: var(--brand); color: oklch(0.99 0.01 250); box-shadow: 0 6px 22px -4px color-mix(in oklch, var(--brand) 60%, transparent); }
.btn-primary:hover { background: var(--brand-bright); box-shadow: 0 12px 30px -6px color-mix(in oklch, var(--brand) 70%, transparent); }
.btn-ghost { border-color: var(--hero-muted); color: var(--hero-ink); background: transparent; }
.btn-ghost:hover { border-color: var(--hero-ink); background: oklch(1 0 0 / 0.06); }

/* --- Píldoras de estado ------------------------------------------------ */
.recruiting-pill, .join-status { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; color: var(--hero-muted); }
.recruiting-pill { padding: 0.4rem 0.85rem; border: 1px solid var(--border-2); border-radius: 999px; background: oklch(1 0 0 / 0.04); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.72 0.17 145); box-shadow: 0 0 0 0 oklch(0.72 0.17 145 / 0.6); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(0.72 0.17 145 / 0.5); } 70% { box-shadow: 0 0 0 7px oklch(0.72 0.17 145 / 0); } 100% { box-shadow: 0 0 0 0 oklch(0.72 0.17 145 / 0); } }

/* --- Hero -------------------------------------------------------------- */
.hero { position: relative; background: var(--hero-bg); color: var(--hero-ink); overflow: hidden; isolation: isolate; min-height: min(92vh, 820px); display: flex; align-items: center; }
.hero-photo { position: absolute; inset: 0; z-index: -3; background-size: cover; background-position: center; opacity: 0; }
.hero-photo.has-photo { opacity: 0.5; filter: url(#duotone); }
.hero-glow { position: absolute; z-index: -2; width: 70vw; height: 70vw; max-width: 820px; max-height: 820px; right: -10%; top: -18%; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklch, var(--brand) 50%, transparent), transparent 62%); filter: blur(18px); }
.hero-particles { position: absolute; inset: 0; z-index: -2; opacity: 0.75; }
.hero-grid { position: absolute; inset: 0; z-index: -2; background-image: radial-gradient(oklch(1 0 0 / 0.06) 1px, transparent 1.4px); background-size: 30px 30px; mask-image: linear-gradient(to bottom, black, transparent 82%); }
.hero-inner { padding: clamp(6rem, 14vw, 9rem) 0 clamp(4rem, 8vw, 6rem); position: relative; max-width: 56rem; }
.hero-eyebrow { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-bright); margin: 0 0 1.4rem; }
.hero-title { font-size: clamp(2.4rem, 6.2vw, 4.6rem); font-weight: 700; line-height: 1.03; color: var(--hero-ink); letter-spacing: -0.03em; max-width: 20ch; }
.hero-sub { margin: 1.5rem 0 2.3rem; font-size: clamp(1.05rem, 2.1vw, 1.25rem); color: var(--hero-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* --- Banda de números -------------------------------------------------- */
.stat-band { background: var(--bg-2); border-block: 1px solid var(--border); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding: clamp(2rem, 4vw, 2.8rem) 0; }
.stat { display: flex; flex-direction: column; gap: 0.35rem; }
.stat-value { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 30px color-mix(in oklch, var(--brand) 35%, transparent); }
.stat-label { font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* --- About + PI -------------------------------------------------------- */
.about-inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-body { font-family: var(--display); font-weight: 500; font-size: clamp(1.25rem, 2.6vw, 1.65rem); line-height: 1.5; color: var(--ink); max-width: 34ch; letter-spacing: -0.01em; }
.pi-card { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 1rem; }
.pi-photo, .avatar-fallback { width: 74px; height: 74px; border-radius: 16px; object-fit: cover; }
.avatar-fallback { display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, var(--brand), var(--brand-deep)); color: oklch(0.99 0.01 250); font-family: var(--display); font-weight: 700; font-size: 1.5rem; }
.pi-name { font-size: 1.3rem; font-weight: 700; }
.pi-role { color: var(--brand-strong); font-size: 0.82rem; margin: 0.3rem 0 0; letter-spacing: 0.02em; }
.pi-bio { color: var(--ink-soft); font-size: 0.98rem; margin: 0.3rem 0 0; }
.pi-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1rem; margin-top: 0.2rem; }
.pi-cv { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.76rem; letter-spacing: 0.03em; color: var(--brand-strong); border: 1px solid var(--border-2); border-radius: 999px; padding: 0.4rem 0.9rem; transition: border-color 0.2s var(--ease), color 0.2s var(--ease); }
.pi-cv::before { content: "↓"; font-weight: 700; }
.pi-cv:hover { border-color: var(--brand); color: var(--brand-bright); text-decoration: none; }
.profile-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.profile-links a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border-2); border-radius: 9px; color: var(--ink-soft); transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease); }
.profile-links a:hover { color: var(--brand-strong); border-color: var(--brand); transform: translateY(-2px); }
.profile-links svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --- Research bento ---------------------------------------------------- */
.research { background: var(--bg-2); }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(0.9rem, 1.8vw, 1.3rem); }
.bento-cell { grid-column: span 3; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.4rem, 2.5vw, 2rem); display: flex; flex-direction: column; gap: 0.6rem; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); position: relative; overflow: hidden; }
.bento-cell::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0%, color-mix(in oklch, var(--brand) 14%, transparent), transparent 55%); opacity: 0; transition: opacity 0.3s var(--ease); }
.bento-cell:hover { transform: translateY(-4px); border-color: color-mix(in oklch, var(--brand) 40%, var(--border)); box-shadow: var(--shadow-md); }
.bento-cell:hover::before { opacity: 1; }
.bento-cell { isolation: isolate; }
.bento-img { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; opacity: 0.13; transition: opacity 0.4s var(--ease); }
.bento-cell:hover .bento-img { opacity: 0.2; }
.bento-cell > :not(.bento-img) { position: relative; z-index: 1; }
.bento-cell:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.bento-cell:nth-child(4) { grid-column: span 6; }
.bento-num { font-size: 0.82rem; color: var(--brand-bright); letter-spacing: 0.1em; }
.bento-title { font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 600; }
.bento-lg .bento-title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.bento-summary { color: var(--ink-soft); font-size: 1rem; margin: 0; max-width: 52ch; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: auto; padding-top: 0.9rem; }
.tag { font-family: var(--mono); font-size: 0.72rem; color: var(--brand-strong); background: color-mix(in oklch, var(--brand) 12%, transparent); border: 1px solid color-mix(in oklch, var(--brand) 26%, transparent); padding: 0.24rem 0.6rem; border-radius: 999px; }

/* --- Featured publication ---------------------------------------------- */
.featured { padding-top: 0; }
.feature-card { background: linear-gradient(160deg, color-mix(in oklch, var(--brand) 10%, var(--surface)), var(--surface)); border: 1px solid color-mix(in oklch, var(--brand) 30%, var(--border)); border-radius: var(--radius); padding: clamp(1.6rem, 3.5vw, 2.6rem); box-shadow: var(--shadow-sm); }
.feature-badge { display: inline-block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: oklch(0.99 0.01 250); background: var(--brand); padding: 0.3rem 0.7rem; border-radius: 6px; margin-bottom: 1.1rem; }
.feature-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; max-width: 28ch; }
.feature-authors { color: var(--muted); font-size: 0.95rem; margin: 0.8rem 0 0; }
.feature-authors strong { color: var(--ink); font-weight: 600; }
.feature-why { color: var(--ink-soft); margin: 1.1rem 0 0; max-width: 66ch; }
.why-label { color: var(--brand-strong); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 0.4rem; }
.feature-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.feature-venue { color: var(--muted); font-size: 0.82rem; }

/* --- Publications ------------------------------------------------------ */
.pub-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.pub-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { font-family: var(--mono); font-size: 0.76rem; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--border-2); padding: 0.4rem 0.85rem; border-radius: 999px; cursor: pointer; transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease); }
.chip:hover { border-color: var(--brand); color: var(--brand-strong); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: oklch(0.99 0.01 250); }
.pub-count { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.pub-year-group { display: grid; grid-template-columns: 5.5rem 1fr; gap: clamp(0.8rem, 3vw, 2rem); padding: 1.8rem 0; border-top: 1px solid var(--border); }
.pub-year-group:last-child { border-bottom: 1px solid var(--border); }
.pub-year { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--brand-bright); font-variant-numeric: tabular-nums; }
.pub-items { display: flex; flex-direction: column; gap: 1.9rem; }
.pub-item { display: flex; flex-direction: column; gap: 0.25rem; }
.pub-item.has-thumb { display: grid; grid-template-columns: 150px 1fr; gap: 1.3rem; align-items: start; }
.pub-main { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.pub-thumb { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #fff; aspect-ratio: 4 / 3; }
.pub-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; background: #fff; transition: transform 0.35s var(--ease); }
.pub-thumb:hover img { transform: scale(1.05); }
@media (max-width: 620px) { .pub-item.has-thumb { grid-template-columns: 92px 1fr; gap: 0.9rem; } }

/* --- Publicaciones: cuadrícula de tarjetas --- */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.15rem; margin-top: 0.4rem; }
.pub-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 15px; overflow: hidden; transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.pub-card:hover { border-color: color-mix(in oklch, var(--brand) 55%, var(--border)); transform: translateY(-3px); box-shadow: 0 10px 30px -14px color-mix(in oklch, var(--brand) 45%, transparent); }
.pub-card-media { position: relative; display: block; aspect-ratio: 3 / 2; background: #fff; overflow: hidden; }
.pub-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform 0.45s var(--ease); }
.pub-card:hover .pub-card-media img { transform: scale(1.05); }
.pub-card-media.no-img { background: var(--surface-2); }
.pub-card-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; background: radial-gradient(125% 125% at 24% 18%, color-mix(in oklch, var(--brand) 28%, var(--surface-2)) 0%, var(--surface-2) 68%); filter: hue-rotate(var(--ph-shift, 0deg)); }
.pub-card-ph-venue { font-size: 0.74rem; letter-spacing: 0.03em; line-height: 1.4; color: color-mix(in oklch, var(--brand-bright) 65%, var(--ink)); opacity: 0.82; }
.pub-card-year { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 2; background: rgba(6, 10, 20, 0.62); color: #fff; padding: 0.16rem 0.5rem; border-radius: 7px; font-size: 0.68rem; letter-spacing: 0.03em; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pub-card-star { position: absolute; top: 0.45rem; right: 0.5rem; z-index: 2; color: var(--brand-bright); background: rgba(6, 10, 20, 0.62); padding: 0.06rem 0.42rem; border-radius: 7px; font-size: 0.8rem; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pub-card-body { display: flex; flex-direction: column; gap: 0.42rem; padding: 0.85rem 0.95rem 1rem; flex: 1; }
.pub-card-venue { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.02em; }
.pub-card-title { font-size: 0.98rem; line-height: 1.28; font-weight: 600; margin: 0; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pub-card-title a { color: var(--ink); }
.pub-card-title a:hover { color: var(--brand-bright); text-decoration: none; }
.pub-card-authors { font-size: 0.78rem; color: var(--muted); line-height: 1.42; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pub-card-links { margin-top: auto; padding-top: 0.55rem; display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.pub-card-news { font-size: 0.6rem; color: var(--brand-bright); border: 1px solid color-mix(in oklch, var(--brand) 40%, transparent); padding: 0.1rem 0.45rem; border-radius: 999px; letter-spacing: 0.03em; }
.pub-more-btn { display: block; margin: 2rem auto 0; padding: 0.72rem 1.6rem; background: transparent; border: 1px solid var(--border-2); border-radius: 999px; color: var(--ink); font-size: 0.8rem; letter-spacing: 0.03em; cursor: pointer; transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease); }
.pub-more-btn:hover { border-color: var(--brand); color: var(--brand-bright); background: color-mix(in oklch, var(--brand) 8%, transparent); }
@media (max-width: 560px) { .pub-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 0.8rem; } .pub-card-title { font-size: 0.88rem; -webkit-line-clamp: 4; } .pub-card-body { padding: 0.7rem 0.75rem 0.85rem; } }

/* --- Trabajos insignia: cuadrícula con citas destacadas --- */
.section-sub { color: var(--muted); font-size: 0.95rem; line-height: 1.5; margin-top: 0.55rem; max-width: 48ch; }
.insignia-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 1.7rem; }
.insignia-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.insignia-card:hover { border-color: color-mix(in oklch, var(--brand) 60%, var(--border)); transform: translateY(-4px); box-shadow: 0 14px 40px -16px color-mix(in oklch, var(--brand) 55%, transparent); }
.insignia-media { position: relative; display: block; aspect-ratio: 16 / 9; background: #fff; overflow: hidden; }
.insignia-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform 0.45s var(--ease); }
.insignia-card:hover .insignia-media img { transform: scale(1.06); }
.insignia-media.no-img { background: var(--surface-2); }
.insignia-cites { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 1.4rem 0.75rem 0.5rem; line-height: 1; background: linear-gradient(to top, rgba(4, 8, 16, 0.86) 15%, rgba(4, 8, 16, 0)); }
.insignia-cites b { font-family: var(--display); font-size: 1.95rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.insignia-cites span { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-bright); }
.insignia-body { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.9rem 1rem 1.05rem; flex: 1; }
.insignia-title { font-size: 1.02rem; line-height: 1.26; font-weight: 600; margin: 0; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.insignia-title a { color: var(--ink); }
.insignia-title a:hover { color: var(--brand-bright); text-decoration: none; }
.insignia-authors { font-size: 0.76rem; color: var(--muted); line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.insignia-meta { margin-top: auto; padding-top: 0.55rem; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.insignia-venue { font-size: 0.66rem; color: var(--muted); }
@media (max-width: 560px) { .insignia-grid { grid-template-columns: 1fr; } }

/* --- Columna semanal (banner en Divulgación) --- */
.column-card { position: relative; overflow: hidden; border: 1px solid color-mix(in oklch, var(--brand) 32%, var(--border)); border-radius: 18px; background: linear-gradient(135deg, color-mix(in oklch, var(--brand) 13%, var(--surface)), var(--surface) 62%); padding: 1.5rem 1.6rem 1.6rem; margin-bottom: 2.2rem; }
.column-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--brand-bright), var(--brand-deep)); }
.column-head { display: flex; gap: 1.3rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.column-head-txt { flex: 1; min-width: 15rem; }
.column-kicker { font-size: 0.67rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-bright); }
.column-name { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0.35rem 0 0.55rem; letter-spacing: -0.02em; }
.column-desc { color: var(--muted); font-size: 0.92rem; line-height: 1.55; max-width: 62ch; margin: 0; }
.column-cta { flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.62rem 1.15rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: 0.78rem; letter-spacing: 0.02em; white-space: nowrap; transition: background 0.2s var(--ease), transform 0.2s var(--ease); }
.column-cta:hover { background: var(--brand-bright); transform: translateY(-1px); text-decoration: none; }
.column-recent-label { display: block; margin: 1.4rem 0 0.5rem; font-size: 0.63rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.column-entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 0 1.5rem; list-style: none; padding: 0; margin: 0; }
.column-entry-link { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.55rem 0; border-top: 1px solid var(--border); color: var(--ink); }
.column-entry-link:hover { text-decoration: none; }
.column-entry-link:hover .column-entry-title { color: var(--brand-bright); }
.column-entry-date { flex-shrink: 0; font-size: 0.65rem; color: var(--muted); min-width: 5.4rem; }
.column-entry-title { font-size: 0.86rem; line-height: 1.35; transition: color 0.18s var(--ease); }
@media (max-width: 620px) { .column-cta { width: 100%; justify-content: center; margin-top: 0.4rem; } .column-entries { grid-template-columns: 1fr; } }

.pub-featured { align-self: flex-start; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-strong); background: color-mix(in oklch, var(--brand) 14%, transparent); border: 1px solid color-mix(in oklch, var(--brand) 30%, transparent); padding: 0.2rem 0.55rem; border-radius: 999px; margin-bottom: 0.35rem; }
.pub-authors { font-size: 0.88rem; color: var(--muted); margin: 0; }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.pub-title { font-family: var(--display); font-weight: 600; font-size: 1.12rem; color: var(--ink); line-height: 1.35; }
.pub-venue { font-size: 0.9rem; color: var(--ink-soft); font-style: italic; margin: 0; }
.pub-desc { font-size: 0.96rem; color: var(--ink-soft); margin: 0.5rem 0 0; max-width: 70ch; }
.pub-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 0.7rem; }
.pub-link { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; letter-spacing: 0.04em; color: var(--brand-strong); }
.pub-link svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pub-link:hover { color: var(--brand-bright); text-decoration: none; }
.pub-abstract { font-size: 0.9rem; }
.pub-abstract summary { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.pub-abstract summary::-webkit-details-marker { display: none; }
.pub-abstract summary::before { content: "+"; color: var(--brand-strong); font-weight: 700; }
.pub-abstract[open] summary::before { content: "–"; }
.pub-abstract p { color: var(--ink-soft); margin: 0.7rem 0 0; max-width: 72ch; line-height: 1.6; }

/* --- News -------------------------------------------------------------- */
.news-list { display: flex; flex-direction: column; max-width: 800px; }
.news-item { display: grid; grid-template-columns: 8.5rem 1fr; gap: clamp(0.8rem, 2vw, 1.6rem); padding: 1.5rem 0; border-top: 1px solid var(--border); }
.news-item:last-child { border-bottom: 1px solid var(--border); }
.news-date { font-size: 0.82rem; color: var(--muted); padding-top: 0.2rem; }
.news-title { font-size: 1.2rem; font-weight: 600; }
.news-text { margin: 0.4rem 0 0; color: var(--ink-soft); }
.news-source { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.6rem; font-size: 0.74rem; letter-spacing: 0.04em; color: var(--brand-strong); }
.news-source svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.news-source:hover { color: var(--brand-bright); text-decoration: none; }
.news-links { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 0.6rem; }
.news-links .news-source { margin-top: 0; }
.news-extra { display: none; }
body.news-all .news-extra { display: grid; }
.news-more-btn { margin-top: 1.7rem; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em; color: var(--brand-strong); background: var(--surface); border: 1px solid var(--border-2); border-radius: 999px; padding: 0.55rem 1.25rem; cursor: pointer; transition: border-color 0.2s var(--ease), color 0.2s var(--ease); }
.news-more-btn:hover { border-color: var(--brand); color: var(--brand-bright); }
/* Miniatura en noticias */
.news-body.has-thumb { display: grid; grid-template-columns: 160px 1fr; gap: 1.3rem; align-items: start; }
.news-thumb { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 10; background: var(--surface); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s var(--ease); }
.news-thumb:hover img { transform: scale(1.05); }
/* Fondos alternos de las secciones de credenciales */
.awards, .stays { background: var(--bg-2); }

/* Cruce publicación ↔ noticias */
.pub-press { margin-top: 0.75rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.6rem; }
.pub-press-label { font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.pub-press-list { display: inline-flex; flex-wrap: wrap; gap: 0.2rem 0.55rem; }
.pub-press-list li { font-size: 0.82rem; color: var(--ink-soft); }
.pub-press-list li:not(:last-child)::after { content: "·"; margin-left: 0.55rem; color: var(--muted); }
.pub-press-list a { color: var(--brand-strong); }

/* Patentes */
.patents { background: var(--bg-2); }
.patent-num { font-style: normal; letter-spacing: 0.01em; }

/* --- Team -------------------------------------------------------------- */
.team { background: var(--bg-2); }
.team-group { margin-bottom: clamp(2.4rem, 5vw, 3.4rem); }
.team-group:last-child { margin-bottom: 0; }
.team-group-title { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 1.3rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--border); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.member { display: flex; gap: 1rem; align-items: center; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.member:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.member-photo, .member .avatar-fallback { width: 56px; height: 56px; border-radius: 12px; flex: none; font-size: 1.15rem; }
.member-info { min-width: 0; }
.member-name { font-size: 1.02rem; font-weight: 600; }
.member-role { font-size: 0.76rem; color: var(--brand-strong); margin: 0.15rem 0 0; letter-spacing: 0.02em; }
.member-focus { font-size: 0.85rem; color: var(--muted); margin: 0.2rem 0 0; }
.member-links { margin-top: 0.6rem; }
.member-links a { width: 30px; height: 30px; }

/* --- Join -------------------------------------------------------------- */
.join-inner { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.join-status { color: var(--brand-strong); margin: 0 0 1rem; }
.join-intro { font-size: 1.15rem; color: var(--ink); max-width: 30ch; font-family: var(--display); font-weight: 500; }
.join-pathways { display: grid; gap: 1rem; }
.pathway { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.4rem 1.6rem; transition: border-color 0.25s var(--ease); }
.pathway:hover { border-color: color-mix(in oklch, var(--brand) 35%, var(--border)); }
.pathway-title { font-size: 1.1rem; font-weight: 600; }
.pathway-text { color: var(--ink-soft); font-size: 0.98rem; margin: 0.4rem 0 0; }

/* --- Affiliations ------------------------------------------------------ */
.affiliations { padding: clamp(2.5rem, 5vw, 3.5rem) 0; background: var(--bg-2); border-top: 1px solid var(--border); }
.affil-row { display: flex; flex-wrap: wrap; gap: 0.7rem 1.5rem; align-items: center; margin-top: 1rem; }
.affil { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); padding: 0.4rem 0.9rem; border: 1px solid var(--border); border-radius: 8px; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.affil:hover { color: var(--ink); border-color: var(--border-2); }
.affil a { color: inherit; }
.affil a:hover { text-decoration: none; }

/* --- Contact ----------------------------------------------------------- */
.contact-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-details { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1.4rem; align-items: baseline; margin-top: 0.5rem; }
.contact-details dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.contact-details dd { color: var(--ink); }
.contact-map { grid-column: 2; }
.join-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.2rem); box-shadow: var(--shadow-sm); position: sticky; top: 90px; display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start; }
.join-box-lead { font-family: var(--display); font-weight: 500; font-size: 1.12rem; color: var(--ink); margin: 0; line-height: 1.45; }

/* --- Footer ------------------------------------------------------------ */
.site-footer { background: var(--hero-bg); color: var(--hero-muted); padding: 3rem 0; }
.site-footer .wordmark-main { color: var(--brand-bright); }
.site-footer .wordmark-sub { color: var(--hero-ink); }
.site-footer .wordmark-tagline { color: var(--hero-muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-meta { font-size: 0.9rem; line-height: 1.7; margin: 0; text-align: center; }
.footer-updated { display: block; font-size: 0.72rem; color: var(--hero-muted); opacity: 0.75; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid oklch(1 0 0 / 0.16); border-radius: 10px; color: var(--hero-muted); transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.footer-social a:hover { color: var(--hero-ink); border-color: var(--hero-ink); }
.footer-social svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --- Reveal (visible por defecto; solo se oculta si hay JS) ------------- */
.reveal { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .dot { animation: none; }
  .hero-particles { display: none; }
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 960px) {
  .about-inner, .contact-inner, .join-inner { grid-template-columns: 1fr; }
  .join-box { position: static; }
}
@media (max-width: 820px) {
  .bento { grid-template-columns: 1fr; }
  .bento-cell, .bento-cell:nth-child(1), .bento-cell:nth-child(4) { grid-column: auto; grid-row: auto; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .nav-links { position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); padding: 0.5rem 1.25rem 1rem; display: none; max-height: 80vh; overflow-y: auto; }
  body.nav-open .nav-links { display: flex; }
  .nav-links > li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 0.85rem 0; }
  .nav-links a::after { display: none; }
  .nav-group-btn { display: flex; width: 100%; text-align: left; padding: 0.85rem 0 0.35rem; color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; }
  .nav-group-btn::after { display: none; }
  .nav-dropdown { position: static; opacity: 1; visibility: visible; transform: none; background: none; border: none; box-shadow: none; padding: 0 0 0.3rem; min-width: 0; }
  .nav-dropdown a { padding: 0.55rem 0 0.55rem 1rem; font-size: 0.95rem; color: var(--ink-soft); }
  .nav-dropdown a:hover { background: none; color: var(--brand-strong); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
@media (max-width: 620px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .pub-year-group { grid-template-columns: 1fr; gap: 0.4rem; }
  .news-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .news-body.has-thumb { grid-template-columns: 1fr; gap: 0.8rem; }
}
