/* Public project layout, adapted from the XU Lab Page template. */
/* Computer Modern Unicode carries the manuscript's Computer Modern typography to the web. */
@font-face { font-family: 'CMU Serif'; src: url('assets/fonts/cmunrm.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'CMU Serif'; src: url('assets/fonts/cmunbx.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'CMU Serif'; src: url('assets/fonts/cmunti.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'CMU Serif'; src: url('assets/fonts/cmunbi.otf') format('opentype'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'CMU Typewriter'; src: url('assets/fonts/cmuntt.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
:root { --muted: #676a77; --project-surface: #f7f8fb; --serif: 'CMU Serif', 'Times New Roman', serif; --sans: var(--serif); }
html { scroll-padding-top: 96px; }
.header-inner { gap: 32px; }
.header-inner .wordmark { white-space: nowrap; letter-spacing: 0; }
.project-nav { display: flex; align-items: center; justify-content: flex-start; gap: 24px; min-width: 0; }
.project-nav a {
  position: relative;
  padding-block: 9px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: color .2s ease;
}
.project-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.project-nav a:hover, .project-nav a.is-active { color: var(--accent); }
.project-nav a.is-active::after { transform: scaleX(1); }
.project-nav a[aria-current]::after { top: auto; bottom: 0; }
.section-card { padding: 44px 36px; }
.section-intro { margin-bottom: 28px; }
.section-title, #comparison-title, #rollout-title, #memory-title { margin: 0; color: var(--ink); font-size: clamp(26px, 3vw, 34px); line-height: 1.3; font-weight: 700; letter-spacing: 0; text-wrap: balance; }
main .section-card .section-intro > p:last-child { max-width: 880px; margin-top: 14px; font-size: 15px; line-height: 1.8; }
.hero { background: #fff; }
.hero-inner { max-width: 1160px; margin-inline: auto; padding: 62px 24px 32px; }
.hero h1 { margin: 0 0 20px; font-size: clamp(62px, 7vw, 88px); font-weight: 700; letter-spacing: -1.5px; }
.hero-subtitle { width: max-content; max-width: 100%; margin-inline: auto; white-space: nowrap; font-size: min(27px, calc((100vw - 48px) / 33)); line-height: 1.45; letter-spacing: 0; }
.project-lineage { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; text-wrap: balance; }
.project-lineage a { color: var(--accent); font-weight: 500; text-decoration: none; white-space: nowrap; }
.project-lineage a:hover { color: var(--ink); }
.project-lineage a span { display: inline-block; margin-left: 2px; font-size: 12px; }
.project-authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; max-width: 920px; margin: 26px auto 0; font-size: 15px; line-height: 1.8; }
.author-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; width: 100%; }
.author-row > span { white-space: nowrap; }
.author-row a { color: inherit; text-decoration: none; }
.author-row a:hover { color: var(--accent); }
.project-authors sup { margin-left: 2px; color: var(--accent); font-size: 10px; }
.project-affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; margin-top: 16px; }
.project-affiliation { color: var(--muted); font-size: 12px; line-height: 1.8; }
.project-affiliation sup { margin-right: 3px; color: var(--accent); }
.project-affiliation > span { white-space: nowrap; }
.project-roles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.project-roles sup { margin-right: 4px; color: var(--accent); }
.project-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.project-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 22px;
  border: 1px solid #d5d7ff;
  border-radius: 999px;
  background: var(--accent-pale);
  color: var(--accent);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color .2s ease, background .2s ease;
}
.project-button:hover { border-color: var(--accent); background: #e8e9ff; }
.project-button-quiet { border-color: var(--line); background: #fff; color: var(--ink); }
.project-button-quiet:hover { background: #f9f9ff; }
.project-button > svg { width: 17px; height: 17px; flex: none; }
.project-actions .project-button { border-color: var(--line); background: #fff; color: var(--ink); }
.project-actions .project-button-pending:disabled { cursor: default; opacity: .55; }
.project-actions .project-button:is(:hover, :focus-visible) { border-color: #b8bac3; background: #fafafa; }
.resource-brand-icon { position: relative; display: inline-block; width: 22px; height: 22px; flex: none; }
.resource-brand-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .18s ease; }
.resource-brand-icon .brand-color { opacity: 0; }
.project-button:is(:hover, :focus-visible) .brand-monochrome { opacity: 0; }
.project-button:is(:hover, :focus-visible) .brand-color { opacity: 1; }
.hero-demo { max-width: 900px; margin: 36px auto 0; }
.hero-demo video { width: 100%; aspect-ratio: 832 / 480; object-fit: contain; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 36px rgba(17, 24, 39, .06); }
.hero-demo figcaption { margin-top: 12px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.hero-chapters { max-width: 900px; margin-inline: auto; text-align: left; }
.hero-chapters .player-message:empty { display: none; }
#overview .section-intro { margin-bottom: 24px; }
.overview-lead { max-width: 900px; margin: 0 0 15px; color: var(--ink); font-size: clamp(20px, 2.2vw, 27px); font-weight: 450; letter-spacing: -.5px; line-height: 1.45; text-wrap: balance; }
.overview-copy { max-width: 950px; margin: 0; font-size: 15px; line-height: 1.9; color: var(--muted); }
.method-figure { margin: 28px 0 0; }
.method-figure > a { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: #fff; }
.method-figure img { display: block; width: 100%; height: auto; }
.method-figure figcaption { max-width: 920px; margin: 15px auto 0; color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; }
.method-figure figcaption > span { color: var(--accent); white-space: nowrap; }
.method-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.method-details article { min-width: 0; padding: 22px; background: var(--project-surface); border: 1px solid var(--line); border-radius: 12px; }
.method-details h3 { margin: 0 0 10px; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.5; }
.method-details p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
@media (min-width: 761px) {
  .method-details .chunk-conditioning-copy { max-width: 305px; text-wrap: balance; }
}
.citation-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.citation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.citation-actions .project-button { padding: 8px 16px; font-size: 12px; }
.citation-download { color: var(--muted); font-size: 12px; }
.citation-download:hover { color: var(--accent); }
.citation-code { margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--project-surface); color: #4a4d59; font: 13px/1.85 'CMU Typewriter', ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.citation-code code { font: inherit; }
.citation-code:focus-visible { outline: 3px solid #959bff; outline-offset: 4px; }
.citation-status { min-height: 18px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.project-footer .footer-identity { grid-column: 2; text-align: center; }
.footer-identity > a { color: var(--ink); font-size: 12px; }
.footer-identity > a:hover { color: var(--accent); }
.footer-identity p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }

@media (max-width: 1050px) {
  .project-nav { gap: 17px; }
  .header-inner { gap: 20px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 130px; }
  .header-inner { min-height: 0; height: auto; justify-content: flex-start; gap: 8px; padding: 14px 20px 10px; }
  .header-inner .wordmark { font-size: 18px; }
  .project-nav { flex: 0 0 100%; overflow-x: auto; gap: 22px; padding-bottom: 3px; }
  .project-nav a { font-size: 10px; }
  .hero-inner { padding: 38px 20px 16px; }
  .hero h1 { font-size: clamp(54px, 10vw, 74px); letter-spacing: -1px; }
  .section-card { padding: 28px 22px; }
  main .section-card .section-intro > p:last-child { font-size: 14px; }
  .project-authors { max-width: 520px; gap: 7px 18px; font-size: 13px; }
  .author-row { display: contents; }
  .project-affiliations { flex-direction: column; gap: 4px; margin-top: 14px; }
  .project-affiliation { max-width: 350px; margin-inline: auto; font-size: 11px; line-height: 1.8; }
  .project-roles { font-size: 10px; }
  .project-button { font-size: 13px; padding: 10px 18px; gap: 9px; }
  .hero-demo { margin-top: 28px; }
  .hero-demo video { border-radius: 12px; }
  .hero-demo figcaption { font-size: 12px; }
  .overview-copy { font-size: 14px; }
  .method-figure > a { padding: 8px; }
  .method-details { grid-template-columns: 1fr; gap: 12px; }
  .method-details article { padding: 20px; }
  .citation-heading { gap: 18px; }
  .citation-code { padding: 16px; font-size: 12px; }
  .project-footer { grid-template-columns: 1fr auto; }
  .project-footer .footer-identity { grid-column: 1; text-align: left; }
  .project-footer > .back-top { grid-column: 2; }
}
@media (max-width: 440px) {
  .overview-lead { font-size: 20px; }
  .section-card { padding: 26px 18px; }
  .section-title, #comparison-title, #rollout-title, #memory-title { font-size: 25px; letter-spacing: 0; }
  .project-footer { gap: 10px; }
  .footer-identity p { max-width: 190px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .project-nav a, .project-nav a::after, .project-button, .resource-brand-icon img, .section-card { transition: none; }
}
