/* removed duplicate mobile stacking for .post-card-row, will move to main mobile query below */
/* --- Blog Post Card Row Layout --- */
.post-card-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1.5rem;
}
/* clickable tag labels */
.tag {
    background: #f8f8f8;
    color: #222;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e5e5e5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 6px;
    text-decoration: none;
    cursor: pointer;
}

.tag:hover, .tag:focus {
    background: #e8e8e8;
    border-color: #d0d0d0;
    color: #1a1a1a;
    outline: none;
    text-decoration: none;
    transform: translateY(-1px);
}
/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
    font-size: 16px;
    font-weight: 400;
}

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

/* Site Header */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.site-header h1 {
    margin: 0;
}

.site-header h1 a {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-header h1 a:hover {
    color: #666;
}

.subtitle {
    color: #666;
    font-size: 14px;
    font-weight: 400;
    margin-top: 4px;
}

/* Main Content */
main {
    padding: 48px 0;
    min-height: calc(100vh - 200px);
}

/* Posts Section */
.posts-section {
    margin-bottom: 80px;
}

.section-title {
    color: #1a1a1a;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: #666;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 48px;
    line-height: 1.5;
}

.posts-count {
    color: #999;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Post Cards */
.post-card {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 16px 0;

    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.post-card:hover {
    transform: translateY(-2px);
}

.post-card:last-child {
    border-bottom: none;
}

.post-image-placeholder {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}



.post-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.post-header {
    margin-bottom: 16px;
}

.post-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.post-card:hover .post-title {
    color: #333;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #999;
    margin-bottom: 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 16px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    border: none;
    padding: 0;
}


.tag, .tag:visited, .tag:active, .tag:hover, .tag:focus {
    background: #f8f8f8;
    color: #222;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e5e5e5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    text-decoration: none !important;
    cursor: pointer;
}

.tag:hover, .tag:focus {
    background: #e8e8e8;
    border-color: #d0d0d0;
    color: #1a1a1a;
    outline: none;
    text-decoration: none !important;
    transform: translateY(-1px);
}

/* Individual Post Page */
.post-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 0;
}

.article-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f0f0f0;
}

.article-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #999;
    margin-bottom: 24px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-content {
    line-height: 1.7;
    font-size: 18px;
    color: #1a1a1a;
}

.content-section {
    margin-bottom: 48px;
}

.article-content h2 {
    margin: 48px 0 24px 0;
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.article-content p {
    margin-bottom: 24px;
    line-height: 1.7;
}

/* Sources Section */
.article-sources {
    margin-top: 64px;
    padding: 32px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.article-sources h3 {
    margin-bottom: 20px;
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
}

.sources-list {
    list-style: none;
}

.sources-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.sources-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #999;
    font-weight: 500;
}

.sources-list a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.sources-list a:hover {
    border-bottom-color: #1a1a1a;
}

/* Article Footer */
.article-footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid #f0f0f0;
}

.article-nav {
    margin-bottom: 32px;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.back-to-blog:hover {
    background: #333;
}

.article-share h4 {
    margin-bottom: 16px;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
}

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

.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid #e5e5e5;
    background: white;
    color: #1a1a1a;
}

.share-btn:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #f0f0f0;
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    background: #1a1a1a;
    width: 0%;
    transition: width 0.1s ease;
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: 120px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.error-page h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.error-page p {
    font-size: 18px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.5;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
}

.btn-primary:hover {
    background: #333;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.no-posts h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.no-posts p {
    font-size: 16px;
    color: #999;
}

/* Site Footer */
.site-footer {
    background: #f8f8f8;
    border-top: 1px solid #e5e5e5;
    padding: 48px 0;
    text-align: center;
    margin-top: 80px;
}

.site-footer p {
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}

.site-footer a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

.site-footer a:hover {
    color: #1a1a1a;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .site-header {
        padding: 16px 0;
    }
    
    .site-header h1 a {
        font-size: 20px;
    }
    
    main {
        padding: 32px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .posts-grid {
        gap: 12px;
    }

    .post-card-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-card {
        width: 100%;
        display: block;
        gap: 0;
        padding: 8px 0;
    }
    .post-image-placeholder {
        width: 100%;
        margin-bottom: 12px;
        height: 180px;
    }
    
    .post-title {
        font-size: 20px;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-content {
        font-size: 16px;
    }
    
    .article-content h2 {
        font-size: 24px;
        margin: 32px 0 16px 0;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .error-page h1 {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}


.sources-inline {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.sources-inline a {
    color: #1a1a1a;
    text-decoration: underline;
    font-weight: 500;
}

.sources-inline a:hover {
    color: #666;
}
