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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --code-bg: #f4f4f4;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    padding: 1rem 0;
}

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

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.logo .subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    opacity: 0.7;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
}

.intro {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    border-left: 4px solid var(--secondary-color);
}

.intro h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.intro p {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Category Cards */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.card-icon {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.category-card > p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.topics {
    list-style: none;
    margin: 1.5rem 0;
}

.topics li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
}

.topics li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.btn:hover {
    background-color: #2980b9;
}

/* Recent Posts */
.recent-posts {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
}

.recent-posts h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.post-item {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.post-meta .date {
    color: #666;
}

.post-meta .tag {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

.post-item h4 {
    margin-bottom: 0.5rem;
}

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

.post-item h4 a:hover {
    color: var(--secondary-color);
}

.post-item p {
    color: #666;
    line-height: 1.6;
}

/* Article Styles */
.article-header {
    background-color: var(--light-bg);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.article-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.article-meta {
    color: #666;
    font-size: 0.95rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.article-section {
    margin-bottom: 3rem;
}

.article-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.5rem;
}

.article-section h4 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
}

.article-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-section ul,
.article-section ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.article-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Code Blocks */
pre {
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.5;
}

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

p code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.note {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.note strong {
    color: #856404;
}

.warning {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu {
        margin-top: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .categories {
        grid-template-columns: 1fr;
    }

    .article-content {
        padding: 1rem;
    }
}