body {
    font-family: Arial, sans-serif;
    margin: 0;
    overflow: hidden; /* Prevent body from scrolling */
}

#toggle-sidebar {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background-color: #333;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#bgVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar {
    width: 200px;
    background-color: rgba(51, 51, 51, 0.8); /* Semi-transparent background */
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1;
    transition: transform 0.3s ease;
}

    .sidebar.closed {
        transform: translateX(-100%);
    }

    .sidebar nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .sidebar nav ul li {
            margin: 0;
        }

            .sidebar nav ul li a {
                display: block;
                padding: 15px;
                text-decoration: none;
                color: white;
                transition: background-color 0.3s;
            }

                .sidebar nav ul li a:hover {
                    background-color: #111;
                }

.content {
    margin-left: 200px;
    padding: 20px;
    height: 100vh;
    overflow-y: auto; /* Enable vertical scrolling */
    transition: margin-left 0.3s ease;
}

    .content.expanded {
        margin-left: 0;
        width: 100%;
    }

.content-overlay {
    position: absolute;
    top: 0;
    left: 200px; /* Adjust for sidebar width */
    width: calc(100% - 200px);
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-box {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

    .welcome-box h1, .welcome-box p {
        margin: 0;
        color: #333;
    }

footer {
    position: relative; /* Change from absolute to relative */
    width: 100%;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    padding: 10px;
    z-index: 1;
}

/* About Me Page Styling */
.about-me {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    margin: 20px;
    border-radius: 10px;
    text-align: center; /* Center text */
}

    .about-me h1, .about-me h2 {
        color: #333;
    }

    .about-me p {
        font-size: 1.2em;
    }

    .about-me ul {
        list-style-type: disc;
        margin-left: 20px;
    }

        .about-me ul li {
            margin: 10px 0;
        }

/* Portfolio Page Styling */
.portfolio-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.portfolio-item {
    position: relative;
    width: 400px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
}

.portfolio-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px;
}

    .portfolio-images img {
        width: 100px;
        height: 100px;
        object-fit: cover;
        border: 1px solid #ccc;
        border-radius: 8px;
        cursor: pointer; /* Add cursor pointer */
    }

.portfolio-video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer; /* Add cursor pointer */
}

.code-overlay {
    background-color: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
}

pre {
    margin: 0;
    white-space: pre-wrap;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 999; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.modal-content, .close {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* The Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

    .close:hover,
    .close:focus {
        color: #bbb;
        text-decoration: none;
        cursor: pointer;
    }

/* Ensure portfolio videos do not autoplay */
.portfolio-video video {
    display: none; /* Hide the video until needed */
}

    .portfolio-video video.autoplay {
        display: block; /* Show the video when it should autoplay */
    }

/* Contact Form Styling */
.contact-form {
    max-width: 600px;
    margin: auto;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

    .contact-form .form-group {
        margin-bottom: 15px;
    }

    .contact-form label {
        font-weight: bold;
    }

    .contact-form .form-control {
        width: 100%;
        padding: 10px;
        font-size: 1.1em;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

        .contact-form .form-control:focus {
            border-color: #007bff;
            box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
        }

    .contact-form button {
        width: 100%;
        padding: 10px;
        font-size: 1.1em;
        color: white;
        background-color: #007bff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.3s;
    }

        .contact-form button:hover {
            background-color: #0056b3;
        }

.alert-success {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100px; /* Narrower sidebar */
    }

    .content {
        margin-left: 100px; /* Adjust content margin for narrower sidebar */
        width: calc(100% - 100px);
    }

    .content-overlay {
        left: 100px; /* Adjust overlay position for narrower sidebar */
        width: calc(100% - 100px);
    }

    .welcome-box {
        padding: 10px; /* Smaller padding for mobile */
    }

    .portfolio-item {
        width: 100%;
    }

    .portfolio-images img {
        width: 80px;
        height: 80px;
    }
}
