:root {
  --ink: #10253b;
  --ink-deep: #081827;
  --muted: #5f6e7d;
  --paper: #f4f6f4;
  --surface: #ffffff;
  --line: #d8dfe3;
  --line-dark: rgba(255, 255, 255, 0.15);
  --blue: #155ee8;
  --blue-soft: #e7efff;
  --orange: #f16e3a;
  --max-width: 1160px;
  --shadow: 0 24px 70px rgba(17, 37, 58, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: white;
  background: var(--blue);
  border-radius: 4px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.section-shell,
.nav-shell {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.project-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 246, 244, 0.9);
  border-bottom: 1px solid rgba(16, 37, 59, 0.1);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.project-mark {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 440px;
  text-decoration: none;
}

.mark-copy {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  line-height: 1.15;
}

.mark-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.76rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mark-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-left: auto;
}

.project-nav a,
.home-link {
  color: #405365;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.project-nav a:hover,
.project-nav a:focus-visible,
.home-link:hover,
.home-link:focus-visible {
  color: var(--blue);
}

.home-link {
  padding-left: 22px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 112px 0 108px;
  background:
    radial-gradient(circle at 82% 8%, rgba(21, 94, 232, 0.12), transparent 31%),
    linear-gradient(180deg, #f9faf8 0%, var(--paper) 100%);
}

.hero::before {
  position: absolute;
  top: 0;
  right: max(calc((100vw - var(--max-width)) / 2), 24px);
  width: 1px;
  height: 44%;
  background: linear-gradient(var(--blue), transparent);
  content: "";
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  background-image:
    linear-gradient(rgba(16, 37, 59, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 37, 59, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.hero-shell {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-index,
.card-label {
  margin: 0;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
}

.eyebrow span {
  width: 28px;
  height: 2px;
  background: var(--orange);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 1100px;
  margin: 26px 0 28px;
  font-size: clamp(2.45rem, 5.3vw, 4.85rem);
  font-weight: 760;
}

h1 span {
  display: block;
}

h1 span:nth-child(2) {
  color: var(--blue);
}

h2 {
  margin-bottom: 28px;
  font-size: clamp(2.1rem, 4.2vw, 4rem);
  font-weight: 740;
}

h3 {
  margin-bottom: 18px;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 720;
}

.authors {
  max-width: 1000px;
  margin: 0 0 8px;
  color: #243b51;
  font-weight: 650;
  letter-spacing: 0.005em;
}

.affiliation {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.hero-lede {
  max-width: 820px;
  margin: 38px 0 0;
  padding-left: 22px;
  color: #32495c;
  border-left: 3px solid var(--orange);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 14px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(17, 37, 58, 0.14);
}

.button-primary {
  color: white;
  background: var(--ink);
}

.button-disabled {
  color: #7b8894;
  background: #e7eaeb;
  border-color: #cdd4d8;
  cursor: not-allowed;
  user-select: none;
}

.button-disabled:hover {
  transform: none;
  box-shadow: none;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #9ba6af;
  border-radius: 50%;
}

.button-secondary {
  background: transparent;
}

.text-link {
  padding-inline: 12px;
  border-color: transparent;
  color: var(--blue);
}

.hero-figure {
  margin: 76px 0 0;
  padding: 10px 10px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-video {
  max-width: 980px;
  margin: 28px auto 0;
  padding: 10px 10px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-video-stage {
  width: 100%;
  overflow: hidden;
  background: var(--ink-deep);
  border: 1px solid #e4e8eb;
  aspect-ratio: 16 / 9;
}

.hero-video-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero-figure img {
  width: 100%;
  height: auto;
  border: 1px solid #e4e8eb;
}

.figure-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

figcaption {
  padding: 12px 8px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.section {
  padding: 124px 0;
}

.section-intro,
.citation-section {
  background: var(--surface);
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: end;
}

.split-heading h2 {
  max-width: 720px;
  margin-top: 20px;
  margin-bottom: 0;
}

.heading-copy {
  margin: 0;
}

.heading-copy p:last-child,
.heading-copy:last-child {
  margin-bottom: 0;
}

.lead {
  color: #314a60;
  font-size: clamp(1.05rem, 1.55vw, 1.22rem);
  line-height: 1.75;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 78px;
}

.problem-card {
  position: relative;
  min-height: 355px;
  overflow: hidden;
  padding: clamp(32px, 5vw, 58px);
  border-radius: 6px;
}

.problem-card-light {
  background: var(--blue-soft);
  border: 1px solid #cfdbf2;
}

.problem-card-dark {
  color: white;
  background: var(--ink-deep);
}

.problem-card h3 {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin-top: 54px;
}

.problem-card p:not(.card-label) {
  position: relative;
  z-index: 1;
  max-width: 470px;
  margin-bottom: 0;
  color: inherit;
  opacity: 0.78;
}

.problem-card-dark .card-label {
  color: #8fb5ff;
}

.card-number {
  position: absolute;
  right: 24px;
  bottom: -38px;
  color: currentColor;
  font-size: 10rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.055;
}

.section-approach {
  background: var(--paper);
}

.compact-heading {
  max-width: 840px;
  margin-bottom: 74px;
}

.compact-heading h2 {
  margin-top: 20px;
}

.compact-heading .lead {
  max-width: 720px;
  margin-bottom: 0;
}

.media-copy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(36px, 6vw, 82px);
  align-items: center;
}

.paper-figure {
  margin: 0;
  padding: 8px 8px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(17, 37, 58, 0.08);
}

.paper-figure img {
  width: 100%;
  height: auto;
  background: white;
}

.mechanism-copy h3 {
  margin-top: 18px;
}

.mechanism-copy > p:not(.card-label) {
  color: #42576a;
}

.feature-list {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.feature-list li {
  padding: 20px 0 20px 134px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

.feature-list span {
  display: block;
  float: left;
  width: 120px;
  margin-left: -134px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.mechanism-motion {
  margin-top: 82px;
  padding: clamp(24px, 4vw, 42px);
  background: var(--ink-deep);
  border-radius: 6px;
}

.motion-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 48px;
  align-items: end;
  color: white;
}

.motion-heading .card-label {
  color: #8fb5ff;
}

.motion-heading h3 {
  margin: 14px 0 0;
}

.motion-heading > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
}

.motion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.motion-card {
  margin: 0;
  overflow: hidden;
  background: white;
  border-radius: 4px;
}

.motion-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 560 / 316;
  object-fit: cover;
}

.motion-card figcaption {
  min-height: 112px;
  padding: 18px 20px 20px;
}

.motion-card figcaption span,
.motion-card figcaption strong {
  display: block;
}

.motion-card figcaption span {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.motion-card figcaption strong {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.96rem;
}

.process-figure {
  margin: 82px 0 0;
  padding: clamp(24px, 4vw, 42px);
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.process-figure img {
  width: 100%;
  height: auto;
  margin-top: 30px;
}

.process-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 48px;
  align-items: end;
}

.process-header h3 {
  margin: 14px 0 0;
}

.process-header > p {
  margin: 0;
  color: var(--muted);
}

.section-experiments {
  background: #edf1f2;
}

.experiment-heading {
  align-items: center;
}

.experiment-stack {
  display: grid;
  gap: 24px;
  margin-top: 72px;
}

.experiment-card {
  min-width: 0;
  padding: clamp(28px, 4vw, 48px);
  background: white;
  border: 1px solid #cbd4d9;
  border-radius: 6px;
  box-shadow: 0 18px 48px rgba(17, 37, 58, 0.06);
}

.experiment-card-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.experiment-card-header h3 {
  max-width: 760px;
  margin: 14px 0 0;
}

.experiment-card-body {
  padding-top: 34px;
}

.experiment-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 16px clamp(36px, 6vw, 76px);
  align-items: start;
  min-height: 216px;
  padding-bottom: 34px;
}

.overview-label {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.experiment-overview > p:not(.overview-label) {
  margin: 0;
  color: #435b6d;
}

.result-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.result-list div {
  display: grid;
  gap: 4px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.result-list dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.result-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 720;
  line-height: 1.45;
}

.experiment-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.experiment-media--stacked {
  grid-template-columns: 1fr;
}

.experiment-media--video-priority {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  align-items: start;
}

.experiment-media--portrait {
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  align-items: start;
}

.experiment-media figure {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
  overflow: hidden;
  background: #f5f7f7;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.media-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.experiment-media--stacked .media-stage {
  aspect-ratio: 2565 / 1220;
}

.experiment-media--video-priority .media-stage {
  height: clamp(430px, 36vw, 540px);
  aspect-ratio: auto;
}

.experiment-media--portrait .media-stage {
  height: clamp(520px, 46vw, 650px);
  aspect-ratio: auto;
}

.media-stage-video {
  background: var(--ink-deep);
}

.media-stage-figure {
  padding: 8px;
  background: white;
}

.media-stage img,
.media-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

.media-stage video {
  background: var(--ink-deep);
}

.media-stage-portrait video {
  object-fit: contain;
  object-position: 50% 50%;
}

.experiment-media figcaption {
  min-height: 64px;
  padding: 13px 15px 15px;
}

.citation-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  gap: clamp(42px, 8vw, 110px);
  align-items: start;
}

.citation-grid h2 {
  margin-top: 18px;
}

.citation-grid > div:first-child > p:last-child {
  color: var(--muted);
}

.code-card {
  min-width: 0;
  overflow: hidden;
  color: #e9f0f5;
  background: var(--ink-deep);
  border: 1px solid #19334a;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(8, 24, 39, 0.16);
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px 0 24px;
  color: #9fb1c0;
  border-bottom: 1px solid var(--line-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  color: #dce9f2;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.copy-button.is-copied {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}

.copy-icon {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 1px;
}

.copy-icon::before {
  position: absolute;
  top: -4px;
  left: 3px;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 1px;
  content: "";
}

pre {
  margin: 0;
  padding: 28px 30px 34px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.75;
  tab-size: 2;
}

.project-footer {
  padding: 44px 0;
  color: #acbbc7;
  background: #06131f;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-shell {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.footer-shell strong {
  color: white;
  font-size: 0.92rem;
}

.footer-shell p {
  margin: 6px 0 0;
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 24px;
}

.footer-links a {
  font-size: 0.77rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: white;
}

@media (max-width: 960px) {
  .project-nav {
    display: none;
  }

  .home-link {
    margin-left: auto;
  }

  .hero {
    padding-top: 88px;
  }

  .split-heading,
  .media-copy-grid,
  .process-header,
  .motion-heading,
  .citation-grid {
    grid-template-columns: 1fr;
  }

  .split-heading,
  .media-copy-grid,
  .citation-grid {
    gap: 42px;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 70px;
  }

  .section-shell,
  .nav-shell {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .nav-shell {
    min-height: 64px;
  }

  .mark-copy small {
    display: none;
  }

  .mark-copy strong {
    max-width: 205px;
    font-size: 0.69rem;
  }

  .home-link {
    padding-left: 14px;
    font-size: 0.68rem;
  }

  .hero {
    padding: 66px 0 72px;
  }

  h1 {
    margin-top: 20px;
    font-size: clamp(2.05rem, 10vw, 3rem);
  }

  h1 span {
    display: inline;
  }

  h1 span:not(:last-child)::after {
    content: " ";
  }

  h2 {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }

  .authors {
    line-height: 1.6;
  }

  .hero-lede {
    margin-top: 30px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .text-link {
    width: 100%;
  }

  .hero-figure {
    margin-top: 54px;
    padding: 6px 6px 10px;
  }

  .hero-video {
    margin-top: 20px;
    padding: 6px 6px 10px;
  }

  .figure-bar {
    min-height: 36px;
  }

  .section {
    padding: 84px 0;
  }

  .problem-grid {
    grid-template-columns: 1fr;
    margin-top: 50px;
  }

  .problem-card {
    min-height: 310px;
  }

  .compact-heading {
    margin-bottom: 48px;
  }

  .feature-list li {
    padding-left: 0;
  }

  .feature-list span {
    float: none;
    width: auto;
    margin: 0 0 5px;
  }

  .process-figure {
    margin-top: 56px;
  }

  .motion-grid,
  .experiment-media {
    grid-template-columns: 1fr;
  }

  .experiment-media--video-priority .media-stage,
  .experiment-media--portrait .media-stage {
    height: auto;
  }

  .experiment-media--video-priority .media-stage-video {
    aspect-ratio: 16 / 9;
  }

  .experiment-media--video-priority .media-stage-figure {
    aspect-ratio: 1500 / 2141;
  }

  .experiment-media--portrait .media-stage-portrait {
    aspect-ratio: 402 / 718;
  }

  .experiment-media--portrait .media-stage-figure {
    aspect-ratio: 1481 / 1435;
  }

  .mechanism-motion {
    margin-top: 56px;
  }

  .motion-card figcaption {
    min-height: 0;
  }

  .experiment-stack {
    margin-top: 52px;
  }

  .experiment-card-body {
    padding-top: 28px;
  }

  .experiment-overview {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
  }

  .overview-label {
    margin-bottom: 14px;
  }

  .result-list {
    margin-top: 24px;
  }

  .media-stage {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .media-stage-portrait {
    aspect-ratio: 3 / 4;
    max-height: 620px;
  }

  pre {
    padding: 24px 22px 30px;
    font-size: 0.69rem;
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
