/* Font suggestions (Google Fonts): Poppins + Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Playfair+Display:wght@500&display=swap');

:root {
  --bg: #fff;
  --text: #111;
  --accent: #0056b3;
  --muted: #888888;
  --quote-bg: #f7f7f7;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.8;
  margin: 0;
}

p {
  text-align: justify;
}

body, .blog-container, .blog-main, .blog-sidebar, .blog-toc, .related-articles, .blog-content, .article-card, .blog-author-image {
  background: #fff !important;
  color: #111 !important;
  font-family: 'Inter', sans-serif;
}

.blog-content h1, .blog-content h2, .blog-content h3, .blog-content h4, .blog-content h5, .blog-content h6,
.blog-toc a, .blog-toc li, .related-articles, .article-title, .blog-author-name, .blog-author-role, .back-link {
  color: #515151 !important;
  font-weight: bolder;
  transition: color 0.2s;
}

.blog-toc li.active > a,
.blog-toc a:hover,
.blog-toc a:focus,
.blog-toc li.active,
.blog-author-name:hover,
.blog-author-role:hover,
.article-title:hover,
.related-articles:hover {
  color: #111 !important;
}

/* Remove/override any dark backgrounds or light text */
:root {
  --bg: #fff;
  --text: #111;
  --quote-bg: #f7f7f7;
  --accent: #F59E0B;
}

.blog-toc {
  background: #f7f7f7 !important;
}

.article-card {
  background: #fff !important;
}

.blog-author-image {
  background: #f7f7f7 !important;
}

.blog-container {
  max-width: 1200px;
  margin-top: 1.2rem;
  margin: auto;
  padding: 3rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.blog-sidebar {
  flex: 0 0 250px;
}

.blog-main {
  flex: 1;
  max-width: 700px;
  margin: 0 auto;
}

.blog-author-image {
  margin-bottom: 2rem;
}

.blog-author-image img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.blog-author-image h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--accent);
}

.blog-author-image p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.blog-toc {
  background-color: var(--quote-bg);
  padding: 1.5rem;
  border-radius: 8px;
}

.blog-toc h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.blog-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-toc li {
  margin-bottom: 0.5rem;
}

.blog-toc a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease-in-out;
}

.blog-toc a:hover {
  color: var(--accent);
}

.blog-header {
  margin-bottom: 2rem;
  text-align: center;
}

.blog-title {
  font-family: 'Poppins', sans-serif;
  font-weight: bolder;
  font-size: 2rem;
  color: var(--accent);
}

.blog-meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  text-align: center;
}

.blog-hero-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 2rem 0;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.blog-content h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: bolder;
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.blog-content h3, h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.1rem;
  color: var(--accent);
}

.blog-content p {
  margin-bottom: 1.5rem;
}

blockquote {
  background-color: var(--quote-bg);
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
  font-style: italic;
  margin: 2rem 0;
  border-radius: 8px;
}

.code-block {
  background-color: #1d1d1d;
  padding: 1rem;
  border-radius: 10px;
  font-family: monospace;
  display: block;
  overflow-x: auto;
  color: #f1f1f1;
  margin: 2rem 0;
}

.blog-tags span {
  background-color: #292929;
  padding: 0.4rem 0.8rem;
  margin-right: 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--accent);
}

.related-articles {
  margin-top: 3rem;
}

.related-articles h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background-color: var(--quote-bg);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease-in-out;
}

.article-card:hover {
  transform: translateY(-5px);
}

.article-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.article-info {
  padding: 1rem;
}

.article-info h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.article-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.blog-footer {
  margin-top: 4rem;
  text-align: center;
}

.back-link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  transition: color 0.2s ease-in-out;
}

.back-link:hover {
  color: #ffa074;
}

/* Fade-in animation for main sections */
.blog-main, .blog-sidebar, .related-articles {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s, transform 0.7s;
}
.blog-main.in-view, .blog-sidebar.in-view, .related-articles.in-view {
  opacity: 1;
  transform: none;
}

/* Sticky and enhanced TOC */
.blog-toc {
  position: sticky;
  top: 40px;
  background-color: var(--quote-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
.blog-toc li.active > a,
.blog-toc a:focus {
  color: var(--accent);
  font-weight: bold;
  outline: none;
}

/* Card effect for author image */
.blog-author-image {
  margin-bottom: 2rem;
  background: var(--quote-bg);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  padding: 1.5rem 1rem 1rem 1rem;
  text-align: center;
}

/* Enhanced section headings */
.blog-content h5 {
  font-size: 1.3rem;
  font-family: 'Poppins', sans-serif;
  color: var(--accent);
  margin: 2.5rem 0 1rem 0;
  position: relative;
  text-align: center;
}
.blog-content h5::after {
  content: '';
  display: block;
  margin: 0.5rem auto 0 auto;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* Soft box-shadow for images */
.blog-content img, .article-image {
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  border-radius: 10px;
}

/* Hover zoom effect for related article images */
.article-image {
  transition: transform 0.3s cubic-bezier(.4,2,.6,1), box-shadow 0.3s;
}
.article-card:hover .article-image {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

/* Animate back-link arrow on hover */
.back-link {
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}
.back-link::before {
  content: '\2190';
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s;
}
.back-link:hover::before {
  transform: translateX(-4px);
}

/* Accessibility: focus states */
.blog-toc a:focus, .back-link:focus, .article-card:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Responsive improvements */
@media (max-width: 900px) {
  .blog-container {
    flex-direction: column;
    padding: 1.5rem 0.5rem;
  }
  .blog-sidebar {
    margin-bottom: 2rem;
    max-width: 100%;
    width: 100%;
    position: static;
  }
  .blog-main {
    max-width: 100%;
    margin: 0 auto;
  }
}
@media (max-width: 600px) {
  .blog-container {
    padding: 0.5rem 0.1rem;
  }
  .blog-author-image {
    padding: 1rem 0.5rem 0.5rem 0.5rem;
  }
  .blog-content img, .article-image {
    max-width: 100%;
    height: auto;
  }
}