/* Galbraith Lab — shared styles */
:root {
  --ink: #14202e;
  --ink-soft: #3d4b5c;
  --muted: #6a7787;
  --line: #dfe4ea;
  --bg: #ffffff;
  --bg-alt: #f5f7f9;
  --accent: #b5175e;      /* magenta fluorophore */
  --accent-2: #0f8a6d;    /* green fluorophore */
  --hero-bg: #0b1119;
  --max: 1080px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .6em;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 46em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover { background: var(--bg-alt); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 12px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg); color: #fff;
  padding: 96px 0 88px;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero .wrap { position: relative; }
.hero-img {
  position: absolute; top: 0; right: 0; bottom: 0; width: 50%;
  background: url(images/hero-ipalm.jpg?v=4) right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.7) 25%, #000 50%);
          mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.7) 25%, #000 50%);
}
.hero .hero-credit { font-size: .78rem; color: #8d9aab; max-width: 30em; margin: 28px 0 0; }
.hero .hero-credit a { color: #c9d3de; }
@media (max-width: 760px) {
  .hero-img { width: 100%; opacity: .35; -webkit-mask-image: none; mask-image: none; }
}
.hero h1 { max-width: 11em; }
.hero p { color: #c9d3de; font-size: 1.2rem; max-width: 30em; }
.hero .eyebrow { color: #ff7fb5; }
.page-hero { padding: 64px 0 56px; }
.page-hero h1 { margin-bottom: .3em; }

.btn {
  display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: .95rem;
  text-decoration: none; background: var(--accent); color: #fff; margin: 8px 8px 0 0;
}
.btn:hover { background: #8f0f49; color: #fff; }
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,.4); }
.btn.ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
.grid-feature { grid-template-columns: 3fr 2fr; }
@media (max-width: 700px) { .grid-feature { grid-template-columns: 1fr; } }
.card.feature { border-top: 3px solid var(--accent); }
.card.feature h3 { font-size: 1.4rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card .meta { font-size: .9rem; color: var(--muted); margin-bottom: .5em; }
.card .journal { font-style: italic; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; background: #fbe7f0; color: var(--accent); margin-bottom: 12px;
}
.tag.green { background: #e2f4ee; color: var(--accent-2); }
.research-card { border-top: 3px solid var(--accent); }
.research-card:nth-child(even) { border-top-color: var(--accent-2); }
.research-card .leads { font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: -.2em 0 .8em; }
.research-card .funding { font-size: .88rem; color: var(--muted); margin: 0; }

/* ---------- Video ---------- */
.video-row { display: grid; grid-template-columns: 3fr 2fr; gap: 32px; align-items: center; margin-top: 40px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) { .video-row { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- People ---------- */
.pi { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: start; }
.avatar {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #5a2a8a);
  color: #fff; display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; object-fit: cover;
}
.pi:nth-of-type(2) .avatar { background: linear-gradient(135deg, var(--accent-2), #1c4f8a); }
.pi .role { color: var(--muted); font-size: .95rem; margin-bottom: .8em; }
@media (max-width: 560px) {
  .pi { grid-template-columns: 1fr; }
  .avatar { width: 96px; height: 96px; font-size: 1.8rem; }
}
.alumni { columns: 2 300px; column-gap: 40px; padding: 0; list-style: none; margin: 0; }
.alumni li { break-inside: avoid; margin-bottom: 18px; font-size: .95rem; color: var(--ink-soft); }
.alumni strong { color: var(--ink); display: block; }

/* ---------- News ---------- */
.news { list-style: none; padding: 0; margin: 0; }
.news li {
  display: grid; grid-template-columns: 130px 1fr; gap: 20px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.news li:last-child { border-bottom: 0; }
.news time { font-weight: 600; color: var(--accent); font-size: .92rem; }
.news p { margin: 0; }
@media (max-width: 560px) { .news li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Publications ---------- */
.pub-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pub-tools input {
  flex: 1 1 260px; font: inherit; font-size: .95rem; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 8px;
}
.year { font-size: 1.1rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 40px 0 8px; }
.pub { padding: 14px 0; }
.pub .title { font-weight: 600; display: block; }
.pub .authors { color: var(--ink-soft); font-size: .93rem; }
.pub .authors b { color: var(--ink); }
.pub .cite { font-size: .9rem; color: var(--muted); }
.pub .cite i { color: var(--ink-soft); }
.pub .links a { font-size: .85rem; margin-right: 12px; }
.pub .note { font-size: .85rem; color: var(--ink-soft); background: var(--bg-alt); border-left: 3px solid var(--accent-2); padding: 6px 10px; margin-top: 6px; }
.pub.hidden, .year.hidden { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--hero-bg); color: #9fadbd; padding: 48px 0; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer .grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer .copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid #243041; }

/* Keep anchor targets clear of the sticky header */
[id] { scroll-margin-top: 80px; }
