html[data-theme="dark"] {
  color-scheme: dark;
  --pub-link-blue: #5eb8e8;
  --pub-link-blue-hover: #8ecff5;
  --color-prose: #e5e7eb;
  --color-text: #f1f5f9;
  --color-accent: #f0a0a0;
  --color-accent-hover: #f5bcbc;
  --color-muted: #94a3b8;
}

html[data-theme="dark"] body,
html[data-theme="dark"] body.minimal-site {
  background-color: #0f1419;
  color: var(--color-prose);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] strong,
html[data-theme="dark"] header.site-sidebar h1.site-name,
html[data-theme="dark"] section.site-main strong,
html[data-theme="dark"] .publication-section .section-title {
  color: var(--color-text);
}

html[data-theme="dark"] a {
  color: var(--pub-link-blue);
}

html[data-theme="dark"] a:hover {
  color: var(--pub-link-blue-hover);
}

html[data-theme="dark"] .nav-site-link,
html[data-theme="dark"] .pub-meta-row,
html[data-theme="dark"] .pub-meta-row .pub-aux-link,
html[data-theme="dark"] .resource-label {
  color: var(--color-accent);
}

html[data-theme="dark"] .nav-site-link:hover,
html[data-theme="dark"] .pub-meta-row .pub-aux-link:hover {
  color: var(--color-accent-hover);
}

html[data-theme="dark"] .citation-lead-link,
html[data-theme="dark"] .citation-lead-plain,
html[data-theme="dark"] .citation-coauthor-link,
html[data-theme="dark"] .mail-link,
html[data-theme="dark"] footer.site-footer-minimal a {
  color: var(--pub-link-blue);
}

html[data-theme="dark"] .citation-coauthor-link {
  text-decoration-color: rgba(94, 184, 232, 0.55);
}

html[data-theme="dark"] blockquote {
  border-left-color: #334155;
}

html[data-theme="dark"] code,
html[data-theme="dark"] pre {
  color: #e2e8f0;
}

html[data-theme="dark"] pre {
  background: #1e293b;
  border-color: #334155;
}

html[data-theme="dark"] th,
html[data-theme="dark"] td {
  border-bottom-color: #334155;
}

html[data-theme="dark"] th,
html[data-theme="dark"] dt {
  color: #e2e8f0;
}

html[data-theme="dark"] hr {
  background: #334155;
}

html[data-theme="dark"] header ul {
  background: #1e293b;
  border-color: #334155;
}

html[data-theme="dark"] header li {
  border-right-color: #334155;
}

html[data-theme="dark"] header ul a strong {
  color: var(--color-text);
}

@media print, screen and (max-width: 960px) {
  html[data-theme="dark"] section {
    border-color: #334155;
  }
}

html[data-theme="dark"] .site-affil {
  color: #94a3b8;
}

html[data-theme="dark"] .site-econ-verse {
  color: #cbd5e1;
}

html[data-theme="dark"] .site-verse-inline {
  color: #94a3b8;
}

html[data-theme="dark"] .site-icon-github {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .site-icon-github:hover {
  color: #fff !important;
}

html[data-theme="dark"] .mail-link:hover {
  color: var(--pub-link-blue-hover);
}

html[data-theme="dark"] section.site-main,
html[data-theme="dark"] section.site-main .site-lead,
html[data-theme="dark"] .publication-section,
html[data-theme="dark"] .pub-title-line .citation-rest,
html[data-theme="dark"] .pub-title-line .citation-rest em,
html[data-theme="dark"] .pub-title-line .citation-with,
html[data-theme="dark"] .pub-title-line .coauthor-sep,
html[data-theme="dark"] .pub-title-line .citation-coauthor-name,
html[data-theme="dark"] .wip-section .wip-line,
html[data-theme="dark"] .wip-section .wip-title,
html[data-theme="dark"] .wip-section .coauthor-sep,
html[data-theme="dark"] .wip-section .citation-coauthor-name,
html[data-theme="dark"] .abstract-box {
  color: var(--color-prose);
}

html[data-theme="dark"] .home-nav-center .nav-sep {
  color: #475569;
}

html[data-theme="dark"] footer.site-footer-minimal {
  border-top-color: #334155;
}

html[data-theme="dark"] .resource-item::before {
  color: #64748b;
}

html[data-theme="dark"] .pub-wip-divider {
  background: #475569;
}

html[data-theme="dark"] .abstract-box {
  background: #1e293b;
  border-left-color: #475569;
}

html[data-theme="dark"] .theme-toggle-btn {
  color: #94a3b8;
}

html[data-theme="dark"] .theme-toggle-btn:hover {
  color: #fbbf24;
}

html[data-theme="dark"] .glider-prev,
html[data-theme="dark"] .glider-next {
  background: rgba(30, 41, 59, 0.92);
  color: #e2e8f0;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 0;
}

.theme-toggle-btn:hover {
  color: #475569;
}

.theme-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.theme-icon-moon {
  display: none;
}

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

html[data-theme="dark"] .theme-icon-moon {
  display: block;
}
