:root {
  --ink: #f7f1e3;
  --muted: #eadfc4;
  --line: rgba(113, 22, 16, 0.14);
  --panel: rgba(113, 22, 16, 0.68);
  --panel-strong: rgba(113, 22, 16, 0.78);
  --accent: #711610;
  --accent-deep: #4d0d09;
  --accent-soft: #f3dfdc;
  --warm: #e6d9aa;
  --neutral: #9a999d;
  --white: #ffffff;
  --shadow: 0 18px 44px rgba(79, 40, 24, 0.16);
  --navy: #8d3b33;
  --surface: #eadfcf;
  --surface-alt: #f3eadc;
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-fast: 220ms;
  --dur-med: 420ms;
  --dur-slow: 720ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: #4f3d34;
  background: #efe5d3;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(113, 22, 16, 0.12), transparent 0 24%),
    radial-gradient(circle at 88% 0%, rgba(230, 217, 170, 0.32), transparent 0 24%),
    linear-gradient(180deg, #f6efe2 0%, #ebdfcc 44%, #e5d7c0 100%);
  z-index: -2;
}

.page-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(113, 22, 16, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 22, 16, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 88%);
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
li,
span,
small,
input,
select,
textarea,
.button,
.nav a {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

code {
  padding: 0.14rem 0.38rem;
  border-radius: 999px;
  background: rgba(230, 217, 170, 0.14);
  color: #f0dfb6;
  font-size: 0.92em;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.institutional-bar {
  background: rgba(113, 22, 16, 0.88);
  border-bottom: 1px solid rgba(230, 217, 170, 0.26);
  backdrop-filter: blur(12px);
}

.institutional-wrap {
  padding: 12px 0;
}

.institutional-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.institutional-logo {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  object-fit: contain;
  padding: 8px;
}

.institutional-logo-web {
  width: 340px;
  height: 96px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.institutional-copy {
  display: grid;
  gap: 3px;
}

.institutional-copy strong {
  font-size: 0.98rem;
  color: var(--white);
}

.institutional-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 0;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #8c1b14, var(--accent));
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}

.brand-mark-wide {
  width: 60px;
  height: 42px;
  border-radius: 8px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 0.98rem;
  color: var(--accent-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-copy small {
  color: #8a7a72;
}

.nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  background: #8d2a24;
  padding: 0 10px;
  border-radius: 0;
  min-height: 64px;
  align-items: center;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav a {
  padding: 19px 14px;
  border-radius: 0;
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    background-color var(--dur-med) var(--ease-soft),
    color var(--dur-med) var(--ease-soft);
}

.nav a:hover,
.nav a[aria-current="page"],
.nav-item:hover > a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  display: none;
  flex-direction: column;
  padding: 10px 0;
  background: rgba(136, 45, 37, 0.96);
  border: 1px solid rgba(230, 217, 170, 0.28);
  box-shadow: var(--shadow);
  z-index: 20;
  transform: translateY(8px);
  opacity: 0;
  transition:
    transform var(--dur-med) var(--ease-smooth),
    opacity var(--dur-med) var(--ease-soft);
}

.nav-item:hover .nav-dropdown {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.nav-dropdown a {
  padding: 12px 16px;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  gap: 24px;
  padding: 42px 36px;
  border: 1px solid var(--line);
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, rgba(68, 24, 27, 0.98), rgba(42, 16, 19, 0.98));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-figmm {
  border-top: 6px solid #9d2235;
}

.hero-slider {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 0 0 28px 28px;
  border-top: 6px solid #9d2235;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity var(--dur-slow) var(--ease-soft),
    transform 1200ms var(--ease-smooth);
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
  transform: scale(1);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media-one {
  background:
    linear-gradient(135deg, rgba(157, 34, 53, 0.3), rgba(0, 0, 0, 0.15)),
    radial-gradient(circle at top right, rgba(230, 217, 170, 0.16), transparent 30%),
    url("https://www.figmm.uni.edu.pe/wp-content/uploads/2024/01/IMG_20200120_112816-scaled.jpg") center/cover no-repeat;
}

.hero-media-two {
  background:
    linear-gradient(135deg, rgba(113, 22, 16, 0.28), rgba(230, 217, 170, 0.06)),
    radial-gradient(circle at bottom left, rgba(230, 217, 170, 0.12), transparent 28%),
    url("https://portal.uni.edu.pe/images/POSGRADO-20250603.jpg") center/cover no-repeat;
}

.hero-media-three {
  background:
    linear-gradient(135deg, rgba(157, 34, 53, 0.24), rgba(0, 0, 0, 0.26)),
    radial-gradient(circle at center right, rgba(230, 217, 170, 0.12), transparent 24%),
    url("https://portal.uni.edu.pe/images/a0investigaciongk-is-682a.jpg") center/cover no-repeat;
}

.hero-overlay {
  background: linear-gradient(0deg, rgba(71, 22, 18, 0.52) 0%, rgba(71, 22, 18, 0.2) 35%, rgba(71, 22, 18, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  min-height: 720px;
  padding: 72px 42px 56px;
  max-width: 760px;
}

.hero-content > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms var(--ease-soft),
    transform 900ms var(--ease-smooth);
}

.hero-slide.is-active .hero-content > * {
  opacity: 1;
  transform: translateY(0);
}

.hero-slide.is-active .hero-content > *:nth-child(1) {
  transition-delay: 90ms;
}

.hero-slide.is-active .hero-content > *:nth-child(2) {
  transition-delay: 150ms;
}

.hero-slide.is-active .hero-content > *:nth-child(3) {
  transition-delay: 230ms;
}

.hero-slide.is-active .hero-content > *:nth-child(4) {
  transition-delay: 310ms;
}

.hero-slider .eyebrow,
.hero-slider h1,
.hero-slider .lead {
  color: var(--white);
}

.hero-slider .lead {
  max-width: 54ch;
}

.hero-slider-controls {
  position: absolute;
  right: 42px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-control {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition:
    transform var(--dur-med) var(--ease-smooth),
    background-color var(--dur-med) var(--ease-soft),
    box-shadow var(--dur-med) var(--ease-soft);
}

.hero-control.is-active {
  background: var(--warm);
  transform: scale(1.18);
  box-shadow: 0 0 0 5px rgba(230, 217, 170, 0.18);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(113, 22, 16, 0.16);
  background: rgba(230, 217, 170, 0.42);
  border-radius: 14px;
}

.metric-card strong {
  font-family: "Barlow Semi Condensed", "Segoe UI", sans-serif;
  font-size: 1.6rem;
  color: var(--accent);
}

.metric-card span {
  color: #5f5147;
  line-height: 1.45;
}

.hero-home {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  margin-top: 10px;
}

.eyebrow,
.section-tag,
.panel-label,
.status-kicker {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--accent-deep);
}

h1,
h2 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  max-width: 38ch;
}

h2 {
  font-size: clamp(1.45rem, 2vw, 2.1rem);
}

.lead {
  max-width: 60ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #8c221a);
  color: var(--white);
  box-shadow: 0 16px 38px rgba(113, 22, 16, 0.24);
}

.button-secondary {
  background: rgba(230, 217, 170, 0.14);
  color: #f0dfb6;
}

.button-light {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-panel,
.status-card,
.feature-card,
.control-panel,
.viewer-stage {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  color: var(--white);
}

.hero-panel {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(113, 22, 16, 0.84), rgba(141, 42, 36, 0.8));
}

.spec-list,
.compact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.spec-list li:last-child {
  border-bottom: 0;
}

.spec-list span {
  color: var(--muted);
}

.status-strip,
.content-grid {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.portal-section {
  margin-top: 28px;
}

.gateway-section {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-note {
  color: #6f6668;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.section-heading h2 {
  color: var(--accent-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
}

.section-heading h2,
.feature-card h2,
.status-card h2,
.news-card h3,
.faculty-card h3,
.issue-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.quick-links-visual {
  margin-bottom: 48px;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gateway-card {
  position: relative;
  display: flex;
  align-items: end;
  min-height: 340px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(230, 217, 170, 0.24);
  box-shadow: var(--shadow);
  transition:
    transform var(--dur-med) var(--ease-smooth),
    box-shadow var(--dur-med) var(--ease-soft),
    border-color var(--dur-med) var(--ease-soft);
}

.gateway-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px rgba(113, 22, 16, 0.2);
}

.gateway-card-school {
  background:
    linear-gradient(180deg, rgba(113, 22, 16, 0.1), rgba(113, 22, 16, 0.14)),
    url("https://www.figmm.uni.edu.pe/wp-content/uploads/2024/01/P4.jpg") center/cover no-repeat;
}

.gateway-card-academic {
  background:
    linear-gradient(180deg, rgba(113, 22, 16, 0.1), rgba(113, 22, 16, 0.16)),
    url("https://www.figmm.uni.edu.pe/wp-content/uploads/2024/01/IMG_20200120_121558-scaled.jpg") center/cover no-repeat;
}

.gateway-card-updates {
  background:
    linear-gradient(180deg, rgba(113, 22, 16, 0.1), rgba(113, 22, 16, 0.16)),
    url("https://portal.uni.edu.pe/images/a0investigaciongk-is-682a.jpg") center/cover no-repeat;
}

.gateway-card-grd {
  background:
    linear-gradient(180deg, rgba(31, 55, 48, 0.08), rgba(31, 55, 48, 0.72)),
    url("https://www.figmm.uni.edu.pe/wp-content/uploads/2024/01/IMG_20200120_121558-scaled.jpg") center/cover no-repeat;
}

.gateway-card-repository {
  background:
    linear-gradient(180deg, rgba(48, 45, 58, 0.08), rgba(48, 45, 58, 0.74)),
    url("https://portal.uni.edu.pe/images/POSGRADO-20250603.jpg") center/cover no-repeat;
}

.gateway-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(49, 14, 11, 0.08), rgba(49, 14, 11, 0.74));
}

.gateway-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 28px 24px 24px;
  color: var(--white);
}

.gateway-kicker {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.84);
}

.gateway-content h3 {
  margin: 0;
  font-size: 1.62rem;
  line-height: 1.06;
  text-wrap: balance;
}

.gateway-content p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.quick-link {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(230, 217, 170, 0.56);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    transform var(--dur-med) var(--ease-smooth),
    box-shadow var(--dur-med) var(--ease-soft),
    border-color var(--dur-med) var(--ease-soft),
    background-color var(--dur-med) var(--ease-soft);
}

.quick-link::before,
.status-card::before,
.feature-card::before,
.news-card::before,
.faculty-card::before,
.highlight-link::before,
.issue-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 34%, transparent 68%, rgba(230, 217, 170, 0.14));
  opacity: 0.7;
  pointer-events: none;
}

.quick-link:hover,
.status-card:hover,
.feature-card:hover,
.news-card:hover,
.faculty-card:hover,
.highlight-link:hover,
.issue-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 46px rgba(113, 22, 16, 0.14);
}

.quick-link strong {
  color: var(--accent-deep);
  font-size: 1rem;
}

.quick-link span {
  color: #665d5f;
  line-height: 1.55;
}

.status-strip {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.status-card,
.feature-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
  transition:
    transform var(--dur-med) var(--ease-smooth),
    box-shadow var(--dur-med) var(--ease-soft),
    border-color var(--dur-med) var(--ease-soft);
}

.status-card p:last-child,
.feature-card p:last-child,
.flow-step p {
  color: var(--muted);
  line-height: 1.65;
}

.content-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-grid-bottom {
  margin-bottom: 48px;
}

.portal-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.portal-card {
  min-height: 220px;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent-deep);
  font-weight: 700;
}

.feature-copy {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
}

.feature-card-wide {
  grid-column: span 2;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.news-grid-portal {
  margin-top: 0;
}

.news-card-feature {
  grid-column: span 2;
}

.news-card {
  position: relative;
  padding: 20px;
  border-radius: 16px;
  background: rgba(113, 22, 16, 0.7);
  border: 1px solid rgba(230, 217, 170, 0.22);
  overflow: hidden;
  transition:
    transform var(--dur-med) var(--ease-smooth),
    box-shadow var(--dur-med) var(--ease-soft),
    border-color var(--dur-med) var(--ease-soft),
    background-color var(--dur-med) var(--ease-soft);
}

.news-card h3 {
  margin: 8px 0 10px;
  font-size: 1.16rem;
  line-height: 1.22;
  text-wrap: balance;
}

.news-card p {
  color: var(--muted);
  line-height: 1.65;
}

.news-tag {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent-deep);
}

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.faculty-card {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(113, 22, 16, 0.14);
  border-radius: 14px;
  background: rgba(230, 217, 170, 0.46);
  overflow: hidden;
  transition:
    transform var(--dur-med) var(--ease-smooth),
    box-shadow var(--dur-med) var(--ease-soft),
    border-color var(--dur-med) var(--ease-soft),
    background-color var(--dur-med) var(--ease-soft);
}

.faculty-card h3 {
  margin: 8px 0 10px;
  font-size: 1.18rem !important;
  text-align: left;
  color: var(--accent-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
}

.faculty-card p {
  color: #665d5f;
  line-height: 1.6;
}

.faculty-code {
  display: inline-flex;
  font-family: "Barlow Semi Condensed", "Segoe UI", sans-serif;
  font-size: 2.18rem;
  color: rgba(113, 22, 16, 0.24);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
  letter-spacing: 0.04em;
}

.highlight-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.highlight-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 0 18px;
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  background: rgba(230, 217, 170, 0.56);
  color: var(--accent-deep);
  font-family: "Barlow Semi Condensed", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  overflow: hidden;
  transition:
    transform var(--dur-med) var(--ease-smooth),
    box-shadow var(--dur-med) var(--ease-soft),
    border-color var(--dur-med) var(--ease-soft),
    background-color var(--dur-med) var(--ease-soft);
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.flow-step {
  padding: 18px;
  border-radius: 20px;
  background: rgba(230, 217, 170, 0.42);
}

.flow-step p {
  color: #5f5147;
}

.compact-list li {
  position: relative;
  padding-left: 18px;
  margin-top: 12px;
  color: #f1e6cf;
  line-height: 1.6;
}

.compact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--warm), var(--accent));
}

.accent-card {
  background: linear-gradient(135deg, #9d2235, #8f4338);
  color: var(--white);
}

.accent-card::before,
.news-card::before,
.issue-card::before {
  background:
    radial-gradient(circle at top right, rgba(230, 217, 170, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 40%);
}

.accent-card .section-tag,
.accent-card p {
  color: rgba(255, 255, 255, 0.86);
}

.viewer-shell {
  padding-bottom: 48px;
}

.revista-shell {
  padding-bottom: 48px;
}

.revista-hero h1 {
  max-width: 100%;
}

.subpage-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-top: 6px solid #9d2235;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow);
}

.subpage-hero-media {
  position: absolute;
  inset: 0;
}

.subpage-hero-map {
  background:
    linear-gradient(135deg, rgba(157, 34, 53, 0.28), rgba(0, 0, 0, 0.14)),
    radial-gradient(circle at 15% 20%, rgba(230, 217, 170, 0.08), transparent 24%),
    url("https://www.figmm.uni.edu.pe/wp-content/uploads/2024/01/IMG_20200120_121558-scaled.jpg") center/cover no-repeat;
}

.subpage-hero-journal {
  background:
    linear-gradient(135deg, rgba(113, 22, 16, 0.24), rgba(230, 217, 170, 0.08)),
    radial-gradient(circle at 85% 18%, rgba(230, 217, 170, 0.12), transparent 26%),
    url("https://portal.uni.edu.pe/images/POSGRADO-20250603.jpg") center/cover no-repeat;
}

.subpage-hero-school .subpage-hero-media {
  background:
    linear-gradient(135deg, rgba(113, 22, 16, 0.24), rgba(230, 217, 170, 0.04)),
    url("https://www.figmm.uni.edu.pe/wp-content/uploads/2024/01/P4.jpg") center/cover no-repeat;
}

.subpage-hero-academic .subpage-hero-media {
  background:
    linear-gradient(135deg, rgba(113, 22, 16, 0.22), rgba(230, 217, 170, 0.08)),
    url("https://www.figmm.uni.edu.pe/wp-content/uploads/2024/01/IMG_20200120_112816-scaled.jpg") center/cover no-repeat;
}

.subpage-hero-updates .subpage-hero-media {
  background:
    linear-gradient(135deg, rgba(113, 22, 16, 0.22), rgba(230, 217, 170, 0.08)),
    url("https://portal.uni.edu.pe/images/a0investigaciongk-is-682a.jpg") center/cover no-repeat;
}

.grd-hero .subpage-hero-media {
  background:
    linear-gradient(135deg, rgba(38, 65, 54, 0.46), rgba(64, 24, 18, 0.22)),
    url("https://www.figmm.uni.edu.pe/wp-content/uploads/2024/01/IMG_20200120_121558-scaled.jpg") center/cover no-repeat;
}

.repository-hero .subpage-hero-media {
  background:
    linear-gradient(135deg, rgba(44, 42, 58, 0.42), rgba(113, 22, 16, 0.2)),
    url("https://portal.uni.edu.pe/images/POSGRADO-20250603.jpg") center/cover no-repeat;
}

.subpage-hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  min-height: 420px;
  padding: 42px 36px;
  max-width: 760px;
}

.subpage-hero .eyebrow,
.subpage-hero h1,
.subpage-hero .lead {
  color: var(--white);
}

.viewer-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 24px;
  align-items: start;
}

.control-panel,
.viewer-stage {
  padding: 24px;
}

.control-panel h2,
.viewer-stage h2 {
  margin-bottom: 18px;
  color: var(--white);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field-hint {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(230, 217, 170, 0.18);
  background: rgba(247, 241, 227, 0.12);
  color: rgba(255, 244, 238, 0.94);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.45;
}

.field-hint-compact {
  margin-top: 8px;
  padding: 10px 12px;
}

.field-hint strong {
  display: block;
  margin-bottom: 4px;
  color: #f7e3c0;
  font-size: 0.9rem;
}

.field-hint span {
  color: rgba(255, 236, 224, 0.9);
  font-size: 0.9rem;
  font-weight: 400;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
  color: #3d0e0b;
  text-transform: none;
}

.control-panel .field span,
.viewer-stage .field span,
.viewer-meta p,
.info-card strong {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid rgba(113, 22, 16, 0.18);
  border-radius: 14px;
  background: rgba(247, 241, 227, 0.92);
  color: var(--accent-deep);
  font: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 14px rgba(113, 22, 16, 0.06);
}

select {
  font-weight: 600;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 122px;
  line-height: 1.45;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.field-readonly input {
  color: #6b5445;
}

.info-card {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: #fdfbf7;
  border: 1px solid rgba(113, 22, 16, 0.15);
  border-left: 4px solid var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.info-card h3 {
  margin: 0 0 8px 0;
  color: var(--accent-deep);
  font-size: 1.05rem;
  font-weight: 700;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.info-card p {
  margin: 0 0 10px 0;
  color: #4a3b32;
  font-size: 0.9rem;
  line-height: 1.55;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.info-card p:last-child {
  margin-bottom: 0;
}

.viewer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.viewer-meta p {
  color: rgba(255, 241, 228, 0.92);
  font-size: 0.98rem;
  font-weight: 500;
}

.viewer-preview-frame,
.map-frame {
  position: relative;
  min-height: 520px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(157, 34, 53, 0.1), rgba(230, 217, 170, 0.32)),
    #e9dcc8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 30px rgba(113, 22, 16, 0.1);
}

#map-canvas,
#map {
  width: 100%;
  min-height: 520px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(230, 217, 170, 0.24);
  background: rgba(247, 241, 227, 0.12);
  color: rgba(255, 244, 238, 0.94);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.map-attribution-banner {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 500;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(113, 22, 16, 0.88);
  border: 1px solid var(--line);
  color: #f0dfb6;
  font-size: 0.84rem;
  font-weight: 700;
}

.button-row .button {
  flex: 1 1 100%;
}

.field-stack {
  margin-top: 18px;
}

.issue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.issue-card {
  position: relative;
  padding: 20px;
  border-radius: 20px;
  background: rgba(113, 22, 16, 0.7);
  overflow: hidden;
  transition:
    transform var(--dur-med) var(--ease-smooth),
    box-shadow var(--dur-med) var(--ease-soft),
    border-color var(--dur-med) var(--ease-soft),
    background-color var(--dur-med) var(--ease-soft);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.issue-card h3 {
  margin: 8px 0 10px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.issue-card p {
  color: var(--muted);
  line-height: 1.65;
}

.issue-meta {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent-deep);
}

.grd-shell,
.repository-shell {
  padding-bottom: 52px;
}

.grd-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-top: 24px;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.risk-card {
  position: relative;
  min-height: 250px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(39, 72, 61, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(230, 217, 170, 0.32)),
    #efe7d8;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.risk-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 100%;
  background: linear-gradient(180deg, #315f50, #9d2235);
}

.risk-card span {
  display: inline-flex;
  margin-bottom: 46px;
  color: rgba(49, 95, 80, 0.38);
  font-family: "Barlow Semi Condensed", "Segoe UI", sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
}

.risk-card h3 {
  margin: 0 0 12px;
  color: #263f38;
  font-size: 1.28rem;
  line-height: 1.15;
}

.risk-card p {
  margin: 0;
  color: #5a5049;
  line-height: 1.6;
}

.case-timeline {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(49, 63, 56, 0.1);
  border: 1px solid rgba(49, 95, 80, 0.14);
}

.case-timeline article {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
  border-left: 5px solid #315f50;
}

.case-timeline strong {
  color: var(--accent-deep);
  font-size: 1.08rem;
}

.case-timeline p {
  margin: 0;
  color: #5a5049;
  line-height: 1.65;
}

.grd-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 0 0;
  padding: 28px;
  border-radius: 8px;
  background: #315f50;
  color: var(--white);
  box-shadow: none;
}

.grd-callout h2,
.grd-callout p,
.grd-callout .section-tag {
  color: var(--white);
}

.grd-callout p {
  max-width: 70ch;
  line-height: 1.7;
}

.repository-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 24px;
  align-items: start;
}

.repository-filter,
.repository-panel {
  border: 1px solid rgba(49, 63, 56, 0.16);
  border-radius: 8px;
  background: rgba(238, 229, 211, 0.82);
  box-shadow: none;
}

.repository-filter {
  position: sticky;
  top: 16px;
  padding: 24px;
}

.repository-filter h2,
.repository-panel h2 {
  color: var(--accent-deep);
}

.repository-panel {
  padding: 24px;
}

.repository-panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.repository-panel-header span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #315f50;
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
}

.repository-results {
  display: grid;
  gap: 14px;
}

.repository-card,
.repository-empty {
  border-radius: 16px;
  border: 1px solid rgba(113, 22, 16, 0.12);
  background: rgba(255, 255, 255, 0.58);
}

.repository-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.28fr);
  gap: 18px;
  padding: 20px;
}

.repository-meta {
  margin: 0 0 8px;
  color: #315f50;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.repository-card h3,
.repository-empty h3 {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 1.2rem;
  line-height: 1.25;
}

.repository-card p,
.repository-empty p {
  margin: 0;
  color: #5a5049;
  line-height: 1.6;
}

.repository-card-side {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-left: 18px;
  border-left: 1px solid rgba(113, 22, 16, 0.14);
}

.repository-card-side strong {
  color: #315f50;
  font-size: 1.4rem;
}

.repository-card-side span {
  color: #6f6058;
  line-height: 1.4;
}

.repository-status {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(157, 34, 53, 0.1);
  color: var(--accent-deep);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.repository-empty {
  padding: 28px;
}

.research-hero .subpage-hero-media {
  background:
    linear-gradient(135deg, rgba(49, 95, 80, 0.54), rgba(73, 15, 11, 0.32)),
    url("https://portal.uni.edu.pe/images/a0investigaciongk-is-682a.jpg") center/cover no-repeat;
}

.research-focus {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(49, 95, 80, 0.22);
  border-top: 0;
  background: #f8f4eb;
}

.research-focus article {
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 22px;
  border-right: 1px solid rgba(49, 95, 80, 0.18);
}

.research-focus article:last-child {
  border-right: 0;
}

.research-focus span,
.research-card span {
  color: #315f50;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.research-focus strong {
  color: #4b0f0b;
  font-size: 1.08rem;
  line-height: 1.35;
}

.research-focus p {
  margin: 0;
  color: #5f5147;
  line-height: 1.55;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.research-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 250px;
  padding: 22px;
  border: 1px solid rgba(73, 15, 11, 0.14);
  border-top: 5px solid #315f50;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.research-card h3 {
  margin: 0;
  color: #4b0f0b;
  font-size: 1.26rem;
  line-height: 1.14;
}

.research-card p {
  margin: 0;
  color: #5a5049;
  line-height: 1.62;
}

.research-workflow {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  gap: 28px;
  margin-top: 28px;
  padding: 28px;
  border: 1px solid rgba(73, 15, 11, 0.16);
  border-radius: 8px;
  background: #5f1914;
  color: var(--white);
}

.research-workflow h2,
.research-workflow .section-tag {
  color: var(--white);
}

.research-workflow ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: research-step;
}

.research-workflow li {
  counter-increment: research-step;
  display: grid;
  grid-template-columns: 52px minmax(140px, 0.3fr) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.research-workflow li:last-child {
  border-bottom: 0;
}

.research-workflow li::before {
  content: counter(research-step, decimal-leading-zero);
  color: #d8c89f;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 800;
}

.research-workflow strong {
  color: #ffffff;
}

.research-workflow span {
  color: #eadfc4;
  line-height: 1.55;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.product-grid article {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 20px;
  border-left: 5px solid #315f50;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.product-grid strong {
  color: #4b0f0b;
  font-size: 1.18rem;
}

.product-grid span {
  color: #5a5049;
  line-height: 1.58;
}

/* Institutional redesign pass: grounded sections, restrained cards, persistent footer. */
body {
  background: #f3efe6;
  color: #3f3934;
}

body::before {
  background:
    linear-gradient(90deg, rgba(113, 22, 16, 0.05) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, #f8f4eb 0%, #eee6d7 58%, #e4dac8 100%);
  background-size: 100% 100%, 100% 100%;
}

.page-bg {
  display: none;
}

.institutional-bar {
  background: #4b0f0b;
}

.institutional-wrap {
  padding: 8px 0;
}

.topbar {
  align-items: stretch;
  min-height: 74px;
  margin-top: 0;
  padding: 0;
  border-bottom: 1px solid rgba(113, 22, 16, 0.18);
  background: rgba(248, 244, 235, 0.9);
}

.brand {
  padding: 12px 0;
}

.brand-mark,
.brand-mark-wide,
.button,
.metric-card,
.hero-panel,
.status-card,
.feature-card,
.control-panel,
.viewer-stage,
.quick-link,
.gateway-card,
.faculty-card,
.highlight-link,
.flow-step,
.info-card,
.subpage-hero,
.viewer-preview-frame,
.map-frame,
.issue-card,
.risk-card,
.case-timeline,
.case-timeline article,
.grd-callout,
.repository-filter,
.repository-panel,
.repository-card,
.repository-empty {
  border-radius: 8px;
}

.nav {
  background: #7f231d;
  border-radius: 0;
}

.nav a {
  letter-spacing: 0;
}

.hero-slider,
.subpage-hero {
  margin-top: 24px;
  border: 1px solid rgba(73, 15, 11, 0.22);
  border-top: 8px solid #4f8a72;
  border-radius: 0;
  box-shadow: none;
}

.hero-slider {
  min-height: 620px;
}

.hero-slide,
.hero-content,
.subpage-hero-content {
  min-height: 620px;
}

.subpage-hero,
.subpage-hero-content {
  min-height: 360px;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(35, 12, 10, 0.88) 0%, rgba(35, 12, 10, 0.65) 50%, rgba(35, 12, 10, 0.15) 100%),
    linear-gradient(0deg, rgba(35, 12, 10, 0.38), transparent 52%);
}

.hero-content,
.subpage-hero-content {
  padding: 56px 42px;
}

h1,
h2,
.section-heading h2,
.feature-card h2,
.status-card h2,
.news-card h3,
.faculty-card h3,
.issue-card h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 38ch;
}

.lead {
  color: rgba(255, 249, 238, 0.92);
}

.hero-slider h1,
.hero-slider .lead,
.subpage-hero h1,
.subpage-hero .lead {
  text-shadow: 0 2px 12px rgba(23, 7, 5, 0.55), 0 1px 3px rgba(23, 7, 5, 0.35);
}

.button {
  min-height: 44px;
  border-radius: 6px;
}

.button-primary {
  background: #315f50;
  box-shadow: none;
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.14);
}

.metrics-strip,
.status-strip,
.content-grid,
.gateway-section,
.portal-section,
.repository-layout,
.viewer-layout,
.grd-intro-grid {
  margin-top: 28px;
}

.institutional-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(49, 95, 80, 0.22);
  border-top: 0;
  background: #f8f4eb;
}

.institutional-summary article {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
  border-right: 1px solid rgba(49, 95, 80, 0.18);
}

.institutional-summary article:last-child {
  border-right: 0;
}

.institutional-summary span,
.footer-kicker {
  color: #315f50;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.institutional-summary strong {
  color: #4b0f0b;
  line-height: 1.35;
}

.metric-card,
.quick-link,
.faculty-card,
.highlight-link,
.risk-card,
.repository-filter,
.repository-panel,
.repository-card,
.repository-empty {
  border-color: rgba(73, 15, 11, 0.14);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.status-card,
.feature-card,
.control-panel,
.viewer-stage,
.news-card,
.issue-card {
  border-color: rgba(73, 15, 11, 0.16);
  background: #5f1914;
  box-shadow: none;
}

.accent-card,
.grd-callout {
  background: #315f50;
  box-shadow: none;
}

.gateway-card {
  min-height: 300px;
  box-shadow: none;
}

.gateway-card:hover,
.quick-link:hover,
.status-card:hover,
.feature-card:hover,
.news-card:hover,
.faculty-card:hover,
.highlight-link:hover,
.issue-card:hover {
  transform: none;
  box-shadow: none;
}

.quick-link::before,
.status-card::before,
.feature-card::before,
.news-card::before,
.faculty-card::before,
.highlight-link::before,
.issue-card::before,
.accent-card::before {
  content: none;
}

.section-heading {
  align-items: start;
  padding: 0 0 12px;
  border-bottom: 2px solid rgba(49, 95, 80, 0.22);
}

.section-note {
  max-width: 42ch;
  text-align: right;
}

.quick-links-visual,
.content-grid-bottom,
.viewer-shell,
.revista-shell,
.grd-shell,
.repository-shell {
  padding-bottom: 0;
  margin-bottom: 0;
}

.compact-list li {
  color: #f1e6cf;
}

.field-hint,
.source-chip {
  border-radius: 6px;
}

.site-footer {
  margin-top: 56px;
  border-top: 8px solid #315f50;
  background: #3d0e0b;
  color: #f8f4eb;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr) minmax(180px, 0.45fr);
  gap: 28px;
  padding: 34px 0;
}

.footer-identity h2 {
  max-width: 16ch;
  margin-top: 8px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.08;
}

.footer-identity p,
.footer-contact p {
  margin: 12px 0 0;
  color: #eadfc4;
  line-height: 1.6;
}

.footer-contact {
  display: grid;
  gap: 14px;
}

.footer-contact p {
  margin: 0;
}

.footer-contact span {
  display: block;
  color: #d8c89f;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.footer-contact strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  line-height: 1.4;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-links a {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8f4eb;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
}

@media (max-width: 980px) {
  .hero-home,
  .content-grid,
  .viewer-layout,
  .gateway-grid,
  .grd-intro-grid,
  .institutional-summary,
  .research-focus,
  .research-grid,
  .research-workflow,
  .product-grid,
  .footer-grid,
  .repository-layout {
    grid-template-columns: 1fr;
  }

  .metrics-strip,
  .faculty-grid,
  .highlight-links,
  .risk-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card-wide {
    grid-column: auto;
  }

  .news-card-feature {
    grid-column: auto;
  }

  .repository-filter {
    position: static;
  }

  .institutional-summary article {
    border-right: 0;
    border-bottom: 1px solid rgba(49, 95, 80, 0.18);
  }

  .institutional-summary article:last-child {
    border-bottom: 0;
  }

  .research-focus article {
    border-right: 0;
    border-bottom: 1px solid rgba(49, 95, 80, 0.18);
  }

  .research-focus article:last-child {
    border-bottom: 0;
  }

  .section-note {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .topbar,
  .viewer-header {
    align-items: start;
    flex-direction: column;
  }

  .institutional-lockup {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .institutional-logo-web {
    width: min(260px, 100%);
    height: auto;
  }

  .institutional-copy {
    max-width: 100%;
  }

  .nav {
    width: 100%;
    min-height: auto;
    padding: 6px;
  }

  .nav-item {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .nav-dropdown {
    position: static;
    display: flex;
    min-width: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(73, 23, 28, 0.65);
  }

  .nav a {
    padding: 12px 10px;
  }

  .hero-slider,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding: 42px 20px 54px;
  }

  .subpage-hero,
  .subpage-hero-content {
    min-height: 360px;
  }

  .subpage-hero-content {
    padding: 28px 20px;
  }

  .hero-slider-controls {
    right: 20px;
    left: auto;
  }

  .shell {
    width: min(100% - 20px, 1180px);
  }

  .hero,
  .status-card,
  .feature-card,
  .control-panel,
  .viewer-stage {
    padding: 20px;
    border-radius: 8px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .metrics-strip,
  .faculty-grid,
  .highlight-links,
  .gateway-grid,
  .risk-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.05rem;
    line-height: 1.08;
    max-width: 100%;
  }

  .gateway-card {
    min-height: 280px;
  }

  .case-timeline article,
  .repository-card {
    grid-template-columns: 1fr;
  }

  .research-workflow li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .grd-callout,
  .repository-panel-header {
    align-items: start;
    flex-direction: column;
  }

  .repository-card-side {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid rgba(113, 22, 16, 0.14);
  }
}

/* ==========================================================================
   Page Transitions — cascading reveal
   ========================================================================== */

@keyframes contentReveal {
  from {
    opacity: 0.45;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sectionReveal {
  from {
    opacity: 0.3;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes footerReveal {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}

/* Main container — starts mostly visible, settles in gently */
main {
  animation: contentReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Staggered cascade on direct children of main */
main > *:nth-child(1) { animation: sectionReveal 0.5s 0.03s cubic-bezier(0.22, 1, 0.36, 1) both; }
main > *:nth-child(2) { animation: sectionReveal 0.5s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both; }
main > *:nth-child(3) { animation: sectionReveal 0.5s 0.13s cubic-bezier(0.22, 1, 0.36, 1) both; }
main > *:nth-child(4) { animation: sectionReveal 0.5s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both; }
main > *:nth-child(5) { animation: sectionReveal 0.5s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both; }
main > *:nth-child(n+6) { animation: sectionReveal 0.5s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Footer — subtle fade, no movement */
.site-footer {
  animation: footerReveal 0.4s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  main,
  main > *,
  .site-footer {
    animation: none !important;
  }
}


