:root {
  --paper: #ffffff;
  --white: #ffffff;
  --ink: #101820;
  --muted: #5f6b76;
  --line: #d7dde2;
  --blue: #006dff;
  --blue-dark: #0051bd;
  --amber: #ffae34;
  --night: #07111d;
  --night-soft: #0e1b29;
  --max: 1120px;
  --wide: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(16, 24, 32, 0.1);
  backdrop-filter: blur(12px);
}

.wordmark {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 26px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--blue);
}

.hero {
  padding: 84px 24px 66px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
  text-align: center;
}

.eyebrow,
.section-index {
  margin: 0 0 13px;
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Source Serif 4", serif;
  font-size: clamp(4.6rem, 11vw, 8.8rem);
  font-weight: 700;
  line-height: 0.9;
}

.hero-subtitle {
  max-width: 1080px;
  margin: 26px auto 30px;
  color: #29343e;
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  font-weight: 600;
  line-height: 1.18;
}

.authors {
  max-width: 1120px;
  margin: 0 auto;
  color: #26323d;
  font-size: 0.9rem;
}

.authors p {
  margin: 4px 0;
}

.authors sup,
.affiliations sup,
.author-notes sup {
  color: var(--blue);
  font-size: 0.68em;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 0.79rem;
}

.author-notes {
  margin: 6px 0 0;
  color: #7a848d;
  font-size: 0.74rem;
}

.institution-strip {
  max-width: 940px;
  margin: 26px auto 0;
  padding: 13px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.institution-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.institution-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 122px;
  height: 44px;
  opacity: 0.78;
  transition: opacity 160ms ease, transform 160ms ease;
}

.institution-logo:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.institution-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.institution-logo-afari {
  opacity: 0.82;
}

.institution-logo-afari img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.institution-logo-uestc img {
  filter: brightness(0) saturate(100%) invert(24%) sepia(95%) saturate(2398%) hue-rotate(206deg) brightness(83%) contrast(103%);
}

.institution-logo-bupt img {
  filter: brightness(0) saturate(100%) invert(17%) sepia(62%) saturate(3003%) hue-rotate(218deg) brightness(83%) contrast(104%);
}

.institution-logo-tju img {
  filter: brightness(0) saturate(100%) invert(20%) sepia(49%) saturate(2552%) hue-rotate(241deg) brightness(83%) contrast(91%);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.action-link,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.action-link:hover,
.copy-button:hover {
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-1px);
}

.action-link svg,
.copy-button svg,
.icon-button svg {
  width: 17px;
  height: 17px;
}

.brand-banner {
  display: flex;
  justify-content: center;
  padding: 34px 24px 50px;
  background: var(--white);
  overflow: hidden;
}

.brand-banner img {
  width: min(88%, 1200px);
  height: auto;
  object-fit: contain;
}

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

.section-shell.wide {
  width: min(var(--wide), calc(100% - 48px));
}

.section-heading {
  max-width: 1040px;
  margin-bottom: 38px;
}

.section-heading.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-family: "Source Serif 4", serif;
  font-size: clamp(2.1rem, 4.2vw, 3.7rem);
  line-height: 1.05;
  white-space: nowrap;
}

.section-heading > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.light-heading h2,
.light-heading > p:last-child {
  color: var(--ink);
}

.light-heading > p:last-child {
  color: var(--muted);
}

.demo-band {
  padding: 94px 0;
  color: var(--ink);
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.demo-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1700 / 668;
  background: #f2f5f8;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.demo-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 30px 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(16, 24, 32, 0.1);
}

.demo-meta strong {
  display: block;
  margin-top: 2px;
  font-family: "Source Serif 4", serif;
  font-size: 1.45rem;
}

.demo-kicker {
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  place-items: center;
}

.icon-button:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.demo-selector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.demo-thumb {
  min-width: 0;
  padding: 0;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}

.demo-thumb img {
  width: 100%;
  aspect-ratio: 1700 / 668;
  object-fit: cover;
  filter: saturate(0.72) brightness(0.68);
}

.demo-thumb span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  font-size: 0.77rem;
  white-space: nowrap;
}

.demo-thumb b {
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
}

.demo-thumb:hover,
.demo-thumb.is-active {
  color: var(--ink);
  border-color: var(--blue);
}

.demo-thumb.is-active img {
  filter: none;
}

.prose-section {
  padding: 110px 0;
}

.abstract-copy {
  max-width: 920px;
  margin: 0 auto;
  color: #29343e;
  font-family: "Source Serif 4", serif;
  font-size: 1.14rem;
  text-align: justify;
}

.abstract-copy p {
  margin: 0 0 18px;
}

.paradigm-section {
  padding: 100px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.figure-link {
  display: block;
}

.figure-link img {
  width: 100%;
}

.method-section,
.qualitative-section {
  padding: 110px 0;
}

.method-section .figure-link {
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.method-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-points article {
  padding: 28px 30px 30px;
  border-right: 1px solid var(--line);
}

.method-points article:last-child {
  border-right: 0;
}

.method-points span {
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

.method-points h3 {
  margin: 18px 0 10px;
  font-family: "Source Serif 4", serif;
  font-size: 1.45rem;
}

.method-points p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.results-section {
  padding: 100px 0;
  color: var(--ink);
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.metric {
  padding: 34px 34px 38px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric-rank {
  color: var(--blue);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin: 15px 0 5px;
  font-family: "Source Serif 4", serif;
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 0.92;
}

.metric p,
.results-note {
  color: var(--muted);
}

.metric p {
  margin: 0;
  font-size: 0.86rem;
}

.metric code {
  color: var(--ink);
  background: transparent;
}

.results-note {
  max-width: 920px;
  margin: 30px 0 0;
  font-size: 0.9rem;
}

.qualitative-section .figure-link {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.citation-section {
  padding: 100px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.citation-box {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 26px;
  color: var(--ink);
  background: #f5f7f9;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.citation-box pre {
  margin: 0;
  overflow-x: auto;
  color: inherit;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.65;
  white-space: pre;
}

.copy-button {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
  cursor: pointer;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  color: #7a858f;
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
}

footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .site-header {
    padding: 0 18px;
  }

  .site-nav {
    gap: 15px;
  }

  .site-nav a {
    font-size: 0.73rem;
  }

  .hero {
    padding-top: 62px;
  }

  .section-heading h2 {
    white-space: normal;
  }

  .demo-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-points,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .method-points article,
  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric {
    border-bottom-color: var(--line);
  }

  .method-points article:last-child,
  .metric:last-child {
    border-bottom: 0;
  }

}

@media (max-width: 600px) {
  .site-nav a:nth-child(2),
  .site-nav a:nth-child(4) {
    display: none;
  }

  .hero {
    padding: 50px 18px 48px;
  }

  .hero h1 {
    font-size: clamp(4rem, 23vw, 6rem);
  }

  .hero-subtitle {
    font-size: 1.42rem;
  }

  .authors {
    font-size: 0.8rem;
  }

  .affiliations {
    gap: 3px 12px;
    font-size: 0.76rem;
  }

  .institution-logos {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .institution-strip {
    padding: 13px 14px;
  }

  .institution-logo {
    width: 105px;
    height: 38px;
  }

  .brand-banner img {
    width: 100%;
    min-height: 0;
    object-fit: contain;
  }

  .brand-banner {
    padding: 20px 12px 34px;
  }

  .section-shell,
  .section-shell.wide {
    width: min(100% - 28px, var(--max));
  }

  .demo-band,
  .prose-section,
  .paradigm-section,
  .method-section,
  .results-section,
  .qualitative-section,
  .citation-section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .demo-stage {
    aspect-ratio: 1.55;
  }

  .demo-stage video {
    object-fit: contain;
  }

  .demo-meta {
    padding: 18px 16px 14px;
  }

  .demo-meta strong {
    font-size: 1.08rem;
  }

  .demo-selector {
    gap: 8px;
  }

  .demo-thumb span {
    padding: 9px;
    font-size: 0.67rem;
  }

  .section-heading {
    margin-bottom: 28px;
  }

  .method-section .figure-link {
    padding: 6px;
  }

  .method-points article,
  .metric {
    padding-right: 18px;
    padding-left: 18px;
  }

  .citation-box {
    padding: 66px 16px 18px;
  }

  .copy-button {
    left: 16px;
    right: auto;
  }

  footer {
    display: block;
    padding: 24px 18px;
  }

  footer p + p {
    margin-top: 5px;
  }
}

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

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