/* assets/css/style.css */

/* Custom Properties for Theme Colors */
:root {
    --ai-blue: #3B82F6;
    --ai-purple: #8B5CF6;
    --circuit-green: #10B981;
    --tech-orange: #F59E0B;
}

/* Neural Network Pattern Background */
.neural-pattern {
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(59, 130, 246, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 75px 75px, rgba(139, 92, 246, 0.1) 2px, transparent 2px);
    background-size: 100px 100px;
}

/* Circuit Pattern Background */
.circuit-pattern {
    background-image: 
        linear-gradient(90deg, rgba(16, 185, 129, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(16, 185, 129, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* RTL Support Styles */
[dir="rtl"] {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Arial Unicode MS';
}

/* RTL Flexbox Adjustments */
[dir="rtl"] .flex:not(.flex-col):not(.flex-row) {
    flex-direction: row-reverse;
}

[dir="rtl"] .space-x-reverse > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* RTL Border Adjustments */
[dir="rtl"] .border-l-4 {
    border-left-width: 0;
    border-right-width: 4px;
}

[dir="rtl"] .border-r-4 {
    border-right-width: 0;
    border-left-width: 4px;
}

/* RTL Text Alignment */
[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .text-right {
    text-align: left;
}

/* RTL Margin/Padding Adjustments */
[dir="rtl"] .mr-2 { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .mr-4 { margin-right: 0; margin-left: 1rem; }
[dir="rtl"] .mr-6 { margin-right: 0; margin-left: 1.5rem; }
[dir="rtl"] .ml-2 { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .ml-4 { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .ml-6 { margin-left: 0; margin-right: 1.5rem; }

[dir="rtl"] .pr-4 { padding-right: 0; padding-left: 1rem; }
[dir="rtl"] .pr-6 { padding-right: 0; padding-left: 1.5rem; }
[dir="rtl"] .pr-8 { padding-right: 0; padding-left: 2rem; }
[dir="rtl"] .pl-4 { padding-left: 0; padding-right: 1rem; }
[dir="rtl"] .pl-6 { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .pl-8 { padding-left: 0; padding-right: 2rem; }

/* RTL Positioning */
[dir="rtl"] .left-4 { left: auto; right: 1rem; }
[dir="rtl"] .right-4 { right: auto; left: 1rem; }
[dir="rtl"] .-left-4 { left: auto; right: -1rem; }
[dir="rtl"] .-right-4 { right: auto; left: -1rem; }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-blob {
    animation: blob 7s infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Animation Delays */
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-800 { animation-delay: 0.8s; }
.animation-delay-1000 { animation-delay: 1s; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* Skill Bars */
.skill-bar {
    transition: width 2s ease-in-out;
    transform-origin: left;
}

[dir="rtl"] .skill-bar {
    transform-origin: right;
}

.skill-bar-container {
    position: relative;
    overflow: hidden;
}

.skill-bar-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--ai-blue), var(--ai-purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--ai-purple), var(--circuit-green));
}

/* Navigation Active States */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ai-blue), var(--ai-purple));
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .card-hover:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Button Hover Effects */
.btn-gradient {
    background: linear-gradient(45deg, var(--ai-blue), var(--ai-purple));
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

/* Form Styles */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

/* Progress Circles */
.progress-circle {
    transform: rotate(-90deg);
}

.progress-circle circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--ai-blue), var(--ai-purple), var(--circuit-green));
}

[dir="rtl"] .timeline-item::before {
    left: auto;
    right: -8px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 24px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ai-blue);
    border: 2px solid white;
}

[dir="rtl"] .timeline-item::after {
    left: auto;
    right: -12px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .neural-pattern {
        background-size: 50px 50px;
    }
    
    .circuit-pattern {
        background-size: 15px 15px;
    }
    
    .animate-blob {
        animation: none; /* Reduce animations on mobile for performance */
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
    
    .neural-pattern,
    .circuit-pattern {
        background: none !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--ai-blue);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-gradient-to-r,
    .bg-gradient-to-br {
        background: var(--ai-blue) !important;
    }
    
    .text-transparent {
        color: var(--ai-blue) !important;
        background: none !important;
        -webkit-background-clip: unset !important;
        background-clip: unset !important;
    }
}