/* Overrides for Simple.css. Keep this file small. */

/* Long emails and URLs must never force horizontal scrolling at 360px */
main, footer {
  overflow-wrap: anywhere;
}

/* Colors: replace Simple.css's blue. Change these to restyle the whole site. */
:root {
  --accent: #0b6b5d;
  --accent-hover: #084c42;
  --accent-bg: #f6f6f3;
  --border: #cfcfca;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #5fd0bd;
    --accent-hover: #a6e8dc;
    --border: #444;
  }
}

/* Header: lab name on the left, nav on the right, both lined up with the page column */
body > header {
  background: none;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 1.25rem calc((100% - min(45rem, 90%)) / 2);
}
.site-name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}
.site-name a {
  color: var(--text);
  text-decoration: none;
}
body > header nav {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
header nav a,
header nav a:visited {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin: 0;
  padding: 0 0 0.1rem;
}
header nav a:hover,
header nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
}
/* Smaller headings than Simple.css (3 / 2.6 / 2 / 1.44 rem) */
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link, visible only when focused */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: var(--standard-border-radius);
  z-index: 10;
}
.skip-link:focus {
  top: 0.5rem;
}

/* Footer links in a row */
.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
}

/* News and publication lists */
.news, .pubs, .alumni {
  list-style: none;
  padding: 0;
}
.news li, .pubs li, .alumni li {
  margin-bottom: 0.75rem;
}
.news li > p {
  display: inline;
  margin: 0;
}
.news time {
  color: var(--text-light);
  margin-right: 0.5rem;
  white-space: nowrap;
}

/* People cards: auto-fill grid, one column on narrow phones */
.cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}
.card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}
.card h3 {
  margin: 0;
  font-size: 1.1rem;
}
.card p {
  margin: 0;
}
.card .photo {
  width: 100%;
  max-width: 10rem;
  align-self: center;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--standard-border-radius);
}
.card .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  color: var(--text-light);
  font-size: 2rem;
  font-weight: 700;
}
.card .links {
  list-style: none;
  padding: 0;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.75rem;
}
