/* === Dark Mode Base === */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

/* Headings */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #ffffff;
}

/* Links */
body.dark-mode a {
  color: #90caf9;
}

body.dark-mode a:hover {
  color: #bbdefb;
}

/* Header Navigation */
body.dark-mode .gh-head,
body.dark-mode .gh-head-menu,
body.dark-mode .gh-head-inner {
  background-color: #121212;
  color: #e0e0e0;
}

/* Post Cards */
body.dark-mode .post-card,
body.dark-mode .post-card-content,
body.dark-mode .post-card-title,
body.dark-mode .post-card-excerpt {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

/* Images */
body.dark-mode img {
  filter: brightness(0.95) contrast(1.05);
}

/* Article Excerpt */
body.dark-mode .gh-article-excerpt {
  color: #cccccc !important;
}

/* Author Name */
body.dark-mode .gh-author-name-list a {
  color: #cccccc;
}

/* Content Area */
body.dark-mode .gh-content {
  color: #e0e0e0;
}

/* Footer */
body.dark-mode footer,
body.dark-mode .site-footer {
  background-color: #121212;
  color: #aaa;
}

/* Code Blocks */
body.dark-mode pre,
body.dark-mode code {
  background-color: #1e1e1e;
  color: #f1f1f1;
}

/* Inputs & Forms (if used) */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background-color: #1e1e1e;
  color: #e0e0e0;
  border-color: #333;
}

/* Membership Buttons */
body.dark-mode .gh-btn {
  background-color: #333;
  color: #fff;
  border-color: #444;
}

body.dark-mode .gh-btn:hover {
  background-color: #444;
}

/* Post Meta Info */
body.dark-mode .post-card-meta,
body.dark-mode .author-list,
body.dark-mode time {
  color: #bbb;
}

/* Sticky Header */
body.dark-mode .gh-head {
  background-color: rgba(18, 18, 18, 0.95);
}

/* === Logo Swap using opacity/position — STABLE FIX === */
#logo-light,
#logo-dark {
  max-height: 32px;
  height: auto;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  transition: opacity 0.3s ease;
}

#logo-dark {
  opacity: 0;
  position: absolute;
}

body.dark-mode #logo-light {
  opacity: 0;
  position: absolute;
}

body.dark-mode #logo-dark {
  opacity: 1;
  position: relative;
}

/* === Icon Swap (moon/sun toggle) === */
#moonIcon,
#sunIcon {
  width: 20px;
  height: 20px;
  transition: opacity 0.3s ease;
  display: inline-block;
}

#moonIcon {
  display: inline-block;
}
#sunIcon {
  display: none;
}

body.dark-mode #moonIcon {
  display: none;
}
body.dark-mode #sunIcon {
  display: inline-block;
}

body.dark-mode .gh-about-primary::after {
  color: #fff;
}


body.dark-mode img[src*="data-src-image-fb40f614-6c4c-49b2-97dc-6458c5ffcc5b.png"] {
  filter: invert(1) brightness(1.1);
}

body.dark-mode img[src*="data-src-image-fb40f614-6c4c-49b2-97dc-6458c5ffcc5b.png"] + figcaption {
  color: #cccccc;
}

body.dark-mode .kg-blockquote-alt {
  color: #fff;
}

/* Fix email input in dark mode */
body.dark-mode .gh-subscribe-input {
  background-color: #1e1e1e;
  color: #e0e0e0;
  border: 1px solid #444;
}