/* ---------------------------------------------------------------
   Site styles. Colors and fonts are set once here, then used below.
   --------------------------------------------------------------- */
:root {
  --text: #7d7c7c;        /* body text */
  --title: #615858;       /* name at the top */
  --nav: #8c8c8c;         /* menu links */
  --nav-active: #a6a6a6;  /* menu link for the current page */
  --heading: #757575;     /* page and section headings */
  --link: #1e7a7a;        /* links in page text */
  --link-hover: #28a3a3;
  --footer: #5dabab;
  --rule: #e3e2e2;        /* thin divider lines */
  --background: #ffffff;

  --font-display: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: Helvetica, "Helvetica Neue", Arial, sans-serif;
  --column: 735px;        /* width of the main column */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Header: name + menu ---------- */
.site-header {
  text-align: center;
  padding: 36px 16px 0;
}

.site-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  color: var(--title);
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
}

.site-nav a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 18px;
  color: var(--nav);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.selected { color: var(--nav-active); }

/* ---------- Main column ---------- */
.content {
  flex: 1;
  width: 100%;
  max-width: min(var(--column), 100%);
  margin: 0 auto;
  padding: 28px 16px 48px;
}

/* Keep the home image within the screen height, like the old site. */
@media (max-height: 1050px) and (min-width: 600px) {
  .home .content { max-width: max(70vh, 420px); }
}

.content h2,
.content h3 {
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--heading);
  line-height: 1.3;
}

/* Page names are in the menu already, so the heading is hidden on screen
   but still read aloud by screen readers and used by search engines. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.content h2 { font-size: 22px; margin: 2.2em 0 0.5em; }
.content h3 { font-size: 18px; margin: 1.6em 0 0.4em; }
.visually-hidden + h2 { margin-top: 0; }

.content p, .content ul, .content ol { margin: 0 0 1em; }
.content li { margin-bottom: 0.35em; }

.content a { color: var(--link); text-decoration: none; }
.content a:hover { color: var(--link-hover); text-decoration: underline; }

.content strong { color: #6a6969; }

.content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5em 0;
}

/* Images fill the column width but never stretch past their real size. */
.content img {
  display: block;
  max-width: 100%;
  max-height: 75vh;   /* tall photos stay on screen */
  width: auto;
  height: auto;
  margin: 0 auto 1em;
}

/* A short, centered line of text, e.g. the tagline on the home page. */
.tagline {
  text-align: center;
  color: #4f4e4e;
  font-size: 15px;
  margin-bottom: 1.2em;
}

/* Small italic text under a photo. */
.caption {
  font-size: 14px;
  font-style: italic;
  text-align: center;
  margin-top: -0.4em;
}

/* Embedded videos keep a 16:9 shape at any width. */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0 0 1em;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Lists of people (group page) ---------- */
.people { list-style: none; padding: 0; }
.people li { margin-bottom: 0.2em; line-height: 1.45; }

/* ---------- Publications (science page) ---------- */
.pubs { list-style: none; padding: 0; }
.pubs li { margin-bottom: 1em; }

/* ---------- Resource & tool entries ---------- */
.entry {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0 24px;
  align-items: start;
  padding: 1.6em 0;
  border-top: 1px solid var(--rule);
}
.entry:not(:has(> p > img)) { grid-template-columns: 1fr; }
.entry:last-of-type { border-bottom: 1px solid var(--rule); }
.entry img { margin: 0.3em 0 0; }
.entry h2 { margin-top: 0; }
.entry p:last-child { margin-bottom: 0; }

@media (max-width: 599px) {
  .entry { grid-template-columns: 1fr; }
  .entry img { margin: 0 0 1em; }
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  font-size: 12px;
  color: var(--footer);
  padding: 0 16px 28px;
}

/* ---------- Phones ---------- */
@media (max-width: 599px) {
  .site-header { padding-top: 24px; }
  .site-title { font-size: 30px; }
  .site-nav a { font-size: 16px; }
  body { font-size: 16px; }
}
