:root {
  --bg: #06080b;
  /* text, brightest to quietest. Even the quietest clears 4.5:1 on --bg,
     and the halo below keeps it legible over the star field and robots */
  --text: #f3f6f9;     /* titles, names */
  --soft: #d3dae3;     /* body copy, authors, descriptions */
  --muted: #a7b1bf;    /* secondary details */
  --faint: #828c9a;    /* years, small labels */
  --venue: #a9bce0;    /* where a paper appeared: a cool tint so it reads apart from the authors */
  --halo: 0 0 2px rgba(6, 8, 11, 0.95), 0 0 8px rgba(6, 8, 11, 0.85);
  --line: rgba(255, 255, 255, 0.09);
  --accent: #6df0c2;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(1.25rem, 7vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 0.2em; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
cite { font-style: normal; }

/* point cloud */
#cloud, #overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
main, .site-header { position: relative; z-index: 1; text-shadow: var(--halo); }
/* the pointer is over something a background robot can pick up */
.over-prop, .over-prop body { cursor: pointer; }

/* header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  font: 400 0.8125rem/1 var(--mono);
  background: linear-gradient(var(--bg), rgba(6, 8, 11, 0));
}
.site-header a { text-decoration: none; color: var(--muted); }
.site-header a:hover { color: var(--text); }
.site-header .wordmark { color: var(--text); letter-spacing: 0.02em; }
.site-header nav { display: flex; gap: clamp(0.9rem, 2.4vw, 2rem); }
.header-right { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.site-header .social {
  gap: 0.35rem;
  padding-left: clamp(1rem, 2.4vw, 2rem);
  border-left: 1px solid var(--line);
}
.social a { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 4px; }
.social a:hover { color: var(--accent); background: rgba(109, 240, 194, 0.08); }
.social svg { width: 1.05rem; height: 1.05rem; }

/* full-height stages: copy on the left, the cloud takes the right */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 6rem var(--gutter);
}
.copy { max-width: 33rem; }

.eyebrow {
  font: 400 0.75rem/1.5 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.eyebrow .index { color: var(--accent); margin-right: 0.75em; }

h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.copy h1, .copy h2 { margin-bottom: 1.5rem; }
.copy p { color: var(--soft); text-wrap: pretty; }
.copy p + p { margin-top: 1rem; }

.hero .tagline {
  display: grid;
  margin-bottom: 1.25rem;
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text);
}
/* the lines share one grid cell, so the block is as tall as the longest */
.tagline .line { grid-area: 1 / 1; visibility: hidden; }
.tagline .line.is-on { visibility: visible; }
/* typing cursor, shown while main.js types and deletes the lines */
.tagline.typing .line.is-on::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* one key word per tagline, each with its own small joke */
.fx {
  display: inline-block;
  font-family: var(--mono);
  color: var(--accent);
}

/* revs like a motor */
.fx-brr { animation: brr 2.6s infinite; }
@keyframes brr {
  0%, 82%, 100% { transform: translate(0, 0); }
  84% { transform: translate(-1px, 1px); }
  86% { transform: translate(1.5px, -1px); }
  88% { transform: translate(-1.5px, 0); }
  90% { transform: translate(1px, 1px); }
  92% { transform: translate(-1px, -1px); }
  94% { transform: translate(1px, 0); }
}

/* "occasionally": the signal keeps dropping out */
.fx-listen { animation: listen 3.2s infinite; }
@keyframes listen {
  0%, 55%, 100% { opacity: 1; }
  57% { opacity: 0.15; }
  59% { opacity: 1; }
  61% { opacity: 0.25; }
  64% { opacity: 1; }
  86% { opacity: 1; }
  88% { opacity: 0.3; }
  90% { opacity: 1; }
}

/* a literal gradient, in the depth view's colours */
.fx-gradient {
  background: linear-gradient(90deg, #4686fb, #1ae4b6, #a2fc3c, #faba39, #f05b12, #4686fb) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep 4s linear infinite;
}
@keyframes sweep {
  to { background-position: 200% 0; }
}

/* reality refuses to line up with the model */
.fx-glitch { animation: glitch 3s infinite; }
@keyframes glitch {
  0%, 84%, 100% { transform: none; text-shadow: none; }
  86% { transform: translateX(1px); text-shadow: -2px 0 rgba(255, 92, 92, 0.9), 2px 0 rgba(92, 150, 255, 0.9); }
  88% { transform: translateX(-1px); text-shadow: 2px 0 rgba(255, 92, 92, 0.9), -2px 0 rgba(92, 150, 255, 0.9); }
  90% { transform: none; text-shadow: none; }
  93% { transform: translate(1px, -1px) skewX(-6deg); text-shadow: -3px 0 rgba(255, 92, 92, 0.8), 3px 0 rgba(92, 150, 255, 0.8); }
  95% { transform: none; text-shadow: none; }
}
.hero .lede { font-size: 1.1875rem; line-height: 1.5; color: var(--soft); }

/* the four-step philosophy: a line runs through the steps to show each feeds the next */
.cascade {
  position: relative;
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding-left: 1.5rem;
}
.cascade::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 1px;
  background: linear-gradient(var(--accent), rgba(109, 240, 194, 0.15));
}
.cascade li { position: relative; }
.cascade li::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.32rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
}
.cascade .step {
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.cascade p { margin-top: 0.2rem !important; font-size: 0.9375rem; line-height: 1.5; color: var(--soft); }
.cascade + p { margin-top: 1.5rem; }

/* desktop: the name and each tagline sit on one line, sized to the viewport so
   they fit beside the point cloud */
@media (min-aspect-ratio: 21/20) {
  .hero h1 { white-space: nowrap; font-size: min(4.5vw, 4.75rem); }
  .hero .tagline { white-space: nowrap; font-size: min(1.42vw, 1.6rem); }
}
.hero .now { color: var(--soft); }

.facts {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.45rem;
  font-size: 0.9375rem;
  color: var(--soft);
}
.facts strong { font-weight: 500; color: var(--text); margin-right: 0.35em; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2rem;
  font: 400 0.8125rem/1.4 var(--mono);
}


.stat {
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  font-size: 0.9375rem;
  color: var(--text) !important;
}

.refs {
  margin-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  line-height: 1.45;
}
.refs li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); color: var(--soft); }
.refs span { display: block; margin-top: 0.15rem; font: 400 0.75rem/1.5 var(--mono); color: var(--muted); }

/* text-first sections: the cloud scatters into the background behind them */
.sheet {
  max-width: calc(54rem + 2 * var(--gutter));
  padding: 7rem var(--gutter) 2rem;
}
.sheet h2 { margin: 0 0 2rem; }
.sheet * + h2 { margin-top: 5rem; }

.pubs li, .roles li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.year { font: 400 0.75rem/1.9 var(--mono); color: rgba(109, 240, 194, 0.8); }
.pubs cite { font-weight: 500; }
.pubs cite a { text-decoration: none; }
.pubs cite a::after { content: " ↗"; font-size: 0.8em; color: var(--muted); }
.pubs cite a:hover::after { color: var(--accent); }
.pubs .me { font-weight: 600; color: var(--text); }
.pubs p, .roles p { font-size: 0.9375rem; color: var(--soft); margin-top: 0.25rem; }
.pubs .venue { font: 400 0.75rem/1.6 var(--mono); margin-top: 0.4rem; color: var(--venue); }
mark {
  background: none;
  color: var(--accent);
  border: 1px solid rgba(109, 240, 194, 0.4);
  border-radius: 3px;
  padding: 0.1em 0.5em;
  margin-left: 0.5em;
  white-space: nowrap;
}

.roles h3 { font-size: 1.0625rem; font-weight: 500; line-height: 1.35; }
.roles h3 span { display: block; font-size: 0.875rem; font-weight: 400; color: var(--muted); }
/* experience: the organisation's logo on a small white tile, the title underneath */
.jobs li { align-items: start; grid-template-columns: 9.5rem 1fr; } /* room for month ranges */
.jobs .year { padding-top: 0.7rem; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.6rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.55rem;
  background: #fff;
  color: #0b0d10;
  font: 600 0.95rem/1.2 var(--sans);
  letter-spacing: -0.01em;
  text-shadow: none;
}
.logo img { display: block; width: auto; height: 2.1rem; }
.logo img.wordmark { height: 0.95rem; }
.logo img.badge { height: 1.5rem; border-radius: 0.3rem; }
.logo svg { width: 1.9rem; height: auto; fill: currentColor; }
.jobs h3 { margin-top: 0.55rem; font-size: 1rem; font-weight: 500; color: var(--text); }
.roles p { margin-top: 0.5rem; max-width: 40rem; }
.news p { margin-top: 0; color: var(--soft); max-width: 40rem; }
.news .year { line-height: 2.1; }
.news a { color: var(--text); }

.contact { padding-bottom: 9rem; }
.contact .lede { color: var(--soft); }
.contact .links { font-size: 0.9375rem; }

/* RGB / depth switch */
.view-toggle {
  position: fixed;
  right: var(--gutter);
  bottom: 1.5rem;
  z-index: 2;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(6, 8, 11, 0.7);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.view-toggle[hidden] { display: none; }
.view-toggle button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font: 400 0.6875rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
}
.view-toggle button:hover { color: var(--text); }
.view-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }

/* narrow screens: the cloud sits in the top of the viewport, copy below it */
@media (max-aspect-ratio: 21/20) {
  .stage { align-items: flex-end; padding: 53svh var(--gutter) 4.5rem; }
  .stage::before {
    content: "";
    position: absolute;
    inset: 38svh 0 0 0;
    background: linear-gradient(rgba(6, 8, 11, 0), var(--bg) 22%);
    z-index: -1;
  }
  .copy { max-width: 36rem; }
  .hero h1 { white-space: nowrap; font-size: calc((100vw - 2 * var(--gutter)) / 9.8); }
  .view-toggle { top: 3.5rem; bottom: auto; }
  .site-header nav:not(.social) { display: none; }
  .site-header .social { padding-left: 0; border-left: 0; }
  .sheet { background: rgba(6, 8, 11, 0.72); }
  .pubs li, .roles li { grid-template-columns: 1fr; gap: 0.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fx { animation: none !important; }
}

/* 404 */
.lost h1 { margin: 0.5rem 0 1rem; font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.lost p + p { margin-top: 1rem; }
@media (max-aspect-ratio: 21/20) {
  .lost { align-items: center; padding-top: 6rem; }
}
