body {
    margin: 0px;
    font-family: "Lexend Zetta", sans-serif;
}

header {
    width: 100%;
    font-family: "Lexend Zetta", sans-serif;
    position: absolute;
    z-index: 10; 
    background-color: transparent;
    margin: 0;
    
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 36px 24px 36px;
    border-bottom: 1px solid #000;
}

.main-nav a{
    color: #000;
    font-family: "Lexend Zetta";
    font-size: 18px;
    font-style: normal;
    font-weight: 300;
    font-optical-sizing: auto;
    text-decoration-line: none;
    line-height: 1;

    transition: color 0.3s ease, font-weight 0.3s ease;
    padding-bottom: 2px; 
}

.main-nav a:hover {
    color: #0099ff;
    font-weight: 300;
}

.main-nav a[style*="opacity: 0.2;"] {
    pointer-events: none; /* Disable interaction */
    text-decoration: none;
}


.site-title {
    margin: 0;
}

.site-title a{
    color: #000;
    font-family: "Lexend Zetta";
    font-size: 22px;
    font-style: normal;
    font-weight: 300;
    line-height: 1;
    font-optical-sizing: auto;
}

.site-title a:hover {
    color: #0099ff;
    font-weight: 300;
    border-bottom: none;
    text-decoration-line: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    position: relative;
    top: 5px;
}

/* -------------------------------------- */
/* NEW STYLES FOR PROJECT GALLERY */
/* -------------------------------------- */

.project-gallery {
    /* Use CSS Grid to create the layout */
    display: grid;
    /* Create 3 columns of equal size */
    grid-template-columns: repeat(3, 1fr); 
    /* Gap between the grid items */
    gap: 0px; 
    /* Start the gallery content below the header */
    padding-top: 82px; 
    width: 100%;
    margin: 0;
    grid-template-columns: repeat(3, 1fr);
}

.project-item {
    display: block; /* Ensure the link takes up the full grid area */
    position: relative;
    overflow: hidden; /* Important for clean image handling */
    text-decoration: none; /* Remove underline from the link */
    color: inherit;
    /* This ensures a smooth transition on hover */
    transition: transform 0.3s ease; 
    aspect-ratio: 4 / 5;
    width: 100%;
}

.project-item img {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.6s ease;
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;



}

.project-item::after {
    z-index: 1;
}


/* Project text overlay positioning */
.project-info {
    position: absolute;
    bottom: 25px; /* Adjust spacing from the bottom */
    left: 25px; /* Adjust spacing from the left */
    z-index: 5;
    color: white; /* Text color over the dark image background */
    
    /* Using Fustat font for the project info as suggested by your imported fonts */
    font-family: "Fustat", sans-serif; 
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-item:hover .project-info {
    opacity: 1;
}

.project-title {
        color: #FFF;
        font-family: "Lexend Zetta";
        font-size: 18px;
        font-style: normal;
        font-weight: 300;
        line-height: 1.3;
        font-optical-sizing: auto;
        margin-bottom: 1px;
        padding-right: 20px;

}

.project-category {
        font-family: "Fustat", sans-serif;
        font-size: 16px;
        line-height: 1.35;
        margin: 0px;
        letter-spacing: 0.5px;
        padding-left: 1.8px;
        padding-right: 20px;
}


/* Ensure a dark overlay on hover to keep text readable, or simply use the dark images */
/* For a subtle effect, you can dim the image slightly on hover: */
.project-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0); /* Start transparent */
    transition: background-color 0.4s ease;
}

.project-item:hover::after {
    background-color: rgba(0, 0, 0, 0.15); /* Darken slightly on hover */
}


/* -------------------------------------- */
/* MEDIA QUERY FOR RESPONSIVENESS (Mobile/Tablet) */
/* -------------------------------------- */


@media (max-width: 768px) {
    .project-gallery {
        /* On smaller screens, stack projects in a single column */
        grid-template-columns: 1fr;
        padding-top: 69px;
        
    }
    
    .main-nav {
        padding: 12px 18px 16px 18px; /* Reduce padding on mobile */
    }

    .project-info {
        bottom: 15px;
        left: 15px;
        opacity: 1;
    
    }

    .project-item:hover img {
        transform: none;
    }



    .project-title {
        color: #FFF;
        font-family: "Lexend Zetta";
        font-size: 18px;
        font-style: normal;
        font-weight: 300;
        line-height: 1;
        font-optical-sizing: auto;
        margin-bottom: 8px;
        padding-right: 20px;
        
    }

    .project-category {
        font-family: "Fustat", sans-serif;
        font-size: 16px;
        line-height: 1.4;
        letter-spacing: 0.5px;
        padding-left: 3px;
        padding-right: 20px;
    }
}