/* Dark theme. Applied when <html data-theme="dark"> (set from the toggle or the system preference). */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { background-color: #121417; color: #a9b2bc; }
html[data-theme="dark"] p,
html[data-theme="dark"] .post-content,
html[data-theme="dark"] .hl-finding,
html[data-theme="dark"] .rec-table td,
html[data-theme="dark"] .cv-list .cv-what,
html[data-theme="dark"] .course-list .course { color: #d5dbe1; }
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"] .post-title,
html[data-theme="dark"] .hl-title,
html[data-theme="dark"] .bibliography li .author strong,
html[data-theme="dark"] .bibliography li .title { color: #eef1f4; }
html[data-theme="dark"] .post-description,
html[data-theme="dark"] .post-meta,
html[data-theme="dark"] .hl-with, html[data-theme="dark"] .hl-note,
html[data-theme="dark"] .news table .date, html[data-theme="dark"] .rec-table td.date,
html[data-theme="dark"] .cv-list .cv-when, html[data-theme="dark"] .course-list .term,
html[data-theme="dark"] .bibliography li .note, html[data-theme="dark"] .cv-updated,
html[data-theme="dark"] .cv-mobile-note, html[data-theme="dark"] .media-list .outlet,
html[data-theme="dark"] .caption { color: #8c96a2; }

/* Links and accent */
html[data-theme="dark"] a { color: #a9b2bc; }
html[data-theme="dark"] a:hover,
html[data-theme="dark"] article a, html[data-theme="dark"] .news a,
html[data-theme="dark"] .media-list a, html[data-theme="dark"] .bio strong a,
html[data-theme="dark"] .post-description .job-market,
html[data-theme="dark"] .site-nav .page-link.active,
html[data-theme="dark"] .site-header a.site-title:hover,
html[data-theme="dark"] .social a:hover,
html[data-theme="dark"] .publications h2,
html[data-theme="dark"] .header-bar h1,
html[data-theme="dark"] .star { color: #91a7ff; }
html[data-theme="dark"] .social a { color: #a9b2bc; }
html[data-theme="dark"] .bibliography li .author a { border-bottom-color: #91a7ff; }

/* Header, nav, footer */
html[data-theme="dark"] .site-header { background-color: #121417; border-bottom-color: #262b31; }
html[data-theme="dark"] .site-nav { background-color: #121417; border-color: #262b31; }
html[data-theme="dark"] .site-nav .menu-icon > svg path { fill: #cfd6dd; }
html[data-theme="dark"] footer { background-color: #0c0e11; border-top-color: #0c0e11; color: #8c96a2; }
html[data-theme="dark"] footer a { color: #d5dbe1; }
html[data-theme="dark"] footer a:hover { color: #91a7ff; }

/* Rules, tables, code */
html[data-theme="dark"] hr,
html[data-theme="dark"] .news, html[data-theme="dark"] .social,
html[data-theme="dark"] .highlights, html[data-theme="dark"] .recognition,
html[data-theme="dark"] .cv-section h4, html[data-theme="dark"] .course-list li,
html[data-theme="dark"] .post-list > li, html[data-theme="dark"] .header-bar { border-color: #262b31; }
html[data-theme="dark"] .year { border-top-color: #262b31; color: #59626d; }
html[data-theme="dark"] .rec-table tr + tr td { border-top-color: #20242a !important; }
html[data-theme="dark"] table > thead > tr > th, html[data-theme="dark"] table > thead > tr > td,
html[data-theme="dark"] table > tbody > tr > th, html[data-theme="dark"] table > tbody > tr > td { border-top-color: #2a2f36; }
html[data-theme="dark"] pre, html[data-theme="dark"] code { background-color: #1c2026; color: #d5dbe1; }
html[data-theme="dark"] blockquote footer { background-color: #121417; }

/* Cards, highlights, photo, CV viewer */
html[data-theme="dark"] .hl-card { background: #171a1f; border-color: #262b31; border-top-color: #748ffc; }
html[data-theme="dark"] .hl-tag { background: #4c6ef5; }
html[data-theme="dark"] .bio strong { color: #91a7ff; background: none; }
html[data-theme="dark"] .news strong, html[data-theme="dark"] .recognition strong { color: #91a7ff; }
html[data-theme="dark"] .profile img { box-shadow: 0 0 8px rgba(0,0,0,.7); }
html[data-theme="dark"] .cv-embed iframe { border-color: #2a2f36; box-shadow: 0 2px 18px rgba(0,0,0,.5); }

/* Theme toggle button (lives in the nav) */
.theme-toggle { background: none; border: 0; padding: 0 0.15em; margin-left: 0.6em; cursor: pointer; color: #666; font-size: 1.05em; line-height: inherit; vertical-align: baseline; }
.theme-toggle:hover { color: #3b5bdb; }
.theme-toggle .fa-sun { display: none; }
html[data-theme="dark"] .theme-toggle { color: #cfd6dd; }
html[data-theme="dark"] .theme-toggle:hover { color: #ffcb05; }
html[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle .fa-moon { display: none; }

html[data-theme="dark"] .cred { border-color: rgba(145,167,255,.35); color: #91a7ff; background: rgba(145,167,255,.06); }
html[data-theme="dark"] a.cred:hover { background: rgba(145,167,255,.14); color: #91a7ff; }
html[data-theme="dark"] .talks-line { color: #8c96a2; }
html[data-theme="dark"] .bio p.lead { color: #eef1f4; }
