@charset "utf-8";

/* ============================================
   BASE STYLES - Apply to all screen sizes
   ============================================ */

/* Body element styles */
body {
    font-family: Verdana, Geneva, sans-serif;
    color: rgb(91, 91, 91);
    background-color: ivory;
}

/* Header section */
header {
    text-align: center;
    padding: 20px;
}

/* Header image - full width */
header img {
    width: 100%;
}

/* Headings with text shadow */
h1, h2 {
    text-shadow: 4px 6px 5px gray;
}

/* H2 elements */
h2 {
    font-size: 1.3em;
}

/* Navigation ul - remove default list styling */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Navicon - hidden by default on desktop */
.navicon {
    display: none;
}

/* Footer - direct child of body */
body > footer {
    background-color: rgb(70, 90, 110);
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
    font-size: 0.9em;
    line-height: 3em;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    clear: both;
}

/* Footer link styling */
body > footer a {
    color: rgba(255, 255, 255, 0.6);
}

/* List marker for education page */
.education-list {
    list-style-type: square;
}

/* Gallery styles - flex container */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Gallery images */
.gallery img {
    object-fit: cover;
    height: 200px;
}

/* ============================================
   DESKTOP STYLES - min-width 769px
   ============================================ */
@media only screen and (min-width: 769px) {
    
    /* HTML element - browser window background with image */
    html {
        background-color: rgb(70, 90, 110);
        background-image: url('background.jpg');
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
        background-attachment: fixed;
    }

    /* Body - desktop width and centered */
    body {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Navigation li - float layout for desktop */
    nav li {
        display: block;
        width: 20%;
        float: left;
    }

    /* Links within nav - desktop */
    nav a {
        display: block;
        background-color: rgb(70, 90, 110);
        line-height: 2.8em;
        text-decoration: none;
        text-align: center;
        color: rgb(255, 255, 255);
    }

    /* Hover state for nav links */
    nav a:hover {
        background-color: rgb(100, 130, 160);
        color: rgb(255, 255, 200);
    }

    /* Main element - desktop */
    main {
        padding: 20px;
        margin-top: 35px;
    }

    /* Images in main section - desktop */
    main > img {
        width: 25%;
        padding: 25px;
        float: right;
    }

    /* Gallery images - 4 columns on desktop */
    .gallery img {
        width: calc(25% - 10px);
    }
}

/* ============================================
   MOBILE STYLES - max-width 768px
   ============================================ */
@media only screen and (max-width: 768px) {
    
    /* HTML element - solid background for mobile (no image) */
    html {
        background-color: rgb(70, 90, 110);
    }

    /* Body - full width, no margin */
    body {
        width: 100%;
        margin: 0;
    }

    /* Navicon hamburger menu - visible on mobile */
    .navicon {
        display: block;
        background-color: rgb(70, 90, 110);
        color: rgb(255, 255, 255);
        font-size: 2em;
        text-align: center;
        padding: 10px;
        cursor: pointer;
    }

    /* Hide menu by default on mobile */
    nav ul {
        display: none;
    }

    /* Show menu when hovering over nav */
    nav:hover ul {
        display: block;
    }

    /* Navigation li - stacked for mobile */
    nav li {
        float: none;
        font-size: x-large;
        width: 100%;
    }

    /* Links within nav - mobile */
    nav a {
        display: block;
        background-color: rgb(70, 90, 110);
        line-height: 2.8em;
        text-decoration: none;
        text-align: center;
        color: rgb(255, 255, 255);
        border-bottom: 1px solid black;
    }

    /* Hover state for nav links - mobile */
    nav a:hover {
        background-color: rgb(100, 130, 160);
        color: rgb(255, 255, 200);
    }

    /* Main element - mobile */
    main {
        padding: 20px;
        margin-top: 35px;
    }

    /* Images in main section - mobile */
    main > img {
        width: 90%;
        float: none;
        display: block;
        margin: 0 auto;
        padding: 10px;
    }

    /* Gallery images - 1 column on mobile */
    .gallery img {
        width: 100%;
    }
}

/* ============================================
   TABLET STYLES - for gallery transition
   ============================================ */
@media only screen and (min-width: 481px) and (max-width: 768px) {
    /* Gallery images - 2 columns on tablet */
    .gallery img {
        width: calc(50% - 10px);
    }
}
