
body {
  margin: 0;
  background-image: url("bilder/sekiro-sdt.jpg");
  background-size: cover;
  background-attachment: fixed;
  height: 350vh;
  background-repeat: no-repeat;
  font-family: "Brush Script MT";
  background-position: center;
  min-height: 100vh;
  width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

.Portfolio {
  color: white;
  font-size: 50px;
  text-align: center;
  margin-top: 50px;
  opacity: 0.5;
}

.button-group {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px 0;
}

.portfolio-btn {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: none;
  border-radius: 32px;
  padding: 25px 80px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  transition: background 0.3s, color 0.3s, transform 0.18s, box-shadow 0.18s;
  outline: none;
  backdrop-filter: blur(3px);
  letter-spacing: 1px;
  font-weight: bold;
  margin: 20px 10px;
 
}

.portfolio-btn:hover, .portfolio-btn:focus {
  background: rgba(255,255,255,0.35);
  color: #222;
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 16px 40px rgba(0,0,0,0.30);
}

.namn,
.about,
.projects,
.contacts {
  color: white;
  font-size: 70px;
  text-align: center;
  opacity: 0.7;
  margin-top: 180px;
  margin-bottom: 180px;
}

.about { margin-top: 200px; }
.projects { margin-top: 200px; }
.contacts { margin-top: 600px; }

.project-item {
  margin: 20px auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.project-box {
  display: flex;
  align-items: center;
  gap: 30px;
  
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  max-width: 700px;
  margin: 40px auto;
  position: relative;
  overflow: hidden;
}

.project-image {
  width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  background: #fff2;
}

.main-button-group {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0 60px 0;
  scroll-behavior: smooth;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

.project-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(30, 30, 30, 0.85);
  border: none;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  padding: 0 0 18px 0;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  position: relative;
  outline: none;
}

.project-btn:hover, .project-btn:focus {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 16px 48px rgba(0,0,0,0.45);
}

.project-btn img {
  width: 100%;
  max-width: 320px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  margin-bottom: 12px;
  background: #fff2;
}

.project-label {
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  font-family: inherit;
  text-align: center;
  margin-top: 8px;
}

#backToTopBtn {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(30,30,30,0.85);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 14px 36px;
  font-size: 1.2rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: background 0.3s, color 0.3s, transform 0.18s;
}

#backToTopBtn:hover, #backToTopBtn:focus {
  background: rgba(255,255,255,0.35);
  color: #222;
  transform: translateX(-50%) scale(1.04);
}




@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .namn, .about, .projects, .contacts {
    font-size: 48px;
  }
}


@media (max-width: 800px) {
  body {
    background-attachment: scroll;
    min-height: 100vh;
    height: auto;
  }
  .button-group {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
  }
  .portfolio-btn {
  width: 80%;
  height: 80px;
  font-size: 1.2rem;
  padding: 0px 0px;

  }
  .namn, .about, .projects, .contacts {
    font-size: 32px;
    margin-top: 100px;
  }
  .about, .projects, .contacts {
    margin-top: 80px;
  }
  .project-box {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    max-width: 98vw;
  }
  .project-image {
    width: 90vw;
    max-width: 300px;
    height: 100px;
  }
  .projects-grid {
    display:grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 5px;
  }
  .project-item {
    max-width: 98vw;
    padding: 10px;
  }

  .main-button-group {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
}