@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* Ensure the body and html take up the full height */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
}

/* Flexbox layout for the body to ensure footer sticks to the bottom */
body {
    display: flex;
    flex-direction: column;
}

/* Flex-grow for the main content to take up remaining space */
main {
    flex: 1;
    padding: 2rem;
    margin: 1rem 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-in-out;
    overflow-y: auto; /* Enable scroll bar */
}

/* Navigation styles */
nav {
    background: #000000; /* Removed gradient */
    color: #fff;
    padding: 1rem; /* Adjusted padding */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .nav-left {
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex; /* Ensure horizontal layout on desktop */
    justify-content: center; /* Center the items */
    margin: 0;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s, transform 0.3s;
}

nav ul li a:hover {
    color: #bdbdbd;
    transform: scale(1.1);
}

/* Home section styles */
#home {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #000000, #424242);
    color: #fff;
    animation: fadeIn 1s ease-in-out;
    overflow-y: auto; /* Enable scroll bar */
}

#home h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#home p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

#home button {
    padding: 0.75rem 1.5rem;
    background-color: #424242;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.3s;
    margin: 0.5rem; /* Add margin between buttons */
}

#home button:hover {
    background-color: #000000;
    transform: scale(1.05);
}

/* About section styles */
#about {
    padding: 2rem;
    overflow-y: auto; /* Enable scroll bar */
}

#about .profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

#about .badge {
    width: 100px;
    height: auto;
    margin-right: 10px; /* Add margin between badges */
}

/* Project styles */
.project {
    margin-bottom: 1rem;
    animation: fadeIn 1s ease-in-out;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 1rem;
    background-color: #f9f9f9;
}

.project h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.project-content {
    display: none;
    margin-top: 1rem;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.toggle-btn:hover {
    transform: scale(1.1);
}

/* Form styles */
form {
    display: flex;
    flex-direction: column;
}

form label {
    margin-top: 1rem;
}

form input, form textarea {
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form button {
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #000000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #424242;
}

/* Responsive styles */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        width: 60%;
        background-color: #000;
        padding: 0;
        z-index: 1000;
    }

    nav ul.open {
        display: flex;
    }

    nav ul li {
        display: block;
        margin: 0;
        text-align: left;
        padding: 1rem;
    }

    .burger-menu {
        display: block; /* Ensure burger menu is visible in mobile view */
    }

    .burger-menu.open + ul {
        display: flex;
    }

    main {
        padding: 1rem;
        margin: 0.5rem 0;
    }

    #home {
        padding: 2rem 1rem;
    }

    #home h2 {
        font-size: 2rem;
    }

    #home p {
        font-size: 1rem;
    }

    #home button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    #about {
        padding: 1rem;
    }

    #about .profile-pic {
        width: 100px;
        height: 100px;
    }

    .project {
        padding: 0.5rem;
    }

    .project h3 {
        font-size: 1.2rem;
    }

    .project-content {
        font-size: 0.875rem;
    }

    form input, form textarea {
        font-size: 0.875rem;
    }

    form button {
        font-size: 0.875rem;
    }
}

@media (min-width: 769px) {
    nav ul {
        display: flex; /* Ensure nav bar is displayed in desktop view */
        flex-direction: row;
        position: static;
        height: auto;
        width: auto;
        background-color: transparent;
        margin-left: auto;
    }

    nav ul li {
        display: inline;
        margin: 0 1rem;
        text-align: center;
        padding: 0;
    }

    .burger-menu {
        display: none;
    }

    main {
        padding: 2rem;
        margin: 1rem 0;
    }

    #home {
        padding: 4rem 2rem;
    }

    #home h2 {
        font-size: 2.5rem;
    }

    #home p {
        font-size: 1.2rem;
    }

    #home button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    #about {
        padding: 2rem;
    }

    #about .profile-pic {
        width: 150px;
        height: 150px;
    }

    .project {
        padding: 1rem;
    }

    .project h3 {
        font-size: 1.5rem;
    }

    .project-content {
        font-size: 1rem;
    }

    form input, form textarea {
        font-size: 1rem;
    }

    form button {
        font-size: 1rem;
    }
}

/* Keyframes for animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.burger-menu {
    display: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.burger-menu div {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px;
    transition: 0.4s;
}

.burger-menu.open div:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.burger-menu.open div:nth-child(2) {
    opacity: 0;
}

.burger-menu.open div:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile view styles */
nav ul.mobile {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0; /* Change from left to right */
    height: 100%;
    width: 50%; /* Adjust width to 50% */
    background-color: #000;
    padding: 0;
    z-index: 1000;
    transform: translateX(100%); /* Initially hide the menu */
    transition: transform 0.3s ease-in-out; /* Smooth transition */
    justify-content: flex-start; /* Ensure items start from the top */
}

nav ul.mobile.open {
    transform: translateX(0); /* Slide in the menu */
}

nav ul.mobile li {
    display: block;
    margin: 0;
    text-align: left;
    padding: 1rem;
}

.burger-menu {
    display: block; /* Ensure burger menu is visible in mobile view */
}

.burger-menu.open + ul {
    display: flex;
}

/* Desktop view styles */
nav ul.desktop {
    display: flex; /* Ensure nav bar is displayed in desktop view */
    flex-direction: row;
    position: static;
    height: auto;
    width: auto;
    background-color: transparent;
    margin-left: auto;
}

nav ul.desktop li {
    display: inline;
    margin: 0 1rem;
    text-align: center;
    padding: 0;
}

.burger-menu {
    display: none;
}

#projects {
    padding: 2rem;
    overflow-y: auto; /* Enable scroll bar */
}

#contact {
    padding: 2rem;
    overflow-y: auto; /* Enable scroll bar */
}

#contact .contact-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px; /* Add margin between icons */
}