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

html {
    scroll-behavior: smooth;
  }

/**********************/
/* CUSTOM PROPERTIES */
/********************/

:root {
    /* Color theme */
    --dark-green: #4c5a41;
    /* --sage: #b3b2a7; */
    --sage: rgb(203,205,186);
    --light-pink: #DBBFB3;
    --brown: #9A5D3E;
    --clay: #cabdb5;
    --sand: #e2dbd6;

    /* basic colors */
    --background-color: rgb(175, 175, 175);
    --text-color: rgb(228, 228, 228);
    --blobs-colors: rgb(119, 118, 118);

    /* FONTS */
    --light: 300;
    --regular: 400;
    --bold: 900;
    --big-font: 3em;
    --medium-font: 2em;

}

/* STATES */

a:focus {
    outline: none;
    border: dashed 2px var(--brown);
    text-decoration: none;
}

a {
    text-decoration: wavy underline var(--dark-green) 1.5px;
    color: var(--dark-green);
    font-weight: 700;
}

p > a:hover{
    text-decoration: underline var(--dark-green) 2px;
}

div > a:hover {
    transition: .5s ease;
}

div > a:hover {
    transform: scale(1.05);
}

/************/
/* OVERALL */

body {
    background-color: var(--sand);
    font-family: 'Merriweather', sans-serif;
    position: relative;
}

main {
    max-width: 1440px;
    margin: auto;
}

ul li{
    list-style: none;
}

img {
    max-width: 320px;
    max-height: 400px;
}

/**********/
/* FONTS */

h1, h2, h3 {
    font-weight: var(--bold);
    color: var(--dark-green);
}

p, #about a{
    font-weight: var(--light);
}

p{
    font-family: 'Roboto', sans-serif;
    font-weight: var(--light);
}

body svg {
    width: 0;
    height: 0;
}

main img {
    max-width: 240px;
    max-height: 400px;
}


/*******************************/
/*********** HEADER ***********/
/*****************************/

header{
    height: 100vh;
    width: 100vw;
    position: relative;
}

header section img{
    width: 240px;
    box-shadow: -13px -10px 0px 5px var(--sage);
}


/************************************/
/* SECTION in header - photo of me */

header section{
    /*source: https://nadikun.com/a-better-way-to-center-div-or-section-horizontally-and-vertically-with-css/ */
    width: 240px; 
    height: 240px; 
    position: absolute; 
    margin: auto; 
    left: 0; 
    right: 0; 
    top: 0; 
    bottom: 0;
    color: white
}

header section h2{
    writing-mode: vertical-lr;
    position: absolute;
    right: -1.5rem;
    font-size: var(--big-font);
    z-index: 2;
    color: white;
}

header section h2::after{
    content:'Portfolio';
    writing-mode: vertical-lr;
    position: absolute;
    right: -0.2em;
    top: 0.2em;
    filter: url(#outline-text); /* svg filter in index toegepast */
}

header section h1{
    position: absolute;
    top: 5em;
    left: -1em;
    font-size: calc(var(--big-font)/ 1.3);
    z-index: 2;
    color: white;
    font-family: 'Caveat', cursive;
}


/**********************/
/******* BLOBS *******/
/********************/

header > div {
    border-radius: 48% 37% 32% 41% / 52% 20% 61% 33%;
    width: 96px;
    height: 96px;
    background-color: var(--dark-green);
    position: absolute;
    z-index:-2;
}

header > div:first-of-type{
    bottom: 48px;
    left: 16px;
    width: 160px;
}

header > div:first-of-type::after{
    content:'';
    position: absolute;
    background-color: var(--sage);
    border-radius: 48% 37% 32% 69% / 21% 20% 39% 61%;
    width: 160px;
    height: 80px;
    left: -3em;
    top: 4em;
}

header div:nth-of-type(2){
    right: 1em;
    top: 5.5em;
    background-color: var(--clay);
}

header div:nth-of-type(2)::after{
    content:'';
    position: absolute;
    border: 1px solid white;
    border-radius: 48% 37% 32% 69% / 21% 20% 39% 61%;
    width: 10em;
    height: 8em;
    left: -3em;
    top: 1em;
    animation-name: moving-blobs;
    animation-duration: 10s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

header div:nth-of-type(3) {
    left: -4%; /* DONT USE PERCENTAGE */
    top: 5%;
    width: 14em;
    animation-name: moving-blobs;
    animation-duration: 12s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    background-color: var(--sage);
}

header div:nth-of-type(3)::after {
    content:"";
    position: absolute;
    top: -2em;
    left: -2em;
    width: 12em;
    height: 15em;
    border: 2px solid var(--brown);
    border-radius: 48% 37% 32% 41% / 38% 27% 42% 36%;
}

header div:nth-of-type(3)::before {
    content:"";
    position: absolute;
    width: 1em;
    height: 1em;
    top: 4em;
    left: 16em;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0px 0px 0px 5px white, 0px 36px 0px 5px white, 34px 0px 0px 5px white, 34px 36px 0px 5px white
}

/************************/
/****** NAVIGATIE ******/
/**********************/

nav{
    position: fixed;
    top: 0em;
    right: 0em;
    z-index: 100;
    background-color: var(--dark-green);
    width: 100vw;
}

nav ul {
    display: flex;
    justify-content: space-around;
    padding: 0em;
}

header nav ul li {
    margin: 1em 1em;
}

header nav ul li a{
    text-decoration: none;
}

nav ul li a > p {
    font-size: calc(var(--big-font)/1.5) ;
    font-weight: var(--bold);
    font-family: 'Merriweather', sans-serif;
    color: white;
}

/* States */
nav ul li a:focus{
    outline: none;
}

nav ul li a:hover , nav ul li a:focus{
    text-decoration: wavy underline white 3px;
    -webkit-text-decoration: wavy underline white 3px;
    -moz-text-decoration: wavy underline white 3px;
}

/*******************************/
/*********** MAIN ***********/
/*****************************/

main p{
    margin: 1em auto;
    font-size: 13px;
}

/***************************/
/***** WORK - SECTION *****/
/*************************/

ul{
    padding: 0;
}

main section article p{
    max-width: 85%;
}

main section:first-of-type ul li article p a{
    display: inline;
}

main section:first-of-type ul li article img{
    box-shadow: 8px 8px 0px 3px var(--sage);
    margin: 2em auto;
    max-width: 24em;
    max-height: 17em;
    transition: .2s ease;
    display: block;
}

main section:first-of-type ul li {
    min-height: 100vh;
    background-color: var(--sand);
    position: -webkit-sticky;
    position: -moz-sticky;
    position: -o-sticky;
    position: -ms-sticky;
    position: sticky;
    top: 72px;
    padding: 1em;
    overflow: hidden;
}

main section:first-of-type article .project {
    margin: 0;
    position: absolute;
    top: 45%;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);

} 

/* TITLE H2 */

main section article h2{
    font-size: var(--medium-font);
    position: relative;
    text-align: center;
}

main section article h2::after {
    content: attr(data-descr);
    position: absolute;
    opacity: 40%;
    right: 0em;
    left: 1em;
    top: -0.2em;
    filter: url(#outline-text); /* svg filter in index toegepast */
}

/* BUTTON STYLING */

main button{
    background-color: var(--brown);
    border: none;
    padding: 1em;
    margin: auto;
    display:block;
    box-shadow: 5px 5px 0px white;
    transition: .5s ease;
}

main button a{
    color: white;
    text-decoration: none;
}

main section:nth-of-type(2) button:hover{
    background-color: var(--clay);
    cursor: pointer;
}

/* BLOB */

main section:nth-of-type(2) > div {
    left: 10%;
    top: -5%;
    width: 23em;
    animation-name: moving-blobs;
    background-color: var(--sage);
    animation-duration: 12s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    position: relative;
}

main section:nth-of-type(2) > div::after {
    content:"";
    position: absolute;
    top: 2em;
    left: -7em;
    width: 12em;
    height: 15em;
    z-index: -1;
    border: 2px solid var(--brown);
    border-radius: 48% 37% 32% 41% / 38% 27% 42% 36%;
}

main section:nth-of-type(2) > div::before {
    content:"";
    position: absolute;
    width: 1em;
    height: 1em;
    top: 29em;
    left: 23em;
    z-index: -1;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0px 0px 0px 5px white, 0px 36px 0px 5px white, 34px 0px 0px 5px white, 34px 36px 0px 5px white
}

main section:nth-of-type(2) img{
    box-shadow: -13px -10px 0px 5px var(--sage);
    display: block;
    margin: 1em auto;
}

main section:nth-of-type(2) {
    height: 78vh;
}

/***********/
/* FOOTER */
/***********/

footer{
    text-align: center;
    padding: 1em;
}

footer p{
    margin: 1em 0em 0em 0em;
}

footer p:last-of-type{
    margin: .5em 0em 0em 0em;
}

/****************************/
/******** ANIMATIONS *******/
/**************************/

@keyframes moving-blobs {
    0%{
        border-radius: 48% 37% 32% 41% / 52% 20% 61% 33%;
    } 50% {
        border-radius: 48% 37% 45% 29% / 24% 31% 36% 54% ;
    } 100% {
        border-radius: 61% 31% 62% 23% / 21% 46% 30% 78% ;
    }
}

/***********************/
/***** RESPONSIVE *****/
/*********************/

@media (max-width: 400px){
    body{
        width: auto;
    } 

    nav{
        left:0em;
    }

    main section:nth-of-type(2) {
       height: auto;
    }
    
    main section:first-of-type ul li article img {
        max-width: 14em;
        max-height: 12em;
    }

    main section:nth-of-type(2) > div::before {
        left: 17em;
    }


}

@media (min-width: 880px){


            body p{
                font-size: 15px;
            }

            main section:first-of-type ul li article img {

                max-width: 25em;
            }

               /* info about project */

               main section:first-of-type article .project img{
                margin: auto;
            }

            main section article p{
                max-width: 90%;
            }

            main section:first-of-type article .project{
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                align-items: center;
            }

            main section article h2{
                text-align: left;
                position: relative;
                top: 1em;
                left: 0.5em;
            }

            main section article h2::after {
                left: 0.2em;
                top: -0.2em;
            }

            main section:first-of-type article .project {
                top: 50%;
            } 

             /* about */

            /* LAYOUT */

            

            main section:nth-of-type(2) article .about{
                display: grid;
                grid-template-columns: 1fr 1fr;
                grid-template-rows: 0fr 0fr 0fr;
                align-items: center;
                justify-items: center;
                margin: 0;
                position: absolute;
                top: 50%;
                -ms-transform: translateY(-50%);
                transform: translateY(-50%);
            }

            main section:nth-of-type(2) article h2{
                grid-column-start: 1;
                grid-column-end: 3;
                justify-self: start;
                margin: 0em 0em 1em 2em;
            }


            main section:nth-of-type(2){
                position: relative;
            }

}

@media (min-width: 1036px){

            /**********************/
            /******* BLOBS *******/
            /********************/

            header > div {
                width: 10em;
                height: 10em;
                z-index:-2;
            }

            header > div:first-of-type{
                top: 32em;
                left: 1em;
                width: 17em;
            }

            header > div:first-of-type::after{
                width: 10em;
                height: 8em;
                left: -3em;
                top: 4em;
            }

            header div:nth-of-type(2){
                right: 1em;
                top: 0.5em;
            }

            header div:nth-of-type(2)::after{
                width: 10em;
                height: 8em;
                left: -3em;
                top: 1em;
            }

            header div:nth-of-type(3) {
                left: 10%;
                top: -5%;
                width: 23em;
            }

            header div:nth-of-type(3)::after {
                top: -2em;
                left: -2em;
                width: 12em;
                height: 15em;
            }

            header div:nth-of-type(3)::before {
                width: 1em;
                height: 1em;
                top: 8em;
                left: 19em;
            }

            /************************/
            /****** NAVIGATIE ******/
            /**********************/

            nav{
                top: 3em;
                right: 2em;
                background-color: transparent;
                width: auto;
            }


            nav ul {
                display: block;
                /* justify-content: space-around; */
            }


            nav ul li a > p {
                font-size: var(--big-font);
                color: var(--dark-green);
                mix-blend-mode: difference;
            }

            nav ul li a:hover , nav ul li a:focus{
                text-decoration: wavy underline var(--dark-green) 5px;
                -webkit-text-decoration: wavy underline var(--dark-green) 5px;
                -moz-text-decoration: wavy underline var(--dark-green) 5px;
            }

             /*******************************/
            /*********** MAIN ***********/
            /*****************************/

            main p{
                margin: 2em;
                font-size: 15px;
            }

            /***************************/
            /***** WORK - SECTION *****/
            /*************************/

            main section:first-of-type ul li article p a{
                display: inline;
            }

            main section:first-of-type ul li article img{
                box-shadow: 15px 15px 0px 3px var(--sage);
                margin: auto 2em;
                max-width: 30em;
                max-height: 25em;
                transition: .2s ease;
                display: block;
            }


            main section:first-of-type ul li {
                height: 100vh;
                background-color: var(--sand);
                position: -webkit-sticky;
            position: -moz-sticky;
            position: -o-sticky;
            position: -ms-sticky;
                position: sticky;
                top: 0em;
                padding: 2em;
                text-align: left;
            }

            main section:nth-of-type(2) {
                height: 80vh;
            }
}

@media (min-width: 1200px){

            /*******************************/
            /*********** HEADER ***********/
            /*****************************/

            header section img{
                width: 20em;
            }


            /************************************/
            /* SECTION in header - photo of me */

            header section{
                width: 20em; 
                height: 20em; 
            }

            header section h2{
                right: -0.7em;
                font-size: calc(var(--big-font) * 1.5);
            }

            header section h1{
                top: 5em;
                font-size: var(--big-font);
            }

            main section article h2{
                font-size: calc(var(--medium-font)*1.2);
            }

            /***********************/
            /******** ABOUT *******/
            /*********************/

            /* basics */

            main section:nth-of-type(2) article p{
                width: 80%;
            }

            main section:nth-of-type(2) img{
                max-width: 300px;
            }
    
}