body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    font-size: 18px;
    background-color: #333;
    color: #fff;
    position: relative; /* Ensure the body acts as a reference for absolute positioning */
    overflow-y: auto;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Ensure particles are behind other content */
}

header {
    background-color: #222;
    padding: 20px;
    position: relative; /* Ensure the header stays above particles */
    z-index: 1; /* Ensure the header stays above particles */
}

nav {
    text-align: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

nav li {
    display: inline;
    margin-right: 20px; /* Adjust as needed */
}

nav a {
    text-decoration: none;
    color: #fff; /* Text color */
}

nav ul li a.active {
    border-bottom: 3px solid #fff; /* Add a bottom border to highlight the active tab */
}

.button-container {
    display: flex;
    flex-direction: row; /* Default: Horizontal */
    justify-content: center; /* Center justify horizontally */

    /* Add space between buttons */
    gap: 10px; /* Adjust as needed */
}

.resume-button {
    display: inline-block;
    padding: 20px 40px; /* Default padding */
    background-color: #f0f0f0; /* Pale gray button background color */
    color: #333; /* Text color */
    border-radius: 20px; /* Rounded edges */
    text-decoration: none; /* Remove underline */
    transition: background-color 0.3s ease; /* Smooth transition */
    margin: 0 auto; /* Center align button horizontally */
}

.resume-button:hover {
    background-color: #dcdcdc; /* Darker background color on hover */
}

.home-section {
    text-align: left;
    padding: 50px 20px; /* Reduced horizontal padding */
    position: relative;
    overflow: hidden; /* Ensure the background rectangle doesn't overflow */
}

.content-container {
    max-width: 800px;
    margin: 0 auto; /* Center content horizontally */
    position: relative;
    z-index: 1; /* Ensure the content is above the background rectangle */
}

.home-section::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-color: rgba(51, 51, 51, 0.7); /* Semi-transparent background color */
    z-index: -1; /* Ensure the rectangle is behind the content */
}

.home-section h1 {
    text-align: center; /* Center align the text */
    color: #fff; /* Text color */
}

.home-section h2,
.home-section p {
    margin-bottom: 20px; /* Add spacing between text elements */
}

.home-section img {
    display: block;
    margin: 0 auto 20px; /* Center image horizontally and add space below */
    max-width: 100%; /* Ensure image does not exceed container width */
    height: auto; /* Allow the height to adjust proportionally */
}

.pdf-section {
    width: 80%;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 20px; /* Add margin at the bottom */
}

.pdf-section embed {
    width: 100%;
    height: 100%;
}

.contact-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allow items to wrap to the next line */
}

.contact-item {
    margin: 20px; /* Adjust spacing between items */
    text-align: center;
}

.contact-item img {
    width: 150px; /* Adjust the size of the images as needed */
    height: auto;
}

.portfolio-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(51, 51, 51, 0.7);
    padding: 100px;
}

.project {
    width: 100%;
    margin-bottom: 40px; /* Adjust as needed for spacing between projects */
    background-color: rgba(100, 100, 100, 0.7);
    border-radius: 10px;
    padding: 10px;
}

.project img {
    display: block; /* Ensure the image is centered */
    margin: 0 auto;
    max-width: 80%;
    height: auto;
    border-radius: 10px;
}

.project-content {
    padding: 10px;
}

.project-content h2 {
    margin-top: 0;
}

.project-content p {
    margin-bottom: 0;
}

/* Media query for desktop screens */
@media screen and (min-width: 768px) {
    .home-section {
        padding: 50px 400px; /* Increased padding for larger screens */
    }

    .home-section img {
        max-width: 60%; /* Reduce image size on desktop */
        height: auto; /* Ensure image height scales proportionally */
    }

    body {
        font-size: 26px; /* Increase text size for desktop */
    }

    .contact-item img {
        width: 200px; /* Increase width of icons on desktop */
    }

    .project {
        margin-bottom: 80px;
    }

    .project img {
        max-width: 50%;
    }
}

@media screen and (max-width: 767px) {
    nav ul {
        display: flex;
        justify-content: center;
    }

    nav li {
        display: inline-block;
        margin: 0 10px; /* Adjust spacing between items */
    }

    .resume-button {
        padding: 10px 20px; /* Decrease padding for smaller screens */
    }

    .button-container {
        flex-direction: column; /* Vertical on smaller screens */
        align-items: center; /* Center align vertically */
    }

    .portfolio-section {
        padding: 30px; /* Adjusted padding for mobile */
    }
}

main {
    padding: 0;
    position: relative; /* Ensure the main content stays above particles */
    z-index: 1; /* Ensure the main content stays above particles */
}
