/* ========================================
   Blog Post Header
  ======================================== */

.post header {
  padding: 2px 0 20px;
  margin-bottom: 1.5rem;
  border-bottom: none;
  position: relative;
}

.post header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 80%);
  border-radius: 2px;
}

.post header h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

h2.description {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 0;
  margin-bottom: 2.5rem;
  text-align: justify;
}

h2.description::before {
  content: none;
}

/* ========================================
   Related Posts Section
  ======================================== */

.related-posts {
  /* margin: 2rem 0; */
  padding: 1.5rem;
  background: var(--bg-soft);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.related-posts h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.related-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-posts li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  list-style: none;
  margin-left: 2px;
}

.related-posts li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.related-posts a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: opacity 0.2s ease;
}

.related-posts a:hover {
  opacity: 0.8;
}

.related-posts p {
  margin: 0.5rem 0 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Share bar CSS */

.share-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .share-bar {
    justify-content: flex-end;
    gap: 12px;
  }
}

/* ============================================================
   SHARE ICON BASE
  ============================================================ */

.share-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s ease;
  color: #fff;
}

.share-icon svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   CONTAINER
  ============================================================ */

.bottom-share-container {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  padding-right: 12px;
  padding-top: 6px;
}

/* ============================================================
   PLATFORM COLORS (Keep Brand Colors)
  ============================================================ */

/* Native Share */
.mobile-only {
  background: var(--muted);
}

/* LinkedIn */
.share-bar a[aria-label="Share on LinkedIn"] {
  background: #0a66c2;
}

/* Facebook */
.share-bar a[aria-label="Share on Facebook"] {
  background: #1877f2;
}

/* X */
.share-bar a[aria-label="Share on X"] {
  background: #000000;
}

/* Copy Link */
#copyLink {
  background: var(--muted);
}

/* Email */
.share-icon.email {
  background: var(--muted);
}

/* ============================================================
   STATES
  ============================================================ */

.share-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.share-icon:active {
  transform: scale(0.95);
}

/* Copied state */
.share-icon.copied {
  background: #16a34a !important; /* success green */
}

/* Optional: slightly darker hover for neutral buttons */
#copyLink:hover,
.share-icon.email:hover,
.mobile-only:hover {
  filter: brightness(0.9);
}

.desktop-hidden {
  display: none;
}

.meta {
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.author-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1;
  vertical-align: middle;
}

.author-link:hover {
  color: var(--primary);
  text-decoration: none;
}

.author-link span {
  margin-top: 3px;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .post header h1 {
    font-size: 2rem;
  }

  h2.description {
    font-size: 1.1rem;
    text-align: justify;
  }
}


ul.task-list {
  list-style: none; 
} 
ul.task-list input {
    margin-left: -8px;
    margin-right: 8px;
}

/* ============================================================
   POST FOOTER
  ============================================================ */


.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
}

.post-navigation a:first-child {
  margin-right: 12px;
}

.post-tags {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding: 20px 0 10px;
}


.post-tags .tag {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.6rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--tag-border);
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
}

.post-tags .tag:hover {
  opacity: 0.85;
}

.border {
  border-top: 1px solid var(--border);
}

/* Copy code btn css */

.code-block-wrapper {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;

  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);

  border-radius: 8px;
  cursor: pointer;

  opacity: 0;
  transition: all 0.2s ease;
}

.code-block-wrapper:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: rgba(255,255,255,1);
  transform: translateY(-1px);
}

.copy-btn svg {
  color: #555;
}

.copy-btn.copied {
  border-color: #22c55e;
}

.copy-btn.copied svg {
  color: #22c55e;
}

@media (prefers-color-scheme: dark) {
  .copy-btn {
    background: rgba(30,30,30,0.9);
    border: 1px solid rgba(255,255,255,0.08);
  }

  .copy-btn svg {
    color: #ccc;
  }
}


/* Blockquote override for blog posts */
.post-content blockquote {
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-card) 100%);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  color: var(--text-primary);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  position: relative;
}

.post-content blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.25rem;
  left: 0.75rem;
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

.post-content blockquote p {
  margin: 0;
}

.post-content blockquote p + p {
  margin-top: 0.75rem;
}


/* Series Banner */
.series-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
}

.series-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.series-badge {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.series-name {
  font-weight: 600;
  text-decoration: none;
}

.series-name:hover {
  text-decoration-color: var(--domain-accent, var(--primary));
  opacity: 0.8;
}

.series-position {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.7rem;
}

.series-nav {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.series-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.series-nav a:hover {
  opacity: 0.7;
}



/* Code block language label */
div[class*="language-"] {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  border-left: 3px solid var(--primary);
}

div[class*="language-"]::before {
  display: block;
  padding: 0.4rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

div.language-python::before { content: "Python"; }
div.language-javascript::before { content: "JavaScript"; }
div.language-typescript::before { content: "TypeScript"; }
div.language-yaml::before { content: "YAML"; }
div.language-yml::before { content: "YAML"; }
div.language-bash::before { content: "Bash"; }
div.language-sh::before { content: "Shell"; }
div.language-shell::before { content: "Shell"; }
div.language-sql::before { content: "SQL"; }
div.language-json::before { content: "JSON"; }
div.language-csharp::before { content: "C#"; }
div.language-css::before { content: "CSS"; }
div.language-html::before { content: "HTML"; }
div.language-ruby::before { content: "Ruby"; }
div.language-go::before { content: "Go"; }
div.language-rust::before { content: "Rust"; }
div.language-java::before { content: "Java"; }
div.language-text::before { content: "Text"; }
div.language-xml::before { content: "XML"; }
div.language-dockerfile::before { content: "Dockerfile"; }
div.language-docker::before { content: "Docker"; }
div.language-terraform::before { content: "Terraform"; }
div.language-hcl::before { content: "HCL"; }
div.language-toml::before { content: "TOML"; }
div.language-ini::before { content: "INI"; }
div.language-nginx::before { content: "Nginx"; }
div.language-graphql::before { content: "GraphQL"; }
div.language-proto::before { content: "Protobuf"; }
div.language-protobuf::before { content: "Protobuf"; }
div.language-kotlin::before { content: "Kotlin"; }
div.language-swift::before { content: "Swift"; }
div.language-c::before { content: "C"; }
div.language-cpp::before { content: "C++"; }
div.language-php::before { content: "PHP"; }
div.language-powershell::before { content: "PowerShell"; }
div.language-makefile::before { content: "Makefile"; }
div.language-markdown::before { content: "Markdown"; }
div.language-diff::before { content: "Diff"; }
div.language-plaintext::before { content: "Plain Text"; }


div[class*="language-"] pre {
  margin: 0;
  border: none;
}

/* ============================================================
   COLLAPSIBLE CODE BLOCKS
  ============================================================ */

.code-block-wrapper.collapsible {
  position: relative;
}

.code-block-wrapper.collapsible pre {
  max-height: 480px;
  overflow-x: auto;
  overflow-y: hidden;
  transition: max-height 0.3s ease;
}

.code-block-wrapper.collapsible::after {
  content: "";
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--code-bg, #1e1e1e));
  pointer-events: none;
  border-radius: 0 0 6px 6px;
}

.code-block-wrapper.collapsible.expanded pre {
  max-height: none;
}

.code-block-wrapper.collapsible.expanded::after {
  display: none;
}

.code-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  padding: 0.4rem;
  border: none;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.code-expand-btn:hover {
  color: var(--primary);
}
