: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: Manrope, 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: 46vh; }
  .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; } }
