/* ======================================================
   VARIABLES
====================================================== */

:root {
    --bg-main: #1a0f2e;
    --bg-panel: #24163f;
    --bg-accent: #32215e;
    --text-main: #e6e1f2;
    --text-muted: #b9aed6;
    --link: #b58cff;
    --link-hover: #e2ccff;
    --border-soft: rgba(255,255,255,0.08);
}

/* ======================================================
   RESET / BASE (MOBILE FIRST)
====================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #140a26, var(--bg-main));
    color: var(--text-main);
    line-height: 1.6;
    font-size: 17px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ======================================================
   HEADER
====================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(20,10,38,0.92);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(6px);
}

.header-inner {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.logo-text a {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.14em;
    text-decoration: none;
    color: #ffffff;
}

.nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-muted);
    text-decoration: none;
}

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

/* ======================================================
   LAYOUT
====================================================== */

.site-main {
    padding: 1rem;
    display: block;
}

.layout-full {
    grid-template-columns: 1fr !important;
}

/* ======================================================
   INDEX FEED (MOBILE)
====================================================== */

.index-feed {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.index-item {
    break-inside: avoid;
    margin-bottom: 2.5rem;
}

.index-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.index-image {
    width: 100%;
    margin-bottom: 0.75rem;
}

.index-item h2 {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 0.25rem;
}

.index-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ======================================================
   POST PAGE
====================================================== */

article h1 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-divider {
    margin: 1rem 0;
    height: 1px;
    background: linear-gradient(
            to right,
            transparent,
            var(--border-soft),
            transparent
    );
}

/* ======================================================
   HERO IMAGE (BREAK OUT TO SITE-MAIN)
====================================================== */

.post-hero {
    margin: 0 auto 1.5rem;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50%;
    margin-right: -50%;
    max-width: 100%;
}

.post-hero img {
    display: block;
    margin: 0 auto;

    max-height: 35em;
    width: auto;
    height: auto;
}


/* ======================================================
   POST CONTENT (EDITORIAL WIDTH)
====================================================== */

.post-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1.25rem 4rem;
    font-size: 1.05rem;
    line-height: 1.75;
}

.post-content p {
    margin-bottom: 1.25rem;
}

/* =========================
   Editorial links (post content)
========================= */

.post-content a {
    color: #cfa6ff;                 /* lighter purple */
    text-decoration: underline;
    text-decoration-color: rgba(207, 166, 255, 0.45);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.post-content a:hover {
    color: #e6d3ff;                 /* near-white on hover */
    text-decoration-color: rgba(230, 211, 255, 0.9);
}
.post-content a.content-link {
    font-weight: 500;
    white-space: nowrap;
}


/* ======================================================
   INLINE PHOTOS
====================================================== */

.inline-photo {
    margin: 0.5rem 0;
}

.inline-photo a {
    display: block;
    cursor: zoom-in;
}

.inline-photo figcaption {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 700px;
}

/* ======================================================
   GALLERY GRID
====================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

/* ======================================================
   SIDEBAR
====================================================== */

.sidebar {
    margin-top: 2.5rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 0.75rem;
}

.sidebar a {
    color: var(--text-muted);
    text-decoration: none;
}

.sidebar a:hover {
    color: var(--link-hover);
}

/* ======================================================
   FOOTER
====================================================== */

.site-footer {
    width: 100%;
    margin-top: 4rem;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border-soft);
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ======================================================
   PHOTOSWIPE CAPTION
====================================================== */

.pswp__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.25rem;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.pswp__caption__center {
    background: rgba(50,33,94,0.75);
    color: var(--text-main);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* ======================================================
   ADMIN GALLERY SORT
====================================================== */

.gallery-sort {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.75rem;
}

.gallery-sort li {
    cursor: grab;
}

.gallery-sort img {
    width: 100%;
    border-radius: 8px;
}

/* ======================================================
   DESKTOP ENHANCEMENTS
====================================================== */

@media (min-width: 900px) {

    .header-inner {
        max-width: 1200px;
        margin: auto;
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 1.5rem;
    }

    .logo-text a {
        font-size: 2rem;
        letter-spacing: 0.22em;
    }

    .site-main {
        max-width: 1200px;
        margin: auto;
        padding: 2.5rem 1.5rem;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 2.5rem;
    }

    .index-feed {
        column-count: 3;
        column-gap: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .sidebar {
        background: var(--bg-panel);
        padding: 1.75rem;
        border-radius: 14px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.35);
        margin-top: 0;
    }
}

@media (max-width: 640px) {
    .index-feed {
        column-count: 1;
    }
}

.post-hero figcaption {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

