/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
}

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

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

a:hover {
    text-decoration: underline;
}

/* Header and Navigation */
header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    text-decoration: none;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 3rem;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.feature h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature p {
    color: var(--text-light);
}

/* Book preview and latest posts */
.book-preview,
.latest-posts {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.book-preview h2,
.latest-posts h2 {
    margin-bottom: 1rem;
}

.book-preview p,
.latest-posts p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

footer p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Blog styles */
.blog-list {
    list-style: none;
}

.blog-post-preview {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.blog-post-preview h2 {
    margin-bottom: 0.5rem;
}

.blog-post-preview h2 a {
    color: var(--text-color);
}

.blog-post-preview h2 a:hover {
    color: var(--primary-color);
}

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

.blog-post-preview p {
    color: var(--text-light);
}

/* Individual blog post */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post h1 {
    margin-bottom: 0.5rem;
}

.blog-post .post-meta {
    margin-bottom: 2rem;
}

.blog-post-content {
    line-height: 1.8;
}

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

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

.blog-post-content code {
    background: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
}

.blog-post-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

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

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

.about-content h1 {
    margin-bottom: 2rem;
}

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

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* Page header */
.page-header {
    text-align: center;
    padding: 2rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

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