/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e1e5e9;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #2563eb;
}

/* Main content */
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Article styles */
.article {
    background: #fff;
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #3b82f6, #6366f1);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    color: #64748b;
    font-size: 0.95rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-summary {
    font-size: 1.2rem;
    color: #475569;
    margin-bottom: 2.5rem;
    font-style: italic;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 5px solid #2563eb;
    border-radius: 0 12px 12px 0;
    position: relative;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

.article-summary::before {
    content: '"';
    font-size: 4rem;
    color: #cbd5e1;
    position: absolute;
    top: -10px;
    left: 1rem;
    font-family: serif;
    line-height: 1;
}

.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
}

.article-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    color: #1e293b;
}

.article-content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem 0;
    color: #1e293b;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul, .article-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Long-form journalism styles */
.article-content {
    max-width: none;
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.8;
    position: relative;
}

/* Hero image styles */
.article-hero-image {
    width: 100%;
    max-width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 0 2rem 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.article-hero-image:hover {
    transform: scale(1.02);
}

/* Embedded images within content */
.article-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.article-image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-style: italic;
    line-height: 1.4;
}

.article-image-attribution {
    font-size: 0.8rem;
    color: #9ca3af;
    display: block;
    margin-top: 0.25rem;
}

.article-image-attribution a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.article-image-attribution a:hover {
    text-decoration: underline;
}

.article-content > h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #0f172a;
    position: relative;
    padding-bottom: 1rem;
}

.article-content > h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
}

.article-content > h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem 0;
    color: #1e293b;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.article-content > h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: #2563eb;
    border-radius: 1px;
}

.article-content > h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #1e293b;
}

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

.article-content > p:first-of-type {
    font-size: 1.3rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    padding-left: 1rem;
    border-left: 3px solid #e2e8f0;
    position: relative;
}

.article-content > p:first-of-type::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    width: 3px;
    height: 30px;
    background: #2563eb;
    border-radius: 2px;
}

/* Source footer styling */
.article-content hr {
    margin: 3rem 0 2rem 0;
    border: none;
    border-top: 1px solid #d1d5db;
}

.article-content > h3:has(+ p:contains("This analysis")) {
    font-size: 1.125rem;
    font-weight: 500;
    color: #6b7280;
    margin: 1.5rem 0 1rem 0;
    border-bottom: none;
}

/* Source reference links */
.article-content ul li a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.article-content ul li a:hover {
    text-decoration: underline;
}

/* Visual enhancements */
.article-content strong {
    background: linear-gradient(120deg, transparent 0%, rgba(37, 99, 235, 0.1) 50%, transparent 100%);
    padding: 0 0.25rem;
    border-radius: 3px;
}

/* Article metadata notes */
.article-meta-note {
    font-size: 0.95rem;
    color: #6b7280;
    font-style: italic;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-left: 3px solid #d1d5db;
    border-radius: 0 6px 6px 0;
}

/* Long-form content improvements */
.article-content strong {
    font-weight: 600;
    color: #1f2937;
}

.article-content em {
    font-style: italic;
    color: #374151;
}

.article-content code {
    background: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 0.9em;
}

.article-content blockquote {
    border-left: 4px solid #e5e7eb;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    font-style: italic;
}

/* Article quote blocks */
.article-quote {
    border: none;
    border-left: 5px solid #2563eb;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
    position: relative;
    font-size: 1.1rem;
    line-height: 1.6;
}

.article-quote::before {
    content: '"';
    font-size: 4rem;
    color: #cbd5e1;
    position: absolute;
    top: -10px;
    left: 1rem;
    font-family: serif;
    line-height: 1;
}

.article-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #64748b;
    font-style: normal;
    font-weight: 500;
}

.article-quote cite a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.article-quote cite a:hover {
    text-decoration: underline;
}

/* Inline article quotes - similar to article-summary */
.article-inline-quote {
    font-size: 1.15rem;
    color: #475569;
    margin: 2rem 0;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    position: relative;
    font-style: italic;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    line-height: 1.7;
}

.article-inline-quote::before {
    content: '💬';
    position: absolute;
    top: -5px;
    left: -15px;
    font-size: 1.5rem;
    background: #fff;
    border-radius: 50%;
    padding: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Key insight boxes */
.article-insight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 1.25rem 1.75rem;
    margin: 2rem 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.article-insight::before {
    content: '💡';
    position: absolute;
    top: -5px;
    left: -15px;
    font-size: 1.5rem;
    background: #fff;
    border-radius: 50%;
    padding: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-insight h4 {
    color: #92400e;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.article-insight p {
    color: #78350f;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Warning/alert boxes */
.article-alert {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-left: 4px solid #ef4444;
    border-radius: 0 8px 8px 0;
    padding: 1.25rem 1.75rem;
    margin: 2rem 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.article-alert::before {
    content: '⚠️';
    position: absolute;
    top: -5px;
    left: -15px;
    font-size: 1.5rem;
    background: #fff;
    border-radius: 50%;
    padding: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-alert h4 {
    color: #991b1b;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.article-alert p {
    color: #7f1d1d;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Success/positive insight boxes */
.article-success {
    background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%);
    border-left: 4px solid #10b981;
    border-radius: 0 8px 8px 0;
    padding: 1.25rem 1.75rem;
    margin: 2rem 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.article-success::before {
    content: '✅';
    position: absolute;
    top: -5px;
    left: -15px;
    font-size: 1.5rem;
    background: #fff;
    border-radius: 50%;
    padding: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-success h4 {
    color: #065f46;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.article-success p {
    color: #064e3b;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Numbered lists styling */
.article-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-content ol li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* Better paragraph spacing for long-form content */
.article-content p + p {
    margin-top: 1.25rem;
}

.article-content h2 + p,
.article-content h3 + p,
.article-content h4 + p {
    margin-top: 0.75rem;
}

/* Social media embeds */
.social-embed {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #f8fafc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.social-header {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.social-header a {
    color: #2563eb;
    text-decoration: none;
}

.social-header a:hover {
    text-decoration: underline;
}

.social-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.social-content p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.social-footer {
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.tag {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    transition: left 0.3s ease;
    z-index: -1;
}

.tag:hover {
    color: white;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.tag:hover::before {
    left: 0;
}

/* Post list */
.post-list {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e1e5e9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-card-title a {
    color: #1e293b;
    text-decoration: none;
}

.post-card-title a:hover {
    color: #2563eb;
}

.post-card-summary {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-card-meta {
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Layout Container for Sidebar */
.layout-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.main-content {
    min-width: 0;
}

/* Hero section styles */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-image {
    margin-bottom: 2rem;
}

.hero-banner {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.hero-banner:hover {
    transform: scale(1.02);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.sidebar {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Archive Navigation */
.archive-navigation {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.year-section {
    margin-bottom: 0.5rem;
}

.year-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.year-toggle:hover {
    background: #e2e8f0;
}

.year-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.toggle-icon {
    font-size: 0.8rem;
    color: #64748b;
    transition: transform 0.2s ease;
}

.year-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.month-list {
    padding-left: 1rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.month-link {
    color: #64748b;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: block;
}

.month-link:hover {
    background: #e2e8f0;
    color: #2563eb;
    text-decoration: none;
}

.month-info {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    height: 2.5rem;
}

.pagination-btn:hover:not(.disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
    text-decoration: none;
}

.pagination-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.pagination-btn.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

/* Archive Pages */
.archive-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.archive-hero h1 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.archive-hero p {
    color: #64748b;
    margin-bottom: 0.5rem;
}

.archive-hero a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.archive-hero a:hover {
    text-decoration: underline;
}

.archive-post-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.archive-post-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.archive-post-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.archive-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.archive-post-title a {
    color: #1e293b;
    text-decoration: none;
}

.archive-post-title a:hover {
    color: #2563eb;
}

.archive-post-summary {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.archive-post-meta {
    font-size: 0.8rem;
    color: #9ca3af;
}

.page-info {
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
    margin: 0.5rem 0;
    font-style: italic;
}

/* Empty Month Message */
.empty-month-message {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    margin: 2rem 0;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.empty-month-message h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-month-message p {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-month-message a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.empty-month-message a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* Responsive design */
@media (max-width: 1024px) {
    .layout-container {
        grid-template-columns: 1fr 250px;
        gap: 2rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 2.2rem;
    }
    
    .article-hero-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .layout-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar {
        order: -1;
        position: static;
        margin-bottom: 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.125rem;
    }

    .hero-banner {
        max-width: 100%;
        border-radius: 8px;
    }

    .article {
        padding: 2rem 1.5rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-hero-image {
        height: 250px;
        margin-bottom: 1.5rem;
    }
    
    .article-summary {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
        min-width: 2rem;
        height: 2rem;
    }
}