/* Sham Lab — site styles
   Palette from Dual Tn-seq Explorer (slate/navy + teal, orange for contrast);
   type from Fundamentals (Young Serif / IBM Plex). */

:root {
  --bg: #f4f6f8;
  --surface: #fbfcfd;
  --surface-2: #eceff3;
  --ink: #18202b;
  --muted: #5b6676;
  --line: #d8dee6;
  --accent: #0f7f87;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15, 127, 135, .1);
  --warm: #c8621a;
  --warm-soft: rgba(200, 98, 26, .1);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 20px rgba(16, 24, 40, .06);

  /* The hero and footer are always dark */
  --deep: #0b1017;
  --deep-2: #111823;
  --deep-ink: #e3e9ef;
  --deep-muted: #93a0b0;
  --deep-line: #223042;
  --glow: #35c3cb;
  --glow-warm: #f08a3c;

  --display: "Young Serif", Georgia, serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 12px;
  --wrap: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141c;
    --surface: #151c26;
    --surface-2: #1b2430;
    --ink: #e3e8ee;
    --muted: #94a0ae;
    --line: #27313f;
    --accent: #3cbfc7;
    --accent-ink: #071216;
    --accent-soft: rgba(60, 191, 199, .12);
    --warm: #f08a3c;
    --warm-soft: rgba(240, 138, 60, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141c;
  --surface: #151c26;
  --surface-2: #1b2430;
  --ink: #e3e8ee;
  --muted: #94a0ae;
  --line: #27313f;
  --accent: #3cbfc7;
  --accent-ink: #071216;
  --accent-soft: rgba(60, 191, 199, .12);
  --warm: #f08a3c;
  --warm-soft: rgba(240, 138, 60, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 5.6vw, 58px); letter-spacing: -.01em; }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
  font-weight: 500;
}
.lede { font-size: clamp(18px, 2vw, 20px); color: var(--muted); max-width: 64ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
/* BCEAD logo by Shih Jen. The PNG is a white-on-transparent cut-out used as a
   mask, so the letters take the theme colour. */
.brand-logo, .footer-logo {
  display: block; background: var(--accent);
  -webkit-mask: var(--logo) no-repeat left center / contain; mask: var(--logo) no-repeat left center / contain;
}
.brand-logo { width: 146px; height: 40px; transition: background .15s ease; }
.brand:hover .brand-logo { background: var(--ink); }
.footer-logo { width: 300px; max-width: 100%; height: 100px; background: var(--glow); margin-bottom: 18px; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 11px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.header-tools { display: flex; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-moon { fill: currentColor !important; stroke: none !important; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-toggle { display: grid; }
  .header-tools { margin-left: auto; }
  .site-nav {
    position: fixed; inset: 66px 0 auto 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 18px; display: none; box-shadow: var(--shadow);
    max-height: calc(100vh - 66px); overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px 10px; font-size: 17px; }
}

/* ---------- Buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 15.5px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: var(--body);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.chip.warm { background: var(--warm-soft); color: var(--warm); }
.chip.plain { background: var(--surface-2); color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 78% 40%, rgba(53, 195, 203, .16), transparent 60%),
    radial-gradient(700px 400px at 10% 110%, rgba(240, 138, 60, .10), transparent 60%),
    var(--deep);
  color: var(--deep-ink);
  border-bottom: 1px solid var(--deep-line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 45%, #000 20%, transparent 75%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; gap: 24px; min-height: min(78vh, 700px); padding-top: 56px; padding-bottom: 56px;
}
.hero .eyebrow { color: var(--glow); }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--glow); }
.hero .lede { color: var(--deep-muted); }
.hero .btn-ghost { color: var(--deep-ink); border-color: var(--deep-line); }
.hero .btn-ghost:hover { color: var(--glow); border-color: var(--glow); }
.hero .btn-primary { background: var(--glow); color: #061215; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-figure { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: end; }
.genome { width: 100%; height: 100%; overflow: visible; }
.genome .spin { transform-origin: 50% 50%; animation: spin 140s linear infinite; }
.genome .arc { fill: none; stroke-width: 1; opacity: .5; }
.genome .arc.neg { stroke: var(--glow-warm); }
.genome .arc.pos { stroke: var(--glow); }
.genome .arc.live { opacity: 1; stroke-width: 1.8; filter: drop-shadow(0 0 4px currentColor); }
.genome .tick { stroke: var(--glow); stroke-linecap: round; }
.genome .ring { fill: none; stroke: var(--deep-line); }
.genome text { font-family: var(--mono); font-size: 9px; fill: var(--deep-muted); letter-spacing: .12em; }
.hero-caption {
  position: absolute; left: 0; bottom: -4px; font-family: var(--mono); font-size: 11.5px;
  color: var(--deep-muted); letter-spacing: .06em;
}
.hero-caption b { color: var(--glow); font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; padding-top: 36px; }
  .hero-figure { order: -1; max-width: 340px; justify-self: center; margin-bottom: -10px; }
  .hero-caption { display: none; }
}

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--deep-line); }
.stat { padding: 22px 20px 26px; border-right: 1px solid var(--deep-line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); color: #fff; line-height: 1.05; }
.stat span { font-size: 14px; color: var(--deep-muted); }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--deep-line); }
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 34px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }
@media (max-width: 640px) { .section { padding: 60px 0; } }

/* ---------- Page head ---------- */
.page-head { position: relative; padding: 64px 0 56px; border-bottom: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.page-head h1 { margin-bottom: 14px; }
.page-head .lede { margin: 0; }
.track { position: absolute; left: 0; right: 0; bottom: 0; height: 36px; opacity: .9; }
.track svg { width: 100%; height: 100%; display: block; }
.track line { stroke: var(--accent); stroke-linecap: round; }
.track line.w { stroke: var(--warm); }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; color: inherit; text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
a.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; }
.card-body p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card-media { aspect-ratio: 16 / 10; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.contain img { object-fit: contain; padding: 10px; }
.card .more { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 15px; color: var(--accent); }

/* Theme cards */
.theme-card .code { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .1em; }

/* ---------- Feature (split) ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature.flip .feature-media { order: 2; }
.feature-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.feature-media img { width: 100%; }
.feature h2, .feature h3 { margin-bottom: 14px; }
.feature p { color: var(--muted); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 24px; } .feature.flip .feature-media { order: 0; } }

/* Micrograph pair */
.micro { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.micro figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.micro img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1) contrast(1.08); }
.micro figcaption {
  position: absolute; left: 10px; bottom: 10px; right: 10px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: #fff;
  background: rgba(8, 12, 18, .65); padding: 6px 9px; border-radius: 7px; backdrop-filter: blur(6px);
}
@media (max-width: 520px) { .micro { grid-template-columns: 1fr; } }

/* ---------- News ---------- */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-item { display: grid; grid-template-columns: 90px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.news-date { font-family: var(--mono); font-size: 14px; color: var(--muted); padding-top: 2px; }
.news-item h3 { font-family: var(--body); font-weight: 600; font-size: 18px; margin: 6px 0 4px; line-height: 1.35; }
.news-item h3 a { color: var(--ink); text-decoration: none; }
.news-item h3 a:hover { color: var(--accent); }
.news-item p { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 520px) { .news-item { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Publications ---------- */
.pub-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 26px; }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 12px;
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; flex-shrink: 0; }
.search input { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; padding: 11px 0; width: 100%; outline: none; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
}
.filter:hover { color: var(--ink); border-color: var(--muted); }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pub-count { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.year-group { display: grid; grid-template-columns: 88px 1fr; gap: 18px; padding: 8px 0; }
.year-label { font-family: var(--display); font-size: 26px; color: var(--muted); position: sticky; top: 84px; align-self: start; padding-top: 14px; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 18px; }
.pub:last-child { border-bottom: 0; }
.pub-title { font-weight: 600; font-size: 17.5px; line-height: 1.4; margin: 0 0 6px; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-authors { font-size: 14.5px; color: var(--muted); margin: 0 0 8px; }
.pub-authors b { color: var(--ink); font-weight: 600; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; }
.pub-journal { font-style: italic; color: var(--ink); }
.pub-thumb { width: 120px; border-radius: 8px; border: 1px solid var(--line); background: #fff; aspect-ratio: 4 / 3; object-fit: cover; }
.pub.hidden, .year-group.hidden { display: none; }
@media (max-width: 640px) {
  .year-group { grid-template-columns: 1fr; gap: 0; }
  .year-label { position: static; padding: 18px 0 0; }
  .pub { grid-template-columns: 1fr; }
  .pub-thumb { display: none; }
}
.empty { padding: 30px 0; color: var(--muted); display: none; }
.empty.show { display: block; }

/* ---------- People ---------- */
.pi-card { display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: start; }
.pi-card img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; width: 100%; border: 1px solid var(--line); }
@media (max-width: 860px) { .pi-card { grid-template-columns: 1fr; } .pi-card img { max-width: 340px; } }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 24px; }
.person { text-decoration: none; color: inherit; display: block; }
.person-photo { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface-2); border: 1px solid var(--line); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform .4s ease; }
a.person:hover .person-photo img { transform: scale(1.04); }
a.person:hover .person-name { color: var(--accent); }
.person-name { font-weight: 600; font-size: 18px; margin: 12px 0 2px; line-height: 1.3; }
.person-role { font-size: 14px; color: var(--muted); margin: 0; }
.person-years { font-family: var(--mono); font-size: 12.5px; color: var(--accent); margin: 4px 0 0; }
.person-photo .initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: 64px; color: var(--accent);
  background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 70%), var(--surface-2);
}
.group-title { display: flex; align-items: baseline; gap: 12px; margin: 54px 0 20px; }
.group-title h2 { margin: 0; font-size: 28px; }
.group-title .count { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.trainees { columns: 3 260px; column-gap: 28px; list-style: none; margin: 0; padding: 0; }
.trainees li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trainees b { font-weight: 600; }
.trainees span { display: block; font-size: 13.5px; color: var(--muted); }

/* Profile page */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 48px; padding: 56px 0 84px; }
.profile-side img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; width: 100%; border: 1px solid var(--line); }
.profile-side .contact { list-style: none; padding: 0; margin: 18px 0 0; font-size: 15px; }
.profile-side .contact li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.profile h1 { font-size: clamp(32px, 4.4vw, 46px); margin-bottom: 6px; }
.profile .role { font-size: 18px; color: var(--muted); margin-bottom: 30px; }
.profile h2 { font-size: 22px; margin: 34px 0 12px; }
.profile .edu { list-style: none; padding: 0; margin: 0; }
.profile .edu li { padding: 6px 0 6px 18px; position: relative; }
.profile .edu li::before { content: ""; position: absolute; left: 0; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.crumbs { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; gap: 28px; padding-top: 30px; } .profile-side img { max-width: 280px; } }

/* ---------- Resources ---------- */
.resource .kind { align-self: flex-start; }
.resource .links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: auto; padding-top: 12px; }
.resource .links a { font-weight: 600; font-size: 15px; }
.resource .stats-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Gallery ---------- */
/* Row-by-row grid so the newest photos read first, left to right */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.gallery button {
  all: unset; cursor: zoom-in; display: block; margin: 0;
  border-radius: var(--radius); overflow: hidden; position: relative; border: 1px solid var(--line); width: 100%;
}
.gallery button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s ease; }
.gallery button:hover img { transform: scale(1.03); }
.gallery .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px;
  background: linear-gradient(transparent, rgba(5, 9, 14, .78)); color: #fff; font-size: 14px; line-height: 1.35;
}
.gallery .cap span { font-family: var(--mono); font-size: 12px; opacity: .8; margin-left: 6px; }
dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; color: #fff;
}
dialog.lightbox::backdrop { background: rgba(4, 7, 11, .9); backdrop-filter: blur(4px); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox p { text-align: center; margin: 12px 0 0; }
.lightbox .lb-close, .lightbox .lb-nav {
  position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 46px; height: 46px;
  border-radius: 50%; font-size: 24px; cursor: pointer; display: grid; place-items: center;
}
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; }
.lightbox .lb-next { right: 16px; top: 50%; }
.lightbox button:hover { background: rgba(255,255,255,.24); }

/* ---------- Join / contact ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); gap: 32px; } .split .panel { position: static !important; } }
.position { padding: 26px 0; border-bottom: 1px solid var(--line); }
.position:first-child { border-top: 1px solid var(--line); }
.position h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.position ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.position li { margin: 4px 0; }
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form input, .form textarea, .form select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form textarea { min-height: 150px; resize: vertical; }
.note { font-size: 14px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--surface-2); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.callout {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  background: var(--deep); color: var(--deep-ink); border-radius: 18px; padding: 40px;
  position: relative; overflow: hidden;
}
.callout::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 1px dashed rgba(53,195,203,.4); }
.callout h2 { color: #fff; margin: 0 0 8px; }
.callout p { color: var(--deep-muted); margin: 0; }
.callout .btn-primary { background: var(--glow); color: #061215; position: relative; z-index: 1; }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; padding: 28px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: var(--deep-muted); padding: 56px 0 26px; margin-top: 0; font-size: 15px; }
.site-footer a { color: var(--deep-ink); text-decoration: none; }
.site-footer a:hover { color: var(--glow); }
.site-footer .eyebrow { color: var(--glow); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 36px; }
.site-footer .muted { color: var(--deep-muted); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 4px 0; }
.nus-logo { display: inline-block; margin-top: 18px; opacity: .85; }
.nus-logo:hover { opacity: 1; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--deep-line); font-size: 13px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ---------- Prose ---------- */
.prose { max-width: 70ch; }
.prose p { color: var(--muted); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .genome .spin { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition: none !important; }
}
