/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(to right, #eef2f3, #8e9eab);
    color: #333;
    animation: fadeIn 2s ease-out;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #0a0a0a;
    color: rgb(244, 244, 244);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-name {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffae42;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
}

.nav-name:hover {
    color: #e69530;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links li a {
    text-decoration: none;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

.nav-links li a:hover {
    color: #ffae42;
}

/* Smooth Scroll for Links */
.nav-links li a {
    scroll-behavior: smooth;
}

/* Hamburger Icon */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    cursor: pointer;
}

.hamburger div {
    width: 30px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
        background: #444;
        padding: 1rem;
        border-radius: 8px;
        position: absolute;
        right: 1rem;
        top: 4rem;
        display: none; /* Hidden by default */
    }

    .nav-links.show {
        display: flex;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hamburger {
        display: flex;
    }

    /* Add transformations for hamburger icon */
    .hamburger.active div:nth-child(1) {
        transform: rotate(45deg) translateY(0.8rem);
    }

    .hamburger.active div:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active div:nth-child(3) {
        transform: rotate(-45deg) translateY(-0.8rem);
    }

    /* Checkbox hack */
    .menu-toggle {
        display: none;
    }

    .menu-toggle:checked + .nav-links {
        display: flex;
    }

    .menu-toggle:checked + .nav-links + .hamburger {
        transform: rotate(180deg);
    }
}

/* Projects Section */
.projects-section {
    text-align: center;
    padding: 3rem 1rem;
    animation: fadeIn 2s ease-out;
}

.projects-section h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

/* Project Row Layout */
.project-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 1.5s forwards;
}

/* Reverse class for second project */
.project-row.reverse {
    flex-direction: row-reverse; /* Ensures the second project image and text are reversed */
}

/* Adjust the flex direction for smaller screens */
@media (max-width: 768px) {
    .project-row {
        flex-direction: column; /* Stacks image and text vertically */
        align-items: center; /* Center both items */
        gap: 1rem; /* Add some gap between the image and the text */
    }

    .project-row.reverse {
        flex-direction: column; /* Ensures the reverse class also stacks vertically */
    }

    .project-image {
        margin-bottom: 1rem; /* Add space between the image and the text */
        width: 100%; /* Make the image responsive */
        text-align: center; /* Center the image */
    }

    .project-description {
        text-align: center; /* Center the text */
        font-size: 1rem; /* Make the font size a bit smaller for better readability on mobile */
    }
}

/* Project Image */
.project-image {
    flex: 1;
    text-align: center;
}

.project-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease-in-out;
}

.project-image img:hover {
    transform: scale(1.1);
}

/* Project Description */
.project-description {
    flex: 2;
    text-align: left;
    font-size: 1.2rem;
    color: #555;
    max-width: 600px;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 1rem;
    color: #ffae42;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.project-link:hover {
    color: #e69530;
    cursor: pointer;
}

/* Contact Section (same as the About page) */
#contact {
    padding: 2rem 1rem;
    background: #333;
    color: white;
    text-align: center;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 500px;
    opacity: 0;
    animation: fadeInUp 1.5s forwards;
    animation-delay: 0.9s;
}

#contact h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

#contact form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

#contact input,
#contact textarea {
    width: 100%;
    max-width: 400px;
    padding: 0.8rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

#contact input:focus,
#contact textarea:focus {
    border-color: #ffae42;
    transform: scale(1.02);
}

#contact button {
    padding: 0.8rem 2rem;
    background-color: #ffae42;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contact button:hover {
    background-color: #e69530;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background: #222;
    color: white;
    margin-top: 2rem;
    animation: fadeIn 2s ease-out;
}

footer .social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.2rem;
    opacity: 0;
    animation: fadeInUp 1.5s forwards;
    animation-delay: 1.1s;
}

footer .social a {
    text-decoration: none;
    color: #ffae42;
    transition: color 0.3s ease-in-out;
}

footer .social a:hover {
    color: #e69530;
}

/* Keyframes for Fade and Animation Effects */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
