/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #f8f9fa;
    --surface: #ffffff;
    --text: #1a1a2e;
    --text-muted: #6c757d;
    --accent: #0f4c81;
    --accent-light: #e8f0fe;
    --border: #dee2e6;
    --header-bg: #0f1923;
    --header-accent: #4dabf7;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    font-size: 16px;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--header-accent); }
img { max-width: 100%; height: auto; }

/* === Header === */
.site-header {
    background: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
}
.logo:hover { color: var(--header-accent); }
.logo-icon { font-size: 1.5rem; color: var(--header-accent); }

.header-nav {
    display: flex;
    gap: 2rem;
}
.header-nav a {
    color: #ced4da;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.header-nav a:hover {
    color: #fff;
    border-bottom-color: var(--header-accent);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* === Main Layout === */
.site-main {
    min-height: calc(100vh - 64px - 300px);
}

.main-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* === Hero === */
.hero {
    background: linear-gradient(135deg, var(--accent) 0%, #1a237e 100%);
    color: #fff;
    padding: 3rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}
.hero h1 {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.page-title {
    font-family: 'Merriweather', serif;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent);
}

/* === Article Cards === */
.article-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-category span {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.card-title {
    font-family: 'Merriweather', serif;
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent); }

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.card-meta time,
.card-source {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.card-summary {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

/* === Single Article === */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.article-categories a {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.article-full h1 {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.article-meta time,
.meta-source {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.article-content {
    font-family: 'Merriweather', serif;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #2d3436;
}
.article-content p { margin-bottom: 1.25rem; }
.article-content a { color: var(--accent); border-bottom: 1px solid var(--accent-light); }
.article-content a:hover { border-bottom-color: var(--accent); }
.article-content strong { color: var(--text); }
.article-content blockquote {
    border-left: 4px solid var(--accent);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* === Article Footer === */
.article-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.share-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.share-section span {
    font-weight: 600;
    font-size: 0.9rem;
}
.share-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.2s;
}
.share-btn:hover { background: #d0e2f7; color: var(--accent); }

/* === Post Navigation === */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}
.post-nav-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: box-shadow 0.2s;
}
.post-nav-item:hover { box-shadow: var(--shadow-lg); }
.post-nav-item.next { text-align: right; }
.post-nav-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.post-nav-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

/* === Sidebar === */
.sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

.tag-list, .recent-list {
    list-style: none;
}
.tag-list li a,
.recent-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px solid #f1f3f5;
}
.tag-list li a:hover,
.recent-list li a:hover { color: var(--accent); }
.tag-list .count {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}

.recent-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f5;
}
.recent-list li:last-child { border-bottom: none; }
.recent-list li a {
    display: block;
    font-size: 0.85rem;
    line-height: 1.4;
    border-bottom: none;
    padding: 0;
}
.recent-list time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* === Ads === */
.ad-slot { margin: 2rem 0; text-align: center; }

/* === Pagination === */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text);
    background: var(--surface);
    text-decoration: none;
    transition: all 0.2s;
}
a.page-link:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.pagination .page-link.current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* === Footer === */
.site-footer {
    background: var(--header-bg);
    color: #adb5bd;
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #2d3748;
}

.footer-col h4 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.footer-col p {
    font-size: 0.85rem;
    line-height: 1.6;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul a {
    color: #adb5bd;
    font-size: 0.85rem;
}
.footer-col ul a:hover { color: var(--header-accent); }

.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
}

/* === Responsive === */
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .header-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--header-bg);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0.5rem;
        border-top: 1px solid #2d3748;
    }
    .header-nav.open { display: flex; }
    .nav-toggle { display: block; }
    .hero { padding: 2rem 1.5rem; }
    .hero h1 { font-size: 1.5rem; }
    .article-full h1 { font-size: 1.5rem; }
    .post-nav { grid-template-columns: 1fr; }
}
