/* ==========================================================================
   RankForge Blog - Individual Article Page Styles
   Editorial magazine-inspired design with exceptional typography
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reading Progress Bar
   -------------------------------------------------------------------------- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 200;
    background: transparent;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent-primary) 0%, var(--color-accent-light) 100%);
    transition: width 50ms ease-out;
}

/* --------------------------------------------------------------------------
   Article Header
   -------------------------------------------------------------------------- */
.article-main {
    padding-top: 80px;
}

.article-header {
    padding: var(--space-16) 0 var(--space-12);
    text-align: center;
    background: linear-gradient(180deg, var(--color-bg-warm) 0%, var(--color-bg-primary) 100%);
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.article-meta .category-tag {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.meta-separator {
    color: var(--color-text-subtle);
    font-weight: 300;
}

.article-meta .read-time {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.article-meta time {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.article-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.article-subtitle {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    max-width: 700px;
    margin: 0 auto var(--space-8);
}

/* Author Block */
.author-block {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.author-avatar-large {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-accent-muted);
}

.author-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details {
    text-align: left;
}

.author-name-large {
    display: block;
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: var(--text-base);
}

.author-role {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.author-social {
    display: flex;
    gap: var(--space-2);
}

.author-social a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.author-social a:hover {
    color: var(--color-accent-primary);
}

/* --------------------------------------------------------------------------
   Hero Image
   -------------------------------------------------------------------------- */
.article-hero-image {
    margin: 0 auto var(--space-12);
    padding: 0 var(--space-6);
    max-width: 1100px;
}

.hero-image-wrapper {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-image-placeholder {
    aspect-ratio: 2/1;
    background: var(--color-accent-muted);
}

.hero-image-placeholder svg {
    width: 100%;
    height: 100%;
}

.article-hero-image figcaption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-4);
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Article Layout with Sidebar
   -------------------------------------------------------------------------- */
.article-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, var(--container-article)) 1fr;
    gap: var(--space-12);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* --------------------------------------------------------------------------
   Table of Contents Sidebar
   -------------------------------------------------------------------------- */
.article-sidebar {
    position: relative;
}

.toc-wrapper {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    max-height: calc(100vh - 120px);
}

.toc-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.toc-nav {
    flex: 1;
    overflow-y: auto;
}

.toc-list {
    counter-reset: toc-counter;
}

.toc-list li {
    counter-increment: toc-counter;
    margin-bottom: var(--space-2);
}

.toc-link {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    padding: var(--space-2) 0;
    padding-left: var(--space-4);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.toc-link:hover {
    color: var(--color-text-secondary);
}

.toc-link.active {
    color: var(--color-accent-primary);
    border-left-color: var(--color-accent-primary);
    font-weight: 500;
}

/* Share Sidebar - Now inside TOC wrapper, not separately sticky */
.share-sidebar {
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.share-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.share-buttons-vertical {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.share-btn:hover {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

/* --------------------------------------------------------------------------
   Article Content - Typography
   -------------------------------------------------------------------------- */
.article-content {
    min-width: 0;
}

.prose {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-text-primary);
}

.prose p {
    margin-bottom: var(--space-6);
}

.prose .lead {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-8);
    font-weight: 400;
}

.prose h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-text-primary);
    margin-top: var(--space-16);
    margin-bottom: var(--space-6);
    line-height: var(--leading-tight);
    scroll-margin-top: 100px;
}

.prose h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    line-height: var(--leading-snug);
}

.prose h4 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.prose ul,
.prose ol {
    margin-bottom: var(--space-6);
    padding-left: var(--space-6);
}

.prose li {
    margin-bottom: var(--space-3);
    padding-left: var(--space-2);
}

.prose ul li {
    list-style-type: disc;
}

.prose ol li {
    list-style-type: decimal;
}

.prose li strong {
    color: var(--color-text-primary);
}

.prose li p {
    margin-bottom: var(--space-2);
    margin-top: var(--space-1);
    font-size: var(--text-base);
    color: var(--color-text-secondary);
}

.prose a {
    color: var(--color-accent-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: all var(--transition-fast);
}

.prose a:hover {
    text-decoration-thickness: 2px;
}

.prose strong {
    font-weight: 600;
    color: var(--color-text-primary);
}

.prose em {
    font-style: italic;
}

.prose code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--color-bg-elevated);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    color: var(--color-accent-primary);
}

/* --------------------------------------------------------------------------
   Callouts
   -------------------------------------------------------------------------- */
.callout {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    margin: var(--space-8) 0;
    border-radius: var(--radius-lg);
    border-left: 4px solid;
}

.callout-insight {
    background: var(--color-accent-soft);
    border-left-color: var(--color-accent-primary);
}

.callout-warning {
    background: rgba(234, 179, 8, 0.1);
    border-left-color: var(--color-warning);
}

.callout-icon {
    flex-shrink: 0;
    color: var(--color-accent-primary);
}

.callout-warning .callout-icon {
    color: var(--color-warning);
}

.callout-content {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
}

.callout-content strong {
    display: block;
    margin-bottom: var(--space-2);
}

/* --------------------------------------------------------------------------
   Stats Grid
   -------------------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin: var(--space-8) 0;
}

.stat-card {
    text-align: center;
    padding: var(--space-6);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-accent-primary);
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Code Block
   -------------------------------------------------------------------------- */
.code-block {
    margin: var(--space-8) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #1e293b;
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-language {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.copy-code {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: #94a3b8;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.copy-code:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.code-block pre {
    padding: var(--space-5);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.code-block code {
    color: #e2e8f0;
    background: none;
    padding: 0;
}

/* --------------------------------------------------------------------------
   Blockquote
   -------------------------------------------------------------------------- */
.prose blockquote {
    margin: var(--space-10) 0;
    padding: var(--space-8);
    background: var(--color-bg-warm);
    border-left: 4px solid var(--color-accent-primary);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.prose blockquote p {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-style: italic;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

.prose blockquote cite {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-style: normal;
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Comparison Table
   -------------------------------------------------------------------------- */
.comparison-table {
    margin: var(--space-8) 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
}

.comparison-table th,
.comparison-table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
    font-weight: 600;
    color: var(--color-text-primary);
    background: var(--color-bg-elevated);
}

.comparison-table th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.comparison-table th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.comparison-table td {
    color: var(--color-text-secondary);
}

.comparison-table tr:hover td {
    background: var(--color-bg-warm);
}

/* --------------------------------------------------------------------------
   Article Figure
   -------------------------------------------------------------------------- */
.article-figure {
    margin: var(--space-10) 0;
}

.figure-placeholder {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.figure-placeholder svg {
    width: 100%;
    height: auto;
}

.article-figure figcaption {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-3);
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Tools Grid
   -------------------------------------------------------------------------- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin: var(--space-8) 0;
}

.tool-card {
    padding: var(--space-5);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.tool-card:hover {
    border-color: var(--color-accent-primary);
    box-shadow: var(--shadow-md);
}

.tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-accent-soft);
    border-radius: var(--radius-md);
    color: var(--color-accent-primary);
    margin-bottom: var(--space-3);
}

.tool-card h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.tool-card p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
    line-height: 1.5;
}

.tool-tag {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    background: var(--color-accent-muted);
    color: var(--color-accent-primary);
    border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Article CTA
   -------------------------------------------------------------------------- */
.article-cta {
    margin: var(--space-12) 0;
    padding: var(--space-8);
    background: linear-gradient(135deg, var(--color-accent-soft) 0%, var(--color-bg-card) 100%);
    border: 1px solid var(--color-accent-muted);
    border-radius: var(--radius-xl);
    text-align: center;
}

.article-cta h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
    margin-top: 0;
}

.article-cta p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-5);
    font-size: var(--text-base);
}

/* --------------------------------------------------------------------------
   Article Tags
   -------------------------------------------------------------------------- */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-8) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-12);
}

.tags-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    margin-right: var(--space-2);
}

.tag {
    padding: var(--space-1) var(--space-3);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

/* --------------------------------------------------------------------------
   Share Section
   -------------------------------------------------------------------------- */
.share-section {
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--color-border);
}

.share-section .share-label {
    text-align: center;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.share-btn-large {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-base);
}

.share-btn-large:hover {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

/* --------------------------------------------------------------------------
   Author Bio Section
   -------------------------------------------------------------------------- */
.author-bio-section {
    padding: var(--space-16) 0;
    background: var(--color-bg-warm);
}

.author-bio-card {
    display: flex;
    gap: var(--space-8);
    padding: var(--space-8);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.author-bio-avatar {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-accent-muted);
}

.author-bio-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-bio-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.author-bio-role {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-accent-primary);
    margin-bottom: var(--space-3);
}

.author-bio-text {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.author-bio-social {
    display: flex;
    gap: var(--space-4);
}

.author-social-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.author-social-link:hover {
    color: var(--color-accent-primary);
}

/* --------------------------------------------------------------------------
   Related Posts
   -------------------------------------------------------------------------- */
.related-posts {
    padding: var(--space-16) 0;
    background: var(--color-bg-primary);
}

.related-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-10);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.related-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent-primary);
}

.related-image {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.related-image .image-placeholder {
    width: 100%;
    height: 100%;
    transition: transform var(--transition-slow);
}

.related-card:hover .related-image .image-placeholder {
    transform: scale(1.05);
}

.related-content {
    padding: var(--space-5);
}

.related-content .category-tag {
    margin-bottom: var(--space-3);
}

.related-content h3 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: var(--leading-snug);
    margin-bottom: var(--space-3);
}

.related-content h3 a:hover {
    color: var(--color-accent-primary);
}

.related-meta {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Comments Section
   -------------------------------------------------------------------------- */
.comments-section {
    padding: var(--space-16) 0;
    background: var(--color-bg-warm);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
}

.comments-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
}

.comment-count {
    font-weight: 400;
    color: var(--color-text-muted);
}

/* Comment Form */
.comment-form {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--color-border);
}

.comment-form-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--color-bg-elevated);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.comment-form-input {
    flex: 1;
}

.comment-form textarea {
    width: 100%;
    padding: var(--space-4);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    color: var(--color-text-primary);
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent-primary);
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-3);
}

.markdown-hint {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.comment {
    display: flex;
    gap: var(--space-4);
}

.comment-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.comment-author {
    font-weight: 600;
    color: var(--color-text-primary);
}

.comment-badge {
    padding: 2px var(--space-2);
    background: var(--color-accent-muted);
    color: var(--color-accent-primary);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.comment-date {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.comment-body {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
}

.comment-body p {
    margin: 0;
}

.comment-actions {
    display: flex;
    gap: var(--space-4);
}

.comment-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.comment-action:hover {
    color: var(--color-accent-primary);
}

/* Comment Reply */
.comment-reply {
    margin-top: var(--space-6);
    margin-left: var(--space-8);
    padding-left: var(--space-6);
    border-left: 2px solid var(--color-border);
}

.comment-reply .comment-avatar {
    width: 40px;
    height: 40px;
}

/* Load More Comments */
.load-more-comments {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    margin-top: var(--space-8);
    padding: var(--space-4);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-base);
}

.load-more-comments:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

/* --------------------------------------------------------------------------
   Newsletter CTA
   -------------------------------------------------------------------------- */
.newsletter-cta {
    padding: var(--space-16) 0;
    background: var(--color-bg-primary);
}

.newsletter-cta-card {
    text-align: center;
    padding: var(--space-12);
    background: linear-gradient(135deg, var(--color-accent-soft) 0%, var(--color-bg-card) 100%);
    border: 1px solid var(--color-accent-muted);
    border-radius: var(--radius-xl);
}

.newsletter-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--color-bg-card);
    border-radius: 50%;
    color: var(--color-accent-primary);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-md);
}

.newsletter-cta h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.newsletter-cta p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

.newsletter-cta-form {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    max-width: 420px;
    margin: 0 auto var(--space-3);
}

.newsletter-cta-form input {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
}

.newsletter-cta-form input:focus {
    outline: none;
    border-color: var(--color-accent-primary);
}

.newsletter-cta-note {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .article-sidebar {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: var(--space-12) 0 var(--space-8);
    }

    .article-title {
        font-size: var(--text-3xl);
    }

    .article-subtitle {
        font-size: var(--text-lg);
    }

    .author-block {
        flex-direction: column;
        text-align: center;
        padding: var(--space-5);
    }

    .author-details {
        text-align: center;
    }

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

    .prose {
        font-size: var(--text-base);
    }

    .prose h2 {
        font-size: var(--text-2xl);
    }

    .prose h3 {
        font-size: var(--text-lg);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: var(--space-4);
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .callout {
        flex-direction: column;
        gap: var(--space-3);
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn-large {
        justify-content: center;
    }

    .author-bio-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-6);
    }

    .author-bio-avatar {
        margin: 0 auto;
    }

    .author-bio-social {
        justify-content: center;
    }

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

    .comments-header {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .comment-form {
        flex-direction: column;
    }

    .comment-form-avatar {
        display: none;
    }

    .comment-reply {
        margin-left: 0;
        padding-left: var(--space-4);
    }

    .newsletter-cta-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .article-meta {
        flex-direction: column;
        gap: var(--space-2);
    }

    .meta-separator {
        display: none;
    }

    .code-block pre {
        font-size: var(--text-xs);
    }

    .comparison-table {
        font-size: var(--text-sm);
    }

    .comparison-table th,
    .comparison-table td {
        padding: var(--space-2);
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .nav-header,
    .reading-progress,
    .article-sidebar,
    .share-section,
    .author-bio-section,
    .related-posts,
    .comments-section,
    .newsletter-cta,
    .footer {
        display: none !important;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .prose {
        font-size: 12pt;
    }

    .prose h2 {
        page-break-after: avoid;
    }

    .code-block {
        border: 1px solid #ccc;
        background: #f5f5f5;
    }
}
