@charset "utf-8";

/*!
            __
     _____ |__| _____ ____ _____ _____    ____ _____ ________
    |  -  ||  ||  -__|   _|  -__|     |__|  __|  _  |        |
    |___  ||__||_____|__| |_____|__|__|__|____|_____|__|__|__|
    |_____|                                               Mk V

*/

/* Fonts
----------------------------------------*/
@font-face { font-family: 'Fira Sans'; font-weight: 400; font-display: swap; src: url(../fonts/fira-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 500; font-display: swap; src: url(../fonts/fira-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 800; font-display: swap; src: url(../fonts/fira-sans-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 900; font-display: swap; src: url(../fonts/fira-sans-latin-900-normal.woff2) format('woff2'); }


/* Colours (mk4's palette)
----------------------------------------*/
:root {
    --bg:        #f6f5f1;
    --surface:   #ebede7;
    --text:      #333;
    --muted:     #6f686e;
    --brand:     #746c73;  /* mauve header */
    --brand-ink: #fff;
    --mint:      #c1d6cd;  /* breadcrumbs */
    --mint-ink:  #2f4139;
    --accent:    #c25c00;  /* links */
    --focus:     #c25c00;
    --gap:       4px;
    --wrap:      1300px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:        #1a181a;
        --surface:   #262326;
        --text:      #e9e5e8;
        --muted:     #a59ea3;
        --brand:     #3b363b;
        --brand-ink: #f3eff2;
        --mint:      #263530;
        --mint-ink:  #b8d2c7;
        --accent:    #f39a4c;
        --focus:     #f39a4c;
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg:        #1a181a;
    --surface:   #262326;
    --text:      #e9e5e8;
    --muted:     #a59ea3;
    --brand:     #3b363b;
    --brand-ink: #f3eff2;
    --mint:      #263530;
    --mint-ink:  #b8d2c7;
    --accent:    #f39a4c;
    --focus:     #f39a4c;
    color-scheme: dark;
}


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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 4.5rem; /* keep anchored year headings clear of the sticky year nav */
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font: 400 1rem/1.5 'Fira Sans', system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--accent);
    text-underline-offset: 0.15em;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

h1, h2, h3 {
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 0.5em;
}
    h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em; }
    h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
    h3 { font-size: 1.25rem; }

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

button {
    font: inherit;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 16px;
}

main.wrap {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}


/* Header, breadcrumbs & footer
----------------------------------------*/
.site-header {
    background: var(--brand);
    color: var(--brand-ink);
}
    .site-header .wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        min-height: 4rem;
    }
    .brand {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        color: inherit;
        text-decoration: none;
        font-weight: 900;
        font-size: clamp(1.5rem, 4vw, 2.1rem);
        letter-spacing: -0.01em;
    }
        .brand .logo {
            width: 3.4em;
            height: auto;
            margin: 0.2em 0; /* keep the whole vulture, tail included, inside the header */
        }
    .site-header nav {
        display: flex;
        gap: 1.25rem;
    }
        .site-header nav a {
            color: inherit;
            text-decoration: none;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            font-size: 0.9rem;
        }
        .site-header nav a:hover {
            text-decoration: underline;
        }
    /* The smallest phones (320px) can't fit the full-size logo and menu side by side */
    @media (max-width: 359px) {
        .site-header .wrap { gap: 0.75rem; }
        .brand { font-size: 1.3rem; gap: 0.4rem; }
        .brand .logo { width: 2.8em; }
        .site-header nav { gap: 0.8rem; }
        .site-header nav a { font-size: 0.8rem; }
    }

.breadcrumbs {
    background: var(--mint);
    color: var(--mint-ink);
    font-size: 0.9rem;
}
    .breadcrumbs .wrap {
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
        overflow-wrap: anywhere;
    }
    .breadcrumbs a {
        color: inherit;
    }
    .breadcrumbs span[aria-hidden] {
        margin: 0 0.3em;
        opacity: 0.6;
    }

.site-footer {
    background: var(--brand);
    color: var(--brand-ink);
    font-size: 0.85rem;
}
    .site-footer p {
        margin: 0;
        padding: 1rem 0;
        text-align: center;
    }
    .site-footer a {
        color: inherit;
    }


/* Page titles & sections
----------------------------------------*/
.page-title {
    margin-bottom: 1.5rem;
}
    .page-title h1 {
        margin-bottom: 0.15em;
    }
    .page-title p {
        margin: 0;
        color: var(--muted);
    }

.intro {
    max-width: 42rem;
}
    .intro p {
        font-size: 1.15rem;
    }

.archive,
.random {
    margin-top: 2.5rem;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}
    .section-head h2 {
        margin: 0;
    }

.shuffle {
    border: 0;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    background: var(--mint);
    color: var(--mint-ink);
    font-weight: 800;
    cursor: pointer;
}
    .shuffle:hover {
        filter: brightness(0.95);
    }

.more {
    margin: 1rem 0 0;
    font-weight: 500;
}

.prose {
    max-width: 42rem;
}
    .prose h2 {
        margin-top: 1.5em;
    }


/* Album overview
----------------------------------------*/
.year-nav {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 -16px 1.5rem;
    padding: 0.6rem 16px;
    background: var(--bg);
}
    .year-nav a {
        padding: 0.2rem 0.65rem;
        border-radius: 999px;
        background: var(--surface);
        color: var(--text);
        font-weight: 500;
        text-decoration: none;
        font-variant-numeric: tabular-nums;
    }
    .year-nav a:hover {
        background: var(--mint);
        color: var(--mint-ink);
    }

.year + .year {
    margin-top: 2.5rem;
}
    .year h2 a {
        color: inherit;
        text-decoration: none;
    }
    .year h2 a:hover {
        color: var(--accent);
    }

.album-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
    gap: 1.25rem 1rem;
}

.album-card {
    display: block;
    color: inherit;
    text-decoration: none;
}
    .album-card img {
        display: block;
        width: 100%;
        aspect-ratio: 3 / 2;
        object-fit: cover;
        border-radius: 6px;
        background: var(--surface);
        margin-bottom: 0.5rem;
        transition: transform 0.2s ease;
    }
    .album-card strong {
        display: block;
        font-weight: 800;
        font-size: 1.05rem;
        line-height: 1.25;
    }
    .album-card small {
        display: block;
        color: var(--muted);
        font-size: 0.875rem;
    }
    .album-card:hover strong {
        color: var(--accent);
    }
    .album-card:hover img {
        transform: scale(1.015);
    }


/* Photo grid
----------------------------------------*/
.photo-grid {
    list-style: none;
    margin: 0 -16px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 30vw), 1fr));
    gap: var(--gap);
}
    @media (min-width: 700px) {
        .photo-grid {
            margin: 0;
        }
    }
    .photo-grid a {
        display: block;
        aspect-ratio: 1;
        background: var(--surface);
        overflow: hidden;
    }
        .photo-grid img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.25s ease, opacity 0.25s ease;
        }
        .photo-grid a:hover img {
            transform: scale(1.04);
        }


/* Lightbox (PhotoSwipe additions)
----------------------------------------*/
.pswp {
    --pswp-bg: #000;
    --pswp-placeholder-bg: #111;
    font-family: 'Fira Sans', system-ui, sans-serif;
}

.pswp__counter {
    font-variant-numeric: tabular-nums;
}

.pswp__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem 16px max(1rem, env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #ddd;
    font-size: 0.9rem;
    text-align: center;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
    .pswp__caption a {
        color: #fff;
        font-weight: 500;
        pointer-events: auto;
    }
    .pswp__caption:empty {
        display: none;
    }
    /* Hide the caption together with the other controls (on tap & while zoomed in) */
    .pswp--ui-visible .pswp__caption { opacity: 1; }
    .pswp:not(.pswp--ui-visible) .pswp__caption,
    .pswp--zoomed-in .pswp__caption { opacity: 0; }


@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
    }
}
