
* {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

body {
    background-color:#363636; /* EDIT ME! CHanges bg color of entire page */
    color: lightgrey; /* EDIT ME! Changes text color of entire page */
    font-family: Arial, Helvetica, sans-serif;
}

nav {
    background-color: #272727; /* EDIT ME! */
    text-align: center;
    width: 100%;
    position: absolute;
    top: 0;
}

nav ul li {
    list-style: none;
    display: inline-block;
    padding: 0.75rem 0.5rem;
    margin: 0;
}

a {
    color: rgb(35, 212, 252); /* EDIT ME! - colors the links in your page NOT in your nav or footer, assuming any are there*/
    text-decoration: none; /* get rid of this entire line if you want all links to have an underline*/
}

nav a {
    color: rgb(35, 212, 252); /* EDIT ME! - colors the links in your navbar*/
    text-decoration: none;
    margin: 0;
    font-size: 1.25em;
}

main {
    padding: 4rem;
    min-height: 80vh; /* EDIT ME if and ONLY if you don't have a lot in your about me -- you may need to up this to 90vh */
}

#gallery{
    max-width: 90vw;
    margin: 0 auto;
    text-align: center;
}

#gallery p, #gallery h3, #gallery h2 {
    margin: 1.25rem auto;
}

#hideshow{
   display:none; 
}

#featureimg {
    max-width: 100%;
}

/* changing the WIDTH and HEIGHT in the below will change how big your galelry item thumbnails appear. NOTE - due to styling, the 120 width has minus 10 pixels on either side due to margin; same to height.*/
#galleryItems img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
    margin: 10px;
    border: 3px #f5f5f5 solid; /* EDIT ME - color of the border around each gallery image */
}

footer {
    width: 100%;
    background-color: #272727; /* EDIT ME! - background color of the footer (aka where your About Me and social links are!) */
    padding: 2rem 4rem;
    margin: 0 auto;
    color: lightgray; /* EDIT ME! - font color of the text within the footer */
}

footer ul li {
    list-style: none;
    display: inline-block;
}

#about * {
    padding: 0.25rem;
}

#links h2, #links h3 {
    padding: 1rem 0;
}

#links a {
    padding-right: 1rem;
    color: lightcoral; /* EDIT ME! - colors the links in your link area of the footer */
    text-decoration: none;
}

i {
    font-size: xx-large;
}

a:hover {
    color:#f5f5f5; /* EDIT ME! - will change the hover on all links within the body*/
}

nav a:hover {
    color:#f5f5f5; /* EDIT ME! - will change the hover on all links within the nav*/
}

#links a:hover {
    color:#f5f5f5; /* EDIT ME! - will change the hover on all links within the section with an id of links */
}

.flexbox-gallery {
    display: flex;
    flex-wrap: wrap; /* allows the items in the flexbox to wrap around instead of being kept in a single line */
    gap: 10px; /* arbitrary gap between each item, i think this works quite well to give each picture space to breathe without it being too much space */
}

.flexbox-gallery-item {
    height: 40vh; /* this is arbitrary, a value of 40 viewport height for desktop is the value i've found to work with the most aspect ratios */
    flex-grow: 1; /* sets the item to take the space it needs to and no more */
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 3px #f5f5f5 solid; /* EDIT ME - color of the border around each gallery image */
}

.flexbox-gallery-item:last-child {
    flex-grow: 10; /* sets the last item to take more space, which i find to work quite well */
}

.flexbox-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* all these three are important to make sure the pictures are resized proportionally and cropped if need be, instead of being stretched */
    margin: 0; /* resets the margin for img which is likely needed if you use a global style for it */
}


/* image grid on mobile, makes it so that each item is maximised to the viewport */
@media only screen and (max-width: 1080px) {
    .work-item-gallery {
        width: 100%;
        height: 100%;
        max-height: 100vh;
    }
}

/* adjusts gallery styling for mobile landscape mode */
/* this partially restores desktop styling for mobile devices in landscape, putting several portraits on the same line or one panorama */
@media only screen and (max-height: 820px) and (max-width: 1080px) {
    .work-item-gallery {
        width: unset; /* unsets the previously set width setting to let the flexbox decide each item's width */
        height: 90vh; /* ensures pictures don't touch the borders which some ppl don't like */
    }
}
