/* --- Global Styles & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

/* Universal reset to remove default spacing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #EFF1F3; /* Light grey background for the whole page */
    color: #333;
    overflow-x: hidden; /* Prevents horizontal scroll */
}

/* --- Hero Section (Page 1) --- */
#home {
    position: relative;
    height: 100vh; /* Full screen height */
    min-height: 600px;
    display: flex;
    flex-direction: column; /* Arrange content vertically */
    justify-content: space-between; /* Pushes content to top and divider to bottom */
    align-items: center; /* Center content horizontally */
    overflow: hidden;
}

/* Blurred Background */
#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(5px);
    transform: scale(1.03);
    z-index: -1;
}

.hero-content {
    display: flex;
    align-items: flex-end; /* Align the bottom of content within hero-content */
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 5% 0px 5%; /* Adjusted padding, removed bottom padding */
    flex-grow: 1; /* Allows it to take up available space above the divider */
}

.hero-text {
    flex: 1.2;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    padding-bottom: 90px; /* Add padding equal to divider height to lift text */
}

.hero-text h1 {
    font-size: 4.5rem;
    line-height: 1.2;
    font-weight: 400;
    margin-bottom: 20px;
}

.hero-text .highlight {
    font-weight: 700;
    color: #FFFF00; /* Yellow */
}

.hero-text p {
    font-size: 1.2rem;
    max-width: 500px;
    margin-bottom: 15px;
}

.hero-text .highlight-contact {
    color: #FFFF00;
    font-weight: 700;
}

.projects-link a {
    color: #FFFF00;
    font-weight: 700;
    text-decoration: underline;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end; /* Aligns image to the bottom of its container */
    height: 100%; /* Ensure it takes full height to align properly */
}

.hero-image img {
    max-width: 100%;
    max-height: 80vh; /* Adjust if image is too tall */
    height: auto;
    display: block; /* Important: removes extra space below image */
    margin-bottom: 0px; /* Tiny negative margin to absolutely remove any sub-pixel gap */
    position: relative; /* Needed for z-index to work */
    z-index: 2; /* Ensures image is above background and divider if overlap occurs */
}

/* --- Divider Bar --- */
.divider {
    width: 100%; /* Ensure it spans full width */
    height: 45px;
    background-color: #004d00;
    flex-shrink: 0; /* Prevents the divider from shrinking */
    position: relative; /* For z-index */
    z-index: 1; /* Ensures divider is below image but above background */
}


/* --- Projects Section (Page 2) --- */
#projects {
    padding: 80px 5%;
    background-color: #EFF1F3; /* Matching light grey background */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
}

/* Reverses order for the second project item */
.project-item.reverse {
    flex-direction: row-reverse;
}

.project-text {
    flex: 1;
}

.project-title {
    font-size: 3.5rem;
    color: #006400; /* Dark Green */
    margin-bottom: 20px;
}

.project-text .highlight-green {
    color: #006400;
    font-weight: bold;
}

.project-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.project-text > p a {
    color: #006400;
    font-weight: bold;
    text-decoration: none;
}
.project-text > p a:hover {
    text-decoration: underline;
}

.game-list {
    margin: 20px 0;
}

.game-list a {
    display: block;
    color: #006400;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
    margin-bottom: 8px;
}

.game-list a:hover {
    text-decoration: underline;
}

.project-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-image img {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}


/* --- Responsive Design for Smaller Screens --- */
@media (max-width: 992px) {
    .hero-text h1 {
        font-size: 3.5rem;
    }
    .project-title {
        font-size: 3rem;
    }
    .hero-image img {
        margin-bottom: 0; /* Reset specific margin for mobile */
    }
}

@media (max-width: 768px) {
    #home {
        height: auto;
        min-height: unset;
    }

    .hero-content {
        flex-direction: column;
        padding: 100px 20px 50px 20px; /* Adjust padding for mobile view */
        align-items: center; /* Center content vertically in column */
    }

    .hero-text {
        order: 2; /* Text comes after image */
        text-align: center;
        padding-bottom: 30px; /* Adjust for mobile */
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }
    .hero-text p {
        max-width: 100%;
    }

    .hero-image {
        order: 1; /* Image comes first */
        margin-bottom: 30px;
        align-items: center; /* Center image in column */
    }

    .hero-image img {
        max-width: 70%;
        margin-bottom: -4px; /* Ensure no gap on mobile too */
    }

    .divider {
        width: 100%; /* Makes the divider full-width on mobile */
    }

    #projects {
        padding: 60px 20px;
        gap: 60px;
    }

    .project-item,
    .project-item.reverse {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .project-title {
        font-size: 2.5rem;
    }
}

/* --- Footer --- */
footer {
    background-color: #000;
    color: #fff;
    padding: 25px 5%;
    text-align: center;
}

.footer-content a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1rem;
}

.footer-content a:hover {
    text-decoration: underline;
}