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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 7rem;
} 

body {
    font-family: 'Jost', Arial, Helvetica, sans-serif;
    background-color: black;
    color: white;
}

#wrapper {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 1500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    position: fixed;
    top: 0;
    height: 7rem; 
    background-color: black;
    z-index: 1;
    width: 100%;
}

#header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#title {
    padding-top: .8rem;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.6;
}

#headline {
    padding-top: .4rem;
    font-family: "averia serif libre", 'Times New Roman', Times, serif;
    font-size: .9rem;
    border-top: solid 1px white;
    width: fit-content;
}

#navlinks {
    display: flex;
    justify-content: center;
    align-items: baseline;
}

#navlinks a {
    text-decoration: none;
    color: white;
    padding: .5rem .5rem .9rem .5rem;
}

#gallery {
    padding-left: 1.8rem;
    padding-right: 1.8rem;
    padding-top: 7rem;
    padding-bottom: 7rem;
    z-index: 0;
}

#portrait, #other {
    column-count: 2;
    column-gap: .9rem;
}

.small {
    max-width: 100%;  
    padding-top: .45rem;
    padding-bottom: .45rem;
}

.large {
    position: fixed;
    max-width: 100%;
    max-height: 100vh;
    top: 0;
    z-index: 3;
    padding: .9rem;
}

#overlay {
  position: fixed; /* Sit on top of the page content */
  display: block; /* Hidden by default */
  width: 100%; /* Full width (cover the whole page) */
  height: 100%; /* Full height (cover the whole page) */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5); /* Black background with opacity */
  z-index: 2; /* Specify a stack order in case you're using a different order for other elements */
  cursor: pointer; /* Add a pointer on hover */
}

/* breakpoints */

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


    html {
        scroll-behavior: smooth;
        scroll-padding-top: 14rem;
    }

    header {
        height: 14rem; 
        max-width: 1500px;
    }

    #title {
        font-size: 2.25rem;
        font-weight: 500;
    }

    #headline {
        padding-top: .9rem;
        font-size: 1.8rem;
    }

    #navlinks a,p {
        font-size: 1.5rem;
    }

    #gallery {
        padding-top: 14rem; 
    }

    #portrait, #other {
        column-count: 3;
        column-gap: 1.8rem;
    }

    .small {
        padding-top: .9rem;
        padding-bottom: .9rem;
    }

    .large {
        position: fixed;
        height: auto;
        top: 0;
        z-index: 2;
        padding: 1.8rem;
        left: 50%;
        transform: translate(-50%);
    }
}