:root {
    --primary-color: #73000a;
    --accent-color: #000000;
    --bg-color: #eeeeee;
    --card-bg: #FFFFFF;
    --text-main: #333333;
    --text-light: #666666;
    
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Merriweather', serif;
}

/* --- Dark Mode Variables --- */
[data-theme="dark"] {
    --primary-color: #ff6b6b; 
    --accent-color: #ffffff;
    --bg-color: #121212;      
    --card-bg: #1e1e1e;       
    --text-main: #ffffff;
    --text-light: #e0e0e0;
}

/* --- Dark Mode Specific Overrides --- */
[data-theme="dark"] .navbar, 
[data-theme="dark"] footer {
    background-color: #73000a; 
    border-color: #550000;
}

[data-theme="dark"] .navbar a,
[data-theme="dark"] .brand-logo,
[data-theme="dark"] footer,
[data-theme="dark"] footer p {
    color: #ffffff !important;
}

[data-theme="dark"] .post-content blockquote {
    color: #333333;
    background-color: #f4f4f4;
    border-left-color: #73000a;
}

[data-theme="dark"] .archive-tags .tag {
    background-color: #2d2d2d;
    color: var(--primary-color);
    border: 1px solid #444;
}

[data-theme="dark"] .archive-tags .tag:hover {
    background-color: #3d3d3d;
    color: #ff8888;
}

[data-theme="dark"] .tech-stack-list li {
    background-color: #2d2d2d;
    color: var(--primary-color);
    border-color: #444;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
}

h1, h2, h3, nav {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

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

.navbar {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand-logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

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

.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.category-tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    font-weight: bold;
}

.post-card h2 {
    font-size: 1.8rem;
    margin: 10px 0;
}

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

.post-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-color);
    font-weight: bold;
    font-family: var(--font-heading);
}

.widget {
    background: var(--card-bg);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.widget h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

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

.category-list li {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

.category-list li:last-child {
    border-bottom: none;
}

footer {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-top: 1px solid #ddd;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* --- Single Post Styles --- */

.post-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.post-header h1 {
    font-size: 2.5rem;
    margin: 10px 0;
    line-height: 1.2;
    color: var(--primary-color);
}

.post-content {
    font-size: 1.1rem;
    color: var(--text-main);
}

.post-content p {
    margin-bottom: 20px;
}

.post-content h3 {
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* Blockquote Styling */
.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    font-style: italic;
    color: var(--text-light);
    margin: 30px 0;
    background: #f4f4f4;
    padding: 20px;
}

/* Code Block Styling */
pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
}

code {
    background: #e0e0e0;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-footer a {
    color: var(--primary-color);
    font-weight: bold;
    font-family: var(--font-heading);
}

blog-navbar, blog-sidebar {
    display: block;
}

/* --- Archive Page Styles --- */

.archive-container {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.archive-year-group {
    margin-bottom: 40px;
}

.archive-year-group:last-child {
    margin-bottom: 0;
}

.archive-year-heading {
    font-size: 2rem;
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

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

.archive-item {
    display: flex;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid #f4f4f4;
    transition: transform 0.2s ease;
}

.archive-item:hover {
    transform: translateX(5px);
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-date {
    font-family: 'Courier New', monospace; /* Monospace aligns dates nicely */
    font-size: 0.9rem;
    color: var(--text-light);
    min-width: 80px; /* Ensures alignment of titles */
    flex-shrink: 0;
}

.archive-details {
    display: flex;
    flex-direction: column;
}

/* Adjust layout for larger screens to put tags next to title */
@media (min-width: 600px) {
    .archive-details {
        flex-direction: row;
        align-items: baseline;
        width: 100%;
    }
    
    .archive-title {
        margin-right: 15px;
    }
}

.archive-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    text-decoration: none;
}

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

.archive-tags .tag {
    display: inline-block;
    font-size: 0.7rem;
    background: #eee;
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 5px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.archive-tags .tag:hover {
    background: var(--primary-color);
    color: white;
}

/* --- About Page Styles --- */

.about-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.about-profile {
    display: flex;
    gap: 40px;
    align-items: flex-start; /* Aligns top of image with top of text */
}

.profile-image-wrapper {
    flex-shrink: 0; /* Prevents image from getting squished */
    width: 250px;
}

.profile-pic {
    width: 100%;
    height: auto;
    border-radius: 8px; /* Rounded corners */
    border: 3px solid #eee; /* Subtle border */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text h3 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: var(--accent-color);
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: var(--text-main);
}

.tech-stack-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-stack-list li {
    background: #f4f4f4;
    padding: 5px 12px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-light);
    border: 1px solid #ddd;
}

/* Mobile Responsive adjustment for About Page */
@media (max-width: 768px) {
    .about-profile {
        flex-direction: column; /* Stacks items vertically */
        align-items: center;
        text-align: center;
    }

    .profile-image-wrapper {
        width: 200px;
        margin-bottom: 20px;
    }

    .about-text h2 {
        font-size: 1.8rem;
    }
    
    .tech-stack-list {
        justify-content: center;
    }
}