/* ============================================
   Blog Design System: "Mountain Hut"
   Alpine-inspired aesthetic — warm, earthy tones
   Fonts: Georgia (headings/body), system monospace (code), sans-serif (meta)
   ============================================ */

:root {
    --blog-bg: #f8f6f2;
    --blog-bg-deep: #ede9e3;
    --blog-text: #3d3530;
    --blog-heading: #2c3e50;
    --blog-meta: #8b7d6b;
    --blog-accent: #d4c5a9;
    --blog-nav-bg: #2c3e50;
    --blog-nav-accent: #3d5247;
    --blog-code-bg: #2c3e50;
    --blog-math-bg: #f0ebe4;
    --blog-border: #e0d8cc;
    --blog-text-muted: #5a5347;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background: linear-gradient(180deg, var(--blog-bg), var(--blog-bg-deep));
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ---- Navigation ---- */

.blog-nav {
    background: linear-gradient(180deg, var(--blog-nav-bg) 0%, var(--blog-nav-accent) 100%);
    padding: 18px 24px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
}

.blog-nav-title {
    color: var(--blog-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: sans-serif;
    text-decoration: none;
}

.blog-nav-links {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 20px;
}

.blog-nav-links a {
    color: rgba(212, 197, 169, 0.7);
    font-size: 12px;
    font-family: sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

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


/* ---- Post Hero (Full Bleed) ---- */

.post-hero {
    position: relative;
    min-height: 55vh;
    background-size: cover;
    background-position: center 30%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.45);
}

.post-hero-content {
    position: relative;
    text-align: center;
    padding: 40px 24px;
    max-width: 720px;
}

.post-hero-tags {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(212, 197, 169, 0.9);
    font-family: sans-serif;
    margin-bottom: 12px;
}

.post-hero-title {
    font-family: Georgia, serif;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    margin: 0;
}

.post-hero-subtitle {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 0 0;
}

.post-hero-meta {
    font-size: 14px;
    color: rgba(212, 197, 169, 0.8);
    font-family: sans-serif;
    margin-top: 12px;
}

@media screen and (max-width: 480px) {
    .post-hero {
        min-height: 40vh;
    }

    .post-hero-title {
        font-size: 26px;
    }

    .post-hero-content {
        padding: 24px 16px;
    }
}


/* ---- Blog Content Container ---- */

.blog-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 24px 60px;
}


/* ---- Blog Index Page ---- */

.blog-index-title {
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--blog-heading);
    margin: 0 0 4px;
}

.blog-index-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--blog-meta), transparent);
    margin: 16px 0 28px;
}

.blog-index-entry {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--blog-border);
}

.blog-index-entry:last-child {
    border-bottom: none;
}

.blog-index-entry-meta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--blog-meta);
    font-family: sans-serif;
    margin-bottom: 6px;
}

.blog-index-entry-title {
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--blog-heading);
    margin: 0 0 8px;
}

.blog-index-entry-title a {
    color: inherit;
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

.blog-index-entry-title a:hover {
    color: var(--blog-meta);
}

.blog-index-entry-subtitle {
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
    color: var(--blog-meta);
}

.blog-index-entry-excerpt {
    font-family: Georgia, serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--blog-text-muted);
    margin: 0;
}


/* ---- Post Article Header ---- */

.post-tags {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--blog-meta);
    font-family: sans-serif;
    margin-bottom: 16px;
}

.post-title {
    font-family: Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--blog-heading);
    margin: 0 0 16px;
}

.post-subtitle {
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    font-style: italic;
    color: var(--blog-meta);
    margin: 4px 0 0;
}

.post-meta {
    font-size: 14px;
    color: var(--blog-meta);
    font-family: sans-serif;
    margin-bottom: 8px;
}

.post-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--blog-meta), transparent);
    margin: 24px 0;
}


/* ---- Post Article Body ---- */

.post-body {
    font-family: Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    color: var(--blog-text);
}

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

.post-body > p:first-child::first-letter {
    font-size: 3.2em;
    font-weight: 700;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 4px;
    color: var(--blog-heading);
    font-family: Georgia, serif;
}

.post-body h2 {
    font-family: Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--blog-heading);
    margin-top: 40px;
    margin-bottom: 16px;
}

.post-body h3 {
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--blog-heading);
    margin-top: 32px;
    margin-bottom: 12px;
}

.post-body a {
    color: var(--blog-meta);
    text-decoration: underline;
    -webkit-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

.post-body a:hover {
    color: var(--blog-heading);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 24px 0;
}

.post-body ul,
.post-body ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body blockquote {
    border-left: 3px solid var(--blog-accent);
    margin: 24px 0;
    padding: 12px 20px;
    background: var(--blog-math-bg);
    color: var(--blog-text-muted);
    font-style: italic;
}

.post-body strong {
    font-weight: 700;
    color: var(--blog-heading);
}


/* ---- Code Blocks (Rouge) ---- */

.post-body code {
    font-family: monospace;
    font-size: 14px;
    background: var(--blog-math-bg);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--blog-heading);
}

.post-body pre {
    background: var(--blog-code-bg);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 24px 0;
    overflow-x: auto;
    border-left: 3px solid var(--blog-accent);
}

.post-body pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: #e8e0d4;
    font-size: 13px;
    line-height: 1.6;
}

/* Rouge syntax highlighting — Mountain Hut warm palette */
.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kt { color: #7ec8e3; } /* keywords */
.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .se { color: #d4c5a9; } /* strings */
.highlight .c,
.highlight .c1,
.highlight .cm,
.highlight .cs { color: #6b8e6b; font-style: italic; } /* comments */
.highlight .nf,
.highlight .nb { color: #e8c77b; } /* functions */
.highlight .mi,
.highlight .mf,
.highlight .mh { color: #d4a574; } /* numbers */
.highlight .o,
.highlight .p { color: #e8e0d4; } /* operators/punctuation */
.highlight .na { color: #b8c9d4; } /* attributes */
.highlight .nc,
.highlight .nn { color: #7ec8e3; } /* class/module names */


/* ---- Math (MathJax) ---- */

.post-body .math-block {
    background: var(--blog-math-bg);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 24px 0;
    border-left: 3px solid var(--blog-meta);
    overflow-x: auto;
}


/* ---- Responsive ---- */

@media screen and (max-width: 480px) {
    .blog-content {
        padding: 32px 16px 40px;
    }

    .post-title {
        font-size: 26px;
    }

    .blog-index-title {
        font-size: 24px;
    }

    .post-body {
        font-size: 16px;
    }

    .blog-nav {
        padding: 14px 16px;
    }

    .blog-nav-links {
        gap: 14px;
    }
}
