/* ============================================
   Blog Single Post Styles
   ============================================ */

/* --- Post page needs extra top padding for fixed navbar --- */
body:has(.article-header) .blog-wrapper {
    padding-top: 140px;
}

/* --- Article Header --- */
.article-header {
    margin-bottom: 32px;
}

.article-header__category {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(88, 86, 255, 0.15);
    color: var(--accent-blue);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.article-header__title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 20px;
}

.article-header__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-header__author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-header__author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
}

.article-header__author-name {
    font-weight: 600;
    color: var(--text-main);
}

.article-header__date,
.article-header__reading-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-header__reading-time i {
    color: var(--accent-green);
}

/* --- Featured Image --- */
.article-featured-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid var(--glass-border);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Article Content --- */
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 40px 0 16px;
    color: var(--text-main);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text-main);
}

.article-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 24px 0 10px;
    color: var(--text-main);
}

.article-content p {
    margin-bottom: 18px;
}

.article-content a {
    color: var(--accent-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content a:hover {
    opacity: 0.8;
}

.article-content ul,
.article-content ol {
    margin: 16px 0;
    padding-left: 28px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
    border: 1px solid var(--glass-border);
}

.article-content blockquote {
    border-left: 4px solid var(--accent-green);
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(31, 233, 182, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-muted);
}

.article-content pre {
    background: var(--bg-dark-2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.article-content code {
    background: rgba(31, 233, 182, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent-green);
}

.article-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.article-content th {
    background: var(--bg-dark-2);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 40px 0;
}

/* --- Tags --- */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.article-tags__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 8px;
    display: flex;
    align-items: center;
}

/* --- Share Buttons --- */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.share-buttons__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(31, 233, 182, 0.05);
    transform: translateY(-2px);
}

/* --- Author Bio Card --- */
.author-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    margin-bottom: 40px;
}

.author-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-green);
    flex-shrink: 0;
}

.author-card__info {
    flex: 1;
}

.author-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.author-card__name a {
    color: var(--text-main);
}

.author-card__name a:hover {
    color: var(--accent-green);
}

.author-card__role {
    font-size: 0.8rem;
    color: var(--accent-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.author-card__bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.author-card__social {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.author-card__social a {
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.2s;
}

.author-card__social a:hover {
    color: var(--accent-green);
}

/* --- Related Posts --- */
.related-posts {
    margin-bottom: 40px;
}

.related-posts__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* --- Reading Progress Bar --- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
    z-index: 1001;
    transition: width 0.1s;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .article-header__title {
        font-size: 1.6rem;
    }

    .article-header__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .article-content {
        font-size: 1rem;
    }

    .article-content h2 {
        font-size: 1.3rem;
    }

    .article-content h3 {
        font-size: 1.1rem;
    }

    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-card__social {
        justify-content: center;
    }

    .related-posts__grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-wrap: wrap;
    }
}
