/*
 * Steven A. Melnick — Site Customizations
 * ----------------------------------------
 * This is the single authoritative stylesheet for Steven-specific design.
 * Publii/Simple theme CSS remains in style.css.
 *
 * Sections:
 *   0. Site-wide color system
 *   1. Homepage shell and feed colors
 *   2. Splash
 *   3. My Stories
 *   4. Post presentation
 *   5. Responsive splash layout
 */



/* ==========================================================
   0. Site-Wide Color System
   ========================================================== */

:root {
    --page-bg: #081E31;
    --text-color: #FFFFFF;
    --headings-color: #FFFFFF;
    --link-color: #FFFFFF;
    --link-color-hover: rgba(255, 255, 255, 0.72);
    --nav-link-color: #FFFFFF;
    --nav-link-color-hover: rgba(255, 255, 255, 0.72);
    --logo-color: #FFFFFF;

    /* Secondary text and structural lines on navy */
    --gray: rgba(255, 255, 255, 0.72);
    --dark: rgba(255, 255, 255, 0.88);
    --light: rgba(255, 255, 255, 0.34);
    --lighter: #0D2A42;
    --helper: #081E31;
}

/* Keep the same palette even when the operating system requests dark mode.
   Publii's generated dark-mode variables otherwise override :root. */
@media (prefers-color-scheme: dark) {
    :root {
        --page-bg: #081E31;
        --text-color: #FFFFFF;
        --headings-color: #FFFFFF;
        --link-color: #FFFFFF;
        --link-color-hover: rgba(255, 255, 255, 0.72);
        --nav-link-color: #FFFFFF;
        --nav-link-color-hover: rgba(255, 255, 255, 0.72);
        --logo-color: #FFFFFF;
        --gray: rgba(255, 255, 255, 0.72);
        --dark: rgba(255, 255, 255, 0.88);
        --light: rgba(255, 255, 255, 0.34);
        --lighter: #0D2A42;
        --helper: #081E31;
    }
}

/* Interior navigation belongs visually to the same site as the splash. */
.top,
.top.sticky {
    background: var(--page-bg);
}

/* Footer and pagination inherit the site palette rather than Simple's
   original light-theme assumptions. */
.pagination a,
.pagination a:visited,
.footer,
.footer a,
.footer a:visited,
.footer__copyright,
.content__nav-link,
.content__nav-link:visited {
    color: var(--text-color);
}

.pagination a:hover,
.pagination a:focus,
.footer a:hover,
.footer a:focus,
.content__nav-link:hover,
.content__nav-link:focus {
    color: var(--link-color-hover);
}

.content__nav-link span {
    color: var(--gray);
}

/* ==========================================================
   1. Homepage Shell and Feed Colors
   ========================================================== */

body:has(.steven-splash) {
    background: rgb(8, 30, 49);
    margin: 0;
    padding: 12px;
    box-sizing: border-box;
}

body:has(.steven-splash) > .top {
    display: none;
}

body:has(.steven-splash) main {
    margin: 0;
}

body:has(.steven-splash) .feed__title,
body:has(.steven-splash) .feed__title a,
body:has(.steven-splash) .feed__title a:visited,
body:has(.steven-splash) .feed__content,
body:has(.steven-splash) .feed__content p {
    color: #fff;
}

body:has(.steven-splash) .feed__meta,
body:has(.steven-splash) .feed__author,
body:has(.steven-splash) .feed__author:visited,
body:has(.steven-splash) .feed__date,
body:has(.steven-splash) .feed__readmore,
body:has(.steven-splash) .feed__readmore:visited {
    color: rgba(255, 255, 255, 0.72);
}

body:has(.steven-splash) .feed__title a:hover,
body:has(.steven-splash) .feed__author:hover,
body:has(.steven-splash) .feed__readmore:hover {
    color: #fff;
}

/* Homepage feed scale.
   Keep metadata and excerpt sizing from Simple; reduce only the
   thumbnail and title so neither overwhelms the article preview. */
body:has(.steven-splash) .feed__title {
    font-size: clamp(1.3rem, 1.3rem + 0.45vw, 1.75rem);
    line-height: 1.2;
}

@media (min-width: 701px) {
    body:has(.steven-splash) .feed__image {
        width: 170px;
        height: 170px;
    }
}


/* ==========================================================
   2. Splash
   ========================================================== */

.steven-splash {
    position: relative;
    width: min(calc(100vw - 24px), calc((100vh - 24px) * 1.5));
    aspect-ratio: 3 / 2;
    margin: 0 auto;
    overflow: hidden;
    background-image: url("../images/steven_a_melnick_splash_photo_background.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-color: rgb(8, 30, 49);
}

.steven-splash__panel {
    position: absolute;
    left: 19.86%;
    top: 34.18%;
    width: 57.29%;
    height: 32.23%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.1% 2%;
    background: rgb(3, 35, 60);
    color: #fff;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
}

.steven-splash__panel h1 {
    margin: 0 0 1.2%;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 3.35vw, 52px);
    font-weight: 400;
    line-height: 1.05;
}

.steven-splash__panel h2 {
    margin: 0 0 1.5%;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(14px, 1.70vw, 26px);
    font-weight: 700;
    line-height: 1.12;
    white-space: nowrap;
}

.steven-splash__panel p {
    margin: 0;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(10px, 1.08vw, 16.5px);
    line-height: 1.30;
    white-space: nowrap;
}

.steven-splash__rule {
    width: 88%;
    margin: 1.6% 0 1.2%;
    border-top: 1px solid rgba(255, 255, 255, 0.72);
}

.steven-splash__nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(5px, 0.7vw, 11px);
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(10px, 1.12vw, 17px);
    font-weight: 700;
    line-height: 1.1;
}

.steven-splash__nav a,
.steven-splash__nav a:visited {
    color: #fff;
    text-decoration: none;
}

.steven-splash__nav a:hover,
.steven-splash__nav a:focus {
    color: #fff;
    text-decoration: underline;
}


/* ==========================================================
   3. My Stories
   ========================================================== */

.posts .feed {
    padding-top: 1.5rem;
}

.my-stories .feed__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0 0 0.75rem;
    padding: 0;
    justify-content: flex-start;
}

.my-stories .feed__image,
.my-stories .index__image-placeholder {
    width: 80px;
    min-width: 80px;
    height: 60px;
    min-height: 60px;
    margin: 0;
    padding: 0;
}

.my-stories .feed__image img {
    width: 80px;
    height: 60px;
    min-height: 0;
    object-fit: contain;
    border-radius: 4px;
}

.my-stories .feed__content {
    width: auto;
    max-width: none;
}

.my-stories .feed__title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.my-stories .index__date {
    font-size: 0.95rem;
    font-weight: 400;
    font-style: italic;
}


/* ==========================================================
   4. Post Presentation
   ========================================================== */

.post-template .hero__image {
    display: none;
}

@media all and (min-width: 37.5em) {
    .feed__content {
        width: var(--entry-width);
    }
}


/* ==========================================================
   5. Responsive Splash Layout
   Desktop remains unchanged. On phones the complete documentary
   mosaic is shown first, followed by a full-width readable title
   panel. No source photograph is cropped or regenerated.
   ========================================================== */

@media (max-width: 700px) {
    body:has(.steven-splash) {
        padding: 8px;
    }

    .steven-splash {
        width: 100%;
        aspect-ratio: auto;
        overflow: visible;
        background-size: 100% auto;
        background-position: top center;
        padding-top: 66.6667%;
    }

    .steven-splash__panel {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 18px 16px 16px;
        background: rgb(3, 35, 60);
    }

    /* On mobile, return the live site name to the center opening
       in the photographic mosaic. The remaining live text stays
       in the full-width panel below the mosaic. */
    .steven-splash__panel h1 {
        position: absolute;
        left: 19.86%;
        top: -43.88vw;
        width: 57.29%;
        height: 21.49vw;
        margin: 0;
        padding: 0 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: clamp(18px, 5.8vw, 34px);
        line-height: 1.05;
        text-align: center;
        white-space: normal;
        box-sizing: border-box;
    }

    .steven-splash__panel h2 {
        margin: 0 0 10px;
        font-size: clamp(18px, 5vw, 24px);
        line-height: 1.15;
        white-space: normal;
    }

    .steven-splash__panel p {
        max-width: 34em;
        font-size: clamp(14px, 3.8vw, 17px);
        line-height: 1.35;
        white-space: normal;
    }

    .steven-splash__rule {
        width: 92%;
        margin: 14px 0 12px;
    }

    .steven-splash__nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px 12px;
        font-size: 16px;
        line-height: 1.35;
        white-space: normal;
    }

    /* Homepage feed: compact phone/tablet presentation.
       Override Simple's full-width mobile image behavior without
       changing the desktop feed or My Stories. */
    body:has(.steven-splash) .feed__item {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        column-gap: 16px;
        align-items: start;
    }

    body:has(.steven-splash) .feed__image {
        grid-column: 1;
        grid-row: 1;
        width: 110px;
        height: 110px;
        margin: 0;
    }

    body:has(.steven-splash) .feed__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    body:has(.steven-splash) .feed__content {
        grid-column: 2;
        grid-row: 1;
        width: auto;
        min-width: 0;
    }

    body:has(.steven-splash) .feed__title {
        font-size: clamp(1.2rem, 4.8vw, 1.45rem);
        line-height: 1.18;
    }

    /* Mobile attribution: author + separator + date is always one line.
       Keep Simple's separator compact and use the full metadata row efficiently. */
    body:has(.steven-splash) .feed__meta {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: baseline;
        gap: 0.22rem;
        white-space: nowrap;
        font-size: 11px;
        line-height: 1.25;
    }

    body:has(.steven-splash) .feed__author,
    body:has(.steven-splash) .feed__date {
        display: inline;
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: inherit;
        line-height: inherit;
    }

    body:has(.steven-splash) .feed__date {
        margin: 0;
        padding: 0;
    }

    body:has(.steven-splash) .feed__author + .feed__date::before {
        width: 0.55rem;
        margin-left: 0;
        margin-right: 0.22rem;
    }
}

@media (max-width: 430px) {
    body:has(.steven-splash) .feed__item {
        grid-template-columns: 92px minmax(0, 1fr);
        column-gap: 12px;
    }

    body:has(.steven-splash) .feed__image {
        width: 92px;
        height: 92px;
    }

}
