:root {
  --text: #17181d;
  --muted: #4e5563;
  --soft: #fff5f4;
  --line: #f1d7d3;
  --accent: #e1251b;
  --accent-deep: #c81623;
  --accent-soft: #fff1ef;
  --content: 760px;
  --wide: 900px;
  font-family: Inter, "PingFang SC", "PingFang TC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(225, 37, 27, 0.04) 0, rgba(225, 37, 27, 0.015) 160px, #fff 300px),
    #fff;
  color: var(--text);
  font-size: 16px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  padding: 0 56px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(225, 37, 27, 0.1);
  box-shadow: 0 8px 28px rgba(23, 24, 29, 0.04);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand {
  justify-self: start;
  font-size: 16px;
}

.brand-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  background:
    linear-gradient(90deg, var(--accent) 3px, transparent 3px 7px, #0d0f14 7px 10px, transparent 10px),
    linear-gradient(var(--accent) 0 0) 14px 4px / 3px 14px no-repeat;
  border-radius: 2px;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 46px;
  color: #4f5563;
  font-size: 14px;
}

.nav a {
  transition: color 160ms ease;
}

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

.language {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.lang-button {
  border: 0;
  background: transparent;
  color: #9ea5b1;
  cursor: pointer;
  font: inherit;
  padding: 0;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.lang-button:hover {
  color: var(--accent);
}

.lang-button.is-active {
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  min-width: 56px;
  min-height: 56px;
  padding: 0 18px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(225, 37, 27, 0.22);
}

main {
  min-height: 100vh;
}

.hero,
.content-section {
  width: min(calc(100vw - 40px), var(--content));
  margin: 0 auto;
}

.hero {
  padding: 68px 0 22px;
  text-align: center;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: var(--accent);
  font-size: clamp(42px, 5.4vw, 64px);
  line-height: 1.05;
}

.subtitle {
  max-width: 620px;
  margin: 18px auto 22px;
  color: #2b2f38;
  font-size: 16px;
  line-height: 1.8;
}

.report-label {
  display: inline-flex;
  margin: 20px auto 0;
  color: var(--accent-deep);
  font-size: 19px;
  font-weight: 700;
  transition: color 160ms ease, transform 160ms ease;
}

.report-label:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.primary-action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(225, 37, 27, 0.24);
}

.hero-card {
  width: min(100%, var(--wide));
  margin: 42px auto 0;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(225, 37, 27, 0.14);
  box-shadow: 0 18px 54px rgba(23, 24, 29, 0.08);
}

.content-section {
  padding: 54px 0 18px;
}

.content-section h2 {
  color: var(--accent);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.18;
}

.content-section h3 {
  margin-top: 42px;
  color: var(--accent);
  font-size: 25px;
  line-height: 1.28;
}

.content-section h4 {
  color: var(--accent);
  font-size: 19px;
  line-height: 1.32;
}

.content-section p {
  margin: 22px 0 0;
  color: #232831;
  font-size: 16px;
  line-height: 1.82;
}

.pipeline-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 34px 0 12px;
}

.pipeline-tabs span {
  display: grid;
  min-height: 50px;
  place-items: center;
  border: 1.5px solid rgba(225, 37, 27, 0.28);
  border-radius: 7px;
  color: #222a36;
  background: #fff;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.image-panel {
  margin: 32px 0 0;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(225, 37, 27, 0.12);
  box-shadow: 0 12px 30px rgba(23, 24, 29, 0.05);
}

.video-panel {
  margin: 32px 0 0;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(225, 37, 27, 0.12);
  box-shadow: 0 12px 30px rgba(23, 24, 29, 0.05);
}

.image-panel img {
  background: #fffaf9;
}

.video-panel video {
  background: #fffaf9;
}

.detail-section {
  margin: 40px 0 0;
}

.detail-copy h4 {
  margin-top: 0;
}

.detail-copy p {
  margin-top: 12px;
}

.detail-media {
  margin-top: 22px;
}

.wide-output video {
  aspect-ratio: 21 / 4;
  object-fit: contain;
}

.lighting-panel {
  position: relative;
}

.lighting-panel video {
  display: block;
}

.lighting-labels {
  position: absolute;
  inset: 0 auto 0 14px;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  pointer-events: none;
}

.lighting-labels span {
  align-self: start;
  margin-top: 12px;
  border: 1px solid rgba(225, 37, 27, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(225, 37, 27, 0.1);
  color: #252832;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
}

.generalization-block {
  margin-top: 24px;
}

.generalization-block h5 {
  margin: 0;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.generalization-block .detail-media {
  margin-top: 12px;
}

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

.texture-tile {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(225, 37, 27, 0.14);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

.texture-tile img {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #fff7f6;
  object-fit: cover;
}

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

.feedback-tile {
  display: grid;
  gap: 10px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(225, 37, 27, 0.15);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 10px 26px rgba(23, 24, 29, 0.04);
}

.feedback-tile strong {
  color: #21242c;
  font-size: 12px;
  line-height: 1.25;
}

.feedback-tile video {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #fff7f6;
  object-fit: cover;
}

.image-panel figcaption,
.video-panel figcaption {
  display: none;
}

.image-panel.slim {
  margin-top: 26px;
}

.video-grid,
.process-videos,
.material-videos {
  display: grid;
  gap: 18px;
  margin: 32px 0 0;
}

.video-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.process-videos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.video-card {
  display: grid;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(225, 37, 27, 0.14);
  border-radius: 8px;
  background: #fff;
}

.video-card video {
  aspect-ratio: 16 / 10;
  width: 100%;
  height: 100%;
  background: #fff7f6;
  object-fit: cover;
}

.process-videos .video-card video {
  aspect-ratio: 4 / 3;
}

.material-videos .video-card video {
  aspect-ratio: 16 / 9;
}

.video-card figcaption {
  display: grid;
  gap: 6px;
  min-height: 122px;
  margin: 0;
  padding: 14px 14px 16px;
}

.video-card strong {
  color: #22252c;
  font-size: 13px;
  line-height: 1.3;
}

.video-card span {
  color: #5d6573;
  font-size: 12px;
  line-height: 1.55;
}

.figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.alignment-scenes {
  margin: 28px 0 0;
}

.alignment-scenes .image-panel {
  margin: 0;
}

.bullet-list {
  margin: 28px 0 0;
  padding-left: 20px;
  color: #232831;
  font-size: 15px;
}

.bullet-list li + li {
  margin-top: 14px;
}

.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 32px 0 0;
}

.link-grid a {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(225, 37, 27, 0.26);
  border-radius: 7px;
  color: #1d2128;
  background: #fff;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.link-grid a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.credits-section {
  padding-top: 72px;
}

.credits-section h2 + .author-box {
  margin-top: 24px;
}

.credits-section h2 + p {
  margin-top: 18px;
}

.credits-section h2:not(:first-child) {
  margin-top: 56px;
}

.author-box,
.bibtex-card {
  border: 1px solid rgba(225, 37, 27, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(23, 24, 29, 0.04);
}

.author-box {
  padding: 24px 26px;
}

.author-box p {
  margin: 0;
  color: #2b313b;
}

.bibtex-card {
  position: relative;
  margin-top: 24px;
  overflow: hidden;
}

.bibtex-card pre {
  margin: 0;
  overflow-x: auto;
  padding: 28px 30px;
  color: #222832;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
}

.copy-button {
  position: absolute;
  top: 16px;
  right: 16px;
  min-width: 68px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
}

.copy-button:hover {
  background: var(--accent-deep);
}

.site-footer {
  margin-top: 120px;
  padding: 78px 56px 26px;
  background:
    radial-gradient(circle at 50% 0%, rgba(225, 37, 27, 0.12), transparent 44%),
    linear-gradient(180deg, #fff7f6 0%, #ffeae7 48%, #ffd9d4 100%);
  border-top: 1px solid rgba(225, 37, 27, 0.12);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(360px, 760px);
  gap: 60px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 52px;
}

.footer-columns div {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-columns strong {
  margin-bottom: 8px;
  color: #1f232b;
  font-size: 14px;
}

.footer-columns a {
  color: #4e5563;
  font-size: 13px;
}

.footer-columns a:hover {
  color: var(--accent-deep);
}

.copyright {
  grid-column: 1 / -1;
  margin: 46px 0 0;
  color: #6c4a45;
  font-size: 12px;
}

@media (max-width: 840px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
    padding: 14px 18px;
  }

  .brand,
  .language {
    justify-self: center;
  }

  .nav {
    overflow-x: auto;
    width: 100%;
    justify-content: flex-start;
    gap: 26px;
    padding-bottom: 4px;
  }

  .nav a {
    flex: 0 0 auto;
  }

  .hero {
    padding-top: 44px;
  }

  .pipeline-tabs,
  .figure-grid,
  .video-grid.two-up,
  .process-videos,
  .material-videos,
  .feedback-grid,
  .texture-grid,
  .link-grid,
  .site-footer,
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .wide-output video {
    aspect-ratio: 16 / 5;
  }

  .site-footer {
    gap: 36px;
    padding: 62px 24px 24px;
  }

  .bibtex-card pre {
    padding: 56px 18px 20px;
    font-size: 12px;
  }
}
