/* Standalone paper shell: one navigation and one reading column. */
.project-page { --project-width:1040px; --reader-width:780px; --project-header-offset:57px; }
html:has(.project-page) { scroll-padding-top:0; scroll-behavior:auto; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.project-shell { width:min(100%,var(--project-width)); margin-inline:auto; padding-inline:40px; }
.project-page #main { scroll-margin-top:var(--project-header-offset); }
.project-header { width:min(100%,var(--project-width)); margin-inline:auto; padding-inline:40px; }
.project-header-inner { max-width:var(--reader-width); margin:auto; min-height:64px; padding:4px 0; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.project-navigation { position:sticky; top:0; z-index:10; max-width:var(--reader-width); margin-inline:auto; background:var(--paper); border-bottom:1px solid var(--rule); }
.project-navigation-inner { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; min-height:56px; gap:16px; }
.project-topic-tabs { grid-column:2; display:flex; align-items:stretch; justify-self:center; gap:32px; }
.project-topic-tabs a { position:relative; display:flex; align-items:center; min-height:56px; padding:8px 4px; color:var(--muted); text-decoration:none; font-size:13px; font-weight:500; }
.project-topic-tabs a:hover, .project-topic-tabs a[aria-selected="true"] { color:var(--accent); }
.project-topic-tabs a[aria-selected="true"]::after { position:absolute; content:""; left:0; right:0; bottom:-1px; height:2px; background:var(--accent); }
.project-topic-tabs a:focus-visible { outline:2px solid var(--accent); outline-offset:4px; border-radius:3px; }
.project-navigation .theme-toggle { grid-column:3; justify-self:end; width:36px; height:36px; padding:8px; }
.project-conference { display:inline-flex; align-items:center; gap:8px; min-height:36px; color:var(--ink); font-size:12px; font-weight:500; line-height:20px; white-space:nowrap; }
.conference-year { color:var(--muted); font-weight:400; }
.project-conference img { display:block; width:64px; height:64px; border-radius:4px; background:#fff; }

.project-hero { padding:24px 0; text-align:center; }
.project-hero h1 { max-width:900px; margin:0 auto 18px; font-size:38px; font-weight:500; line-height:1.28; letter-spacing:-.8px; text-wrap:balance; }
.project-wordmark { font-weight:650; }
.project-byline { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px 28px; }
.project-authors { display:flex; flex-wrap:wrap; justify-content:center; gap:6px 22px; margin:0; padding:0; list-style:none; font-size:15px; }
.project-authors a { color:var(--accent); text-decoration:none; }
.project-authors a:hover { text-decoration:underline; }
.project-affiliation { display:inline-flex; align-items:center; padding:5px 8px; border-radius:5px; background:#fff; }
.project-affiliation img { display:block; width:180px; height:auto; }
.project-print-affiliation { display:none; }
.project-resources { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:10px; margin-top:16px; }
.resource-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:11px 16px; border:1px solid transparent; border-radius:10px; background:var(--surface); color:var(--ink); font-size:14px; font-weight:500; line-height:20px; white-space:nowrap; text-decoration:none; transition:background 150ms ease,color 150ms ease; }
.resource-button svg { flex:none; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linejoin:round; stroke-linecap:round; }
.resource-button:hover { background:var(--accent-soft); color:var(--accent); }
.resource-button:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.resource-primary { padding-inline:18px; background:var(--ink); color:var(--paper); }
.resource-primary:hover { background:var(--accent); color:var(--paper); }
.project-research { max-width:var(--reader-width); margin:0 auto; padding:0; scroll-margin-top:calc(var(--project-header-offset) + 28px); }
.project-research > .research-panel { padding:38px 0 48px; border:0; }
.project-research > .research-panel[hidden] { display:none; }
.project-research [id], .project-citation { scroll-margin-top:calc(var(--project-header-offset) + 28px); }
.project-overview { display:block; }
.citation-bibtex > summary { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:54px; padding:14px 0; color:var(--muted); font-size:13px; font-weight:500; list-style:none; cursor:pointer; }
.citation-bibtex > summary::-webkit-details-marker { display:none; }
.citation-bibtex > summary > span { font-size:20px; font-weight:400; }
.citation-bibtex[open] > summary > span { transform:rotate(45deg); }
.project-citation { max-width:var(--reader-width); margin:0 auto; padding:0 0 26px; border-top:1px solid var(--rule); }
.citation-bibtex > summary { color:var(--ink); font-size:15px; }
.citation-bibtex > summary h2 { margin:0; font:inherit; }
.citation-actions { display:flex; flex-wrap:wrap; align-items:center; gap:18px; margin:6px 0 14px; font-size:12px; }
.citation-actions a { display:inline-flex; align-items:center; min-height:40px; gap:6px; color:var(--muted); text-decoration:none; }
.citation-actions button { min-height:38px; padding:8px 13px; border:1px solid var(--rule); border-radius:6px; background:var(--paper); color:var(--ink); font-size:12px; cursor:pointer; }
.citation-actions :is(a,button):hover { color:var(--accent); }
.project-citation pre { margin:0; padding:20px; border:0; border-radius:8px; background:var(--surface); color:var(--muted); font:12px/1.85 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.citation-status { margin:0; color:var(--muted); font-size:12px; }
.citation-status:not(:empty) { margin-top:10px; }
.project-footer { display:flex; justify-content:space-between; align-items:center; gap:20px; padding-block:22px; border-top:1px solid var(--rule); color:var(--muted); font-size:11px; }
.project-footer a { text-decoration:none; }
@media (max-width:800px) {
  .project-shell, .project-header { padding-inline:28px; }
  .project-hero h1 { font-size:34px; }
}
@media (max-width:740px) {
  .project-header-inner { min-height:60px; }
  .project-affiliation { padding:2px 4px; }
  .project-affiliation img { width:160px; }
}
@media (max-width:620px) {
  .project-page { --project-header-offset:53px; }
  .project-shell, .project-header { padding-inline:22px; }
  .project-conference { gap:6px; font-size:11px; }
  .project-conference img { width:52px; height:52px; }
  .project-header-inner { gap:12px; }
  .project-navigation-inner { grid-template-columns:1fr auto; min-height:52px; gap:20px; }
  .project-topic-tabs { grid-column:1; width:100%; justify-content:space-between; gap:12px; }
  .project-topic-tabs a { min-height:52px; padding-inline:0; font-size:12px; }
  .project-navigation .theme-toggle { grid-column:2; }
  .project-hero { padding:24px 0 20px; }
  .project-hero h1 { margin:0 auto 16px; font-size:28px; letter-spacing:-.5px; }
  .project-byline { gap:8px 20px; }
  .project-authors { gap:6px 16px; font-size:14px; }
  .project-affiliation img { width:140px; }
  .project-resources { gap:8px; margin-top:16px; }
  .resource-button { padding-inline:12px; font-size:13px; gap:8px; }
  .resource-primary { padding-inline:14px; }
  .resource-button svg { width:16px; height:16px; }
  .project-research > .research-panel { padding:30px 0 36px; }
  .project-citation pre { padding:16px; font-size:11px; }
  .project-footer { gap:12px; font-size:10px; }
}
@media (max-width:360px) {
  .project-shell, .project-header { padding-inline:18px; }
  .project-hero h1 { font-size:25px; }
  .project-authors { display:grid; grid-template-columns:repeat(2,max-content); gap:5px 22px; }
}
@media print {
  .project-header, .project-navigation, .project-resources, .citation-actions, .citation-status { display:none; }
  .project-page { --reader-width:100%; }
  .project-shell { width:100%; padding-inline:0; }
  .project-hero { padding:8px 0 24px; }
  .project-hero h1 { font-size:24px; }
  .project-byline { display:block; }
  .project-print-affiliation { display:block; margin-top:6px; font-size:12px; }
  .project-research > .research-panel[hidden] { display:block !important; }
  .project-research > .research-panel { padding-block:24px; border-top:1px solid var(--rule); }
  .citation-bibtex::details-content { display:block; content-visibility:visible; }
  .citation-bibtex > summary > span { display:none; }
  .project-citation pre { font-size:9pt; }
}
@media (prefers-reduced-motion:reduce) {
  html:has(.project-page) { scroll-behavior:auto; }
  .resource-button { transition:none; }
}
