/* CheF adaptation of Academic Project Page Template / Nerfies; CC BY-SA 4.0.
   Local styles are loaded only by chef/index.html. */
:root {
  --text-primary: #30343b;
  --text-secondary: #626973;
  --primary-color: #1775b7;
  --border-color: #dde2e8;
  --background-secondary: #f7f8fa;
}
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif; font-size: 1rem; color: var(--text-primary); line-height: 1.7; background: #fff; }
a { color: var(--primary-color); }
a:hover { color: #125987; text-decoration: underline; }
a:focus-visible, button:focus-visible, pre:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 4px; }
.page-width { width: min(100% - 3rem, 1000px); margin-inline: auto; }
.text-width { width: min(100% - 3rem, 800px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: .5rem; left: 1rem; transform: translateY(-200%); z-index: 20; padding: .5rem 1rem; background: #fff; }
.skip-link:focus { transform: translateY(0); }
.topbar { display: flex; justify-content: space-between; align-items: center; padding-top: 1.25rem; font-size: .875rem; }
.home-link { font-weight: 600; }
.topbar-link { color: var(--text-secondary); }
.publication-header .hero-body { padding: 2.5rem 1.5rem 2.75rem; }
.publication-header .container { max-width: 1000px; }
.project-name { color: var(--primary-color); font-size: 1.5rem; font-weight: 700; letter-spacing: -.04em; margin-bottom: .8rem; }
.publication-title { font-size: clamp(2rem, 3.5vw, 2.9rem); font-weight: 700; line-height: 1.16; letter-spacing: -.035em; text-wrap: balance; margin: 0 auto 1.7rem !important; color: #292d33; }
.publication-authors { font-size: 1.2rem; line-height: 1.8; }
.author-separator { margin-right: .4rem; }
.affiliation { margin-top: .15rem; font-size: 1.1rem; }
.conference { margin-top: .3rem; font-size: 1.15rem; font-weight: 650; }
.publication-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin-top: 1.75rem; }
.button.resource-button { background: #363b43; color: #fff; border: 0; border-radius: 999px; height: 2.65rem; min-width: 110px; gap: .5rem; padding-inline: 1.25rem; }
.button.resource-button[disabled] { opacity: 1; cursor: default; }
.resource-button svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.resource-status { margin-top: .7rem; color: var(--text-secondary); font-size: .875rem; }
.teaser { padding-bottom: 2.5rem; }
.media-placeholder { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; border: 1px dashed #bac4cf; border-radius: 6px; background: #fafbfd; padding: 3.5rem 1.5rem 2rem; text-align: center; color: var(--text-secondary); }
.teaser-placeholder { min-height: 315px; }
.placeholder-tag { position: absolute; top: 1rem; left: 1rem; font-size: .875rem; padding: .1rem .6rem; border: 1px solid var(--border-color); border-radius: 4px; background: #fff; color: #626973; }
.placeholder-title { font-size: 1.15rem; font-weight: 600; color: #535e6b; }
.media-placeholder img { margin-bottom: .5rem; }
figcaption { text-align: center; color: var(--text-secondary); font-size: .875rem; margin-top: .85rem; }
.section-nav { position: sticky; top: 0; z-index: 10; border-block: 1px solid #e9edf1; background: rgba(255,255,255,.97); }
.nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .1rem 1.8rem; padding-block: .7rem; }
.nav-links a { font-size: .875rem; color: #565e69; padding-block: .3rem; }
.nav-links a:hover { color: var(--primary-color); }
.section { padding: 3.5rem 0; }
.soft-section { background: var(--background-secondary); }
.section-title { text-align: center; color: var(--text-primary); font-weight: 650; margin-bottom: 1.4rem !important; }
.title.is-3 { font-size: 1.8rem; line-height: 1.25; letter-spacing: -.025em; }
.section-intro { max-width: 760px; margin: 0 auto 1.8rem; text-align: center; color: var(--text-secondary); }
.text-placeholder { border-left: 3px solid #c2cedb; padding: .25rem 0 .25rem 1.25rem; color: var(--text-secondary); }
.placeholder-label { font-size: .875rem; color: #596776; font-weight: 600; }
.text-placeholder p { margin-top: .35rem; }
.sequence-placeholder, .matching-placeholder { gap: 1.25rem; }
.sequence-grid { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 1rem; width: 100%; }
.sequence-grid > div { display: flex; align-items: center; justify-content: center; min-height: 150px; border: 1px solid #dce3eb; border-radius: 4px; background: #fff; color: #697584; font-size: .875rem; padding: .5rem; }
.matching-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; width: 100%; }
.matching-grid > div { display: grid; place-items: center; min-height: 185px; background: #fff; border: 1px solid #dce3eb; border-radius: 4px; font-size: .875rem; color: #697584; }
.mesh-viewer { border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; }
.viewer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .85rem 1rem; border-bottom: 1px solid var(--border-color); }
.viewer-controls { display: flex; gap: .5rem; }
.viewer-controls .button { font-size: .875rem; height: 2rem; }
.viewer-controls .button[disabled] { opacity: 1; color: #69717c; background: #f1f3f6; border-color: #e0e5eb; }
.viewer-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 330px; padding: 2rem 1rem; text-align: center; color: var(--text-secondary); background: #f8fafc; }
.mesh-icon { width: 64px; height: 64px; margin-bottom: 1rem; fill: none; stroke: #a8b5c4; stroke-width: 1; stroke-linejoin: round; }
.viewer-footer { padding: .65rem 1rem; font-size: .875rem; color: var(--text-secondary); border-top: 1px solid var(--border-color); }
.method-placeholder { min-height: 270px; }
.bibtex-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.bibtex-header .title { margin: 0; color: var(--text-primary); }
.copy-button { font-size: .875rem; color: #3e5468; border-color: #cdd6e0; }
[hidden] { display: none !important; }
.citation-note { font-size: .875rem; color: var(--text-secondary); margin-bottom: 1rem; }
pre { background: #f5f7f9; border: 1px solid #e2e7ec; border-radius: 5px; padding: 1.5rem; line-height: 1.65; overflow-x: auto; font-size: .875rem; color: #364152; }
pre code { font-family: Consolas, "SFMono-Regular", monospace; }
.copy-status { font-size: .875rem; min-height: 1.5em; margin-top: .4rem; color: #386b56; }
.acknowledgements { padding-top: .5rem; padding-bottom: 3.5rem; }
.footer { background: #f7f8fa; border-top: 1px solid #e9edf1; padding: 2.5rem 0; font-size: .875rem; line-height: 1.8; color: var(--text-secondary); }
.footer p + p { margin-top: .7rem; }
.footer-home { padding-top: .5rem; }
@media (max-width: 640px) {
  html { scroll-padding-top: 8rem; }
  .page-width, .text-width { width: calc(100% - 2rem); }
  .publication-header .hero-body { padding: 2rem 1rem; }
  .publication-title { font-size: 2rem; line-height: 1.2; }
  .publication-authors { font-size: 1.05rem; }
  .author-separator { margin-right: .1rem; }
  .publication-links { max-width: 300px; margin-inline: auto; gap: .6rem; }
  .resource-button { flex: 1 0 40%; }
  .teaser-placeholder { min-height: 250px; }
  .section { padding-block: 2.5rem; }
  .nav-links { gap: .1rem 1.25rem; padding-block: .5rem; }
  .media-placeholder { padding-inline: 1rem; }
  .sequence-grid { grid-template-columns: 1fr; gap: .6rem; }
  .sequence-grid > div { min-height: 75px; }
  .matching-grid { gap: .75rem; }
  .matching-grid > div { min-height: 145px; }
  .viewer-empty { min-height: 260px; }
  .viewer-toolbar { gap: .5rem; }
  .title.is-3 { font-size: 1.6rem; }
  pre { padding: 1rem; }
  .acknowledgements { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .topbar, .section-nav, .copy-button { display: none !important; } .section { break-inside: avoid; } }
