[data-theme='dark'] {
  --global-bg: #0e1830;
  --font-color: #dce6f5;
  --card-bg: #182742;
  --sidebar-bg: #182742;
  --sidebar-menu-bg: #1d3156;
  --search-bg: #182742;
  --search-input-color: #dce6f5;
  --search-a-color: #dce6f5;
  --preloader-bg: #0e1830;
  --preloader-color: #dce6f5;
  --btn-bg: #1d3156;
  --btn-color: #dce6f5;
  --btn-hover-color: #6382aa;
  --text-bg-hover: #1d3156;
  --blockquote-bg: #182742;
  --toc-link-color: #a4b5d1;
  --scrollbar-color: #496894;
  --timeline-bg: #1d3156;
  --zoom-bg: #0e1830;
}

/* unlock CTA on locked posts - matches the decrypt button's blue/white look */
.gumroad-unlock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fbfbfb;
  background: linear-gradient(to bottom, #6382aa 0%, #496894 100%);
  border: none;
  border-bottom: 4px solid #35507a;
  border-radius: 8px;
  padding: 10px 18px;
  margin: 0 0 20px;
  text-decoration: none;
}
.gumroad-unlock-btn:hover {
  box-shadow: 0 0 18px rgba(73, 104, 148, 0.45);
}

/* avatar spins on hover only, not constantly */
.avatar-img {
  transition: transform 0.6s ease;
}
.avatar-img:hover {
  transform: rotate(360deg);
}

/* post heading colour spectrum, matching the old BlackICE theme - bolder */
#article-container h1 {
  color: #ff6fa0;
  border-left: 4px solid #ff6fa0;
  padding-left: 14px;
  font-weight: 800;
}
#article-container h2 {
  color: #c792ea;
  border-left: 3px solid #c792ea;
  padding-left: 12px;
  font-weight: 800;
}
#article-container h3 {
  color: #6382aa;
  border-left: 3px solid #6382aa;
  padding-left: 12px;
  font-weight: 800;
}
#article-container h4 {
  color: #5fd9c4;
  border-left: 3px solid #5fd9c4;
  padding-left: 12px;
  font-weight: 800;
}
#article-container h5 {
  color: #fed6ce;
  border-left: 3px solid #fed6ce;
  padding-left: 12px;
  font-weight: 800;
}

/* home/page hero title and nav name - white, bolder */
#site-title {
  color: var(--white) !important;
  font-weight: 900;
}
.nav-site-title .site-name {
  color: var(--font-color);
  font-weight: 800;
}

/* listing/card post titles: white by default, pink on hover */
.article-title,
.recent-post-item .title,
#recent-posts .article-title {
  color: var(--font-color);
}
.article-title:hover,
.recent-post-item .title:hover,
#recent-posts .article-title:hover {
  color: #ff6fa0;
}

/* post-page tag pills, cycling through the palette */
.post-meta__tags:nth-of-type(6n+1) { border-color: #496894; color: #496894; }
.post-meta__tags:nth-of-type(6n+1):hover { background: #496894; }
.post-meta__tags:nth-of-type(6n+2) { border-color: #6382aa; color: #6382aa; }
.post-meta__tags:nth-of-type(6n+2):hover { background: #6382aa; }
.post-meta__tags:nth-of-type(6n+3) { border-color: #c792ea; color: #c792ea; }
.post-meta__tags:nth-of-type(6n+3):hover { background: #c792ea; }
.post-meta__tags:nth-of-type(6n+4) { border-color: #5fd9c4; color: #5fd9c4; }
.post-meta__tags:nth-of-type(6n+4):hover { background: #5fd9c4; }
.post-meta__tags:nth-of-type(6n+5) { border-color: #fed6ce; color: #fed6ce; }
.post-meta__tags:nth-of-type(6n+5):hover { background: #fed6ce; }
.post-meta__tags:nth-of-type(6n+6) { border-color: #ff6fa0; color: #ff6fa0; }
.post-meta__tags:nth-of-type(6n+6):hover { background: #ff6fa0; }

/* announcement card */
#aside-content .card-announcement .item-headline i {
  color: #fed6ce;
}
.card-announcement .announcement_content {
  color: var(--font-color);
  font-size: 0.88em;
  line-height: 1.7;
}

/* footer text, bolder */
.footer-copyright,
.footer_custom_text {
  font-weight: 700;
}

/* archive "time chain" - blue dot hover, matching the PayPal icon colour */
.article-sort-item:before {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.article-sort-item:hover:before {
  border-color: #89b4fa !important;
  box-shadow: 0 0 8px rgba(137, 180, 250, 0.6);
}

.article-sort-item.year {
  color: #89b4fa;
  font-weight: 700;
}
.article-sort-item.year:before {
  border-color: #89b4fa !important;
}

.article-sort-item-title {
  transition: color 0.3s ease, transform 0.3s ease;
}
.article-sort-item-title:hover {
  color: #ff6fa0 !important;
}

/* ------------------------------------------------------------------
   Typography: body copy in a readable sans (Inter, set in
   _config.butterfly.yml); headings, titles and code keep the mono look
   ------------------------------------------------------------------ */
#article-container h1,
#article-container h2,
#article-container h3,
#article-container h4,
#article-container h5,
#article-container h6,
#site-title,
#site-subtitle,
.nav-site-title .site-name,
.site-name,
.article-title,
#recent-posts .article-title,
#page-header .site-name {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* Slightly airier body text now that it's no longer monospace */
#article-container {
  line-height: 1.8;
}

/* ------------------------------------------------------------------
   Inline code (single backtick / single tilde) -> purple, not peach
   ------------------------------------------------------------------ */
#article-container :not(figure):not(pre) > code {
  color: #c792ea;
  background: rgba(199, 146, 234, 0.14);
  border-radius: 4px;
  padding: 0.15em 0.4em;
}

/* ------------------------------------------------------------------
   Code-block language label: always lowercase, and hidden entirely
   when the fence has no language (```  or ```text)
   ------------------------------------------------------------------ */
#article-container .highlight-tools .code-lang,
#article-container figure.highlight figcaption,
#article-container figcaption .code-lang {
  text-transform: lowercase !important;
  letter-spacing: 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

#article-container figure.highlight.plaintext .code-lang,
#article-container figure.highlight.plain .code-lang,
#article-container figure.highlight.text .code-lang,
#article-container figure.highlight.plaintext figcaption,
#article-container figure.highlight.plain figcaption,
#article-container figure.highlight.text figcaption {
  display: none !important;
}

/* JS fallback for hidden labels (see /js/custom.js) */
#article-container .highlight-tools .code-lang.is-empty-lang {
  display: none !important;
}

/* ------------------------------------------------------------------
   Home feed: HTB writeup covers are square circular badge PNGs
   (300x300 / 800x800) in /images/covers/. Butterfly's cover slot is
   landscape and uses object-fit: cover, so the badge gets scaled up
   and cropped top/bottom - the green ring spills past the box.
   Contain the whole badge inside the box instead, centred, with the
   card blue filling the leftover space so it blends into the card.

   Scoped to .png so it only touches the HTB badges - TryHackMe and
   other photographic covers are .jpg/.jpeg and keep the normal
   fill-the-frame crop. Keep new HTB badge covers as .png.
   ------------------------------------------------------------------ */
#recent-posts .recent-post-item .post_cover img[src*="/images/covers/"][src$=".png"] {
  object-fit: contain;
  object-position: center;
  padding: 10px;
  background: var(--card-bg);
}
