body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    scroll-behavior: smooth;
}

header {
    background-color: #333;
    color: white;
    padding: 10px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

    nav a:hover {
        color: #ff9900; /* Improved contrast for better visibility */
    }

section {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
    scroll-margin-top: 150px;
}

h1 {
    font-size: 2.5em;
}

.project a, .project a:visited {
    color: blue;
    text-align: center;
}

.project {
    background-color: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #333;
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .project:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

.carousel {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    height: 550px; /* Adjust this as needed */
    margin: 20px auto;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%; /* Ensure the carousel track uses 100% width of the parent container */
}

    .carousel-track img,
    .carousel-track video {
        min-width: 100%; /* Each item takes up 100% of the container's width */
        height: auto; /* Maintain the aspect ratio */
        object-fit: cover;
        border-radius: 8px;
        display: block;
        margin: 0 auto; /* Center the content horizontally */
    }

    /* Center vertically within the carousel */
    .carousel-track img,
    .carousel-track video {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Specific styles for videos */
    .carousel-track video {
        object-fit: contain; /* Maintain aspect ratio without cropping */
        width: 100%;
        height: 100%;
        z-index: 1; /* Ensure video is above the carousel track but below buttons */
    }

        /* Make sure the video controls are above other elements */
        .carousel-track video::-webkit-media-controls {
            z-index: 2;
        }

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2em;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 2; /* Ensure buttons are above video and images */
    border-radius: 50%;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.carousel-btn:focus {
    outline: none;
}

@media (max-width: 768px) {
    header {
        font-size: 1.25em; /* Reduce font size */
        padding: 10px 0; /* Adjust padding to make it more compact */
    }

    nav a {
        font-size: 1em; /* Smaller font size for navigation links */
    }

    .project {
        padding: 15px;
    }

    .carousel {
        height: 300px;
    }

    h1 {
        font-size: 1.25em; /* Adjust font size for smaller screens */
    }

    section {
        padding: 15px;
    }
}

section i {
    margin-right: 10px;
    color: #333;
    font-size: 1.2em;
}
