:root {
    --warm-off-black: #1a1917;
    --warm-off-white: #f8f5f2;
}

/* Container for the noise effect section */
.noise_animation {

    position: relative;
    font-family: "PP Neue Montreal", sans-serif;
    font-weight: 700;
    font-size: 18px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #111; /* Dark gold base color */
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: var(--warm-off-white);
    overflow: hidden;
    padding: 40px 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;

}

/* Top gradient fade effect */
.noise_animation::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, var(--warm-off-black) 0%, rgba(26, 25, 23, 0) 100%);
    z-index: 101;
    pointer-events: none;
}

/* Animated noise effect contained within the div */
.noise_animation::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: transparent
    url("http://assets.iceable.com/img/noise-transparent.png") repeat 0 0;
    background-size: 300px 300px;
    -webkit-animation: noise-animation 0.3s steps(5) infinite;
    animation: noise-animation 0.3s steps(5) infinite;
    opacity: 0.9;
    will-change: transform;
    z-index: 100;
    pointer-events: none;
}

@keyframes noise-animation {
    0% {
        transform: translate(0, 0);
    }
    10% {
        transform: translate(-2%, -3%);
    }
    20% {
        transform: translate(-4%, 2%);
    }
    30% {
        transform: translate(2%, -4%);
    }
    40% {
        transform: translate(-2%, 5%);
    }
    50% {
        transform: translate(-4%, 2%);
    }
    60% {
        transform: translate(3%, 0);
    }
    70% {
        transform: translate(0, 3%);
    }
    80% {
        transform: translate(-3%, 0);
    }
    90% {
        transform: translate(2%, 2%);
    }
    100% {
        transform: translate(1%, 0);
    }
}

/* Container for centering content in the noise section */
.noise_animation .container {
    width: 100%;
    height: 80vh;
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    position: relative;
}

/* Background image contained within noise_animation */
#background-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

#background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.2);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
}

/* Projects Container */
.projects-container {
    width: 100%;
    position: relative;
    z-index: 10;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    text-align: center;
    padding-top: 30px; /* Add more padding at the top for better fade effect */
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Create 2 equal columns */
    grid-gap: 20px 40px; /* Row gap of 20px, column gap of 40px */
}


.projects-container::-webkit-scrollbar {
    display: none;
}

/* Adjust individual project items if needed */
.project-item {
    text-align: center;
    margin: 65px;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Make sure project items span only 1 column */
.project-item {
    grid-column: auto;
}

/* Add responsive behavior for smaller screens */
@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr; /* Switch to single column on mobile */
    }
}

.project-title,
.project-year {
    font-size: 1.8rem;
    position: relative;
    z-index: 2;
    mix-blend-mode: exclusion;
}

.project-item::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--warm-off-white);
    z-index: 1;
    pointer-events: none;
    transition: height 0.2s cubic-bezier(0.445, 0.05, 0.55, 0.95) 0s;
}

.project-item:hover::before {
    height: 100%;
}

.project-item:not(:hover)::before {
    transition-duration: 0.8s;
}

@media (max-width: 768px) {
    .project-title,
    .project-year {
        font-size: 1.4rem;
    }

    .noise_animation::after {
        height: 60px; /* Smaller gradient on mobile */
    }
}

@media (max-width: 480px) {
    .project-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}