/* Custom CSS for David Chang Portfolio */

/* Root variables */
:root {
    --font-size: 14px;
    --lime-color: #c4ff00;
}

/* Base styles */
html {
    font-size: var(--font-size);
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Typography utilities */
.font-jakarta {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Grid background patterns */
.grid-bg {
    background-image: linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
}

.grid-bg-subtle {
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes glow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
    opacity: 0;
}

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

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

.animate-pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Shine effect for SIMPLICITY text */
.text-shine {
    background: linear-gradient(
        110deg,
        rgba(196, 255, 0, 1) 0%,
        rgba(248, 255, 175, 1) 50%,
        rgba(196, 255, 0, 1) 100%
    );
    background-size: 300% 100%;
    background-position: 0% center;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 0.1s ease-out;
}

/* Custom hover effects */
.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-out;
}

.qr-square {
    transition: all 0.4s ease-out;
    background-color: rgb(75, 85, 99); /* gray-600 */
}

.qr-square.active {
    background-color: #c4ff00 !important;
    transform: scale(1.05);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(196, 255, 0, 0.2);
    background-color: rgba(196, 255, 0, 0.05);
    transition: all 0.15s ease-out;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(196, 255, 0, 0.4), 0 0 60px rgba(196, 255, 0, 0.2);
    transition: box-shadow 0.3s ease-out;
}

/* Project card hover effects */
.project-card {
    transition: all 0.3s ease-out;
}

.project-card:hover {
    border-color: rgba(196, 255, 0, 0.3);
    box-shadow: 0 0 30px rgba(196, 255, 0, 0.1);
}

.project-card:hover .project-title {
    color: var(--lime-color);
}

.project-card:hover .show-case-study {
    box-shadow: 0 0 30px rgba(196, 255, 0, 0.4), 0 0 60px rgba(196, 255, 0, 0.2);
}

/* Form focus styles */
.form-input:focus {
    border-color: var(--lime-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(196, 255, 0, 0.1);
}

/* Particle animation */
.particle {
    animation: float 10s ease-in-out infinite;
    opacity: 0.1;
}

/* Intersection Observer triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay variations */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Carousel image hover effects */
.carousel-image {
    cursor: pointer;
    transition: all 0.3s ease-out;
}

.carousel-image:hover {
    transform: scale(1.02);
    opacity: 0.8;
}

/* Modal styles */
.swiper-button-next,
.swiper-button-prev {
    width: 48px !important;
    height: 48px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid #4b5563 !important;
    border-radius: 50% !important;
    color: white !important;
    margin-top: 0 !important;
    transform: translateY(-50%) !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #c4ff00 !important;
    color: black !important;
    transform: translateY(-50%) scale(1.05) !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 16px !important;
    font-weight: bold !important;
}

/* Custom pagination dots */
.swiper-pagination-bullet {
    width: 8px !important;
    height: 4px !important;
    border-radius: 2px !important;
    background: #6b7280 !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
    margin: 0 4px !important;
}

.swiper-pagination-bullet-active {
    width: 32px !important;
    background: #c4ff00 !important;
}

/* Position pagination */
.swiper-pagination {
    position: static !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important; /* Match button height */
}

/* Hide default Swiper navigation */
.swiper-button-next,
.swiper-button-prev {
    display: none !important;
}

/* Remove duplicate images issue */
.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #374151;
    cursor: pointer;
    transition: all 0.3s ease-out;
}

.swiper-slide img:hover {
    transform: scale(1.02);
    opacity: 0.8;
}

/* Mobile menu styles */
.mobile-menu-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure mobile menu appears above other content */
nav {
    position: relative;
}

#mobileMenu {
    z-index: 50;
}

.modal.active, #imageModal.active {
    opacity: 1 !important;
    visibility: visible !important;
}

#modalImage.loaded {
    opacity: 1 !important;
}

/* Make sure mobile menu button is above desktop nav */
#mobileMenuBtn {
    z-index: 60 !important;
    position: relative;
}

/* And ensure desktop nav doesn't overlap on mobile */
nav .hidden.md\\:flex {
    z-index: 50;
}

/* Update the logo/brand link styling */
nav .max-w-7xl .flex .text-gray-400 {
    position: relative;
    z-index: 60; /* Higher than most other elements */
}

/* Or more specifically target it */
nav a[href="index.html"] {
    position: relative;
    z-index: 60;
}