/* Lenz group website: shared stylesheet */

:root {
  --blue: #456487;        /* primary: nav, headings, links */
  --blue-dark: #2c4562;   /* hover, text on cyan */
  --cyan: #62c4dd;        /* accent: banner, highlights */
  --cyan-light: #e8f6fa;  /* subtle backgrounds */
  --text: #1f2933;
  --muted: #5b6672;
  --border: #dde3e8;
  --bg: #ffffff;
  --radius: 8px;
  --content: 64rem;       /* page width */
  --measure: 42rem;       /* comfortable line length for prose */
  font-size: 106.25%;     /* 17px base */
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  color: var(--blue);
  line-height: 1.25;
  font-weight: 650;
}
h1 { font-size: 2rem; margin: 0 0 .5em; }
h2 { font-size: 1.45rem; margin: 2.2em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 1.4em 0 .3em;
}

p { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--blue); text-decoration-color: rgba(69, 100, 135, .35); text-underline-offset: .15em; }
a:hover { color: var(--blue-dark); text-decoration-color: currentColor; }

.container {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Navigation (sits inside the banner) ---------- */

.site-nav .container {
  display: flex;
  justify-content: flex-end;
  padding-top: .6rem;
  padding-bottom: .6rem;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav ul a {
  display: block;
  padding: .35rem .7rem;
  border-radius: 6px;
  color: var(--blue-dark);
  text-decoration: none;
  font-size: .95rem;
}
.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] { background: rgba(255, 255, 255, .3); color: var(--blue-dark); }

/* ---------- Banner ---------- */

.banner {
  background: var(--cyan) url("figures/medley.png") center / cover no-repeat;
  color: var(--blue-dark);
  padding: 0 0 3rem;
}
.banner > .container { padding-top: 2.2rem; }
.banner h1 { color: var(--blue-dark); font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: .3em; }
.banner p { font-size: 1.1rem; margin: 0; max-width: 46rem; }
.banner a { color: var(--blue-dark); text-decoration-color: rgba(44, 69, 98, .5); }

.page-banner { padding-bottom: 1.6rem; }
.page-banner > .container { padding-top: 1.2rem; }
.page-banner h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.3rem); }

/* ---------- Main content ---------- */

main { padding: 2.5rem 0 3rem; }
.lead { font-size: 1.15rem; color: var(--text); max-width: var(--measure); }
.note { color: var(--muted); font-size: .95rem; }

/* Research theme cards (home page) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--cyan); box-shadow: 0 4px 14px rgba(31, 41, 51, .08); color: var(--text); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: .6rem; background: #fff; border-bottom: 1px solid var(--border); }
.card span { display: block; padding: .75rem .9rem; font-weight: 600; color: var(--blue); line-height: 1.35; }

/* Research projects */
.project {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
.project:first-of-type { border-top: 0; }
.project h2 { grid-column: 1 / -1; margin: 0; }
.project figure { margin: 0; }
.project figure img { border-radius: var(--radius); }
.project figcaption { font-size: .88rem; color: var(--muted); margin-top: .6rem; line-height: 1.45; }
.project .body > :first-child { margin-top: 0; }
.project ul.refs { list-style: none; padding: 0; margin: 0; }
.project ul.refs li { margin: 0 0 .3em; }

/* Page intro with funding panel beside it */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: start;
}
.funding, .side-panel {
  padding-left: 2rem;
  border-left: 1px solid var(--border);
}
.funding h4, .side-panel h4 { margin: 0 0 .6rem; font-size: .7rem; }
.intro > div > h2:first-child { margin-top: 0; }

/* Logos are shown at their native pixel size, never enlarged */
.logos {
  display: grid;
  grid-template-columns: repeat(4, 50px);
  gap: .5rem .9rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
}
.logos:last-child { margin-bottom: 0; }
.logos li { height: 50px; display: flex; align-items: center; justify-content: center; }
.logos img { width: auto; height: auto; max-width: none; }
.logos a { transition: opacity .15s; }
.logos a:hover { opacity: .7; }

/* Lists of links (links, teaching, PhysBioPS pages) */
.link-list { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.link-list li { margin: 0 0 .35em; }
main ol li, main ul:not([class]) li { margin-bottom: .3em; }

/* Topic grouping several projects (past research) */
.topic { border-top: 1px solid var(--border); padding-top: 2rem; }
.topic > h2 { margin-top: 0; }
.project.sub { border-top: 0; padding: 1.2rem 0; }
.project .body h3:first-child { margin-top: 0; }

/* Publications */
.preprint-links { display: flex; flex-direction: column; gap: .5rem; margin: 0; }
.preprint-links a {
  display: block;
  text-align: center;
  padding: .2rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.preprint-links a.arXiv { background: #b31b1b; color: #fff; }
.preprint-links a.arXiv:hover { background: #68645b; }
.preprint-links a.bioRxiv { font-family: Georgia, serif; color: #000; border: 1px solid #000; }
.preprint-links a.bioRxiv:hover { border-color: #bb2632; }
.preprint-links a.bioRxiv span { color: #bb2632; }
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { margin: 0 0 1.3em; max-width: 48rem; }
.pubs a.dark { color: var(--blue-dark); text-decoration: none; }
.pubs a.dark:hover { text-decoration: underline; }

/* People */
.group-photo { width: 100%; border-radius: var(--radius); margin-bottom: 1rem; }
.people-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.person { display: flex; gap: 1rem; align-items: flex-start; }
.person img { width: 6rem; height: 6rem; object-fit: cover; border-radius: var(--radius); flex: none; }
.person h3 { margin: 0 0 .2em; font-size: 1.05rem; }
.person h3 a { font-size: .85rem; font-weight: 400; }
.person p { margin: 0; font-size: .92rem; color: var(--muted); }
.alumni .person img { width: 4.5rem; height: 4.5rem; }

/* CV */
table.cv { border-collapse: collapse; width: 100%; max-width: 48rem; margin-bottom: 1rem; }
table.cv td { padding: .35rem 0; vertical-align: top; border-bottom: 1px solid var(--border); }
table.cv td:first-child { width: 8rem; padding-right: 1rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */

.site-footer {
  background: #f4f7f9;
  border-top: 1px solid var(--border);
  font-size: .92rem;
  color: var(--muted);
  padding: 2rem 0;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
}
.site-footer p { margin: 0; }
.site-footer strong { color: var(--text); }

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  .intro { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; }
  .funding, .side-panel { padding: 1.2rem 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .preprint-links { flex-direction: row; flex-wrap: wrap; }
  .people-grid { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(auto-fill, 50px); }
  .project { grid-template-columns: 1fr; gap: 1rem; }
  .project figure { max-width: 24rem; }
  table.cv td:first-child { width: 6.5rem; }
  .banner { padding-bottom: 2rem; }
  .banner > .container { padding-top: 1.2rem; }
  .site-nav .container { justify-content: flex-start; }
  main { padding-top: 1.8rem; }
}
