:root {
  --paper: #fbfaf7;
  --paper-quiet: #f2f2ed;
  --ink: #0b0c0c;
  --muted: #5d605c;
  --line: #d8d9d2;
  --line-strong: #9ca098;
  --red: #e43d31;
  --green: #4a9c68;
  --max: 1232px;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    repeating-linear-gradient(90deg, rgba(11, 12, 12, 0.035) 0, rgba(11, 12, 12, 0.035) 1px, transparent 1px, transparent calc((100vw - min(var(--max), 92vw)) / 2 + 154px)),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.58;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: stretch;
  min-height: 72px;
  padding: 0 clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--ink);
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  width: fit-content;
  min-height: 72px;
}

.brand-mark {
  font-size: clamp(25px, 2.7vw, 34px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
}

.brand-rule {
  width: 1px;
  height: 32px;
  background: var(--ink);
}

.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: clamp(22px, 4vw, 56px);
}

.site-nav a {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 72px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
  content: "";
}

.site-nav a.is-active {
  color: var(--red);
}

.site-nav a.is-active::after,
.site-nav a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  align-self: center;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 8px 12px;
  color: var(--ink);
  cursor: pointer;
}

.floating-menu {
  display: none;
}

.section {
  width: min(var(--max), 92vw);
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(480px, 1.22fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(22px, 4vw, 58px);
  min-height: calc(100vh - 72px);
  padding: clamp(42px, 7vh, 78px) 0 clamp(26px, 5vh, 48px);
}

.section-rail {
  position: absolute;
  left: calc((100vw - min(var(--max), 92vw)) / -2 + 32px);
  top: clamp(48px, 8vh, 86px);
  width: 76px;
  display: grid;
  gap: 28px;
}

.rail-item {
  position: relative;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.1;
  text-transform: uppercase;
}

.rail-item::before {
  width: 1px;
  height: 78px;
  margin-left: 2px;
  background: var(--ink);
  order: 2;
  content: "";
}

.rail-item span {
  color: var(--red);
  font-size: 12px;
}

.rail-item b {
  font-weight: 500;
  letter-spacing: 0.08em;
}

.hero-copy {
  align-self: center;
  padding-left: clamp(0px, 5vw, 42px);
  min-width: 0;
}

.kicker {
  margin: 0 0 18px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 660px;
  margin-bottom: 28px;
  font-size: clamp(38px, 4vw, 62px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.16;
}

h1 span {
  display: block;
}

.accent-line {
  width: 52px;
  height: 2px;
  margin-bottom: 26px;
  background: var(--red);
}

.hero-lede {
  max-width: 610px;
  margin-bottom: 18px;
  font-size: clamp(18px, 1.75vw, 23px);
  font-weight: 500;
  line-height: 1.42;
}

.hero-text {
  max-width: 570px;
  margin-bottom: 38px;
  color: var(--ink);
  line-height: 1.66;
}

.hero-actions,
.pub-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.text-link::after {
  width: 24px;
  height: 1px;
  background: var(--red);
  transition: width 180ms ease;
  content: "";
}

.text-link:hover::after {
  width: 42px;
}

.hero-field {
  position: relative;
  align-self: center;
  height: min(55vw, 540px);
  min-height: 500px;
  min-width: 0;
  overflow: hidden;
}

#bunny-stage,
#photon-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#bunny-stage {
  z-index: 0;
}

#photon-field {
  z-index: 1;
  pointer-events: none;
}

.hero-modules {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.hero-modules article {
  min-height: 124px;
  padding: 24px 32px 22px;
  border-right: 1px solid var(--line-strong);
}

.hero-modules article:last-child {
  border-right: 0;
}

.hero-modules span {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
}

.hero-modules h2 {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.12;
  text-transform: uppercase;
}

.hero-modules p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.research-overview,
.publications,
.members {
  padding: clamp(54px, 8vw, 96px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.52fr);
  gap: clamp(24px, 6vw, 90px);
  align-items: end;
  margin-bottom: clamp(34px, 5vw, 62px);
}

.section-heading:not(.split) {
  display: block;
  max-width: 880px;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(32px, 4.2vw, 58px);
  font-weight: 600;
  line-height: 1.08;
}

.section-heading p:not(.kicker) {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.research-card {
  position: relative;
  min-height: 388px;
  padding: 32px;
  border-right: 1px solid var(--line-strong);
}

.research-card:last-child {
  border-right: 0;
}

.item-number {
  display: block;
  margin-bottom: 18px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 12px;
}

.research-media {
  aspect-ratio: 4 / 2.1;
  margin-bottom: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: white;
}

.research-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.18) contrast(1.02);
  transition: transform 520ms ease, filter 520ms ease;
}

.research-card:hover .research-media img {
  transform: scale(1.035);
  filter: grayscale(0) contrast(1.05);
}

h3 {
  margin-bottom: 16px;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 600;
  line-height: 1.16;
}

.research-card p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.research-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.gallery-item {
  display: grid;
  grid-template-rows: 230px auto;
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
}

.gallery-item img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  padding: 14px;
  background: white;
}

.gallery-item figcaption {
  padding: 16px 18px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.gallery-item figcaption span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pub-controls {
  margin-bottom: 24px;
}

.filter-button {
  border: 1px solid var(--line-strong);
  background: transparent;
  padding: 9px 14px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

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

.publication-table {
  border-top: 1px solid var(--ink);
}

.pub-row {
  display: grid;
  grid-template-columns: 70px minmax(260px, 1.15fr) minmax(150px, 0.42fr) minmax(190px, 0.68fr);
  gap: 28px;
  min-height: 64px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background 160ms ease, color 160ms ease;
}

.pub-row:not(.pub-head) {
  cursor: pointer;
}

.pub-row:not(.pub-head):hover {
  background: rgba(228, 61, 49, 0.055);
}

.pub-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pub-row span:first-child,
.pub-head {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pub-head {
  min-height: 42px;
  color: var(--muted);
}

.pub-row span:nth-child(2) {
  font-weight: 600;
}

.pub-row span:nth-child(3),
.pub-row span:nth-child(4) {
  color: var(--muted);
  font-size: 13px;
}

.pub-row.is-hidden {
  display: none;
}

.member-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.68fr 1fr;
  border-top: 1px solid var(--ink);
}

.member-grid section {
  min-height: 286px;
  padding: 30px 42px 28px 0;
  border-right: 1px solid var(--line-strong);
}

.member-grid section + section {
  padding-left: 42px;
}

.member-grid section:last-child {
  border-right: 0;
}

.member-grid h3 {
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.member-grid ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-grid li {
  font-size: clamp(17px, 1.8vw, 23px);
  line-height: 1.18;
}

.site-footer {
  width: min(var(--max), 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  padding: 24px 0 30px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.not-found {
  background: var(--paper);
}

.error-page {
  width: min(720px, 88vw);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-content: center;
}

.error-page h1 {
  font-size: clamp(54px, 9vw, 110px);
}

@media (max-width: 1120px) {
  .section-rail {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .hero-field {
    min-height: 430px;
    height: 430px;
  }

  #bunny-stage,
  #photon-field {
    height: 430px;
  }

  .research-grid,
  .hero-modules,
  .member-grid,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .hero-modules article,
  .research-card,
  .member-grid section,
  .member-grid section + section {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
    padding-left: 0;
  }

  .member-grid section:last-child {
    border-bottom: 0;
  }

  .pub-row {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px 18px;
    padding: 16px 0;
  }

  .pub-row span:nth-child(3),
  .pub-row span:nth-child(4) {
    grid-column: 2;
  }

  .pub-head span:nth-child(3),
  .pub-head span:nth-child(4) {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    background: var(--paper);
  }

  .site-header {
    grid-template-columns: 1fr auto;
    width: 100vw;
    max-width: 100vw;
    min-height: 64px;
    padding: 0 18px;
  }

  .brand {
    gap: 14px;
    min-height: 64px;
  }

  .brand-mark {
    font-size: 28px;
  }

  .brand-sub,
  .brand-rule {
    display: none;
  }

  .nav-toggle {
    display: none;
  }

  .floating-menu {
    position: fixed;
    top: 13px;
    right: 18px;
    z-index: 40;
    display: block;
    border: 1px solid var(--ink);
    background: var(--paper);
    padding: 8px 12px;
    color: var(--ink);
    font: 500 12px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .site-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    border-bottom: 1px solid var(--ink);
    background: var(--paper);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    justify-content: start;
    min-height: 54px;
    padding: 0 22px;
    border-top: 1px solid var(--line);
  }

  h1 {
    max-width: 100%;
    font-size: clamp(32px, 8.6vw, 42px);
    line-height: 1.15;
  }

  h2 {
    font-size: clamp(30px, 8.8vw, 44px);
  }

  .hero {
    width: min(var(--max), 92vw);
    padding-top: 38px;
  }

  .hero-copy {
    padding-left: 0;
    width: 100%;
  }

  .hero-lede,
  .hero-text {
    max-width: 22rem;
    overflow-wrap: anywhere;
  }

  .hero-field {
    min-height: 360px;
    height: 360px;
  }

  #bunny-stage,
  #photon-field {
    height: 360px;
  }

  .research-gallery {
    grid-template-columns: 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
