/* ==========================================================================
   Heath Lab site styles (version 2)
   Colors come from the lab's tree figure: deep teal branches, coral nodes.
   Change the colors and fonts here; everything else picks them up.
   ========================================================================== */
:root {
  --teal-900: #0b3b3f;   /* footer */
  --teal-700: #0f5e63;   /* headings, buttons */
  --teal-500: #1f8a8a;   /* links */
  --teal-100: #dcefed;   /* soft tint */
  --teal-050: #eff7f6;
  --coral:    #e0643c;   /* accents */
  --sand:     #f6f2ea;   /* page title band */

  --ink: #1c2a2d;
  --muted: #5d6b6e;
  --rule: #e3e6e3;
  --bg: #fcfbf8;
  --card: #ffffff;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Figtree", "Inter", system-ui, sans-serif;
  --max: 1120px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 42, .06), 0 6px 20px rgba(16, 40, 42, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; } /* keeps jump-link targets clear of the sticky menu bar */
body {
  margin: 0; font-family: var(--font-body); font-size: 1.02rem; line-height: 1.7;
  color: var(--ink); background: var(--bg);
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--teal-500); text-decoration: none; }
a:hover { color: var(--teal-700); text-decoration: underline; text-underline-offset: 3px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--teal-900); line-height: 1.2; letter-spacing: -.01em; }

/* ---------- Header ---------- */
.site-header { background: rgba(252, 251, 248, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.nav-bar { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--teal-700); }
.brand:hover { text-decoration: none; color: var(--teal-700); }
.brand-mark { width: 44px; height: auto; color: var(--teal-700); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-head); font-size: 1.2rem; color: var(--teal-900); }
.brand-text small { font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.site-nav a, .dropdown-toggle {
  display: block; padding: .5rem .8rem; color: var(--ink); font: inherit; font-size: .95rem; font-weight: 500;
  background: none; border: 0; cursor: pointer; border-radius: 8px;
}
.site-nav a:hover, .dropdown-toggle:hover { background: var(--teal-050); color: var(--teal-700); text-decoration: none; }
.nav-main > li > a.active { color: var(--teal-700); box-shadow: inset 0 -2px 0 var(--coral); border-radius: 0; }
.dropdown { position: relative; }
.dropdown-toggle::after { content: ""; display: inline-block; margin-left: .4em; vertical-align: .2em;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.dropdown-menu {
  display: none !important; position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px;
  flex-direction: column; align-items: stretch !important; background: var(--card); border: 1px solid var(--rule);
  border-radius: 12px; padding: .4rem; box-shadow: var(--shadow);
}
.dropdown.open .dropdown-menu { display: flex !important; }
@media (hover: hover) and (min-width: 881px) {
  .dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: flex !important; }
  .dropdown::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; } /* hover bridge */
}
.dropdown-menu a.active { color: var(--teal-700); background: var(--teal-050); }
.dropdown-header { padding: .6rem .8rem .15rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--coral); font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: 8px; padding: 8px 9px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--teal-700); margin: 4px 0; }
@media (max-width: 880px) {
  .nav-bar { flex-wrap: wrap; }
  .brand { flex: 1 1 0; min-width: 0; }
  .brand-text small { font-size: .72rem; line-height: 1.25; }
  .nav-toggle { display: block; }
  .site-nav { display: none; flex-basis: 100%; margin: 0; padding-bottom: 1rem; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .dropdown-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 .75rem; background: none; }
  .nav-main > li > a.active { box-shadow: inset 3px 0 0 var(--coral); }
}

/* ---------- Page title band ---------- */
.page-band { background: var(--sand); border-bottom: 1px solid var(--rule); padding: 3rem 0 2.25rem; }
.page-band h1 { font-size: 2.6rem; margin: 0; }
.page-band h1::after { content: ""; display: block; width: 48px; height: 4px; background: var(--coral); border-radius: 2px; margin-top: .8rem; }
.page-band .subtitle { margin: .9rem 0 0; font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.page-body { padding-top: 2.5rem; padding-bottom: 4rem; }

/* ---------- Prose (Markdown pages) ---------- */
.prose > p, .prose > ul, .prose > ol, .prose > blockquote { max-width: 72ch; }
.prose > h2 { font-size: 1.6rem; margin: 2.75rem 0 .75rem; }
.prose > h3 { font-size: 1.35rem; margin: 2.5rem 0 .6rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.prose > h3:first-child, .prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose.plain > h3 { border-top: 0; padding-top: 0; margin-top: 2rem; } /* pages with plain_headings: true */
.prose > h4 { font-size: 1.05rem; margin: 1.75rem 0 .4rem; color: var(--teal-700); }
.prose li { margin-bottom: .35rem; }
.prose img { border-radius: 10px; }
.prose .figure { margin: 2.5rem 0 1rem; max-width: 72ch; }
.prose .figure img { display: block; width: 100%; border-radius: 0; }
.prose .figure figcaption { margin-top: 1rem; font-size: .92rem; line-height: 1.6; color: var(--muted); }
.prose .figure figcaption strong { color: var(--ink); }
.prose blockquote { margin: 1.5rem 0; padding: .5rem 1.25rem; border-left: 3px solid var(--coral); background: var(--card); border-radius: 0 10px 10px 0; color: var(--muted); }
.prose code { background: var(--teal-050); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* ---------- Buttons and chips ---------- */
.btn { display: inline-block; background: var(--teal-700); color: #fff; padding: .7rem 1.3rem; border-radius: 10px; font-weight: 600; border: 2px solid var(--teal-700); }
.btn:hover { background: var(--teal-900); border-color: var(--teal-900); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--teal-700); }
.btn-ghost:hover { background: var(--teal-050); color: var(--teal-700); border-color: var(--teal-700); }
.chip { display: inline-block; padding: .25rem .8rem; border: 1px solid var(--rule); background: var(--card); border-radius: 999px; font-size: .9rem; font-weight: 500; color: var(--teal-700); }
.chip:hover { border-color: var(--teal-500); text-decoration: none; }
.chip-sm { font-size: .8rem; padding: .05rem .6rem; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }

/* ---------- Home ---------- */
.hero { background: linear-gradient(180deg, var(--teal-050), var(--bg)); padding: 4rem 0 1.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3.5rem; align-items: center; }
.eyebrow { margin: 0 0 .8rem; font-size: .85rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--coral); }
.hero h1 { font-size: clamp(2rem, 3.2vw, 2.6rem); margin: 0 0 1.25rem; }
.intro p { margin: 0 0 1rem; color: #33444a; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-art { margin: 0; background: var(--card); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.hero-art img { display: block; width: 100%; }

.pi-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3.5rem; align-items: center; margin-top: 1rem; }
.pi-card { display: flex; gap: 1.75rem; align-items: center; }
.pi-card > img { width: 132px; height: 132px; object-fit: cover; border-radius: 50%; border: 4px solid var(--card); box-shadow: var(--shadow); flex: none; }
.pi-card .label { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.pi-card h2 { margin: .1rem 0 .4rem; font-size: 1.7rem; }
.pi-positions { list-style: none; margin: 0 0 .9rem; padding: 0; color: var(--muted); }
.pi-positions p { margin: 0; }

.explore { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3.5rem; }
.explore-card { position: relative; display: block; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.3rem 1.3rem 2.6rem; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.explore-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--teal-100); color: var(--ink); }
.explore-card h3 { margin: 0 0 .35rem; font-size: 1.2rem; color: var(--teal-700); }
.explore-card p { margin: 0; font-size: .93rem; color: var(--muted); line-height: 1.55; }
.explore-card .arrow { position: absolute; left: 1.3rem; bottom: .9rem; color: var(--coral); font-weight: 600; }

.recent { margin-top: 4rem; margin-bottom: 4rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--rule); padding-bottom: .6rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; font-size: 1.6rem; }
.lab-photo { margin: 0; }
.lab-photo img { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.lab-photo a { display: block; border-radius: var(--radius); }
.lab-photo a img { transition: transform .15s, box-shadow .15s; }
.lab-photo a:hover img { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,40,42,.08), 0 12px 28px rgba(16,40,42,.12); }
.lab-photo figcaption { color: var(--muted); font-size: .9rem; margin-top: .6rem; text-align: center; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .pi-row { grid-template-columns: 1fr; gap: 2rem; }
  .explore { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .hero { padding-top: 2.5rem; }
  .explore { grid-template-columns: 1fr; }
  .pi-card { flex-direction: column; align-items: flex-start; }
  .page-band h1 { font-size: 2.1rem; }
}

/* ---------- People ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem; }
.person { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.photo-wrap { aspect-ratio: 1 / 1; background: var(--teal-050); }
.photo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-body { padding: 1rem 1.1rem 1.15rem; }
.person h3 { margin: 0; font-size: 1.15rem; }
.person h3 a { color: inherit; }
.person .role { margin: .1rem 0 .7rem; color: var(--muted); font-size: .93rem; }
.person-links { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; }
.person-links a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--teal-050); color: var(--teal-700); transition: background .15s, color .15s; }
.person-links a:hover { background: var(--teal-700); color: #fff; text-decoration: none; }
.person-links svg { width: 18px; height: 18px; }
.section-title { font-size: 1.8rem; margin: 3.5rem 0 1.25rem; }
.alumni { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.5rem; }
.alumni section { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.alumni h3 { margin: 0 0 .6rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--coral); }
.alumni ul { list-style: none; padding: 0; margin: 0; }
.alumni li { padding: .5rem 0; border-top: 1px solid var(--rule); line-height: 1.45; }
.alumni li:first-child { border-top: 0; }
.alumni .name { font-weight: 600; }
.alumni .now { display: block; color: var(--muted); font-size: .9rem; }
.more { margin-top: 2rem; font-weight: 600; }

/* ---------- Publications ---------- */
.pub-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.5rem; }
#pub-filter { flex: 1 1 320px; font: inherit; padding: .65rem 1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); color: var(--ink); }
#pub-filter:focus { outline: 2px solid var(--teal-100); border-color: var(--teal-500); }
.pub-empty { color: var(--muted); }
.prose > .pub-list { border-top: 1px solid var(--rule); max-width: 900px; }
.pubs.pub-list > li { padding: 1.1rem 0; margin: 0; border-bottom: 1px solid var(--rule); }
.pub-year { display: grid; grid-template-columns: 110px 1fr; gap: 1.5rem; border-top: 1px solid var(--rule); padding: 1.5rem 0 .5rem; }
.pub-year .year { margin: 0; font-size: 1.5rem; color: var(--teal-700); position: sticky; top: 84px; align-self: start; }
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs > li { margin: 0 0 1.4rem; }
.pubs > li > p { margin: 0; }
.pub-title { margin: 0; font-weight: 600; font-size: 1.05rem; line-height: 1.45; }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--teal-700); }
.pub-meta p { margin: .15rem 0 0; color: var(--muted); font-size: .94rem; line-height: 1.55; }
.pub-meta strong { color: var(--ink); font-weight: 600; }
.pub-extras { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .5rem; margin-top: .4rem; font-size: .88rem; }
.note p { margin: 0; color: var(--muted); }
.recent .pubs > li { padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.recent .pubs > li:last-child { border-bottom: 0; }
@media (max-width: 640px) {
  .pub-year { grid-template-columns: 1fr; gap: .5rem; }
  .pub-year .year { position: static; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: #b9d0cf; font-size: .92rem; padding: 3rem 0 2.5rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 2rem; }
.footer-title { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.05rem; margin: 0 0 .5rem; }
.site-footer p { margin: 0; line-height: 1.6; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
