@import url('https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,400..900;1,400..900&family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Vollkorn:ital,wght@0,400..900;1,400..900&display=swap');

/* Table of Contents

0. Basic css reset
1. CSS Custom Properties
2. Navbar & Header
3. Global styling
4. Hero section
5. About me
6. Skills / Knowledge
7. Projects
8. Contact
9. Weather
10. Changing backgrounds
11. Footer
12. Buttons
13. MediaQuerys

Table of Contents */

/* 0. START of Reset */


*,
*::before,
*::after{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
ul,
ol {
  list-style: none;
}
/* END of Reset */


/* 1. START CSS Custom Properties */
:root{
  --primary-color: rgb(50, 45, 57);
  --primary-color-faded: rgb(105, 102, 109);
  --toupe-color: rgb(139, 135, 143);
  --timber-color: rgb(211, 208, 203);
  --accent-color: rgb(133, 112, 171);
  --background-color: rgb(236, 235, 230); /* ECEBE6 */
  --background-colora: rgba(236, 235, 230, 0.95);
  --hero-city-color: rgb(222, 221, 217);  /* DEDDD9 */
  --formular-background-color: whitesmoke;
  --formular-active-color: white;
  --body-font: 'IBM Plex Mono', Helvetica, sans-serif;
  --headers-font: Alegreya, Cochin, Cambria, Georgia, Times, 'Times New Roman', serif;
  --hero-cards-font: Vollkorn, Alegreya, serif;


}
/* END CSS Custom Properties */


/* 2. START Navbar & Header */
nav{
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  height: 5em;
  width: 100%;
  background: var(--background-colora);
  border-bottom: 1px solid var(--timber-color);
  z-index: 1;
}
nav ul{
  display: flex;
}
nav ul a{
  font-size: 1.4em;
  font-family: var(--headers-font);
  color: var(--primary-color);
  padding: 0em 0.5em;
  text-decoration: none;
}

    /* START Länkar i navbar. Kopplat till JS-styling */
    #navbar a {
      position: relative;
      text-decoration: none;
    }

    #navbar a::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: -0.5em;
      width: 40px;
      height: 2px;
      background-color: currentColor;
      transform: translateX(-50%);
      opacity: 0;
      transition: opacity 0.3s ease-in-out;
    }
    #navbar a:hover::after {
      opacity: 1;
    }
    /* END Länkar i navbar. Kopplat till JS-styling */


    /* START Navbar. Kopplat till JS-styling. */
    #navbar {
      box-sizing: border-box;
      z-index: 1000;
      position: fixed;
      opacity: 1;
      transform: translateY(0);
      transition: top 0.3s ease, opacity 0.3s ease;
    }
    /* END Navbar. Kopplat till JS-styling. */

/* END Navbar & Header */


/* 3. START of Global styling */
::selection{
  color: var(--background-color);
  background: var(--accent-color);
}

a{
  color: var(--accent-color);
  text-decoration: none;
  transition: transform 0.1s, background-color 0.2s ease; 
}
a:hover{
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
  text-underline-offset: 0.4em;
}
a:active{
  opacity: 0.6;
}
h2, h3{
  font-family: var(--headers-font);
}

body, html {
  line-height: 1.5;
  font-size: 1em;
  color: var(--primary-color);
  background: var(--background-color);
  font-family: var(--body-font);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

main{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
section{
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  scroll-margin-top: 14em;
}

section:not(#hero){
  padding-top: 4em;
  padding-bottom: 12em;
}

article{
  width: 100%;
  max-width: 1920px;
  margin-bottom: 2em;
}

ul li::marker{
  color: var(--accent-color);
}
.section-body{
  margin-bottom: 2em;
  max-width: 38em;
}
.no-split{
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  width: 100%;
  padding: 1em;
}
.centered-content{
  width: 852px;
}

.vertical-split{
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  width: 100%;
  padding: 1em;
}

.linebreak{
  height: 1px;
  background-color: var(--accent-color);
  width: 12em;
  margin-top: 0.2em;
  margin-bottom: 2em;
}

/* END of Global styling */

/* 4. START of Hero section */
#hero{
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-flow: wrap column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 0;
  pointer-events: none;
}
#hero::after{
  content: '';
  position: absolute;
  background-image: url('/images/hsand_bg_edited4.jpg');
  height: 100%;
  width: 2560px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom;
  opacity: 0.07;
  z-index: -1;
}

/* 

width: 900px;

*/


  .hero-top{
    height: 55%;
    display: flex;
    flex-flow: wrap row;
    align-items: center;
    justify-content: center;
    opacity: 1;
    z-index: 2;
  }

  /* START Top Left*/
    .hero-cards-container{
      display: flex;
      flex-flow: row wrap;
      align-content: center;
      justify-content: center;
      font-weight: bold;
      width: 13em;
      height: 20em;
      font-size: 1.5em;
    }
    .hero-cards-container span {
      font-family: var(--hero-cards-font);
      display: inline-block;
      opacity: 0;
      animation: fallDown 0.45s ease forwards;
      padding: 0.5em 1.1em;
    }

    @keyframes fallDown {
      0% {
        opacity: 0;
        transform: translateY(-100px) rotate(0deg); /* Starta utan rotation */
      }
      100% {
        opacity: 1;
        transform: translateY(0) rotate(var(--rotation, 0deg)); /* Behåll rotationen */
      }
    }

    .rotate-10-pos {
      --rotation: 10deg;
    }
    .rotate-10-neg {
      --rotation: -10deg;
    }
    .rotate-22-pos {
      --rotation: 22deg;
    }
    .rotate-22-neg {
      --rotation: -22deg;
    }
    .background-on-accent{
      color: var(--background-color);
      background-color:var(--accent-color);
    }
    .primary-on-timber{
      color: var(--primary-color);
      background-color: var(--timber-color);
    }
  /* END Top Left*/

  /* START Top Right*/
  .hero-right{
    display:flex;
    flex-flow: wrap column;
  }
    .my-name-container{
      color: var(--primary-color);
      width: 22em;
      margin-left: 2em;
      opacity: 1;
    }
    .my-name{
      font-family: var(--headers-font);
      font-size: 5em;
      line-height: 1.2em;
      letter-spacing: -2px;
    }
    .hero-subheader{
      color: var(--primary-color-faded);
      margin-top: 2em;
      margin-left: 2em;
      width: 22em;
    }
  /* END Top Right*/

    /* Bottom */




/* END of Hero section */


/* 5. START of About Me */
#about{
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 24em;
}
#profile-picture-container{
  width: 220px;
  height: 350px;
  background-position-x: center;
  background-size: cover;
  background-image: url('/images/niklas-edited-vintage.jpg');
  transform: scaleX(-1);
  margin-right: 2em;
}

.clip-path{
  clip-path: polygon(12% 4%, 98% 2%, 94% 85%, 12% 88%);
}
#about-me-right{
  max-width: 38em;
}
.download{
  margin-top: 1em;
  margin-right: 0.5em;
}
#testamonials{
  margin-top: 2em;
  display: flex;
  flex-flow: row;
  justify-content: space-between;
  width: 100%;
}
#testamonials ul{
  width: 100%;
  padding: 0em 2em;
}
.quote{
  color: var(--primary-color-faded);
  font-style: italic;
}
.cite{
  color: var(--primary-color-faded);
}

/* END of About Me */

/* 6. START of Skills section */
#skills{
  background-image: url('/images/puzzle-pieces.png');
  background-position-x:70%;
  background-position-y: 25%;
  background-repeat: no-repeat;
}
.icon{
  width: 30px;
  height: 30px;
}
.skills-cv-btn{
  margin-top: 1em;
}


.skills-container {
  height: 12em;
  width: 100%;
  overflow: hidden;
  margin-bottom: 3em;
}

.skills-container ul {
  padding-left: 1em;
  display: flex;
  flex-flow: column wrap;
  height: 100%;
  width: 60%;
}

.skills-container li {
  list-style: disc;
  padding-bottom: 0.5em;
}



/* END of Skills section */

/* 7. START of Projects */
#project{
    background-image: url('/images/plan.png');
    background-position-x: 15%;
    background-position-y: 30%;
    background-repeat: no-repeat;
}

#project-right{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

    /* START of Project Cards */
    .project-card-container{
      display: flex;
      flex-flow: row wrap;
      justify-content: flex-end;
      gap: 3em;
    }
    .project-card{
      display: flex;
      flex-direction: column;
      width: 10.5em;
      height: 18em;
      background-color: var(--background-color);
      border: 1px solid var(--toupe-color);
      border-radius: 3px;
      padding: 1em;
      cursor: default;
    }
    .project-card:hover{
      border-bottom: 2px solid var(--accent-color);
      border-right: 2px solid var(--accent-color);
    }
    .project-card:active{
      opacity: 0.8;
    }
    .project-icon-container{
      height: 35%;
      font-size: 1.5em;
    }

    .project-card-header{
      font-family: var(--headers-font);
      font-size: 1.1em;
      font-weight: 500;
      margin-bottom: 1em;
    }
    .project-card-body{
      font-size: 0.8em;
    }
    #hotelApp,
    #bankApp{
      cursor: pointer;
    }
    /* END of Project Cards */


/* END of Projects */

/* 8. START of Contact */
#contact{
  background-image: url('/images/contact-book.png');
  background-position-x:62%;
  background-position-y: 28%;
  background-repeat: no-repeat;
}

.contact-options li {
  padding-bottom: 0.5em;
} 

form{
  text-align: left;
  margin-top: 1.2em;
}
input,
textarea{
  font-size: 0.9em;
  color: var(--primary-color);
  font-family: "IBM Plex Mono", "Helvetica", sans-serif;
  border: 1px var(--primary-color) solid;
  background-color: var(--formular-background-color);
  padding: 0.6em;
  border-radius: 10px;
  margin-bottom: 1.6em;
}
input:focus,
textarea:focus{
  outline: transparent;
  background-color: var(--formular-active-color);
  border-bottom: 2px solid var(--primary-color);
  border-right: 2px solid var(--primary-color);
}

.formular-container{
  display: flex;
  flex-flow: column wrap;
  width: 100%;
  height: auto;
}

.formular-top{
  width: 63%;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
}
    .formular-top-left{
      min-width: 190px;
      width: 40%;
    }
    .formular-top-right{
      min-width: 300px;
      width: 55%;
    }
    .text-input{
      width: 100%;
    }

.textarea{
  resize: vertical;
  width: 63%;
  min-width: 300px;
  max-width: 100%;
  min-height: 10em;
}

#result{
  margin-left: 2em;
}

.obligatory{
  margin-top: 2em;
  font-size: 0.8em;
}
/* END of Contact */


/* 10. START of Changing Backgrounds */
#about,
#project,
#project-top{
background-color: var(--hero-city-color);
}
#contact-top,
#skills-top,
#project-top{
  position: relative;
  width: 100%;
  height: 6em;
}
#footer,
#footer-top{
  position: relative;
}
/* END of Changing Backgrounds */

  /* Project divider */
  .skills-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
  }
  .skills-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 22px;
  }
  .skills-divider .skills-fill {
    fill: var(--hero-city-color);
  }


  /* Contact divider */
  .project-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
  }
  .project-divider svg {
    position: relative;
    display: block;
    width: calc(254% + 1.3px);
    height: 40px;
    transform: rotateY(180deg);
  }
  .project-divider .project-fill {
    fill: var(--background-color);
  }
  /* Skills divider */
  .contact-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
  }
  .contact-divider svg {
    position: relative;
    display: block;
    width: calc(188% + 1.3px);
    height: 45px;
    transform: rotateY(180deg);
  }
  .contact-divider .contact-fill {
    fill: var(--hero-city-color);
  }


  /* Footer divider */
  .footer-divider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.footer-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 17px;
  transform: rotateY(180deg);
}

.footer-divider .footer-fill {
    fill: var(--background-color);
}

/* w. END of Changing Backgrounds */


/* 11. START of Footer */
footer{
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--body-font);
  height: 10em;
  background-color: var(--timber-color);
}
.footer-container{
  display: flex;
  flex-flow: row;
  justify-content: space-between;
  position: sticky;
  width: 100%;
}
#thirtypercent{
  width: 30%;
}
.socials-container{
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30%;
}
#weatherContainer{
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: center;
  justify-self: center;
  color: var(--primary-color-faded);
  width: 30%;
}

/* END of Footer */


/* 12. START of Buttons */
.submit-button{
  border: 2px var(--accent-color) solid;
  font-weight: 600;
  color: var(--background-color);
  background-color: var(--accent-color);
  border-radius: 3px;
  padding: 0.5em 1.5em;
  font-size: 1em;
}
.submit-button:hover{
  color: var(--accent-color);
  background-color: var(--background-color);
  cursor: pointer;
}
.submit-button:active{
  opacity: 0.8;
}

.socials-button,
.socials-button:visited{
  width: 45px;
  height: 45px;
  color: var(--toupe-color);
  font-size: 2em;
  cursor: pointer;
  padding-right: 1em;
}
.socials-button:hover{
  color: var(--primary-color);
  opacity: 0.8;
}
.socials:active{
  opacity: 0.4;
}
/* END of Buttons */



/* 13. START MEDIAQUERYS */



@media (min-width: 1024) and (max-width: 1920){

    /* 3. START of Global styling */
    section{
      scroll-margin-top: 17em;
      width: 100%;
    }
    section:not(#hero){
      padding-top: 4em;
      padding-bottom: 6em;
    }
    
    .no-split{
      padding: 0em 1em;
    }
    
    .vertical-split{
      padding: 0em 1em;
    }

  /* END of Global Styling */


  /* 4. START of Hero section */
  #hero::after{
    content: '';
    position: absolute;
    background-image: url('/images/hsand_bg_edited4.jpg');
    height: 100%;
    width: 1920px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom;
    opacity: 0.07;
    z-index: -1;
  }

  /* END of Hero section */

  /* 5 START of About me */

  #testamonials{
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    width: 100%;
  }
  #testamonials ul{
    width: 100%;
    padding: 0em 2em;
  }
  .quote{
    font-size: 0.9em;
    font-style: italic;
  }
  .cite{
    font-size: 0.9em;
  }
  /* END of About me */


  /* w. START of Changing Backgrounds */
  #skills-top,
  #contact-top,
  #project-top{
    width: 100%;
    height: 5em;
  }

  /* w. END of Changing Backgrounds */

  footer{
    height: 8em;
  }
}
 
@media (min-width: 768px) and (max-width: 908px){
  
  /* 3. START of Global */
  section{
    scroll-margin-top: 7em;
  }
  
  /* END of Global styling */

  /* START of About me */

  #testamon-article{
    display: flex;
    flex-flow: row wrap;
    width: 41em;
  }
  #testamonials{
    margin-top: 0em;
    display: flex;
    flex-flow: column;
    justify-content: center;
  }
  #testamonials ul{
    padding: 1em 0em;
  }
  /* END of About me */

    /* START of Project Cards */
  #project .centered-content{
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
  }
  .project-card-container{
    max-width: 480px;
    gap: 2em;
  }
  .project-card{
    width: 10em;
    height: 16em;
  }
  .project-icon-container{
    height: 25%;
    font-size: 1.2em;
  }

  .project-card-header{
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 1em;
  }
  .project-card-body{
    font-size: 0.75em;
  }
/* END of Project Cards */
}


@media (min-width: 481px) and (max-width: 768px){

/* 2. START Navbar & Header */

section{
  scroll-margin-top: 7em;
}
nav{
  height: 5em;
}
nav ul a{
  font-size: 1.3em;
  padding: 0em 0.5em;
  text-decoration: none;
}
/* END Navbar & Header */

/* 4. START of Hero section */
#hero{
  position: relative;
}
#hero::after{
  width: 900px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom;
  opacity: 0.07;
  z-index: -10;
}
.hero-top{
  width: 98%;
  position: relative;
  height: 95%;
  opacity: 1;
  z-index: 2;
}

.hero-left{
  position: absolute;
  top: 34em;
  left: center;
  z-index: -5;
}
.hero-cards-container{
  opacity: 0.8;
  width: 95%;
  max-width: 400px;
  height: 3em;
  font-size: 1.2em;
}

.hero-right{
  position: absolute;
  top: 6em;
  left: center;
  z-index: 1;
}


/* START of About Me */

#testamonials{
  margin-top: 0em;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  width: 98%;
}
#testamonials ul{
  padding: 1em;
}
/* END of About Me */


/* START of skills */
.skills-container {
height: 14em;
overflow: hidden;
margin-bottom: 3em;
}
.skills-container ul {
width: 100%;
}

/* END  of skills */

/* START of Project Cards */
#project .centered-content{
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-end;
}
.project-card-container{
  max-width: 480px;
  gap: 2em;
}
.project-card{
  width: 10em;
  height: 16em;
}
.project-icon-container{
  height: 25%;
  font-size: 1.2em;
}

.project-card-header{
  font-family: var(--headers-font);
  font-size: 1.1em;
  font-weight: 500;
  margin-bottom: 1em;
}
.project-card-body{
  font-size: 0.75em;
}
/* END of Project Cards */


/* START Section divider */
#skills-top,
#project-top,
#contact-top{
  height: 3em;
}
/* END Section divider */
}


@media (min-width: 400px) and (max-width: 480px){

    /* 2. START of Global styling */

  section{
    scroll-margin-top: 2em;
    /* 2. END of Global styling */

  }

  /* 2. START Navbar & Header */
  nav{
    height: 5em;
  }
  nav ul a{
    font-size: 1.3em;
    padding: 0em 0.5em;
    text-decoration: none;
  }
  article{
    width: 100%;
    max-width: 480px;
  }

  /* END Navbar & Header */

  /* 4. START of Hero section */
  #hero{
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 0;
    pointer-events: none;
    width: 100vw;
    height: 100vh;
  }
  #hero::after{
    width: 900px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
    opacity: 0.07;
    z-index: -10;
  }
  .hero-top{
    width: 98%;
    position: relative;
    height: 95%;
  }

  /* START Top Left*/
  .hero-left{
    position: absolute;
    top: 34em;
    left: center;
    z-index: -5;
  }
  .hero-cards-container{
    opacity: 0.8;
    align-content: center;
    justify-content: center;
    width: 95%;
    max-width: 400px;
    height: 3em;
    font-size: 1.2em;
  }
  /* END Top Left*/

  /* START Top Right*/
  .hero-right{
    position: absolute;
    top: 6em;
    left: center;
    z-index: 1;
  }
  /* END Top Right*/

/* START of About Me */

  #testamonials{
    margin-top: 0em;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    width: 98%;
  }
  #testamonials ul{
    padding: 1em;
  }
/* END of About Me */

/* START of skills */
.skills-container {
  height: 14em;
  overflow: hidden;
  margin-bottom: 3em;
}
.skills-container ul {
  width: 100%;
}

/* END  of skills */



  /* START of Project Cards */
  .project-card-container{
    gap: 1.5em;
  }
  .project-card{
    width: 10em;
    height: 16em;
  }
  .project-icon-container{
    height: 25%;
    font-size: 1.2em;
  }

  .project-card-header{
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 1em;
  }
  .project-card-body{
    font-size: 0.75em;
  }
  /* END of Project Cards */


  /* START Background-image removal */
  #skills,
  #project,
  #contact{
    background-image: none;
  }
  /* START Background-image removal */

  /* START Section divider */
  #skills-top,
  #project-top,
  #contact-top{
    height: 3em;
  }
  /* END Section divider */

}


@media (max-width: 400px){
  
/* 2. START Navbar & Header */
nav{
  height: 5em;
}
nav ul a{
  font-size: 1.3em;
  padding: 0em 0.5em;
  text-decoration: none;
}

/* END Navbar & Header */

article{
  width: 100%;
  max-width: 480px;
}

/* 4. START of Hero section */
#hero{
  position: relative;
  z-index: 0;
  pointer-events: none;
}
#hero::after{
  width: 900px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom;
  opacity: 0.07;
  z-index: -10;
}
.hero-top{
  width: 98%;
  position: relative;
  height: 95%;
  opacity: 1;
  z-index: 2;
}

/* START Top Left*/
.hero-left{
  position: absolute;
  top: 34em;
  left: center;
  z-index: -5;
}
.hero-cards-container{
  opacity: 0.8;
  font-weight: bold;
  width: 95%;
  max-width: 400px;
  height: 3em;
  font-size: 1.2em;
}
/* END Top Left*/

/* START Top Right*/
.hero-right{
  position: absolute;
  top: 6em;
  left: center;
  z-index: 1;
}

/* END Top Right*/

/* START of About Me */

#testamonials{
  margin-top: 0em;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  width: 98%;
}
#testamonials ul{
  padding: 1em;
}
/* END of About Me */

/* START of skills */
.skills-container {
height: 14em;
overflow: hidden;
margin-bottom: 3em;
}
.skills-container ul {
width: 100%;
}

/* END  of skills */


/* START of Project Cards */
.project-card-container{
  gap: 0.9em;
}
.project-card{
  width: 9.5em;
  height: 16em;
}
.project-icon-container{
  height: 25%;
  font-size: 1.2em;
}

.project-card-header{
  font-family: var(--headers-font);
  font-size: 1.1em;
  font-weight: 500;
  margin-bottom: 1em;
}
.project-card-body{
  font-size: 0.75em;
}
/* END of Project Cards */


/* START Background-image removal */
#skills,
#project,
#contact{
  background-image: none;
}
/* START Background-image removal */

#result{
  margin-left: 0.2em;
}

}