/* ==========================================================================
         ╔═╗╔═╗╦  ╦  ╔═╗╦═╗╦ ╦  ╔═╗╔═╗╔═╗
         ║ ╦╠═╣║  ║  ║╣ ╠╦╝╚╦╝  ║  ╚═╗╚═╗
         ╚═╝╩ ╩╩═╝╩═╝╚═╝╩╚═ ╩   ╚═╝╚═╝╚═╝             
========================================================================== */
.album-section { 
    margin-bottom: 3.75rem; 
    position: relative; 
    opacity: 0; 
    animation: fadeIn 0.6s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

.album-header-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
    margin-bottom: 1.125rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.375rem;
    gap: 0.75rem;
}

.album-title-link {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
    flex-shrink: 1;
    min-width: 0;
}
@media (hover: hover) {
	.album-title-link:hover {
	    color: var(--text-accent);
	    text-shadow: 0 0 15px rgba(var(--accent-rgb), 0.3);
	}
}
.album-display-title { 
    font-size: 1.65rem; 
    margin: 0; 
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-display);
}

.album-controls {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    flex-shrink: 0;
}

.nav-arrow {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-accent);
    width: 1.875rem;
    height: 1.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50%;
}
@media (hover: hover) {
	.nav-arrow:hover {
	    border-color: var(--accent);
	    color: var(--text-primary);
	    background: rgba(var(--accent-rgb), 0.1);
	}
}
.nav-arrow svg { width: 0.9rem; height: 0.9rem; }

.see-all-link {
    min-width: 0;
    white-space: nowrap;
}
.gallery-carousel {
    display: flex;
    gap: 1.125rem;
    overflow-x: auto;
    padding: 0.75rem 0 1.5rem 0;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    min-width: 0; 
}
.gallery-carousel::-webkit-scrollbar { display: none; }

.carousel-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
    cursor: pointer;
    min-width: 0;
}

@media (hover: hover) {
	.carousel-item:hover { transform: translateY(-5px); }
}
.carousel-frame {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.carousel-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(20%) brightness(0.9) contrast(110%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

@media (hover: hover) {
	.carousel-item:hover .carousel-frame img { 
	    filter: sepia(0%) brightness(1) contrast(100%);
	    transform: scale(1.05);
	}
}
.item-meta { 
    margin-top: 0.6rem; 
    text-align: center; 
    opacity: 0.8; 
    transition: opacity 0.3s;
}
@media (hover: hover) {
	.carousel-item:hover .item-meta { opacity: 1; }
}
.item-meta h4 { 
    color: var(--text-primary); 
    margin: 0; 
    font-family: var(--font-display);
}
.item-date {
    font-size: 0.6rem;
    color: var(--text-accent);
    font-family: var(--font-body);
    font-style: italic;
}

/* --- LIGHTBOX --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(11, 15, 18, 0.5);
    -webkit-backdrop-filter: blur(18px) saturate(1.1);
    backdrop-filter: blur(18px) saturate(1.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-stage {
    margin: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.lightbox-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.lightbox-img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(calc(94vw - 20rem), 1400px);
    max-height: calc(100vh - 8rem);
    max-height: calc(100dvh - 8rem);
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.lightbox-info {
    flex: 0 0 17rem;
    width: 17rem;
    max-height: calc(100vh - 8rem);
    max-height: calc(100dvh - 8rem);
    overflow-y: auto;
    padding: 1.25rem 1.35rem;
    background: rgba(11, 15, 18, 0.62);
    border: 1px solid rgba(221, 214, 200, 0.16);
    border-radius: 3px;
    color: #ddd6c8;
    text-align: left;
}
.lb-info-date {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    color: #a39a89;
    padding-bottom: 0.4rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid rgba(221, 214, 200, 0.16);
}
.lb-info-date:empty {
    display: none;
}
.lb-info-title {
    font-family: var(--font-display);
    line-height: 1.3;
    color: #ece4d2;
    margin: 0 0 0.6rem;
    overflow-wrap: anywhere;
}
.lb-info-desc {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.55;
    color: #c9c0b0;
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
/* image size under the description */
.lb-info-size {
    margin-top: 0.9rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(221, 214, 200, 0.16);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-variant: small-caps;
    font-variant-numeric: lining-nums;
    letter-spacing: 0.1em;
    color: #a39a89;
}
.lb-info-size:empty {
    display: none;
}
.lb-info-desc.is-empty {
    font-style: italic;
    color: #a39a89;
}

.lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.lb-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border: 1px solid rgba(221, 214, 200, 0.28);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    color: #ddd6c8;
    font-family: var(--font-nav);
    text-decoration: none;
    text-shadow: none;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
@media (hover: hover) {
	.lb-btn:hover {
	    color: #c4a24d;
	    border-color: rgba(196, 162, 77, 0.7);
	    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.45);
	    text-shadow: none;
	    outline: none;
	}
}
.lb-btn:focus-visible {
    color: #c4a24d;
    border-color: rgba(196, 162, 77, 0.7);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.45);
    text-shadow: none;
    outline: none;
}
.lb-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: #ddd6c8;
    font-size: 2.25rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}
@media (hover: hover) {
	.lightbox-close:hover {
	    color: #c4a24d;
	    outline: none;
	}
}
.lightbox-close:focus-visible {
    color: #c4a24d;
    outline: none;
}

/* narrower screens */
@media (max-width: 900px) {
    .lightbox-overlay { overflow-y: auto; align-items: flex-start; padding-top: 3.25rem; }
    .lightbox-stage { flex-direction: column; gap: 1rem; width: 100%; }
    .lightbox-img { max-width: 94vw; max-height: calc(100vh - 16rem); max-height: calc(100dvh - 16rem); }
    .lightbox-info { flex: none; width: min(36rem, 100%); max-height: none; overflow: visible; }
}

@media (max-width: 600px) {
    .lightbox-overlay { padding: 3rem 0.75rem 0.75rem; }
    .lightbox-img { max-height: calc(100vh - 10rem); max-height: calc(100dvh - 10rem); }
    .lb-btn { padding: 0.5rem 0.8rem; font-size: 0.7rem; }
}

/* --- ALBUM PAGE LAYOUT --- */

.album-header { 
    text-align: center; 
    margin: 3rem 0 2.25rem 0; 
    animation: fadeIn 0.8s ease-out;
}

.album-title { 
    font-family: var(--font-display);
    font-size: 2.25rem; 
    margin-bottom: 0.375rem; 
    color: var(--text-primary); 
    letter-spacing: 0.05em;
}
.album-header .album-fullsize {
    display: inline-block;
    margin: 1rem 0 0;
    text-align: left;
}
.album-meta { 
    font-family: var(--font-body);
    font-style: italic; 
    opacity: 0.7; 
    font-size: 0.825rem; 
    color: var(--text-accent); 
}

/* --- MASONRY --- */
.masonry-grid {
    --masonry-gap: 1.125rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--masonry-gap);
    align-items: start;
    width: 100%;
}
.masonry-grid.is-masonry {
    display: flex;
    justify-content: center;
}
.masonry-col {
    flex: 1 1 0;
    min-width: 0;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: var(--masonry-gap);
}

.masonry-item {
    position: relative;
    cursor: pointer;
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 6px;
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
}

/* inner frame */
.masonry-item::after {
    content: "";
    position: absolute;
    top: 3px; bottom: 3px; left: 3px; right: 3px;
    border: 1px solid var(--border-color);
    pointer-events: none;
    z-index: 10;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
	.masonry-item:hover {
	    transform: translateY(-4px);
	    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
	    border-color: var(--text-accent);
	}
	.masonry-item:hover::after {
	    border-color: var(--accent); 
	    box-shadow: inset 0 0 10px rgba(var(--accent-rgb), 0.1);
	}
}
.masonry-item img {
    width: 100%;
    height: auto; 
    max-width: 100%;
    display: block;
    transition: filter 0.3s ease;
}

.masonry-overlay {
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.125rem;
    z-index: 5;
}

@media (hover: hover) {
	.masonry-item:hover .masonry-overlay {
	    opacity: 1;
	}
}
.masonry-title {
    color: #fff;
    font-family: var(--font-display);
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

@media (hover: hover) {
	.masonry-item:hover .masonry-title {
	    transform: translateY(0);
	}
}
/* responsive masonry */
@media (max-width: 600px) {
    .masonry-grid { --masonry-gap: 0.6rem; }
    .masonry-item {
        padding: 4px;
    }
    .masonry-item::after {
        top: 2px; bottom: 2px; left: 2px; right: 2px;
    }
    .masonry-overlay {
        top: 4px; bottom: 4px; left: 4px; right: 4px;
        padding: 0.6rem;
    }
}

/* --- SMALL SCREENS --- 768px ---- */
@media (max-width: 768px) {
    .album-header-row { 
        align-items: center; 
        flex-direction: row; 
        justify-content: space-between;
        gap: 0.75rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0.75rem;
        padding-bottom: 0.375rem;
    }
    
    .album-controls { 
        width: auto; 
        justify-content: flex-end;
        flex-shrink: 0;
    }
    
    .nav-arrow { display: none; }
    
    .carousel-item { 
        flex: 0 0 75vw;
        max-width: 320px;
    }
    
    .see-all-link {
        padding: 0.4rem 1.25rem;
    }

    .album-display-title { font-size: 1.05rem; }

}

/* heading font sizing */

.see-all-link { font-size: 0.72rem; letter-spacing: 0.06em; }
.item-meta h4 { font-size: 0.78rem; font-weight: 400; }
.lb-info-title { font-size: 1.1rem; }
.lb-btn { font-size: 0.78rem; letter-spacing: 0.05em; }

.masonry-title { font-size: 0.85rem; }

@supports not (aspect-ratio: 1 / 1) {
    .carousel-frame { height: 350px; }
}

/* --- PAGE STRIP --- */
.page-strip {
    position: relative;
    z-index: 40;
    margin: 0 0 1.25rem;
    background: transparent;
    border-bottom: 3px double var(--border-color);
}
/* this is still ugly */
.folio-line + .page-strip {
    margin-top: -1.25rem;
}
@media (max-width: 768px) {
    .folio-line + .page-strip {
        margin-top: -0.75rem;
    }
}
.page-strip-inner {
    display: flex;
    align-items: center;
    gap: 0.3rem 1.25rem;
    width: 98%;
    max-width: 1800px;
    padding: 0.3rem 0;
    margin: 0 auto;
}
.strip-back,
.strip-support {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    background: transparent;
    font-family: var(--font-nav);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--text-primary);
    text-decoration: none;
    text-shadow: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
@media (hover: hover) {
	.strip-back:hover,
	.strip-support:hover {
	    color: var(--accent);
	    border-color: var(--accent);
	    background: rgba(var(--accent-rgb), 0.08);
	    text-shadow: none;
	}
}
.strip-support {
    margin-left: auto;
}
.strip-support svg {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--accent);
}
.strip-notice {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.35;
    text-align: center;
    color: var(--text-primary);
}
.strip-label {
    margin-right: 0.4em;
    font-style: normal;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    color: #d98a80;
}
[data-theme="light"] .strip-label {
    color: #a3402f;
}
.strip-short {
    display: none;
}

/* below 1000px */
@media (max-width: 999px) {
    .page-strip-inner {
        flex-wrap: wrap;
    }
    .strip-notice {
        flex: 1 1 16rem;
        text-align: left;
    }
    .strip-back ~ .strip-notice {
        order: 3;
        flex-basis: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .page-strip {
        order: -1;
        margin: 0;
    }
    .page-strip-inner {
        width: 100%;
        padding: 0.3rem 0.75rem;
        column-gap: 0.75rem;
    }
    .strip-back,
    .strip-support {
        padding: 0.35rem 0.6rem;
    }
}

/* narrowest phones */
@media (max-width: 364px) {
    .strip-full {
        display: none;
    }
    .strip-short {
        display: inline;
    }
}

/* last album row */
.album-section:last-child {
    margin-bottom: 0;
}
