html {
  scroll-behavior: smooth;
  /* scroll-snap-type: y mandatory; */
}
body {
  font-family: 'Poppins', sans-serif;
  background: #f8f9fa;
  color: #333;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  z-index: 1000;
  transition: background-color 0.4s ease;
}
.navbar-scrolled {
  background-color: rgba(50, 50, 50, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.menu-toggle {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 1001; 
}
.menu-toggle .bar {
  width: 28px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: all 0.4s ease;
}
.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}


/* HERO (Foto Kiri, Teks Kanan) */
.hero {
  height: 100vh;
  background: linear-gradient(to right, #434343, #222222);
  color: white;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero canvas#particles {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero .content {
  position: relative;
  z-index: 2;
  max-width: 80%;
  text-align: left;
  margin-left: 60px; 
}
.hero .content span {
  color: #ffc107;
}

/* GAMBAR PROFILE DI HERO */
.hero-image {
  position: relative;
  z-index: 2;
  width: 300px;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  margin-right: 60px; 
  flex-shrink: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.4s ease;
}
.hero-image:hover img {
  filter: grayscale(0);
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding-top: 100px;
  }
  .hero .content {
    margin-left: 0; 
    margin-bottom: 30px;
    text-align: center;
  }
  .hero-image {
    margin-right: 0; 
    width: 200px;
    height: 250px;
    order: -1;
    margin-bottom: 30px;
  }
}

/* Sections */
section[id] {
  scroll-margin-top: 70px;
  scroll-snap-align: start;
}
#profile, #pendidikan, #pengalaman, #keahlian, #projects, #contact {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Perbaikan alignment foto di section Profile */
#profile .row {
    align-items: center;
    min-height: 10px;
}
#profile .col-md-5 {
    display: flex;
    justify-content: center;
    align-items: center;
}


.project-card {
  border: none;
  transition: transform 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(20px);}
  to {opacity: 1; transform: translateY(0);}
}

/* --- Cinematic Reveal Scroll Nav (VERSI FINAL) --- */
.scroll-nav { 
  position: fixed; 
  left: 20px;   /* <-- DIGANTI */
  top: 50%; 
  transform: translateY(-50%); 
  display: flex; 
  flex-direction: column; 
  gap: 15px; 
  z-index: 900; 
  opacity: 0; 
  transform: translateY(-50%) scale(0.8); 
  animation: scrollNavReveal 1.5s ease forwards; 
  animation-delay: 1s; 
}

@keyframes scrollNavReveal { 
  0% { 
    opacity: 0; 
    transform: translateY(-50%) scale(0.8); 
  } 
  100% { 
    opacity: 1; 
    transform: translateY(-50%) scale(1); 
  }
}

.scroll-nav .dot { 
  width: 42px; 
  height: 42px; 
  border-radius: 50%; 
  background: rgba(255,255,255,0.1); 
  color: #aaa; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  font-size: 18px; 
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
  opacity: 0; 
  transform: scale(0.8); 
}

/* Ini animasi untuk 7 ikon, kita tambahin delay-nya */
.scroll-nav .dot:nth-child(1) { animation: iconReveal 0.8s 1.3s forwards ease; }
.scroll-nav .dot:nth-child(2) { animation: iconReveal 0.8s 1.4s forwards ease; }
.scroll-nav .dot:nth-child(3) { animation: iconReveal 0.8s 1.5s forwards ease; }
.scroll-nav .dot:nth-child(4) { animation: iconReveal 0.8s 1.6s forwards ease; }
.scroll-nav .dot:nth-child(5) { animation: iconReveal 0.8s 1.7s forwards ease; }
.scroll-nav .dot:nth-child(6) { animation: iconReveal 0.8s 1.8s forwards ease; }
.scroll-nav .dot:nth-child(7) { animation: iconReveal 0.8s 1.9s forwards ease; }


@keyframes iconReveal { 
  from { opacity: 0; transform: scale(0.6) translateX(-10px); } 
  to { opacity: 1; transform: scale(1) translateX(0); }
}

.scroll-nav .dot.active, .scroll-nav .dot:hover { 
  color: #0d6efd; 
  background: rgba(255,255,252); 
  transform: scale(1.15); 
  box-shadow: 0 0 15px rgba(13,110,253,0.5); 
}


/* CSS Halaman Detail (profile.html, dll) */
.navbar-page { 
  background: white; 
  height: 70px; 
}
.navbar-brand-page { 
  font-size: 1.1rem; 
  color: #333; 
  text-decoration: none; 
  transition: color 0.3s; 
}
.navbar-brand-page:hover { 
  color: #0d6efd; 
}

/* Ini class wrapper untuk halaman terpisah */
.content-page {
  padding-top: 110px;
  padding-bottom: 40px;
  background: #f8f9fa; 
  min-height: 100vh; /* Biar footer nempel di bawah */
}

/* Wrapper untuk halaman Home (yang full-width) */
.hero-multi {
  height: 100vh;
  background: linear-gradient(to right, #434343, #222222);
  color: white;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Menu Slide Overlay */
.menu-overlay-slide { 
  position: fixed; 
  inset: 0; 
  background: rgba(10, 10, 10, 0.9); 
  backdrop-filter: blur(5px); 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  transform: scaleX(0); 
  transform-origin: right center; /* Burger-nya di kanan */
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1); 
  z-index: 800; 
}
.menu-overlay-slide.active { 
  transform: scaleX(1); 
}
.menu-overlay-slide .menu-links-container { 
  display: flex; 
  flex-direction: column; 
  text-align: center; 
}

.menu-overlay-slide .menu-link { 
  font-size: 2rem; 
  color: white; 
  text-decoration: none; 
  margin: 12px 0; 
  transition: color 0.3s; 
}

.menu-overlay-slide .menu { 
  font-size: 5rem; 
  font-family: Cooper;
  color: white; 
  text-decoration: none; 
  margin: 12px 0; 
  transition: color 0.3s; 
}
.menu-overlay-slide .menu-link:hover { 
  color: #0d6efd; 
}

/* SCROLL REVEAL */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}
.reveal-on-scroll.show {
  opacity: 1;
  transform: translateY(0);
}

/* TECH STACK ICONS */
.tech-icons {
  margin-top: 1.5rem;
}
.tech-icons i {
  font-size: 2.2rem;
  color: #6c757d;
  transition: color 0.3s, transform 0.3s;
  cursor: pointer; /* <-- TAMBAHIN INI */
}
.tech-icons i:hover {
  color: #0d6efd;
  transform: scale(1.15);
}

/* FOTO PROFILE (di #profile) */
.profile-pic-small {
  width: 300px;
  height: 400px; 
  object-fit: cover; 
  border-radius: 10px; 
  filter: grayscale(1);
  transition: filter 0.4s ease, transform 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.profile-pic-small:hover {
  filter: grayscale(0);
  transform: scale(1.02);
}


/* CONTACT SECTION */
.contact-section {
  background: #fff;
  padding: 80px 0;
}
.contact-section .display-4 { font-size: 3.5rem; color: #222; }
.contact-email { font-size: 1.2rem; color: #555; text-decoration: none; transition: color 0.3s; }
.contact-email:hover { color: #0d6efd; }
.social-icons .social-icon { display: flex; justify-content: center; align-items: center; width: 50px; height: 50px; border-radius: 12px; background: #e9ecef; color: #495057; font-size: 1.5rem; text-decoration: none; transition: all 0.3s; }
.social-icons .social-icon:hover { background: #0d6efd; color: white; transform: translateY(-3px); box-shadow: 0 4px 10px rgba(13,110,253,0.3); }
.contact-image-wrapper { overflow: hidden; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.contact-image-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 991px) { .contact-section .col-lg-6:last-child { order: -1; margin-bottom: 30px; } }

/* FOOTER */
footer {
  scroll-snap-align: start;
}

/* ANIMASI PAGE LOAD (KANAN-KIRI) */
.anim-slide-in-left,
.anim-slide-in-right,
.anim-fade-in-down {
  opacity: 0;
}
.anim-slide-in-left {
  animation: slideInLeft 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.3s forwards;
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
.anim-slide-in-right {
  animation: slideInRight 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.3s forwards;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
.anim-fade-in-down {
  animation: fadeInDown 0.8s ease-out 0.3s forwards;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Halaman Detail Profile (Kolase Foto) */
.profile-img-collage {
  position: relative;
  width: 100%;
  height: 600px;
  max-width: 500px;
  margin: 0 auto;
}
.profile-img-collage .collage-item {
  position: absolute;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, filter 0.4s ease;
  filter: grayscale(1);
}
.profile-img-collage .collage-item:hover {
  filter: grayscale(0);
  transform: scale(1.05);
  z-index: 10;
}
.profile-img-collage .collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.collage-item:nth-child(1) { width: 280px; height: 380px; top: 100px; left: 50%; transform: translateX(-50%) rotate(-8deg); z-index: 3; }
.collage-item:nth-child(2) { width: 200px; height: 250px; top: 0; left: 0; transform: rotate(5deg); z-index: 2; }
.collage-item:nth-child(3) { width: 220px; height: 280px; top: 0; right: 0; transform: rotate(-10deg); z-index: 4; }
.collage-item:nth-child(4) { width: 250px; height: 300px; bottom: 0; left: 0; transform: rotate(12deg); z-index: 1; }
.collage-item:nth-child(5) { width: 200px; height: 250px; bottom: 50px; right: 20px; transform: rotate(-5deg); z-index: 5; }
@media (max-width: 991px) {
  .profile-img-collage { height: 450px; margin-bottom: 50px; }
  .collage-item:nth-child(1) { width: 200px; height: 280px; top: 80px; left: 50%; transform: translateX(-50%) rotate(-8deg); }
  .collage-item:nth-child(2) { width: 140px; height: 180px; top: 0; left: 0; transform: rotate(5deg); }
  .collage-item:nth-child(3) { width: 160px; height: 200px; top: 0; right: 0; transform: rotate(-10deg); }
  .collage-item:nth-child(4) { width: 180px; height: 220px; bottom: 0; left: 0; transform: rotate(12deg); }
  .collage-item:nth-child(5) { width: 140px; height: 180px; bottom: 30px; right: 20px; transform: rotate(-5deg); }
}

/* PRELOADER */
.preloader {
  position: fixed;
  inset: 0;
  background: #222222;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}
.preloader.hidden {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffc107;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* IKON TEKNOLOGI DI KARTU PROYEK */
.card-tech-icons {
  margin-bottom: 0.75rem;
}
.card-tech-icons i {
  font-size: 1.4rem;
  color: #6c757d;
  margin-right: 8px;
}

/* LINK UNTUK KARTU PROYEK */
a.project-card-image-link,
a.project-card-title-link {
  text-decoration: none;
  color: inherit; 
  transition: color 0.3s;
}

a.project-card-title-link:hover {
  color: #0d6efd; 
}

/* =================================
   LOGO SEKOLAH DI TABEL
   ================================= */
.school-logo {
  width: 40px;
  height: 40px;
  object-fit: contain; /* 'contain' bagus buat logo */
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* =================================
   TOMBOL KEMBALI (AESTHETIC)
   ================================= */
.btn-back-aesthetic {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555; /* Warna teks abu-abu */
  background-color: rgba(0, 0, 0, 0.04); /* Background abu-abu transparan */
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px; /* Bikin jadi kapsul */
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-back-aesthetic .bi {
  margin-right: 0.5rem; /* Jarak ikon ke teks */
}

.btn-back-aesthetic:hover {
  background-color: #fff;
  color: #0d6efd; /* Warna teks jadi biru */
  border-color: #0d6efd; /* Border jadi biru */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2); /* Shadow biru */
}

.project-card:hover {
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.hover-text-primary:hover {
  color: #0d6efd !important;
}

/* =================================
   GALERI FOTO PENGALAMAN
   ================================= */
.experience-photo {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 0.5rem; /* 8px */
  border: 1px solid #eee;
  transition: all 0.3s ease;
}
.experience-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}