/* ============================================================
   ESTILO ALTERNATIVO "VIBRANTE" · más visual y dinámico
   Mantiene el granate UMU como base, añade degradados, un acento
   dorado y más movimiento. Pensado para atraer a estudiantes.
   ============================================================ */

:root {
  --accent:        #7a1f3d;   /* granate UMU */
  --accent-dark:   #561026;
  --accent-light:  #a83456;
  --gold:          #e0a44b;   /* acento secundario cálido */
  --gold-soft:     #fbf1df;
  --accent-soft:   #f7ebef;
  --ink:           #201a1d;
  --ink-soft:      #5c545a;
  --line:          #ece7ea;
  --bg:            #ffffff;
  --bg-alt:        #faf6f7;
  --max:           1100px;
  --radius:        18px;
  --shadow:        0 2px 6px rgba(80,20,40,.06), 0 18px 40px rgba(80,20,40,.08);
  --shadow-hover:  0 8px 18px rgba(80,20,40,.12), 0 28px 60px rgba(80,20,40,.16);
  --serif:  "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:   "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg);
  line-height: 1.65; -webkit-font-smoothing: antialiased;
}
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); margin: .15em 0; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 .3em; }
h3 { font-size: 1.25rem; margin: 0 0 .4em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.nav__brand { display: flex; flex-direction: column; line-height: 1.15; }
.nav__brand:hover { text-decoration: none; }
.nav__name { font-family: var(--serif); font-weight: 700; font-size: 1.14rem; color: var(--ink); }
.nav__sub  { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.nav__links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink-soft); font-size: .92rem; font-weight: 500; position: relative; }
.nav__links a:hover { color: var(--accent); text-decoration: none; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--gold); transition: width .25s;
}
.nav__links a:hover::after { width: 100%; }
.lang-toggle {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 12px; cursor: pointer; font-family: var(--sans); font-size: .82rem;
  display: inline-flex; gap: 4px; align-items: center; color: var(--ink-soft);
}
.lang-toggle__opt { font-weight: 700; }
.lang-toggle__opt.is-active { color: var(--accent); }
.lang-toggle__sep { color: var(--line); }
.lang-toggle::after { display: none; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- HERO con degradado ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 50%, var(--accent-light) 100%);
  padding: 84px 0 78px;
}
.hero::before {  /* halo decorativo */
  content: ""; position: absolute; top: -120px; right: -80px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(224,164,75,.35), transparent 70%); border-radius: 50%;
}
.hero::after {
  content: ""; position: absolute; bottom: -160px; left: -100px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 70%); border-radius: 50%;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 240px 1fr; gap: 52px; align-items: center; }
.hero__photo {
  position: relative; width: 240px; height: 240px; border-radius: 50%;
  overflow: hidden; justify-self: center;
  background: rgba(255,255,255,.15);
  box-shadow: 0 0 0 6px rgba(255,255,255,.18), 0 0 0 12px rgba(224,164,75,.45), var(--shadow);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo-fallback { display: none; }
.hero__photo--empty { display: grid; place-items: center; }
.hero__photo--empty .hero__photo-fallback { display: block; font-family: var(--serif); font-size: 3.6rem; font-weight: 700; color: #fff; }

.eyebrow {
  display: inline-block; background: rgba(255,255,255,.15); color: #fff;
  border: 1px solid rgba(255,255,255,.35); padding: 6px 14px; border-radius: 999px;
  font-weight: 600; font-size: .82rem; letter-spacing: .03em; margin: 0 0 14px;
}
.hero h1 { color: #fff; }
.hero__role { font-size: 1.08rem; color: rgba(255,255,255,.9); margin: 0 0 18px; font-weight: 500; }
.hero__bio { max-width: 62ch; color: rgba(255,255,255,.92); margin: 0 0 22px; }

/* franja de logros (estilo métricas, rejilla 2x2 con acento dorado) */
.hero__highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 26px; margin: 10px 0 26px; max-width: 540px; }
.hl { padding-left: 14px; border-left: 2px solid rgba(224, 164, 75, .65); }
.hl__key { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; line-height: 1.1; color: var(--gold); }
.hl__label { display: block; font-size: .82rem; color: rgba(255, 255, 255, .85); margin-top: 2px; }
@media (max-width: 420px) { .hero__highlights { grid-template-columns: 1fr; max-width: 300px; } }

.hero__links { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 8px 18px;
  font-size: .88rem; color: #fff; background: rgba(255,255,255,.10); transition: .2s; font-weight: 500;
}
.pill:hover { background: #fff; color: var(--accent); border-color: #fff; text-decoration: none; transform: translateY(-2px); }

/* ---------- SECCIONES ---------- */
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 62ch; margin-bottom: 40px; }
.section__head h2 { position: relative; display: inline-block; }
.section__head h2::after {
  content: ""; display: block; width: 64px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold)); margin-top: 12px;
}
.section__intro { color: var(--ink-soft); font-size: 1.1rem; margin: 0; }

/* ---------- TARJETAS PROYECTOS ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: .25s; box-shadow: var(--shadow); overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--gold)); transform: scaleX(0);
  transform-origin: left; transition: transform .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card:hover::before { transform: scaleX(1); }
.card__tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.card__tag--done { color: var(--ink-soft); background: #eceae7; }
.card p { color: var(--ink-soft); margin: 0 0 12px; }
.card__meta { font-size: .85rem; color: var(--accent); font-weight: 500; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- EQUIPO ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.person {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px;
  text-align: center; box-shadow: var(--shadow); transition: .25s;
}
.person:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.person__avatar {
  position: relative; width: 104px; height: 104px; border-radius: 50%; margin: 0 auto 16px;
  overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.person__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person__avatar span { font-family: var(--serif); font-weight: 700; color: #fff; font-size: 1.6rem; }
.person__avatar--empty img { display: none; }
.person__role { color: var(--accent); font-weight: 700; font-size: .9rem; margin: 0 0 8px; }
.person__desc { color: var(--ink-soft); font-size: .93rem; margin: 0 0 16px; }
.person__links { display: flex; gap: 14px; justify-content: center; font-size: .88rem; font-weight: 500; }

/* ---------- PUBLICACIONES ---------- */
.pubs { list-style: none; counter-reset: pub; margin: 0 0 30px; padding: 0; }
.pub {
  counter-increment: pub; position: relative; display: flex; justify-content: space-between; gap: 20px;
  padding: 20px 0 20px 50px; border-bottom: 1px solid var(--line);
}
.pub::before {
  content: counter(pub); position: absolute; left: 0; top: 18px;
  font-family: var(--serif); font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .92rem;
}
.pub__cite { margin: 0; color: var(--ink); }
.pub__title { font-weight: 600; }
.pub__doi {
  flex-shrink: 0; align-self: start; font-size: .78rem; font-weight: 700; letter-spacing: .03em;
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; height: fit-content; color: var(--accent);
}
.pub__doi:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }

.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-light)); transition: .2s;
  box-shadow: 0 8px 20px rgba(122,31,61,.25);
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 12px 26px rgba(122,31,61,.35); }

/* ---------- CTA "ÚNETE AL EQUIPO" ---------- */
.cta {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent) 60%, var(--accent-light));
  padding: 72px 0;
}
.cta::before {
  content: ""; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 500px; height: 300px; background: radial-gradient(circle, rgba(224,164,75,.3), transparent 70%);
}
.cta__inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.cta h2 { color: #fff; }
.cta h2::after { display: none; }
.cta p { color: rgba(255,255,255,.92); font-size: 1.12rem; margin: 0 0 28px; }
.cta .btn { background: var(--gold); color: var(--accent-dark); box-shadow: 0 10px 24px rgba(224,164,75,.35); }
.cta .btn:hover { background: #fff; }
.cta__note { display: block; margin-top: 16px; font-size: .9rem; color: rgba(255,255,255,.8); }

/* ---------- CONTACTO ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact__list { list-style: none; margin: 24px 0 0; padding: 0; }
.contact__list li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.contact__list strong { color: var(--accent); font-weight: 700; font-size: .9rem; }
.contact__map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.contact__map iframe { width: 100%; height: 330px; border: 0; display: block; }

/* ---------- PIE ---------- */
.site-footer { padding: 30px 0; background: var(--accent-dark); color: rgba(255,255,255,.85); }
.site-footer a { color: var(--gold); }
.site-footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .9rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .hero__bio, .hero__highlights { margin-left: auto; margin-right: auto; justify-content: center; }
  .hero__links { justify-content: center; }
  .contact__grid { grid-template-columns: 1fr; }
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: flex-start;
    gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 18px;
    max-height: 0; overflow: hidden; transition: max-height .3s ease; box-shadow: var(--shadow);
  }
  .nav__links.is-open { max-height: 460px; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .lang-toggle { margin-top: 10px; }
}

/* ---------- ÚLTIMAS NOTICIAS · feed dinámico estilo X ---------- */
.section--news { padding: 44px 0; }
.section--news .section__head { margin-bottom: 22px; }
.news-wrap { position: relative; }
.news-track { display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth; padding: 4px 2px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.news-track::-webkit-scrollbar { display: none; }
.post { flex: 0 0 300px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; transition: .25s; }
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.post__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post__avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: .9rem; overflow: hidden; }
.post__avatar img { width: 100%; height: 100%; object-fit: cover; }
.news-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.news-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; transition: .2s; }
.news-dots button.is-active { background: linear-gradient(135deg, var(--accent), var(--accent-light)); transform: scale(1.35); }
.post__id b { display: block; font-size: .9rem; line-height: 1.15; }
.post__id span { font-size: .76rem; color: var(--ink-soft); }
.post__tag { font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.post__text { font-size: .92rem; color: var(--ink); margin: 0; line-height: 1.5; }
.post__text a { font-weight: 600; }
.news-nav { position: absolute; top: calc(50% + 5px); transform: translateY(-50%); z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--accent); font-size: 1.3rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow); display: grid; place-items: center; }
.news-nav--prev { left: -8px; }
.news-nav--next { right: -8px; }
.news-nav:hover { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: #fff; border-color: var(--accent); }
@media (max-width: 640px) { .news-nav { display: none; } .post { flex-basis: 84%; } }

/* ---------- DOCENCIA (formato guía académica) ---------- */
.teach { display: grid; grid-template-columns: 1fr; gap: 20px; }
.teach__prog { position: relative; display: grid; grid-template-columns: 230px 1fr; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 28px 28px; transition: .25s; overflow: hidden; }
.teach__prog::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.teach__prog:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.teach__head { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: baseline; gap: 8px 12px; padding-right: 26px; border-right: 2px solid var(--accent-soft); }
.teach__level { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-light)); padding: 4px 11px; border-radius: 999px; }
.teach__head h3 { margin: 0; font-size: 1.2rem; flex: 1 1 100%; }
.teach__head h3 a { color: var(--ink); }
.teach__head h3 a:hover { color: var(--accent); }
.teach__inst { font-size: .85rem; color: var(--ink-soft); }
.teach__icon { font-size: 1.35rem; line-height: 1; }
.teach__subjects { list-style: none; margin: 0; padding: 0 0 0 26px; }
.subject { padding: 14px 0; border-top: 1px solid var(--line); }
.subject:first-child { border-top: 0; padding-top: 2px; }
.subject__row { display: flex; align-items: baseline; gap: 10px; }
.subject__name { font-weight: 600; color: var(--ink); }
.subject__dots { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.subject__year { font-size: .74rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-light)); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.subject__desc { margin: 7px 0 9px; font-size: .88rem; color: var(--ink-soft); }
.subject__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.subject__tags span { font-size: .74rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 3px 9px; }
.teach__cta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 2px; padding: 24px 28px; background: linear-gradient(135deg, var(--accent), var(--accent-light)); border-radius: var(--radius); box-shadow: var(--shadow); }
.teach__cta p { margin: 0; color: #fff; font-weight: 600; }
.teach__cta .btn { background: var(--gold); color: var(--accent-dark); }
.teach__cta .btn:hover { background: #fff; }
@media (max-width: 720px) {
  .teach__prog { grid-template-columns: 1fr; }
  .teach__head { border-right: 0; border-bottom: 2px solid var(--accent-soft); padding-right: 0; padding-bottom: 14px; margin-bottom: 14px; }
  .teach__subjects { padding-left: 0; }
}

/* ---------- PUBLICACIONES: subtítulos y acciones ---------- */
.pub-group { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--accent); margin: 4px 0 2px; }
.pubs + .pub-group { margin-top: 26px; }
.pub-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--accent); box-shadow: none; }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.pub__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.pub__meta .pub__doi { align-self: auto; }
.pub__type { font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pub__type--article { color: var(--accent); background: var(--accent-soft); }
.pub__type--preprint { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-light)); }

/* ---------- TARJETA "PRÓXIMAMENTE" ---------- */
.card--soon { position: relative; overflow: hidden; }
.card--soon:hover { transform: none; box-shadow: var(--shadow); }
.card--soon::before { display: none; }
.card--soon .card__blur { filter: blur(5px); opacity: .5; pointer-events: none; user-select: none; }
.card__soon { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px; background: rgba(255, 255, 255, .4); }
.card__soon-badge { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-light)); padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.card__soon p { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--accent-dark); }
