@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utilities {
  .animation-delay-2000 { animation-delay: 2s; }
  .animation-delay-4000 { animation-delay: 4s; }
}

/* Pengunci layar dasar */
html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

body {
    font-family: "Inter", sans-serif;
    background-color: transparent;
    position: relative;
    background-image: radial-gradient(circle at 50% 50%, #1a2a3a 0%, #050510 100%);
    color: white;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Penyesuaian AOS agar tidak off-screen terlalu jauh */
[data-aos="fade-left"] { transform: translate3d(50px, 0, 0); }
[data-aos="fade-right"] { transform: translate3d(-50px, 0, 0); }

/* --- CORE COMPONENTS --- */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- ANIMASI AMBIENT & FLOAT --- */
@keyframes ambient {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 5%) scale(1.05); }
}
.animate-ambient {
  will-change: transform;
  backface-visibility: hidden;
  animation: ambient 12s infinite ease-in-out;
}

@keyframes float-action {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.floating-element {
    animation: float-action 4s ease-in-out infinite;
    transition: all 0.5s ease;
}
.delay-1 { animation-delay: 0s; animation-duration: 4s; }
.delay-2 { animation-delay: 1s; animation-duration: 5s; }
.delay-3 { animation-delay: 2s; animation-duration: 4.5s; }

/* --- ANIMASI INTERAKSI (UPSCALE & FADE) --- */
.upscale-item {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    z-index: 1;
}
.is-upscaled {
    transform: scale(1.05); /* Sedikit diperkecil dari 1.08 agar tidak terpotong di HP */
    z-index: 50;
    box-shadow: 0 20px 50px rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.5) !important;
}
.showcase-pane.has-active .upscale-item:not(.is-upscaled) {
    opacity: 0.4;
    filter: blur(2px) grayscale(0.5);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }

/* --- MOBILE MENU BURGER --- */
.menu-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 100;
}
.menu-btn__burger {
    width: 25px;
    height: 2px;
    background: #fff;
    border-radius: 5px;
    transition: all 0.5s ease-in-out;
}
.menu-btn__burger::before,
.menu-btn__burger::after {
    content: "";
    position: absolute;
    width: 25px;
    height: 2px;
    background: #fff;
    border-radius: 5px;
    transition: all 0.5s ease-in-out;
}
.menu-btn__burger::before { transform: translateY(-8px); }
.menu-btn__burger::after { transform: translateY(8px); }

.menu-btn.open .menu-btn__burger {
    transform: translateX(-50px);
    background: transparent;
}
.menu-btn.open .menu-btn__burger::before { transform: rotate(45deg) translate(35px, -35px); }
.menu-btn.open .menu-btn__burger::after { transform: rotate(-45deg) translate(35px, 35px); }

/* --- INFINITE SCROLL --- */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 5)); }
}
.animate-scroll {
    display: flex;
    width: calc(250px * 10);
    animation: scroll 20s linear infinite;
}
.animate-scroll:hover { animation-play-state: paused; }
.tech-card {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* --- NAVIGATION INDICATOR --- */
.nav-link {
  position: relative;
  color: #9ca3af;
  transition: all 0.3s ease;
}
.nav-link.active-link { color: #ffffff !important; }

#nav-indicator {
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease, transform 0.3s ease;
}
#nav-indicator.visible {
  opacity: 1;
  transform: scale(1);
}

/* --- UTILITIES & CUSTOM SCROLLBARS --- */
@media (max-width: 768px) {
    #random-icons-container { display: none; }
}

.text-shadow-glow { text-shadow: 0 0 20px rgba(168, 85, 247, 0.4); }

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #7c3aed; border-radius: 10px; }

/* --- GALLERY GRID SYSTEM --- */
.photo-grid-custom {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.photo-grid-custom::-webkit-scrollbar { display: none; }

@media (max-width: 768px) {
    .photo-grid-custom {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        padding-bottom: 20px;
    }
    .gallery-item {
        flex: 0 0 calc(60% - 8px); /* Sedikit dilebarkan di HP agar foto terlihat jelas */
        scroll-snap-align: center;
        aspect-ratio: 1/1;
    }
}

@media (min-width: 769px) {
    .photo-grid-custom {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        max-height: 800px;
        overflow-y: auto;
        padding-right: 10px;
        scrollbar-width: thin;
        scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
    }
}
