/* ========== BLOG STYLES ========== */

/* Blog Hero */
.blog-hero {
  padding: 12rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-bg) 0%, transparent 100%);
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-size: 1.4rem;
  color: var(--text-dim);
  margin-bottom: 3rem;
  transition: all .3s;
}

.blog-back:hover {
  color: var(--accent);
  transform: translateX(-5px);
}

.blog-hero-title {
  font-size: 4.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero-desc {
  font-size: 1.8rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Article */
.blog-article {
  padding: 6rem 0;
}

.article-header {
  text-align: center;
  margin-bottom: 5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.article-tag {
  background: var(--accent-bg);
  color: var(--accent-light);
  padding: .4rem 1.4rem;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid var(--accent-border);
}

.article-date, .article-read {
  font-size: 1.3rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.article-title {
  font-size: 3.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.article-subtitle {
  font-size: 1.8rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.article-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.author-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-border);
}

.author-name {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.author-role {
  display: block;
  font-size: 1.3rem;
  color: var(--text-dim);
}

/* Article Content */
.article-content {
  max-width: 860px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 5rem 0 2rem;
  color: var(--text-primary);
  padding-top: 2rem;
}

.article-content h3 {
  font-size: 2rem;
  font-weight: 600;
  margin: 3rem 0 1.2rem;
  color: var(--text-body);
}

.article-content p {
  font-size: 1.65rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.article-content strong {
  color: var(--accent-lighter);
}

.article-content code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--accent-bg);
  color: var(--accent-light);
  padding: .2rem .7rem;
  border-radius: .5rem;
  font-size: 1.35rem;
  border: 1px solid rgba(99,102,241,.15);
}

.article-content ul {
  margin-bottom: 2rem;
}

.article-content li {
  font-size: 1.6rem;
  color: var(--text-muted);
  padding: .6rem 0 .6rem 2.5rem;
  position: relative;
  line-height: 1.7;
}

.article-content li i {
  position: absolute;
  left: 0;
  top: .8rem;
  color: var(--green);
  font-size: 1.2rem;
}

/* Table of Contents */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 1.6rem;
  padding: 2.5rem 3rem;
  margin-bottom: 4rem;
}

.toc h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.toc ol {
  counter-reset: toc;
  padding-left: 2rem;
}

.toc li {
  counter-increment: toc;
  padding: .5rem 0;
  font-size: 1.45rem;
}

.toc li::marker {
  color: var(--accent);
  font-weight: 700;
}

.toc a {
  color: var(--text-muted);
  transition: all .3s;
}

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

/* Code Blocks */
pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 2rem;
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  position: relative;
}

pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--violet), #a78bfa);
  border-radius: 1.2rem 1.2rem 0 0;
}

pre code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  line-height: 1.8;
  color: var(--accent-lighter);
  background: none;
  border: none;
  padding: 0;
  display: block;
  white-space: pre;
}

/* Callouts */
.callout {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 1.2rem;
  margin: 2rem 0;
  font-size: 1.5rem;
  line-height: 1.7;
}

.callout i {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: .2rem;
}

.callout strong {
  display: block;
  margin-bottom: .3rem;
}

.callout-info {
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.2);
  color: var(--text-secondary);
}

.callout-info i { color: var(--blue-light); }

.callout-tip {
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.2);
  color: var(--text-secondary);
}

.callout-tip i { color: var(--green); }

.callout-warning {
  background: rgba(234,179,8,.08);
  border: 1px solid rgba(234,179,8,.2);
  color: var(--text-secondary);
}

.callout-warning i { color: var(--yellow); }

/* Comparison Tables */
.comparison-table {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 1.2rem;
  border: 1px solid var(--border);
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th {
  background: var(--accent-bg);
  color: var(--accent-light);
  font-size: 1.3rem;
  font-weight: 700;
  padding: 1.2rem 1.6rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.comparison-table td {
  padding: 1rem 1.6rem;
  font-size: 1.4rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.comparison-table td code {
  font-size: 1.2rem;
  padding: .1rem .5rem;
}

.comparison-table tr:hover td {
  background: var(--bg-card-hover);
}

/* Best Practices */
.best-practices {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

.practice-item {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 1.2rem;
  padding: 2.5rem;
  transition: all .3s;
}

.practice-item:hover {
  border-color: var(--accent-border);
}

.practice-item h4 {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
}

.practice-item h4 i {
  color: var(--green);
  font-size: 1.6rem;
}

.practice-item p {
  font-size: 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.practice-item pre {
  margin: 0;
}

/* Article Divider */
.article-divider {
  padding: 0;
}

.article-divider hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-border-strong), transparent);
  max-width: 800px;
  margin: 0 auto;
}

/* Back to Top */
.back-to-top {
  text-align: center;
  padding: 4rem 0 6rem;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-hero { padding: 10rem 0 3rem; }
  .blog-hero-title { font-size: 3rem; }
  .blog-hero-desc { font-size: 1.5rem; }
  .article-title { font-size: 2.8rem; }
  .article-content h2 { font-size: 2.2rem; }
  .article-content h3 { font-size: 1.7rem; }
  .toc { padding: 2rem; }
  .practice-item { padding: 2rem; }
  .comparison-table { font-size: 1.3rem; }
  .comparison-table th, .comparison-table td { padding: .8rem 1rem; }
}
