/* ── Reset ──────────────────────────── */
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --ink:    #1a1714;
            --paper:  #f7f4ef;
            --muted:  #9a9189;
            --accent: #c4622d;
            --border: #ddd8cf;
            --serif:  'Cormorant Garamond', Georgia, serif;
            --mono:   'DM Mono', 'Courier New', monospace;
            --max:    720px;
            --pad:    clamp(1.5rem, 5vw, 3rem);
            --script: 'Great Vibes', cursive;
        }

        html { font-size: 18px; scroll-behavior: smooth; }

        body {
            background: var(--paper);
            color: var(--ink);
            font-family: var(--serif);
            font-weight: 300;
            line-height: 1.75;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }




/* ── Hamburger button ─────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 100;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.nav-toggle--open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; }
.nav-toggle--open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile nav ───────────────────────────── */
@media (max-width: 640px) {

    header {
        position: relative;
    }

    .nav-toggle {
        display: flex;
    }

    #mainNav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #faf7f2;
        border-bottom: 1px solid var(--border);
        padding: 1.2rem var(--pad);
        gap: 1.2rem;
        z-index: 99;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }

    #mainNav.nav--open {
        display: flex;
    }

    #mainNav a {
        font-size: 0.85rem;
        padding: 0.3rem 0;
        border-bottom: 1px solid var(--border);
    }

    #mainNav a:last-child {
        border-bottom: none;
    }
}





        /* ── Header ─────────────────────────── */
     


        header {
    background: #ede8df;
    border-bottom: 1px solid var(--border);
    padding: 1.8rem clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    }




        .site-title {
            font-size: clamp(1.3rem, 3vw, 1.7rem);
            font-weight: 300;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--ink);
            text-decoration: none;
        }
        .site-title span { color: var(--accent); }

        nav { display: flex; gap: 2rem; align-items: center; }

        nav a {
            font-family: var(--mono);
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--muted);
            text-decoration: none;
            transition: color 0.2s;
        }
        nav a:hover, nav a.active { color: var(--accent); }

        /* ── Main ───────────────────────────── */
        main {
            flex: 1;
            max-width: var(--max);
            width: 100%;
            margin: 0 auto;
            padding: clamp(3rem, 8vw, 5rem) var(--pad);
        }



        /* ── Typography ─────────────────────── */
        h1, h2, h3 { font-weight: 300; line-height: 1.2; }
        h1 { font-size: clamp(2rem, 5vw, 3rem); }
        h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
        h3 { font-size: 1.1rem; }

        p { margin-bottom: 1.4rem; }
        a { color: var(--accent); text-decoration: none; }
        a:hover { text-decoration: underline; }

        /* ── Prose ───────────────────────────── */
        .prose p      { margin-bottom: 1.5rem; }
        .prose h2     { margin: 2.5rem 0 1rem; }
        .prose h3     { margin: 2rem 0 0.75rem; }
        .prose ul,
        .prose ol     { padding-left: 1.5rem; margin-bottom: 1.5rem; }
        .prose li     { margin-bottom: 0.4rem; }
        .prose code   { font-family: var(--mono); font-size: 0.82em;
                         background: var(--border); padding: 0.1em 0.4em; border-radius: 2px; }
        .prose pre    { background: var(--ink); color: var(--paper); padding: 1.5rem;
                         border-radius: 4px; overflow-x: auto; margin-bottom: 1.5rem; }
        .prose pre code { background: none; padding: 0; }
        .prose blockquote { border-left: 2px solid var(--accent); padding-left: 1.5rem;
                             margin: 2rem 0; font-style: italic; color: var(--muted); }
        .prose hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }
        .prose img { max-width: 100%; height: auto; margin: 2rem 0; }

        /* ── Utility ─────────────────────────── */
        .mono   { font-family: var(--mono); }
        .muted  { color: var(--muted); }
        .small  { font-size: 0.8rem; }

        .btn {
            display: inline-block;
            font-family: var(--mono);
            font-size: 0.7rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            padding: 0.6rem 1.4rem;
            border: 1px solid currentColor;
            text-decoration: none;
            cursor: pointer;
            background: transparent;
            transition: background 0.2s, color 0.2s;
        }
        .btn         { color: var(--ink); }
        .btn:hover   { background: var(--ink); color: var(--paper); text-decoration: none; }
        .btn-accent  { color: var(--accent); }
        .btn-accent:hover { background: var(--accent); color: var(--paper); }
        .btn-danger  { color: #b03030; border-color: #b03030; }
        .btn-danger:hover { background: #b03030; color: white; }

        /* ── Form ────────────────────────────── */
        .field { margin-bottom: 1.5rem; }

        label {
            display: block;
            font-family: var(--mono);
            font-size: 0.68rem;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--muted);
            margin-bottom: 0.4rem;
        }

        input[type="text"],
        input[type="password"],
        textarea {
            width: 100%;
            padding: 0.7rem 1rem;
            border: 1px solid var(--border);
            background: white;
            font-family: var(--serif);
            font-size: 1rem;
            color: var(--ink);
            outline: none;
            transition: border-color 0.2s;
            -webkit-appearance: none;
        }

        input:focus, textarea:focus { border-color: var(--accent); }

        /* ── Alert ───────────────────────────── */
        .alert {
            padding: 0.9rem 1.2rem;
            margin-bottom: 1.5rem;
            font-family: var(--mono);
            font-size: 0.78rem;
            border-left: 3px solid var(--accent);
            background: rgba(196,98,45,0.06);
            color: var(--accent);
        }

/* ── Masonry Grid ─────────────────────────── */
.masonry {
    columns: 5;
    column-gap: 1.2rem;
    width: 100%;
    padding: 18px 16px;
}

@media (max-width: 1400px) { .masonry { columns: 4; } }
@media (max-width: 1100px) { .masonry { columns: 3; } }
@media (max-width: 700px)  { .masonry { columns: 2; } }
@media (max-width: 420px)  { .masonry { columns: 1; } }

/* ── Post Card ────────────────────────────── */
.card {
    break-inside: avoid;
    margin-bottom: 1.2rem;
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: block;
    transition: box-shadow 0.25s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* Stretched link makes the whole card clickable */
.card__link {
    color: inherit;
    text-decoration: none;
}

.card__link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
}

.card__thumb {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.card__body {
    padding: 1rem 1.1rem 1.2rem;
}

.card__date {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
    display: block;
}

.card__title {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.card__excerpt {
    font-family: var(--serif);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 0;
}

.card--no-thumb .card__title {
    font-size: 1.15rem;
}

/* ── Home page needs full width ───────────── */
.home-main {
    max-width: 100%;
    width: 100%;
    padding: clamp(2rem, 4vw, 3rem) clamp(1.2rem, 3vw, 2.5rem);
    overflow: visible;
}



/* ── Home header ──────────────────────────── */
.home-header {
    max-width: var(--max);
    margin: 0 auto 6rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
    overflow: visible;
}



/* ── Rich Footer ──────────────────────────── */
.footer-rich {
    background: #111009;
    color: #a09a90;
    margin-top: auto;
    padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
}

.footer-rich__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 900px) {
    .footer-rich__inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 500px) {
    .footer-rich__inner {
        grid-template-columns: 1fr;
    }
}

.footer-logo {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f0ece4;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.footer-logo span { color: var(--accent); }
.footer-logo:hover { text-decoration: none; color: white; }

.footer-tagline {
    font-family: var(--serif);
    font-size: 0.9rem;
    font-style: italic;
    color: #6b6560;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-social a {
    color: #6b6560;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.footer-social a:hover { color: var(--accent); }

.footer-heading {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f0ece4;
    font-weight: 400;
    margin-bottom: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    font-family: var(--serif);
    font-size: 0.9rem;
    color: #6b6560;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); text-decoration: none; }

/* ── Copyright bar ───────────────────────── */
.footer-bar {
    background: #0c0b08;
    padding: 1.2rem clamp(1.5rem, 4vw, 3rem);
    text-align: center;
    font-family: var(--mono);
    font-size: 0.68rem;
    color: #4a4540;
    letter-spacing: 0.08em;
}
        





/* ── Tag chips ────────────────────────────── */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.tag {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 0.15rem 0.5rem;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
    position: relative;
    z-index: 1;
}

.tag:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
}

.card .tags { margin-top: 0.5rem; }
.card .tag  { background: white; }

/* ── Admin Tabs ───────────────────────────────── */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
    white-space: nowrap;
}

.tab-btn:hover  { color: var(--ink); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel        { display: none; }
.tab-panel.active { display: block; }

/* ── Site info grid ───────────────────────────── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem 1.4rem;
}

.info-card__label {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.info-card__value {
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--ink);
    font-weight: 400;
}

.info-card--alert .info-card__value { color: #b03030; }
.info-card--ok    .info-card__value { color: #5a9e6f; }

/* ── Social links form ────────────────────────── */
.social-field {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.social-field:last-of-type { border-bottom: none; }

.social-field label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .social-field { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ── Post Navigation ──────────────────────── */
.post-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
}

.post-nav__item a {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-decoration: none;
    color: var(--ink);
    transition: color 0.2s;
}

.post-nav__item a:hover { color: var(--accent); text-decoration: none; }

.post-nav__label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.post-nav__title {
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.3;
}

.post-nav__next {
    text-align: right;
}

.post-nav__next a {
    align-items: flex-end;
}

.post-nav__center {
    text-align: center;
}

@media (max-width: 600px) {
    .post-nav {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-nav__center { order: -1; }
    .post-nav__next { text-align: left; }
    .post-nav__next a { align-items: flex-start; }
}