/* ================== ARTICLE PAGE STYLES ================== */

/* Article Header Section */
.article-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 120px 0 60px;
    border-bottom: 1px solid #334155;
    position: relative;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.breadcrumb a {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #0ea5e9;
}

.breadcrumb .separator {
    color: #64748b;
}

.article-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #00d4ff, #0ea5e9);
    color: #0f172a;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.article-main-title {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    color: #f8fafc;
    margin-bottom: 20px;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.article-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 700px;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.article-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 1.125rem;
    color: #f8fafc;
}

.author-title {
    font-size: 0.875rem;
    color: #94a3b8;
}

.article-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #94a3b8;
}

.stat-item i {
    color: #64748b;
}

/* Article Layout */
.article-main {
    padding: 60px 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    align-items: start;
}

/* Article Body Styles */
.article-body {
    background: #1e293b;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid #334155;
}

.article-featured-image {
    margin: -40px -40px 40px -40px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.image-caption {
    padding: 15px 20px;
    background: #0f172a;
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: italic;
    border-bottom: 1px solid #334155;
}

/* Typography for Article Content */
.article-intro {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #334155;
}

.lead-paragraph {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #cbd5e1;
    font-weight: 400;
    margin-bottom: 0;
}

.article-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.article-text h2 {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #00d4ff;
    position: relative;
}

.article-text h2:first-of-type {
    margin-top: 0;
}

.article-text h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 2.5rem 0 1rem 0;
}

.article-text h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 2rem 0 1rem 0;
}

.article-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-text strong {
    font-weight: 700;
    color: #f8fafc;
}

.article-text em {
    font-style: italic;
    color: #94a3b8;
}

/* Article Lists */
.article-list {
    margin: 2rem 0;
    padding-left: 0;
    list-style: none;
}

.article-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.7;
}

.article-list li::before {
    content: "▪";
    position: absolute;
    left: 0;
    color: #00d4ff;
    font-size: 1.5rem;
    line-height: 1;
}

/* Blockquote Styles */
.article-quote {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-left: 4px solid #00d4ff;
    border-radius: 0 8px 8px 0;
    position: relative;
    border: 1px solid #334155;
}

.article-quote::before {
    content: """;
    font-size: 4rem;
    color: #00d4ff;
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: Georgia, serif;
}

.article-quote p {
    font-size: 1.25rem;
    font-style: italic;
    margin-bottom: 1rem;
    color: #e2e8f0;
    font-weight: 400;
    padding-left: 2rem;
}

.article-quote cite {
    display: block;
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: normal;
    font-weight: 600;
    text-align: right;
    margin-top: 1rem;
}

.article-quote cite::before {
    content: "— ";
}

/* Code Example Styles */
.code-example {
    margin: 2rem 0;
    background: #0c1420;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
}

.code-example h4 {
    background: #1e293b;
    color: #f8fafc;
    padding: 1rem;
    margin: 0 0 0 0;
    border-bottom: 1px solid #334155;
    font-size: 1rem;
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0;
}

.code-example code {
    background: transparent;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Info Boxes */
.info-box, .warning-box {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
    border: 1px solid #334155;
}

.info-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-left-color: #00d4ff;
}

.warning-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-left-color: #f59e0b;
}

.info-box-header, .warning-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.info-box-header h4, .warning-box-header h4 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
}

.info-box-header i {
    color: #00d4ff;
}

.warning-box-header i {
    color: #f59e0b;
}

.info-box p, .warning-box p {
    margin: 0;
    color: #cbd5e1;
}

/* Article Tags */
.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #334155;
}

.article-tags h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #334155;
    color: #cbd5e1;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #475569;
}

.tag:hover {
    background: linear-gradient(135deg, #00d4ff, #0ea5e9);
    color: #0f172a;
    transform: translateY(-1px);
}

/* Article Share */
.article-share {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #334155;
}

.article-share h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid #475569;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-btn.reddit {
    background: #ff4500;
    color: white;
    border-color: #ff4500;
}

.share-btn.hacker-news {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Sidebar Styles - REMOVED STICKY POSITION */
.article-sidebar {
    /* Remove sticky positioning to allow normal scrolling */
    position: static;
    height: auto;
}

.sidebar-widget {
    background: #1e293b;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid #334155;
}

.widget-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #334155;
}

/* Author Card */
.author-card {
    text-align: center;
}

.author-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #334155;
}

.author-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #f8fafc;
}

.author-bio {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 15px;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.author-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.3s ease;
    border: 1px solid #475569;
}

.author-social a:hover {
    background: linear-gradient(135deg, #00d4ff, #0ea5e9);
    color: #0f172a;
    transform: translateY(-2px);
}

/* Related Articles */
.related-articles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-article {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.related-article img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid #334155;
}

.related-content h4 {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.related-content h4 a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h4 a:hover {
    color: #00d4ff;
}

.related-date {
    font-size: 0.75rem;
    color: #64748b;
}

/* Popular Tags */
.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-tag {
    background: #334155;
    color: #94a3b8;
    padding: 0.375rem 0.75rem;
    border-radius: 16px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #475569;
}

.popular-tag:hover {
    background: linear-gradient(135deg, #00d4ff, #0ea5e9);
    color: #0f172a;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00d4ff, #0ea5e9);
    color: #0f172a;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff, #0ea5e9);
    z-index: 1001;
    transition: width 0.3s ease;
}

/* Code Syntax Highlighting */
pre {
    background: #0c1420;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: transparent;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* Inline code */
code {
    background: #1e293b;
    color: #00d4ff;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}