:root {
    --primary: #1a365d;
    --primary-light: #2d5a8e;
    --accent: #e53e3e;
    --text: #1a202c;
    --text-light: #4a5568;
    --bg: #ffffff;
    --bg-light: #f7fafc;
    --border: #e2e8f0;
    --max-width: 1200px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.main-nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: white;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.hero p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.article-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.2rem;
}

.card-body h3 {
    font-size: 1.1rem;
    margin: 0.4rem 0;
    line-height: 1.4;
}

.card-body h3 a {
    color: var(--text);
    text-decoration: none;
}

.card-body h3 a:hover {
    color: var(--primary);
}

.card-body p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

.meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.category-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.6rem;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Article Single */
.article-single {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin: 0.5rem 0;
    color: var(--primary);
}

.article-excerpt {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.featured-image {
    margin: 0 0 2rem;
}

.featured-image img {
    width: 100%;
    border-radius: 6px;
}

/* Article Content */
.article-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 0.8rem;
    color: var(--primary);
    padding-top: 1rem;
}

.article-content h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.6rem;
}

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

.article-content a {
    color: var(--primary-light);
    text-decoration: underline;
}

.article-content ul, .article-content ol {
    margin: 0 0 1rem 1.5rem;
}

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

.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-light);
    border-radius: 0 6px 6px 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.article-content th {
    background: var(--primary);
    color: white;
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 600;
}

.article-content td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
}

.article-content tr:nth-child(even) {
    background: var(--bg-light);
}

.article-content strong {
    color: var(--text);
}

/* Tags */
.article-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: none;
    margin: 0.2rem;
}

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

/* List page */
.list-page h1 {
    font-size: 1.8rem;
    margin: 2rem 0;
    color: var(--primary);
}

/* Footer */
.site-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
    .main-nav a {
        margin-left: 0.8rem;
        font-size: 0.8rem;
    }
    .hero h1 { font-size: 1.5rem; }
    .article-header h1 { font-size: 1.6rem; }
}
