/* Tipografías alojadas en el propio sitio (sin peticiones a terceros) */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(fonts/newsreader-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(fonts/newsreader-latin.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: 400 600; font-display: swap;
  src: url(fonts/inter-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/inter-latin.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; }

:root {
  --bg: #f7f4ef;
  --bg-tint: #efeae2;
  --ink: #14212c;
  --ink-soft: #4d5a65;
  --line: #dcd5ca;
  --navy: #0e1f2e;
  --navy-2: #142a3d;
  --accent: #8f2a3a;
  --accent-soft: #e3a1aa;
  --on-dark: #e9e4db;
  --on-dark-soft: #9fb0be;
  --line-dark: rgba(255, 255, 255, .12);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sec--dark :focus-visible, .pro-intro :focus-visible, .official :focus-visible { outline-color: var(--accent-soft); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 6px; font: 500 .9rem var(--sans); text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; outline-color: var(--accent-soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: 1.12; }
h1 { font-size: clamp(2.9rem, 6.4vw, 5.2rem); font-weight: 300; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }
.eyebrow {
  font: 500 .74rem/1 var(--sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); max-width: 34em; }
.muted { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-scrolled {
  background: rgba(247, 244, 239, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand__mark { width: 34px; height: 34px; border-radius: 9px; background: var(--navy); display: grid; place-items: center; }
.brand__mark svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-soft); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand__name { font: 400 1.12rem var(--serif); letter-spacing: -.01em; }
.menu { display: flex; align-items: center; gap: 2rem; }
.menu a { text-decoration: none; font-size: .9rem; color: var(--ink-soft); transition: color .2s; position: relative; padding: .6rem 0; }
.menu a:not(.menu__cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .3rem; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.menu a.is-active::after { transform: scaleX(1); }
.menu a.is-active { color: var(--ink); }
.menu__cta { color: var(--bg) !important; background: var(--navy); padding: .65rem 1.2rem !important; border-radius: 99px; transition: background .2s !important; }
.menu__cta.is-active { background: var(--accent); }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 26px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.7rem; border-radius: 99px;
  font: 500 .95rem var(--sans); text-decoration: none;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.btn--primary { background: var(--navy); color: var(--bg); }
.btn--ghost { border: 1px solid var(--ink); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 112px 0 0; overflow: hidden; overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 88% 12%, rgba(143, 42, 58, .09), transparent 70%),
    radial-gradient(50% 40% at 0% 100%, rgba(14, 31, 46, .06), transparent 70%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.hero h1 { font-size: clamp(1.6rem, 3.1vw, 2.8rem); margin-bottom: 1rem; }
.hero__actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 2.4rem; }
.hero__affil { margin-top: 2.6rem; font-size: .88rem; color: var(--ink-soft); padding-top: 1.2rem; border-top: 1px solid var(--line); max-width: 30em; }

/* Retrato: solo se muestra si existe img/javier-ramos.jpg */
.portrait { position: relative; margin: 0 0 2.2rem; }
.portrait[hidden] { display: none; }
.portrait__frame { aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--bg-tint); box-shadow: 0 1px 2px rgba(14, 31, 46, .08), 0 40px 70px -40px rgba(14, 31, 46, .5); }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%;
  transform: scale(1.2); transform-origin: 14% 22%; }   /* zoom y centrado del retrato actual (sujeto algo a la izquierda) */
.portrait figcaption {
  position: relative; width: 100%; box-sizing: border-box; margin-top: .8rem;
  display: grid; gap: .2rem; padding: 1rem 1.4rem 1.05rem;
  background: var(--bg); border-left: 2px solid var(--accent); border-radius: 0 3px 3px 0;
  box-shadow: 0 1px 2px rgba(14, 31, 46, .06), 0 22px 40px -22px rgba(14, 31, 46, .4);
  font-size: .8rem; line-height: 1.45; color: var(--ink-soft);
}
.portrait figcaption strong { font: 400 1.1rem/1.25 var(--serif); color: var(--ink); letter-spacing: -.005em; }

.ecg { margin-top: clamp(3rem, 7vw, 5.5rem); height: 90px; color: var(--accent); }
.ecg svg { width: 100%; height: 100%; }
.ecg__line { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: draw 3.2s var(--ease) .4s both; opacity: .75; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Cifras ---------- */
.figures__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.fig { display: grid; gap: .5rem; padding-left: 1.4rem; border-left: 1px solid var(--line-dark); }
.fig__n { font: 300 clamp(2.4rem, 4.4vw, 3.4rem)/1 var(--serif); letter-spacing: -.02em; }
.fig__l { font-size: .88rem; color: var(--on-dark-soft); line-height: 1.45; max-width: 15em; }

/* ---------- Secciones ---------- */
.sec { padding: clamp(5rem, 10vw, 8.5rem) 0; }
.sec--tint { background: var(--bg-tint); }
.sec--dark { background: var(--navy); color: var(--on-dark); }
.sec--dark .eyebrow { color: var(--accent-soft); }
.sec__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 22em; }
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.split__head { position: sticky; top: 120px; }

/* ---------- Tarjetas ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  padding: 2.2rem 2rem 2.4rem; border: 1px solid var(--line-dark); border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
}
.card__n { display: block; font: 300 1rem var(--serif); color: var(--accent-soft); margin-bottom: 3rem; letter-spacing: .1em; }
.card h3 { margin-bottom: 1rem; color: #fff; }
.card p { color: var(--on-dark-soft); font-size: .96rem; }

.conditions { margin-top: clamp(3.5rem, 7vw, 5.5rem); padding-top: 2.5rem; border-top: 1px solid var(--line-dark); display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; }

/* ---------- Timeline ---------- */
.timeline { border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; padding: 1.7rem 0; border-bottom: 1px solid var(--line); }
.timeline time, .edu time, .rows span, .awards span {
  font: 500 .78rem/1.8 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.timeline h3 { margin-bottom: .3rem; }
#trayectoria, #profile { padding-top: 2rem; padding-bottom: 3rem; }
#trayectoria .sec__head, #profile .sec__head { margin-bottom: 1.5rem; }
#trayectoria .timeline li, #profile .timeline li { padding-top: 1rem; padding-bottom: 1rem; }
#formacion, #training { padding-top: 2rem; }
#formacion .sec__head, #training .sec__head { margin-bottom: 1.5rem; }
#formacion, #training { padding-bottom: 2rem; }
#docencia, #teaching { padding-top: 2rem; }
#docencia, #teaching { padding-bottom: 2rem; }
#investigacion, #research { padding-top: 2rem; }
#investigacion .sec__head, #research .sec__head { max-width: none; }
#investigacion .sec__head h2, #research .sec__head h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
@media (min-width: 1100px) {
  #investigacion .sec__head h2, #research .sec__head h2 { white-space: normal; text-wrap: balance; }
}
.timeline p { color: var(--ink-soft); font-size: .96rem; }

/* ---------- Docencia ---------- */
.rows li { display: grid; grid-template-columns: 170px 1fr; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.rows li:first-child { border-top: 1px solid var(--line); }
.rows p { color: var(--ink); }
.proctor { margin-top: 2.6rem; padding: 2rem; background: var(--bg-tint); border-radius: 14px; border: 1px solid var(--line); }
.proctor h3 { margin-bottom: .6rem; }
.proctor p { color: var(--ink-soft); font-size: .96rem; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 1.4rem; }
.chips span { padding-top: .75rem; border-top: 2px solid var(--accent); font: 400 1.02rem/1.35 var(--serif); color: var(--ink); }

/* ---------- Formación ---------- */
.phd { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; padding: 2.2rem; background: var(--navy); color: var(--on-dark); border-radius: 18px; margin-bottom: 2.5rem; }
.phd__badge { width: 118px; height: 118px; border-radius: 50%; border: 1px solid var(--accent-soft); display: grid; place-content: center; text-align: center; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-soft); line-height: 1.5; }
.phd__badge strong { font: 400 1.1rem var(--serif); letter-spacing: 0; text-transform: none; color: var(--accent-soft); font-style: italic; }
.phd h3 { color: #fff; margin-bottom: .4rem; font-size: 1.45rem; }
.phd .muted { color: var(--on-dark-soft); margin-bottom: .7rem; }
.phd p:last-child { color: var(--on-dark-soft); font-size: .96rem; max-width: 46em; }
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3.5rem; }
.edu li { padding: 1.5rem 0; border-top: 1px solid var(--line); display: grid; gap: .15rem; }
.edu h3 { font-size: 1.1rem; margin: .35rem 0 .2rem; }
.edu p { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Investigación ---------- */
.sub { font: 500 .78rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-soft); margin: 4.2rem 0 1.2rem; }
.sub span { color: var(--on-dark-soft); letter-spacing: .08em; }
.sub:first-of-type { margin-top: 0; }
.pubs li { display: grid; grid-template-columns: 70px 1fr auto; gap: 1.5rem; align-items: baseline; padding: 1.25rem 0; border-top: 1px solid var(--line-dark); }
.pubs li:last-child { border-bottom: 1px solid var(--line-dark); }
.pubs .y { font: 300 1.2rem var(--serif); color: var(--accent-soft); }
.pub__badges { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.pubs .t { color: #fff; line-height: 1.45; text-decoration: none; display: block; transition: color .2s; }
.pubs a.t::after { content: " \2197"; color: var(--accent-soft); font-size: .85em; }
.intro__total { opacity: .8; }
.intro { margin: -.4rem 0 1.4rem; color: var(--on-dark-soft); font-size: .95rem; max-width: 46em; }
.pubs .j { display: block; font-size: .85rem; color: var(--on-dark-soft); margin-top: .25rem; }
.pubs .star { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); background: var(--accent-soft); padding: .22rem .6rem; border-radius: 99px; white-space: nowrap; }

.grants li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 1.5rem; align-items: baseline; padding: 1.3rem 0; border-top: 1px solid var(--line-dark); }
.grants .grant__year { font: 300 1.2rem var(--serif); color: var(--accent-soft); }
.grant__content { display: grid; gap: .3rem; }
.grants li:last-child { border-bottom: 1px solid var(--line-dark); }
.grants strong { font: 400 1.1rem var(--serif); color: #fff; }
.grants span { grid-column: 1; font-size: .88rem; color: var(--on-dark-soft); }
.studies { columns: 2; column-gap: 3rem; }
.studies li { break-inside: avoid; padding: .95rem 0; border-top: 1px solid var(--line-dark); font-size: .95rem; color: var(--on-dark-soft); }
.studies b { display: inline-block; width: 3.4rem; font: 500 .8rem var(--sans); color: var(--accent-soft); letter-spacing: .08em; }
.awards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.awards li { padding: 1.8rem; border: 1px solid var(--line-dark); border-radius: 14px; }
.awards span { color: var(--accent-soft); }
.awards p { font: 400 1.2rem/1.3 var(--serif); color: #fff; margin: .8rem 0; }
.awards small { font-size: .88rem; color: var(--on-dark-soft); line-height: 1.5; display: block; }

/* ---------- Contacto ---------- */
.contact__list li { display: grid; gap: .15rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.contact__list li:first-child { border-top: 1px solid var(--line); }
.contact__list span { font: 500 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.contact__list a { text-decoration: none; font: 400 1.2rem var(--serif); transition: color .2s; }
.contact__note { margin-top: 1.2rem; font-size: .9rem; color: var(--ink-soft); }
.contact__note a { color: var(--accent); }



/* ---------- Responsive ---------- */
/* Menú: pasa a hamburguesa antes que el resto del diseño, porque no cabe por debajo de ~1120 px */
@media (max-width: 1120px) {
  .menu {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); padding: .5rem 24px 1.5rem; border-bottom: 1px solid var(--line);
    transform: translateY(-120%); visibility: hidden; transition: transform .4s var(--ease), visibility .4s;
  }
  .menu.is-open { transform: none; visibility: visible; }
  .menu a { padding: 1rem 0; width: 100%; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .menu a::after { display: none; }
  .menu__cta { margin-top: 1rem; text-align: center; border-bottom: 0 !important; }
  .burger { display: block; }
  .nav.menu-open { background: var(--bg); }
  .menu .lang-switch { margin-top: 1.2rem; }
  .menu .lang-switch a { width: auto; border-bottom: 0; padding: .55rem .9rem; font-size: .8rem; }
}
@media (max-width: 960px) {
  .hero { padding-top: 100px; }
  .hero__grid, .split, .conditions, .cita__grid { grid-template-columns: 1fr; }
  .strip__in { flex-direction: column; align-items: flex-start; }
  .portrait { max-width: 340px; margin-left: 1rem; }
  .portrait figcaption { padding-inline: 1rem; }
  .hero.has-photo .hero__grid { grid-template-columns: 1fr; }
  .split__head { position: static; }
  .figures__grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .fig { grid-template-columns: minmax(3.2rem, auto) 1fr; align-items: baseline; gap: 0 1.2rem; }
  .fig__l { max-width: none; }
  .cards, .awards { grid-template-columns: 1fr; }
  .edu { grid-template-columns: 1fr; }
  .studies { columns: 1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 40px); }
  .timeline li, .rows li { grid-template-columns: 1fr; gap: .3rem; }
  .chips { grid-template-columns: 1fr; gap: 1rem; }
  .phd { grid-template-columns: 1fr; padding: 1.6rem; }
  .pubs li { grid-template-columns: 1fr; gap: .3rem; }
  .pubs .star { justify-self: start; }
    .brand__name { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ecg__line { animation: none; stroke-dashoffset: 0; }
}

/* ---------- Idioma ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); }
.menu .lang-opt { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .65rem; font: 600 .74rem var(--sans); letter-spacing: .08em; color: var(--ink-soft); }
.menu .lang-opt + .lang-opt { border-left: 1px solid var(--line); }
.menu .lang-opt::after { display: none; }
.lang-opt svg { width: 18px; height: 12px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(14, 31, 46, .15); }
.menu .lang-opt.is-current { background: var(--navy); color: #fff; }

/* ---------- Portada + Sobre mí: relato a la izquierda, foto y ficha fijas a la derecha ---------- */
.hero.has-photo .hero__grid {
  grid-template-columns: 1.3fr .7fr; grid-template-areas: "intro aside" "story aside";
  align-items: start; column-gap: clamp(2.5rem, 7vw, 7rem); row-gap: 0;
}
.hero__intro { grid-area: intro; }
.hero__intro > .eyebrow { line-height: 1.8; }
.hero__aside { grid-area: aside; position: sticky; top: 104px; }
.story { grid-area: story; margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 2.2rem; border-top: 1px solid var(--line); max-width: 40em; }
.story h3 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
.story h3:first-child { margin-top: 0; }
.story p { color: var(--ink-soft); }
.hero__aside .facts { margin-top: 3.2rem; }
.facts { border-top: 1px solid var(--line); }
.facts div { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 .68rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { margin: .2rem 0 0; font-size: .9rem; line-height: 1.45; }
.about__close { margin-top: 2.4rem; padding-left: 1.2rem; border-left: 2px solid var(--accent); font: 400 1.15rem/1.55 var(--serif); color: var(--ink) !important; }
.about__close a { font: 500 .92rem var(--sans); color: var(--accent); white-space: nowrap; margin-left: .3rem; }

/* Sobre mí: presentación, tres pilares y compromiso. Todos los párrafos tienen el mismo peso;
   el diseño lo aportan la columna con el número de cada pilar y el bloque oscuro del compromiso */
.intro__text { width: 100%; max-width: none; }
.intro__text p, .story p { font-size: 1.06rem; line-height: 1.7; color: var(--ink); }
.intro__text p + p, .story p + p { margin-top: 1.1rem; }
.pillar { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1.8rem; padding: 2.8rem 0; border-top: 1px solid var(--line); }
.story > .pillar:first-child { padding-top: 0; border-top: 0; }
.pillar__mark { display: grid; gap: 1.1rem; justify-items: start; align-content: start; }
.pillar__n { font: 300 2.9rem/1 var(--serif); letter-spacing: -.02em; color: var(--accent); }
.story .pillar h3 { font-size: clamp(1.45rem, 2.5vw, 1.7rem); margin: .2rem 0 1.1rem; }
.commitment {
  position: relative; overflow: hidden; margin-top: 1.4rem;
  padding: clamp(2rem, 4.5vw, 3rem); border-radius: 6px;
  background: var(--navy); color: var(--on-dark);
}
.commitment::before {      /* trazo de ECG decorativo, muy tenue */
  content: ""; position: absolute; inset: auto -2rem 1.2rem -2rem; height: 60px; opacity: .13; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M0 34h120l8-5 7 5h22l7-26 10 50 11-36 7 12h208' fill='none' stroke='%23e3a1aa' stroke-width='1.5'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.commitment > * { position: relative; }
.story .commitment h3 { font-size: clamp(1.45rem, 2.5vw, 1.7rem); margin: 0 0 1.3rem; color: #fff; }

.story .commitment p { color: var(--on-dark); }
.commitment p:last-child { padding-bottom: 3.2rem; }
@media (max-width: 600px) {
  .pillar { grid-template-columns: 1fr; }
  .pillar__mark { grid-auto-flow: column; align-items: center; justify-content: start; gap: 1rem; margin-bottom: 1.2rem; }
  .pillar__n { font-size: 2.4rem; }
}

/* ---------- Enfermedades y tratamientos (etiquetas, no clicables) ---------- */
.conditions { display: block; margin-top: clamp(3.5rem, 7vw, 5rem); padding-top: 2.5rem; border-top: 1px solid var(--line-dark); }
.conditions h3 { color: #fff; margin-bottom: 1.4rem; }
.tags { display: flex; flex-wrap: wrap; gap: .55rem; }
.tags li { padding: .5rem .9rem; background: rgba(255, 255, 255, .07); border-radius: 4px; font-size: .92rem; color: var(--on-dark); }

/* ---------- Cita y contacto ---------- */
.cita__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.cita__grid > div:first-child { display: contents; }
.cita__grid > div:first-child > .eyebrow { grid-column: 1 / -1; margin-bottom: -1rem; }
.cita { padding-top: 2rem; }
.cita__grid > div:first-child > .contact__patients-title { grid-column: 1 / -1; justify-self: start; margin: 0; padding: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--navy); }
.cita__grid { row-gap: 1.2rem; }
.cita__grid .contact__research { margin-top: 2rem; }
.cita__grid > div:first-child > .official { margin-top: 0; }
.cita__grid .contact__list { margin-top: 0; }
.cita .lead { margin-top: 1.2rem; }
.official { margin-top: 2.2rem; padding: 1.8rem 2rem 2rem; background: var(--navy); color: var(--on-dark); border-radius: 6px; display: grid; gap: .35rem; justify-items: start; }
.official__label { font: 500 .7rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-soft); }
.official strong { font: 400 1.7rem/1.2 var(--serif); color: #fff; }
.official p { color: var(--on-dark-soft); font-size: .95rem; margin-bottom: 1rem; }
.official h2 { color: #fff; }
.official .lead { margin-top: .8rem; }
.official .lead a { color: var(--accent-soft); overflow-wrap: anywhere; }
.btn--light { background: var(--bg); color: var(--navy); }

/* ---------- Introducción profesional ---------- */
.pro-intro { background: var(--navy); color: var(--on-dark); padding: clamp(4.5rem, 9vw, 7rem) 0 clamp(3.5rem, 7vw, 5rem); }
.pro-intro .eyebrow { color: var(--accent-soft); }
.pro-intro h2 { color: #fff; font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.pro-intro__lead { margin-top: 1rem; color: var(--on-dark-soft); font-size: 1.1rem; }

/* ---------- Contacto final ---------- */
.strip { background: var(--bg-tint); padding: 3rem 0; border-top: 1px solid var(--line); }
.strip__in { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.strip .eyebrow { margin-bottom: .8rem; }
.strip__t { font: 400 1.25rem/1.4 var(--serif); max-width: 32em; }
.strip__t a { color: var(--accent); }
.contact__collaboration { margin-top: 1.2rem; max-width: 34em; font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); }
.contact__collaboration a { color: var(--accent); overflow-wrap: anywhere; }
.contact__research { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 2.5rem; }
.contact__research h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.contact__research .contact__collaboration { max-width: 48em; }
.strip__list { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; font-size: .92rem; }
.strip__list a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: .1rem; }

/* ---------- Responsive de las secciones nuevas ---------- */
@media (max-width: 960px) {
  .cita__grid { grid-template-columns: 1fr; }
  .hero.has-photo .hero__grid { grid-template-columns: 1fr; grid-template-areas: "intro" "aside" "story"; }
  .hero__aside { position: static; max-width: 420px; margin-top: 2.6rem; }
  .hero__aside .facts { margin-top: 3rem; }
  .story { border-top: 0; padding-top: 0; margin-top: 2.6rem; }
  .official { padding: 1.5rem; }
  .official strong { font-size: 1.45rem; overflow-wrap: anywhere; }
}

/* ---------- Botón fijo de cita (móvil) ---------- */
.sticky-cta { display: none; }
@media (max-width: 960px) {
  body { padding-bottom: 72px; }
  .sticky-cta {
    display: block; position: fixed; inset: auto 0 0 0; z-index: 45;
    padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(247, 244, 239, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    transition: transform .3s var(--ease);
  }
  .sticky-cta .btn { width: 100%; justify-content: center; padding: .85rem 1rem; }
  body.cta-hidden .sticky-cta, body.at-bottom .sticky-cta, body.menu-open .sticky-cta, body.hero-cta-visible .sticky-cta { transform: translateY(110%); }
}

/* ---------- Efectos de cursor: solo en dispositivos con ratón (en táctil el hover se queda pegado tras pulsar) ---------- */
@media (hover: hover) and (pointer: fine) {
  .menu a:hover { color: var(--ink); }
  .menu a:hover::after { transform: scaleX(1); }
  .menu__cta:hover { background: var(--accent); }
  .btn:hover { transform: translateY(-2px); }
  .btn--primary:hover { background: var(--accent); }
  .btn--ghost:hover { background: var(--ink); color: var(--bg); }
  .pubs a.t:hover { color: var(--accent-soft); }
  .contact__list a:hover, .strip a:hover { color: var(--accent); }
  .btn--light:hover { background: #fff; }
  .menu .lang-opt:not(.is-current):hover { color: var(--ink); background: var(--bg-tint); }
}

/* ---------- Tres pilares (introducción profesional) ---------- */
.pro-intro__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.pillars { margin: 0; justify-self: center; width: 100%; max-width: 500px; }
.pillars__svg { width: 100%; height: auto; overflow: visible; }
@media (max-width: 960px) {
  .pro-intro__grid { grid-template-columns: 1fr; }
  .pillars { max-width: 400px; justify-self: start; }
}

/* Professional overview within the introduction. */
.hero.has-photo .hero__grid { grid-template-areas: "intro aside" "story aside"; }
.pro-intro--about { width: 100%; box-sizing: border-box; margin-top: 2.4rem; padding: clamp(1.2rem, 2.5vw, 2rem); border-radius: 8px; }
.pro-intro--about > .wrap { width: 100%; padding: 0; }
.pro-intro--about .pro-intro__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1rem; }
.pro-intro--about h2 { font-size: clamp(1.5rem, 2.3vw, 2rem); overflow-wrap: break-word; }
.pro-intro--about .pro-intro__lead { font-size: 1.05rem; line-height: 1.6; }
.pro-intro--about .eyebrow { font-size: .7rem; }
.pro-intro--about .pillars { width: 100%; max-width: 420px; margin: 0 auto; }
.pro-intro--about .figures__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 1.8rem; align-items: stretch; }
.pro-intro--about .fig { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: .7rem; padding: 0 .6rem; text-align: center; }
.pro-intro--about .fig:first-child { border-left: 0; }
.pro-intro--about .fig__n { font-size: 2.8rem; }
.pro-intro--about .fig__l { font-size: .82rem; line-height: 1.5; max-width: none; text-wrap: balance; }
.pro-intro--about .fig--patients { grid-column: auto; }
.pro-intro--about .fig__n { font-size: clamp(1.5rem, 3vw, 2.5rem); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 960px) {
  .hero.has-photo .hero__grid { grid-template-areas: "intro" "aside" "story"; }
}
@media (max-width: 480px) {
  .pro-intro--about { padding: 1.2rem; }
  .pro-intro--about .pro-intro__grid { grid-template-columns: 1fr; gap: .8rem; }
  .pro-intro--about .pillars { max-width: 320px; }
}

/* Navigation dropdowns */
.nav-dropdown { position: relative; }
.nav-dropdown summary { display: flex; align-items: center; gap: .4rem; padding: .6rem 0; cursor: pointer; list-style: none; font-size: .9rem; color: var(--ink-soft); }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown[open] summary { color: var(--navy); }
.nav-dropdown[open] summary > span { transform: rotate(180deg); }
.nav-dropdown__panel { position: absolute; top: calc(100% + .6rem); left: -.9rem; width: 300px; padding: .6rem; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(14,31,46,.14); }
.menu .nav-dropdown__panel a { display: block; padding: .7rem .8rem; font-size: .85rem; line-height: 1.4; border-radius: 5px; }
.menu .nav-dropdown__panel a::after { display: none; }
.menu .nav-dropdown__panel a:hover { background: var(--bg-tint); color: var(--navy); }
.pillar[id], .commitment[id] { scroll-margin-top: 100px; }
@media (max-width: 1120px) {
  .menu { max-height: calc(100dvh - 72px); overflow-y: auto; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown summary { padding: 1rem 0; font-size: 1rem; border-bottom: 1px solid var(--line); justify-content: space-between; }
  .nav-dropdown__panel { position: static; width: auto; margin: .4rem 0; padding: .25rem .6rem; box-shadow: none; border: 0; border-left: 2px solid var(--accent); border-radius: 0; }
  .menu .nav-dropdown__panel a { border-bottom: 0; }
}

@media (max-width: 600px) {
  .pro-intro--about .figures__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.5rem; }
  .pro-intro--about .fig:nth-child(odd) { border-left: 0; }
  .pro-intro--about .fig__l { overflow-wrap: anywhere; }
  .hero__intro, .story, .grant__content { min-width: 0; }
}
