/* Markdown / Content Body Component */

.article-body {
  font-family: 'Manrope', sans-serif;
  font-size: 1.05rem;
  color: var(--text-primary-soft);
  line-height: 1.75;
  max-width: 860px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}

.article-body h1 {
  display: inline-block;
  margin: 0 0 1.5rem;
  font-size: clamp(1.8rem, 3.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #cffff1 0%, var(--primary) 24%, var(--accent) 68%, #ffe085 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.article-body h1+p {
  font-size: 1.08rem;
  color: var(--text-primary);
  margin-top: -0.3rem;
  margin-bottom: 1.8rem;
  line-height: 1.6;
  opacity: 0.95;
}

.article-body h2 {
  scroll-margin-top: 5rem;
  margin: 2.8rem 0 1.1rem;
  font-size: clamp(1.3rem, 2.5vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--primary);
  text-shadow: 0 0 15px rgba(100, 255, 150, 0.12);
}

.article-body h3 {
  scroll-margin-top: 5rem;
  margin: 2rem 0 0.95rem;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
  text-shadow: 0 0 12px rgba(100, 255, 150, 0.12);
}

.article-body h4 {
  scroll-margin-top: 5rem;
  margin: 1.75rem 0 0.8rem;
  font-size: 1.05rem;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(100, 255, 150, 0.12);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.article-body h5 {
  scroll-margin-top: 5rem;
  margin: 1.6rem 0 0.8rem;
  font-size: 0.98rem;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(100, 255, 150, 0.12);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.article-body h6 {
  scroll-margin-top: 5rem;
  margin: 1.4rem 0 0.8rem;
  font-size: 0.88rem;
  color: var(--primary);
  opacity: 0.7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre,
.article-body table,
.article-body hr {
  margin: 0.9rem 0 0;
}

.article-body p {
  max-width: 76ch;
}

.article-body strong {
  color: var(--primary);
  font-weight: 500;
  background: rgba(100, 255, 150, 0.06);
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
  border: 1px solid rgba(100, 255, 150, 0.1);
  text-shadow: 0 0 8px rgba(100, 255, 150, 0.15);
}
.article-body a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(100, 255, 150, 0.2);
  transition: all 0.25s ease;
  font-weight: 500;
}

.article-body a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(100, 255, 150, 0.05);
}

.article-body ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.8rem;
}

.article-body ul > li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.65;
}

.article-body ul > li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.52em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: radial-gradient(circle, #d6ffe4 0%, var(--primary) 45%, rgba(100, 255, 150, 0.1) 100%);
  box-shadow: 0 0 8px rgba(100, 255, 150, 0.5);
}

.article-body ol {
  counter-reset: custom-counter;
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.8rem;
}

.article-body ol > li {
  position: relative;
  padding-left: 2rem;
  line-height: 1.65;
  counter-increment: custom-counter;
}

.article-body ol > li::before {
  content: counter(custom-counter, decimal-leading-zero) ".";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  top: 0.08rem;
  text-shadow: 0 0 8px rgba(100, 255, 150, 0.4);
}

/* Nested lists styling & indentation */
.article-body ul ul,
.article-body ul ol,
.article-body ol ul,
.article-body ol ol {
  margin-top: 0.6rem;
  padding-left: 1.5rem;
  gap: 0.6rem;
}


.article-body blockquote {
  position: relative;
  padding: 1.4rem 1.6rem 1.4rem 3.6rem;
  margin: 1.8rem 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 201, 107, 0.16);
  border-left: 4px solid var(--warning);
  background: linear-gradient(135deg, rgba(35, 28, 14, 0.5) 0%, rgba(15, 13, 10, 0.5) 100%);
  color: var(--text-primary-soft);
  font-style: normal;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.article-body blockquote::before {
  content: '⚠';
  position: absolute;
  left: 1.25rem;
  top: 1.45rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-style: normal;
  color: #120e06;
  background: var(--warning);
  font-size: 0.85rem;
  box-shadow: 0 0 10px rgba(255, 201, 107, 0.4);
}

.article-body blockquote p {
  margin-top: 0;
  line-height: 1.65;
}

.article-body img {
  display: block;
  margin: 1.8rem auto 0.5rem;
  width: auto;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid rgba(171, 255, 206, 0.12);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.article-body p>img~em {
  display: block;
  text-align: center;
  margin-top: 0.4rem;
  margin-bottom: 1.8rem;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(100, 255, 150, 0.25);
  font-size: 0.88rem;
  font-style: normal;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.article-body p>em:only-child {
  display: block;
  text-align: center;
  margin-top: -0.4rem;
  margin-bottom: 1.8rem;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(100, 255, 150, 0.25);
  font-size: 0.88rem;
  font-style: normal;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}






.article-body pre {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  padding: 2.6rem 1.5rem 1.5rem;
  margin: 1.8rem 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(100, 255, 150, 0.16);
  background: rgba(4, 9, 6, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.03);
}

.article-body pre::before {
  content: '••• SOURCE_CODE';
  position: absolute;
  top: 0.8rem;
  left: 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--primary);
  opacity: 0.65;
  text-shadow: 0 0 6px rgba(100, 255, 150, 0.3);
}

.article-body code {
  display: inline-block;
  vertical-align: middle;
  line-height: 1.2;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(100, 255, 150, 0.08);
  border: 1px solid rgba(100, 255, 150, 0.2);
  color: var(--primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88em;
  font-weight: 500;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01);
}

.article-body pre code {
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-primary-soft);
  font-size: 0.92rem;
  box-shadow: none;
}

.article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(100, 255, 150, 0.12);
  background: rgba(8, 16, 13, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  display: table;
}

.article-body th {
  background: rgba(100, 255, 150, 0.08);
  color: var(--text-primary);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 1.1rem 1.3rem;
  text-align: left;
  border-bottom: 1px solid rgba(100, 255, 150, 0.2);
}

.article-body td {
  padding: 1.1rem 1.3rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.94rem;
  line-height: 1.5;
  transition: all 0.2s ease;
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body tr:hover td {
  background: rgba(100, 255, 150, 0.04);
  color: var(--text-primary);
}

.article-body hr {
  height: 1px;
  border: 0;
  margin: 3.5rem 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* Fluid Responsive Styles specifically for Mobile devices */
@media (max-width: 768px) {
  .article-body {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .article-body h1 {
    font-size: clamp(1.6rem, 6.5vw, 1.95rem);
    margin-bottom: 1.1rem;
  }

  .article-body h1+p {
    font-size: 1.02rem;
    margin-bottom: 1.5rem;
  }

  .article-body h2 {
    font-size: clamp(1.2rem, 5vw, 1.35rem);
    margin: 2.2rem 0 0.9rem;
    gap: 0.55rem;
  }

  .article-body h2::before {
    height: 1.15em;
  }

  .article-body h3 {
    font-size: clamp(1.02rem, 4vw, 1.12rem);
    margin: 1.6rem 0 0.75rem;
  }

  .article-body p,
  .article-body ul > li,
  .article-body ol > li {
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .article-body blockquote {
    padding: 1.2rem 1.2rem 1.2rem 2.8rem;
    margin: 1.5rem 0;
    font-size: 0.92rem;
  }

  .article-body blockquote::before {
    left: 0.9rem;
    top: 1.2rem;
    width: 1.2rem;
    height: 1.2rem;
    font-size: 0.75rem;
  }

  /* Make tables beautifully scrollable on mobile viewports */
  .article-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
  }

  .article-body th, 
  .article-body td {
    padding: 0.85rem 1rem;
    font-size: 0.86rem;
  }

  .article-body img {
    margin: 1.4rem auto 0.4rem;
    border-radius: var(--radius-sm);
  }

  .article-body p>img~em {
    margin-top: 0.3rem;
    margin-bottom: 1.4rem;
    font-size: 0.82rem;
  }

  .article-body p>em:only-child {
    margin-top: -0.3rem;
    margin-bottom: 1.4rem;
    font-size: 0.82rem;
  }

  .article-body pre {
    padding: 2.2rem 1.2rem 1.2rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
  }

  .article-body pre::before {
    top: 0.65rem;
    left: 1.2rem;
  }
}

