:root {
    --text: #1a1a1a;
    --text-muted: #666;
    --bg: #ffffff;
    --bg-alt: #f8f8f8;
    --border: #e0e0e0;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
}

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

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

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

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
    margin-bottom: 48px;
}

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

header h1 {
    font-size: 24px;
    font-weight: 700;
}

header h1 a {
    color: var(--text);
    text-decoration: none;
}

header nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 24px;
    font-size: 15px;
}

header nav a:hover {
    color: var(--text);
}

/* Hero */
.hero {
    margin-bottom: 60px;
}

.hero h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
}

/* Featured Section */
.featured {
    margin-bottom: 60px;
}

.featured h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.article-card {
    display: block;
    padding: 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* About Section */
.about {
    margin-bottom: 60px;
    padding: 32px;
    background: var(--bg-alt);
    border-radius: 8px;
}

.about h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.about p {
    margin-bottom: 16px;
}

.about ul {
    margin-left: 20px;
    margin-top: 8px;
}

.about li {
    margin-bottom: 8px;
}

.about a {
    color: var(--accent);
    text-decoration: none;
}

.about a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 60px;
}

footer p {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

/* Blog Post Styles */
.post-header {
    margin-bottom: 48px;
}

.post-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.post-meta {
    font-size: 14px;
    color: var(--text-muted);
}

.post-content {
    margin-bottom: 60px;
}

.post-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 36px 0 16px;
}

.post-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 12px;
}

.post-content p {
    margin-bottom: 16px;
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content ul,
.post-content ol {
    margin: 16px 0 16px 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.post-content th,
.post-content td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--bg-alt);
    font-weight: 600;
}

.post-content code {
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Courier New', monospace;
}

.post-content pre {
    background: var(--bg-alt);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Blog Index */
.blog-posts {
    margin-bottom: 60px;
}

.blog-post-item {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

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

.blog-post-item h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-post-item h2 a {
    color: var(--text);
    text-decoration: none;
}

.blog-post-item h2 a:hover {
    color: var(--accent);
}

.blog-post-item .meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.blog-post-item .excerpt {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
}

@media (max-width: 640px) {
    .hero h2 {
        font-size: 28px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    header nav {
        margin-top: 16px;
    }
    
    header nav a {
        margin-left: 0;
        margin-right: 20px;
    }
}
