@font-face { font-family: Rajdhani; src: url("fonts/rajdhani-medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Rajdhani; src: url("fonts/rajdhani-semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --paper: #0b0e13;
  --ink: #edf0f5;
  --muted: #a0abba;
  --subtle: #8995a6;
  --line: #29323e;
  --accent: #a8c5e5;
  --display: Rajdhani, "Arial Narrow", Arial, sans-serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(24px, 7.5vw, 120px);
  --bar: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 24px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: #4a5a70; text-underline-offset: 4px; transition: color 180ms ease; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
button { font: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.015em; margin: 0 0 22px; text-wrap: balance; }
h2 { font-size: clamp(36px, 3.5vw, 52px); line-height: 1.06; }
p { margin: 0 0 16px; color: var(--muted); }
.marker, .eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.marker > span { color: var(--subtle); margin-right: 18px; }
.skip-link { position: fixed; z-index: 5; top: -100px; left: 20px; background: var(--paper); padding: 12px 20px; }
.skip-link:focus { top: 12px; }

/* Text occupies quiet areas in the medium, without visible panel edges. */
#medium { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; touch-action: pan-y; }
main { position: relative; z-index: 1; pointer-events: none; max-width: 1600px; margin-inline: auto; }
.sec { position: relative; display: flex; align-items: center; padding: 80px var(--gutter); }
.sec > * { pointer-events: auto; }
.island { max-width: 530px; }
.island > p:last-child { margin-bottom: 0; }

.bar { position: fixed; z-index: 3; top: 0; left: 0; right: 0; height: var(--bar); display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 0 var(--gutter); background: rgba(11, 14, 19, 0.94); backdrop-filter: blur(12px); }
.who { text-decoration: none; font: 600 23px/1 var(--display); letter-spacing: 0.01em; white-space: nowrap; }
.menu { position: relative; display: flex; gap: 5px; }
.menu a { position: relative; z-index: 1; padding: 10px 12px; font-size: 13px; text-decoration: none; color: var(--muted); white-space: nowrap; }
.menu a.on, .menu a:hover { color: var(--ink); }
.menu-mark { position: absolute; top: 8px; bottom: 8px; left: 0; width: 0; border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); transition: left 0.4s ease, width 0.4s ease; pointer-events: none; }
.menu-mark::before, .menu-mark::after { content: ""; position: absolute; left: -1px; right: -1px; height: 1px; background: linear-gradient(90deg, var(--accent) 5px, transparent 5px, transparent calc(100% - 5px), var(--accent) calc(100% - 5px)); }
.menu-mark::before { top: 0; } .menu-mark::after { bottom: 0; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(168,197,229,0.08); }
.progress i { display: block; height: 100%; background: var(--accent); opacity: 0.55; transform: scaleX(0); transform-origin: left; }

.hero { min-height: min(850px, 88svh); padding-top: calc(var(--bar) + 90px); padding-bottom: 100px; }
.hero-card { max-width: 820px; }
.hero .eyebrow { margin-bottom: 28px; }
.hero h1 { font-size: clamp(68px, 8.5vw, 132px); line-height: 0.88; font-weight: 600; margin: 0 0 26px -3px; }
.question { font: 500 clamp(28px, 2.8vw, 42px)/1.15 var(--display); color: var(--accent); margin-bottom: 22px; }
.lead { font-size: 19px; line-height: 1.6; max-width: 33em; }
.role { font-size: 13px; line-height: 1.75; color: var(--subtle); margin-top: 24px; margin-bottom: 0; }
/* Affiliation logos in one row, one colour, optically balanced: each logo
   has its own height so they carry similar weight, centred on one line.
   The NPL mark is the lab's own bracketed lockup (from nplresearch.github.io);
   the NetSI and CETI logos are one-colour local versions of their official
   files, used as masks so they take the text colour. The row repeats the
   links above, so it is hidden from assistive technology. */
.affil-logos { display: flex; align-items: center; gap: 44px; margin-top: 22px; }
.affil-logos a { display: block; line-height: 0; }
.logo { display: block; }
.logo-npl { height: 40px; width: auto; fill: var(--muted); transition: fill 0.2s ease; }
.logo-mask { background-color: var(--muted); transition: background-color 0.2s ease; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center; }
.logo-netsi { height: 29px; aspect-ratio: 766 / 120; -webkit-mask-image: url("logo-netsi.png"); mask-image: url("logo-netsi.png"); }
.logo-ceti { height: 33px; aspect-ratio: 156.11 / 46.72; -webkit-mask-image: url("logo-ceti.svg"); mask-image: url("logo-ceti.svg"); }
.affil-logos a:hover .logo-npl { fill: var(--accent); }
.affil-logos a:hover .logo-mask { background-color: var(--accent); }
.hero-links { display: flex; gap: 28px; margin-top: 32px; font-size: 13px; }
.hero-links a { text-decoration: none; }
.hero-links span { color: var(--accent); margin-left: 8px; }

.q { min-height: 510px; }
.q1 { justify-content: flex-start; }
.q2 { justify-content: flex-end; padding-right: calc(var(--gutter) + 4vw); }
.q h2, .collective-copy h2 { margin-bottom: 26px; }
.work-link { display: block; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.work-link > span { display: block; }
.work-link > span > span { color: var(--accent); margin-left: 6px; }
.work-link small { display: block; font-size: 12px; color: var(--subtle); margin-top: 5px; }
.q3 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr); gap: clamp(50px, 10vw, 180px); padding-top: 100px; padding-bottom: 120px; }
.domains { margin: 0; padding-top: 16px; width: 100%; }
.domains > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.domains > div:first-child { padding-top: 0; }
.domains dt { font: 500 25px/1.2 var(--display); margin-bottom: 6px; }
.domains dd { margin: 0; font-size: 13px; color: var(--muted); }

.map-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-areas: "copy fig" "list list"; gap: 50px 60px; align-items: center; padding-top: 100px; }
.map-copy { grid-area: copy; align-self: start; padding-top: 35px; }
.map-copy > p:not(.marker) { max-width: 32em; }
.map-fig { grid-area: fig; margin: 0; }
.map-fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.map-fig figcaption { display: flex; flex-wrap: wrap; gap: 7px 19px; font-size: 11px; color: var(--subtle); padding: 12px 4% 0; }
.map-hint { flex-basis: 100%; margin-top: 7px; }
.glyph { display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--muted); vertical-align: 0; }
.glyph.paper { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.glyph.talk { border-radius: 50%; }
.glyph.conversation { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.readout { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); min-height: 350px; }
.readout h3 { font-size: clamp(25px, 2.35vw, 34px); line-height: 1.13; margin-bottom: 12px; text-wrap: pretty; }
.r-kind { font-size: 11px; color: var(--accent); margin-bottom: 12px; }
.r-who { font-size: 12px; color: var(--subtle); margin-bottom: 12px; }
.r-note { font-size: 15px; }
.r-open { scroll-margin-top: calc(var(--bar) + 40px); display: inline-block; font-size: 13px; margin-top: 4px; }
.m-grid line { stroke: #27313e; stroke-width: 0.8; opacity: 0.35; }
.m-frame { fill: none; stroke: #73869e; stroke-width: 1; }
.m-vertex { fill: var(--accent); }
.m-name, .m-question, .m-year, .m-mark { paint-order: stroke; stroke: var(--paper); stroke-linejoin: round; }
.m-name { fill: var(--ink); font: 500 36px var(--display); stroke-width: 6px; }
.m-question { display: none; }
.m-year { fill: var(--subtle); font: 16px var(--sans); stroke-width: 4px; pointer-events: none; }
.m-work { cursor: pointer; outline: none; }
.m-mark { fill: var(--ink); stroke-width: 3px; transition: fill 180ms ease, transform 180ms ease; transform-box: fill-box; transform-origin: center; }
.m-halo { fill: transparent; }
.m-work.on .m-mark, .m-work:focus-visible .m-mark { fill: var(--accent); transform: scale(1.6); }
.m-work:focus-visible .m-halo { stroke: var(--accent); stroke-width: 1.5px; }
.m-work.on .m-year { fill: var(--ink); }
.m-work.dim .m-mark { fill: #68788b; }
.map-list { grid-area: list; max-width: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; }
.map-list summary { cursor: pointer; font-size: 14px; padding: 22px 0; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.map-list summary::-webkit-details-marker { display: none; }
.expand { font-size: 22px; font-weight: 300; line-height: 1; color: var(--accent); transition: transform 180ms ease; }
.map-list[open] .expand { transform: rotate(45deg); }
.map-list ol { list-style: none; margin: 0; padding: 12px 0; columns: 2 360px; column-gap: 55px; }
.map-list li { break-inside: avoid; }
.map-list li a { display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding: 12px 0; text-decoration: none; }
.map-list svg { width: 28px; height: 28px; margin-top: 3px; }
.map-list .t { display: block; font-size: 15px; line-height: 1.4; }
.map-list .m { display: block; font-size: 12px; color: var(--subtle); margin-top: 5px; }
.more { display: flex; flex-wrap: wrap; gap: 12px 30px; font-size: 13px; padding: 10px 0 24px; }

.talks { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 70px; align-items: start; padding-top: 110px; padding-bottom: 110px; }
.talk-list h2 { font-size: clamp(32px, 3vw, 44px); margin-bottom: 30px; }
.talk-list ul { list-style: none; padding: 0; margin: 0; }
.talk-list li { padding: 18px 0; border-top: 1px solid var(--line); }
.talk-list li a { display: block; text-decoration: none; font-size: 16px; line-height: 1.45; }
.talk-list li a > span { color: var(--accent); font-size: 13px; }
.talk-list li > span { display: block; font-size: 12px; color: var(--subtle); margin-top: 6px; }
.talk-feature { max-width: none; }
.thumb { display: block; position: relative; overflow: hidden; background: #172130; }
.thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; filter: grayscale(0.85) contrast(1.06); opacity: 0.88; transition: filter 400ms ease, opacity 400ms ease; }
.thumb:hover img, .thumb:focus-visible img { filter: grayscale(0.35); opacity: 1; }
.play { position: absolute; bottom: 16px; right: 16px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(237,240,245,0.55); border-radius: 50%; background: rgba(11,14,19,0.7); color: var(--ink); }
.feature-meta { display: flex; justify-content: space-between; margin: 18px 0 14px; font-size: 11px; letter-spacing: 0.06em; color: var(--accent); }
.feature-meta span { color: var(--subtle); }
.talk-feature h3 { font-size: clamp(30px, 2.9vw, 42px); line-height: 1.1; margin-bottom: 14px; }
.talk-feature h3 a { text-decoration: none; }
.talk-feature > p:last-child { font-size: 15px; }

.about { justify-content: center; padding-top: 120px; padding-bottom: 120px; }
.about-card { max-width: 100%; display: grid; grid-template-columns: minmax(200px, 380px) minmax(0, 580px); gap: clamp(45px, 7vw, 120px); align-items: center; }
.about-card img { width: 100%; height: auto; display: block; }
.about-card h2 { margin-bottom: 28px; }
.links { display: flex; flex-wrap: wrap; gap: 12px 26px; font-size: 13px; margin-top: 28px; }
.contact { justify-content: flex-end; padding-top: 60px; padding-bottom: 110px; }
.contact .island { max-width: 100%; }
.contact .mail { display: block; font: 500 clamp(26px, 3.2vw, 48px)/1.15 var(--display); text-decoration: none; margin-bottom: 16px; overflow-wrap: anywhere; }
.mail span { color: var(--accent); }
.contact p:last-child { font-size: 14px; }
.footer { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 30px; padding: 24px var(--gutter) 36px; border-top: 1px solid var(--line); background: var(--paper); font-size: 12px; color: var(--subtle); }
.footer > a { margin-right: auto; text-decoration: none; white-space: nowrap; }
.site-note { max-width: 360px; }
.site-note summary { cursor: pointer; }
.site-note p { font-size: 12px; margin: 18px 0 0; }
#motion-toggle { background: none; color: inherit; border: 0; padding: 0; font-size: 12px; cursor: pointer; white-space: nowrap; }
#motion-toggle:hover { color: var(--ink); }
#motion-toggle:disabled { cursor: default; }

@media (min-width: 1600px) { .q2 { padding-right: var(--gutter); } }
@media (max-width: 1000px) {
  :root { --gutter: 40px; }
  .map-sec { gap: 35px; }
  .map-copy { padding-top: 0; }
  .q3 { gap: 70px; }
  .talks { gap: 45px; }
  .bar { gap: 20px; }
  .menu { gap: 0; }
  .menu a { padding-inline: 10px; }
}
@media (max-width: 760px) {
  :root { --bar: 108px; --gutter: 26px; }
  body { font-size: 16px; }
  .bar { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; padding: 12px 20px 9px; }
  .who { font-size: 21px; }
  .affil-logos { gap: 22px; }
  .logo-npl { height: 31px; }
  .logo-netsi { height: 22px; }
  .logo-ceti { height: 25px; }
  .menu { width: 100%; max-width: 480px; justify-content: space-between; }
  .menu a { font-size: 12px; padding: 10px 8px; }
  .menu-mark { top: 7px; bottom: 7px; }
  .sec { padding: 70px var(--gutter); }
  .hero { min-height: 730px; min-height: min(850px, 100svh); padding-top: calc(var(--bar) + 64px); padding-bottom: 90px; }
  .hero h1 { font-size: clamp(64px, 13vw, 98px); margin-left: -1px; }
  .hero .eyebrow { font-size: 9px; letter-spacing: 0.08em; margin-bottom: 26px; }
  .question { font-size: clamp(29px, 5vw, 37px); max-width: 15em; }
  .lead { font-size: 17px; }
  .hero-links { margin-top: 28px; }
  .q { min-height: 480px; }
  .q1 { padding-right: 48px; }
  .q2 { padding-left: 48px; }
  .q .island { width: 100%; }
  h2 { font-size: clamp(36px, 6vw, 46px); }
  .desktop-break { display: none; }
  .marker { font-size: 10px; margin-bottom: 18px; }
  .q3 { grid-template-columns: 1fr; gap: 38px; }
  .domains { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 0; }
  .domains > div, .domains > div:first-child { padding: 0 0 18px; }
  .domains dt { font-size: 23px; }
  .domains dd { font-size: 12px; }
  .map-sec { grid-template-columns: 1fr; grid-template-areas: "copy" "fig" "list"; gap: 30px; }
  .map-copy { max-width: none; }
  .map-copy > p:not(.marker) { max-width: 27em; }
  .readout { min-height: 310px; }
  .readout h3 { font-size: 29px; max-width: 22em; }
  .map-fig { width: 100%; max-width: 560px; justify-self: center; }
  .m-name { font-size: 42px; }
  .m-year { display: none; }
  .map-fig figcaption { font-size: 10px; gap: 7px 18px; padding: 12px 0 0; justify-content: center; }
  .map-hint { text-align: center; }
  .map-list ol { columns: 1; }
  .talks { grid-template-columns: 1fr; gap: 48px; }
  .talk-feature { grid-row: 2; }
  .talk-feature h3 { font-size: 35px; }
  .talk-list { max-width: none; }
  .about-card { grid-template-columns: 1fr; gap: 36px; }
  .about-card img { width: 240px; }
  .about-card > div { max-width: 560px; }
  .contact { justify-content: flex-start; padding-top: 40px; padding-bottom: 80px; }
  .contact .mail { font-size: clamp(20px, 5.8vw, 38px); }
  .footer { flex-wrap: wrap; gap: 20px 24px; padding: 24px var(--gutter); }
  .footer > a { flex-basis: 100%; }
  .site-note { max-width: calc(100% - 120px); }
}
@media (max-width: 360px) {
  :root { --gutter: 20px; }
  .bar { padding-inline: 12px; }
  .menu a { padding-inline: 6px; }
  .q1 { padding-right: 30px; }
  .q2 { padding-left: 30px; }
  .hero h1 { font-size: 62px; }
  .domains { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Throughline cues: the field's current regime in the bar, and a thin line
   where each section starts, lit for the section being read. */
.state { margin: 0; font-size: 12px; color: var(--subtle); white-space: nowrap; }
.state b { font-weight: 500; color: var(--accent); }
.sec { position: relative; }
.boundary { position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 1px; background: linear-gradient(90deg, var(--accent), rgba(168, 197, 229, 0)); opacity: 0.18; transition: opacity 0.6s; pointer-events: none; }
.sec.on .boundary { opacity: 0.7; }
@media (max-width: 960px) { .state { display: none; } }
