:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #dbe3ec;
  --accent: #b91c1c;
  --accent-dark: #7f1d1d;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --max: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.hero {
  min-height: 42vh;
  background:
    linear-gradient(rgba(20, 22, 30, 0.62), rgba(20, 22, 30, 0.76)),
    url("https://rfnajera.github.io/assets/images/measles_header.png") center/cover no-repeat;
  color: #fff;
  display: grid;
  align-items: end;
}

.hero-overlay { padding: 4rem 0 2.5rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.hero-eyebrow,
.hero .lede,
.hero-meta,
.hero h1 { color: #fff; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
}

.lede {
  max-width: 760px;
  font-size: 1.08rem;
  margin: 0 0 1rem;
}

.hero-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}

.button:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

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

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.section-head h2,
.sidebar h2 {
  margin: 0;
  font-size: 1.4rem;
}

.small-note {
  color: var(--muted);
  max-width: 320px;
  font-size: 0.9rem;
}

.toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.toolbar input,
.toolbar select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  background: #fff;
}

.toolbar input { flex: 1 1 280px; }

.status {
  color: var(--muted);
  margin-bottom: 1rem;
}

.news-grid {
  display: grid;
  gap: 1rem;
}

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

.news-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.news-card p { margin: 0.4rem 0 0; }

.news-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: #fee2e2;
  color: var(--accent-dark);
}

.badge.academic {
  background: #e0ecff;
  color: #1d4ed8;
}

.badge.news {
  background: #ecfccb;
  color: #3f6212;
}

.fact-list,
.link-list {
  padding-left: 1.1rem;
  margin: 0.5rem 0 0;
}

.site-footer {
  background: #111827;
  color: #fff;
  padding: 1.25rem 0;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .section-head {
    flex-direction: column;
    align-items: start;
  }
}
