:root{
  --bg:#ffffff;
  --fg:#0f172a;
  --muted:#475569;
  --border:#e5e7eb;
  --green:#1f8a3b;
  --green2:#16a34a;
  --shadow:0 10px 30px rgba(15,23,42,.08);
  --radius:18px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  line-height:1.65;
}

a{ color:var(--green); text-decoration:none; }
a:hover{ text-decoration:underline; }
p{ margin:.75rem 0; }
h1,h2,h3{ line-height:1.2; }
h1{ font-size: clamp(2rem, 3.2vw, 3.1rem); letter-spacing:-0.02em; margin:.9rem 0 .6rem 0; }
h2{ font-size:1.35rem; margin:0 0 .6rem 0; letter-spacing:-0.01em; }
h3{ font-size:1.1rem; margin:1.2rem 0 .35rem 0; }

.container{
  width:min(1100px, calc(100% - 2.5rem));
  margin:0 auto;
}

.skip-link{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:1rem; top:1rem; width:auto; height:auto;
  padding:.6rem .9rem; background:var(--bg);
  border:1px solid var(--border); border-radius:12px;
  box-shadow:var(--shadow); z-index:9999;
}

.topbar{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}

.nav-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.9rem 0;
}

.brand{
  display:flex; align-items:center; gap:.75rem;
  font-weight:780; letter-spacing:.2px;
  color:var(--fg);
}
.brand-badge{
  width:34px; height:34px; border-radius:12px;
  background: radial-gradient(circle at 30% 30%, var(--green2), var(--green));
  box-shadow: 0 8px 18px rgba(22,163,74,.25);
}
.brand .dot{ color:var(--green); }

.navlinks{
  display:flex; gap:.7rem; flex-wrap:wrap;
  font-weight:650; color:var(--muted);
}
.navlinks a{
  color:var(--muted);
  padding:.35rem .55rem;
  border-radius:10px;
}
.navlinks a[aria-current="page"]{
  color:var(--green);
  background:rgba(22,163,74,.10);
  text-decoration:none;
}

.hero{ padding: 2.6rem 0 1.5rem 0; }
.lead{ color:var(--muted); font-size:1.08rem; max-width:80ch; }

.grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:1.2rem;
  align-items:start;
}
@media (max-width: 900px){ .grid{ grid-template-columns:1fr; } }

.card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1.25rem 1.25rem;
  box-shadow:var(--shadow);
  background:#fff;
}

.section-title{
  color: var(--green);
  font-weight: 850;
}

.section-title span{
  color: inherit; /* hace que el span no “divida” el color */
}

.figure{ margin-top:1rem; }
.figure img{
  width:100%; height:auto;
  border-radius:14px;
  border:1px solid var(--border);
}
.caption{ margin:.55rem 0 0 0; color:var(--muted); font-size:.95rem; }

.list{ margin:.6rem 0 0 1.1rem; }
.list li{ margin:.35rem 0; }

.hr{ border:none; border-top:1px solid var(--border); margin:1.1rem 0; }

.pills{
  display:flex; flex-wrap:wrap; gap:.5rem;
  margin:.75rem 0 0 0;
}
.pill{
  border:1px solid var(--border);
  border-radius:999px;
  padding:.25rem .6rem;
  color:var(--muted);
  font-weight:650;
  font-size:.95rem;
}

.table{
  width:100%;
  border-collapse:collapse;
  margin-top:.75rem;
  font-size: .98rem;
}
.table th, .table td{
  text-align:left;
  padding:.6rem .55rem;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}
.table th{ color:var(--muted); font-weight:750; }

.page-nav{
  margin:.2rem 0 1rem 0;
  color:var(--muted);
}
.page-nav a{ color:var(--green); font-weight:650; }

.notice{
  border-left:4px solid var(--green);
  padding:.8rem .9rem;
  background: rgba(22,163,74,.06);
  border-radius: 12px;
  margin: .9rem 0;
  color: var(--fg);
}

.footer{
  margin-top:2.5rem;
  border-top:1px solid var(--border);
  padding:1.4rem 0 2.2rem 0;
  color:var(--muted);
  font-size:.95rem;
}
/* ---- People + Gallery add-ons ---- */
.subhead{ margin: 1.1rem 0 .4rem; font-size: 1rem; }
.note{ margin-top: 1rem; color: var(--muted); }

.people-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.person-card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
  background:#fff;
  box-shadow: var(--shadow);
}

.person-header{
  display:flex;
  gap: 1rem;
  padding: 1rem;
  align-items:center;
  border-bottom: 1px solid var(--border);
}

.avatar{
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #f8fafc;
  flex: 0 0 auto;
}

.person-name{ margin:0; font-weight: 850; font-size: 1.12rem; }
.person-role{ margin:.15rem 0 0; color: var(--muted); font-weight: 650; }

.person-body{ padding: 1rem; }

.kv{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap:.35rem .75rem;
  margin-top: .25rem;
}
.kv .k{ color: var(--muted); font-weight: 750; }

/* ===== Gallery layout ===== */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}

.gallery-item img {
  width: 100%;
  height: 220px;              /* fuerza altura uniforme */
  object-fit: cover;          /* recorte elegante */
  display: block;
}

.gallery-item .cap {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #555;
  background: #fafafa;
  border-top: 1px solid rgba(0,0,0,0.05);
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 200px;
  }
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(2),
.gallery-item:nth-child(3) {
  border: 2px solid rgba(30,130,76,0.25);
}

/* People cards */
.people-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.person-card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
  background:#fff;
  box-shadow: var(--shadow);
}
.person-header{
  display:flex;
  gap: 1rem;
  padding: 1rem;
  align-items:center;
  border-bottom: 1px solid var(--border);
}
.avatar{
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #f8fafc;
  flex: 0 0 auto;
}
.person-name{ margin:0; font-weight: 850; font-size: 1.12rem; }
.person-role{ margin:.15rem 0 0; color: var(--muted); font-weight: 650; }
.person-body{ padding: 1rem; }
.kv{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap:.35rem .75rem;
  margin-top: .25rem;
}
.kv .k{ color: var(--muted); font-weight: 750; }
.subhead{ margin: 1rem 0 .4rem; font-size: 1rem; }

.hero-intro {
  width: 100%;
  padding: 2rem 0;
  margin: 2rem 0;
}

.hero-intro .lead {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  font-size: 1.2rem;
  line-height: 1.75;
}

/* ===== Lightbox ===== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1000;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
  cursor: zoom-out;
}

.gallery-item img {
  cursor: zoom-in;
}

.year {
  margin-top: 2rem;
  font-size: 1.2rem;
  color: #444;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.25rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .75rem;
}

.btn {
  display: inline-block;
  padding: .55rem .85rem;
  border-radius: .6rem;
  border: 1px solid rgba(0,0,0,.12);
  text-decoration: none;
}

.btn:hover {
  border-color: rgba(0,0,0,.25);
}

.muted {
  opacity: .75;
}

/* ===== Professional academic footer (centered, consistent with site container) ===== */

.footer-pro{
  border-top: 1px solid rgba(0,0,0,.08);
  background: #f7f7f7;
  padding: 44px 0 38px;  /* sin padding lateral porque container ya lo controla */
}

.footer-pro .footer-inner{
  max-width: 520px;        /* bloque compacto como ETH */
  margin: 0 auto;          /* centra dentro del container */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-pro .footer-logo{
  width: 220px;            /* MÁS GRANDE */
  max-width: 70vw;         /* no se rompe en móvil */
  height: auto;
  display: block;
  margin: 0 auto;
  transition: transform .15s ease, opacity .15s ease;
}

.footer-pro .footer-logo:hover{
  transform: translateY(-2px);
  opacity: .85;
}

.footer-text{
  margin: 0;
  font-size: 1rem;
  opacity: .85;
}

.footer-copy{
  margin: 0;
  font-size: .9rem;
  opacity: .65;
}