/* --- Global Styles --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #8f8ed6;
    color: #fff;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
nav {
    background-color: #211ec5;
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

nav ul li a:hover {
    color: #ddd;
}

/* --- Main Content --- */
main {
    padding: 2rem 0;
}

h1, h2 {
    color: #fff;
}

/* --- Home Page "About Me" Section --- */
.about-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.about-section h1 {
    margin-top: 0;
}

/* --- Project Grid --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.project-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden; /* To contain the image */
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes your images fit nicely */
}

.project-card-content {
    padding: 1rem;
}

.project-card h3 {
    margin-top: 0;
}

.project-card p {
    font-size: 0.9rem;
}

/* --- Contact Form --- */
.contact-form {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

label {
            color: black;
            font-weight: bold; /* Optional: makes it a bit easier to read */
            display: block;    /* Optional: ensures it sits on its own line above the input */
            margin-bottom: 5px;
        }
.total-display {
            font-size: 1.2em;
            font-weight: bold;
            margin-bottom: 15px;
            color: #333;
        }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Important for padding to work */
}

.btn {
    display: inline-block;
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: #555;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 0.4rem 0;
    margin-top: 0.4rem;
    background-color: #333;
    color: #fff;
}
/* Ensure the html and body can take up full height */
html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 100% of the viewport height */
    
    /* It's also good practice to reset the default margin */
    margin: 0;
}

main {
    flex-grow: 1; /* This is the key! It makes the main content
                     area expand to fill all available space,
                     pushing the footer down. */
}

.image-gallery img {
    max-width: 100%;
    height: auto;
}

/*
=====================================================
--- Responsive (Mobile) Styles ---
This block tells the browser to apply these styles
ONLY on screens 768px wide or smaller.
=====================================================
*/
@media (max-width: 768px) {

    /* --- Navigation --- */
    nav .container {
        flex-direction: column; /* Stack logo and links */
        align-items: center;
    }

    nav ul {
        flex-direction: column; /* Stack nav links */
        margin-top: 1rem;       /* Add space between logo and links */
        align-items: center;
        width: 100%;
    }

    nav ul li {
        margin-left: 0;         /* Remove side margin */
        margin-top: 10px;       /* Add space between stacked links */
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        width: 100%;
        box-sizing: border-box; /* Make padding inclusive */
    }

    /* --- Project Grid --- */
    .project-grid {
        /* This forces the grid to be one column on mobile */
        /* (Even though auto-fit already does a good job) */
        grid-template-columns: 1fr; 
    }

    /* --- Form/About Page --- */
    .about-section, .contact-form {
        /* Add a little less padding on small screens */
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem; /* Make main headings a bit smaller */
    }

    /* Make the container take up more screen width */
    .container {
        padding: 0 15px;
    }
}

.carousel-container {
            max-width: 600px; /* Adjust this to fit your design */
            position: relative;
            margin: auto;
        }

        .carousel-slide {
            display: none; /* Hide images by default */
        }

        .carousel-slide img {
            width: 100%;
            border-radius: 8px; /* Optional: adds rounded corners to images */
            display: block;
        }

        /* Next & previous buttons */
        .prev, .next {
            cursor: pointer;
            position: absolute;
            top: 50%;
            width: auto;
            padding: 16px;
            margin-top: -22px;
            color: white;
            font-weight: bold;
            font-size: 18px;
            transition: 0.6s ease;
            border-radius: 0 3px 3px 0;
            user-select: none;
            background-color: rgba(0,0,0,0.5); /* Semi-transparent background for visibility */
            text-decoration: none;
        }

        /* Position the "next button" to the right */
        .next {
            right: 0;
            border-radius: 3px 0 0 3px;
        }

        /* Hover effect for buttons */
        .prev:hover, .next:hover {
            background-color: rgba(0,0,0,0.8);
        }

        /* Fading animation */
        .fade {
            animation-name: fade;
            animation-duration: 0.5s;
        }

        @keyframes fade {
            from {opacity: .4} 
            to {opacity: 1}
        }