/* ============================================
   BASE
   ============================================ */
html {
  scroll-behavior: smooth;
}

::selection {
  background-color: #E88CA8;
  color: white;
}

/* Visible keyboard focus (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #E88CA8;
  outline-offset: 2px;
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  background-color: transparent;
}

#navbar.scrolled {
  background-color: rgba(255, 245, 248, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(61, 43, 60, 0.06);
}

.nav-link {
  position: relative;
  color: #6B5B66;
  padding-bottom: 4px;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #E88CA8;
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #3D2B3C;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link-mobile {
  color: #3D2B3C;
  font-weight: 500;
  padding: 0.5rem 0;
}

/* ============================================
   HERO
   ============================================ */
.section {
  position: relative;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.blob-1 {
  width: 320px;
  height: 320px;
  background: #FFB6C1;
  top: -80px;
  right: -60px;
  animation: float-blob 10s ease-in-out infinite;
}

.blob-2 {
  width: 240px;
  height: 240px;
  background: #E88CA8;
  bottom: -60px;
  left: -60px;
  animation: float-blob 12s ease-in-out infinite reverse;
}

@keyframes float-blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}

.avatar-ring {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, #FFB6C1, #E88CA8);
}

.avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #E88CA8, #3D2B3C);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #FFF5F8;
}

.floating-badge {
  position: absolute;
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(61, 43, 60, 0.1);
  animation: float-badge 4s ease-in-out infinite;
}

.floating-badge-1 {
  top: 10%;
  left: -5%;
  animation-delay: 0s;
}

.floating-badge-2 {
  bottom: 12%;
  right: -5%;
  animation-delay: 1.5s;
}

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* OPSI 1 — Speech bubble */
.speech-bubble {
  position: absolute;
  top: -3.2rem;
  right: -0.5rem;
  z-index: 2;
  background: white;
  color: #3D2B3C;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 0.75rem 1.1rem;
  max-width: 170px;
  text-align: center;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 6px 16px rgba(61, 43, 60, 0.12);
  animation: float-badge 4s ease-in-out infinite;
}

/* OPSI 2 — Floating badge tambahan */
.floating-badge-3 {
  top: 48%;
  left: -14%;
  animation-delay: 0.8s;
}

/* OPSI 3 — Deco bubbles */
.deco-bubble {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(232, 140, 168, 0.35);
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  z-index: 0;
  animation: float-badge 6s ease-in-out infinite;
}

.deco-bubble-1 { width: 18px; height: 18px; top: 18%; left: 7%;  animation-delay: 0.2s; }
.deco-bubble-2 { width: 12px; height: 12px; top: 68%; left: 4%;  animation-delay: 1.4s; }
.deco-bubble-3 { width: 26px; height: 26px; top: 78%; left: 42%; animation-delay: 2s;   }
.deco-bubble-4 { width: 14px; height: 14px; top: 8%;  left: 52%; animation-delay: 1.6s; }
.deco-bubble-5 { width: 22px; height: 22px; top: 42%; left: 94%; animation-delay: 0.6s; }

/* Sembunyiin ketiganya di mobile biar gak numpuk/berantakan */
@media (max-width: 768px) {
  .speech-bubble,
  .floating-badge-3,
  .deco-bubble {
    display: none;
  }
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: white;
  color: #3D2B3C;
  box-shadow: 0 2px 8px rgba(61, 43, 60, 0.08);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.social-icon:hover {
  background-color: #E88CA8;
  color: white;
  transform: translateY(-3px);
}

/* Hero entrance sequence — one deliberate staggered reveal on load */
.hero-item {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-in 0.7s ease forwards;
}

.hero-item:nth-child(1) { animation-delay: 0.05s; }
.hero-item:nth-child(2) { animation-delay: 0.15s; }
.hero-item:nth-child(3) { animation-delay: 0.25s; }
.hero-item:nth-child(4) { animation-delay: 0.35s; }
.hero-item:nth-child(5) { animation-delay: 0.45s; }
.hero-item:nth-child(6) { animation-delay: 0.55s; }

@keyframes hero-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SCROLL REVEAL (sections below the fold)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   CARDS
   ============================================ */
.fact-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(61, 43, 60, 0.06);
  transition: transform 0.25s ease;
}

.fact-card:hover {
  transform: translateY(-4px);
}

.project-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(61, 43, 60, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(61, 43, 60, 0.12);
}

.project-visual {
  position: relative;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 1;
}

.project-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-individual {
  background: white;
  color: #E88CA8;
}

.badge-progress {
  background: #E88CA8;
  color: white;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  background: #FFDDE6;
  color: #E88CA8;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.cert-stack {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 10 / 7;
  margin: 0 auto;
}

.cert-card {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 8px 22px rgba(61, 43, 60, 0.14);
  will-change: transform;
}

.cert-card.cert-top {
  cursor: pointer;
}

.cert-card:not(.cert-top) {
  pointer-events: none;
}

.cert-face {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  backface-visibility: hidden;
  overflow: hidden;
}

.cert-face-front {
  background: white;
}

.cert-face-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cert-face-front .cert-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.75rem 1rem 0.9rem;
  background: linear-gradient(to top, rgba(61, 43, 60, 0.88) 0%, rgba(61, 43, 60, 0.5) 55%, transparent 100%);
}

.cert-face-front .cert-caption p:first-child {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.cert-face-front .cert-caption p:last-child {
  color: #FFDDE6;
  font-size: 0.75rem;
}

.cert-face-back {
  background: #FFF5F8;
  border: 1px solid #FFDDE6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  transform: rotateY(180deg);
}

.cert-face-back p:first-child {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.cert-face-back p:last-child {
  font-size: 0.82rem;
  color: #6B5B66;
  line-height: 1.65;
}

@media (prefers-reduced-motion: reduce) {
  .cert-card {
    transition: none;
  }
}

.skill-card {
  background: #FFF5F8;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #FFDDE6;
}

.skill-badge {
  font-size: 0.8rem;
  font-weight: 500;
  background: white;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 1px 6px rgba(61, 43, 60, 0.07);
}

/* ============================================
   PROJECT FILTER BUTTONS
   ============================================ */
.filter-btn {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1px solid #FFDDE6;
  color: #6B5B66;
  background: white;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.filter-btn:hover {
  background-color: #FFDDE6;
}

.filter-btn.active {
  background-color: #E88CA8;
  color: white;
  border-color: #E88CA8;
}

.project-card.hidden-card {
  display: none;
}

/* ============================================
   ACCESSIBILITY — respect reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-item,
  .reveal,
  .blob,
  .floating-badge {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
