/* Blog Template - Modern, Clean Design */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --background: #ffffff;
    --background-alt: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --text-color: #f9fafb;
    --text-light: #d1d5db;
    --background: #111827;
    --background-alt: #1f2937;
    --border-color: #374151;
}

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

html {
    scroll-behavior: smooth;
}

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

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

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 60px;
    padding: 80px 20px 40px;
}

h1.site-title {
    font-size: 3.5em;
    color: var(--text-color);
    font-weight: 900;
    letter-spacing: 16px;
    text-transform: lowercase;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Arial Black', sans-serif;
}

h1.site-title a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

h1.site-title a:hover {
    color: var(--primary-color);
}

.site-tagline {
    color: var(--text-light);
    font-size: 1em;
    font-weight: 300;
    letter-spacing: 2px;
}

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

/* Blog Layout */
.blog-container {
    padding: 2rem 2rem 4rem;
    min-height: 70vh;
}

/* Posts List */
.posts-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.post-card {
    background: var(--background);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.post-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

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

.post-title a:hover {
    color: var(--primary-color);
}

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

.post-excerpt {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

.no-posts {
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    padding: 4rem 0;
}

/* Single Post */
.post-container {
    padding: 8rem 2rem 4rem;
}

.post-header {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.post-title-single {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 800;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.post-content h1,
.post-content h2,
.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

.post-content h1 { font-size: 2.5rem; }
.post-content h2 { font-size: 2rem; }
.post-content h3 { font-size: 1.5rem; }

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

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

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

.post-content a:hover {
    color: var(--primary-dark);
}

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

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

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

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

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

.post-footer {
    max-width: 800px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

/* Book Recommendations Section */
.books-section {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: var(--background-alt);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.books-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.books-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

.book-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.book-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.book-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.book-author {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.book-description {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.book-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 3rem auto 0;
    max-width: 800px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    flex: 1;
    padding: 1rem;
    background: var(--background-alt);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-link:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-link.next {
    text-align: right;
}

.nav-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: block;
}

.nav-title {
    font-weight: 500;
    color: var(--text-color);
    font-size: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

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

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}


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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-light);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}


/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        display: none;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
    }
    
    .blog-container,
    .post-container {
        padding: 2rem 1rem 2rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-title-single {
        font-size: 2rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1.site-title {
        font-size: 2.5em;
        letter-spacing: 10px;
        font-weight: 900;
    }
    
    .post-title {
        font-size: 1.25rem;
    }
    
    .post-title-single {
        font-size: 1.75rem;
    }
    
    .post-card {
        padding: 1.5rem;
    }
}

@media (min-width: 769px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

