*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-void:    #0a0a10;
  --bg-deep:    #0e0e16;
  --bg-card:    #12121c;
  --bg-glass:   rgba(18, 18, 28, 0.65);
  --bg-elevated: #181824;
  --gold:        #7B72D4;
  --gold-light:  #A49FF5;
  --gold-dim:    rgba(123, 114, 212, 0.15);
  --gold-glow:   rgba(123, 114, 212, 0.3);
  --gold-border: rgba(123, 114, 212, 0.22);
  --text-primary:   #F0F0F5;
  --text-secondary: #8B8FA8;
  --text-muted:     #4A4E6A;
  --border:       rgba(255,255,255,0.06);
  --border-gold:  rgba(123, 114, 212, 0.22);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-void);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

.grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(123,114,212,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,114,212,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Nav */
nav.blog-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10,10,16,0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}
nav.blog-nav.scrolled { border-color: var(--border-gold); }
.nav-logo {
  font-size: 1.3rem; font-weight: 600; letter-spacing: -0.04em;
  text-decoration: none; color: var(--text-primary);
}
.nav-logo span { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  color: var(--text-secondary); text-decoration: none; font-size: 0.875rem;
  font-weight: 500; transition: color 0.2s;
}
.nav-link:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--gold); color: #fff; text-decoration: none;
  padding: 0.5rem 1.25rem; border-radius: 8px;
  font-size: 0.875rem; font-weight: 600; letter-spacing: -0.01em;
  transition: opacity 0.2s, transform 0.2s;
}
.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* Article */
#blog-article-root { position: relative; z-index: 1; }

.article-container {
  max-width: 760px; margin: 0 auto;
  padding: 6.5rem 2rem 4rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--text-muted);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb .sep { color: var(--text-muted); }

/* Article header */
.article-header { margin-bottom: 2.5rem; }
.article-category {
  display: inline-block;
  background: var(--gold-dim); border: 1px solid var(--border-gold);
  color: var(--gold-light); border-radius: 6px;
  padding: 0.2rem 0.75rem; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.locale-alternate-link {
  text-align: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}
.locale-alternate-link a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--gold-light); font-size: 0.875rem; font-weight: 600;
  text-decoration: none;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--border-gold);
  border-radius: 100px;
  transition: all 0.2s;
}
.locale-alternate-link a:hover {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  transform: translateY(-1px);
}
.article-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700; letter-spacing: -0.04em;
  line-height: 1.15; margin-bottom: 1rem;
  color: var(--text-primary);
}
.article-excerpt {
  font-size: 1.15rem; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 1.5rem;
  font-weight: 400;
}
.article-meta-bar {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-size: 0.875rem; flex-wrap: wrap;
}
.author-info { display: flex; align-items: center; gap: 0.75rem; }
.author-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.author-details .author-name { font-weight: 600; color: var(--text-primary); font-size: 0.875rem; }
.author-details .author-title { color: var(--text-muted); font-size: 0.78rem; }
.meta-divider { width: 1px; height: 24px; background: var(--border); }
.meta-item { color: var(--text-secondary); display: flex; align-items: center; gap: 0.4rem; }
.meta-item svg { flex-shrink: 0; }

/* Share buttons */
.share-bar {
  margin-left: auto; display: flex; align-items: center; gap: 0.5rem;
}
.share-btn {
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-secondary); border-radius: 8px;
  padding: 0.4rem 0.8rem; font-size: 0.78rem; font-weight: 500; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; gap: 0.4rem;
  transition: all 0.2s;
}
.share-btn:hover { border-color: var(--border-gold); color: var(--gold-light); }

/* Featured image */
.article-featured-img {
  width: 100%; border-radius: 14px; margin-bottom: 2.5rem;
  border: 1px solid var(--border); overflow: hidden;
  max-height: 460px;
}
.article-featured-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Article content */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-primary);
}
.article-content h2 {
  font-size: 1.55rem; font-weight: 700; letter-spacing: -0.03em;
  margin: 2.5rem 0 1rem; color: var(--text-primary);
  line-height: 1.25;
}
.article-content h3 {
  font-size: 1.25rem; font-weight: 600; letter-spacing: -0.025em;
  margin: 2rem 0 0.75rem; color: var(--text-primary);
}
.article-content h4 {
  font-size: 1.05rem; font-weight: 600;
  margin: 1.5rem 0 0.5rem; color: var(--text-primary);
}
.article-content p { margin-bottom: 1.5rem; color: var(--text-secondary); }
.article-content p:last-child { margin-bottom: 0; }
.article-content a { color: var(--gold-light); text-decoration: underline; text-decoration-color: var(--gold-border); }
.article-content a:hover { color: var(--gold); }
.article-content strong { color: var(--text-primary); font-weight: 600; }
.article-content em { font-style: italic; }
.article-content ul, .article-content ol {
  margin: 0 0 1.5rem 1.5rem; color: var(--text-secondary);
}
.article-content li { margin-bottom: 0.5rem; }
.article-content blockquote {
  border-left: 3px solid var(--gold); padding: 1rem 1.5rem;
  background: var(--gold-dim); border-radius: 0 10px 10px 0;
  margin: 2rem 0; font-style: italic;
  color: var(--text-secondary);
}
.article-content code {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 5px; padding: 0.15rem 0.5rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em; color: var(--gold-light);
}
.article-content pre {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.25rem; margin: 1.5rem 0;
  overflow-x: auto;
}
.article-content pre code {
  background: none; border: none; padding: 0;
  font-size: 0.875rem; line-height: 1.7;
}
.article-content img {
  max-width: 100%; border-radius: 10px; margin: 1.5rem 0;
  border: 1px solid var(--border); display: block;
}
.article-content hr {
  border: none; border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}
.article-content table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: 0.9rem;
}
.article-content th {
  background: var(--bg-elevated); padding: 0.75rem 1rem;
  text-align: left; font-weight: 600; color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.article-content td {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

/* Inline CTA */
.inline-cta {
  background: var(--gold-dim); border: 1px solid var(--border-gold);
  border-radius: 14px; padding: 1.5rem 2rem;
  margin: 2.5rem 0; display: flex; align-items: center;
  justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.inline-cta-text { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.inline-cta-sub { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.25rem; }
.inline-cta-btn {
  background: var(--gold); color: #fff; text-decoration: none;
  padding: 0.6rem 1.4rem; border-radius: 9px;
  font-weight: 600; font-size: 0.875rem; white-space: nowrap;
  transition: opacity 0.2s;
}
.inline-cta-btn:hover { opacity: 0.85; }

/* End CTA */
.end-cta {
  background: linear-gradient(135deg, rgba(123,114,212,0.12) 0%, rgba(123,114,212,0.05) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 18px; padding: 2.5rem;
  margin-top: 3.5rem; text-align: center;
}
.end-cta h3 {
  font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text-primary); margin-bottom: 0.75rem;
}
.end-cta p {
  font-size: 0.95rem; color: var(--text-secondary);
  max-width: 420px; margin: 0 auto 1.5rem; line-height: 1.65;
}
.end-cta-btn {
  display: inline-block; background: var(--gold); color: #fff;
  text-decoration: none; padding: 0.75rem 2rem;
  border-radius: 10px; font-weight: 700; font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s;
}
.end-cta-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* Loading/error states */
.article-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 60vh; flex-direction: column; gap: 1rem;
}
.spinner {
  width: 36px; height: 36px;
  border: 2px solid rgba(123,114,212,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.article-error {
  text-align: center; padding: 4rem 2rem;
  color: var(--text-secondary);
}
.article-error h2 { font-size: 1.5rem; color: var(--text-primary); margin-bottom: 0.75rem; }
.article-error a { color: var(--gold-light); text-decoration: none; }

/* Related articles */
.related-section {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
  margin-top: 3rem;
}
.related-heading {
  font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text-primary); margin-bottom: 1.5rem;
  text-align: center;
}
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.related-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color 0.25s, transform 0.25s;
  display: flex; flex-direction: column;
}
.related-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}
.related-img {
  width: 100%; height: 130px; background: linear-gradient(135deg, #0e0e1e 0%, #12122a 100%);
  overflow: hidden; flex-shrink: 0;
}
.related-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.related-card:hover .related-img img { transform: scale(1.04); }
.related-img-placeholder {
  width: 100%; height: 130px;
  display: flex; align-items: center; justify-content: center;
}
.related-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.related-category {
  display: inline-block;
  background: var(--gold-dim); border: 1px solid var(--border-gold);
  color: var(--gold-light); border-radius: 4px;
  padding: 0.1rem 0.5rem; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; width: fit-content;
}
.related-locale-badge {
  display: inline-block; padding: 0.1rem 0.4rem; font-size: 0.65rem;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 4px; font-weight: 700;
  letter-spacing: 0.05em; margin-left: 0.4rem;
}
.related-title {
  font-size: 0.95rem; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.35; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.related-excerpt {
  font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}
.related-meta {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; color: var(--text-muted); margin-top: auto;
}
.related-meta .sep { color: var(--text-muted); }

@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; gap: 1rem; }
  .related-img { height: 140px; }
}

/* Blog footer */
.article-footer {
  border-top: 1px solid var(--border);
  text-align: center; padding: 2rem;
  font-size: 0.82rem; color: var(--text-muted);
  position: relative; z-index: 1;
}
.article-footer a { color: var(--text-secondary); text-decoration: none; }

/* Mobile */
@media (max-width: 640px) {
  .article-container { padding: 5.5rem 1.25rem 3rem; }
  .share-bar { margin-left: 0; }
  nav.blog-nav { padding: 0.75rem 1rem; }
  .article-title { font-size: 1.6rem; }
  .inline-cta { flex-direction: column; align-items: flex-start; }
}
