.article-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}

.article-content {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.article-content .lead-text {
    font-size: 18px;
    line-height: 2.2;
    color: var(--ink);
    font-weight: 600;
    border-right: 4px solid var(--teal);
    padding-right: 20px;
    margin-bottom: 32px;
}

.article-content h2 {
    font-size: 24px;
    font-weight: 900;
    color: var(--ink);
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-soft);
    scroll-margin-top: 100px;
}

.article-content p {
    font-size: 15.5px;
    line-height: 2.2;
    color: var(--muted);
    margin-bottom: 20px;
}

.article-content ul {
    margin-bottom: 24px;
}

.article-quote {
    background: var(--bg-soft);
    border-right: 4px solid var(--gold);
    padding: 24px 28px;
    border-radius: 0 16px 16px 0;
    margin: 32px 0;
    font-style: italic;
    color: var(--ink);
    font-weight: 600;
}

.article-quote footer {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 800;
    color: var(--teal-deep);
    font-style: normal;
}

.article-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-soft);
    color: var(--muted);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--teal);
    color: #fff;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
}

.article-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--ink);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-soft);
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list a {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    padding: 10px 14px;
    border-radius: 10px;
    border-right: 2px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.toc-list a:hover,
.toc-list a.active {
    background: rgba(46, 196, 182, 0.08);
    color: var(--teal-deep);
    border-right-color: var(--teal);
}

html[data-theme="dark"] .toc-list a:hover,
html[data-theme="dark"] .toc-list a.active {
    color: var(--teal-bright);
}

.author-widget {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--primary));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 18px;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 16px;
    font-weight: 900;
    color: var(--ink);
    margin-bottom: 2px;
    margin-top: 0;
}

.author-info span {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 8px;
}

.author-info p {
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
    margin: 0;
}

.related-post {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.related-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-post img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.related-post h4 {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 6px;
    margin-top: 0;
}

.related-post h4 a {
    color: var(--ink);
    transition: color 0.2s;
    text-decoration: none;
}

.related-post h4 a:hover {
    color: var(--teal);
}

.related-post span {
    font-size: 12px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cta-widget {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border: none;
    color: #fff;
    text-align: center;
}

.cta-widget .widget-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.cta-widget p {
    font-size: 13.5px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.article-meta-hero {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    flex-wrap: wrap;
}

.article-meta-hero span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        order: 2;
    }

    .article-content {
        order: 1;
        padding: 28px 24px;
    }
}

@media (max-width: 640px) {
    .article-meta-hero {
        flex-direction: column;
        gap: 8px;
    }

    .related-post {
        flex-direction: column;
    }

    .related-post img {
        width: 100%;
        height: 160px;
    }
}