
body {
    background-color: #fcf;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* Use 100vh for cross-browser compatibility */
}

.container {
    display: flex;
    flex-flow: row wrap;
    min-height: 100vh;
    padding: 16px;
    gap: 16px; /* Add spacing between boxes */
    position: relative;
}

@media screen and (min-width: 320px) {

    .box1, .box5 {
        height: 25vh; /* Use vh for better support */
        background-color: rgba(0, 0, 0, 0.6);
        flex: 1 0 100%; /* Full width on small screens */
    }

    .box2, .box3, .box4 {
        height: 50vh;
        flex: 1 0 100%; /* Full width by default */
        background-size: cover;
        position: relative;
    }

    .box2 {
        background-color: rgba(0, 0, 200, 0.6);
        background-image: url(../images/my_Guitars.jpeg);
    }

    .box3 {
        background-color: rgba(0, 200, 0, 0.6);
        background-image: url(../images/surfpic2.jpeg);
    }

    .box4 {
        background-color: rgba(100, 0, 100, 0.6);
        background-image: url(../images/iracing.jpg);
    }


    /* Text Styling */
    .box2 h2, .box3 h2, .box4 h2 {
        text-align: center;
        font-size: 2em;
        color: black;
        position: absolute;
        top: 10px;
        left: 20px;
    }

    .box2 p, .box3 p, .box4 p {
        text-align: center;
        font-size: 1.5rem;
        color: white;
        position: absolute;
        bottom: 10px;
    }

    nav {
        display: flex;
        gap: 20px;
        text-align: center;
        position: absolute; top: 0; left: 50%;
        transform: translate(-50%, 0%);
    }
    
    
    nav a {
        position: relative;
        text-decoration: none;
        color: black;
        /* background-color: #571a04; */
        font-size: 1.2rem;
        padding: 5px 0;
        transition: color 0.3s ease;
    }
    
    /* Add hover effect on the link color */
    nav a:hover {
        color: white;
    }
    
    /* Create the underline effect */
    nav a::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -2px;
        width: 0;
        height: 2px;
        background-color: white;
        transition: width 0.3s ease;
    }
    
    /* Expand the underline on hover */
    nav a:hover::after {
        width: 100%;
    }
    
    .work nav {
        position: absolute; bottom: 0; left: 0;
    }

}

/* Responsive Design */
@media screen and (min-width: 600px) {
    .box2, .box3, .box4 {
        flex: 1 0 33%; /* Make boxes side-by-side for medium screens */
    }

    h2 {
        font-size: 2.5em; /* Larger font size for headings */
    }

    p {
        font-size: 1.2em; /* Adjust paragraph font size */
    }
}

@media screen and (min-width: 800px) {
    .container {
        padding: 32px;
        gap: 20px; /* Increase spacing for larger screens */
    }

    .box1, .box5 {
        height: 20vh; /* Adjust height for larger screens */
    }

    .box2, .box3, .box4 {
        flex: 1 0 30%;
    }

    
}
