:root {
  /* seven colours, two modes. Lines and veils are the text colour at low opacity, never a new hue. */
  --bg: #011130; --surface: #0A1C45; --ink: #EEF2F9; --muted: #A7B6CF; --accent: #7FD3F5; --brand: #4B9CD3; --green: #7EBF6A;
  --line: color-mix(in srgb, var(--ink) 10%, transparent);
  --card: color-mix(in srgb, var(--surface) 80%, transparent);
  --veil: color-mix(in srgb, var(--bg) 74%, transparent);
  --h1: linear-gradient(100deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 55%, var(--accent)) 55%, var(--accent) 100%);
  --soft: color-mix(in srgb, var(--muted) 70%, var(--bg));
  --blue: var(--brand); --cyan: var(--accent);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F3EE; --surface: #FFFFFF; --ink: #13294B; --muted: #5B6B86; --accent: #2F6FAF; --brand: #4B9CD3; --green: #4F9A3E;
  --h1: linear-gradient(100deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 60%, var(--accent)) 60%, var(--accent) 100%);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { transition: background-color .6s var(--ease), color .6s var(--ease); background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.4s var(--ease); }
.scene-ready #scene { opacity: 1; }
main, .foot { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.i { width: 16px; height: 16px; flex: none; }

/* nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 32px; background: var(--veil); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: 0.01em; }
.brand img { width: 40px; height: auto; }
.nav nav { display: flex; gap: 28px; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav nav a { text-decoration: none; transition: color .3s var(--ease); }
.nav nav a:hover { color: var(--ink); }

/* type */
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1.02; max-width: 680px; margin-top: 18px; background: var(--h1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; margin-top: 12px; }
h3 { font-size: 22px; line-height: 1.25; }
.lead { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 560px; margin-top: 22px; }
.body { color: var(--muted); }
.strong { font-weight: 700; margin-top: 16px; }

/* buttons */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .4s var(--ease), background .3s var(--ease), border-color .3s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-line { border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.btn-line:hover { border-color: color-mix(in srgb, var(--ink) 42%, transparent); }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font-weight: 600; font-size: 14px; text-decoration: none; }
.more-line { margin-top: 24px; }

/* hero */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; position: relative; }
.hero-copy { max-width: 600px; }
.hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-size: 12px; letter-spacing: 0.08em; color: var(--soft); white-space: nowrap; }

/* research story: the visual sits on the left, the words on the right */
.half-right { margin-left: 50%; max-width: 600px; }
.research .intro { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; }
.area { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; }
/* each direction: a quiet number with a hairline, a large title, then the lab's own words set generously */
.num { display: flex; align-items: center; gap: 16px; font-size: 14px; font-weight: 600; letter-spacing: 0.18em; color: var(--cyan); }
.num i { display: block; width: 64px; height: 1px; background: var(--cyan); opacity: .7; transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease) .15s; }
.num.in i { transform: scaleX(1); }
.area h3 { font-size: clamp(44px, 5vw, 76px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; margin-top: 22px; }
.area .body { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.75; font-weight: 300; color: var(--muted); margin-top: 28px; max-width: 540px; }

/* spotlight */
.spot { min-height: 88vh; display: flex; align-items: center; padding: 64px 0 120px; }
.spot-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.spot .body { font-size: 17px; margin-top: 18px; max-width: 540px; }
.photo { border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; max-width: 460px; justify-self: center; width: 100%; box-shadow: 0 40px 80px #00000080; border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }

/* generic blocks */
.block { padding: 120px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.card-body p { color: var(--muted); font-size: 15px; }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.tool.wide { grid-column: span 3; display: grid; grid-template-columns: 0.9fr 1.1fr; }
.tool-img { background: #FFFFFF; display: flex; align-items: center; justify-content: center; height: 200px; padding: 18px; }
.tool.wide .tool-img { height: 100%; min-height: 240px; }
.tool-img img { max-height: 100%; width: auto; object-fit: contain; }
.tool .card-body { justify-content: center; }
.viewers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.viewer { text-decoration: none; display: grid; grid-template-columns: 0.9fr 1.1fr; transition: transform .5s var(--ease), border-color .3s; }
.viewer:hover, .pub:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.viewer img { width: 100%; height: 100%; object-fit: cover; background: #000; }
.pubs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.pub { text-decoration: none; transition: transform .5s var(--ease), border-color .3s; }
.pub-img { aspect-ratio: 4 / 3; background: #fff; }
.pub-img img { width: 100%; height: 100%; object-fit: cover; }
.pub h3 { font-size: 16px; line-height: 1.4; }
.tag { font-size: 12px !important; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan) !important; }
.pi { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: center; padding: 24px; margin-top: 40px; }
.pi img { width: 240px; aspect-ratio: 1; object-fit: cover; border-radius: 18px; }
.pi h3 { font-size: 28px; margin-top: 6px; }
.pi .body { margin-top: 12px; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 18px; }
.person { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform .5s var(--ease), border-color .3s; }
.person:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.person img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.person .name { font-weight: 700; margin-top: 12px; font-size: 15px; }
.person .role { font-size: 13px; color: var(--soft); }
.news { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.news .card { padding: 28px; }
.news ul { list-style: none; margin-top: 12px; }
.news li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.news time { color: var(--cyan); font-weight: 600; font-size: 13px; }

/* join: the particles spell the lab name in the top half */
.join { min-height: 115vh; display: flex; align-items: flex-end; padding: 54vh 0 96px; }
.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.join .card { padding: 32px; }
.join h2 { font-size: 36px; }
.join h3 { margin-top: 10px; }
.join ul { margin: 12px 0 0 20px; }
.join address { font-style: normal; margin-top: 14px; }
.foot { border-top: 1px solid var(--line); padding: 28px 0; font-size: 13px; color: var(--soft); background: var(--veil); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* small screens: the visual sits behind the words */
@media (max-width: 960px) {
  .tools, .pubs { grid-template-columns: 1fr 1fr; }
  .tool.wide { grid-column: span 2; }
  .spot-grid, .viewers, .news, .join-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav { padding: 12px 16px; }
  .nav nav { display: none; }
  .wrap { padding: 0 16px; }
  .hero { align-items: flex-end; padding-bottom: 96px; }
  .half-right { margin-left: 0; }
  .area, .research .intro { justify-content: flex-end; padding: 52vh 0 48px; min-height: 100vh; }
  .hero { padding-top: max(46vh, 330px); }
  .tools, .pubs { grid-template-columns: 1fr; }
  .tool.wide { grid-column: auto; grid-template-columns: 1fr; }
  .viewer { grid-template-columns: 1fr; }
  .pi { grid-template-columns: 1fr; }
  .pi img { width: 100%; max-width: 280px; }
  .news li { grid-template-columns: 1fr; gap: 4px; }
  .block, .spot { padding: 88px 0; }
}

/* theme switch */
.theme-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .3s var(--ease), border-color .3s var(--ease), transform .5s var(--ease); }
.theme-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); transform: rotate(-12deg); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theme-btn .sun { display: none; } :root[data-theme="light"] .theme-btn .sun { display: block; } :root[data-theme="light"] .theme-btn .moon { display: none; }
.nav-right { display: flex; align-items: center; gap: 26px; }

/* logos per mode */
.brand .logo-l { display: none; } :root[data-theme="light"] .brand .logo-l { display: block; } :root[data-theme="light"] .brand .logo-d { display: none; }
/* about: the lab in its own words, set large */
.about { min-height: 92vh; display: flex; align-items: center; padding: 100px 0; }
.half-left { max-width: 620px; }
.about-text { font-size: clamp(24px, 2.3vw, 34px); line-height: 1.45; font-weight: 400; letter-spacing: -0.01em; margin-top: 20px; color: var(--ink); }
.about-sub { font-size: 17px; line-height: 1.75; color: var(--muted); margin-top: 26px; font-weight: 300; }
@media (max-width: 860px) { .about { padding: 60vh 0 60px; } }

/* funders: official logos in an endless, slow strip; pauses on hover, static for reduced motion */
.funders { padding-bottom: 96px; }
.funders h2 { max-width: 22ch; }
.marquee { margin-top: 48px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; list-style: none; margin: 0; padding: 0; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee li { flex: none; padding: 0 clamp(28px, 4vw, 64px); }
.marquee a { display: flex; align-items: center; gap: 12px; height: 72px; text-decoration: none; opacity: .88; transition: opacity .3s var(--ease); }
.marquee a:hover { opacity: 1; }
.marquee img { height: 56px; width: auto; }
.marquee img.seal { height: 64px; }
.marquee img.seal-word { height: 26px; }
@keyframes marquee { to { transform: translateX(-50%); } }
/* dark mode: the NIH and NSF marks are dark-on-light, so flip their lightness but keep the hues; the NSF seal stays as is */
:root:not([data-theme="light"]) .marquee img:not(.seal) { filter: invert(1) hue-rotate(180deg) brightness(1.15); }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; row-gap: 24px; } .marquee-track li[aria-hidden] { display: none; } .marquee { -webkit-mask-image: none; mask-image: none; } }
@media (max-width: 860px) { .marquee img { height: 42px; } .marquee img.seal { height: 48px; } .marquee img.seal-word { height: 20px; } }

/* 2026-11-23 · the shared type scale and text colours (anchors in shared/common.css): reading text in --text, never thin
   grey; layout and the particle story unchanged */
.label { font-size: 13px; }
.lead { font-size: var(--fs-lead); color: var(--text); }
.body { color: var(--text); }
.area .body { font-weight: 400; color: var(--text); }
.spot .body { font-size: var(--fs-body); }
.about-sub { font-size: var(--fs-body); font-weight: 400; color: var(--text); }
.btn { font-size: 16px; }
.more { font-size: 15px; }
.hint { font-size: 13px; }
.card-body p { font-size: var(--fs-small); color: var(--text); }
.pub h3 { font-size: 17px; }
.person .name { font-size: 17px; }
.person .role { font-size: 15px; color: var(--muted); }
.news li { font-size: var(--fs-small); color: var(--text); }
.news time { font-size: 14px; }
.foot { font-size: 15px; color: var(--muted); }
/* reading text on the home page is body size too; labels 14px, meta 16px, names and card titles at body size in bold */
.body, ul.body li { font-size: var(--fs-body); }
.area .body { font-size: clamp(19px, 1.45vw, 22px); }
.card-body p, .news li { font-size: var(--fs-body); }
.pub h3, .person .name, .card-body h3 { font-size: var(--fs-body); }
.person .role { font-size: var(--fs-small); }
.label, .news time, .num, .tag { font-size: 14px !important; }
.hint { font-size: 14px; }
/* phones: the hint under the brain may wrap instead of running past the screen edge */
@media (max-width: 640px) { .hint { white-space: normal; text-align: center; width: calc(100% - 32px); font-size: 13px; } }

/* round 3: the section numbers and labels big enough to read ("01" was 14px) */
.num { font-size: 20px !important; gap: 20px; }
.num i, .num::after { min-width: 96px; }
.label { font-size: var(--fs-label) !important; letter-spacing: .14em; }
.btn { font-size: 18px; padding: 15px 26px; }
.more { font-size: 18px; }
@media (max-width: 640px) { body { --fs-body: 18px; --fs-small: 16px; --fs-lead: 20px; } }
.news time, .tag { font-size: 16px !important; }
.wrap { max-width: clamp(1240px, 72vw, 1480px); }
