:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1b1d22;
  --muted: #5d6470;
  --line: #e4e1da;
  --accent: #0b6e6e;
  --accent-contrast: #ffffff;
  --max: 68rem;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --surface: #181b21;
    --text: #eceae4;
    --muted: #a0a6b0;
    --line: #2a2e36;
    --accent: #5fd0c4;
    --accent-contrast: #0c1114;
  }
}

* { box-sizing: border-box; }

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

h1, h2, h3, nav, .eyebrow, .button, .brand, .date, .role, .metric, .metric-note, footer {
  font-family: var(--sans);
}

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

/* A supercontinuum: one narrow line broadened into a full spectrum */
.spectrum {
  height: 4px;
  background: linear-gradient(90deg, #4b2a8f, #2a5bd0, #17a0b8, #2fb56a, #d9c21f, #e8862a, #c93a3a);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 0.9rem max(1.5rem, calc((100vw - var(--max)) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }

nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; font-size: 0.92rem; }
nav a { color: var(--muted); text-decoration: none; padding: 0.15rem 0; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

main { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

section { padding: 3.5rem 0; border-bottom: 1px solid var(--line); }

.hero { padding: 6rem 0 5rem; }
.page-head { padding: 4rem 0 3rem; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0; }
.page-head .lede { margin: 1.25rem 0 0; }

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}

h2 { margin: 0 0 1.75rem; font-size: 1.5rem; letter-spacing: -0.02em; }
h3 { margin: 0 0 0.5rem; font-size: 1.08rem; letter-spacing: -0.01em; line-height: 1.35; }

.lede { max-width: 42rem; font-size: 1.2rem; color: var(--muted); margin: 0 0 2rem; }
.narrow { max-width: 44rem; }
.funding { color: var(--muted); font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

.button {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.button.ghost { background: transparent; color: var(--accent); }
.button:hover { filter: brightness(1.08); }

.cards, .people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}
.cards article, .person, .metric {
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}
.cards p, .person p { margin: 0; font-size: 0.98rem; color: var(--muted); }

.date, .role {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.person .role { margin-bottom: 0.6rem; }
.person.lead { max-width: 48rem; border-left: 4px solid var(--accent); }

.news-list { display: grid; gap: 0; max-width: 48rem; }
.news-item { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; padding-top: 0; }
.news-item h3 { font-size: 1.2rem; }
.news-item p:last-child { margin-bottom: 0; }
.more { margin: 1.5rem 0 0; font-family: var(--sans); font-size: 0.95rem; }

.topics, .works { display: grid; gap: 2rem; max-width: 48rem; }
.topics p, .works p { margin: 0 0 0.8rem; }
.works article { padding-left: 1.25rem; border-left: 4px solid var(--line); }
.works h3 { font-size: 1.25rem; }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  max-width: 48rem;
}
.metric .value {
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.metric .label { font-size: 0.85rem; color: var(--muted); }
.metric:first-child { border-color: var(--accent); }
.metric:first-child .value { color: var(--accent); }
.metric-note { margin: 1rem 0 0; font-size: 0.88rem; color: var(--muted); max-width: 48rem; }

.pubs { margin: 0; padding-left: 1.6rem; max-width: 52rem; font-size: 0.98rem; }
.pubs li { padding: 0.45rem 0 0.45rem 0.3rem; overflow-wrap: anywhere; }
.pubs li::marker { color: var(--muted); font-family: var(--sans); font-size: 0.85rem; }

.columns3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.columns3 ul { margin: 0; padding-left: 1.1rem; }
.columns3 li { padding: 0.15rem 0; }

footer {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding: 2.5rem 1.5rem 3.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}
footer p { margin: 0 0 0.25rem; }
footer strong { color: var(--text); }

@media (max-width: 720px) {
  .hero { padding: 3.5rem 0 3rem; }
  section { padding: 2.75rem 0; }
}

/* Pictures */
img { max-width: 100%; height: auto; display: block; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.hero-fig, .work-fig {
  margin: 0;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}
.work-fig { margin: 1rem 0 1.25rem; max-width: 30rem; }

.news-figs { display: grid; gap: 0.75rem; margin: 1rem 0 1.25rem; }
.news-figs.n2 { grid-template-columns: 1fr 1fr; }
.news-figs img {
  width: 100%;
  height: 100%;
  max-height: 22rem;
  object-fit: cover;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-fig { max-width: 24rem; }
}
.work-fig.flush { padding: 0; overflow: hidden; max-width: 40rem; background: none; }
.hero-fig.flush { padding: 0; overflow: hidden; background: none; }
@media (max-width: 720px) { .hero-fig.flush { max-width: none; } }
.group-label { margin: 0 0 1rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.news-figs.tall { max-width: 24rem; }
.news-figs.tall img { max-height: none; height: auto; }
.news-figs.full img { max-height: none; height: auto; background: #ffffff; }
.credit { margin: -0.6rem 0 1.1rem; font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }
.news-figs.tall.wide { max-width: 30rem; }
.person .focus { margin-top: 0.5rem; color: var(--text); }
.person .focus span { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-right: 0.35rem; }
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.15rem; margin: 2rem 0 0.6rem; }
.legal h2:first-child { margin-top: 0; }
.legal address { font-style: normal; }

/* Home page banner: full-width background picture behind the headline block */
body { overflow-x: clip; }
.hero.banner {
  position: relative;
  isolation: isolate;
  border-bottom: 0;
  --text: #f4f2ec;
  --muted: #cdd2da;
  --accent: #6fdccf;
  --accent-contrast: #0c1114;
  --line: rgba(255, 255, 255, 0.22);
  color: var(--text);
}
.hero.banner::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background-color: #0b0d11;
  background-image:
    linear-gradient(90deg, rgba(9, 11, 15, 0.92) 0%, rgba(9, 11, 15, 0.82) 34%, rgba(9, 11, 15, 0.42) 54%, rgba(9, 11, 15, 0.3) 72%, rgba(9, 11, 15, 0.55) 100%),
    url("images/hero-banner.jpg");
  background-repeat: no-repeat;
  background-size: auto, cover;
  background-position: 0 0, 60% 50%;
}

@media (min-width: 1000px) {
  /* Enlarge the banner so the fiber and neuron sit in the gap between text and photo */
  .hero.banner::before { background-size: auto, max(131%, 1310px) auto; background-position: 0 0, 0% 48%; }
}

/* Icons in the "What we work on" cards */
.area-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.7rem; }
.area-head h3 { margin: 0; }
.area-icon {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  background-color: var(--accent);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* News in two columns on wide screens */
@media (min-width: 900px) {
  .news-list {
    max-width: none;
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
    align-items: start;
  }
  .news-item:nth-child(2) { border-top: 0; padding-top: 0; }
}
