
:root {
  --ink: #17232b;
  --muted: #5d6a72;
  --brand: #173b52;
  --brand-2: #2a6577;
  --accent: #8a5a2b;
  --line: #dfe5e8;
  --surface: #ffffff;
  --surface-soft: #f4f7f8;
  --shadow: 0 18px 48px rgba(20, 42, 55, .10);
  --radius: 18px;
  --container: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-2); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
.container {
  width: min(var(--container), calc(100% - 96px));
  margin-inline: auto;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: .75rem 1rem; background: white; }
.skip-link:focus { left: 1rem; top: 1rem; }
.institutional-bar { border-bottom: 1px solid var(--line); background: #fff; }
.institutional-row {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.8rem);
  min-height: 104px;
  overflow-x: auto;
  padding-block: 12px;
  scrollbar-width: thin;
}
.institutional-row a { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.institutional-row img { display: block; object-fit: contain; }
.logo-uvigo { width: 178px; max-height: 38px; }
.logo-rede { width: 190px; max-height: 88px; }
.logo-ecobas { width: 150px; max-height: 48px; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(223,229,232,.9); }
.header-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.site-name { text-decoration: none; color: var(--ink); font-weight: 750; letter-spacing: -.025em; font-size: 1.15rem; white-space: nowrap; }
.site-name span { color: var(--brand-2); }
.nav-toggle { display: none; border: 1px solid var(--line); background: white; border-radius: 10px; padding: .55rem .75rem; font: inherit; }
.main-nav ul { display: flex; gap: clamp(.8rem, 2vw, 1.7rem); align-items: center; list-style: none; padding: 0; margin: 0; }
.main-nav a { color: #33434c; text-decoration: none; font-size: .94rem; font-weight: 650; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand-2); }
.hero {
  position: relative;
  min-height: 470px;
  display: grid;
  align-items: center;
  background-image: linear-gradient(90deg, rgba(8,22,31,.08) 0%, rgba(8,22,31,.30) 45%, rgba(8,22,31,.86) 100%), url('../images/banner-library.png');
  background-size: cover;
  background-position: center;
  color: white;
  overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 90px; background: linear-gradient(transparent, rgba(0,0,0,.15)); pointer-events: none; }
.hero-content { position: relative; z-index: 1; width: min(760px, 62%); margin-left: auto; padding: 4.5rem 0; }
.eyebrow { margin: 0 0 .7rem; text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 800; opacity: .9; }
.hero h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.12; margin: 0 0 1rem; letter-spacing: -.03em; max-width: 18ch; }
.hero .lead { font-size: clamp(1.02rem, 1.7vw, 1.2rem); line-height: 1.55; margin: 0; max-width: 52ch; color: rgba(255,255,255,.94); }
.hero-home {
  background-size: auto 118%;
  background-position: 72% center;
}
.hero-home .hero-content {
  width: min(580px, 42%);
  margin-left: auto;
  padding: 4.2rem 0;
}
.hero-home h1 {
  max-width: none;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  line-height: 1.16;
  letter-spacing: -.022em;
}
.hero-home h1 span {
  display: block;
  white-space: nowrap;
}
.hero-home h1 span + span {
  margin-top: .22em;
}
.hero-home h1 span + span::before {
  content: "— ";
  color: rgba(255,255,255,.72);
}
.hero-home .lead {
  font-size: clamp(.98rem, 1.25vw, 1.08rem);
  max-width: 44ch;
}

.hero-actions { margin-top: 1.7rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .65rem 1.05rem; border-radius: 999px; font-weight: 750; text-decoration: none; border: 1px solid transparent; }
.button-primary { background: white; color: var(--brand); }
.button-primary:hover { background: #eef4f6; color: var(--brand); }
.button-secondary { color: white; border-color: rgba(255,255,255,.65); background: rgba(255,255,255,.08); }
.button-secondary:hover { background: rgba(255,255,255,.16); color: white; }
.page-hero {
  min-height: 310px;
  background-size: auto 118%;
  background-position: 72% center;
}
.page-hero .hero-content {
  width: min(520px, 42%);
  margin-left: auto;
  padding-block: 3.2rem;
}
.page-hero .eyebrow {
  font-size: .70rem;
  letter-spacing: .13em;
}
.page-hero h1 {
  max-width: none;
  font-size: clamp(1.9rem, 3.1vw, 2.85rem);
  line-height: 1.08;
}
.page-hero .lead {
  max-width: 42ch;
  font-size: clamp(.96rem, 1.25vw, 1.08rem);
}
main { min-height: 50vh; }
.section { padding-block: clamp(4rem, 7vw, 6.5rem); }
.section-soft { background: var(--surface-soft); }
.section-heading { max-width: 780px; margin-bottom: 2rem; }
.section-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.15; margin: 0 0 .75rem; letter-spacing: -.025em; }
.section-heading p { color: var(--muted); margin: 0; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: clamp(3rem, 7vw, 6rem); align-items: start; }
.prose { max-width: 76ch; }
.prose h2, .prose h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.25; letter-spacing: -.018em; }
.prose h2 { margin-top: 2.6rem; font-size: 2rem; }
.prose h3 { margin-top: 2rem; font-size: 1.4rem; }
.prose p { margin: 0 0 1.25rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .6rem; }
.sidebar-card, .card { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.sidebar-card { padding: 1.5rem; position: sticky; top: 104px; }
.sidebar-card h2 { font-size: 1.1rem; margin: 0 0 .8rem; }
.sidebar-card p { color: var(--muted); font-size: .94rem; }
.link-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.link-list li + li { margin-top: .55rem; }
.link-list a { font-weight: 650; text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.card { padding: 1.55rem; }
.card h3 { margin: 0 0 .55rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; line-height: 1.25; }
.card p { color: var(--muted); margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.stat { border-left: 4px solid var(--brand-2); padding: .55rem 1rem; background: rgba(255,255,255,.75); }
.stat strong { display: block; font-size: 1.4rem; }
.timeline { border-left: 2px solid var(--line); padding-left: 1.8rem; }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--brand-2); left: calc(-1.8rem - 7px); top: .55rem; box-shadow: 0 0 0 5px white; }
.timeline-item h3 { margin: 0 0 .35rem; font-size: 1.3rem; }
.publication-list { display: grid; gap: 1rem; }
.publication { border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem 1.35rem; background: white; }
.publication p { margin: 0; }
.publication .year { color: var(--brand-2); font-weight: 800; font-size: .86rem; letter-spacing: .08em; }
.publication a { font-weight: 700; }
.guest-editor { border-left: 5px solid var(--accent); }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.news-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #e8edef; }
.news-card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.news-card time { color: var(--brand-2); font-size: .83rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.news-card h3 { margin: .5rem 0 .65rem; }
.news-card p { margin: 0 0 1rem; }
.news-card a { margin-top: auto; font-weight: 750; }
.news-empty { border: 1px dashed #b8c5cb; border-radius: 14px; padding: 1.5rem; color: var(--muted); background: white; }
.badges { display: flex; flex-wrap: wrap; gap: .65rem; padding: 0; list-style: none; }
.badges li { padding: .48rem .78rem; border-radius: 999px; background: #eaf1f3; color: #294652; font-size: .92rem; font-weight: 650; }
.callout { padding: 1.4rem 1.5rem; border-radius: 14px; background: #eaf1f3; border-left: 4px solid var(--brand-2); }
.site-footer { background: #112b3b; color: rgba(255,255,255,.84); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
.site-footer h2, .site-footer h3 { color: white; margin-top: 0; }
.site-footer a { color: white; }
.footer-small { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.18); display: flex; justify-content: space-between; gap: 1rem; font-size: .86rem; }
.admin-link { opacity: .7; font-size: .82rem; }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (max-width: 1120px) {
  .container { width: min(var(--container), calc(100% - 56px)); }
  .nav-toggle { display: inline-flex; }
  .main-nav { position: absolute; top: 72px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--line); padding: 1rem 28px 1.4rem; display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { align-items: stretch; flex-direction: column; gap: .3rem; }
  .main-nav a { display: block; padding: .55rem 0; }
  .hero { min-height: 430px; background-image: linear-gradient(90deg, rgba(8,22,31,.22), rgba(8,22,31,.78)), url('../images/banner-library.png'); }
  .hero-content { width: min(720px, 72%); margin-left: auto; }
  .page-hero {
    min-height: 300px;
    background-size: auto 114%;
    background-position: 68% center;
  }
  .page-hero .hero-content {
    width: min(500px, 52%);
    margin-left: auto;
    padding-block: 3rem;
  }
  .page-hero h1 {
    font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  }
  .hero-home {
    background-size: auto 114%;
    background-position: 68% center;
  }
  .hero-home .hero-content {
    width: min(500px, 58%);
  }
  .hero-home h1 {
    font-size: clamp(1.62rem, 3.3vw, 2rem);
  }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .cards, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .institutional-row { gap: 1.4rem; min-height: 90px; }
  .logo-uvigo { width: 145px; }
  .logo-rede { width: 158px; max-height: 74px; }
  .logo-ecobas { width: 125px; }
  .site-name { font-size: 1rem; }
  .hero { min-height: 520px; align-items: end; background-position: 38% center; background-image: linear-gradient(0deg, rgba(8,22,31,.92) 0%, rgba(8,22,31,.50) 60%, rgba(8,22,31,.18) 100%), url('../images/banner-library.png'); }
  .hero-content { width: 100%; margin: 0; padding: 3rem 0; }
  .page-hero {
    min-height: 380px;
    background-size: cover;
    background-position: 38% center;
  }
  .page-hero .hero-content {
    width: 100%;
    margin: 0;
    padding: 2.6rem 0;
  }
  .page-hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }
  .hero-home {
    background-size: cover;
    background-position: 38% center;
  }
  .hero-home .hero-content {
    width: 100%;
    padding: 3rem 0;
  }
  .hero-home h1 {
    font-size: clamp(1.65rem, 7.2vw, 2.05rem);
  }
  .hero-home h1 span {
    white-space: normal;
  }

  .cards, .news-grid, .stat-grid, .footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: 3.6rem; }
  .footer-small { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } }
