/* A warm, editorial frame for the medieval material showcase. */
.project-page {
  --paper: #f9f9f6;
  --paper-deep: #eff0ec;
  --ink: #252b2b;
  --muted: #737a79;
  --gold: #527278;
  --gold-light: #e4d8be;
  --rule: #dfe3df;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Google Sans', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
.project-page ::selection { background: #dfccaa; color: #24221b; }
.project-page a:focus-visible,
.project-page button:focus-visible { outline: 2px solid #bc9459; outline-offset: 5px; }
.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: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* The photograph sets the palette; the scrim keeps the type legible. */
.teaser-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  color: #fffaf0;
  background: #211e18;
}
.teaser-background,
.teaser-overlay { position: absolute; inset: 0; z-index: -1; }
.teaser-background {
  background-image: url('https://jingzhi03.com/assets/images/teasers/ultratex.jpg');
  background-size: cover;
  background-position: center 48%;
  background-repeat: no-repeat;
}
.teaser-overlay {
  background: linear-gradient(180deg, rgba(13, 17, 17, .60) 0%, rgba(13, 17, 17, .40) 32%, rgba(13, 17, 17, .12) 52%, rgba(13, 17, 17, .60) 73%, rgba(13, 17, 17, .88) 100%);
}
.hero-masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 4.5%;
  border-bottom: 1px solid rgba(236, 215, 173, .18);
}
.hero-wordmark,
.footer-wordmark {
  color: inherit;
  font-family: 'Castoro', Georgia, serif;
  font-size: 26px;
  letter-spacing: -1px;
}
.hero-wordmark span,
.footer-wordmark span { color: #d8b97c; }
.hero-wordmark:hover,
.hero-viewer-link:hover { color: var(--gold-light); }
.hero-viewer-link { display: inline-flex; align-items: center; gap: 12px; color: #f5eee1; font-size: 14px; letter-spacing: .01em; }
.hero-viewer-link span { margin-left: 12px; color: var(--gold-light); }
.teaser-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1180px, 100%);
  height: 100%;
  padding: clamp(105px, 12.5svh, 155px) 28px 100px;
  text-align: center;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 0 16px;
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: .035em;
}
.hero-eyebrow::before,
.hero-eyebrow::after { content: ''; width: 36px; height: 1px; background: #c2a16a; }
.project-page .publication-title { margin: 0; color: #fffaf0; font-weight: 400; }
.project-name {
  display: block;
  font-family: 'Castoro', Georgia, serif;
  font-size: clamp(88px, 8.5vw, 130px);
  line-height: 1.05;
  letter-spacing: -.055em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .18);
}
.project-title {
  display: block;
  margin: 17px auto 0;
  font-size: clamp(28px, 2.55vw, 39px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .3);
}
.project-page .publication-authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  color: #f4ebda;
  font-size: 16px;
}
.hero-venue {
  margin: 28px 0 0;
  color: #e4d8be;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .035em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}
.publication-authors > span { white-space: nowrap; }
.project-page .publication-authors a { color: #fff8eb !important; text-decoration: none; }
.project-page .publication-authors a:hover { text-decoration: underline; text-underline-offset: 5px; }
.publication-authors sup { margin-left: 3px; color: #d3bf9b; font-size: .65em; }
.publication-affiliations { display: flex; justify-content: center; gap: 26px; margin-top: 13px; color: #d6cbbb; font-size: 13px; }
.publication-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  min-width: 124px;
  padding: 0 20px;
  border: 1px solid rgba(230, 213, 181, .45);
  border-radius: 5px;
  background: rgba(28, 25, 19, .55);
  color: #fff6e7;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.resource-link svg { width: 18px; height: 18px; }
.resource-link .huggingface-icon {
  width: 18px;
  height: 18px;
  margin-right: 0;
  flex-shrink: 0;
}
a.resource-link:hover { background: #51442d; border-color: #d1b47e; color: #fffaf0; transform: translateY(-2px); }
.resource-link--primary { background: #f1eadd; border-color: #f1eadd; color: #252923; }
a.resource-link--primary:hover { background: #f7e7c7; border-color: #f7e7c7; color: #211d16; }
.resource-link--unavailable { color: #d2c6b2; background: rgba(28, 25, 19, .35); border-color: rgba(230, 213, 181, .22); }
.resource-status { font-size: 10px; color: #c6b99f; padding-left: 8px; border-left: 1px solid rgba(230, 213, 181, .25); }
.hero-scroll {
  position: absolute;
  bottom: 27px;
  display: flex;
  gap: 16px;
  align-items: center;
  color: #d6c7ad;
  font-size: 13px;
  letter-spacing: .015em;
  text-transform: none;
}
.hero-scroll:hover { color: #fff5e3; }
.hero-scroll span { font-size: 19px; }

/* A quiet chapter index separates the cinematic opening from the paper. */
.project-nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--rule); background: rgba(249, 249, 246, .96); backdrop-filter: blur(16px); }
.project-nav__inner { display: flex; justify-content: center; gap: clamp(22px, 4vw, 60px); max-width: 1280px; margin: 0 auto; padding: 21px 24px; overflow-x: auto; scrollbar-width: none; }
.project-nav__inner::-webkit-scrollbar { display: none; }
.project-nav a { white-space: nowrap; color: #504b40; font-size: 14px; font-weight: 400; }
.project-nav a span { margin-right: 7px; color: #9aa6a5; font-size: 12px; }
.project-nav a:hover { color: var(--gold); }
.project-page .main-section { margin-top: 0; padding: 96px 5%; text-align: center; }
.project-page .container-custom { max-width: 1380px; padding: 0; }
.project-page .section-tinted { background: var(--paper-deep); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.project-page .section-heading { max-width: 1100px; margin: 0 auto 48px; }
.project-page .section-kicker { color: #6a7b7c; font-size: 14px; font-weight: 400; letter-spacing: .015em; line-height: 1.5; margin: 0 0 18px; text-transform: none; }
.project-page .section-heading .title { color: var(--ink); font-family: 'Castoro', Georgia, serif; font-size: clamp(32px, 3.3vw, 46px); font-weight: 400; letter-spacing: -.04em; line-height: 1.22; margin: 0; text-wrap: balance; }
.project-page .section-description { margin: 16px auto 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.project-page .section-action-link { margin-top: 16px; color: #476c74; font-size: 14px; }
.project-page .section-action-link:hover { color: #243f44; }
.project-page .section-heading--split { display: flex; max-width: none; align-items: end; justify-content: space-between; text-align: left; }
.project-page .section-heading--split .section-action-link { margin-bottom: 5px; }
.project-page .project-note { max-width: 1100px; margin: -40px auto 72px; padding: 2px 0 2px 16px; border-left: 2px solid #9fb4b6; color: var(--muted); font-size: 14px; line-height: 1.7; text-align: left; text-wrap: pretty; }
.project-note__label { margin-right: 6px; color: #476c74; font-weight: 500; }
.project-note a { color: #476c74; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.project-note a:hover { color: #243f44; }
.project-note__emphasis { display: block; margin-top: 4px; color: var(--ink); font-weight: 600; }
@media (max-width: 600px) {
  .project-page .project-note { margin: -16px auto 44px; font-size: 13px; }
}
.project-page .chart-title { margin: 0 0 24px; text-align: left; font-size: 20px; font-weight: 500; color: #2d3e42; }
.project-page .chart-card { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.project-page .arena-name,
.project-page .pairwise-name { color: #3d4b4e; }
.project-page .arena-row:hover { background: #f2f6f5; }
.project-page .arena-rank { color: #a7b2b2; }
.project-page .arena-rank--top { color: #416d74; }
.project-page .arena-track { background: #edf1f0; }
.project-page .arena-fill { background: linear-gradient(90deg, #bdc8ca, #93a6ac); box-shadow: none; }
.project-page .arena-fill--top { background: linear-gradient(90deg, #7caaac, #3e6b76); box-shadow: none; }
.project-page .arena-score { color: #596c71; }
.project-page .arena-score--top { color: #3c6a73; }
.project-page .arena-score--low { color: #78878b; }
.project-page .arena-count { color: #95a1a3; }
.project-page .pairwise-seg--inferior,
.project-page .pairwise-dot--inferior { background: #e9eeef; color: #6b8186; border-color: #d5dee0; }
.project-page .pairwise-seg--tie,
.project-page .pairwise-dot--tie { background: #b9cdcf; color: #46616a; }
.project-page .pairwise-seg--better,
.project-page .pairwise-dot--better { background: #4f7680; color: #fff; }
.project-page .pairwise-legend { color: #77898d; font-size: 13px; }
.project-page .paper-results { max-width: none; }
.project-page .paper-result-card { border-color: var(--rule); border-radius: 8px; box-shadow: 0 6px 22px rgba(61, 48, 27, .03); }
.project-page .paper-result-card:hover { box-shadow: 0 8px 26px rgba(61, 48, 27, .08); }
.project-page .paper-result-card__bar { background: #fff; border-color: var(--rule); padding: 16px 20px; }
.project-page .paper-result-card__label { color: #3c5056; font-size: 13px; }
.project-page .paper-result-card__link { color: #648189; font-size: 12px; }
.project-page .image-showcase,
.project-page .image-showcase img,
.project-page .plyr { border-radius: 8px; }
.project-page .plyr { --plyr-color-main: #4f7680; box-shadow: 0 12px 32px rgba(36, 29, 18, .1); }
.project-page .plyr__video-wrapper { aspect-ratio: 16 / 9; }
.project-page .plyr__control--overlaid { width: 66px; height: 66px; padding: 21px; background: #e9d7b4; border: 1px solid #fff4da; color: #342b1e; box-shadow: 0 4px 24px #211b1940; }
.project-page .plyr__control--overlaid:hover { background: #f7e7c7; color: #211d16; }
.project-page .plyr__control:hover { background-color: #4f7680; }
.project-page .tex-viewer-mobile-hint { background: #f9f6ef; border-color: #cfc2a9; }
.project-page .tex-viewer-mobile-hint a { color: var(--gold); }

.project-page .project-footer { max-height: none; padding: 44px 24px 32px; background: #24231e; color: #dad2c2; }
.footer-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.footer-wordmark { font-size: 34px; }
.footer-wordmark:hover { color: #fff3dc; }
.footer-links { display: flex; gap: 26px; font-size: 12px; }
.footer-links a { color: #ded4bf; }
.footer-links a:hover { color: #fff5df; }
.footer-links .footer-link--unavailable { color: #ded4bf; opacity: .45; cursor: default; }
.footer-title { max-width: 640px; margin-top: 18px; color: #aaa18e; font-size: 13px; line-height: 1.7; }
.project-page .footer-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 30px; padding-top: 22px; border-top: 1px solid #454135; color: #aaa18e; font-size: 11px; }
.footer-meta a { color: #c7b99a; }
.design-credit { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.design-credit__model { display: inline-flex; align-items: center; gap: 6px; color: #d0c8b9; white-space: nowrap; }
/* OpenAI mark from Simple Icons v14 (CC0). */
.openai-mark { display: inline-block; width: 16px; height: 16px; background-color: currentColor; -webkit-mask: url('../imgs/openai.svg') center / contain no-repeat; mask: url('../imgs/openai.svg') center / contain no-repeat; }


/* Desktop composition: paired evidence panels and a varied image rhythm. */
.icon-definitions { position: absolute; pointer-events: none; }
.ui-icon { width: 16px; height: 16px; flex: 0 0 auto; vertical-align: middle; }
.hero-viewer-link .ui-icon { width: 15px; height: 15px; opacity: .8; }
.hero-scroll .ui-icon { width: 16px; height: 16px; }
.hero-credits { margin-top: 40px; }
.evaluation-grid { display: grid; grid-template-columns: 1.06fr 1fr; gap: 24px; }
.evaluation-panel { min-width: 0; padding: 30px 28px 28px; background: #fff; border: 1px solid #e1e6e4; border-radius: 12px; box-shadow: 0 12px 36px #1b383c04; }
.project-page .arena-row { grid-template-columns: 22px 112px minmax(30px, 1fr) 39px 36px; gap: 10px; padding: 13px 8px; border-radius: 5px; }
.project-page .arena-row:first-child { background: #eef5f4; }
.project-page .arena-name { font-size: 14px; font-weight: 500; }
.project-page .arena-rank { font-size: 13px; }
.project-page .arena-score { font-size: 14px; }
.project-page .arena-count { font-size: 12px; }
.project-page .arena-track { height: 7px; box-shadow: none; }
.project-page .pairwise-row { grid-template-columns: 102px 1fr; gap: 16px; padding: 11px 0; }
.project-page .pairwise-name { font-size: 14px; font-weight: 500; }
.project-page .pairwise-bar { height: 24px; border-radius: 3px; }
.project-page .pairwise-seg { font-family: inherit; font-size: 12px; font-weight: 500; }
.project-page .pairwise-legend { gap: 24px; margin-top: 26px; font-size: 12px; }
.project-page .pairwise-dot { width: 9px; height: 9px; border-radius: 2px; }
.project-page .image-showcase { border-radius: 7px; }
.project-page .rendering-overview { box-shadow: 0 18px 48px #1a221817; }
.render-detail { display: grid; grid-template-columns: .65fr 1.35fr; align-items: center; gap: 64px; margin-top: 64px; text-align: left; }
.render-detail__caption { padding-left: 32px; }
.render-detail__caption h3 { font-weight: 400; font-family: 'Castoro', Georgia, serif; font-size: clamp(30px, 3vw, 42px); line-height: 1.22; letter-spacing: -.035em; }
.project-page .render-detail__caption .section-kicker { font-size: 13px; margin-bottom: 16px; }
.project-page .render-detail .image-showcase { box-shadow: 0 16px 40px #1a221812; }
.project-page .paper-results__deck { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.project-page .paper-result-card { border-radius: 8px; background: #fff; box-shadow: none; }
.project-page .paper-result-card__bar { padding: 22px 24px; }
.project-page .paper-result-card__label { font-size: 15px; font-weight: 500; }
.project-page .paper-result-card__link { display: inline-flex; align-items: center; gap: 7px; }
.paper-result-card__link .ui-icon { width: 13px; height: 13px; }
.lazy-iframe-frame { position: relative; width: 100%; height: min(80svh, 840px); min-height: 640px; border: 1px solid #d9e0dd; border-radius: 10px; overflow: hidden; background: #f9fafb; box-shadow: 0 18px 48px #1a32390a; }
.footer-links a { display: inline-flex; align-items: center; gap: 9px; }
.footer-links .ui-icon { width: 13px; height: 13px; }
@media (min-width: 901px) and (max-height: 760px) {
  .teaser-content { padding-top: 95px; padding-bottom: 76px; }
  .project-name { font-size: 86px; }
  .project-title { font-size: 31px; margin-top: 12px; }
  .hero-eyebrow { margin-bottom: 12px; }
  .hero-credits { margin-top: 24px; }
  .publication-links { margin-top: 20px; }
  .hero-scroll { bottom: 20px; }
}
@media (max-width: 1100px) {
  .evaluation-grid { grid-template-columns: 1fr; }
  .project-page .main-section { padding-right: 5%; padding-left: 5%; }
  .render-detail { gap: 40px; }
  .render-detail__caption { padding-left: 0; }
}
@media (max-width: 900px) {
  .project-page .paper-results__deck { grid-template-columns: 1fr; }
  .render-detail { grid-template-columns: 1fr; gap: 24px; margin-top: 36px; }
  .render-detail__caption h3 br { display: none; }
  .hero-credits { margin-top: 30px; }
}
@media (max-width: 600px) {
  .evaluation-panel { padding: 24px 16px; }
  .resource-link { min-width: 95px; }
  .resource-status { display: none; }
  .project-page .paper-result-card__bar { padding: 16px; }
}

@media (max-width: 900px) {
  .project-nav__inner { justify-content: flex-start; gap: 30px; }
  .project-page .main-section { padding: 64px 24px; }
  .teaser-hero { min-height: 620px; }
  .project-title { font-size: 32px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 65px; }
  .teaser-hero { height: auto; min-height: 100svh; }
  .hero-masthead { padding: 20px 22px; }
  .hero-wordmark { font-size: 23px; }
  .hero-viewer-link { font-size: 11px; }
  .teaser-content { padding: 110px 23px 95px; gap: 0; }
  .hero-venue { margin-top: 24px; font-size: 15px; }
  .teaser-background { background-position: 51% center; }
  .teaser-overlay { background: linear-gradient(180deg, rgba(14, 13, 10, .44), rgba(14, 13, 10, .64) 40%, rgba(14, 13, 10, .84)); }
  .hero-eyebrow { font-size: 12px; letter-spacing: 0; gap: 12px; margin-bottom: 22px; }
  .hero-eyebrow::before,
  .hero-eyebrow::after { width: 20px; }
  .project-name { font-size: 76px; }
  .project-title { max-width: 420px; margin-top: 19px; font-size: 27px; line-height: 1.3; }
  .title-break { display: none; }
  .project-page .publication-authors { gap: 9px 17px; font-size: 14px; }
  .publication-affiliations { margin-top: 14px; font-size: 12px; }
  .publication-links { gap: 9px; margin-top: 27px; }
  .resource-link { min-height: 43px; padding: 0 16px; font-size: 12px; }
  .resource-link--unavailable { min-height: 43px; }
  .hero-scroll { font-size: 12px; bottom: 23px; }
  .project-nav__inner { padding: 18px 22px; gap: 27px; }
  .project-nav a { font-size: 11px; }
  .project-page .main-section { padding: 52px 18px; }
  .project-page .section-heading { margin-bottom: 30px; }
  .project-page .section-heading .title { font-size: 30px; }
  .project-page .section-description { font-size: 13px; }
  .project-page .section-kicker { font-size: 13px; margin-bottom: 12px; }
  .project-page .chart-card { padding: 0; }
  .project-page .chart-title { font-size: 15px; }
  .project-page .arena-row { grid-template-columns: 18px 91px minmax(24px, 1fr) 32px 30px; gap: 5px; padding: 9px 0; }
  .project-page .arena-name { font-size: 11px; }
  .project-page .arena-score { font-size: 12px; }
  .project-page .arena-count { font-size: 10px; }
  .project-page .pairwise-legend { font-size: 11px; gap: 16px; }
  .project-page .paper-result-card__bar { gap: 10px; padding: 13px 14px; }
  .project-page .paper-result-card__label { font-size: 12px; }
  .project-page .paper-result-card__link { font-size: 10px; }
  .footer-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .footer-title { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project-page *, .project-page *::before, .project-page *::after { animation: none !important; transition: none !important; }
}
