@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap");
::-webkit-scrollbar {
  width: 15px;
}
::-webkit-scrollbar-thumb {
  background: #d1c4e9;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: #2d3436;
  opacity: 0.8;
  background-position: center;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(
    180deg,
    rgba(240, 244, 248, 1) 62%,
    rgba(229, 228, 243, 1) 83%,
    rgba(209, 196, 233, 1) 100%
  );
}
#background-squares {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -5;
}
section {
  padding: 50px 0;
  margin: 0 5vw;
  scroll-margin-top: calc(var(--vh) * 4); /* korjattu */
}
p {
  font-size: 1.15rem;
}
h2 {
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 10vh;
}
h3 {
  font-weight: 700;
  font-size: 2rem;
  margin: 1vh;
}
i {
  font-size: 1rem;
}
#navigation i {
  font-size: 1.2rem;
  margin-top: 5px;
}
a {
  text-decoration: none;
  color: #6c5ce7;
  font-size: 1.1rem;
  transition: 0.3s;
}

.link-active {
  transition: 0.3s;
  text-decoration: underline;
  color: #6c5ce7 !important;
}
button {
  cursor: pointer;
  padding: 15px;
  border-radius: 10px;
  color: #f0f4f8;
  border-style: none;
  gap: 5px;
  transition: 0.3s;
  background-color: #a29bfe;
}
button a {
  color: white;
  padding-top: 15px;
  padding-bottom: 15px;
}
header {
  position: sticky;
  top: 20px;
  background-color: #d1c4e9;
  padding: 20px;
  z-index: 100;
  border: 1px solid #b2bec3;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin: 0 5vw;
  transition: 0.3s;
}
#navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-left a {
  color: #2d3436;
}

#hamburger-menu {
  display: none;
}
#hamburger i {
  font-size: 1.5rem;
}
#hamburger {
  padding: 20px;
  width: 65px;
  border: 1px solid #a29bfe;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.theme-switcher,
.language-switcher {
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 5px;
  color: #f0f4f8;
  border-style: none;
  gap: 5px;
  text-transform: uppercase;
  font-weight: 600;
  background-color: #a29bfe;
  height: 30px !important;
}
#home {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}
#home h1 {
  font-size: 60px;
  font-weight: 600;
  margin-bottom: 10px;
}
#home p {
  font-size: 30px;
  margin-bottom: 20px;
}
.centered-text {
  text-align: center;
  transition: 0.1s;
}
.hero-scroll-down {
  cursor: pointer;
  padding: 10px 20px;
  transition: 0.3s;
}
#down-arrow {
  position: relative;
  margin-top: 15px;
  animation: arrow 2s infinite;
}
#arrow-right {
  position: relative;
  animation: arrow-right 2s infinite;
  margin-left: 0.5vw;
}
#about {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-top: 50px;
}
.mySlides1,
.mySlides2 {
  display: none;
}
.prev,
.next {
  cursor: pointer;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  user-select: none;
  z-index: 123423;
  position: absolute;
  top: 30%;
}
.prev {
  left: 10vw;
}
.next {
  right: 10vw;
}
.project-card {
  position: relative;
  flex-direction: column;
  align-items: center;
}
.project-container {
  display: flex;
  justify-content: center;
  text-align: center;
  background: #e7e3ef;
  align-items: center;
  flex-direction: row;
  margin-bottom: 5vw;
  padding: 40px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #b2bec3;
  border-radius: 10px;
}
.project-container img {
  max-height: 40vh;
  max-width: 80vw;
  cursor: zoom-in;
  border-radius: 10px;
  object-fit: cover;
}
.project-description {
  margin-block-start: 2vh;
  margin-block-end: 4vh;
  margin-inline: 5vw;
}
p.date {
  color: #6c5ce7;
  font-weight: bold;
  font-size: 1.35rem;
}

#skills {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  scroll-margin-top: calc(var(--vh) * 14);
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 40px;
  background: #e7e3ef;
  border: 1px solid #b2bec3;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.skills-container h3 {
  width: 100%;
  text-align: center;
}

.skills-container a {
  width: 20vh;
  text-decoration: none;
}

.skill-card {
  position: relative;
  align-content: center;
  padding: 2vw 2vw 1.5vw;
  background: #d1c4e9;
  border: 1px solid #b2bec3;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.skill-card i {
  font-size: 3.3rem;
  margin-bottom: 20px;
  transition: 0.3s;
}

.skill-card p {
  font-size: 1.2rem;
  transition: 0.3s;
}
.progress-container {
  position: absolute;
  width: 80%;
  left: 10%;
  top: 50%;
  transform: translateY(-50%);
  background-color: #e7e3ef;
  border-radius: 6px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.progress-bar {
  height: 1vw;
  background-color: #a29bfe;
}

.procent {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: #2d3436;
  opacity: 0;
  transition: 0.3s;
  visibility: hidden;
}
.rounded {
  border-radius: 50%;
  width: 35ex;
  user-select: none;
  pointer-events: none;
}
.experience-container {
  display: flex;
  text-align: center;
  align-items: center;
  flex-direction: column;
}
.experience-card {
  background: #e7e3ef;
  width: 55%;
  margin-bottom: 5vw;
  padding: 40px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #b2bec3;
  border-radius: 10px;
  word-wrap: break-word;
  overflow: hidden;
}
.experience-card i {
  font-size: 3rem;
  padding: 20px;
  color: #6c5ce7;
}
.experience-card button i {
  font-size: 1rem;
  padding: 0;
  color: #fff;
}
.experience-description {
  margin-block-start: 1vh;
  margin-block-end: 2vh;
  margin-inline: 2vw;
}
p.experience-position,
p.experience-date {
  font-weight: bold;
  font-size: 1.3rem;
  color: #6c5ce7;
}
.left {
  align-self: flex-start;
}
.right {
  align-self: flex-end;
}
.year-container {
  text-align: center;
  color: #636e72;
  font-weight: bold;
  border-radius: 8px;
}
.year-container p {
  color: #6c5ce7 !important;
  font-size: 2rem;
}

.timeline {
  height: 75%;
  background-color: #d1c4e9;
  z-index: -11;
  position: absolute;
  border-radius: 10px;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 15%,
    black 85%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 15%,
    black 85%,
    transparent 100%
  );
}
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 101;
  opacity: 0;
  cursor: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
#contact-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  max-width: 500px;
  margin: 0 auto;
}
.form-group {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
}
.form-box {
  display: flex;
  flex-direction: column;
  width: 100%;
}
input,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  padding: 11px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 2px solid rgba(209, 196, 233, 1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
  font-size: 0.9rem;
}
input:valid,
textarea:valid {
  border: 2px solid #a29bfe;
  transition: 0.3s;
}

label {
  font-weight: bold;
  margin-bottom: 7px;
  font-size: 1.1rem;
}
#submit-button {
  padding: 10px 20px;
  font-size: 1.1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
footer {
  flex-direction: column;
  flex-wrap: wrap;
  margin: 0 0vw;
  width: 100%;
  background-color: #3d4057;
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 1rem;
  border-top: 1px solid #b2bec3;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
footer a {
  color: white;
  margin: 0.3vw;
  font-size: 1.07rem;
}
footer i {
  font-size: 1.5rem;
  margin: 0.3vw;
}
.footer-links {
  margin-block-end: 1.5vw;
  margin-block-start: 1vw;
}
@media only screen and (max-width: 725px) {
  .rounded {
    width: 20ex;
  }
  .modal-content {
    min-height: 10% !important;
  }

  .project-container {
    flex-direction: column;
  }
  .square {
    width: 50px;
    height: 50px;
    opacity: 50%;
    position: relative;
    transition: 0.3s;
    display: none !important;
  }
  .project-container button {
    margin-top: 15px;
  }
  .project-container {
    margin-top: 40px;
  }
  #skills {
    flex-direction: column;
    gap: 40px;
  }
  #hamburger-menu {
    display: block;
    position: fixed;
    top: 20px;
    right: 4vw;
  }
  #navigation {
    display: none;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    top: 90px;
    right: 4vw;
    background-color: #d1c4e9;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
  }
  #header {
    width: fit-content;
    padding: 0;
    transition: 0.3s;
  }
  .nav-left {
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }
  .form-group {
    flex-direction: column;
  }
  .experience-container {
    align-items: center;
    gap: 40px;
  }
  .experience-card {
    width: 80%;
  }
  .project-container .prev,
  .project-container .next {
    position: relative;
  }
  .prev {
    left: -20px;
  }
  .next {
    right: -20px;
  }
  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-block-start: 1vw;
    padding-block-end: 1vw;
  }
  .footer-links a {
    font-size: 1rem;
  }
}
.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.right-side {
  transform: translateX(-50px);
}

.fade-in.bottom-side {
  transform: translateY(50px);
}
.fade-in.visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}
@keyframes arrow {
  0% {
    top: 10px;
  }
  50% {
    top: 0px;
  }
  100% {
    top: 10px;
  }
}
@keyframes arrow-right {
  0% {
    right: 2px;
  }
  50% {
    right: 0px;
  }
  100% {
    right: 2px;
  }
}
@keyframes arrow-up {
  0% {
    bottom: 20px;
  }
  50% {
    bottom: 30px;
  }
  100% {
    bottom: 20px;
  }
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  align-content: center;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  user-select: none;
  text-align: center;
}
.modal a {
  top: 45%;
}
.modal .prev {
  left: 60px;
}
.modal .next {
  right: 60px;
}

#close-modal {
  position: absolute;
  top: 15px;
  right: 30px;
  font-size: 40px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}
.modal-content {
  margin: auto;
  display: block;
  max-width: 85%;
  max-height: 90%;
  border-radius: 10px;
  cursor: zoom-out;
}
.modal-content {
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.6s;
  animation-name: zoom;
  animation-duration: 0.6s;
}
@-webkit-keyframes zoom {
  from {
    -webkit-transform: scale(0);
  }
  to {
    -webkit-transform: scale(1);
  }
}
@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.square {
  position: absolute;
  background-color: #a29bfe;
  border-radius: 10px;
  animation: float 3s infinite alternate ease-in-out;
}
@keyframes float {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(20px);
  }
}
@media (hover: hover) {
  a:hover {
    transition: 0.3s;
    color: #f0f4f8;
  }
  button:hover a {
    color: #a29bfe;
  }
  button:hover {
    transition: 0.3s;
    background-color: #f0f4f8;
    color: #a29bfe;
  }
  .centered-text:hover {
    color: #a29bfe;
    text-decoration: underline;
  }
  .hero-scroll-down a:hover {
    text-decoration: none;
    color: #a29bfe;
  }
  .experience-card button:hover i {
    color: #a29bfe;
  }
  .skill-card:hover i,
  .skill-card:hover p:first-of-type {
    opacity: 0;
    visibility: hidden;
    transition: 0.4s !important;
  }

  .skill-card:hover .progress-container,
  .skill-card:hover .procent {
    opacity: 1;
    visibility: visible;
    transition: 0.4s !important;
  }
  .skill-card:hover {
    transition: 0.3s;
  }
  .skill-card:hover .progress-bar {
    transition: 0.3s;
  }
  #hamburger:hover {
    background: #e7e3ef;
    border: 1px solid #b2bec3;
  }
  input:hover,
  textarea:hover {
    transition: 0.3s;
    border: 2px solid #858792;
  }
  footer a:hover {
    color: #a29bfe;
  }
  #back-to-top:hover {
    animation: arrow-up 2s infinite;
    transition: 0.3s;
    background-color: #6c5ce7;
  }
}

.noise-wrapper {
  position: absolute;
  background-size: cover;
  background-repeat: repeat;
}
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}
