/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'courier new';
    background-color: #000000;
    background-image: url('Science_wallpaper.webp');
    background-size: cover;
    overflow-x: hidden;
}

/* Portfolio Container */
.portfolio-container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* Image Grid Layout */
.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns by default */
    gap: 15px;
    width: 100%;
}

/* Image Item Styling */
.image-item {
    position: relative;
    border: 4px ridge #000;
    background-color: #000;
    box-shadow: 2px 2px 10px black;
    border-radius: 3px;
    padding-bottom: 10px; /* space for description */
}
.image-item:hover{cursor: pointer;}
.image-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* Description Styling */
.description {
    text-align: center;
    font-size: 20px;
    margin-top: 10px;
    color: blue;
    font-weight: 500;
}



/* Preview Box Styles */
.preview-box {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    z-index: 9999;
}

.preview-content {
    background-color: #4d4d4d8f;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    border: 2px ridge black;
}

.preview-content img {
    width: 200%;
    height: auto;
    max-width: 750px; /* Max size of the preview image */
    margin-bottom: 10px;
}

.preview-content p {
    font-size: 23px;
    color: #ffffff;
    background-color: #000;
    padding: 4px;
    border: 2px ridge black;
    text-transform: uppercase;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px;
    background-color: rgb(17, 0, 255);
    border: 3px ridge black;
    color: white;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
}


/* Marquee Header */
.marquee {
    width: 100%;
    background-color: rgb(0, 0, 0); /* Semi-transparent background */
    color: white;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    font-size: 24px; /* Default text size */
    position: relative;
    z-index: 1;
    height: 50px;
border-bottom: 3px ridge black;
overflow: hidden;}

.marquee p {
    white-space: nowrap;
    overflow: hidden;
    font-family: 'pauschal';
    display: block;
    animation: marquee 10s linear infinite; /* Adjust timing as necessary */
}
.yy{border: 2px outset rgb(87, 87, 87);
border-radius: 3px;
width: fit-content;
text-transform: uppercase;
font-weight: 700;
box-shadow: 2px 2px 2px black;
background-color: rgba(240, 255, 255, 0.61);
z-index: 3;
margin-bottom: 50px;
margin-top: 20px;
padding: 4px;}

.yy:hover{cursor: pointer;
transform: scale(1.5);}

@keyfrafmes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Mobile & Responsiveness */
@media screen and (max-width: 850px) {
    .marquee p {
        font-size: 20px; /* Smaller text on medium screens */
    }
}

@media screen and (max-width: 600px) {
    .marquee p {
        font-size: 18px; /* Even smaller text on smaller screens */
    }
}

@media screen and (max-width: 480px) {
    .marquee p {
        font-size: 16px; /* Further reduction for very small screens */
    }
}

/* Mobile & Responsiveness */
@media screen and (max-width: 1250px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr); /* 2 columns on medium screens */
    }
}

@media screen and (max-width: 850px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }}
    @media screen and (max-width: 1000px) {
    .preview-content img {
        width: 100%; /* 100% width on smaller screens */
        max-width: 100%; /* No max-width, it scales down */
    }
}
@media screen and (max-width: 600px) {
    .image-grid {
        grid-template-columns: 1fr; /* 2 columns on medium screens */
    }
}


@media screen and (max-width: 480px) {
    .portfolio-container {
        padding: 10px 15px;
    }
    
    .image-grid {
        grid-template-columns: 1fr; /* 1 column on smaller screens */
    }
    
    .image-item {
        margin-bottom: 15px;
    }
}
