/* ==========================================================================
   Micro.blog Custom Theme: Toned-Down Green Aesthetic
   ========================================================================== */

:root {
    /* Color Palette - Toned-down Greens & Earthy Neutrals */
    --bg-color: #f7f9f6;          /* Soft, warm off-white with a hint of green */
    --card-bg: #ffffff;           /* Pure white for content areas */
    --text-primary: #2c3531;      /* Dark charcoal-olive for crisp reading */
    --text-secondary: #5b675e;    /* Muted sage for metadata/dates */
    --accent-green: #4f6d59;      /* Deep matte sage for links and headers */
    --accent-hover: #759780;      /* Lighter sage for active/hover states */
    --border-color: #e2e8e4;      /* Soft green-gray for subtle separation */
    --code-bg: #edf1ee;           /* Light tinted tint for blocks */
    
    /* Layout Constants */
    --max-width: 680px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
}

/* Dark Mode Preferences */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #171c19;
        --card-bg: #1e2420;
        --text-primary: #e4e9e5;
        --text-secondary: #90a195;
        --accent-green: #7da187;
        --accent-hover: #a1bfa9;
        --border-color: #2b3530;
        --code-bg: #242c28;
    }
}

/* Reset & Global Styles */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.65;
    margin: 0;
    padding: 2rem 1rem;
    -webkit-font-smoothing: antialiased;
}

/* Container Layout */
.wrapper, #wrapper, main, .container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Typography & Headers */
h1, h2, h3, h4 {
    color: var(--accent-green);
    font-weight: 700;
    line-height: 1.25;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h1 a, h2 a {
    color: inherit;
    text-decoration: none;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Micro.blog Post Layout Structure */
.microblog_post, .post, article {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.microblog_post:hover, .post:hover, article:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(79, 109, 89, 0.05);
}

/* Links */
a {
    color: var(--accent-green);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-green);
    transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
    color: var(--accent-hover);
    border-bottom-style: solid;
    border-bottom-color: var(--accent-hover);
}

/* Post Metadata (Dates, Permalink) */
.post-meta, .microblog_time, .post-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.post-meta a, .microblog_time a {
    color: var(--text-secondary);
    border: none;
}

/* Blog Header Navigation */
header, .site-header {
    text-align: center;
    margin-bottom: 4rem;
}

header h1, .site-title {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

header nav a, .site-nav a {
    margin: 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: none;
}

header nav a:hover, .site-nav a:hover {
    color: var(--accent-green);
}

/* Media handling (Images and Captions) */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Blockquotes & Code */
blockquote {
    border-left: 4px solid var(--accent-green);
    margin: 1.5rem 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-style: italic;
}

code, pre {
    background-color: var(--code-bg);
    font-family: Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.9rem;
    border-radius: 4px;
}

code {
    padding: 0.2rem 0.4rem;
}

pre code {
    display: block;
    padding: 1rem;
    overflow-x: auto;
    white-space: pre;
}

/* Footer styling */
footer, .site-footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
