:root {
  --tia-navy: #16324a;
  --tia-navy-deep: #18354f;
  --tia-gold: #d7a343;
  --tia-gold-deep: #b88427;
  --tia-white: #f6f7f8;
  --tia-text: #1f2a33;
  --tia-muted: #d8dee5;
  --tia-max-width: 1200px;
  --tia-radius: 12px;
  --tia-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  --tia-font: "Segoe UI", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--tia-font);
  color: var(--tia-text);
  background: #eef2f6;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* HEADER */

.site-hero {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(rgba(18, 39, 58, 0.22), rgba(18, 39, 58, 0.34)),
    url("/assets/images/hero-bg-desktop.jpg") center / cover no-repeat;
  color: #fff;
}

.site-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(12, 28, 43, 0.30) 0%,
    rgba(12, 28, 43, 0.14) 42%,
    rgba(12, 28, 43, 0.06) 68%,
    rgba(12, 28, 43, 0.14) 100%
  );
}

.site-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--tia-max-width);
  margin: 0 auto;
  padding: 20px 24px 8px;
}

.site-hero__content {
  max-width: 760px;
}

.site-title {
  margin: 0 0 6px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.site-subtitle {
  margin: 0 0 6px;
  font-size: 1.3rem;
  color: #f0c86f;
}

.site-tagline {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.site-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.site-hero__kicker {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #f0c86f;
}

/* SECTIONS (FIXED ROOT CAUSE) */

.section-light,
.section-dark,
.page-section {
  padding: 8px 20px 12px; /* reduced top padding */
}

.page-shell {
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  padding: 14px 20px; /* reduced top padding */
  border-radius: var(--tia-radius);
  box-shadow: var(--tia-shadow);
}

.page-shell h1 {
  margin: 0 0 10px;
  text-align: center;
}

.page-shell h2 {
  margin: 0 0 8px; /* key fix */
}

.page-shell h3 {
  margin: 0 0 6px;
}

.page-shell p {
  margin: 0 0 10px;
}

.page-shell p:last-child {
  margin-bottom: 0;
}

/* LAYOUT */

.card-grid {
  display: grid;
  gap: 12px;
}

.card-grid--three {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.path-card,
.event-card {
  background: #fff;
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* LIBRARY */

.library-search {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.library-search input {
  flex: 1;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #cfd6df;
  border-radius: 8px;
  font: inherit;
}

.library-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.library-topics a {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f6;
  font-size: 0.9rem;
}

/* THEMES */

.theme-list {
  margin: 0;
  padding-left: 18px;
}

.theme-list li + li {
  margin-top: 4px;
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
}

.btn-primary {
  background: #215786;
  color: #fff;
}

.btn-secondary {
  background: #d7a343;
  color: #fff;
}

/* RESEARCHER */

.section-researcher img {
  width: 200px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* FOOTER */

.site-footer {
  position: relative;
  margin-top: 20px;
  color: #fff;
  background:
    linear-gradient(rgba(18, 39, 58, 0.40), rgba(18, 39, 58, 0.62)),
    url("/assets/images/footer-bg-desktop.jpg") center / cover no-repeat;
}

.site-footer__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 28, 43, 0.08) 0%,
    rgba(12, 28, 43, 0.24) 100%
  );
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--tia-max-width);
  margin: 0 auto;
  padding: 20px 20px 14px;
}

.site-footer__brand {
  margin-bottom: 10px;
}

.site-footer__title {
  margin: 0 0 4px;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 800;
  text-transform: uppercase;
}

.site-footer__tag {
  margin: 0;
  font-size: 0.9rem;
  color: #f0c86f;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
}

.site-footer__bottom p {
  margin: 0;
}

.site-footer__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer__meta a:hover,
.site-footer__meta a:focus {
  text-decoration: underline;
}

/* MOBILE */

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-hero {
    min-height: 220px;
    background:
      linear-gradient(rgba(18, 39, 58, 0.24), rgba(18, 39, 58, 0.36)),
      url("/assets/images/hero-bg-mobile.jpg") center / cover no-repeat;
  }

  .site-hero__inner {
    padding: 16px 14px 6px;
  }

  .site-hero__actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .section-light,
  .section-dark,
  .page-section {
    padding: 6px 14px 10px;
  }

  .page-shell {
    padding: 12px 14px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}