body{
    margin: 0;
    padding: 0;
    font-family: system-ui, Arial, sans-serif;
    color: #333;
    background-color: #f9f9f9;
}
img{
    max-width: 100%;
    border: 0;
}
.gallery{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1rem;
    padding: 1rem 0;
}
.gallery img{
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 3/ 4;
    object-fit: cover;
}
.lightbox{
    position: relative;
    max-width: min(90vw, 1400px);
    max-height: 90vh;
    padding: 2.5rem 1rem 1rem;
    border: 0;
    background: transparent;
}
.lightbox::backdrop{
    background: rgb(0 0 0 / 85%);
}
.lightbox img{
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 3.5rem);
    margin: 0 auto;
    object-fit: contain;
}
.lightbox-close{
    position: absolute;
    top: 0;
    right: 0;
    border: 0;
    background: transparent;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
.container{
    max-width: 1600px;
    margin: 0 auto;
}
.mobile{
    display: block;
    width: 300px;
    margin: auto; 
}
header{
    padding: 1rem;

    h1{
        font-size: clamp(2rem, 7vw, 7rem);
        line-height: 1;
        text-transform: uppercase;
    }
    a{
        color: #333;
        text-decoration: none; 
    }
}
h1, h2, h3, h4{
    font-weight: normal;
}
h3{
    font-size: 1.5rem;
}

section, 
footer{
    padding: 2rem 1rem;
    line-height: 1.5;
    background: #2c4143;
    color: #fff;
    box-shadow: 0 0 100px rgba(50,50,50,0.8) inset;
    margin-bottom: 1rem;

    /* p, li{
    font-size: 1.125rem;
} */
    p{
        max-width: 100ch;
    }
}
footer a{
    text-decoration: none;
    color: #fff;
    transition: 0.3s ease;
}
footer a:hover{
    text-decoration: underline;
    color: #ccc;
}

main > section:nth-of-type(even){
    background-color: #eaf2f2;
    color: #333;
        /* box-shadow: 0 0 100px rgba(255,255,255,0.8) inset; */
    box-shadow: none;
}
.credits{
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}
.credits li{
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(50,50,50,0.2);
}
/* .credits li span:first-child{
    font-weight: bold;
} */

.profile-links{
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}
.profile-links a{
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 220px;
    min-height: 100px;
    padding: 1rem;
    border: 1px solid #fff;
    color: #fff;
}
.profile-links a:hover,
.profile-links a:focus-visible{
    background: #3d595b;
}
.profile-links img{
    display: block;
    max-width: 100%;
    max-height: 55px;
}
.portrait-frame{
    display: block;
    max-width: 100%;
    line-height: 0;
}

@keyframes header-fade-in{
    from{ opacity: 0; }
    to{ opacity: 1; }
}

@media only screen and (min-width: 1024px) and (prefers-reduced-motion: no-preference){
    header h1,
    header h2,
    header .agent{
        animation: header-fade-in 1s ease both;
    }
    header h2{
        animation-delay: 0.6s;
    }
    header .agent{
        animation-delay: 1.2s;
    }
    .special-portrait{
        transition: transform 0.8s ease, opacity 1.8s ease;
    }
    .special-portrait.awaiting-reveal{
        opacity: 0;
        transform: translateX(100px);
    }
}

@media only screen and ( min-width: 1024px ) {
    .mobile{
        display: none;
    }
    header{
        background-image: url('images/graham-pountney.jpg');
        background-size: cover;
        background-position: center left;
        background-repeat: no-repeat;
        display: grid;
        color: white;
        padding: 1rem; 
        grid-template-columns: 1fr 1fr;
        min-height: 600px;

        h1, h2{
            margin-block: 0;
        }
        a{
            color: white;
        }
    }
    .header-content{
        grid-column: 2 / 3;
        display: grid;
        grid-template-columns: 3fr 2fr;
        gap: 2rem;
        align-items: flex-end;
    }
    .agent{
        grid-column: 2 / 3;
        grid-row: 2 / 3   ;
        line-height: 1;
        align-items: flex-end;
        display: grid;

        p{
            margin-block: 0.5rem;
        }
    }
    .gallery{
        grid-template-columns: repeat(8, 1fr);
}
    section, 
    footer {
        padding: 2rem 3rem; 
    }
    .credits li{
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }
    #about{
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 3rem;
    }
    .casting-types{
        grid-column: 1;
    }
    .profile-links{
        grid-column: 2;
        grid-row: 1 / 3;
        flex-direction: column;
        flex-wrap: nowrap;
        margin: 0;
    }
    .profile-links a{
        width: 160px;
        min-height: 70px;
    }
    .profile-links img{
        width: 110px;
        height: 40px;
        object-fit: contain;
    }
    section.special{
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 0;

        div:nth-child(2){
            align-items: flex-end;
            display: flex;
            justify-content: center;
            overflow: hidden;
    }
        div:nth-child(1){
            padding: 2rem 3rem; 
        }

} 


@media screen and (orientation:landscape)
and (min-width: 1300px) {
    header{
        min-height: 65svh;
        grid-template-columns: 2fr 3fr;
    }
    .gallery{
    grid-template-columns: repeat(8, 1fr);
    }

} 
} 