body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: auto; /* Allow scrolling */
    color: white;
    font-family: 'Montserrat', sans-serif;
    background-color: #000;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Video Background */
#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Darker Overlay for Better Text Contrast */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Increased opacity for better contrast */
    z-index: 0; /* Ensure this is behind clickable elements */
}

header {
    text-align: center;
    padding: 50px 20px;
    position: relative;
    z-index: 1;
}

/* Project Title Styling */
.project-title {
    color: white;
    text-align: center;
    font-size: 2rem; /* Increased size for better visibility */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* Subtle shadow for contrast */
    z-index: 1; /* Set higher z-index */
    margin-bottom: 0.2rem; /* Adjust margin-bottom to reduce gap */
}

/* Project Description Styling */
.project-description {
    color: white;
    text-align: center;
    font-style: italic;
    font-size: 1.1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* Subtle shadow for contrast */
    z-index: 1; /* Set higher z-index */
    margin-top: 0; /* Remove top margin if any */
}

/* 'View Project on GitHub' link */
.github-link {
    display: block; /* Ensures it's a block element */
    padding: 5px 10px;
    border: 2px solid #fff;
    border-radius: 5px;
    background-color: transparent;
    transition: background-color 0.3s;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    text-align: center; /* Centered text */
    margin: 10px auto; /* Center it by using auto margin */
    width: fit-content; /* Ensure the button only takes the width of its content */
    position: relative; /* Ensure it's in the correct stacking context */
    z-index: 1; /* Ensure the link is above the overlay */
}

/* GitHub link hover effect */
.github-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Standard layout for project containers */
.project-box {
    color: white;
    display: flex;
    flex-direction: column; /* Ensure items stack vertically */
    justify-content: flex-start; /* Align items at the start */
    margin-bottom: 2rem;
    gap: 20px;
    z-index: 1;
    text-align: center; /* Center the text */
}

/* Align project section */
.project {
    color: white;
    display: flex;
    flex-direction: column; /* Stack items vertically */
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    width: calc(50% - 10px); /* Ensure two projects fit side by side with a gap */
    text-align: center; /* Center the text */
    z-index: 1;
}

/* Set a fixed height for images and videos */
video, img {
    width: 100%;
    max-width: 500px; /* Set a fixed width */
    max-height: 400px; /* Set a fixed height */
    margin: 0 auto; /* Center the elements */
    object-fit: cover; /* Maintain aspect ratio while filling the fixed size */
    z-index: 1;
}

/* Full-width sections */
.full-width {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .project {
        width: 100%; /* Full width for smaller screens */
    }

    /* Adjust image/video size for smaller screens */
    video, img {
        max-width: 100%;
        max-height: auto;
    }
}

footer {
    margin-top: auto;
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    padding: 10px 20px;
}
