:root {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #000000;
  --surface: #000000;
  --surface-subtle: #000000;
  --surface-border: rgba(255, 255, 255, 0.18);
  --surface-border-strong: rgba(255, 255, 255, 0.28);
  --text-main: #ffffff;
  --text-body: #ffffff;
  --text-muted: #ffffff;
  --brand: #ffffff;
  --brand-strong: #ffffff;
  --shadow-soft: none;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .navbar-menu,
html[data-theme="dark"] .navbar-brand,
html[data-theme="dark"] .section,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .section .container.is-max-desktop,
html[data-theme="dark"] .section:nth-of-type(even) .container.is-max-desktop,
html[data-theme="dark"] .section#BibTeX .container.is-max-desktop,
html[data-theme="dark"] .pir-card,
html[data-theme="dark"] .pir-stat,
html[data-theme="dark"] .pir-table-wrap,
html[data-theme="dark"] .pir-figure-frame,
html[data-theme="dark"] .pir-inline-note {
  background: #000000 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] body {
  border-color: rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .navbar {
  border-bottom: 0;
}

html[data-theme="dark"] *,
html[data-theme="dark"] .title,
html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .content,
html[data-theme="dark"] .content p,
html[data-theme="dark"] .content li,
html[data-theme="dark"] .content strong,
html[data-theme="dark"] .content b,
html[data-theme="dark"] .publication-title,
html[data-theme="dark"] .publication-authors,
html[data-theme="dark"] .publication-authors a,
html[data-theme="dark"] .publication-venue,
html[data-theme="dark"] .publication-awards,
html[data-theme="dark"] .project-menu-meta,
html[data-theme="dark"] .navbar-item,
html[data-theme="dark"] .navbar-burger,
html[data-theme="dark"] .navbar-burger span,
html[data-theme="dark"] .button .icon,
html[data-theme="dark"] .footer .icon-link {
  color: #ffffff !important;
}

html[data-theme="dark"] a,
html[data-theme="dark"] a:hover,
html[data-theme="dark"] .publication-authors a:hover {
  color: #ffffff !important;
}

html[data-theme="dark"] .section .container.is-max-desktop,
html[data-theme="dark"] .pir-card,
html[data-theme="dark"] .pir-stat,
html[data-theme="dark"] .pir-table-wrap,
html[data-theme="dark"] .pir-figure-frame,
html[data-theme="dark"] .pir-inline-note,
html[data-theme="dark"] .publication-video,
html[data-theme="dark"] .interpolation-panel,
html[data-theme="dark"] .bibtex-block,
html[data-theme="dark"] pre,
html[data-theme="dark"] .link-block .button,
html[data-theme="dark"] .button.is-dark,
html[data-theme="dark"] .bibtex-copy-btn,
html[data-theme="dark"] .bibtex-copy,
html[data-theme="dark"] #back-to-top {
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .navbar-start > .navbar-item:hover,
html[data-theme="dark"] .project-menu summary:hover,
html[data-theme="dark"] .project-menu[open] summary,
html[data-theme="dark"] .link-block .button:hover,
html[data-theme="dark"] .button.is-dark:hover,
html[data-theme="dark"] .bibtex-copy-btn:hover,
html[data-theme="dark"] .bibtex-copy:hover,
html[data-theme="dark"] #back-to-top:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.project-theme-toggle {
  border: 0;
  cursor: pointer;
  background: transparent;
  color: var(--text-main);
  font: inherit;
}

.project-theme-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.project-theme-toggle .theme-icon-light {
  display: none;
}

html[data-theme="dark"] .project-theme-toggle .theme-icon-dark {
  display: none;
}

html[data-theme="dark"] .project-theme-toggle .theme-icon-light {
  display: inline-flex;
}

html[data-theme="dark"] .project-menu-dropdown {
  background: #000000 !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .project-menu-dropdown a:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .link-block .button,
html[data-theme="dark"] .button.is-dark,
html[data-theme="dark"] .bibtex-copy-btn,
html[data-theme="dark"] .bibtex-copy,
html[data-theme="dark"] pre,
html[data-theme="dark"] code {
  background: #000000 !important;
}

html[data-theme="dark"] .bibtex-copy,
html[data-theme="dark"] #back-to-top {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.42) !important;
}

html[data-theme="dark"] .publication-title span[style*="color"],
html[data-theme="dark"] .publication-title span[style*="gradient"],
html[data-theme="dark"] span[style*="color"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
}

/* Minimal floating scrollbar: thumb only, no vertical track line. */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 24, 39, 0.35) transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.35);
  border: 2px solid transparent;
  background-clip: content-box;
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: transparent;
}

html[data-theme="dark"] {
  scrollbar-color: rgba(255, 255, 255, 0.72) transparent;
}

html[data-theme="dark"]::-webkit-scrollbar-thumb,
html[data-theme="dark"] body::-webkit-scrollbar-thumb,
html[data-theme="dark"] *::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid transparent;
  background-clip: content-box;
}

