/* Custom styles for Nigma Portfolio */

/* Base animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(-1deg); }
    75% { transform: translateY(-15px) rotate(1deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes organicMove {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(10px, -5px) scale(1.05); }
    50% { transform: translate(-5px, 10px) scale(0.95); }
    75% { transform: translate(-10px, -10px) scale(1.02); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Utility animations */
.animate-fade-in {
    animation: fadeIn 1.5s ease forwards;
}

.animate-fade-in-delay {
    animation: fadeInDelay 1.5s ease 0.5s forwards;
    opacity: 0;
}

/* Navigation styles */
.nav-link {
    @apply text-gray-300 hover:text-white transition-colors duration-300 relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

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

/* Gallery hover effects */
.artwork-item {
    transition: transform 0.3s ease;
}

.artwork-item:hover {
    transform: translateY(-5px);
}

/* Manifesto animations */
.manifesto-word {
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.geometric-float {
    animation: float 8s ease-in-out infinite;
}

/* Form styles */
.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Contact page effects */
.social-link {
    @apply p-3 rounded-full border border-gray-700 hover:border-accent transition-all duration-300;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .nav-link::after {
        display: none;
    }
    
    #mobile-menu {
        border-top: 1px solid #374151;
        padding-top: 1rem;
    }
}

/* Flash messages */
.flash-message {
    transform: translateX(100%);
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

/* Text selection */
::selection {
    background-color: var(--accent-color);
    color: black;
}

/* Focus styles for accessibility */
input:focus,
textarea:focus,
button:focus,
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Smooth transitions for theme changes */
* {
    transition: border-color 0.3s ease, color 0.3s ease;
}

/* Print styles */
@media print {
    .fixed, nav, #flash-messages {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .text-gray-400 {
        color: #d1d5db !important;
    }
    
    .text-gray-300 {
        color: #f3f4f6 !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (already dark by default) */
@media (prefers-color-scheme: light) {
    /* Keep dark theme regardless */
}

/* Custom properties for dynamic theming */
:root {
    --accent-color: #4ECDC4;
    --bg-primary: #000000;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --border-color: #374151;
}

/* Utility classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Canvas styles */
canvas {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -o-crisp-edges;
    image-rendering: crisp-edges;
}
