/* ======== GENERAL STYLES ======== */
body {
    background-color: #175FA6; /* A light grey background */
    color: #ffffff; /* Dark grey text for readability */
    font-family: 'Lato', sans-serif; /* A clean, modern sans-serif font */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ======== HEADER & BIOGRAPHY STYLES ======== */
header {
    text-align: center;
    padding: 60px 20px;
    background-color: #175FA6; /* White background for the header */
    border-bottom: 1px solid #dee2e6; /* A subtle border */
}

.header-name {
    font-family: 'Playfair Display', serif; /* An elegant serif font for the name */
    font-size: 3.5rem; /* Large font size for the name */
    margin: 0;
    color: #ffffff; /* A slightly darker shade for the name */
}

.header-bio {
    max-width: 600px; /* Limits the width of the bio for readability */
    margin: 20px auto 0; /* Centers the bio text block */
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ======== PORTFOLIO GRID STYLES ======== */
main {
    padding: 40px 20px;
}

.portfolio-grid {
    display: grid;
    /* This creates a responsive grid. It will fit as many 350px columns as it can. */
    /* On smaller screens, it will automatically stack to one column. */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px; /* The space between grid items */
    max-width: 1200px; /* Sets a max width for the grid */
    margin: 0 auto; /* Centers the grid on the page */
}

.portfolio-item {
    background-color: #0256AE;
    border-radius: 8px; /* Rounded corners for the cards */
    overflow: hidden; /* Ensures the image respects the rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* A subtle shadow for a "card" effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effect */
}

.portfolio-item:hover {
    transform: translateY(-5px); /* Lifts the card up slightly on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); /* A more pronounced shadow on hover */
}

.portfolio-item img {
    width: 100%; /* Makes the image fill the container's width */
    height: auto;
    display: block; /* Removes any extra space below the image */
}

.project-details {
    padding: 20px;
}

.project-details h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    color: #ffffff;
}

.project-details p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

a {text-decoration: none; background-color: none; color: #ffffff; }

/* ======== RESPONSIVENESS FOR SMALLER SCREENS ======== */
@media (max-width: 600px) {
    .header-name {
        font-size: 2.5rem;
    }

    .header-bio {
        font-size: 1rem; 
    }

    .portfolio-grid {
        /* On screens smaller than 400px, change grid to a single column layout */
        grid-template-columns: 1fr;
    }
}