/* =========================
   ROOT / VARIABLES
========================= */
:root {
    --bg-color: #f5f5f5;
    --text: #181808;
    --highlight: #effe21;
}

/* =========================
   BASE ELEMENTS
========================= */

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Crimson Pro", serif;
    font-style: normal;
    font-weight: 400;
    background-color: var(--bg-color);
    color: var(--text);
    font-size: 18px;
}

h1 {
    font-size: 48px;
    margin: 0;
}

ul {
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

ul li a {
    font-size: 24px;
    color: var(--text);
    text-decoration: underline;
    text-align: center;
}

ul li a:hover {
    text-decoration: none;
}
.selected {
    background-color: var(--highlight);
}

/* =========================
   LAYOUT
========================= */
.content {
    max-width: 1248px;
    margin: 0 auto;
    padding: 48px 24px;
}

/* =========================
   HEADER
========================= */
.header h1 {
    margin-bottom: 24px;
}

.header nav {
    margin-bottom: 24px;
}

/* =========================
   PROJECT HEADER
========================= */
.project-header img,
.project-header iframe {
    width: 100%;
    height: 50vh;
    object-fit: cover;
    display: block;
    margin-bottom: 24px;
}

.project-header nav {
    margin-bottom: 24px;
}

.project-header {
    width: 100%;
    object-fit: cover;
    display: block;
    margin-bottom: 24px;
}

/* =========================
   PROJECT DESCRIPTION
========================= */
.project-description h1 {
    margin-bottom: 24px;
}

.project-description p {
    margin: 0 0 24px 0;
    max-width: 75%;
}

.project-description p {
    margin: 0 0 24px 0;
    max-width: 70%;
}

/* =========================
   HOME LAYOUT
========================= */

.home-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.project-header.home {
    width: 30%;
    flex-shrink: 0;
    margin-bottom: 0;
    align-self: stretch;
}

.project-header.home img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
}

.project-description.home {
    flex: 1;
}

/* =========================
   GALLERY GRID
========================= */

.gallery-grid {
    margin-top: 32px;
    column-count: 3;
    column-gap: 1rem;
}

.gallery-item {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    margin-bottom: 1rem;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;

    transform: scale(1);
    transition: transform 0.25s ease;
    will-change: transform;
}

@media (max-width: 900px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }
}

/* =========================
   POSTER GRID
========================= */
.poster-grid {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
    justify-items: center;
}

.poster-grid-short {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(auto-fit, 200px);
    gap: 25px;
    justify-content: start;
}

.poster {
    width: 100%;
    max-width: 200px;
    position: relative;

    transform: translateY(var(--offset, 0px)) rotate(var(--rotation, 0deg)) scale(var(--scale, 1));

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    cursor: pointer;
}

.poster:hover {
    transform: rotate(0deg) scale(1.08);
    z-index: 50;
}

/* =========================
   SCREENREADER
========================= */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================
   LIGHTBOX
========================= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;

    z-index: 999;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* =========================
   MOBILE TWEAKS
========================= */
@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }

    ul li a {
        font-size: 18px;
    }

    ul {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    .content {
        padding: 24px 16px;
    }

    .project-description h1 {
        margin-bottom: 24px;
    }

    .project-description p {
        max-width: 100%;
        font-size: 18px;
        line-height: 1.6;
    }

    .poster-grid {
        margin-top: 48px;
        gap: 12px;
    }

    .poster {
        width: 100%;
        max-width: 200px;
    }

    .poster:hover {
        transform: none;
    }

    .lightbox img {
        max-width: 98vw;
        max-height: 90vh;
    }
    
    .home-layout {
    display: block;
    gap: 48px;
    align-items: flex-start;
}
}
