:root {
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

[data-theme="dark"] {
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

::selection {
    background: #FF6B35;
    color: white;
}

.reveal-left,
.reveal-right,
.reveal-top,
.reveal-fade {
    opacity: 0;
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-top {
    transform: translateY(-50px);
}

.reveal-left.active,
.reveal-right.active,
.reveal-top.active,
.reveal-fade.active {
    opacity: 1;
    transform: translate(0, 0);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

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

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(400%);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease;
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease;
}

.animate-blink {
    animation: blink 1s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-delay-1 {
    animation: float 3s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-float-delay-2 {
    animation: float 3s ease-in-out infinite;
    animation-delay: 2s;
}

.animate-heartbeat {
    animation: heartbeat 1.5s infinite;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    transition: width 0.3s ease;
}

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

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 1024px) {
    .hamburger {
        display: flex !important;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 80px 2rem 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
    }

    [data-theme="dark"] .nav-menu {
        background: #1A1D2E;
    }

    .nav-menu.active {
        right: 0;
    }
}

.text-gradient {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 2s infinite;
}

.wheel {
    animation: scroll 1.5s infinite;
}

.hero-bg-float {
    animation: float 6s ease-in-out infinite;
}

/* Lightbox Active State - Fix untuk menampilkan modal */
#lightbox {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightbox.active {
    display: flex !important;
}

#lightbox-img {
    transition: opacity 0.2s ease, transform 0.3s ease;
}

#lightbox-img:hover {
    transform: scale(1.02);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Portfolio Item Hide State */
.portfolio-item.hide {
    display: none;
}

/* Back to Top Button Visible State */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Lightbox Loader */
#lightbox-loader {
    display: none;
    z-index: 1;
}

/* Lightbox responsive adjustments */
@media (max-width: 640px) {
    #lightbox-img {
        border-radius: 0.5rem;
    }

    #lightbox-info {
        padding: 1rem;
    }
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
    height: 100vh;
}

/* Smooth image transitions */
#lightbox-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Custom scrollbar for lightbox (if needed) */
#lightbox::-webkit-scrollbar {
    width: 0;
    height: 0;
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
