/* Custom CSS for Portfolio Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* Custom animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.6);
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Floating animation */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Pulse glow effect */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Custom button hover effects */
.btn-gradient {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Skill progress bars */
.skill-progress {
    transition: width 1.5s ease-in-out;
}

/* Project card hover effects */
.project-card {
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Navigation active states */
.nav-link.active {
    color: #3b82f6;
    font-weight: 600;
}

.dark .nav-link.active {
    color: #60a5fa;
}

/* Mobile menu animations */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms, transform 200ms;
}

.mobile-menu-exit {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 200ms, transform 200ms;
}

/* Form input focus states */
.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark .form-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Loading spinner */
.loading-spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.dark .loading-spinner {
    border-color: #374151;
    border-top-color: #60a5fa;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Typing animation */
.typing-animation {
    border-right: 2px solid #3b82f6;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

.dark .typing-animation {
    border-right-color: #60a5fa;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #3b82f6; }
}

.dark @keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #60a5fa; }
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card shadows */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark .card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.card-shadow-hover:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark .card-shadow-hover:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode-toggle {
        display: block;
    }
}

/* Dark mode specific styles */
.dark {
    color-scheme: dark;
}

.dark body {
    background-color: #0f172a;
    color: #f1f5f9;
}

.dark .bg-white {
    background-color: #1e293b;
}

.dark .bg-gray-50 {
    background-color: #0f172a;
}

.dark .bg-gray-100 {
    background-color: #1e293b;
}

.dark .text-gray-900 {
    color: #f1f5f9;
}

.dark .text-gray-800 {
    color: #e2e8f0;
}

.dark .text-gray-700 {
    color: #cbd5e1;
}

.dark .text-gray-600 {
    color: #94a3b8;
}

.dark .text-gray-500 {
    color: #64748b;
}

.dark .text-gray-400 {
    color: #94a3b8;
}

.dark .text-gray-300 {
    color: #cbd5e1;
}

.dark .border-gray-200 {
    border-color: #334155;
}

.dark .border-gray-300 {
    border-color: #475569;
}

.dark .border-gray-100 {
    border-color: #1e293b;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.dark button:focus,
.dark a:focus,
.dark input:focus,
.dark textarea:focus {
    outline-color: #60a5fa;
}

/* Custom selection color */
::selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: #1f2937;
}

.dark ::selection {
    background-color: rgba(96, 165, 250, 0.3);
    color: #f1f5f9;
}

/* Back to top button */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Project filter buttons */
.project-filter.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

/* Contact form success/error states */
.form-success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.dark .form-success {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.form-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.dark .form-error {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.dark .loading::after {
    border-color: #374151;
    border-top-color: #60a5fa;
} 