:root {
  --text: #1f2933;
  --muted: #667085;
  --border: #e5e7eb;
  --background: #ffffff;
  --accent: #4b9cd3;
  --link: #2c6fa6;
  --amber: #de9a2e;
  --tint: #f5f9fc;
  --max-width: 920px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--link);
  text-decoration-color: rgba(75, 156, 211, 0.45);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: currentColor;
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

header {
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
}

nav {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.site-name {
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
  padding: 0;
  margin: 0;
}

nav a {
  text-decoration: none;
}

nav ul a {
  color: var(--muted);
}

nav ul a:hover {
  color: var(--text);
}

.hero {
  padding: 28px 0 10px;
  /* the header already draws a bottom border; skip the section rule's top one */
  border-top: none;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
  max-width: 800px;
}

.hero p {
  font-size: 1.35rem;
  color: var(--muted);
  max-width: 760px;
  margin: 0;
}

.affiliation {
  margin-top: 12px;
  font-size: 1rem !important;
}

.hero .intro {
  margin-top: 10px;
}

.hero .intro p {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0 0 12px;
}

.hero .news {
  font-size: 1rem;
  margin: 0 0 12px;
}

.hero .news a {
  color: var(--link);
}

section {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

/* the hero banner ends in its own horizontal rule, so the section border
   below it would read as a duplicate */
#research {
  border-top: none;
  background: var(--tint);
}

#collaborators {
  background: var(--tint);
}

.hero .news strong {
  color: #b06f12;
}

h2 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

h2::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) 60%, var(--amber) 60%);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.research-item h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.research-item p {
  margin: 0;
  color: var(--muted);
}

.research-papers {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.research-papers li + li {
  margin-top: 2px;
}

.research-more {
  margin: 12px 0 0;
}

.about-text {
  max-width: 760px;
  font-size: 1.08rem;
}

.about-text p {
  margin: 0 0 10px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  color: var(--text);
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
}

.button:hover {
  border-color: var(--accent);
  background: var(--tint);
}

.hero-banner {
  margin-top: 16px;
}

/* the cropped banner is wide and short; let phones crop less of it */
.lab-banner.hero-banner {
  min-height: 90px;
}

.section-divider {
  /* hug the section this closes, so it doesn't read as the next one's banner */
  margin-top: 12px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 14px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  nav {
    min-height: 48px;
    gap: 16px;
  }

  nav ul {
    gap: 16px;
    flex-wrap: wrap;
  }

  .hero {
    padding: 20px 0 12px;
  }

  .hero-banner {
    margin-top: 12px;
  }

  .section-divider {
    margin-top: 12px;
  }

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