/* Publications spacing */
.pub-item { margin: 0 0 0.6rem 0; line-height: 1.55; }
.pub-item a { text-decoration: underline; }
/* Light theme uses default colors; dark mode adjusts tone */
html.dark .pub-item em { color: #b6b6b6; }
html.dark .pub-item strong { font-weight: 700; color: #dcdcdc; }

/* Dark mode base */
:root { color-scheme: dark light; }
html.dark body,
html.dark .page,
html.dark .page__content,
html.dark .archive,
html.dark .home,
html.dark .sidebar { background: #0b0b0c; color: #e6e6e6; }
html.dark .page__content { background: transparent !important; border-color: transparent !important; }
html.dark .author__urls a, html.dark .author__urls li, html.dark .author__content, html.dark .author__avatar { color: #e6e6e6 !important; }
html.dark .author__urls a { color: #9fd0ff !important; }
html.dark .author__urls a:hover { color: #bfe0ff !important; }

/* Links */
html.dark a { color: #8cc7ff; }
html.dark a:hover { color: #b5ddff; }
/* Ensure links have no box-shadow/underline artifacts in dark */
html.dark a { box-shadow: none !important; text-decoration: underline; }
/* ensure light theme also uses underline with no shadow */
html:not(.dark) a { box-shadow: none !important; text-decoration: underline; }

/* Masthead / nav */
html.dark .masthead,
html.dark .masthead__menu,
html.dark .greedy-nav { background: #0f0f11; border-bottom: 1px solid #1b1b1f; }
html.dark .greedy-nav a { color: #e8e8e8; }
html.dark .greedy-nav a:hover { color: #b5ddff; }
html.dark .greedy-nav .navicon,
html.dark .greedy-nav .navicon:before,
html.dark .greedy-nav .navicon:after { background: #d0d0d0; }
html.dark .greedy-nav button { border-color: #444; }

/* Footer */
html.dark .page__footer { background: #0f0f11; color: #cfcfcf; border-top: 1px solid #1b1b1f; }
html.dark .page__footer a { color: #9fd0ff; }

/* Content blocks */
html.dark .notice, html.dark .toc { background: #121216; border-color: #222; }
html.dark .page__title, html.dark h1, html.dark h2, html.dark h3, html.dark h4 { color: #f0f0f0; }
html.dark blockquote { color: #c8c8c8; border-left-color: #2a2a2a; }

/* Code */
html.dark pre, html.dark code { background: #111218; color: #e6e6e6; }
html.dark pre { border: 1px solid #222; }

/* Tables */
html.dark table { background: #0e0f14; color: #e6e6e6; }
html.dark table th, html.dark table td { border-color: #222; }

/* Publications simple list */
.pub-year { margin: .8rem 0 .25rem; color: #e6e6e6; font-weight:600; font-size: 1rem; border-top:1px solid #1b1b1f; padding-top:.6rem; }
.pub-line { margin:.1rem 0; font-size:.9rem; line-height:1.4; }
.pub-line a { text-decoration: underline; }
.pub-line em { color:#b6b6b6; }

/* Toggle button */
.theme-toggle { position: fixed; right: 12px; bottom: 12px; z-index: 9999; }
.theme-toggle button { padding: 6px 10px; border: 1px solid #666; background: transparent; color: inherit; border-radius: 6px; }
