@import url('https://fonts.googleapis.com/css2?family=Lilita+One&display=swap');
    @import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap');
    @import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
    @import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Luckiest+Guy&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
    
    :root {
        --primary-bg: #12001f;
        --accent-bg: #40006d;
        --primary-text: #bfff00;
        --secondary-text: #bcd17b;
        --highlight: #bf0fff;
        --navbar-bg: #12001f;
        --navbar-link: #88a0a0;
        --navbar-link-hover: #b7d1d1;
    }

    .lilita-one-regular {
        font-family: "Lilita One", sans-serif;
        font-weight: 400;
        font-style: normal;
    }
    @font-face {
        font-family: Lilita One;
        src: url('https://fonts.googleapis.com/css2?family=Lilita+One&display=swap');
        font-weight: 400;
    }
    
    .body {
        scroll-padding-top: 10;
        margin:0px;
        /*background: rgb(73,73,73);*/
        /*background: linear-gradient(0deg, rgb(27, 27, 27) 0%, rgb(41, 41, 41) 100%);*/
        background: linear-gradient(0deg, var(--accent-bg) 0%, var(--primary-bg) 100%);
    }
        
    .bodyprojects {
        scroll-padding-top: 10;
        margin:0px;
        padding-top: 9vh; /* matches navbar height */
        /*background: rgb(73,73,73);*/
        /*background: linear-gradient(0deg, rgb(27, 27, 27) 0%, rgb(41, 41, 41) 100%);*/
        background: linear-gradient(0deg, transparent -200%, var(--primary-bg) 100%),url("../images/Thumbnails/Thumbnail Example.jpg");
        background-size: cover;
        background-attachment: fixed;
        position: relative;
        /* Remove backdrop-filter from here */
    }

    /* Add a blur overlay for .bodyprojects */
    .bodyprojects::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background: rgba(18,0,31,0.2); /* semi-transparent overlay for blur effect */
        backdrop-filter: blur(35px);
    }
    .logo__navbar { 
        height: 6vh;
        max-height: 100%;
        width: auto;
        max-width: 120px;
        display: block;
    }
    
    .logo {
        width: 100%;
    }
    

    .navbar {
        font-family: "Ubuntu", sans-serif;
        font-weight: 1000;
        font-style: normal;
        display: flex;
        overflow-x: auto;         /* auto is better for mobile */
        overflow-y: hidden;
        flex-wrap: nowrap;
        -ms-overflow-style: none; 
        scrollbar-width: none; 
        top: 0;
        background: var(--navbar-bg);
        position: fixed;
        width: 100%;
        height: 8vh;
        /*filter: drop-shadow(0px 1px 4px #000000);*/        font-size: 2.5vh;
        z-index: 1;
        transition: background .3s;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .navbar a {
        filter: drop-shadow(0px 1px 3px #000000);
        display: block;
        text-align: center;
        position: relative;
        flex: 0 0 auto;           /* Don't shrink */
        min-width: 120px;         /* penis */
        line-height: 8vh;
        text-decoration: none;
        color: var(--navbar-link);
        transition: all 0.3s ease .1s;
        opacity: 0;
        margin-left: 40px;
        animation: fadeInNavbar 0.7s forwards;
    }
    .navbar a:nth-child(1) { animation-delay: 0s; }
    .navbar a:nth-child(2) { animation-delay: 0.1s; }
    .navbar a:nth-child(3) { animation-delay: 0.2s; }
    .navbar a:nth-child(4) { animation-delay: 0.3s; }
    .navbar a:nth-child(5) { animation-delay: 0.4s; }

    @keyframes wave {
        from{ transform: scale(1,1);}
        to { transform: scale(1.1,1.1);}
    }

    @keyframes fadeInNavbar {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .navbar a:first-child {
        flex: 0 0 auto;
        margin-left: 40px;
        margin-right: 40px; /* or whatever spacing you want */
        padding-inline-start: 10px;
        display: flex;
        align-items: center;
    }
    .navbar a:nth-child(2) {
        margin-left: 0;
    }
    .navbar a:hover {
        /*background: rgb(36, 36, 36);*/
        filter: drop-shadow(0px 6px 5px #000000);
        transition: all 0.3s ease .1s;
        color: var(--navbar-link-hover);
        transform: scale(1.1,1.1);
    }

    .sec1 {
        display: flex;
        
        flex-wrap: nowrap;
        top: 0;
        width: 100%;
        height: 100px;
        text-align: center;
        align-items: center;
        justify-content: center;
        transition: height .5s;
        animation: sec1Height 1s ease-in-out;
    }
    @keyframes sec1Height {
        from { height: 200px; }
        to { height: 100px; }
    }

    .sec1 h1 {
        font-family: "Ubuntu", sans-serif;
        font-weight: 1000;
        font-style: normal;
        font-size: 500%;
        color: var(--primary-text);
        filter: drop-shadow(0px 1px 7px #000000);
    }

    .about-wrapper {
        height: 100vh; /* Set to the space you want the sticky to be active */
        position: relative;
    }
    #about {
        position: sticky;
        flex-direction: column;
        top: 8vh; /* Height of your navbar */
        height: 500px;
        text-align: left;
        justify-content: flex-start;
        align-items: flex-start;
        background: inherit;
        animation: fadeIn 1s ease-in-out;
    }

    .about__desc {
        font-family: "Ubuntu", sans-serif;
        font-weight: 400;
        margin-top: 0px;        
        font-style: normal;
        font-size: 30px;
        color: var(--secondary-text);
        filter: drop-shadow(0px 1px 7px #000000);
    }

    .sec2 {
        display: flex;
        flex-wrap: nowrap;
        top: 0;
        width: 100%;
        height: 25%;
        text-align: center;
        align-items: center;
        justify-content: center;
    }
    
    .sec2 h1 {
        font-family: "Ubuntu", sans-serif;
        font-weight: 1000;
        font-style: normal;
        font-size: 30px;
        color: var(--secondary-text);
        filter: drop-shadow(0px 1px 7px #000000);
    }

    .sec2 h2 {
        font-family: "Ubuntu", sans-serif;
        font-weight: 1000;
        font-style: normal;
        font-size: 30px;
        color: var(--secondary-text);
        filter: drop-shadow(0px 1px 7px #000000);
    }

    .section__title {
        font-family: "Ubuntu", sans-serif;
        font-weight: 1000;
        font-style: normal;
        font-size: 400%;
        width: 100%;
        text-align: center;
        color: var(--primary-text);
        filter: drop-shadow(0px 1px 7px #000000);
    }
    
    .projects__wrapper {
        display: flex;
        flex-wrap: wrap;
        margin-top: 20px;
        gap: 10px; /* space between projects */
        width: 100%;
        position: relative;
        justify-content: center; /* optional: center the row */
    }

    .project {
        flex: 1 1 calc(25% - 24px); /* 4 per row, minus gap */
        max-width: calc(25% - 24px);
        aspect-ratio: 1 / 1;        /* makes it a square */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: var(--primary-bg);
        min-width: 180px;           /* optional: prevents too small on mobile */
    }

    .project3D {
        flex: 1 1 calc(25% - 24px); /* 4 per row, minus gap */
        max-width: calc(25% - 24px);
        aspect-ratio: 1 / 1;        /* time to shoot myself */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: var(--primary-bg);
        min-width: 180px;           /* optional: prevents too small on mobile */
        transition: transform 0.3s ease, filter 0.3s ease-in-out;
        position: relative;
    }
    
    .project3D h1{
        font-family: "Ubuntu", sans-serif;
        font-weight: 600;
        font-size: 150%;
        width: 100%;
        font-style: normal;
        color: var(--primary-text);
        text-align: center;
        margin: 0;
        padding: 10px 0 0 0;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        filter: opacity(0);
        pointer-events: none;
    }

    /* replace the hover rule to use a class and a CSS variable for rotation */
    .project3D.hovered {
        transform: scale(1.05) rotate(var(--rot, 0deg));
        filter: drop-shadow(0px 6px 5px #000000);
        transition: transform 0.3s ease, filter 0.3s ease-in-out;
        z-index: 1; /* f***rs wont stop zclipping so here you go */
    }
    
    .project3D.hovered h1 {
        filter: opacity(1);
        transition: filter 0.3s ease-in-out;
    }

    .projectThumbnail{
        width:100%;
        height:100%;
        object-fit:cover;
        border-radius:10px;
        display:block;
        
    }
    
    .project3D.hovered .projectThumbnail {
        filter: brightness(0.7);
        transition: filter 0.3s ease-in-out;
    }

    #toggle {
        display: flex;
        justify-content: center; /* centers horizontally */
        align-items: center;     /* centers vertically (if needed (no)) */
        gap: 16px;               /* optional: space between toggles */
    }
    .section__toggle {
        display: flex;           /* use flex for better centering of span inside */
        align-items: center;
        justify-content: center;
        width: 120px;            /* set a fixed or min width for better appearance */
        height: 40px;            /* set a fixed or min height for better appearance */
        border-radius: 5px;
        background: var(--highlight);
        filter: drop-shadow(0px 1px 7px #000000);
        text-align: center;
        cursor: pointer;
    }

    main {
        max-width: 1100px;
        width: 95%;
        margin: 0 auto;
    }

    @media (max-width: 700px) {
        .projects__wrapper {
            gap: 12px; /* optional: reduce gap for mobile */
        }
        .project3D {
            flex: 1 1 48%;      /* 2 per row on mobile */
            max-width: 48%;
            min-width: 140px;   /* optional: adjust ass needed */
        }
        .navbar {
            opacity: 0;
        }
    }
    @media (max-width: 480px) {
        .project3D {
            flex: 1 1 98%;      /* 1 per row on very small screens */
            max-width: 98%;
            min-width: 120px;
        }
        #about {
            height: 700px; /* Set to the space you want the sticky to be active */
        }
    }

    .project-wrapper {
        height: 100%; /* Set to the space you want the sticky to be active */
        position: relative;
    }
    .projectTitle {
        width: 75%;
        height: 25%;
        background-color: #000000;
    }

    .projImages {
        width: 100%;
        height: 75%;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: fadeIn .5s ease;
    }
    .projImages img {
        border-radius: 15px;
        width: 100%;
        max-width: 700px;

    }
    .projImages button {
    font-family: "Ubuntu", sans-serif;
    font-weight: 600;
    font-size: 450%;
    font-style: normal;
    color: var(--navbar-link-hover);
    text-align: center;
    margin: 0;
    padding: 10px 0 0 0;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    justify-content: center;
    width: 10%;
    border: transparent;
    filter: drop-shadow(0px 1px 5px #000000);
    transition: all 0.3s ease .1s;

    }

    .projImages button:hover {
        filter: drop-shadow(0px 6px 5px #000000);
        transition: all 0.3s ease .1s;
        color: var(--primary-text);
    }

    .proj1 {
        display: flex;
        
        flex-wrap: nowrap;
        top: 0;
        width: 100%;
        height: 400px;
        text-align: center;
        align-items: center;
        justify-content: center;
        transition: height .5s;
    }

    .proj1 h1 {
        font-family: "Ubuntu", sans-serif;
        font-weight: 1000;
        font-style: normal;
        font-size: 500%;
        color: var(--primary-text);
        filter: drop-shadow(0px 1px 7px #000000);
    }

    .fake-bg {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        background: linear-gradient(0deg, var(--accent-bg) 0%, var(--primary-bg) 100%);
        z-index: -1;
        pointer-events: none;
        opacity: 1;
        animation: fadeOut 4s ease 1,
                   fadeInHalf 6s ease 4s infinite alternate;
    }

    .fake-bg.replay {
        animation: fadeOut 4s ease 1,
        fadeInHalf 6s ease 4s infinite alternate;
    }

    @keyframes fadeOut {
        from { opacity: 1; }
        to { opacity: 0; }
    }

    @keyframes fadeInHalf {
        from { opacity: 0; }
        to { opacity: 0.4; }
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }