/* CSS Variables for Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --accent-color: #8b7355;
    --card-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --border-color: #404040;
    --accent-color: #b8956a;
    --card-bg: #252525;
}

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

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

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

/* Header Styles */
.header {
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.search-theme-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.theme-toggle {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 1.25rem;
}

.header-center {
    text-align: center;
    margin-bottom: 1.5rem;
}

.site-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.site-subtitle {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
}

.nav a {
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

/* Main Content */
.main-content {
    padding: 3rem 0;
}

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

.section-title {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Blog Card Styles */
.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-card.featured {
    border: 2px solid var(--accent-color);
}

.post-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.category {
    color: var(--accent-color);
    font-weight: 600;
}

.post-title {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

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

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

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.post-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Sidebar Styles */
.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.sidebar-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
}

.sidebar-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.sidebar-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.875rem;
}

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

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.category-list a:hover {
    color: var(--accent-color);
}

.category-list span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.newsletter-form button {
    padding: 0.75rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.newsletter-form button:hover {
    opacity: 0.9;
}

/* Footer Styles */
.footer {
    margin-top: 4rem;
}

.newsletter-section {
    background: var(--bg-secondary);
    padding: 3rem 0;
    text-align: center;
}

.newsletter-section h3 {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.newsletter-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.newsletter-form-footer {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form-footer input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-primary);
}

.newsletter-form-footer button {
    padding: 0.75rem 2rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.footer-content {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    background: var(--bg-secondary);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-title {
    font-family: Georgia, serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--accent-color);
}

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

.footer-quote p {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* About Page Styles */
.about-page {
    max-width: 800px;
    padding: 3rem 1.5rem;
}

.about-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3rem;
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
}

.about-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    display: block;
}

.about-name {
    font-family: Georgia, serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.about-bio {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.about-body {
    border-top: 1px solid var(--border-color);
    padding-top: 2.5rem;
}

.about-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-body h2 {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.contact-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.contact-section h2 {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.email-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.125rem;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }
    
    .nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .footer-grid {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .newsletter-form-footer {
        flex-direction: column;
    }
    
    .about-content {
        padding: 2rem 1.5rem;
    }
}
