/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Readex+Pro:wght@400;500;600&display=swap');

/* Base monospace styling for non-blog content */
.base-content, 
.base-content * {
    font-family: 'Courier New', Courier, monospace !important;
}

/* Base styles */
body {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    color: #333;
}

/* Header styling */
.site-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.site-header h1 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2rem;
    margin: 0;
}

/* Navigation */
nav {
    text-align: center;
    margin: 1rem 0 2rem 0;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: #4A3B24;  /* Deep warm brown */
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
}

nav ul li a:hover {
    text-decoration: underline;
    background: #f5f5f5;
}

/* Section styling */
section {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

section:last-child {
    border-bottom: none;
}

section h2 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.75rem;
    margin: 0 0 1.5rem 0;
    color: #1a1a1a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #4A3B24; /* Brown */
}

/* Main section styling */
.main-section {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.main-section:last-child {
    border-bottom: none;
}

.section-heading {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 1.75rem;
    margin: 0 0 1.5rem 0;
    color: #1a1a1a !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: block;
    padding-bottom: 0 !important;
}

.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #4A3B24;
    margin-top: 8px;
}

/* Hide duplicate headings from markdown content */
.main-section > h2:not(.section-heading) {
    display: none;
}

/* Links */
a {
    color: #4A3B24;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-decoration-color: #4A3B24;
}

/* Blog styles */
.blog-post {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-post h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.blog-post-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.blog-post-excerpt {
    margin-bottom: 1rem;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.blog-post-tag {
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    color: #333;
}

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.blog-category {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 0.9rem;
}

.blog-category.active {
    background: #4A3B24;
    color: white;
}

/* Code blocks - always monospace regardless of context */
pre, code {
    font-family: 'Courier New', Courier, monospace !important;
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

pre {
    padding: 1rem;
    overflow-x: auto;
}

pre code {
    background: transparent;
    padding: 0;
}

/* Blog post page */
.blog-post-content {
    margin-top: 2rem;
}

.blog-post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.blog-post-navigation a {
    text-decoration: none;
    color: #4A3B24;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

/* Add media queries for responsiveness */

/* For tablets and larger phones */
@media (max-width: 768px) {
    body {
        padding: 10px;
        max-width: 100%;
    }

    .site-header {
        padding: 1rem 0;
    }

    nav {
        margin: 0.5rem 0 1rem 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    nav ul li {
        width: 100%;
        margin: 0;
    }

    nav ul li a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.8rem;
        background: #f5f5f5;
        border-radius: 4px;
    }

    section {
        padding: 1rem 0;
        margin: 1rem 0;
    }

    .section-heading {
        font-size: 1.5rem;
    }

    .main-section {
        padding: 1rem 0;
        margin: 1rem 0;
    }
}

/* For small phones */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .site-header h1 {
        font-size: 1.5rem;
    }

    nav ul li a {
        font-size: 0.95rem;
        padding: 0.7rem;
    }

    section h2 {
        font-size: 1.25rem;
    }

    .section-heading {
        font-size: 1.25rem;
    }

    .blog-posts {
        grid-template-columns: 1fr;
    }
}
