/*
 * Cistron Systematic: site stylesheet
 *
 * Concept: the page is an open canvas. Fixed vertical guide lines run through
 * the whole site; content is either written directly on the canvas or pinned to
 * it as a sheet. There are no horizontal rules anywhere: separation comes from
 * space, sheets and shadow, never from lines.
 *
 * Sections
 *   1. Tokens
 *   2. Base
 *   3. Canvas and layout
 *   4. Type helpers
 *   5. Buttons, tags, links
 *   6. Sheets
 *   7. Header and navigation
 *   8. Footer
 *   9. Page heads
 *  10. Home
 *  11. Research overview and publications
 *  12. Research area pages
 *  13. Methodology
 *  14. Our Team
 *  15. Join us
 *  16. Legal pages
 *  17. Research detail pages
 *  18. Utilities and motion
 */

/* 1. Tokens */

:root {
  --canvas: #f4f2ee;
  --paper: #fcfbf9;
  --ink: #111111;
  --ink-soft: #2b2a28;
  --muted: #5f5c57;
  --quiet: #8a867f;
  --tint: rgba(17, 17, 17, 0.05);
  --tint-strong: rgba(17, 17, 17, 0.09);
  --guide: rgba(17, 17, 17, 0.075);
  --night: #0c0c0d;
  --night-text: #f2efe8;
  --night-muted: rgba(242, 239, 232, 0.62);

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font-serif: "Times New Roman", Times, Georgia, serif;

  /* layout */
  --gutter: clamp(20px, 5vw, 80px);
  --frame: min(1320px, calc(100vw - 2 * var(--gutter)));
  --bands: 6;
  --band: calc(var(--frame) / var(--bands));
  --space-section: clamp(120px, 15vw, 240px);
  --space-block: clamp(56px, 6vw, 96px);
  --sheet-pad: clamp(28px, 3.4vw, 52px);
  --sheet-inset: clamp(10px, 1.1vw, 18px);

  --shadow-sheet: 0 1px 2px rgba(17, 17, 17, 0.04), 0 18px 48px -18px rgba(17, 17, 17, 0.18);
  --shadow-lift: 0 2px 4px rgba(17, 17, 17, 0.05), 0 30px 70px -24px rgba(17, 17, 17, 0.26);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (max-width: 900px) {
  :root { --bands: 4; }
}

@media (max-width: 560px) {
  :root { --bands: 2; }
}

/* 2. Base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

figure {
  margin: 0;
}

hr {
  display: none;
}

::selection {
  background: rgba(17, 17, 17, 0.12);
}

/* Keyboard focus: a vertical marker and a soft tint, never a box outline */
:focus {
  outline: none;
}

:focus-visible {
  outline: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  background-color: var(--tint-strong);
  box-shadow: inset 3px 0 0 var(--ink);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  background-color: #ffffff;
  box-shadow: 0 10px 24px -12px rgba(17, 17, 17, 0.35);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
}

.skip-link:focus-visible {
  top: 16px;
  background: var(--ink);
}

/* 3. Canvas and layout */

/* The canvas: vertical guide lines, aligned with the layout bands, across the whole page */
body::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: var(--frame);
  transform: translateX(-50%);
  border-left: 1px solid var(--guide);
  border-right: 1px solid var(--guide);
  background-image: linear-gradient(to right, var(--guide) 1px, transparent 1px);
  background-size: var(--band) 100%;
  background-position: -1px 0;
  pointer-events: none;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.frame {
  width: var(--frame);
  margin-inline: auto;
}

/* 12 columns, 2 columns per guide band */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.section {
  padding-block: 0 var(--space-section);
}

.section-head {
  display: grid;
  gap: 18px;
  max-width: 46rem;
  padding-inline: var(--sheet-inset);
  margin-bottom: var(--space-block);
}

.prose {
  max-width: 40rem;
}

.prose p + p {
  margin-top: 1.25em;
}

/* 4. Type helpers */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--quiet);
}

.display {
  font-size: clamp(3.6rem, 10vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.title {
  font-size: clamp(3rem, 7.2vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.heading {
  font-size: clamp(2.1rem, 4.2vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.subheading {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 38rem;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.6;
  color: var(--muted);
}

.text-muted {
  color: var(--muted);
}

/* 5. Buttons, tags, links */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  line-height: 1;
  letter-spacing: -0.005em;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background-color 220ms var(--ease);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -16px rgba(17, 17, 17, 0.55);
}

.button--paper {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sheet);
}

.button--paper:hover {
  box-shadow: var(--shadow-lift);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
}

.arrow-link::after {
  content: "→";
  transition: transform 220ms var(--ease);
}

.arrow-link:hover::after {
  transform: translateX(5px);
}

.text-link {
  font-weight: 500;
  color: var(--ink);
  transition: color 160ms ease;
}

.text-link:hover {
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--tint);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

/* 6. Sheets: content pinned to the canvas */

.sheet {
  position: relative;
  margin-inline: var(--sheet-inset);
  padding: var(--sheet-pad);
  background: var(--paper);
  box-shadow: var(--shadow-sheet);
}

/* the pin */
.sheet::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: #2a2927;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
}

a.sheet,
.sheet--lift {
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease);
}

a.sheet:hover,
.sheet--lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.sheet--night {
  background: var(--night);
  color: var(--night-text);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55);
}

.sheet--night::before {
  background: #d9d5cc;
}

.sheet--night h2,
.sheet--night h3 {
  color: var(--night-text);
}

.sheet--night .eyebrow {
  color: var(--night-muted);
}

.sheet--photo {
  padding: 12px 12px 0;
}

.sheet--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 7. Header and navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 22px;
  transition: transform 320ms var(--ease), background-color 320ms ease;
}

/* soft fade instead of a bottom line once the page scrolls under the header */
.site-header::after {
  content: "";
  position: absolute;
  inset: 0 0 -28px;
  z-index: -1;
  background: linear-gradient(to bottom, var(--canvas) 0%, var(--canvas) 72%, rgba(244, 242, 238, 0) 100%);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.site-header.is-scrolled::after {
  opacity: 0.96;
}

.site-header.header-hidden {
  transform: translateY(-110%);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding-inline: var(--sheet-inset);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  mix-blend-mode: multiply;
}

.site-nav {
  justify-self: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 28px);
}

.nav-item {
  position: relative;
}

.nav-link,
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 220ms var(--ease);
}

.nav-item.is-open .nav-trigger::after {
  transform: translateY(3px) rotate(225deg);
}

.nav-link:hover,
.nav-trigger:hover,
.nav-link.active,
.nav-trigger.active {
  color: var(--ink);
}

/* active page: a small dot, not an underline */
.nav-link.active::before,
.nav-trigger.active::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  display: grid;
  gap: 2px;
  min-width: 270px;
  padding: 30px 14px 14px;
  background: var(--paper);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity 200ms ease, transform 240ms var(--ease), visibility 0s linear 240ms;
}

.nav-panel::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: #2a2927;
}

/* bridge the gap so hover does not drop when moving into the panel */
.nav-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-item.is-open .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 200ms ease, transform 240ms var(--ease), visibility 0s;
}

@media (hover: hover) and (min-width: 981px) {
  .nav-item--group:hover .nav-panel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 200ms ease, transform 240ms var(--ease), visibility 0s;
  }
}

.nav-panel a {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background-color 160ms ease;
}

.nav-panel a small {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--quiet);
}

.nav-panel a:hover,
.nav-panel a.active {
  background: var(--tint);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.noemir-header-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-sheet);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease);
}

.noemir-header-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.noemir-header-icon svg {
  width: 17px;
  height: 17px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 500;
}

/* menu icon: four dots */
.nav-toggle-icon {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  gap: 3px;
}

.nav-toggle-icon i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .noemir-header-action span:last-child {
    display: none;
  }

  .noemir-header-action {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .header-actions {
    grid-column: 3;
  }

  /* mobile menu: a full canvas overlay */
  .site-nav {
    position: fixed;
    inset: 0;
    justify-self: stretch;
    align-self: stretch;
    z-index: -1;
    display: block;
    padding: 120px calc(var(--gutter) + var(--sheet-inset) + 8px) 60px;
    overflow-y: auto;
    background: var(--canvas);
    opacity: 0;
    visibility: hidden;
    transition: opacity 240ms ease, visibility 0s linear 240ms;
  }

  .site-nav::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    width: var(--frame);
    transform: translateX(-50%);
    border-left: 1px solid var(--guide);
    border-right: 1px solid var(--guide);
    background-image: linear-gradient(to right, var(--guide) 1px, transparent 1px);
    background-size: var(--band) 100%;
    background-position: -1px 0;
    pointer-events: none;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transition: opacity 240ms ease, visibility 0s;
  }

  body.nav-open .site-header {
    transform: none;
  }

  body.nav-open .site-header::after {
    opacity: 0;
  }

  .nav-list {
    position: relative;
    display: grid;
    gap: 34px;
    align-items: start;
  }

  .nav-link,
  .nav-trigger {
    min-height: 0;
    padding: 0;
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 9vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1;
    pointer-events: auto;
  }

  .nav-trigger {
    cursor: default;
  }

  .nav-trigger::after,
  .nav-link.active::before,
  .nav-trigger.active::before {
    display: none;
  }

  .nav-panel {
    position: static;
    min-width: 0;
    margin-top: 16px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .nav-panel::before,
  .nav-panel::after {
    display: none;
  }

  .nav-panel a {
    padding: 8px 0;
    font-size: 1.05rem;
  }

  .nav-panel a:hover,
  .nav-panel a.active {
    background: transparent;
  }

  .nav-panel a.active {
    font-weight: 600;
  }

  .nav-panel a small {
    display: none;
  }
}

/* 8. Footer: a dark sheet pinned to the bottom of the canvas */

.site-footer {
  padding-bottom: var(--gutter);
}

.footer-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 80px) clamp(28px, 4vw, 64px);
  padding: clamp(48px, 6vw, 88px) var(--sheet-pad) var(--sheet-pad);
}

.footer-about {
  display: grid;
  gap: 18px;
  align-content: start;
  max-width: 26rem;
}

.footer-brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-about p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--night-muted);
}

.footer-about .footer-description {
  color: var(--night-text);
}

.footer-col {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer-col .eyebrow {
  margin-bottom: 8px;
}

.footer-col a {
  font-size: 0.9375rem;
  color: rgba(242, 239, 232, 0.86);
  transition: color 160ms ease;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-base {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: clamp(24px, 3vw, 40px);
  font-size: 0.8125rem;
  color: var(--night-muted);
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(242, 239, 232, 0.08);
  color: var(--night-text);
  transition: background-color 180ms ease;
}

.footer-icon-button:hover {
  background: rgba(242, 239, 232, 0.18);
}

.footer-icon-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (max-width: 900px) {
  .footer-sheet {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-sheet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 9. Page heads */

.page-head {
  padding-block: clamp(120px, 16vw, 260px) var(--space-section);
}

.page-head-inner {
  display: grid;
  gap: clamp(24px, 3vw, 40px);
  padding-inline: var(--sheet-inset);
}

.page-head .lead {
  max-width: 40rem;
}

/* 10. Home */

.home-hero {
  min-height: calc(100vh - 84px);
  min-height: calc(100svh - 84px);
  display: grid;
  align-items: center;
  padding-block: clamp(80px, 12vw, 160px);
}

.home-hero {
  align-items: end;
  padding-block: clamp(48px, 8vh, 110px) clamp(48px, 9vh, 110px);
}

.home-hero-inner {
  display: grid;
  gap: clamp(48px, 5.5vw, 88px);
  padding-inline: var(--sheet-inset);
}

/* the animated logo: every line runs on its own orbit around one shared centre (0,0 in the SVG).
   Outer ring of each system turns clockwise, inner ring counter-clockwise, 10 degrees per second. */
.hero-logo {
  width: clamp(220px, min(27vw, 44vh), 420px);
  height: auto;
  color: var(--ink);
  overflow: visible;
}

.logo-ring {
  transform-box: view-box;
  transform-origin: 0 0;
  animation: logo-spin 36s linear infinite;
}


.logo-ring--outer-ccw,
.logo-ring--inner-ccw {
  animation-direction: reverse;
}

@keyframes logo-spin {
  to { transform: rotate(360deg); }
}

.home-intro {
  grid-column: 1 / span 7;
  display: grid;
  gap: 28px;
  padding-inline: var(--sheet-inset);
}

.home-intro .button-row {
  margin-top: 12px;
}

.home-operating {
  display: grid;
  gap: clamp(48px, 6vw, 88px);
  padding-top: clamp(64px, 7vw, 110px);
}

.home-operating .heading {
  max-width: 18ch;
  margin-top: 18px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(32px, 5vw, 80px);
}

.metric-value {
  font-family: var(--font-serif);
  font-size: clamp(3.6rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.metric-label {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--quiet);
}

.metric-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
}

.home-areas {
  row-gap: clamp(28px, 3vw, 44px);
}

.home-areas .section-head {
  grid-column: 1 / -1;
}

.area-card {
  grid-column: span 4;
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 100%;
  padding-top: calc(var(--sheet-pad) + 18px);
}

.area-card .subheading {
  margin-top: 4px;
}

.area-card p:not(.eyebrow) {
  color: var(--muted);
}

.area-card .arrow-link {
  margin-top: 10px;
}

.home-founding {
  align-items: center;
}

.home-founding-copy {
  grid-column: 1 / span 6;
  display: grid;
  gap: 28px;
  padding-inline: var(--sheet-inset) clamp(0px, 3vw, 48px);
}

.home-founding-copy .title span {
  display: block;
}

.home-founding-photo {
  grid-column: 8 / span 5;
  aspect-ratio: 4 / 5;
  transform: rotate(0.6deg);
}

.home-founding-photo img {
  height: calc(100% - 12px);
}

.home-newsletter {
  grid-column: 1 / span 6;
  display: grid;
  gap: 22px;
  justify-items: start;
  padding-top: calc(var(--sheet-pad) + 12px);
}

/* 11. Research overview and publications */

.research-areas {
  row-gap: clamp(28px, 3vw, 44px);
}

.research-areas .section-head {
  grid-column: 1 / -1;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-inline: var(--sheet-inset);
  margin-bottom: clamp(36px, 4vw, 56px);
}

.filter-button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--tint);
  font-size: 0.875rem;
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease;
}

.filter-button:hover {
  background: var(--tint-strong);
  color: var(--ink);
}

.filter-button.active {
  background: var(--ink);
  color: var(--paper);
}

.publication-grid {
  row-gap: clamp(28px, 3vw, 44px);
}

.publication-card {
  grid-column: span 4;
  display: grid;
  gap: 16px;
  align-content: start;
  padding-top: calc(var(--sheet-pad) + 14px);
}

.publication-card[hidden] {
  display: none;
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.publication-card h3 {
  font-size: clamp(1.45rem, 2vw, 1.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.publication-card p {
  font-size: 0.975rem;
  color: var(--muted);
}

.publication-card .publication-author {
  font-size: 0.875rem;
  color: var(--quiet);
}

.publication-card .arrow-link {
  margin-top: 6px;
}

/* 12. Research area pages */

.area-body {
  row-gap: var(--space-block);
}

.area-opening {
  grid-column: 1 / span 8;
  padding-inline: var(--sheet-inset);
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

.area-block {
  grid-column: span 6;
  display: grid;
  gap: 20px;
  align-content: start;
  padding-top: calc(var(--sheet-pad) + 14px);
}

.area-block:nth-of-type(3n + 1) {
  grid-column: 1 / span 6;
}

.area-block:last-child:nth-of-type(odd) {
  grid-column: 4 / span 6;
}

.area-block p {
  color: var(--muted);
}

.coming-soon {
  grid-column: 1 / span 4;
  display: grid;
  gap: 16px;
  align-content: end;
  min-height: 300px;
  padding-top: calc(var(--sheet-pad) + 14px);
}

/* 13. Methodology */

.method-list {
  row-gap: clamp(72px, 9vw, 140px);
}

.method-item {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.method-item .method-index {
  grid-column: 1 / span 2;
  padding-inline: var(--sheet-inset);
  padding-top: 0.6em;
}

.method-item .heading {
  grid-column: 3 / span 7;
  padding-inline: var(--sheet-inset);
  margin-bottom: 36px;
}

.method-item .sheet {
  grid-column: 3 / span 8;
  padding-top: calc(var(--sheet-pad) + 14px);
}

.method-item .sheet p {
  color: var(--muted);
}

.method-item .sheet p + p {
  margin-top: 1.25em;
}

/* 14. Our Team */

.team-area + .team-area {
  margin-top: var(--space-section);
}

.team-grid {
  row-gap: clamp(32px, 4vw, 56px);
}

.team-grid .section-head {
  grid-column: 1 / -1;
  margin-bottom: clamp(16px, 2vw, 32px);
}

.person-card {
  grid-column: span 4;
  display: grid;
  align-content: start;
  padding: 12px 12px 0;
}

.person-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--tint);
}

.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: transform 600ms var(--ease);
}

.person-card:hover .person-photo img {
  transform: scale(1.025);
}

.person-body {
  display: grid;
  gap: 8px;
  padding: 26px 16px 30px;
}

.person-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.person-name-row h3 {
  font-size: 1.65rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.person-role {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.person-education {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

.linkedin-button {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--ink);
  transition: background-color 160ms ease;
}

.linkedin-button:hover {
  background: var(--tint-strong);
}

.linkedin-button svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* 15. Join us */

.careers-tracks {
  row-gap: clamp(28px, 3vw, 44px);
}

.careers-tracks .section-head {
  grid-column: 1 / -1;
}

.track-card {
  grid-column: span 6;
  display: grid;
  gap: 22px;
  align-content: start;
  padding-top: calc(var(--sheet-pad) + 14px);
}

.track-card > p:not(.eyebrow) {
  color: var(--muted);
}

.track-list {
  display: grid;
  gap: 14px;
}

.track-card > .eyebrow + .track-list {
  margin-top: -6px;
}

.track-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.track-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.track-list--muted li {
  color: var(--quiet);
}

.track-list--muted li::before {
  background: var(--quiet);
}

.roles {
  row-gap: 28px;
}

.roles .section-head {
  grid-column: 1 / -1;
}

.role-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px 32px;
  padding-block: calc(var(--sheet-pad) * 0.8 + 8px) calc(var(--sheet-pad) * 0.8);
}

.role-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.role-entry-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--quiet);
}

.role-card .tag-row {
  justify-content: flex-end;
}

.careers-story {
  row-gap: clamp(72px, 9vw, 140px);
}

.story-item {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
}

.story-photo {
  grid-column: 1 / span 6;
  aspect-ratio: 4 / 3;
}

.story-photo img {
  height: calc(100% - 12px);
}

.story-copy {
  grid-column: 8 / span 5;
  display: grid;
  gap: 24px;
  padding-inline: var(--sheet-inset);
}

.story-copy p {
  color: var(--muted);
}

.story-item--reverse .story-photo {
  grid-column: 7 / span 6;
  grid-row: 1;
}

.story-item--reverse .story-copy {
  grid-column: 1 / span 5;
  grid-row: 1;
}

/* 16. Legal pages */

.legal-list {
  row-gap: clamp(28px, 3vw, 44px);
}

.legal-item {
  grid-column: 1 / span 6;
  display: grid;
  gap: 16px;
  align-content: start;
}

.legal-item:nth-child(even) {
  grid-column: 7 / span 6;
}

.legal-item h2 {
  font-size: clamp(1.45rem, 2vw, 1.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.legal-item p,
.legal-item address {
  font-size: 0.975rem;
  color: var(--muted);
}

.legal-item p + p {
  margin-top: 0.4em;
}

/* 17. Research detail pages */

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-body {
  grid-column: 1 / span 8;
  display: grid;
  gap: 18px;
  padding-top: calc(var(--sheet-pad) + 14px);
}

.detail-body h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-top: 18px;
}

.detail-body h2:first-child {
  margin-top: 0;
}

.detail-body p,
.detail-body li {
  color: var(--muted);
}

.detail-body ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  list-style: disc;
}

.status-sheet {
  grid-column: 1 / span 7;
  display: grid;
  gap: 22px;
  justify-items: start;
  padding-top: calc(var(--sheet-pad) + 14px);
}

@media (max-width: 900px) {
  .status-sheet { grid-column: 1 / -1; }
}


/* Paper pages (generated by tools/build_publications.py) */

.paper-authors {
  color: var(--muted);
  font-size: 0.975rem;
}

.paper-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 24px;
  margin: 0;
  font-size: 0.95rem;
}

.paper-details dt {
  color: var(--quiet);
}

.paper-details dd {
  margin: 0;
  color: var(--ink-soft);
  min-width: 0;
}

.paper-hash {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  word-break: break-all;
  color: var(--muted);
}

.paper-bibtex {
  margin: 0;
  padding: 18px 20px;
  background: var(--tint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.paper-versions {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

/* 18. Responsive layout */

@media (max-width: 1100px) {
  .home-intro { grid-column: 1 / span 9; }
  .area-opening { grid-column: 1 / span 10; }
  .method-item .heading { grid-column: 3 / span 10; }
  .method-item .sheet { grid-column: 3 / span 10; }
  .detail-body { grid-column: 1 / span 10; }
}

@media (max-width: 900px) {
  .area-card,
  .publication-card,
  .person-card {
    grid-column: span 6;
  }

  .area-card:last-child:nth-child(even),
  .publication-card:last-child:nth-child(odd) {
    grid-column: span 6;
  }

  .home-intro,
  .home-founding-copy,
  .home-newsletter,
  .area-opening,
  .detail-body {
    grid-column: 1 / -1;
  }

  .home-founding {
    row-gap: var(--space-block);
  }

  .home-founding-photo {
    grid-column: 1 / span 8;
  }

  .area-block,
  .area-block:nth-of-type(3n + 1),
  .area-block:last-child:nth-of-type(odd) {
    grid-column: 1 / -1;
  }

  .track-card {
    grid-column: 1 / -1;
  }

  .method-item .method-index,
  .method-item .heading,
  .method-item .sheet {
    grid-column: 1 / -1;
  }

  .method-item .method-index {
    padding-top: 0;
    margin-bottom: 18px;
  }

  .role-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .role-card .tag-row {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .story-item,
  .story-item--reverse {
    row-gap: var(--space-block);
  }

  .story-photo,
  .story-item--reverse .story-photo {
    grid-column: 1 / span 10;
    grid-row: 1;
  }

  .story-copy,
  .story-item--reverse .story-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .legal-item,
  .legal-item:nth-child(even) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .area-card,
  .publication-card,
  .person-card,
  .area-card:last-child:nth-child(even),
  .publication-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .home-founding-photo,
  .story-photo,
  .story-item--reverse .story-photo {
    grid-column: 1 / -1;
  }

  .role-card {
    grid-template-columns: 1fr;
  }

  .coming-soon {
    grid-column: 1 / -1;
  }

  .role-card .button {
    justify-self: start;
  }

}

/* Utilities and motion */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 900ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .logo-ring {
    animation: none;
  }
}

/* v1.8.0: area bodies with an even block count sit in pairs */
.area-body--pairs .area-block,
.area-body--pairs .area-block:nth-of-type(3n + 1) {
  grid-column: span 6;
}

.area-body--pairs .area-block:last-child:nth-of-type(odd) {
  grid-column: 4 / span 6;
}

@media (max-width: 900px) {
  .area-body--pairs .area-block,
  .area-body--pairs .area-block:nth-of-type(3n + 1),
  .area-body--pairs .area-block:last-child:nth-of-type(odd) {
    grid-column: 1 / -1;
  }
}


/* v1.8.1 -------------------------------------------------------------- */

/* sheets without pins */
.sheet::before {
  content: none;
}

.area-card,
.track-card {
  padding-top: var(--sheet-pad);
}

/* sublines use the width of the page */
.lead {
  max-width: 60rem;
}

.page-head .lead {
  max-width: 62rem;
}

/* hero: more air between "Find what holds" and the mission */
.home-hero {
  padding-bottom: clamp(96px, 20vh, 240px);
}

.home-intro {
  grid-column: 1 / span 10;
}

/* operating reality: one line, compact */
.home-operating {
  gap: clamp(32px, 3.5vw, 52px);
  padding-top: var(--sheet-pad);
}

.home-operating .heading {
  max-width: none;
  margin-top: 14px;
  font-size: clamp(1.7rem, 2.9vw, 2.6rem);
}

.home-operating .metric-value {
  font-size: clamp(2.8rem, 5vw, 4.4rem);
}

.home-operating .metric-row {
  grid-template-columns: repeat(auto-fit, minmax(200px, 320px));
}

/* career tracks: three full-width sheets, one below the other */
.careers-tracks {
  row-gap: clamp(24px, 2.6vw, 36px);
}

.track-card {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(40px, 7vw, 128px);
  align-items: start;
  padding-block: clamp(40px, 4.4vw, 64px);
}

.track-intro,
.track-work {
  display: grid;
  gap: 18px;
  align-content: start;
}

.track-intro .subheading {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.track-intro p:not(.eyebrow) {
  max-width: 30rem;
  color: var(--muted);
}

.track-work {
  padding-top: 6px;
}

.track-list li {
  padding-block: 12px;
  padding-left: 0;
  border-bottom: 0;
}

.track-list li::before {
  content: none;
}

.track-list {
  gap: 0;
  counter-reset: track-item;
}

.track-list li {
  counter-increment: track-item;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  align-items: baseline;
}

.track-list li::after {
  content: counter(track-item, decimal-leading-zero);
  order: -1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--quiet);
}

@media (max-width: 900px) {
  .home-intro {
    grid-column: 1 / -1;
  }

  .track-card {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }
}
