/* Card themes: dark translucent cards by default, white cards in bright
   mode (html.bright-mode, from the settings panel). */

/* ------------------------------------------------------------------------
   Dark cards (the default): every card styled like the research/journal
   list tiles (dark translucent tint, light blur, light text). Turning on
   bright mode in the settings panel adds .bright-mode to <html>, which
   switches this whole block off and brings back the white cards.
   ------------------------------------------------------------------------ */
html:not(.bright-mode) .card-container-home .card {
  background: rgba(12, 10, 18, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  border-radius: 5px;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.85);
}

html:not(.bright-mode) .card-container-home .card .card-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #E0F2F1;
  font-family: monospace;
  font-size: 20px;
}

html:not(.bright-mode) .card-container-home .card b,
html:not(.bright-mode) .card-container-home .card strong {
  color: #fff;
}

html:not(.bright-mode) .card-container-home .card a:not(.btn) {
  color: #9CC4FF;
}

/* Code blocks get a light background inline in paragraphsToHTML */
html:not(.bright-mode) .card-container-home .card pre {
  background-color: rgba(0, 0, 0, 0.4) !important;
  color: #E0F2F1;
}

/* Research detail title and tag chips, which were styled for white cards */
html:not(.bright-mode) .card-container-home .entry-detail-card .entry-detail-title {
  color: #E0F2F1;
}

html:not(.bright-mode) .card-container-home .card .interest-chip {
  background: color-mix(in srgb, var(--chip-color) 22%, transparent);
  color: #F3F1F8;
}

/* Bright mode: the collapsed list tiles (research, software, journal) turn
   white too, matching the open cards */
html.bright-mode .entry-list-item {
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

html.bright-mode .entry-list-item:hover {
  background: #f4f4f6;
}

html.bright-mode .entry-list-item h3 {
  color: #1a1a1a;
}

html.bright-mode .entry-list-item .entry-meta {
  color: #5f5f66;
}

html.bright-mode .entry-list-item .interest-chip {
  background: color-mix(in srgb, var(--chip-color) 20%, white);
  color: #2b2b2b;
}

/* A thin outline so white figures don't blend into the white tile */
html.bright-mode .entry-thumbnail {
  outline: 1px solid #e3e3e6;
}

/* Content that's pointless once bright mode is on, like the note explaining
   how to turn it on. The blank spacer line after it goes too, so it doesn't
   leave a double gap. */
html.bright-mode .hide-in-bright,
html.bright-mode .hide-in-bright + .card-text:empty {
  display: none;
}
