/* ---------- Section nav, BibTeX and footer (static/css/page.css) ---------- */

/* floating section nav, top right (pairs with the corner logo) */
.sec-nav {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 50;
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 10px rgba(24, 35, 47, 0.05);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
/* appears once the reader starts scrolling, so the title area stays clean */
body.scrolled .sec-nav {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.sec-nav a {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--aff);
  transition: background 0.15s, color 0.15s;
}
.sec-nav a:hover { color: var(--ink); background: rgba(30, 42, 54, 0.05); }
.sec-nav a.active {
  color: var(--ink);
  font-weight: 600;
  background: #fff;
  box-shadow: 0 1px 3px rgba(24, 35, 47, 0.12);
}
.sec-nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* anchor jumps should not hide headings under the fixed bars */
#demo, #method, #results, #gallery, #ablations, #bibtex { scroll-margin-top: 72px; }

/* ---------- BibTeX ---------- */
.bib {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  background: var(--panel);
}
.bib pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
  white-space: pre;
}
.bib-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: #fff;
  color: var(--aff);
  font: 600 12.5px/1.2 var(--sans);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.bib-copy:hover { color: var(--ink); border-color: #c9d5df; }
.bib-copy svg { width: 14px; height: 14px; }
.bib-copy.done { color: #9a7300; border-color: rgba(232, 177, 12, 0.6); }
.bib-note {
  max-width: 860px;
  margin: 10px auto 0;
  font-size: 13.5px;
  color: var(--note);
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 40px;
  padding: 26px 24px 34px;
  border-top: 1px solid var(--panel-line);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--note);
}
.site-footer a {
  color: var(--aff);
  border-bottom: 1px solid var(--panel-line);
  transition: color 0.15s, border-color 0.15s;
}
.site-footer a:hover { color: var(--ink); border-color: var(--aff); }

@media (max-width: 760px) {
  .sec-nav { display: none; }
  .bib pre { font-size: 12px; padding: 16px; }
}

/* "Scroll for details" under the demo */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: max-content;
  margin: 0 auto;
  padding: 14px 18px 0;
  color: var(--note);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity 0.35s ease, color 0.15s;
}
.scroll-cue:hover { color: var(--ink); }
.scroll-cue svg {
  width: 22px;
  height: 22px;
  animation: cue-bob 1.8s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(5px); opacity: 1; }
}
body.scrolled .scroll-cue { opacity: 0; pointer-events: none; }
#method { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }
