@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&family=Outfit:wght@400;700&display=swap');

:root {
    --bg-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #666666;
    --border-color: #eeeeee;
    --accent-color: #3b82f6;
    --card-bg: #f9f9f9;
    --header-bg: rgba(255, 255, 255, 0.9);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #050505;
        --text-primary: #ffffff;
        --text-secondary: #888888;
        --border-color: #1a1a1a;
        --card-bg: #0c0c0c;
        --header-bg: rgba(5, 5, 5, 0.85);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    height: 100vh;
    overflow: hidden;
}

body.no-scroll main {
    height: calc(100vh - 80px);
    /* Adjust based on header height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5%;
    overflow: hidden;
}

body.no-scroll footer {
    display: none;
}

/* Header */
header {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
}

#main-nav {
    display: flex;
    gap: 2rem;
}

#main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    transition: var(--transition);
}

#main-nav a:hover,
#main-nav a.active {
    color: var(--text-primary);
}

/* Main Container */
main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 5% 5rem 5%;
}

/* Landing Page */
.landing-page {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.landing-hero {
    display: flex;
    gap: 6rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
}

.hero-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-btn {
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    padding: 1.5rem 3rem;
    transition: var(--transition);
    background: transparent;
}

.hero-btn:hover {
    background: var(--card-bg);
    border-color: var(--text-secondary);
}

.hero-btn span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.hero-btn strong {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 0.25rem;
}

/* TEMPORARY — remove with grad booking CTA in script.js */
.hero-btn--cornell {
    border-color: rgba(179, 27, 27, 0.4);
}

.hero-btn--cornell strong {
    color: #b31b1b;
}

.hero-btn--cornell:hover {
    border-color: rgba(179, 27, 27, 0.65);
    background: rgba(179, 27, 27, 0.05);
}

@media (prefers-color-scheme: dark) {
    .hero-btn--cornell {
        border-color: rgba(232, 93, 93, 0.35);
    }

    .hero-btn--cornell strong {
        color: #e85d5d;
    }

    .hero-btn--cornell:hover {
        border-color: rgba(232, 93, 93, 0.55);
        background: rgba(232, 93, 93, 0.08);
    }
}

.featured-preview {
    flex: 0 1 auto;
    position: relative;
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.featured-preview img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.featured-label {
    position: absolute;
    bottom: -1.75rem;
    right: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: right;
    white-space: nowrap;
}

/* Detail Page Headers */
.detail-page-header {
    margin-bottom: 2.25rem;
    padding-bottom: 0.5rem;
}

.breadcrumb {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.detail-page-header + .grid-category-header,
.detail-page-header + .photo-mini-albums-section > .grid-category-header:first-child,
.detail-page-header + .photo-bundles-section > .grid-category-header:first-child {
    margin-top: 0;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--text-primary);
}

.subpage-nav-wrap {
    position: relative;
}

.subpage-nav-caret {
    display: none;
}

.subpage-nav {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.subpage-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.subpage-nav a.active {
    color: var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
}

@media (hover: hover) and (pointer: fine) {
    .subpage-nav a:hover {
        color: var(--text-primary);
        border-bottom: 2px solid var(--text-primary);
    }
}

/* Category Headers in Grid */
.grid-category-header {
    font-size: 1rem;
    margin: 2.5rem 0 2rem 0;
    border-left: 3px solid var(--border-color);
    padding-left: 1.5rem;
}

.grid-category-header h2,
h2.grid-category-header {
    font-family: var(--font-heading);
    font-size: 1.5em;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 2rem 1.5rem;
    font-family: var(--font-main);
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: none;
}

/* Artwork Grid */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 4rem;
    margin-bottom: 6rem;
}

/* Center-aligned grid override (e.g. single centered pieces) */
.artwork-grid.align-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 6rem;
}

.artwork-grid.align-center .artwork-card {
    flex: 0 1 380px;
    max-width: 480px;
}

.artwork-card {
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.card-image {
    width: 100%;
    background: transparent;
    margin-bottom: 1.25rem;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    aspect-ratio: auto;
}




.card-info h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-info .card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-info .card-subtitle a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.view-process-link {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: underline;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-underline-offset: 4px;
    transition: var(--transition);
}

/* Progress Page */
.progress-header {
    text-align: center;
}

.progress-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1;
}

.progress-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 2.5rem;
    max-width: 1100px;
    margin: 0 auto 5rem;
    padding: 0 5%;
    align-items: start;
}

@media (min-width: 900px) {
    .progress-grid:not([data-count="1"]):not([data-count="2"]) {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1280px;
    }
}

.progress-grid[data-count="1"] {
    grid-template-columns: minmax(0, min(560px, 100%));
    justify-content: center;
}

.progress-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
}

.progress-step {
    width: 100%;
}

.progress-step img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

/* Photos — year view mini-albums */
.photo-mini-albums-section {
    margin-bottom: 5rem;
}

.photo-mini-album {
    max-width: 920px;
    margin: 0 auto 4rem;
    padding: 0 5%;
}

.photo-mini-album-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.photo-mini-album-header h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin-bottom: 0.2rem;
}

.photo-mini-album-header p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.photo-mini-album-all {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
}

.photo-mini-album-viewer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
}

.photo-mini-album-nav {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.photo-mini-album-nav:hover {
    background: var(--text-primary);
    color: var(--bg-color);
}

.photo-mini-album-stage {
    position: relative;
    cursor: zoom-in;
    background: var(--card-bg);
    min-height: min(52vh, 480px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.photo-mini-album-stage img {
    max-width: 100%;
    max-height: min(52vh, 480px);
    width: auto;
    height: auto;
    display: block;
}

.photo-mini-album-counter {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--header-bg);
    padding: 0.35rem 0.5rem;
}

.photo-mini-album-strip {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 1rem 0 0.25rem;
    margin-top: 0.25rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent, #000 1.5rem, #000 calc(100% - 1.5rem), transparent);
}

.photo-mini-album-strip-thumb {
    flex: 0 0 auto;
    width: 76px;
    height: 57px;
    padding: 0;
    border: 2px solid transparent;
    background: var(--card-bg);
    cursor: pointer;
    opacity: 0.45;
    scroll-snap-align: center;
    transition: var(--transition);
    overflow: hidden;
}

.photo-mini-album-strip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.photo-mini-album-strip-thumb.active,
.photo-mini-album-strip-thumb:hover {
    opacity: 1;
    border-color: var(--text-primary);
}

/* Photos — shared / medium bundles / full album */
.photos-page-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.photos-page-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.photo-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.photo-album-card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: var(--transition);
}

.photo-album-card:hover {
    transform: translateY(-4px);
}

.photo-album-card-cover {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--card-bg);
    margin-bottom: 1rem;
}

.photo-album-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.photo-album-card-info h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.photo-album-card-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.photo-album-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2rem;
    max-width: 1280px;
    margin: 0 auto 5rem;
    padding: 0 5%;
}

@media (min-width: 900px) {
    .photo-album-detail-grid:not([data-count="1"]):not([data-count="2"]) {
        grid-template-columns: repeat(3, 1fr);
    }
}

.photo-album-detail-cell {
    cursor: pointer;
}

.photo-album-detail-cell img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.photo-album-detail-cell:hover img {
    transform: scale(1.01);
}

.photo-bundles-section {
    margin-bottom: 4rem;
}

.photo-album-bundle {
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    background: var(--card-bg);
}

.photo-album-bundle-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.photo-album-bundle-cover {
    width: 120px;
    flex-shrink: 0;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--bg-color);
}

.photo-album-bundle-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.photo-album-bundle-meta h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.photo-album-bundle-meta p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.photo-album-bundle-toggle {
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    flex-shrink: 0;
}

.photo-album-bundle-body {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.photo-album-bundle-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1.25rem 0;
}

@media (min-width: 768px) {
    .photo-album-bundle-preview {
        grid-template-columns: repeat(6, 1fr);
    }
}

.photo-album-bundle-thumb {
    cursor: pointer;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--bg-color);
}

.photo-album-bundle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.photo-album-bundle-link {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-primary);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.98);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.modal-content img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-primary);
    opacity: 0.5;
    transition: var(--transition);
    z-index: 3000;
}

.close-modal:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.modal-btn {
    font-size: 3rem;
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.3;
    transition: var(--transition);
    pointer-events: auto;
}

.modal-btn:hover {
    opacity: 1;
}

/* About Page */
.about-page {
    display: flex;
    align-items: center;
    gap: 8rem;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

.about-header {
    flex: 0 1 auto;
}

.about-header h1 {
    font-family: var(--font-heading);
    font-size: 8rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 0.85;
    white-space: nowrap;
}

.about-content {
    flex: 1;
    font-size: 1.1rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
}

.about-content p {
    line-height: 1.7;
}

.about-content strong {
    color: var(--text-primary);
}

.contact-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.contact-section h3 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.contact-links {
    display: flex;
    gap: 2rem;
}

.contact-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.contact-link:hover::after {
    width: 100%;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.artwork-card {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Base stagger delays */
.artwork-card:nth-child(1) {
    animation-delay: 0.1s;
}

.artwork-card:nth-child(2) {
    animation-delay: 0.2s;
}

.artwork-card:nth-child(3) {
    animation-delay: 0.3s;
}

.artwork-card:nth-child(4) {
    animation-delay: 0.4s;
}

.artwork-card:nth-child(5) {
    animation-delay: 0.5s;
}

.artwork-card:nth-child(6) {
    animation-delay: 0.6s;
}

@media (max-width: 1024px) {
    main {
        padding-top: 1.25rem;
    }

    .detail-page-header {
        margin-bottom: 1.75rem;
        padding-bottom: 0.25rem;
    }

    .breadcrumb {
        margin-bottom: 0.5rem;
    }

    body.no-scroll {
        height: auto;
        overflow: auto;
    }

    body.no-scroll main {
        height: auto;
        padding: 4rem 5% 5rem 5%;
        display: block;
    }

    .landing-hero {
        flex-direction: column;
        gap: 4rem;
        text-align: center;
    }

    .hero-btn strong {
        font-size: 1.8rem;
    }

    .hero-btn {
        padding: 1rem 2rem;
    }

    .landing-page {
        height: auto;
        min-height: calc(100vh - 120px);
        padding: 1rem 0;
        justify-content: flex-start;
    }

    .featured-preview img {
        max-height: 45vh;
    }

    .subpage-nav-wrap--scrollable .subpage-nav {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .subpage-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
    }

    .subpage-nav::-webkit-scrollbar {
        display: none;
    }

    .subpage-nav a {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .subpage-nav-caret:not([hidden]) {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        align-items: center;
        justify-content: center;
        width: 1.75rem;
        height: 2.25rem;
        padding: 0;
        border: none;
        cursor: pointer;
        color: var(--text-secondary);
        font-size: 1.35rem;
        line-height: 1;
        background: linear-gradient(
            to right,
            var(--bg-color) 55%,
            transparent
        );
        transition: color var(--transition), opacity var(--transition);
    }

    .subpage-nav-caret--prev:not([hidden]) {
        left: 0;
    }

    .subpage-nav-caret--next:not([hidden]) {
        right: 0;
        background: linear-gradient(
            to left,
            var(--bg-color) 55%,
            transparent
        );
    }

    .subpage-nav-caret:not([hidden]):hover {
        color: var(--text-primary);
    }

    .artwork-grid {
        grid-template-columns: 1fr;
    }

    .about-page {
        flex-direction: column;
        gap: 3rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .about-header h1 {
        font-size: 4rem;
        white-space: normal;
    }

    .about-content {
        font-size: 1.25rem;
    }

    .progress-grid,
    .progress-grid:not([data-count="1"]):not([data-count="2"]) {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .progress-grid[data-count="2"] {
        grid-template-columns: 1fr;
    }

    .progress-title {
        font-size: 2.5rem;
    }

    .photo-album-detail-grid,
    .photo-album-detail-grid:not([data-count="1"]):not([data-count="2"]) {
        grid-template-columns: 1fr;
    }

    .photo-album-bundle-header {
        flex-wrap: wrap;
    }

    .photo-album-bundle-cover {
        width: 100%;
        max-width: 160px;
    }

    .photo-mini-album-viewer {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .photo-mini-album-nav {
        display: none;
    }

    .photo-mini-album-stage {
        min-height: 40vh;
    }
}

/* Inktober Special Grid */
.inktober-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 10rem;
    width: 100%;
}

.inktober-row {
    display: grid;
    gap: 2rem;
    width: 100%;
    align-items: stretch;
}

.inktober-row-1 {
    grid-template-columns: repeat(12, 1fr);
}

.inktober-row-1 .inktober-card:nth-child(1),
.inktober-row-1 .inktober-card:nth-child(2) {
    grid-column: span 3;
}

.inktober-row-1 .inktober-card:nth-child(3) {
    grid-column: span 6;
}

.inktober-row-2 {
    grid-template-columns: repeat(12, 1fr);
}

.inktober-row-2 .inktober-card {
    grid-column: span 4;
}

.inktober-row-3 {
    grid-template-columns: repeat(12, 1fr);
}

.inktober-row-3 .inktober-card {
    grid-column: span 3;
}

.inktober-card {
    width: 100%;
}

.inktober-card .card-image {
    height: 100%;
    margin-bottom: 1rem;
    background: #111;
    border: 1px solid var(--border-color);
}

.inktober-row-1 .inktober-card:nth-child(1) .card-image,
.inktober-row-1 .inktober-card:nth-child(2) .card-image {
    aspect-ratio: 3 / 4;
}

.inktober-row-1 .inktober-card:nth-child(3) .card-image {
    aspect-ratio: 16 / 9;
}

.inktober-row-3 .inktober-card .card-image {
    aspect-ratio: 2 / 3;
    /* Taller as requested */
}

.inktober-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.inktober-card .card-info h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.inktober-card .card-info p {
    display: none;
    /* Hide 'Ink' labels as requested */
}

@media (max-width: 900px) {
    .inktober-row {
        grid-template-columns: 1fr !important;
    }

    .inktober-card .card-image {
        aspect-ratio: auto !important;
    }
}

/* Generic Row Layout for custom layouts.json overrides */
.row-layout-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 6rem;
    width: 100%;
}

.row-layout-row {
    display: grid;
    /* auto-fit automatically maps columns equally based on node count */
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    align-items: stretch; /* Stretch makes all cards equal height natively */
}

.row-layout-card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.row-layout-card .card-image {
    width: 100%;
    flex: 1; /* Automatically force the image container to fill remaining space */
    margin-bottom: 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    display: flex;
}

.row-layout-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Flexibly crops the 5% difference organically */
    display: block;
}

.row-layout-card .card-info h4 {
    font-size: 0.8rem;
    opacity: 0.8;
}

@media (max-width: 900px) {
    .row-layout-row {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        grid-template-columns: 1fr;
    }
}

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-primary);
    color: var(--bg-color);
    width: 3rem;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}