@charset "utf-8";

/* 4. Body styles */
body { 
    margin: 0; 
    width: 90%; 
    margin-left: auto; 
    margin-right: auto; 
    background-color: rgb(245,230,230); /* softer pinkish background */
    color: black; /* readable text */
    font-family: Verdana, Geneva, sans-serif; 
}

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

/* 6. h2 elements */
h2 {
    font-size: 1.3em;
}
h1, h2 {
    text-shadow: 4px 6px 5px gray;
    color: white; 
}

/* 7. Navigation section */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
nav li {
    display: block;
    width: 20%;
    float: left;
}

/* 8. Links inside nav */
nav a {
    display: block;
    background-color: rgb(42, 127, 127);
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    color: white;
}

/* 9. Hover effect for nav links */
nav a:hover {
    background-color: rgb(244,180,0);
    color: white;
}

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

/* 11. Image styling */
main > img {
    width: 90%;
    float: none;
    display: block;
    margin: 10px auto;
    padding: 25px;
}

header img {
    width: 100%;
    height: auto;
}

/* 12. Footer styling */
body > footer {
    background-color: rgb(42,127,127);
    color: black;
    font-weight: bold;
    font-size: 0.9em;
    line-height: 3em;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    clear: both;
}

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

/* Background image on HTML */
html {
    background-color: rgb(42,127,127);
    background-image: url("images/background.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* ===========================
   FLEXBOX GALLERY BASE STYLES
   =========================== */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery img {
    width: 100%;
}

/* ===========================
   MOBILE STYLES (max-width 768px)
   =========================== */
@media only screen and (max-width: 768px) {

    body {
        width: 100%;
        margin: 0;
    }

    nav li {
        float: none;
        font-size: x-large;
        width: 100%;
    }

    nav a {
        border-bottom: 1px solid black;
    }

    main img {
        width: 90%;
        float: none;
    }

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

    /* Hamburger icon */
    #navicon {
        display: block;
        background-color: rgb(42,127,127);
        color: white;
        padding: 10px;
        font-size: 2em;
        cursor: pointer;
        text-align: center;
    }

    #navicon:hover + ul,
    nav ul:hover {
        display: block;
    }

    /* Mobile gallery: 1 column */
    .gallery img {
        flex: 1 1 100%;
    }
}

/* ===========================
   MEDIUM SCREENS (769–1024px)
   =========================== */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .gallery img {
        flex: 1 1 calc(50% - 10px); /* 2 columns */
    }
}

/* ===========================
   DESKTOP (1025px and up)
   =========================== */
@media only screen and (min-width: 1025px) {

    /* Hide hamburger */
    #navicon {
        display: none;
    }

    nav ul {
        display: block;
    }



    main img {
        width: 40%;
        float: right;
    }

    /* Desktop gallery: 4 columns */
    .gallery img {
        flex: 1 1 calc(25% - 10px);
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
}

th, td {
    border: 2px solid #333;
    padding: 10px;
    text-align: left;
}

thead {
    background: #cce5ff;
}

tfoot {
    background: #f2f2f2;
    font-weight: bold;
    text-align: center;
}

@media (max-width: 600px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    th {
        background: #cce5ff;
        font-size: 1.2em;
    }

    td {
        border: none;
        border-bottom: 1px solid #ccc;
        padding-left: 50%;
        position: relative;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
    }
}









