:root {
    --bg: #0d0d0d;
    --surface: #181818;
    --surface-hover: #202020;
    --text: #f3f3f3;
    --muted: #9b9b9b;
    --accent: #d7cfbf;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}


/* -------------------- */
/* Navigation */
/* -------------------- */

header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, .92);
    backdrop-filter: blur(10px);
}

nav {
    max-width: 1500px;
    margin: auto;
    padding: 28px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    letter-spacing: .08em;
    margin-left: 4%;
}

nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
    margin-right: 4%;
}

nav li {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .18em;
}

nav a {
    transition: .3s;
}

nav a:hover {
    color: var(--accent);
}


/* -------------------- */


/* Hero */


/* -------------------- */

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 110px;
    padding: 140px 8% 80px;
    max-width: 1600px;
    margin: auto;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: 5rem;
    line-height: .88;
    font-weight: 500;
    margin-bottom: 35px;
    margin-left: -5px;
}

.hero-text p {
    color: var(--muted);
    font-size: 1.15rem;
    max-width: 420px;
}

.hero-image {
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 70vh;
    filter: grayscale();
    object-fit: cover;
}


/* -------------------- */


/* Projects */


/* -------------------- */

.projects {
    max-width: 1500px;
    margin: auto;
    padding: 0 8%;
}

.projects h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 4rem;
    font-weight: 500;
    margin-bottom: 60px;
}


/* Optional filter buttons */

.categories {
    display: flex;
    gap: 16px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.categories button {
    background: none;
    color: white;
    border: 1px solid #444;
    padding: 12px 22px;
    cursor: pointer;
    transition: .3s;
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.categories button:hover,
.categories .active {
    background: var(--accent);
    color: #111;
}

/* Horizontal layout */

/* ============================= */
/* Project Grid */
/* ============================= */

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
    row-gap: 70px;
    align-items: stretch;
}

/* ============================= */


/* Project Card */


/* ============================= */

.project-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    overflow: hidden;
    transition: transform .35s ease;
}

/* ============================= */
/* Project Image */
/* ============================= */

.project-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .5s ease;
}

.project-card:hover img {
    transform: scale(1.025);
}


/* ============================= */
/* Project Information */
/* ============================= */

.project-card .overlay {
    position: static;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 25px 0 25px;
    background: none;
}


/* Category */

.project-card .overlay span {
    display: block;
    color: var(--accent);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    margin-bottom: 10px;
}


/* Project title */

.project-card .overlay h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1;
    margin: 0 0 8px;
}


/* Composer / author */

.project-card .overlay p {
    color: var(--muted);
    font-size: .85rem;
    line-height: 1;
    margin: -5px 0 0;
}

.project-card .overlay br {
    display: block;
    content: "";
    margin-bottom: 4px;
}


/* ============================= */
/* Hover */
/* ============================= */

.project-card:hover {
    transform: translateY(-3px);
}


/* ============================= */
/* Tablet */
/* ============================= */

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: 1fr;
        row-gap: 60px;
    }
}


/* ============================= */
/* Mobile */
/* ============================= */

@media (max-width: 600px) {
    .project-grid {
        row-gap: 50px;
    }

    .project-card .overlay {
        padding-top: 18px;
    }

    .project-card .overlay h3 {
        font-size: 2rem;
    }
}


/* -------------------- */
/* About */
/* -------------------- */

.about,
.contact,
.behind {
    max-width: 900px;
    margin: auto;
    padding: 120px 8%;
}

.about h2,
.contact h2,
.behind h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 3.5rem;
    font-weight: 500;
    margin-bottom: 35px;
}

.about p {
    color: var(--muted);
    font-size: 1rem;
}


/* -------------------- */
/* Footer */
/* -------------------- */

footer {
    border-top: 1px solid #222;
    color: #666;
    text-align: center;
    padding: 60px;
}


/* -------------------- */
/* Responsive */
/* -------------------- */

@media (max-width:1100px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        height: 65vh;
    }

    .hero-text h1 {
        font-size: 4.8rem;
    }

    .about {
        padding-top: 150px;
    }
}

@media (max-width:700px) {
    nav {
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }

    nav ul {
        gap: 20px;
        margin-right: 0;
        white-space: nowrap;
    }

    nav li {
        font-size: clamp(0.55rem, 2.5vw, 0.72rem);
        letter-spacing: .08em;
        white-space: nowrap;
    }

    .hero {
        padding: 150px 30px 80px;
    }

    .projects,
    .about,
    .contact {
        padding: 80px 30px;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .projects h2,
    .about h2,
    .contact h2 {
        font-size: 2.8rem;
    }

    .overlay h3 {
        font-size: 2rem;
    }

    .about {
        padding-top: 150px;
    }
}

.social {
    filter: grayscale();
    width: 30px;
    display: inline;
    vertical-align: bottom;
    padding-right: 10px;
}

.social p {
    display: inline;
}


/* ============================= */
/* Project Image Carousel */
/* ============================= */

.carousel {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(5, 5, 5, .96);
    padding: 40px 90px;
}


/* Carousel is visible */

.carousel.open {
    display: flex;
}


/* ============================= */
/* Image & Video */
/* ============================= */

.carousel-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#carousel-image {
    display: none;
    width: 75%;
    height: 75%;
    max-width: 85vw;
    max-height: 82vh;
    object-fit: contain;
}


#carousel-video {

    display: none;

    width: 85vw;
    height: 70vh;

    max-width: 1200px;
    max-height: 675px;

    border: none;

}

/* ============================= */
/* Counter */
/* ============================= */

.carousel-counter {
    margin-top: 18px;
    color: #888;
    font-size: .75rem;
    letter-spacing: .15em;
}


/* ============================= */
/* Buttons */
/* ============================= */

.carousel-close,
.carousel-prev,
.carousel-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: color .25s ease, opacity .25s ease;
}

.carousel-close:hover,
.carousel-prev:hover,
.carousel-next:hover {
    color: var(--accent);
}


/* Close */

.carousel-close {
    top: 25px;
    right: 35px;
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
}


/* Previous */

.carousel-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}


/* Next */

.carousel-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}


/* ============================= */
/* Mobile */
/* ============================= */

@media (max-width: 700px) {
    .carousel {
        padding: 30px 20px;
    }

    #carousel-image {
        max-width: 92vw;
        max-height: 78vh;
    }

    #carousel-video {

        width: 92vw;
        height: 52vw;

        max-height: 70vh;

    }

    .carousel-close {
        top: 15px;
        right: 20px;
        font-size: 2rem;
    }

    .carousel-prev {
        left: 12px;
        font-size: 1.4rem;
    }

    .carousel-next {
        right: 12px;
        font-size: 1.4rem;
    }

    .carousel-counter {
        margin-top: 12px;
        font-size: .65rem;
    }
}

/* ----------------------------- */
/* Behind the Scenes */
/* ----------------------------- */
.behind {
    max-width: 75rem;
    margin: 0 auto;
    columns: 4 auto;
}

.behind img {
    max-width: 100%;
    height: auto;
    padding: 10px 5px;
}

@media (max-width: 960px) {
    .behind {
        columns: 2 auto;
    }
}

@media (max-width: 600px) {
    .behind {
        columns: 1 auto;
    }
}