.skill-badge {
  background: #3b82f6;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.2s;
}
.skill-badge:hover {
  transform: scale(1.05);
}

.project-card {
  background: white;
  color: black;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

@media (prefers-color-scheme: dark) {
  .project-card {
    background: #1f2937;
    color: white;
  }
}

/* Floating Contact Button Icons */
.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(0);
  transition: all 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.25);
}
.contact-icon img {
  width: 24px;
  height: 24px;
}
.show-icon {
  opacity: 1 !important;
  transform: translateY(-10px) !important;
  pointer-events: auto !important;
}

/* Main Contact Button Blur */
#contactToggle {
  backdrop-filter: blur(10px);
  background-color: rgba(59, 130, 246, 0.8);
}

  /* styling bubble + panah kecil */
  .chat-bubble-custom {
    position: fixed; /* PENTING: fixed supaya tidak ikut scroll */
    z-index: 60;
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 14px;
    line-height: 1;
    max-width: 240px;
    transform-origin: top left;
    transition: transform .18s ease, opacity .18s ease;
    opacity: 0;
    color: #0f172a; /* dark text for light bubble */
    background: rgba(255,255,255,0.95);
  }
  .chat-bubble-custom.dark {
    color: #eef2ff;
    background: rgba(17,24,39,0.85);
  }
  /* panah segitiga yang menunjuk ke GIF */
  .chat-bubble-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    background: inherit;
    box-shadow: inherit;
    /* will be positioned by JS to align with GIF */
  }
  /* show state */
  .chat-bubble-show {
    opacity: 1;
    transform: scale(1);
  }
  /* hidden initial scale */
  .chat-bubble-hidden {
    transform: scale(0.85);
    opacity: 0;
  }

  /* kecilkan font di layar kecil bila perlu */
  @media (max-width: 420px) {
    .chat-bubble-custom { font-size: 13px; max-width: 180px; padding: 8px 10px; }
  }

  .spin {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg);}
  to { transform: rotate(360deg);}
}
#preloader {
  transition: opacity 0.5s ease; /* animasi 0.5 detik */
}

/* --- CSS Clouds Animation --- */

/* Container untuk awan, diletakkan di belakang konten */
#clouds-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -5; /* Di atas canvas, di bawah konten */
  pointer-events: none; /* Agar tidak bisa diklik */
}

/* Sembunyikan awan di dark mode */
@media (prefers-color-scheme: dark) {
  #clouds-container {
    display: none;
  }
}

/* Bentuk dasar awan menggunakan pseudo-elements */
.cloud {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.85;
  filter: blur(2px); /* Membuat tepi lebih halus */
  animation: animateCloud 35s linear infinite;
}

.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

/* Variasi bentuk dan posisi untuk setiap awan */
#clouds-container .cloud:nth-child(1) {
  width: 180px;
  height: 180px;
  top: 10%;
  transform: scale(0.8);
  animation-duration: 40s; /* Lebih lambat */
}
#clouds-container .cloud:nth-child(1)::before {
  width: 200px;
  height: 200px;
  top: -100px;
  left: -80px;
}
#clouds-container .cloud:nth-child(1)::after {
  width: 150px;
  height: 150px;
  top: -80px;
  right: -60px;
}

#clouds-container .cloud:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 30%;
  transform: scale(0.6);
  animation-duration: 55s; /* Paling lambat */
  animation-delay: -10s; /* Mulai dari posisi berbeda */
}
#clouds-container .cloud:nth-child(2)::before {
  width: 150px;
  height: 150px;
  top: -80px;
  left: -50px;
}
#clouds-container .cloud:nth-child(2)::after {
  width: 100px;
  height: 100px;
  top: -50px;
  right: -40px;
}

#clouds-container .cloud:nth-child(3) {
  width: 250px;
  height: 250px;
  top: 15%;
  transform: scale(1.1);
  animation-duration: 30s; /* Paling cepat */
  animation-delay: -20s;
}
#clouds-container .cloud:nth-child(3)::before {
  width: 280px;
  height: 280px;
  top: -140px;
  left: -100px;
}
#clouds-container .cloud:nth-child(3)::after {
  width: 200px;
  height: 200px;
  top: -120px;
  right: -80px;
}


/* Keyframes untuk animasi gerak awan dari kiri ke kanan */
@keyframes animateCloud {
  0% {
    transform: translateX(-200%); /* Mulai dari luar layar kiri */
  }
  100% {
    transform: translateX(150vw); /* Berakhir di luar layar kanan */
  }
}