@font-face {
  font-family: "Agustina Regular";
  src: url("../fonts/Agustina-Signature.otf");
}


html {
  scroll-behavior: smooth;
  /* font-size: 16px; */
}

@keyframes animate {
  0%{
      transform: translateY(0) rotate(0deg);
      opacity: 1;
      border-radius: 0;
  }
  100%{
      transform: translateY(-1000px) rotate(720deg);
      opacity: 0;
      border-radius: 50%;
  }
}

.background {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  z-index: -1;
  background-color: #040e1e;
  background-color: #03142f;
}

.background li {
  position: absolute;
  display: block;
  list-style: none;
  width: 20px;
  height: 20px;
  animation: animate 13s linear infinite;
}

.background li:nth-child(0) {
  left: 57%;
  width: 136px;
  height: 136px;
  bottom: -136px;
  animation-delay: 1s;
}

.background li:nth-child(1) {
  left: 3%;
  width: 246px;
  height: 246px;
  bottom: -246px;
  animation-delay: 2s;
}

.background li:nth-child(2) {
  left: 16%;
  width: 136px;
  height: 136px;
  bottom: -136px;
  animation-delay: 5s;
}

.background li:nth-child(3) {
  left: 54%;
  width: 251px;
  height: 251px;
  bottom: -251px;
  animation-delay: 7s;
}

.background li:nth-child(4) {
  left: 33%;
  width: 184px;
  height: 184px;
  bottom: -184px;
  animation-delay: 15s;
}

.background li:nth-child(5) {
  left: 40%;
  width: 192px;
  height: 192px;
  bottom: -192px;
  animation-delay: 4s;
}

.background li:nth-child(6) {
  left: 55%;
  width: 221px;
  height: 221px;
  bottom: -221px;
  animation-delay: 3s;
}

.background li:nth-child(7) {
  left: 48%;
  width: 227px;
  height: 227px;
  bottom: -227px;
  animation-delay: 7s;
}

/* .item-link:hover {
  color: rgb(147 51 234);
} */

.btn {
  padding: 10px 20px;
  margin: 10px;
  border: none;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 5px;
}

/* 1. Pulse Animation */
.btn-pulse {
  background-color: rgb(147 51 234);
  color: rgb(209 213 219);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* 2. Wobble Animation */
.btn-wobble {
  color: rgb(147 51 234);
  border: 2px solid rgb(147 51 234);
}

.btn-wobble:hover {
  animation: wobble 0.8s;
}

@keyframes wobble {
  0%,
  100% {
    transform: translateX(0%);
  }
  15% {
    transform: translateX(-25%) rotate(-5deg);
  }
  30% {
    transform: translateX(20%) rotate(3deg);
  }
  45% {
    transform: translateX(-15%) rotate(-3deg);
  }
  60% {
    transform: translateX(10%) rotate(2deg);
  }
  75% {
    transform: translateX(-5%) rotate(-1deg);
  }
}


/* =========== css tiktok, gmail,.. ==========*/

.wrapper a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 18px;
  font-family: sans-serif;
  text-decoration: none;
  color: rgb(147 51 234);
  border: 2px solid rgb(147 51 234);
  letter-spacing: 2px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: color 0.35s ease;
}

.wrapper a span {
  position: relative;
  z-index: 2; /* Giữ chữ không bị che */
}

.wrapper a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgb(147 51 234);
  border-radius: 50%;
  transition: width 0.35s ease, height 0.35s ease;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.wrapper a:hover {
  color: white; /* Đổi màu chữ khi hover */
}

.wrapper a:hover::after {
  width: 150%;
  height: 150%;
}


@keyframes spin-slow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes spin-reverse {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

.spin-slow {
  animation: spin-slow 6s linear infinite;
}

.spin-reverse {
  animation: spin-reverse 8s linear infinite;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.animate-slide-in-left {
  animation: slideInLeft 1s ease-out forwards;
}


/* =========== My_Peojects ============ */
/* Ẩn ban đầu các project-item để thêm animation */
.project-item {
  display: none;
}
/* Hiệu ứng fade-in cho project-item */
.project-item.show {
  display: flex;
  animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}
/* Hiệu ứng fade-out khi thu nhỏ */
.project-item.hide {
  animation: fadeOut 0.5s ease-in-out;
}
@keyframes fadeOut {
  from {
      opacity: 1;
      transform: translateY(0);
  }
  to {
      opacity: 0;
      transform: translateY(20px);
  }
}




/* Ẩn ban đầu các project-item để thêm animation */
.project-item {
  display: none;
}
/* Hiệu ứng fade-in cho project-item */
.project-item.show {
  display: flex;
  animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}
/* Hiệu ứng fade-out khi thu nhỏ */
.project-item.hide {
  display: flex;
  animation: fadeOut 0.5s ease-in-out forwards;
}
@keyframes fadeOut {
  from {
      opacity: 1;
      transform: translateY(0);
  }
  to {
      opacity: 0;
      transform: translateY(20px);
  }
}
/* Hiệu ứng hover cho project-card */
.project-card {
  transition: all 0.3s ease-in-out;
  background-image: linear-gradient(#bc92e3,#af6dec);
  background-size: 0 100%;
  background-repeat: no-repeat;
}
.project-card:hover {
  transform: translateY(-5px); /* Nâng thẻ lên 5px khi hover */
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3); /* Thêm bóng đổ */
  background-size: 100% 100%;
}
.project-card:hover .date,
.project-card:hover h3,
.project-card:hover p,
.project-card:hover a {
  color: #fff; 
}