/* Theme toggle button */

#theme-toggle-wrap {
  padding: 1em 1em 0.5em 1em;
  text-align: center;
}

#theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  font-size: 0.85em;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#theme-toggle:hover,
#theme-toggle:focus {
  background: #333;
  border-color: rgba(255, 255, 255, 0.5);
}

/* Light theme (default) */

html.light-theme body {
  color: #777;
  background-color: #fff;
}

html.light-theme .header {
  color: #333;
  border-bottom: 1px solid #eee;
  background-color: #fff;
}

html.light-theme .header h2 {
  color: #777;
}

html.light-theme a         { color: #1f8dd6; } /* #1f8dd6 or #3b8bba */
html.light-theme a:visited { color: #265778; }

html.light-theme .prev-next-post {
  border-top-color: #eee;
  border-bottom-color: #eee;
}

/* Dark theme */

html.dark-theme body {
  color: #d4d4d4;
  background-color: #1a1a1a;
}

html.dark-theme .header {
  color: #d4d4d4;
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
}

html.dark-theme .header h2 {
  color: #888;
}

html.dark-theme h1,
html.dark-theme h2,
html.dark-theme h3,
html.dark-theme h4,
html.dark-theme h5,
html.dark-theme h6 {
  color: #e8e8e8;
}

html.dark-theme a         { color: #7eb8f7; }
html.dark-theme a:hover,
html.dark-theme a:focus   { color: #a8d0ff; }
html.dark-theme a:visited { color: #5a9fd4; }

html.dark-theme code,
html.dark-theme pre {
  background-color: #2a2a2a;
  color: #d4d4d4;
}

html.dark-theme .hljs-keyword, 
html.dark-theme .hljs-built_in,
html.dark-theme .hljs-type,
html.dark-theme .hljs-literal,
html.dark-theme .hljs-number,
html.dark-theme .hljs-operator { /* Fix for bold code visibility */
color: #7eb8f7;           
  font-weight: 700;
}

html.dark-theme blockquote {
  border-left-color: #7eb8f7;
  color: #aaa;
}

html.dark-theme .prev-next-post {
  border-top-color: #333;
  border-bottom-color: #333;
}

html.dark-theme .pagination a {
  color: #7eb8f7;
}

/* Sidebar - dark in BOTH themes */

html.light-theme #menu { background: #191818; }
html.light-theme #menu a { color: #999; }
html.light-theme #menu .pure-menu-heading { color: #fff; }
html.light-theme #menu .pure-menu-selected { background: #1f8dd6; }
html.light-theme #menu .pure-menu-selected a { color: #fff; }
html.light-theme #menu .pure-menu li a:hover,
html.light-theme #menu .pure-menu li a:focus { background: #333; }

/* Transition - content only, not sidebar */

body, .header, .content, a, h1, h2, h3, h4, h5, h6, code, pre, blockquote {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}