/* ── Blog Article — Dark Theme (matches global.css) ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Reading Progress Bar */
#reading-progress {
    position: fixed; top: 0; left: 0; width: 0%; height: 3px;
    background: linear-gradient(90deg, #7c3aed, #db2777);
    z-index: 1000; transition: width 0.1s linear;
    box-shadow: 0 0 12px rgba(124,58,237,0.3);
}

/* Article Container */
.article-wrapper {
    max-width: 1100px; margin: 0 auto;
    padding: 40px 24px; flex: 1;
    display: grid; grid-template-columns: 1fr 280px; gap: 40px;
}
.article-main { min-width: 0; }

/* Breadcrumbs */
.breadcrumbs {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem; color: rgba(161,161,170,0.6);
    margin-bottom: 24px; flex-wrap: wrap;
}
.breadcrumbs a {
    color: rgba(161,161,170,0.7); text-decoration: none;
    transition: color 0.25s;
}
.breadcrumbs a:hover { color: #c4b5fd; }
.breadcrumbs .sep { color: rgba(161,161,170,0.4); font-size: 0.7rem; }

/* Article Header */
.article-header {
    margin-bottom: 40px; padding-bottom: 32px;
    border-bottom: 1px solid var(--bg-glass-border);
}
.article-category {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: #c4b5fd; background: rgba(124,58,237,0.1);
    padding: 4px 12px; border-radius: 100px; margin-bottom: 16px;
    border: 1px solid rgba(124,58,237,0.15);
}
.article-title {
    font-family: var(--font-heading); font-size: 2.4rem;
    font-weight: 800; line-height: 1.15;
    color: #f4f4f5; margin-bottom: 16px;
    letter-spacing: -0.5px; overflow-wrap: break-word;
    word-break: break-word;
}
.article-meta {
    display: flex; align-items: center; gap: 20px;
    flex-wrap: wrap; color: rgba(161,161,170,0.7); font-size: 0.85rem;
}
.article-meta-item { display: flex; align-items: center; gap: 6px; }
.article-meta-item svg { width: 16px; height: 16px; opacity: 0.5; }

/* Article Content */
.article-content {
    font-size: 1.05rem; line-height: 1.8;
    color: rgba(255,255,255,0.75);
}
.article-content h1 {
    font-family: var(--font-heading); font-size: 2rem;
    font-weight: 800; margin: 48px 0 20px;
    color: #f4f4f5; letter-spacing: -0.3px; line-height: 1.2;
}
.article-content h2 {
    font-family: var(--font-heading); font-size: 1.5rem;
    font-weight: 700; margin: 40px 0 16px;
    color: #c4b5fd; letter-spacing: -0.2px; line-height: 1.3;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bg-glass-border);
}
.article-content h3 {
    font-family: var(--font-heading); font-size: 1.2rem;
    font-weight: 600; margin: 32px 0 12px;
    color: #e4e4e7; line-height: 1.4;
}
.article-content p {
    margin-bottom: 20px; color: rgba(255,255,255,0.65);
}
.article-content strong { color: #e4e4e7; font-weight: 600; }
.article-content a {
    color: #c4b5fd; text-decoration: none; font-weight: 500;
    border-bottom: 1px solid transparent; transition: all 0.25s;
}
.article-content a:hover { border-bottom-color: #a78bfa; color: #a78bfa; }
.article-content ul, .article-content ol {
    margin: 0 0 24px 24px; color: rgba(255,255,255,0.65);
}
.article-content li { margin-bottom: 8px; line-height: 1.7; }
.article-content li strong { color: #e4e4e7; }
.article-content blockquote {
    margin: 32px 0; padding: 24px 28px;
    border-left: 4px solid #7c3aed;
    background: rgba(124,58,237,0.08);
    border-radius: 0 16px 16px 0;
    font-style: italic; color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
}
.article-content blockquote p { margin-bottom: 0; color: rgba(255,255,255,0.8); }
.article-content img {
    max-width: 100%; height: auto; border-radius: 16px;
    margin: 32px auto; display: block;
    border: 1px solid var(--bg-glass-border);
}
.article-content hr {
    border: none; height: 1px;
    background: var(--bg-glass-border); margin: 40px 0;
}
.article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9em; background: rgba(255,255,255,0.06);
    padding: 2px 8px; border-radius: 4px; color: #c4b5fd;
}
.article-content pre {
    background: rgba(255,255,255,0.04); padding: 20px 24px;
    border-radius: 16px; overflow-x: auto; margin: 24px 0;
    border: 1px solid var(--bg-glass-border);
    font-size: 0.9rem; line-height: 1.6;
}
.article-content pre code {
    background: none; padding: 0; border-radius: 0;
    color: rgba(255,255,255,0.8); font-size: 0.85rem;
}

/* Sidebar (Table of Contents) */
.article-sidebar {
    position: sticky; top: 90px; align-self: start;
    height: calc(100vh - 120px); overflow-y: auto;
}
.sidebar-toc {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--bg-glass-border);
    border-radius: 16px; padding: 24px;
    margin-bottom: 24px;
}
.sidebar-toc-title {
    font-family: var(--font-heading);
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: #c4b5fd; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.sidebar-toc-list { list-style: none; padding: 0; margin: 0; }
.sidebar-toc-list li { margin-bottom: 4px; }
.sidebar-toc-list a {
    display: block; padding: 6px 12px; font-size: 0.82rem;
    color: rgba(161,161,170,0.7); text-decoration: none;
    border-radius: 6px; border-left: 2px solid transparent;
    transition: all 0.25s; line-height: 1.4;
}
.sidebar-toc-list a:hover,
.sidebar-toc-list a.active {
    color: #c4b5fd; background: rgba(124,58,237,0.08);
    border-left-color: #7c3aed;
}
.article-sidebar::-webkit-scrollbar { width: 4px; }
.article-sidebar::-webkit-scrollbar-thumb {
    background: var(--bg-glass-border); border-radius: 4px;
}

/* Share Buttons */
.share-section {
    margin-top: 48px; padding-top: 32px;
    border-top: 1px solid var(--bg-glass-border);
}
.share-title {
    font-family: var(--font-heading);
    font-size: 0.82rem; font-weight: 600;
    color: rgba(161,161,170,0.6); margin-bottom: 16px;
    text-transform: uppercase; letter-spacing: 1px;
}
.share-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.share-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 10px;
    font-size: 0.85rem; font-weight: 500;
    text-decoration: none; transition: all 0.25s;
    border: 1px solid var(--bg-glass-border);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6); cursor: pointer;
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn.twitter:hover {
    background: #1DA1F2; border-color: #1DA1F2; color: white;
}
.share-btn.facebook:hover {
    background: #4267B2; border-color: #4267B2; color: white;
}
.share-btn.copy:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777);
    border-color: #7c3aed; color: white;
}

/* CTA Section */
.cta-section {
    position: relative; overflow: hidden;
    background: rgba(124,58,237,0.06);
    border: 1px solid rgba(124,58,237,0.15);
    border-radius: 24px; padding: 40px 36px;
    margin-top: 48px; text-align: center;
    transition: all 0.35s cubic-bezier(.4,0,.2,1);
}
.cta-section:hover {
    border-color: rgba(124,58,237,0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(124,58,237,0.1);
}
.cta-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 6px 16px; border-radius: 100px; margin-bottom: 20px;
}
.cta-title {
    font-family: var(--font-heading);
    font-size: 1.6rem; font-weight: 800;
    color: #f4f4f5; margin-bottom: 12px; line-height: 1.3;
}
.cta-text {
    color: rgba(161,161,170,0.8); font-size: 1rem;
    line-height: 1.6; max-width: 600px;
    margin: 0 auto 24px;
}
.cta-features {
    display: flex; justify-content: center;
    gap: 12px; flex-wrap: wrap; margin-bottom: 28px;
}
.cta-feature {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.04);
    padding: 10px 18px; border-radius: 12px;
    font-size: 0.88rem; font-weight: 600;
    color: rgba(255,255,255,0.8);
    border: 1px solid var(--bg-glass-border);
}
.cta-feature svg {
    width: 18px; height: 18px; color: #c4b5fd; flex-shrink: 0;
}
.cta-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff; padding: 16px 36px; border-radius: 14px;
    font-family: var(--font-heading);
    font-size: 1.05rem; font-weight: 700;
    text-decoration: none; transition: all 0.3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 4px 20px rgba(124,58,237,0.2);
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124,58,237,0.35);
}
.cta-btn svg { transition: transform 0.3s; }
.cta-btn:hover svg { transform: translateX(4px); }

/* Back to Top */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--bg-glass-border);
    color: rgba(255,255,255,0.5);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; visibility: hidden;
    transition: all 0.25s; z-index: 100;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: white; border-color: #7c3aed;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(124,58,237,0.25);
}
.back-to-top svg { width: 20px; height: 20px; }

/* Responsive */
@media (max-width: 900px) {
    .article-wrapper { grid-template-columns: 1fr; padding: 24px 16px; }
    .article-sidebar { display: none; }
    .article-title { font-size: 1.8rem; }
    .article-content h1 { font-size: 1.6rem; }
    .article-content h2 { font-size: 1.3rem; }
    .article-content { font-size: 1rem; }
    .cta-section { padding: 24px 20px; }
}
@media (max-width: 480px) {
    .article-title { font-size: 1.4rem; }
    .article-meta { font-size: 0.8rem; gap: 12px; }
}
