/* =========================================
   Variables & Theme
   ========================================= */
:root {
    /* Classic Theme Colors */
    --accent-color: #8b5a2b; /* Antique Wood / Bronze */
    --primary-color: #3b2f2f; /* Dark Sepia / Charcoal */
    --secondary-color: #524235; /* Warm Brown */
    --off-white: #f5f2eb; /* Classic Parchment */
    
    /* Typography Colors */
    --text-dark: #2c241b;
    --text-muted: #6e6359;
    --border-color: #d1c7b3;
    
    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--off-white);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
    background-color: #fff;
    border-top: 6px double var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo span {
    color: var(--accent-color);
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
}

.site-nav a {
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.site-nav a:hover {
    color: var(--accent-color);
}

/* =========================================
   Layout Grid
   ========================================= */
.layout-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 50px;
    margin-top: 40px;
    margin-bottom: 60px;
    min-width: 0;
}

/* =========================================
   Rich Text Post Article
   ========================================= */
.post-feed {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

.post-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 25px rgba(0,0,0,0.04);
    min-width: 0;
    overflow-wrap: break-word;
}

.post-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.category {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: 600;
    background-color: var(--off-white);
    padding: 6px 16px;
    border-radius: 30px;
}

.post-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin: 15px 0;
}

.post-meta {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Post Images */
.post-image {
    margin: 10px 0 30px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.post-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 450px;
    object-fit: cover;
}

.rich-text {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-dark);
}

.rich-text p {
    margin-bottom: 25px;
}

/* List Styles inside Articles */
.rich-text ul {
    margin-bottom: 25px;
    padding-left: 30px;
}

.rich-text li {
    margin-bottom: 12px;
}

/* Classic Drop Cap for the first paragraph */
.rich-text > p:first-of-type::first-letter {
    font-size: 3.8rem;
    float: left;
    line-height: 0.8;
    margin-right: 12px;
    color: var(--accent-color);
    font-family: var(--font-heading);
}

.rich-text h2 {
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.rich-text blockquote {
    background-color: #eaddcd; /* Vintage beige */
    border-left: 5px solid var(--accent-color);
    padding: 20px 30px;
    margin: 30px 0;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.rich-text blockquote cite {
    display: block;
    margin-top: 10px;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    font-style: normal;
    color: var(--text-muted);
}

/* Classic Gradient Divider */
hr.classic-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(209, 199, 179, 0), rgba(139, 90, 43, 0.75), rgba(209, 199, 179, 0));
    margin: 40px 0;
}

/* Table Styles */
.classic-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 1rem;
    text-align: left;
}
.classic-table th, .classic-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
}
.classic-table th {
    background-color: var(--off-white);
    font-family: var(--font-heading);
    color: var(--primary-color);
}

/* ASCII Art / Diagram Styles */
.ascii-art {
    background-color: var(--off-white);
    padding: 20px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.95rem;
    color: var(--text-muted);
    overflow-x: auto;
    margin: 30px 0;
    border: 1px dashed var(--border-color);
    max-width: 100%;
}

/* =========================================
   Sidebar Styles
   ========================================= */
.widget {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.04);
}

.widget h3 {
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: inline-block;
}

.popular-posts ul {
    list-style: none;
}

.popular-posts li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
}

.popular-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 30px 0;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: #fff;
    margin-left: 15px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 900px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .post-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .site-nav {
        display: none;
        width: 100%;
        margin-top: 15px;
    }
    .site-nav.active {
        display: block;
    }
    .site-nav ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links a {
        margin: 0 10px;
        display: inline-block;
            margin-bottom: 10px;
    }
        .post-content {
            padding: 20px;
        }
        .rich-text {
            font-size: 1.05rem;
        }
        .post-title {
            font-size: 1.8rem;
        }
        .rich-text > p:first-of-type::first-letter {
            font-size: 3rem;
            margin-right: 8px;
        }
        .ascii-art {
            font-size: 0.8rem;
            padding: 15px;
        }
        .classic-table {
            display: block;
            overflow-x: auto;
        }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 1.5rem;
    }
    .rich-text h2 {
        font-size: 1.4rem;
    }
    .category {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
}
