/* ═══════════════════════════════════════════════════════════
   CODEVERSE BLOG — 100% NEOBRUTALISM JOURNAL SYSTEM
   Clean Code. Built for Scale. Zero Emojis.
   ═══════════════════════════════════════════════════════════ */

/* ─── BASE RESET & CONTAINER ─── */
html, body {
  overflow-x: clip;
  max-width: 100vw;
}

.blog-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ─── TOP READING PROGRESS BAR ─── */
.reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: transparent;
  z-index: 10000;
  pointer-events: none;
}

.reading-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--neo-yellow);
  border-bottom: 1.5px solid #000;
  box-shadow: 0 2px 8px rgba(255, 230, 0, 0.5);
  transition: width 0.08s ease-out;
}

[data-theme="dark"] .reading-progress-fill {
  background: var(--neo-yellow);
  box-shadow: 0 0 12px rgba(255, 230, 0, 0.8);
}

/* ─── HEADER & NAVIGATION ─── */
.hdr {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  padding: 14px 0;
  background: var(--header-bg);
  border-bottom: var(--b-width) solid #000000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: padding 0.2s ease;
}

[data-theme="dark"] .hdr {
  border-bottom-color: #000000;
}

.hdr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hdr-acts {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Header Buttons */
.ibtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: var(--b-width) solid #000000;
  border-radius: var(--r-btn);
  background: #FFFFFF;
  color: #000000;
  box-shadow: 3px 3px 0px #000000;
  cursor: pointer;
  font-family: 'JetBrains Mono', sans-serif;
  font-weight: 900;
  font-size: 0.88rem;
  flex-shrink: 0;
  white-space: nowrap;
  gap: 6px;
  transition: transform 0.12s var(--ease-tactile), box-shadow 0.12s var(--ease-tactile), background-color 0.15s ease;
}

.ibtn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #000000;
  background: var(--neo-yellow);
  color: #000000;
}

.ibtn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000000;
}

[data-theme="dark"] .ibtn {
  background: #1A1E2B;
  color: #FFFFFF;
}

[data-theme="dark"] .ibtn:hover {
  background: var(--neo-yellow);
  color: #000000;
}

.blog-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  color: #000000;
  font-family: 'JetBrains Mono', 'Vazirmatn', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 8px 14px;
  height: 42px;
  box-sizing: border-box;
  border-radius: var(--r-btn);
  border: var(--b-width) solid #000000;
  box-shadow: 3px 3px 0px #000000;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.blog-back-btn:hover {
  background: var(--neo-yellow);
  color: #000000;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #000000;
}

.blog-back-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000000;
}

[data-theme="dark"] .blog-back-btn {
  background: #1A1E2B;
  color: #FFFFFF;
}

[data-theme="dark"] .blog-back-btn:hover {
  background: var(--neo-yellow);
  color: #000000;
}

/* ─── BLOG HERO ─── */
.blog-hero {
  padding: 110px 0 30px;
  position: relative;
}

.blog-hero-box {
  background: var(--bg-card);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 6px 6px 0px var(--border);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.blog-hero-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--neo-yellow), var(--neo-cyan), var(--neo-pink), var(--neo-lime));
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0px var(--border);
  background: var(--neo-cyan);
  color: #000;
  margin-bottom: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-hero-title {
  font-size: clamp(1.75rem, 3.8vw, 2.6rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--fg);
}

.blog-hero-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--fg-muted);
  max-width: 800px;
  margin-bottom: 24px;
}

/* ─── BLOG TELEMETRY STATS ─── */
.blog-telemetry-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.telemetry-box {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--r-btn);
  padding: 8px 16px;
  box-shadow: 3px 3px 0px var(--border);
}

[data-theme="dark"] .telemetry-box {
  background: #12151D;
}

.telemetry-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--neo-pink);
}

[data-theme="dark"] .telemetry-num {
  color: var(--neo-yellow);
}

.telemetry-label {
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.telemetry-rss-btn {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--neo-orange);
  color: #000000;
  padding: 8px 14px;
  border: 2px solid #000000;
  border-radius: var(--r-btn);
  box-shadow: 3px 3px 0px #000000;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.telemetry-rss-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #000000;
}

/* ─── BLOG CONTROLS (SEARCH & TAG FILTER) ─── */
.blog-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-search-bar {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--input-bg);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-btn);
  box-shadow: 4px 4px 0px var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-search-bar:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--border);
}

.blog-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--fg-muted);
}

.blog-search-input {
  width: 100%;
  padding: 13px 12px 13px 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--fg);
  outline: none;
}

[dir="ltr"] .blog-search-input {
  padding: 13px 0 13px 12px;
}

.blog-search-input::placeholder {
  color: var(--fg-muted);
  opacity: 0.7;
}

.blog-search-clear {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 16px;
  color: var(--fg-muted);
  display: none;
}

.blog-search-clear.visible {
  display: flex;
  align-items: center;
}

.blog-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0px var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.filter-pill:hover {
  background: var(--bg-card-alt);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px var(--border);
}

.filter-pill.active {
  background: var(--neo-yellow);
  color: #000;
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--border);
}

/* ─── DIFFICULTY BADGES ─── */
.diff-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1.5px solid #000000;
  box-shadow: 2px 2px 0px #000000;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.diff-badge.intermediate { background: var(--neo-yellow); }
.diff-badge.advanced { background: var(--neo-pink); }
.diff-badge.hardcore { background: var(--neo-lime); }

/* ─── BLOG RESULTS & LIVE STATUS STRIP ─── */
.blog-results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 18px 0 24px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-btn);
  box-shadow: 3px 3px 0px var(--border);
  font-family: 'JetBrains Mono', 'Vazirmatn', monospace, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fg-muted);
}

[data-theme="dark"] .blog-results-meta {
  background: #12151D;
}

.blog-status-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-weight: 800;
}

.blog-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neo-lime);
  border: 1px solid #000;
  box-shadow: 0 0 6px var(--neo-lime);
  display: inline-block;
  animation: cv-dot-pulse 2s infinite ease-in-out;
}

@keyframes cv-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.blog-results-meta strong {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 900;
  background: var(--neo-yellow);
  color: #000000;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1.5px solid #000000;
  box-shadow: 1.5px 1.5px 0px #000000;
  margin: 0 4px;
  display: inline-block;
}

.blog-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-muted);
  font-weight: 800;
  font-size: 0.8rem;
}

.blog-status-badge svg {
  color: var(--neo-yellow);
}

@media (max-width: 640px) {
  .blog-results-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
  }
}

/* ─── FEATURED HERO SPOTLIGHT CARD ─── */
.blog-featured-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg-card);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 7px 7px 0px var(--border);
  margin-bottom: 36px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-spring);
  text-decoration: none !important;
  color: inherit;
}

[data-theme="dark"] .blog-featured-card {
  background: #12151D;
}

.blog-featured-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0px var(--border);
}

@media (max-width: 900px) {
  .blog-featured-card {
    grid-template-columns: 1fr;
  }
}

.featured-thumb {
  min-height: 240px;
  border-right: var(--b-width) solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}

[dir="rtl"] .featured-thumb {
  border-right: none;
  border-left: var(--b-width) solid var(--border);
}

@media (max-width: 900px) {
  .featured-thumb {
    border-right: none !important;
    border-left: none !important;
    border-bottom: var(--b-width) solid var(--border);
  }
}

.featured-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.blog-featured-card:hover .featured-thumb svg {
  transform: scale(1.02);
}

.featured-content {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.featured-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.spotlight-sticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--neo-pink);
  color: #000000;
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1.5px solid #000000;
  box-shadow: 2px 2px 0px #000000;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.featured-content h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--fg) !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: color 0.15s ease;
}

.blog-featured-card:hover h2,
.blog-featured-card:hover .featured-content h2 {
  color: var(--neo-pink) !important;
  text-decoration: none !important;
}

[data-theme="dark"] .blog-featured-card:hover h2,
[data-theme="dark"] .blog-featured-card:hover .featured-content h2 {
  color: var(--neo-yellow) !important;
  text-decoration: none !important;
}

.featured-content p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--fg-muted);
  margin-bottom: 22px;
  flex-grow: 1;
}

/* ─── BLOG CARDS GRID (SQUARE / VERTICAL BOXES) ─── */
.blog-grid,
.blog-grid-full,
#blogGrid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 26px !important;
  width: 100% !important;
  margin-top: 0 !important;
}

@media (max-width: 960px) {
  .blog-grid,
  .blog-grid-full,
  #blogGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}

@media (max-width: 640px) {
  .blog-grid,
  .blog-grid-full,
  #blogGrid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

/* Card Styling with Compact Square-ish Proportion ("مربعی تور") */
.blog-card-article {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-card);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 5px 5px 0px var(--border);
  overflow: hidden;
  color: inherit;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.18s var(--ease-spring);
  position: relative;
  cursor: pointer;
  box-sizing: border-box;
}

.blog-card-article.hidden,
.blog-featured-card.hidden {
  display: none !important;
}

.blog-card-article:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0px var(--border);
}

.blog-card-article .blog-thumb-link {
  display: block;
  text-decoration: none;
  overflow: hidden;
  border-bottom: var(--b-width) solid var(--border);
}

.blog-card-article .blog-thumb {
  height: 165px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF;
}

.blog-card-article .blog-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.blog-card-article:hover .blog-thumb svg {
  transform: scale(1.03);
}

.blog-card-article .blog-body {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.blog-card-article h2 {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.42;
  margin-bottom: 8px;
  color: var(--fg) !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: color 0.15s ease;
}

.blog-card-article:hover h2 {
  color: var(--neo-pink) !important;
  text-decoration: none !important;
}

[data-theme="dark"] .blog-card-article:hover h2 {
  color: var(--neo-yellow) !important;
  text-decoration: none !important;
}

.blog-card-article p {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--fg-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.blog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 2px dashed rgba(0, 0, 0, 0.15);
  margin-top: auto;
}

[data-theme="dark"] .blog-footer {
  border-top-color: rgba(255, 255, 255, 0.18);
}

.blog-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', sans-serif;
}

.blog-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #000;
  background: var(--neo-yellow);
  border: 2px solid #000;
  padding: 5px 12px;
  border-radius: 6px;
  box-shadow: 2px 2px 0px #000;
  text-decoration: none;
  transition: all 0.15s ease;
}

.blog-card-article:hover .blog-read-btn {
  background: var(--neo-cyan);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #000;
}

/* ─── NEOBRUTALISM PAGINATION (9 ITEMS PER PAGE) ─── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 42px 0 20px;
  flex-wrap: wrap;
}

.pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-card);
  color: var(--fg);
  font-family: 'JetBrains Mono', 'Vazirmatn', monospace, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-btn);
  box-shadow: 3px 3px 0px var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s var(--ease-tactile), box-shadow 0.12s var(--ease-tactile), background 0.15s ease;
  user-select: none;
}

.pag-btn:hover {
  background: var(--neo-yellow);
  color: #000;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--border);
}

.pag-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--border);
}

.pag-btn.active {
  background: var(--neo-yellow);
  color: #000;
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0px var(--border);
  pointer-events: none;
}

[data-theme="dark"] .pag-btn {
  background: #141722;
  color: #FFFFFF;
}

[data-theme="dark"] .pag-btn:hover,
[data-theme="dark"] .pag-btn.active {
  background: var(--neo-yellow);
  color: #000000;
}

.pag-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

/* Empty search & filter state */
.blog-empty-state {
  display: none;
  text-align: center;
  padding: 56px 32px;
  margin: 44px auto;
  max-width: 620px;
  width: 100%;
  background: var(--bg-card);
  border: 3px dashed var(--border);
  border-radius: var(--r-card, 12px);
  box-shadow: 6px 6px 0px var(--border);
  box-sizing: border-box;
}

.blog-empty-state.visible {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.blog-empty-state .blog-empty-icon {
  width: 48px;
  height: 48px;
  color: var(--neo-pink, #FF539B);
  margin: 0 0 18px 0;
  filter: drop-shadow(2px 2px 0px #000);
}

.blog-empty-state h3 {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 0 10px 0;
  color: var(--text-main, #FFFFFF);
}

.blog-empty-state p {
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 22px 0;
  color: var(--text-muted, #9CA3AF);
  max-width: 480px;
}

.blog-empty-state .filter-pill,
.blog-empty-state #resetFilterBtn {
  margin-top: 6px;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  background: var(--neo-yellow, #FFE600);
  color: #000000;
  border: 2.5px solid #000000;
  border-radius: 8px;
  box-shadow: 4px 4px 0px #000000;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-empty-state .filter-pill:hover,
.blog-empty-state #resetFilterBtn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000000;
}

/* Button icon inside resetFilterBtn: strict black color, no margins, no drop-shadow */
.blog-empty-state #resetFilterBtn svg,
.blog-empty-state .filter-pill svg {
  width: 15px;
  height: 15px;
  color: #000000;
  stroke: #000000;
  margin: 0 !important;
  filter: none !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ─── NEWSLETTER BOX ─── */
.blog-dispatch-box {
  background: var(--neo-yellow);
  color: #000;
  border: var(--b-width) solid #000;
  border-radius: var(--r-card);
  box-shadow: 6px 6px 0px #000;
  padding: 36px;
  margin: 36px 0 50px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
  box-sizing: border-box;
}

@media (max-width: 800px) {
  .blog-dispatch-box {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

.dispatch-info h3 {
  font-size: 1.45rem;
  font-weight: 900;
  margin-bottom: 8px;
  color: #000;
}

.dispatch-info p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1a1a1a;
  font-weight: 600;
}

.dispatch-form {
  display: flex;
  gap: 10px;
}

@media (max-width: 500px) {
  .dispatch-form {
    flex-direction: column;
  }
}

.dispatch-input {
  flex-grow: 1;
  padding: 11px 14px;
  border: var(--b-width) solid #000;
  border-radius: var(--r-btn);
  background: #FFF;
  color: #000;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 3px 3px 0px #000;
  outline: none;
}

.dispatch-btn {
  padding: 11px 22px;
  background: #000;
  color: #FFF;
  border: var(--b-width) solid #000;
  border-radius: var(--r-btn);
  font-family: 'JetBrains Mono', 'Vazirmatn', sans-serif;
  font-weight: 900;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 3px 3px 0px #FFF;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.dispatch-btn:hover {
  background: var(--neo-pink);
  color: #000;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #000;
}

/* ═══════════════════════════════════════════════════════════
   ARTICLE DETAIL PAGE STYLING (FIXED SIZING & OVERFLOW)
   ═══════════════════════════════════════════════════════════ */
.article-page {
  padding: 100px 0 70px;
  box-sizing: border-box;
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', 'Vazirmatn', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--fg-muted);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.article-breadcrumb a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.article-breadcrumb span.sep {
  opacity: 0.5;
}

.article-breadcrumb span.current {
  color: var(--fg);
  font-weight: 800;
}

/* Article Hero Header Card */
.article-header {
  background: var(--bg-card);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 6px 6px 0px var(--border);
  padding: 34px 32px 28px;
  margin-bottom: 32px;
  position: relative;
  box-sizing: border-box;
  max-width: 100%;
}

.article-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.article-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 900;
  line-height: 1.28;
  margin-bottom: 16px;
  color: var(--fg);
  word-break: break-word;
}

.article-subtitle {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--fg-muted);
  margin-bottom: 24px;
  border-left: 4px solid var(--neo-yellow);
  padding-left: 16px;
}

[dir="rtl"] .article-subtitle {
  border-left: none;
  border-right: 4px solid var(--neo-yellow);
  padding-left: 0;
  padding-right: 16px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 2px dashed rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .article-meta-bar {
  border-top-color: rgba(255, 255, 255, 0.18);
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-shadow: 2px 2px 0px var(--border);
  background: var(--neo-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.95rem;
  color: #000;
  flex-shrink: 0;
}

.author-details .name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--fg);
}

.author-details .role {
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', sans-serif;
}

.article-share-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-card-alt);
  color: var(--fg);
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  box-shadow: 2px 2px 0px var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.share-btn:hover {
  background: var(--neo-yellow);
  color: #000;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border);
}

/* ─── ARTICLE LAYOUT (PREVENTS GRID OVERFLOW) ─── */
.article-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

.article-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 85px;
  align-self: start;
  max-height: calc(100vh - 105px);
  overflow-y: auto;
  min-width: 0;
  z-index: 20;
}

.article-main {
  min-width: 0;
  max-width: 100%;
}

/* ─── TABLE OF CONTENTS CARD (ROOMY & CLEAR) ─── */
.toc-card {
  background: var(--bg-card);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 5px 5px 0px var(--border);
  padding: 20px 16px;
  box-sizing: border-box;
}

.toc-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 900;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'JetBrains Mono', sans-serif;
}

/* Real-time Reading Buffer / Progress Gauge */
.toc-buffer-wrap,
.toc-buffer-box {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 2px dashed rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .toc-buffer-wrap,
[data-theme="dark"] .toc-buffer-box {
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.toc-buffer-bar,
.toc-buffer-track {
  width: 100%;
  height: 8px;
  background: var(--bg-card-alt);
  border: 1.5px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.toc-buffer-fill {
  height: 100%;
  width: 0%;
  background: var(--neo-yellow);
  transition: width 0.12s linear;
}

.toc-buffer-labels,
.toc-buffer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--fg-muted);
}

#tocBufferVal,
.toc-buffer-val {
  color: var(--neo-pink);
  font-weight: 900;
}

[data-theme="dark"] #tocBufferVal,
[data-theme="dark"] .toc-buffer-val {
  color: var(--neo-yellow);
}

#tocTimeRemaining,
.toc-time-left {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--fg-muted);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.toc-list a,
.toc-list li a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--fg-muted) !important;
  text-decoration: none !important;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
  word-break: break-word;
}

.toc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0.7;
  flex-shrink: 0;
  margin-top: 1px;
  text-decoration: none !important;
  display: inline-block;
}

.toc-list a:hover,
.toc-list li a:hover {
  background: var(--bg-card-alt);
  color: var(--fg) !important;
  border-color: rgba(0, 0, 0, 0.2);
  text-decoration: none !important;
}

[data-theme="dark"] .toc-list a:hover,
[data-theme="dark"] .toc-list li a:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.toc-list a.active,
.toc-list li a.active {
  background: var(--neo-yellow) !important;
  color: #000000 !important;
  font-weight: 800;
  border-color: #000000 !important;
  box-shadow: 2px 2px 0px #000000;
  text-decoration: none !important;
}

.toc-list a.active .toc-num,
.toc-list li a.active .toc-num {
  opacity: 1;
  color: #000000 !important;
  font-weight: 900;
}

[dir="rtl"] .toc-list a,
[dir="rtl"] .toc-list li a {
  text-align: right;
}

/* ─── DYNAMIC BILINGUAL PROSE & TOC SYSTEM ─── */
[lang="en"] .prose-lang-fa {
  display: none !important;
}
[lang="en"] .prose-lang-en {
  display: block !important;
}
[lang="fa"] .prose-lang-en {
  display: none !important;
}
[lang="fa"] .prose-lang-fa {
  display: block !important;
}

[lang="en"] .toc-list-fa {
  display: none !important;
}
[lang="en"] .toc-list-en {
  display: flex !important;
}
[lang="fa"] .toc-list-en {
  display: none !important;
}
[lang="fa"] .toc-list-fa {
  display: flex !important;
}

/* Code blocks must always preserve LTR orientation regardless of page direction */
.code-block-wrap,
.code-pre,
pre,
code,
.code-header {
  direction: ltr !important;
  text-align: left !important;
}

/* ─── SOLID READING CANVAS & TYPOGRAPHY (ZERO DOT BLEED) ─── */
.article-page {
  position: relative;
  z-index: 2;
  padding: 100px 0 70px;
  box-sizing: border-box;
}

.article-header {
  position: relative;
  z-index: 2;
  background: #FFFFFF;
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 6px 6px 0px var(--border);
  padding: 34px 32px 28px;
  margin-bottom: 32px;
  box-sizing: border-box;
  max-width: 100%;
}

[data-theme="dark"] .article-header {
  background: #12151D !important;
}

.article-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 85px;
  align-self: start;
  max-height: calc(100vh - 105px);
  overflow-y: auto;
  min-width: 0;
  z-index: 20;
}

.toc-card {
  position: relative;
  z-index: 2;
  background: #FFFFFF;
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 5px 5px 0px var(--border);
  padding: 20px 16px;
  box-sizing: border-box;
}

[data-theme="dark"] .toc-card {
  background: #12151D !important;
}

.toc-time-left {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--fg-muted);
  background: var(--bg-card-alt);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.article-prose {
  position: relative;
  z-index: 2;
  background: #FFFFFF !important;
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 6px 6px 0px var(--border);
  padding: 38px 36px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  color: #1E232E;
}

[data-theme="dark"] .article-prose {
  background: #12151D !important;
  color: #E2E8F0 !important;
}

@media (max-width: 640px) {
  .article-prose {
    padding: 24px 18px;
  }
}

/* ─── TL;DR 30-SECOND EXECUTIVE SUMMARY SECTION (DEDICATED ELEVATED BANNER) ─── */
.article-tldr-section {
  width: 100%;
  margin-bottom: 32px;
}

.article-tldr-box {
  background: #FFE600 !important;
  color: #000000 !important;
  border: var(--b-width) solid #000000;
  border-radius: var(--r-card);
  box-shadow: 6px 6px 0px #000000;
  padding: 24px 28px;
  box-sizing: border-box;
}

[data-theme="dark"] .article-tldr-box {
  background: #FFE600 !important;
  color: #000000 !important;
  border: var(--b-width) solid #000000;
  box-shadow: 6px 6px 0px #000000;
}

.tldr-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 1.02rem;
  font-weight: 900;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #000000 !important;
}

.tldr-title svg {
  color: #000000 !important;
  stroke: #000000 !important;
  flex-shrink: 0;
}

.tldr-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tldr-list li {
  position: relative;
  padding-inline-start: 24px;
  font-size: 0.96rem;
  line-height: 1.65;
  font-weight: 700;
  color: #000000 !important;
}

.tldr-list li::before {
  content: "▶";
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  font-size: 0.75rem;
  color: #000000 !important;
}

/* Strict contrast overrides: ensure all child elements remain 100% black in dark mode */
.article-tldr-box *,
[data-theme="dark"] .article-tldr-box,
[data-theme="dark"] .article-tldr-box *,
[data-theme="dark"] .article-tldr-box p,
[data-theme="dark"] .article-tldr-box li,
[data-theme="dark"] .article-tldr-box span,
[data-theme="dark"] .article-tldr-box div {
  color: #000000 !important;
}

.article-prose h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 900;
  line-height: 1.35;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--border);
  color: var(--fg);
  scroll-margin-top: 95px;
  word-break: break-word;
}

.article-prose h2:first-of-type {
  margin-top: 0;
}

.article-prose h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.4;
  margin: 26px 0 12px;
  color: var(--fg);
  scroll-margin-top: 95px;
  word-break: break-word;
}

.article-prose p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: inherit;
  margin-bottom: 22px;
  word-break: break-word;
}

[data-theme="dark"] .article-prose p {
  color: #E2E8F0 !important;
}

.article-prose ul, .article-prose ol {
  margin: 16px 0 24px;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 1rem;
  line-height: 1.8;
}

[dir="rtl"] .article-prose ul,
[dir="rtl"] .article-prose ol {
  padding-left: 0;
  padding-right: 24px;
}

.article-prose li {
  color: inherit;
}

[data-theme="dark"] .article-prose li {
  color: #E2E8F0 !important;
}

.article-prose strong {
  font-weight: 800;
  color: var(--fg);
}

/* Blockquote */
.article-prose blockquote {
  background: var(--bg-card-alt);
  border-left: 5px solid var(--neo-pink);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin: 26px 0;
  font-size: 1.02rem;
  font-weight: 600;
  font-style: italic;
  color: var(--fg);
  box-shadow: 3px 3px 0px var(--border);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  border-right: 2px solid var(--border);
}

[dir="rtl"] .article-prose blockquote {
  border-left: 2px solid var(--border);
  border-right: 5px solid var(--neo-pink);
  border-radius: 8px 0 0 8px;
}

/* ─── CODE BLOCKS (NEVER OVERFLOWS) ─── */
.code-block-wrap {
  margin: 26px 0;
  background: #0D1117;
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 5px 5px 0px var(--border);
  overflow: hidden;
  max-width: 100%;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161B22;
  border-bottom: 2px solid #30363D;
  padding: 8px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #C9D1D9;
  gap: 10px;
}

.code-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-playground-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--neo-cyan);
  color: #000000;
  border: 1.5px solid #000000;
  border-radius: 4px;
  padding: 3px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 1.5px 1.5px 0px #000000;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.code-playground-btn:hover {
  background: var(--neo-yellow);
  transform: translate(-1px, -1px);
  box-shadow: 2.5px 2.5px 0px #000000;
}

/* ─── INTERACTIVE QUOTE & SHARE FLOATING BUBBLE ─── */
.quote-share-bubble {
  position: absolute;
  display: none;
  align-items: center;
  gap: 6px;
  background: #000000;
  border: 2px solid var(--neo-yellow);
  border-radius: var(--r-btn);
  padding: 6px 10px;
  box-shadow: 4px 4px 0px var(--neo-yellow);
  z-index: 10000;
  transform: translate(-50%, -100%);
  margin-top: -12px;
  white-space: nowrap;
}

.quote-share-bubble.visible {
  display: flex;
}

.quote-bubble-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #181B26;
  color: #FFFFFF;
  border: 1.5px solid #33384C;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
  text-decoration: none;
}

.quote-bubble-btn:hover {
  background: var(--neo-yellow);
  color: #000000;
  border-color: #000000;
}

/* ─── DEDICATED SOCIAL SHARE STRIP ─── */
.article-share-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 5px 5px 0px var(--border);
  padding: 18px 24px;
  margin: 36px 0 20px;
}

[data-theme="dark"] .article-share-strip {
  background: #12151D !important;
}

.share-strip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--fg);
  text-transform: uppercase;
}

.share-strip-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  border: 2px solid var(--border);
  border-radius: var(--r-btn);
  box-shadow: 2.5px 2.5px 0px var(--border);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.social-share-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--border);
}

.social-share-btn.twitter { background: #00F0FF; color: #000000; }
.social-share-btn.linkedin { background: var(--neo-yellow); color: #000000; }
.social-share-btn.telegram { background: #00E878; color: #000000; }
.social-share-btn.copy { background: var(--neo-pink); color: #000000; }


.code-lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--neo-yellow);
}

.code-copy-btn {
  background: #21262D;
  border: 1px solid #30363D;
  border-radius: 6px;
  color: #C9D1D9;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.code-copy-btn:hover {
  background: var(--neo-yellow);
  color: #000;
  border-color: #000;
}

.code-pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  line-height: 1.65;
  color: #E6EDF3;
  direction: ltr !important;
  text-align: left !important;
  max-width: 100%;
  box-sizing: border-box;
}

/* Syntax Highlighting */
.token-kw { color: #FF7B72; font-weight: 700; }
.token-fn { color: #D2A8FF; font-weight: 600; }
.token-str { color: #A5D6FF; }
.token-comment { color: #8B949E; font-style: italic; }
.token-num { color: #79C0FF; }
.token-type { color: #FFA657; font-weight: 700; }
.token-attr { color: #7EE787; }

/* ─── CALLOUT BOXES ─── */
.callout-box {
  margin: 26px 0;
  padding: 18px 22px;
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 4px 4px 0px var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-sizing: border-box;
  max-width: 100%;
}

.callout-box.info {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--neo-cyan);
}

[data-theme="dark"] .callout-box.info {
  background: rgba(0, 240, 255, 0.08);
}

.callout-box.tip {
  background: rgba(0, 232, 120, 0.12);
  border-color: var(--neo-lime);
}

[data-theme="dark"] .callout-box.tip {
  background: rgba(0, 232, 120, 0.08);
}

.callout-box.warning {
  background: rgba(255, 120, 40, 0.12);
  border-color: var(--neo-orange);
}

.callout-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-body h4 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--fg);
}

.callout-body p {
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 0;
  color: var(--fg);
}

/* ─── DIAGRAM BOX ─── */
.diagram-container {
  margin: 28px 0;
  background: var(--bg-card-alt);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 5px 5px 0px var(--border);
  padding: 20px;
  overflow-x: auto;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}

.diagram-caption {
  font-family: 'JetBrains Mono', 'Vazirmatn', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--fg-muted);
  margin-top: 12px;
  text-transform: uppercase;
}

/* ─── AUTHOR BIO BOX ─── */
.article-author-bio {
  margin-top: 45px;
  background: var(--bg-card);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 5px 5px 0px var(--border);
  padding: 26px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .article-author-bio {
    flex-direction: column;
    text-align: center;
  }
}

.bio-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--border);
  box-shadow: 3px 3px 0px var(--border);
  background: var(--neo-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 900;
  font-size: 1.1rem;
  color: #000;
}

.bio-content h4 {
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--fg);
}

.bio-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--fg-muted);
  margin-bottom: 10px;
}

.bio-links {
  display: flex;
  gap: 12px;
}

@media (max-width: 600px) {
  .bio-links {
    justify-content: center;
  }
}

.bio-link {
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--fg);
  text-decoration: underline;
}

/* ─── ARTICLE NAVIGATION (PREV/NEXT) ─── */
.article-nav-row {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .article-nav-row {
    grid-template-columns: 1fr;
  }
}

.article-nav-card {
  background: var(--bg-card);
  border: var(--b-width) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 4px 4px 0px var(--border);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.article-nav-card:hover {
  background: var(--neo-yellow);
  color: #000;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--border);
}

.article-nav-dir {
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-nav-card:hover .article-nav-dir {
  color: #000;
}

.article-nav-title {
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.4;
}

/* ─── CANONICAL FOOTER FOR BLOG ─── */
.ftr {
  position: relative;
  z-index: 20;
  background: #06080D !important;
  color: #FFFFFF !important;
  border-top: 3px solid #000000;
  box-shadow: inset 0 2px 0 rgba(255, 230, 0, 0.25);
  padding: 64px 0 28px 0;
  margin-top: 48px;
  width: 100%;
}
.ftr .wrap {
  position: relative;
  z-index: 2;
}

/* Top 4-Column Grid */
.ftr-top-grid,
.ftr-g {
  display: grid !important;
  grid-template-columns: 2.2fr 1fr 1.1fr 1.4fr !important;
  gap: 40px !important;
  border-bottom: 2px solid #1E2330 !important;
  padding-bottom: 44px !important;
  margin-bottom: 26px !important;
}

/* Col 1: Brand */
.ftr-col-brand,
.ftr-brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 16px !important;
  max-width: 440px !important;
}

/* Standalone Logo for Footer (never stretches, never inherits full-width yellow bar) */
.ftr-logo,
.ftr-brand .logo {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: #10141E !important;
  border: 2px solid #232B3E !important;
  border-radius: 10px !important;
  padding: 8px 16px !important;
  text-decoration: none !important;
  box-shadow: 4px 4px 0px #000000 !important;
  align-self: flex-start !important;
  width: fit-content !important;
  max-width: fit-content !important;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.ftr-logo:hover,
.ftr-brand .logo:hover {
  transform: translate(-2px, -2px) !important;
  border-color: var(--neo-yellow, #FFE600) !important;
  box-shadow: 6px 6px 0px #000000 !important;
}

.ftr-logo-icon,
.ftr-brand .logo .logo-icon {
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0 !important;
}

.ftr-logo-text,
.ftr-brand .logo span {
  font-family: 'JetBrains Mono', 'Courier New', monospace, sans-serif !important;
  font-size: 1.18rem !important;
  font-weight: 900 !important;
  color: #FFFFFF !important;
  letter-spacing: 0.04em !important;
}
.ftr-logo-text .neo-yellow-text,
.ftr-brand .logo b {
  color: var(--neo-yellow, #FFE600) !important;
}

.ftr-p {
  font-size: 0.88rem !important;
  line-height: 1.7 !important;
  color: #94A3B8 !important;
  margin: 0 !important;
}

/* System Pulse Badge */
.ftr-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: rgba(0, 232, 120, 0.08) !important;
  border: 1.5px solid rgba(0, 232, 120, 0.3) !important;
  border-radius: 20px !important;
  padding: 4px 12px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.76rem !important;
  color: #00E878 !important;
  font-weight: 700 !important;
}
.status-pulse-dot {
  width: 8px !important;
  height: 8px !important;
  background: #00E878 !important;
  border-radius: 50% !important;
  box-shadow: 0 0 8px #00E878 !important;
  flex-shrink: 0 !important;
}

/* Navigation Columns */
.ftr-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}

.ftr-heading,
.ftr-nav-title {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: var(--neo-yellow, #FFE600) !important;
  margin-bottom: 18px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.ftr-heading::before,
.ftr-nav-title::before {
  content: '//' !important;
  color: var(--neo-cyan, #00F0FF) !important;
  font-weight: 900 !important;
}

.ftr-links-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}
.ftr-links-list li {
  margin: 0 !important;
  padding: 0 !important;
}
.ftr-links-list li a,
.ftr-nav-links a {
  color: #CBD5E1 !important;
  text-decoration: none !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: color 0.15s ease, transform 0.15s ease !important;
}
.ftr-links-list li a:hover,
.ftr-nav-links a:hover {
  color: var(--neo-yellow, #FFE600) !important;
  transform: translateX(4px) !important;
}
[dir="rtl"] .ftr-links-list li a:hover,
[dir="rtl"] .ftr-nav-links a:hover {
  transform: translateX(-4px) !important;
}

/* Connect Column */
.ftr-col-connect {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}
.ftr-connect-p {
  font-size: 0.85rem !important;
  color: #94A3B8 !important;
  margin: 0 0 14px 0 !important;
  line-height: 1.55 !important;
}

.ftr-email-badge,
.ftr-nav-links a.ftr-email-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #10141E !important;
  color: var(--neo-cyan, #00F0FF) !important;
  border: 2px solid #232B3E !important;
  border-radius: 8px !important;
  padding: 10px 16px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 3px 3px 0px #000000 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease !important;
}
.ftr-email-badge:hover,
.ftr-nav-links a.ftr-email-link:hover {
  transform: translate(-2px, -2px) !important;
  border-color: var(--neo-cyan, #00F0FF) !important;
  box-shadow: 5px 5px 0px #000000 !important;
  background: #161C2A !important;
  color: var(--neo-yellow, #FFE600) !important;
}

.ftr-location-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.74rem !important;
  color: #64748B !important;
  margin-top: 14px !important;
}

/* Footer Bottom Bar */
.ftr-bottom-bar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
}
.ftr-copy {
  font-family: 'JetBrains Mono', 'Vazirmatn', monospace, sans-serif !important;
  font-size: 0.82rem !important;
  color: #64748B !important;
  margin: 0 !important;
}
.ftr-tagline .ftr-tech-badge {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: var(--neo-yellow, #FFE600) !important;
  background: #10141E !important;
  border: 1.5px solid #232B3E !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  display: inline-block !important;
}

/* Responsive Footer */
@media (max-width: 1024px) {
  .ftr-top-grid,
  .ftr-g {
    grid-template-columns: 1fr 1fr !important;
    gap: 36px !important;
  }
}
@media (max-width: 640px) {
  .ftr {
    padding: 48px 0 24px 0 !important;
  }
  .ftr-top-grid,
  .ftr-g {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .ftr-bottom-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
}

/* ─── CUSTOM NEOBRUTALIST SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-card-alt, #EDECE8);
  border-left: 2px solid var(--border, #000000);
}
::-webkit-scrollbar-thumb {
  background: var(--neo-yellow, #FFE600);
  border: 2px solid var(--border, #000000);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neo-pink, #FF539B);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--neo-yellow, #FFE600) var(--bg-card-alt, #EDECE8);
}

/* ─── LAZY LOADING & TACTILE CARD ENTRANCE ─── */
.lazy-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lazy-card.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .lazy-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─── NEWSLETTER DISPATCH BOX (NEOBRUTALISM) ─── */
.blog-dispatch-box {
  background: var(--bg-card, #12151D);
  border: var(--b-width, 3px) solid var(--border, #000);
  border-radius: var(--r-card, 14px);
  box-shadow: 6px 6px 0px var(--border, #000);
  padding: 36px 32px;
  margin-top: 56px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.blog-dispatch-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--neo-yellow, #FFE600), var(--neo-cyan, #00F0FF), var(--neo-pink, #FF539B));
}

.dispatch-info {
  flex: 1 1 340px;
}

.dispatch-info h3 {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 0 0 10px 0;
  color: var(--fg, #FFF);
}

.dispatch-info p {
  font-size: 0.92rem;
  color: var(--fg-muted, #94A3B8);
  line-height: 1.65;
  margin: 0;
}

.dispatch-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 340px;
  max-width: 480px;
}

.dispatch-input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg, #0A0D14);
  border: var(--b-width, 2.5px) solid var(--border, #000);
  border-radius: var(--r-btn, 8px);
  color: var(--fg, #FFF);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dispatch-input:focus {
  border-color: var(--neo-yellow, #FFE600);
  box-shadow: 3px 3px 0px var(--border, #000);
}

.dispatch-btn {
  padding: 13px 24px;
  white-space: nowrap;
  font-family: 'JetBrains Mono', sans-serif;
  font-size: 0.92rem;
  font-weight: 900;
  background: var(--neo-yellow, #FFE600);
  color: #000000;
  border: var(--b-width, 2.5px) solid #000000;
  border-radius: var(--r-btn, 8px);
  box-shadow: 4px 4px 0px #000000;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dispatch-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000000;
}

.dispatch-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000000;
}

.dispatch-btn:disabled {
  opacity: 0.85;
  cursor: wait;
}

@media (max-width: 640px) {
  .blog-dispatch-box {
    padding: 26px 20px;
    gap: 20px;
  }
  .dispatch-form {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }
  .dispatch-input,
  .dispatch-btn {
    width: 100%;
  }
}


