/* ===== CSS V2: KELAS CODING IXB ===== */

/* 1. Root & Variables */
:root {
  --glass-bg: rgba(30, 30, 40, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --neon-cyan: #06b6d4;
  --neon-blue: #3b82f6;
  --neon-violet: #8b5cf6;
  --dark-bg: #050505;
}

/* 2. Base Styles */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  background-image: linear-gradient(rgba(10, 10, 20, 0.85), rgba(10, 10, 20, 0.9)), url('/img/background.jpg');
  background-size: cover; background-position: center; background-attachment: fixed; background-repeat: no-repeat;
  background-color: var(--dark-bg); color: #ffffff; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}

/* 3. Typography & Effects */
.gradient-text { background: linear-gradient(135deg, #22d3ee 0%, #a855f7 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-glow { text-shadow: 0 0 20px rgba(6, 182, 212, 0.3); }

/* 4. Glassmorphism V2 */
.glass {
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (hover: none) { .glass:hover, .student-card:hover { transform: none !important; border-color: var(--glass-border) !important; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important; } }
@media (hover: hover) { .glass:hover { border-color: var(--glass-highlight); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); transform: translateY(-5px); } .student-card:hover { transform: translateY(-8px); } }

.glass-teacher {
  background: rgba(30, 30, 40, 0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  transition: all 0.4s ease;
}
.glass-teacher:hover { border-color: rgba(6, 182, 212, 0.4); box-shadow: 0 15px 50px rgba(6, 182, 212, 0.15); transform: translateY(-5px); }

/* 5. Animations */
.anim-fade-up { opacity: 0; transform: translateY(40px); will-change: opacity, transform; transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.anim-fade-up.visible { opacity: 1; transform: translateY(0); transition: opacity 0.4s ease-in, transform 0.4s ease-in; }
.anim-delay-100 { transition-delay: 100ms; } .anim-delay-200 { transition-delay: 200ms; } .anim-delay-300 { transition-delay: 300ms; }

/* 6. Buttons */
.btn-glow { background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%); box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4); transition: all 0.3s ease; touch-action: manipulation; }
.btn-glow:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6); }
.btn-glow:active { transform: scale(0.97); }

/* 7. Navbar */
#particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.glass-nav { background: rgba(5, 5, 15, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, 0.05); transition: all 0.3s ease; }
.glass-nav.scrolled { background: rgba(5, 5, 15, 0.95); border-bottom: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 4px 20px rgba(0,0,0,0.4); }

/* 8. Mobile Menu */
.mobile-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 55; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.mobile-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu { transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.mobile-menu.active { transform: translateX(0); }
.close-menu-btn { position: absolute; top: 16px; right: 16px; z-index: 100; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1); color: #9ca3af; cursor: pointer; pointer-events: auto !important; touch-action: manipulation; transition: all 0.2s ease; -webkit-tap-highlight-color: transparent; }
.close-menu-btn:active { background: rgba(255, 255, 255, 0.2); color: #ffffff; transform: scale(0.9); }

/* 9. UI Elements */
.tech-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 11px; font-weight: 600; border-radius: 9999px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: #9ca3af; transition: all 0.3s; touch-action: manipulation; }
.tech-badge:hover { background: rgba(6, 182, 212, 0.1); border-color: rgba(6, 182, 212, 0.3); color: #22d3ee; }
.touch-target { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation; }

/* 10. Modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 100; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; padding: 20px; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { transform: scale(0.9) translateY(20px); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); max-width: 400px; width: 100%; }
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }

/* 11. Responsive & Scrollbar */
@media (max-width: 640px) { .hero-code-block { font-size: 10px !important; line-height: 1.6 !important; padding: 16px !important; } .hero-code-block .pl-4 { padding-left: 12px !important; } .hero-code-block .pl-8 { padding-left: 24px !important; } }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: #0a0a1a; } ::-webkit-scrollbar-thumb { background: #1e1e4a; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #06b6d4; }
/* =========================================
   GALLERY SECTION
========================================= */

.gallery-container {
  max-width: 1100px; 
  margin: 0 auto;   
  position: relative;
  overflow: hidden;
}

.gallery-track{
  display: flex;
  align-items: center;
  gap: 8px; /* Diperkecil dari 14px agar tidak terlalu renggang */
  width: max-content;

  animation: galleryScroll 35s linear infinite;

  padding: 6px 0;
}

.gallery-track:hover{
  animation-play-state: paused;
}

/* =========================================
   AUTO SCROLL
========================================= */

@keyframes galleryScroll{
  from{
    transform: translateX(0);
  }
  to{
    transform: translateX(-33.33%); 
  }
}

/* =========================================
   GALLERY ITEM (UKURAN DIPERKECIL)
========================================= */

.gallery-item{
  position: relative;
  overflow: hidden;

  border-radius: 22px;

  flex-shrink: 0;
  cursor: pointer;

  background: #111;

  /* PERUBAHAN UTAMA: 26vw akan memunculkan pas 3 foto di laptop */
  width: 26vw; 
  max-width: 360px; /* Batas maksimal agar tidak kebanyakan muat di monitor PC besar */
  
  aspect-ratio: 16 / 9; 

  transition: all .4s ease;
}

/* IMAGE */

.gallery-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;

  transition:
    transform .7s ease,
    filter .5s ease;
}

/* HOVER */

.gallery-item:hover{
  transform: translateY(-5px);
}

.gallery-item:hover img{
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* =========================================
   OVERLAY
========================================= */

.gallery-overlay{
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,.28);

  opacity: 0;

  transition: all .3s ease;

  backdrop-filter: blur(2px);
}

.gallery-item:hover .gallery-overlay{
  opacity: 1;
}

/* =========================================
   ZOOM BUTTON
========================================= */

.zoom-btn{
  width: 52px;
  height: 52px;

  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,255,255,.14);

  border: 1px solid rgba(255,255,255,.22);

  backdrop-filter: blur(10px);

  transform: scale(.8);

  transition: all .3s ease;
}

.gallery-item:hover .zoom-btn{
  transform: scale(1);
  background: rgba(255,255,255,.2);
}

/* =========================================
   EDGE FADE EFFECT
========================================= */

.gallery-fade-left,
.gallery-fade-right{
  position: absolute;
  top: 0;
  bottom: 0;

  width: 50px; 

  z-index: 20;
  pointer-events: none;
}

.gallery-fade-left{
  left: 0;
  background: linear-gradient(to right, #050505, transparent);
}

.gallery-fade-right{
  right: 0;
  background: linear-gradient(to left, #050505, transparent);
}

/* =========================================
   MOBILE
========================================= */

@media (max-width:768px){

  .gallery-container {
    max-width: 100%; 
  }

  .gallery-track{
    gap: 8px;
    animation-duration: 28s;
  }

  .gallery-item{
    border-radius: 16px;
    width: 60vw; /* Di HP fokus 1 foto utama + sedikit foto ke-2 */
    max-width: none;
  }

  .zoom-btn{
    width: 44px;
    height: 44px;
  }

  .gallery-fade-left,
  .gallery-fade-right{
    width: 30px;
  }

}
/* =========================================
   VIDEO PROJECT STYLING (PROJECT 4-6)
========================================= */

/* Container video di dalam card project */
.project-video-wrapper {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 1;
}

.project-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Video akan memenuhi area aspect-video tanpa distorsi */
  pointer-events: none; /* Mencegah video diputar langsung di card (karena ada link overlay) */
}

/* Hapus elemen kontrol bawaan browser pada video di card */
.project-video-wrapper video::-webkit-media-controls {
  display: none !important;
}

/* Jika kursor hover di atas card, video sedikit redup agar tulisan "View Project" terbaca jelas */
.group:hover .project-video-wrapper video {
  filter: brightness(0.6);
  transition: filter 0.3s ease;
}

/* Ikon Play Kecil di Thumbnail Video (Opsional - agar user tahu itu video) */
.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: all 0.3s ease;
  pointer-events: none;
}

.group:hover .video-play-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.2);
}

/* =========================================
   FULLSCREEN VIDEO PLAYER PAGE
========================================= */

.video-page-body {
  background-color: #050505 !important;
  background-image: none !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
}

.video-player-container {
  width: 100%;
  max-width: 900px;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 40, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 80px rgba(6, 182, 212, 0.08);
}

.video-player-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.4);
}

.video-player-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.video-player-header .title {
  font-family: 'Inter', monospace;
  font-size: 12px;
  color: #6b7280;
  margin-left: 8px;
  letter-spacing: 0.05em;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Aspect Ratio 16:9 */
  background: #000;
}

.video-player-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: none;
}

.video-player-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

.video-player-footer h3 {
  font-weight: 700;
  font-size: 1.125rem;
  color: #ffffff;
}

.video-player-footer p {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

.video-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: #22d3ee;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(6, 182, 212, 0.4);
  color: #22d3ee;
}

/* Mobile adjustment for video player */
@media (max-width: 640px) {
  .video-player-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .video-player-footer h3 {
    font-size: 1rem;
  }
}
/* =========================================
   VIDEO THUMBNAIL IN PROJECT CARD
========================================= */
.project-video-wrapper {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 0; /* Pastikan di bawah overlay hover */
  overflow: hidden;
}

.project-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Video akan memenuhi area 16:9 tanpa distorsi */
  pointer-events: none; /* Penting: Cegah video bisa diklik langsung oleh user */
}

/* Saat card di-hover, video sedikit redup agar tulisan View Project jelas */
.group:hover .project-video-wrapper video {
  filter: brightness(0.5);
  transition: filter 0.3s ease;
}

/* Ikon Play di Tengah Thumbnail Video (Opsional tapi keren) */
.video-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.group:hover .video-play-badge {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.2);
}