/* Page accents and the light/dark theme switch.
   Loaded after main.css. Dark mode applies when <html data-theme="dark">. */

:root {
  --accent-name: royalblue;
  --accent-highlight: #8b0000;
  --accent-button: #00369f;
  --text-muted: gray;
}

/* own name in author lists, Spotlight/Oral labels, secondary text */
.me { color: var(--accent-name); }
.hl { color: var(--accent-highlight); }
.muted { color: var(--text-muted); }

/* News "Show more" button */
.news-toggle {
  background: none;
  border: 1px solid var(--accent-button);
  color: var(--accent-button);
  border-radius: 4px;
  padding: 3px 12px;
  cursor: pointer;
  font-size: 0.85em;
}

/* Sidebar links: between 925px and 1279px the page is a fixed 925px column and
   the sidebar is at its narrowest; shrink the links slightly there so the
   email address stays on one line and clear of the content column */
@media (min-width: 925px) and (max-width: 1279px) {
  .sidebar .author__urls li { font-size: 0.9em; }
}

/* Email link in the sidebar: click copies the address */
.copy-email { cursor: pointer; }

/* Theme switch in the top bar */
.masthead__inner-wrap { position: relative; }
.masthead__menu { margin-right: 2.75em; }
.theme-toggle {
  position: absolute;
  top: 50%;
  right: 0.5em;
  transform: translateY(-50%);
  width: 2.1em;
  height: 2.1em;
  padding: 0;
  border: 1px solid #dee0e1;
  border-radius: 50%;
  background: transparent;
  color: #7a8288;
  font-size: 1em;
  line-height: 1;
  cursor: pointer;
  z-index: 30;
}
.theme-toggle:hover { color: #494e52; border-color: #bdc1c4; }

/* ---------- dark theme ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  background-color: #16181c;
  --accent-name: #7aa7ff;
  --accent-highlight: #ff8a80;
  --accent-button: #8fb4ee;
  --text-muted: #9aa1a9;
}
html[data-theme="dark"] body { color: #d3d7dc; }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4 { color: #eceef1; }
html[data-theme="dark"] a { color: #8fb4ee; }
html[data-theme="dark"] a:hover { color: #b7cff5; }
html[data-theme="dark"] a:visited { color: #a6bfeb; }
html[data-theme="dark"] u,
html[data-theme="dark"] ins { border-bottom-color: #d3d7dc; }

/* top bar and menu */
html[data-theme="dark"] .masthead {
  background-color: #1b1e23;
  border-bottom-color: #2b3037;
}
html[data-theme="dark"] .greedy-nav { background: #1b1e23; }
html[data-theme="dark"] .greedy-nav a { color: #a4abb3; }
html[data-theme="dark"] .greedy-nav a:hover { color: #eceef1; }
html[data-theme="dark"] .greedy-nav .visible-links a:before { background: #4a515a; }
html[data-theme="dark"] .greedy-nav button { background-color: #4a515a; }
html[data-theme="dark"] .greedy-nav .hidden-links {
  background: #1b1e23;
  border-color: #2b3037;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] .greedy-nav .hidden-links li { border-bottom-color: #2b3037; }
html[data-theme="dark"] .greedy-nav .hidden-links a:hover { color: #eceef1; background: #2b3037; }
html[data-theme="dark"] .greedy-nav .hidden-links:before { border-color: #2b3037 transparent; }
html[data-theme="dark"] .greedy-nav .hidden-links:after { border-color: #1b1e23 transparent; }
html[data-theme="dark"] .theme-toggle { color: #f0c24a; border-color: #3a4049; }
html[data-theme="dark"] .theme-toggle:hover { color: #ffd766; border-color: #5a626c; }

/* sidebar */
html[data-theme="dark"] .author__avatar img { border-color: #2b3037; }
html[data-theme="dark"] .author__urls a,
html[data-theme="dark"] .author__urls_sm a { color: inherit; }
html[data-theme="dark"] .author__urls a:hover,
html[data-theme="dark"] .author__urls_sm a:hover { color: #eceef1; }
html[data-theme="dark"] .sidebar .author__urls i,
html[data-theme="dark"] .sidebar .author__urls_sm i { color: #c3c8ce; }
html[data-theme="dark"] .author__urls-wrapper button {
  background-color: #2b3037;
  color: #d3d7dc;
  border-color: #3a4049;
}
@media (max-width: 924px) {
  html[data-theme="dark"] .author__urls {
    background: #1b1e23;
    border-color: #2b3037;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  }
  html[data-theme="dark"] .author__urls:before { border-color: #2b3037 transparent; }
  html[data-theme="dark"] .author__urls:after { border-color: #1b1e23 transparent; }
}

/* content */
html[data-theme="dark"] .page__content h1 { border-bottom-color: #2b3037; }
html[data-theme="dark"] .paper-box { border-bottom-color: #2b3037; }
html[data-theme="dark"] .paper-box .paper-box-image img {
  background: #fff;
  box-shadow: 0 0 0 1px #2b3037, 0 4px 14px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .badge { background-color: #1f4fb8; }
html[data-theme="dark"] .page__footer {
  color: #9aa1a9;
  background-color: #1b1e23;
  border-top-color: #2b3037;
}
