/* ---------- General Styling ---------- */

* { /* resets all elements to have no filling; easier sizing customization */
    box-sizing: border-box;
    padding: 0px;
    margin: 0px;
    border: 0px;
}

:root { /* variables for color mostly */
    --blanco: hsl(53, 51%, 87%);
    --negro: hsl(53, 67%, 5%);
    --cafe: rgb(71,47,23);
    --cafeconleche: rgb(206,155,104);
    --verdeclaro: hsl(81, 41%, 60%);
    --verdeoscuro: hsl(87, 36%, 24%);
}

body { /* adjust website body */
    background-color: var(--verdeclaro);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { /* add font for title and headers */
    font-family: "Merriweather", serif;
}

p, a, ul, ol, ::placeholder { /* add font of filler text */
    font-family: "Roboto", sans-serif;
}

ul, ol { /* makes lists easier to customize */
    list-style-type: none;
}

div { /* div pre-set condition */
    float: left;
}

img { /* image preset condition */
    width: 100%;
}

.container::after { /* preset for gallery photos */
    content: "";
    clear: both;
    display: table;
}

/* ---------- Navigation Bar ---------- */

.navbar { /* for navigation menu bar at top of webpage */
    top: 0;
    left: 0;
    width: 100vw;
    position: fixed;
    z-index: 5; /* overlays navigation bar over all content inside webpage */
    background-color: var(--verdeclaro);
}

.navbar a { /* for buttons inside navigation menu bar */
    width: 12vw;
    float: left;
    background-color: var(--verdeclaro);
    text-decoration: none;
    font-family: "Merriweather", serif;
    color: var(--negro);
    text-align: center;
    font-size: 1.25em;
    padding: 0.75em;
    cursor: pointer;
}

.navbar > #left { /* makes "hello!" button go left */
    float: left;
}

.navbar > #right { /* makes rest of the buttons go right */
    float: right;
    width: 61vw;
}

/* ---------- Intro ---------- */

.intro { /* container for intro to webpage near top */
    text-align: center;
    margin-top: 6em;
    padding: 1em;
    width: 100%;
    color: var(--negro);
}

.intro h1 {
    font-size: 4em;
}

.intro p {
    position: center;
    padding: 10vw;
    padding-top: 1em;
    padding-bottom: 1em;
    font-size: 1.5em;
}

/* ---------- Education ---------- */

.education { /* container for the entire education section */
    width: 100%;
    background-color: var(--blanco);
    padding: 2em 0em;
}

.education h1, .education h2 { /* for the degree info and already visible list */
    width: 100%;
    color: var(--verdeoscuro);
    padding: 0em 2em;
}

.education h2 { /* additional stuff for the alr visible list */
    padding: 0.25em 5em;
    text-align: left;
}

.education .alt {color: var(--cafe);}

#studentOrgList > * { /* for the sublist about student organizations */
    font-size: 1.25em;
    padding: 0em 8em;
}

#studentOrgList li { /* name of student org participated in */
    font-family: "Merriweather", serif;
    color: var(--cafe);
    font-weight: bold;
}

#studentOrgList p { /* information about role in student org */
    color: var(--negro);
    padding: 0.5em 9em;
}

#studentOrgList .alt { /* to highlight choronology of org involvement */
    font-weight: bold;
    color: var(--negro);
}

.standardList { /* for the other sublists, revelant courses and revelant skills */
    font-family: "Merriweather", serif;
    color: var(--cafe);
    font-weight: bold;
    font-size: 1.25em;
    padding: 0em 8em;
}

/* ---------- Projects ---------- */

.projectsList {width: 100%;} /* for entire project section */
.projectsList * {float: left;}

.introproj { /* title info for each project */
    width: 100%;
    background-color: var(--blanco);
    padding: 1.5em 1em;
}

.introproj:nth-of-type(1) {margin-top: 2em;} /* extra buffer for the project on top, to even out spacing */

.projectsList h1, h2 { /* for title text specifically in each project */
    width: 60%;
    text-decoration: none;
    text-align: center;
    font-size: 1.5em;
    color: var(--verdeoscuro);
}

.projectsList h2 {  /* specifically for info on where it was done */
    width: 40%;
    text-align: left;
}

.projectsList p {  /* for project report */
    width: 100%;
    font-size: 1.25em;
    padding: 1em 0.75em 0.5em 0.75em;
}

.project { /* for container with project slideshow and report */
    margin: 0;
    margin-bottom: 2%;
    width: 100%;
    padding: 0 5em;
}

.slideshow {  /* slideshow container */
    width: 100%;
    height: 25vw;
    margin: 1.5em 0;
}

.slideshow .slides {display: none;} /* autohide slides initially */

.slideshow img {  /* the image within the slideshow */
    position: absolute;
    max-width: 89.5%;
    max-height: 25vw;
    object-fit: contain;
    align-self: center;
    -webkit-animation-name: fade; /* adds fade effect to images in slideshow */
    -webkit-animation-duration: 1s;
    animation-name: fade;
    animation-duration: 1s;
}

.projectsList > h1 { /* intro to project section */
    width: 100%;
    padding: 1em;
    color: var(--negro);
    font-size: 2em;
}

.projectsList > p {
    font-size: 1.5em;
    position: center;
    text-align: center;
    padding: 0em 10vw;
}

.projectDescLink {
    color: var(--negro);
    font-weight: bold;
}

/* ---------- Work ---------- */

.work {width: 100%;} /* entire work/resume section */
.work * {float: left;}

.experience { /* each section of work experience */
    padding: 2% 10vw 0 10vw;
    width: 100%;
    background-color: var(--blanco);
}

.experience * {color: var(--verdeoscuro);} /* color all text dark green */

.experience h1 { /* text with job title and company */
    width: 75%;
    text-decoration: none;
    text-align: left;
    font-size: 1.5em;
    padding: 0.125em 0;
}

.experience h2 { /* text with job duration */
    width: 25%;
    text-decoration: none;
    text-align: right;
    font-size: 1em;
    padding: 0.5em 0;
}

.experience p { /* job description */
    width: 95%;
    margin-left: 5%;
    text-decoration: none;
    text-align: left;
    font-size: 1.25em;
    margin-top: 1em;
}

.experience span { /* for light italicized text in job desc */
    font-style: italic;
    color: var(--cafe);
}

.experience:nth-last-of-type(1) { /* adds extra buffer to even out space */
    padding-bottom: 2%;
}

#resumeButton { /* holds the resume "button" secure */
    width: 100%;
    background-color: var(--blanco);
    padding-top: 2em;
    display: flex;
    justify-content: center;
}

#openResume { /* for "view my complete resume" "button", which is actually a link */
    padding: 0.75em 1.5em;
    font-size: 1.25em;
    font-family: "Merriweather", serif;
    text-decoration: none;
    text-align: center;
    background-color: var(--verdeoscuro);
    color: var(--blanco);
    cursor: pointer;
    transition: 0.25s;


    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 30%;
    max-width:fit-content;
    /*
    position: absolute;
    left: 50%;
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    */
}

/* ---------- About Me/Contact ---------- */

.whoAmI { /* for the entire about me and contact section */
    width: 100%;
    background-color: var(--verdeclaro);
    padding: 2em 0em;
    padding-bottom: 4em;
}

.whoAmI h1, .whoAmI h2 { /* for larger font in section */
    width: 100%;
    color: var(--negro);
    padding: 0em 2em;
}

.whoAmI h2 {padding: 0.25em 5em; text-align: left;} /* specifically for contact info list */

.whoAmI p { /* description about myseld */
    font-size: 1.25em;
    padding: 1.5em 5em;
    float: left;
    width: 100%;
    color: var(--negro);
}

.whoAmI a {text-decoration: none;} /* hide link */

.whoAmI .alt {color: var(--cafe);} /* add alternative brown text */

.slideshow.adaptive { /* add extra formatting for gallery that turns into slideshow */
    display: flex;
    justify-content: center;
    gap: 1em;
    flex-wrap: wrap;
    padding: 2.5em 0.5em 0em 0.5em;
    width: 100%;
    height: 35vh;
}

.slidesAboutMe { /* to adjust each slide container */
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 30%;
    max-width: 30%;
}

.slidesAboutMe img { /* to format image inside slide container */
    max-width: 30vw;
    max-height: 30vh;
    height: auto;
    object-fit: contain;
}

/* ---------- Gallery Section ---------- */

.projectGallery { /* for "view all photos" aka photo gallery */
    text-align: center;
    padding: 2em 5vw;
}

#toggleGallery { /* for "view all photos" button */
    padding: 0.75em 1.5em;
    font-size: 1.25em;
    font-family: "Merriweather", serif;
    background-color: var(--verdeoscuro);
    color: var(--blanco);
    cursor: pointer;
    transition: 0.25s;
    position: absolute;
    margin-top: -2em;
    left: 50%;
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
}

.gallery { /* for container with all photos */
    margin-top: 2em;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75em;
}

.galleryImage { /* for individual each photo in gallery */
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s;
}

/* ---------- Modal Styles ---------- */

.modal { /* for container that holds enlarged image */
    display: flex;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content { /* to format image when clicked on, zooming it in */
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
}

#caption { /* to format caption inside alt text of image */
    color: white;
    padding: 1em;
    text-align: center;
}

#closeModal { /* to format "X" button when an image is enlarged */
    color: white;
    font-size: 3em;
    position: absolute;
    top: 1em;
    right: 1em;
    cursor: pointer;
}

.hidden { /* to hide content that will be displayed after javascript trigger */
    display: none;
}

/* ---------- Animations ---------- */

@-webkit-keyframes fade { /* the animation for the slideshow photos for the special case browsers */
    from {opacity: 0;} 
    to {opacity: 1;}
}

@keyframes fade { /* the animation for the slideshow photos */
    from {opacity: 0;} 
    to {opacity: 1;}
}

/* ---------- Media Queries: Tablet ---------- */

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .navbar a {
        width: 16.66667%;
        font-size: 1.125em;
    }

    .navbar > #right {width: 83.3333333%;}

    .navbar > #right > a {width: 20%;}

    .navbar a:hover {
        background-color: var(--verdeoscuro);
        color: var(--blanco);
        transition: 0.25s;
    }

    #showOrgs:hover, #showCourses:hover, #showSkills:hover, .project > h2:hover {
        color: var(--cafe);
        transition: 0.25s;
        cursor: pointer;
    }

    .project > h2 {
        width: 100%;
        text-align: center;
        font-size: 1.5em;
    }

    #toggleGallery:hover {
        background-color: var(--verdeclaro);
        color: var(--negro);
    }

    #openResume:hover {
        background-color: var(--blanco);
        color: var(--verdeoscuro);
    }

    .galleryImage:hover {
        -ms-transform: scale(1.05);
        transform: scale(1.05);
    }
    
    .slideshow.adaptive {
        width: 100%;
        height: 50vw;
        padding: 2.5em 0.5em 0.5em 0.5em;
        gap: 0;
    }

    .slidesAboutMe {width: 100%; height: 45vw;}

    .slidesAboutMe img {
        max-width: 100%;
        max-height: 45vw;
        left: 0;
    }
}

/* ---------- Media Queries: Desktop/Laptop ---------- */

@media screen and (min-width: 1024px) {

    .project > h2 {
        width: 100%;
        text-align: center;
        font-size: 1.5em;
    }

    .navbar a:hover {
        background-color: var(--verdeoscuro);
        color: var(--blanco);
        transition: 0.25s;
    }

    #showOrgs:hover, #showCourses:hover, #showSkills:hover, .whoAmI a h2:hover, .project > h2:hover {
        color: var(--cafe);
        transition: 0.25s;
        cursor: pointer;
    }

    #toggleGallery:hover {
        background-color: var(--verdeclaro);
        color: var(--negro);
    }

    #openResume:hover {
        background-color: var(--blanco);
        color: var(--verdeoscuro);
    }

    .galleryImage:hover {
        -ms-transform: scale(1.05);
        transform: scale(1.05);
    }
}

/* ---------- Media Queries: Phone ---------- */

@media screen and (max-width: 768px) {
    .navbar a {
        font-size: 1em;
        padding: 0.75em;
        width: 50%;
        color: var(--blanco);
        background-color: var(--verdeoscuro);
    }

    .navbar > #right {width: 100%;}

    .navbar > #right > a {width: 50%;}

    .mobilehide {display: none;}

    .intro {padding: 1.5em 2em;}

    .intro h1 {font-size: 2.5em;}

    .intro p {font-size: 1.25em;}

    .education h1 {padding: 0em 1.5em;}

    .education h2 {padding: 0em 1.5em;}

    #studentOrgList > *, .standardList {padding: 0em 2.25em;}

    #studentOrgList p {padding: 0.5em 2.25em;}

    .introproj {padding: 1em;}

    .introproj:nth-of-type(1) {margin-top: 1.5em;}

    .projectsList h1, .projectsList h2 {width: 100%; padding: 0.5em 0.75em; text-align: center;}

    .slideshow {width: 100%; height: 45vw;}

    .slideshow img {max-width: 100%; max-height: 45vw; left: 0;}

    .projectsList p {padding: 0.75em; padding-top: 0; width: 100%;}

    .projectsList > h1 {margin-top: 0.25em;}

    .projectsList > p {font-size: 1.25em; padding: 0em 10vw;}

    .project {padding: 0 1.5em;}

    .project h2 {padding-top: 0;}

    #toggleGallery {margin-top: -2em;}

    .gallery {margin-top: 3.5em; grid-template-columns: repeat(2, minmax(100px, 1fr));}

    .work {margin-top: 1.5em;}

    .experience {padding: 5% 5% 0 5%;}

    .experience:nth-last-of-type(1) {padding-bottom: 5%;}

    .whoAmI {padding: 1.5em 0em;}

    .whoAmI h1, .whoAmI h2 {padding: 0.25em 1.5em;}

    .whoAmI p {padding: 1.75em 2.5em 1.5em 2.5em;}
    
    .slideshow.adaptive {
        width: 100%;
        height: 50vw;
        padding: 1.5em 0.5em 0.5em 0.5em;
        gap: 0;
    }

    .slidesAboutMe {width: 100%; height: 45vw;}

    .slidesAboutMe img {
        max-width: 100%;
        max-height: 45vw;
        left: 0;
    }
}

@media screen and (max-width: 320px) {
    .navbar a {
        font-size: 1em;
        padding: 0.75em;
        width: 100%;
    }
}