/* QDiaM Technologies: clean light theme built from the logo's black and red. */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f7;
  --ink: #15171a;
  --ink-soft: #3d434b;
  --muted: #6b737d;
  --line: #e3e6e9;
  --red: #c41e2a;
  --red-dark: #9e1620;
  --red-tint: #fbeeee;
  --laser: #1f9d55;
  --radius: 14px;
  --max: 1160px;
  --f-head: "Manrope", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section.soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-block;
  font: 600 .78rem/1 var(--f-body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { color: var(--ink-soft); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name { font: 800 1.15rem/1 var(--f-head); letter-spacing: -0.01em; }
.brand-name small { display: block; font: 500 .72rem/1.4 var(--f-body); color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--red); padding-bottom: 4px; }
.nav .btn, .nav .btn[aria-current="page"] { color: #fff; box-shadow: none; padding-bottom: 12px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font: 600 .95rem/1 var(--f-body);
  background: var(--red); color: #fff;
  border: 1px solid var(--red);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero */
.hero { padding: 72px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-media { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3.2; background: #0b0f0c; box-shadow: 0 30px 60px -30px rgba(10, 30, 15, .45); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media figcaption { position: absolute; left: 16px; bottom: 14px; color: #e9f5ec; font-size: .8rem; background: rgba(0, 0, 0, .45); padding: 4px 10px; border-radius: 999px; }

/* Page header for inner pages */
.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
.page-head .lead { margin-bottom: 0; }

/* Facts strip */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px 24px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact strong { display: block; font: 750 1.25rem/1.25 var(--f-head); margin-bottom: 4px; }
.fact span { color: var(--muted); font-size: .9rem; }

/* Cards and grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.grid-4 > div { border-top: 2px solid var(--ink); padding-top: 18px; }
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card p:last-child { margin-bottom: 0; }
.card.product { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card.product img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center 60%; width: 100%; background: var(--bg-soft); }
.card.product .body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.card.product .body p { color: var(--ink-soft); }
.card.product .more { margin-top: auto; font-weight: 600; }
a.more { display: inline-block; padding: 8px 0; font-weight: 600; }
.icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--red-tint); color: var(--red);
  display: grid; place-items: center; margin-bottom: 18px;
}
.icon svg { width: 24px; height: 24px; }
.tag {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); margin-bottom: 12px;
}
.tag.now { background: var(--red-tint); color: var(--red); }

/* Feature rows (product page) */
.feature { scroll-margin-top: 96px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 56px; align-items: start; }
.feature + .feature { margin-top: 96px; padding-top: 96px; border-top: 1px solid var(--line); }
.feature-media { position: sticky; top: 100px; border-radius: 18px; overflow: hidden; background: var(--bg-soft); }
.feature-media img { width: 100%; }
.feature-media.stack { background: none; border-radius: 0; overflow: visible; display: grid; gap: 16px; }
.feature-media.stack figure { border-radius: 18px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--line); }
.feature-media { max-width: 320px; width: 100%; }
.feature-media.stack figure:first-child img { max-height: 280px; object-fit: cover; }
.feature-media.stack figure:not(:first-child) img { max-height: 230px; object-fit: contain; background: #fff; }
.feature-media.stack figcaption { padding: 10px 16px; font-size: .85rem; color: var(--muted); }
.app-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 12px; }
.app-tiles figure { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.app-tiles img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.app-tiles figcaption { padding: 8px 10px; font-size: .82rem; font-weight: 600; color: var(--ink); }
.card.product { position: relative; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 24px; }
.mini-grid > div { background: var(--bg-soft); border-radius: 12px; padding: 14px 16px; }
.mini-grid b { display: block; font-family: var(--f-head); margin-bottom: 4px; }
.mini-grid span { font-size: .88rem; color: var(--ink-soft); line-height: 1.5; display: block; }

/* Spin-off band and publication list (about) */
.spinoff { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: center; }
.spinoff .checks { background: var(--bg-soft); border-radius: var(--radius); padding: 28px 28px 14px; }
.pubs { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 0; }
.pubs li { padding: 22px 0; border-top: 1px solid var(--line); }
.pubs li:first-child { border-top: 0; padding-top: 0; }
.pubs .tag { margin-bottom: 8px; }
.pubs p { margin: 0 0 4px; color: var(--ink-soft); }
.pubs .pub-title { font: 700 1.05rem/1.4 var(--f-head); color: var(--ink); }
.pubs .pub-title a { color: var(--ink); }
.pubs .pub-title a:hover { color: var(--red); }

/* Interactive NV lab page */
.lab-chapters { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.lab-chapters li { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-soft); border-radius: 12px; padding: 14px; font-size: .88rem; color: var(--ink-soft); line-height: 1.45; }
.lab-chapters b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 .8rem/1 var(--f-head); }
.lab-chapters strong { display: block; color: var(--ink); font-family: var(--f-head); margin-bottom: 2px; }
.lab-section { padding-top: 48px; }
.lab-frame { border-radius: 18px; overflow: hidden; background: #04060a; border: 1px solid var(--line); height: min(82vh, 820px); min-height: 560px; }
.lab-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.lab-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.lab-actions .note { margin: 0; }

/* Videos page */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.video-card video, .video-card iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #000; display: block; }
.video-card h3 { margin: 16px 0 6px; }
.video-card p { color: var(--ink-soft); margin: 0; }
.video-card time { display: block; font-size: .85rem; color: var(--muted); margin-top: 16px; }
.video-card time + h3 { margin-top: 4px; }
.video-card.featured { grid-column: 1 / -1; }

/* Profile page */
.profile-head { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.profile-head > img { width: 220px; border-radius: 18px; border: 1px solid var(--line); }
.role-line { color: var(--red); font-weight: 600; margin-top: -4px; }
.profile-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.profile-side { display: grid; gap: 20px; }
.profile-side h3 { margin-bottom: 14px; }
.cv { margin: 0; display: grid; gap: 4px 0; }
.cv dt { font-size: .82rem; font-weight: 600; color: var(--muted); }
.cv dd { margin: 0 0 12px; color: var(--ink-soft); font-size: .93rem; line-height: 1.5; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.skills span { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .85rem; color: var(--ink-soft); }
.timeline.compact li { grid-template-columns: 120px 1fr; gap: 20px; padding: 18px 0; }
.timeline.compact h3 { font-size: 1rem; margin-bottom: 4px; }
.timeline.compact p { margin: 0; font-size: .93rem; }
.profile-link { display: inline-block; margin-top: 4px; font-weight: 600; font-size: .92rem; }

/* Crash course */
.wrap.narrow { max-width: 820px; }
.course-toc { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.course-toc a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: .9rem; font-weight: 500; }
.course-toc a:hover { border-color: var(--ink); text-decoration: none; color: var(--ink); }
.course-toc b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 700 .75rem/1 var(--f-head); }
.module { padding: 72px 0; scroll-margin-top: 72px; }
.module.soft { background: var(--bg-soft); }
.module p, .module li { color: var(--ink-soft); }
.module .demo-band p { color: #b9c5d0; }
.module .demo-band li { color: #e6edf2; }
.module h2 { margin-bottom: .6em; }
.eq { overflow-x: auto; padding: 8px 0; margin: 4px 0 18px; }
.numbered { padding-left: 1.3em; }
.numbered li { margin-bottom: 8px; }
.figure-row { margin: 8px 0 24px; }
.keypoints { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.keypoints > div { background: var(--bg-soft); border-radius: 12px; padding: 14px 16px; }
.keypoints b { display: block; font-family: var(--f-head); color: var(--ink); }
.keypoints span { font-size: .9rem; color: var(--ink-soft); }
.sim { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-top: 28px; box-shadow: 0 20px 40px -32px rgba(0, 0, 0, .35); }
.sim h3 { margin: 0; font-size: 1.1rem; }
.sim-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { font: 600 .85rem/1 var(--f-body); padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); cursor: pointer; }
.seg button:hover { border-color: var(--ink); color: var(--ink); }
.seg button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg button:disabled { opacity: .45; cursor: default; }
.sim-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.sim-body.three { grid-template-columns: minmax(0, 1fr) 260px 260px; }
canvas.plot { width: 100%; height: 360px; display: block; }
canvas.axes-view { width: 100%; height: 260px; display: block; background: var(--bg-soft); border-radius: 12px; touch-action: none; cursor: grab; }
.controls { display: grid; gap: 14px; }
.controls label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); }
.controls label input, .controls label select { display: block; margin-top: 6px; width: 100%; }
.controls output { float: right; font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums; }
.controls input[type="range"] { width: 100%; accent-color: var(--red); }
.controls select { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid #cfd4d9; border-radius: 8px; background: #fff; }
.readout { display: grid; gap: 8px; background: var(--bg-soft); border-radius: 12px; padding: 14px; }
.readout div { display: grid; gap: 2px; }
.readout span { font-size: .78rem; color: var(--muted); }
.readout b { font-size: .9rem; font-variant-numeric: tabular-nums; }
.tryit { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.tryit b { font-family: var(--f-head); }
.tryit ul { margin: 8px 0 0; padding-left: 1.2em; }
.tryit li { margin-bottom: 6px; font-size: .95rem; }
.table-scroll { overflow-x: auto; margin-top: 18px; }
.readout-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.readout-table th, .readout-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.readout-table th { font-weight: 600; color: var(--muted); font-size: .8rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.sim-intro { margin: -6px 0 12px; }
.recon-steps { margin-top: 18px; }
.recon { padding-left: 1.3em; display: grid; gap: 14px; }
.recon li { color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
.recon .table-scroll { margin-top: 0; }
.recon .readout-table { margin-top: 10px; }
.sim.calc .controls { margin: 18px 0; }
.sim .result { display: grid; gap: 4px; background: var(--ink); color: #fff; border-radius: 12px; padding: 18px 20px; }
.sim .result span { font-size: .85rem; color: #c9ced4; }
.sim .result b { font: 800 1.8rem/1.2 var(--f-head); }
.lockin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.lockin-plots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.lockin-plots figure { margin: 0; min-width: 0; }
.lockin-plots figcaption { font: 700 .9rem/1.3 var(--f-head); color: var(--ink); margin-bottom: 4px; }
.lockin-plots canvas.plot { height: 280px; }
.controls h4 { margin: 6px 0 -4px; font: 700 .75rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.controls h4:first-child { margin-top: 0; }
.controls label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.controls label.check input { width: auto; margin: 0; accent-color: var(--red); }
.li-readout { margin-top: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.li-notes p { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; background: #fff7e6; color: #7a4a00; font-size: .9rem; }
.quiz { display: grid; gap: 10px; }
.quiz details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.quiz summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.quiz details p { margin: 12px 0 0; }
.refs { padding-left: 1.2em; }
.refs li { margin-bottom: 10px; }

/* Blog */
.posts { display: grid; gap: 0; }
.post { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; padding: 48px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.post:first-child { border-top: 0; padding-top: 0; }
.post.text-only { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.post-thumb { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.post-thumb img { width: 100%; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-meta .tag { margin: 0; }
.post-meta time { font-size: .88rem; color: var(--muted); }
.post h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
main img, video { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.post p { color: var(--ink-soft); }

/* Updates timeline */
.timeline { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.timeline li { scroll-margin-top: 96px; display: grid; grid-template-columns: 150px 1fr; gap: 28px; padding: 32px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline time { font: 700 .95rem/1.4 var(--f-head); color: var(--ink); }
.timeline h3 { margin-bottom: 8px; }
.timeline h3 a { color: var(--ink); }
.timeline h3 a:hover { color: var(--red); }
.timeline p { color: var(--ink-soft); }
.update-cards .card time { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.checks { list-style: none; padding: 0; margin: 0 0 1.5em; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--ink-soft); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--red-tint); box-shadow: inset 0 0 0 4px var(--red);
}
.specs { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: .95rem; }
.specs th, .specs td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 38%; font-weight: 600; color: var(--ink); padding-right: 16px; }
.specs td { color: var(--ink-soft); }
.note { font-size: .9rem; color: var(--muted); }

/* Steps (technology) */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { position: relative; padding-top: 48px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 .95rem/1 var(--f-head);
  background: var(--ink); color: #fff;
}
.step p { color: var(--ink-soft); font-size: .95rem; }
.figure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.figure.compact { max-width: 680px; margin: 0 auto; }
.figure figcaption { padding: 12px 18px; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); }

/* Demo band */
.demo-band { background: #05080b; color: #e6edf2; border-radius: 22px; padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.demo-band p { color: #b9c5d0; }
.demo-band .eyebrow { color: #46ff86; }
.demo-band .btn { background: #46ff86; border-color: #46ff86; color: #05080b; }
.demo-band .btn:hover { background: #7dffab; border-color: #7dffab; }
.demo-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.demo-chapters li { border: 1px solid rgba(160, 190, 220, .18); border-radius: 10px; padding: 12px 16px; font-size: .95rem; }
.demo-chapters b { color: #46ff86; font-weight: 600; margin-right: 8px; }

/* Course call-out (Technology page) */
.course-callout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; border: 1px solid var(--line); border-radius: 22px; padding: 48px; background: linear-gradient(135deg, var(--red-tint), #fff 60%); }
.course-callout p { color: var(--ink-soft); }
.course-callout-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.course-callout-list a { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.course-callout-list a:hover { border-color: var(--red); text-decoration: none; }
.course-callout-list b { font-family: var(--f-head); }
.course-callout-list span { font-size: .88rem; color: var(--muted); }

/* Mission band */
.mission { background: var(--ink); color: #fff; }
.mission .eyebrow { color: #ff8a8f; }
.mission blockquote { margin: 0; font: 700 clamp(1.5rem, 2.8vw, 2.2rem)/1.3 var(--f-head); letter-spacing: -0.015em; max-width: 26ch; }
.mission .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: end; }
.mission p { color: #c9ced4; }

/* Team */
.person { text-align: left; }
.person img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: top; border-radius: var(--radius); margin-bottom: 18px; background: var(--bg-soft); }
.person img.portrait-tall { object-fit: contain; object-position: center bottom; background: #f5ffff; }
.person h3 { margin-bottom: 2px; }
.person .role { color: var(--red); font-weight: 600; font-size: .92rem; margin-bottom: 12px; }
.person p { color: var(--ink-soft); font-size: .95rem; }

/* Values */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.values h3 { font-size: 1.05rem; }
.values p { color: var(--ink-soft); font-size: .95rem; }

/* CTA */
.cta { text-align: center; }
.cta .lead { margin: 0 auto; }
.cta .btn-row { justify-content: center; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: #fff;
  border: 1px solid #cfd4d9;
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); }
.hp { position: absolute; left: -9999px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.contact-list .icon { margin: 0; }
.contact-list b { display: block; font-family: var(--f-head); }
.contact-list span { color: var(--ink-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; background: var(--bg-soft); font-size: .92rem; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-top p { color: var(--muted); max-width: 40ch; margin-top: 14px; }
.footer-top h4 { font: 700 .8rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.footer-top ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-top a { color: var(--ink-soft); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap, .feature, .contact-grid, .mission .wrap, .demo-band, .spinoff, .profile-grid, .course-callout { grid-template-columns: 1fr; }
  .feature-media { position: static; margin: 0 auto; }
  .grid-3, .grid-4, .values, .steps { grid-template-columns: repeat(2, 1fr); }
  .lab-chapters { grid-template-columns: repeat(2, 1fr); }
  .post { grid-template-columns: 220px 1fr; gap: 28px; }
  .sim-body, .sim-body.three { grid-template-columns: minmax(0, 1fr); }
  .sim-body.three { grid-template-columns: 1fr 1fr; }
  .sim-body.three canvas.spectrum { grid-column: 1 / -1; }
  .lockin-grid { grid-template-columns: minmax(0, 1fr); }
  .li-readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-grid { grid-template-columns: 1fr; }
  .facts .wrap { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1120px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"]:not(.btn) { box-shadow: none; color: var(--red); }
  .nav .btn { margin-top: 16px; justify-content: center; border-bottom: 0; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4, .values, .steps, .form .row, .mini-grid { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
  .lab-chapters { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 20px; padding: 36px 0; }
  .module { padding: 56px 0; }
  .keypoints, .sim-body.three, .lockin-plots { grid-template-columns: 1fr; }
  .app-tiles { grid-template-columns: 1fr 1fr; }
  .sim { padding: 16px; }
  canvas.plot { height: 280px; }
  .post-thumb { max-width: 320px; }
  .post-thumb.wide { max-width: none; }
  .profile-head { grid-template-columns: 1fr; gap: 24px; }
  .profile-head > img { width: 180px; }
  .timeline.compact li { grid-template-columns: 1fr; gap: 4px; }
  .lab-frame { height: 78vh; height: 78dvh; min-height: 520px; }
  .facts .wrap { grid-template-columns: 1fr; }
  .fact, .fact:nth-child(3) { border-left: 0; padding: 20px 0; border-top: 1px solid var(--line); }
  .fact:first-child { border-top: 0; }
  .demo-band, .course-callout { padding: 32px 22px; }
  .footer-top { grid-template-columns: 1fr; }
}

/* Home page intro: Spin Microscopy Lab -> QDiaM spin-off */
.intro { display: none; }
.intro-on .intro { display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000; background: #fff; animation: introOut .45s ease 2.3s forwards; }
.intro-on body { overflow: hidden; }
.intro-stage { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 4vw, 48px); padding: 24px; }
.intro figure { margin: 0; text-align: center; }
.intro figcaption { margin-top: 14px; font: 800 clamp(1rem, 2vw, 1.35rem)/1.2 var(--f-head); color: var(--ink); }
.intro figcaption span { display: block; font: 500 .85rem/1.4 var(--f-body); color: var(--muted); letter-spacing: .04em; }
.intro-lab { animation: introRise .5s ease both; }
@keyframes introRise { from { transform: translateY(10px) scale(.96); } to { transform: none; } }
.intro-lab img { width: clamp(150px, 24vw, 280px); height: auto; }
.intro-link { display: grid; justify-items: center; gap: 6px; opacity: 0; animation: introIn .3s ease .7s forwards; }
.intro-link svg { width: clamp(70px, 12vw, 160px); height: 24px; overflow: visible; }
.intro-link line, .intro-link polyline { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.intro-link line { stroke-dasharray: 150; stroke-dashoffset: 150; animation: introDraw .4s ease .75s forwards; }
.intro-link polyline { opacity: 0; animation: introIn .15s ease 1.1s forwards; }
.intro-link span { font: 700 .78rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.intro-qdiam { opacity: 0; animation: introPop .5s cubic-bezier(.2,.8,.3,1.2) 1.15s forwards; }
.intro-qdiam img { width: clamp(110px, 16vw, 180px); height: auto; margin: 0 auto; }
.intro-skip { position: absolute; right: 20px; bottom: 20px; font: 600 .85rem/1 var(--f-body); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.intro-skip:hover { color: var(--ink); border-color: var(--ink); }
.intro.done { animation: introOut .35s ease forwards !important; }
@keyframes introIn { to { opacity: 1; } }
@keyframes introDraw { to { stroke-dashoffset: 0; } }
@keyframes introPop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes introOut { to { opacity: 0; visibility: hidden; } }
@media (max-width: 600px) {
  .intro-stage { flex-direction: column; gap: 10px; }
  .intro-link svg { transform: rotate(90deg); width: 70px; margin: 18px 0; }
}

/* Privacy and other legal pages */
.legal h2 { font-size: 1.3rem; margin: 36px 0 10px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink-soft); }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--ink); }
