* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: none;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow:hidden;
}

#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #01041F 0%, #082B33 100%);
    z-index: -1;
  }
  
  .star {
    position: absolute;
    background-color: #fff;
    width: 1px;
    height: 1px;
    border-radius: 50%;
  }
  
  .star:before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation: starTwinkle 2s infinite;
  }
  
  .shooting-star {
    position: absolute;
    width: 2px;
    height: 10px;
    background-color: #fff;
    opacity: 1;
    z-index: 1;
    transform: rotate(45deg);
    animation: shootingStarAnimation 0.5s linear forwards;
  }
  
  @keyframes starTwinkle {
    0% {
      transform: scale(0.3);
      opacity: 0;
    }
    50% {
      transform: scale(0.5);
      opacity: 1;
    }
    100% {
      transform: scale(0.5);
      opacity: 0;
    }
  }
  
  @keyframes shootingStarAnimation {
    0% {
      opacity: 1;
      transform: translateX(-200px) translateY(-200px) rotate(70deg);
    }
    100% {
      opacity: 0;
      transform: translateX(200px) translateY(-300px) rotate(70deg);
    }
  }

  body {
    overflow:hidden;
  }

  /* Randomized twinkle delays */
.star:nth-child(1):before {
    animation-delay: 0.8s;
  }
  
  .star:nth-child(2):before {
    animation-delay: 1.2s;
  }
  
  .star:nth-child(3):before {
    animation-delay: 0.9s;
  }
  
  .star:nth-child(4):before {
    animation-delay: 1.4s;
  }
  
  .star:nth-child(5):before {
    animation-delay: 1.1s;
  }
  
  .star:nth-child(6):before {
    animation-delay: 0.7s;
  }
  
  /* Add more star:nth-child(n):before rules for additional stars */
  .star:nth-child(7):before {
    animation-delay: 1.3s;
  }
  
  .star:nth-child(8):before {
    animation-delay: 0.6s;
  }
  
  .star:nth-child(9):before {
    animation-delay: 1.5s;
  }
  
  .star:nth-child(10):before {
    animation-delay: 0.5s;
  }
  
  /* Continue adding star:nth-child(n):before rules for more delays */
  .star:nth-child(15):before {
    animation-delay: 0.8s;
  }
  
  .star:nth-child(16):before {
    animation-delay: 1.2s;
  }
  
  .star:nth-child(17):before {
    animation-delay: 0.9s;
  }
  
  .star:nth-child(18):before {
    animation-delay: 1.4s;
  }
  
  .star:nth-child(19):before {
    animation-delay: 1.1s;
  }
  
  .star:nth-child(20):before {
    animation-delay: 0.7s;
  }
  
  /* Add more star:nth-child(n):before rules for additional stars */
  .star:nth-child(11):before {
    animation-delay: 1.3s;
  }
  
  .star:nth-child(12):before {
    animation-delay: 0.6s;
  }
  
  .star:nth-child(13):before {
    animation-delay: 1.5s;
  }
  
  .star:nth-child(14):before {
    animation-delay: 0.5s;
  }

.shooting-star {
    position: absolute;
    width: 2px;
    height: 10px;
    background-color: #fff;
    opacity: 1;
    z-index: 1;
    transform: rotate(45deg);
    animation: shootingStarAnimation 0.5s linear forwards;
}

@keyframes shootingStarAnimation {
    0% {
        opacity: 1;
        transform: translateX(-200px) translateY(-200px) rotate(70deg);
    }
    100% {
        opacity: 0;
        transform: translateX(200px) translateY(-300px) rotate(70deg);
    }
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative; /* Varmista, että tämä elementti on suhteellinen */
    z-index: 1; /* Tämä on etualalla */
}

/* Taustakuva */
.header-banner {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Profiilikortti */
.profile {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 20px;
    margin-bottom: 50px;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-right: 20px;
    object-fit: cover;
}

.bio {
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

/* Projektit */
.projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.project-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.project {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
    text-align: center;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
}

.project-tietokettu, .project-motimaa {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
}

.project-details {
    display: flex;
    flex-direction: column;
}

/* Footer */
footer {
    background-color: #2d2d2d;
    color: #999;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    padding: 0 20px;
}

.footer-section h4 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 15px;
}

.footer-section p,
.footer-section a {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #999;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: #fff;
}

/* Somelinkkien keskittäminen */
.footer-socials {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.footer-socials a {
    font-size: 1.5em;
    color: #999;
    margin-left: 15px;
    text-decoration: none;
}

.footer-socials a:hover {
    color: #fff;
}

/* Mobiiliystävällisyys */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 20px;
    }

    .footer-socials {
        margin-top: 10px;
        justify-content: center;
    }

    .profile {
        flex-direction: column;
        text-align: center;
    }

    .bio {
        margin-top: 15px;
    }

    .project-list {
        flex-direction: column;
        align-items: center;
    }

    .project {
        width: 90%;
    }
}
