*{
    padding: 0;
    margin:0;
    box-sizing: border-box;
    color:#2f4f4f;
    gap: .5vw;
    border-width: 3px;
}

img{
    max-width: 100%;
    height: auto;
}

html{
    min-height: 100%;
    background: linear-gradient(to top, rgb(208, 220, 253), rgb(240, 248, 255));
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

body{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Inter", sans-serif;
    line-height: 125%;
    font-size: 0.9em;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}

header{
    height: 0px;
    width: 100%;
    position: fixed;
    top: 0;
    padding:0 .5vw 0 .5vw;
    z-index: 2;
}

header > ul{
    display: grid;
    grid-template-columns: repeat( 4, 1fr);
    list-style: none;
    width: 100%;
}

footer{
    margin-top: auto;
    grid-area: footer;
    display: flex;
    align-items: flex-end;
    padding:.5vw;
    width: 100%;
}

footer > ul {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    list-style: none;
    width: 100%;
}

main{
    grid-area: main;
    display: grid;
    grid-template-columns: 1fr;
    padding: .5vw;
}

p{
    hyphens: auto;
}

h1{
    font-family: "Instrument Serif";
    font-weight: 400;
    line-height: 100%;
    font-style: normal;
    font-size: 26.5vw;
    letter-spacing: -.01em;
    transform: translate(0,0.1em);
    cursor: crosshair;
    user-select: none;
}

h2{
    font-family: "Instrument Serif";
    line-height: 85%;
    font-weight: 400;
    font-style: normal;
    font-size: 5em;
    letter-spacing: -.01em;
}

li{
    font-size: 1em;
}

a{
    text-decoration: none;
}

canvas {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    z-index:-1;
}

.lander{
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    text-align: left;
    justify-content: flex-end;
    cursor: crosshair;
}

.about_grid{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    padding-top: 4vh;
}

.about_grid > p {
    grid-column: 2 / span 2;
}

/* My project list div! */

.project_list > ul{
    list-style: none;
    font-family: "Instrument Serif";
    font-size: 5em;
    line-height: 1.5;
    width: 100%;
}

.project_list > ul > li{
    border-bottom-style: solid;
}

.project_list > ul > li:first-child {
    border-top: solid;
}

.project_item {
    position: relative;
}

.hover_image {
    position: fixed;
    display: none;
    pointer-events: none; /* prevents image from blocking hover */
    z-index: 100;
}

.hover_image img {
    width: 300px;
    height: auto;
    display: block;
}

/* Poster gallery */

#poster_gallery{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

/* first project slide! */

.project_1{
    min-height: 100svh;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    padding-top: 40px;
}

.project_1 > :nth-child(2){
    grid-column:  span 2;
}
.project_1 > :nth-child(3){
    grid-column:  span 2;
}
.project_1 > :nth-child(4){
    grid-column:  span 3;
}

.project_1 > :nth-child(5),
.project_1 > :nth-child(6){
    grid-column:  span 2;
}

/* Second project! */
.project_vertere{
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    padding-top: 40px;
}


.project_vertere > :nth-child(2){
    grid-column: span 2;
}
.project_vertere > :nth-child(4){
    grid-column: span 2;
}

.project_vertere > :nth-child(5),
.project_vertere > :nth-child(6),
.project_vertere > :nth-child(7),
.project_vertere > :nth-child(8),
.project_vertere > :nth-child(9){
    grid-column: span 2;
}

/* third project! */
.project_aavistus{
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    padding-top: 40px;
}
.project_aavistus_2{
    display: grid;
    grid-template-columns: repeat(8, 1fr);
}

.project_aavistus > :nth-child(2),
.project_aavistus > :nth-child(6){
    grid-column: span 2;
}
.project_aavistus > :nth-child(3){
    grid-column: span 5;
}
.project_aavistus > :nth-child(4){
    grid-column: span 3;
}

.project_aavistus_2 > :nth-child(1){
    grid-column: span 4;
}
.project_aavistus_2 > :nth-child(2){
    grid-column: 3 / span 2;
}

/* fourth project! */
.project_E30V{
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    padding-top: 40px;
}

.project_E30V > :nth-child(2),
.project_E30V > :nth-child(4),
.project_E30V > :nth-child(5),
.project_E30V > :nth-child(6),
.project_E30V > :nth-child(7){
    grid-column: span 2;
}

.project_E30V > :nth-child(3){
    grid-column: 6 / span 3;
}

.project_E30V > :nth-child(8),
.project_E30V > :nth-child(9){
    grid-column: span 4;
}

/* fifth project! */
.project_ramirent{
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    padding-top: 40px;
}

.project_ramirent > :nth-child(1),
.project_ramirent > :nth-child(2),
.project_ramirent > :nth-child(3),
.project_ramirent > :nth-child(4),
.project_ramirent > :nth-child(5),
.project_ramirent > :nth-child(5),
.project_ramirent > :nth-child(6),
.project_ramirent > :nth-child(7),
.project_ramirent > :nth-child(8),
.project_ramirent > :nth-child(9){
    grid-column: span 2;
}


main img,
main video {
    width: 100%;
    height: auto;
    display: block;
    
}

.introduction_slide{
    position: relative;
    text-align: center;
    grid-column: 1 / -1;
}

.introduction_slide > h2 {
    color: white;
    position:absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Selects all direct children of the grid container */
.grid_container > * {
    padding-top: 1vh;
}


/* Mobile version*/
@media (max-width: 800px){
    main{
        min-height: 100vh;
        padding: 1vh;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:    
            'main'
            'footer';
    }

    .project_1,
    .project_2{
        grid-template-columns: 1fr;
        gap: 1vh;
    }

    .project_1 > :nth-child(2),
    .project_1 > :nth-child(3),
    .project_1 > :nth-child(4),
    .project_1 > :nth-child(5),
    .project_1 > :nth-child(6),
    .project_2 > * {
        grid-column: span 1;
        grid-row: auto;
    }

    .project_1 img,
    .project_1 video {
        width: 100%;
        height: auto;
        display: block;
    }
}