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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --background: #ffffff;
    --surface: #f9fafb;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

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

/* Navigation */
.navbar {
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

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

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

/* Sections */
section {
    margin-bottom: 4rem;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow);
}

.post-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.post-meta {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: var(--text-color);
    line-height: 1.6;
}

.post-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.post-link:hover {
    text-decoration: underline;
}

/* Blog Header */
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* About Section */
.about-section {
    max-width: 800px;
    margin: 0 auto;
}

.about-content {
    line-height: 1.8;
}

.about-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.about-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.about-content li {
    margin-bottom: 0.5rem;
}

.social-links {
    list-style: none;
    margin-left: 0;
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.social-links a:hover {
    text-decoration: underline;
}

/* Button */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    text-align: center;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1.125rem;
    }

    .nav-menu {
        gap: 1rem;
    }

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

    .container {
        padding: 0 1rem;
    }
}

/* Post Page */
.post-content {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

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

.post-content code {
    background-color: var(--surface);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background-color: var(--surface);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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