:root {
    --bg: #000000;
    --color: #ffffff;
    --red: darkred;
    --navy: navy;
    --transition: 0.2s ease;
    --font: 'Nacelle', sans-serif;
    --nav-padding: 20px;
    --main-padding: 40px;
    --gap: 40px;
    --columns: 3;
    --social-gap: 75px;
    --wrap: 1400px;
}

html, body {
    background-color: var(--bg);
}

body {
    font-family: var(--font);
    color: var(--color);
    display: flex;
    flex-direction: column;
}

iframe {
    border: none;
    width: 800px;
    zoom: 0.9;
    height: 90vh;
    position: absolute;
    top: 5%;
    right: 10%;
    left: 26%;
    bottom: 10%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--nav-padding);
    background-color: var(--bg);
    max-width: var(--wrap);
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    z-index: 3;
    transition: padding var(--transition);

    &.scrolled {
        padding: 10px var(--nav-padding);
    }

    .left-header-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .left-header {
        display: flex;
        align-items: center;
        gap: 15px;
        text-decoration: none;
        color: inherit;

        &:hover h1 {
            color: var(--red);
        }
    }

    .breadcrumb {
        font-size: clamp(18px, 2.5vw, 24px);
        font-weight: 700;
        color: var(--color);

        a {
            color: var(--color);
            text-decoration: none;
            transition: color var(--transition);

            &:hover {
                color: var(--red);
            }
        }
    }

    .favicon {
        width: 32px;
        height: 32px;
    }

    h1 {
        font-size: clamp(18px, 2.5vw, 24px);
        font-weight: 700;
        color: var(--color);
        transition: color var(--transition);
    }

    nav {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;

        a {
            text-decoration: none;
            font-size: clamp(13px, 1.5vw, 16px);
            padding: 3px 6px;
            color: var(--color);
            transition: color var(--transition);

            &.active {
                color: var(--red);
            }

            &.zone-highlight {
                color: var(--red);
            }
        }
    }
}

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    padding: var(--main-padding);
    max-width: var(--wrap);
    margin: 0 auto;
    box-sizing: border-box;
    flex: 1;
    align-content: center;
    z-index: 3;
}


.hero-image {
    grid-column: 1 / -1;
    width: clamp(250px, 50%, 520px);
    height: auto;
    margin: 0 auto;
    display: block;
}

.section-title {
    grid-column: 1 / -1;
    font-size: clamp(24px, 4vw, 32px);
    margin-top: 20px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--gap);
    padding-bottom: 100px;
    align-items: center;

    img {
        width: 60%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        object-position: center 10%;
        border-radius: 50%;
        justify-self: center;
    }
}
body.about {
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    --bg: transparent;
    align-content: center;
    
    &::before {
        content: ''; /* required despite empty for these pseudo elements to work realized */
        position: fixed;
        background-image: url('../img/nyc sunset skyline.png');
        background-size: cover;
        background-position: center;
        z-index: 0;
        inset: 0;
        animation: bgFade 1.5s ease forwards;
        animation-delay: 0.5s;
    }

}

@keyframes bgFade {
    from { opacity: 1; }
    to { opacity: 0.6; }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: 20px;
}

.project-item {
    
    animation: fadeUp 1s ease forwards;

    &:nth-child(1) { animation-delay: 0s; }
    &:nth-child(2) { animation-delay: 0.1s; }
    &:nth-child(3) { animation-delay: 0.2s; }
    &:nth-child(4) { animation-delay: 0.3s; }
    &:nth-child(5) { animation-delay: 0.4s; }
    &:nth-child(6) { animation-delay: 0.5s; }

    img {
        transition: transform var(--transition);
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        object-position: center;
        border-radius: 25px;
        display: block;
    }

    &:hover img {
        transform: scale(1.03);
    }

    h3 {
        margin-top: 10px;
        font-size: 18px;
    }
    
}

.project-item h3.highlighted {
    color: var(--red);
    font-weight: 900;
}

#burger_wrapper {
    display: flex;
    align-items: center;
}

#burger {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--color);
}

.social-links a.hovered {
    color: var(--red);
}

footer {
    margin-top: 40px;
    max-width: var(--wrap);
    margin-left: auto;
    margin-right: auto;
    z-index: 3;
    position: fixed;
    bottom: 50px;
    width: 100%;
    align-self: center;

    .social-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--social-gap);
        padding: 20px 0;

        a {
            text-decoration: none;
            color: var(--color);
            transition: color var(--transition);

            &:hover {
                color: var(--red);
            }
        }
    }
}

@media (max-width: 768px) {
    :root {
        --columns: 2;
        --social-gap: 30px;
        --main-padding: 20px;
    }

    .about-grid {
        grid-template-columns: 1fr;

        img {
            width: 50%;
        }
    }
}

@media (max-width: 520px) {
    :root {
        --columns: 1;
        --social-gap: 20px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;

        nav {
            a {
                padding: 6px 6px 6px 0;
            }
        }
    }

    .about-grid img {
        width: 60%;
    }

    .hero-image {
        width: clamp(240px, 85%, 480px);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}