  *::selection {
      background: lightskyblue;
  }

  html {
      scroll-behavior: smooth;
  }

  body {
      display: flex;
      flex-direction: column;
      font-family: 'Constantia', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
      margin: 0;
      min-height: 100vh;
      /* Se till att body fyller hela fönstret */
      background-color: #191919;
      background-attachment: scroll;
      background-repeat: no-repeat;
      background-position: center;
      box-sizing: border-box;
      flex-wrap: wrap;
  }

  header {
      word-break: break-all;
      overflow: hidden;
      height: 30vh;
      background: linear-gradient(to bottom, rgba(25, 25, 25, 0.8), rgba(25, 25, 25, 0));
      margin: auto;
      width: 100%;
  }

  /* Knappens stil */
  #navbar {
      margin-bottom: 2em;
  }

  .content {
      padding-left: 0;
      display: flex;
      justify-content: space-around;
      background-color: #3a3838;
      margin: auto;
  }

  .content a {
      text-align: center;
      white-space: nowrap;
  }

  .content li {
      list-style-type: none;
      padding: 1em;
  }

  .content li a {
      color: rgba(245, 245, 245, 0.767);
      text-decoration: none;
      font-size: 2em;
      position: relative;
  }

  .content li a::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: -5px;
      height: 2px;
      /* Gör linjen synlig */
      width: 0;
      /* Initialt gömd */
      background-color: lightseagreen;
      /* Färgen på linjen */
      transition: width 0.3s ease;
      /* För en smidig övergång */
  }

  .content li a:hover::after {
      width: 100%;
  }

  /* Menyn är dold från början */
  .overlay {
      display: flex;
      flex-direction: column;
      align-items: center;
  }

  .welcome {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 1em;
      border-radius: 2em;
      box-shadow: 0 2px 4px 4px grey;
      /* Gör bredden responsiv men sätter ett maxvärde */
      margin-bottom: 2em;
  }

  .welcome h2 {
      font-size: 2em;
      font-style: italic;
      color: rgba(245, 245, 245, 0.767);
      margin-left: 0.3em;
      text-align: center;
      word-wrap: break-word;
  }

  .paragraph-wrapper {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      margin: 2em;
      gap: 1em;
      line-height: 1.4em;
  }

  .first-paragraph,
  .second-paragraph,
  .third-paragraph {
      font-weight: 400;
      width: 10em;
      color: rgba(245, 245, 245, 0.767);
      font-size: 1.3em;

  }

  .img-container {
      display: flex;
      align-items: start;
      flex-grow: 1;
      margin: 4em;
  }

  .img-container img {
      border-radius: 5px;
      width: 7em;
      border: 2px solid white;
      box-shadow: 0px 0px 8px rgba(255, 255, 255, 0.7);
  }

  .competences {
      color: rgba(245, 245, 245, 0.767);
      margin-bottom: 10px;
  }

  .h3-competence {
      position: relative;
      display: inline-block;
      transition: all 0.5s ease-in-out;
  }

  .h3-competence::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: -5px;
      height: 2px;
      width: 0;
      border-bottom: 2px solid #20b2aa;
      transition: width 0.3s ease;
      /* För en smidig övergång */
  }

  .h3-competence:hover::after {
      width: 100%;
  }


  #gallery {
      width: 100%;
  }

  .grid-wrapper {
      display: grid;
      border-top: 2px solid #3a3838;
      justify-content: space-evenly;
      justify-items: center;
      align-items: center;
      grid-template-columns: repeat(3, 1fr);
      row-gap: 3em;
  }

  .grid-wrapper img {
      margin-top: 3em;
      border-radius: 0.3em;
  }

  .card {
      display: flex;
      flex-direction: column;
      align-items: center;
      transition: all 0.5s ease-in;
      background: none;
      margin-top: 1em;

  }

  .card img {
      width: 4em;
  }

  .card:hover {
      transform: scale(1.1);
      /* Förstorar kortet lite */
  }

  .footer-content {
      border-top: 2px solid #3a3838;
  }

  .footer-info {
      display: flex;
      margin-top: 2em;
      justify-content: space-between;
      align-items: flex-end;
  }

  .footer-info img {
      vertical-align: bottom;
      width: 3em;
  }

  .copyright-text {
      color: #aaa;
  }

  .social-media {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: .3em;
  }

  .social-media img:hover {
      box-shadow: 0px 0px 4px grey;
  }


  .social-media img {
      border-radius: 5px;
  }

  #email-text img {
      background: none;
      filter: brightness(.9)
  }

  #email-text img:hover {
      box-shadow: 0 0 4px gray;
  }

  .scrollButton {
      display: flex;
      justify-content: end;
      align-items: center;
  }

  .scroll-up img {
      width: 3em;
  }

  .scroll-up a {
      filter: opacity(.5);
  }

  .scroll-up img:hover {
      background-color: #3a3838;
      border-radius: .5em;
  }

  /* Extra Small (Mobil, under 576px) */
  @media (max-width: 575px) {

      #navbar {
          font-size: 0.5em;
      }

      .welcome h2 {
          font-size: 1.3em;
      }

      .paragraph-wrapper {
          font-size: 0.8em;
      }

      .grid-wrapper {
          grid-template-columns: 1fr;
      }

      .social-media {
          grid-template-columns: 1fr;
      }

      .footer-info {
          flex-direction: row;
          justify-content: space-between;
          align-items: end;
      }
  }

  /* Small (Mobil & små tabletter, 576px och över) */
  @media (min-width: 576px) and (max-width: 768px) {
      .welcome {
          margin: 1.5em;
      }

      #navbar {
          font-size: 0.6em;
      }

      .welcome h2 {
          font-size: 1.5em;
      }

      .paragraph-wrapper {
          font-size: .8em;
      }

      .img-container {
          display: flex;
          justify-content: right;
          align-items: center;
      }

      .grid-wrapper {
          grid-template-columns: repeat(2, 1fr);
      }

      .social-media {
          grid-template-columns: repeat(2, 1fr);
      }
  }

  /* Medium (Tabletter & mindre bärbara datorer, 768px och över) */
  @media (min-width: 769px) and (max-width: 991px) {
      #navbar {
          font-size: 0.8em;
      }

      .welcome {
          margin: 1.7em;
      }

      .welcome h2 {
          font-size: 1.8em;
      }

      .img-container {
          display: flex;
          justify-content: center;
          align-items: center;

      }

      .grid-wrapper {
          grid-template-columns: repeat(3, 1fr);
      }

      .social-media {
          grid-template-columns: repeat(2, 1fr);
      }
  }

  /* Large (Bärbara datorer & större skärmar, 992px och över) */
  @media (min-width: 992px) and (max-width: 1199px) {
      .welcome h2 {
          font-size: 2em;
      }

      .paragraph-wrapper {
          font-size: .8em;
      }

      .grid-wrapper {
          grid-template-columns: repeat(3, 1fr);
      }

      .social-media {
          grid-template-columns: repeat(4, 1fr);
      }
  }

  /* Extra Large (Stationära skärmar & större enheter, 1200px och över) */
  @media (min-width: 1200px) {
      .welcome h2 {
          font-size: 2.2em;
      }

      .grid-wrapper {
          grid-template-columns: repeat(3, 1fr);
      }

      .social-media {
          grid-template-columns: repeat(4, 1fr);
      }
  }