/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --primary: #3b82f6;
    --secondary: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
}

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f1f5f9;
    color: var(--dark);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Dark Mode Styles */
.dark {
    background-color: #0f172a;
    color: #f8fafc;
}

.dark .card {
    background-color: #1e293b;
    color: #f8fafc;
}

.dark .bg-white {
    background-color: #1e293b !important;
    color: #f8fafc;
}

.dark .bg-slate-50 {
    background-color: #0f172a !important;
}

.dark .text-slate-600, .dark .text-slate-700 {
    color: #e2e8f0 !important;
}

.dark .bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, #1e293b, #1e293b) !important;
}

.dark .border-slate-300 {
    border-color: #334155 !important;
}

.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12) !important;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Card Styles */
.card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Timeline Styles */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 4px solid white;
}

.dark .timeline-item::before {
    border-color: #1e293b;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    height: 100%;
    width: 2px;
    background: #e2e8f0;
}

.dark .timeline::before {
    background: #334155;
}

/* Skill Bar Styles */
.skill-bar {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    overflow: hidden;
}

.dark .skill-bar {
    background: #334155;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 1s ease-in-out;
}

/* Skill progress bar styles */
.skill-progress-95 { width: 95% !important; }
.skill-progress-90 { width: 90% !important; }
.skill-progress-88 { width: 88% !important; }
.skill-progress-85 { width: 85% !important; }

/* Animations */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

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

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

.glow {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}

/* Parallax */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Hover Underline Animation */
.hover-underline-animation {
    display: inline-block;
    position: relative;
}

.hover-underline-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.hover-underline-animation:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Dark Mode Toggle */
.toggle-checkbox:checked {
    right: 0;
    background-color: #10b981;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #1e293b;
}

/* 3D Character Container */
.character-container {
    width: 300px;
    height: 300px;
    position: relative;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .character-container {
        width: 250px;
        height: 250px;
    }
}

/* Floating Animations */
@keyframes float1 {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes float2 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.float-animation1 {
    animation: float1 4s ease-in-out infinite;
}

.float-animation2 {
    animation: float2 5s ease-in-out infinite;
}

/* Cursor Interaction Styles */
.character-hover-effect {
    transition: transform 0.3s ease;
}

/* Enhanced Select Dropdown Styles */
.custom-select {
    position: relative;
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border: 2px solid #4b5563;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.custom-select:hover {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.custom-select.focused {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

.custom-select select {
    width: 100%;
    padding: 16px 50px 16px 20px;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.custom-select select option {
    background: #374151;
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    font-weight: 500;
}

.custom-select select option:hover {
    background: #10b981;
    color: #ffffff;
}

.custom-select select option:checked {
    background: #10b981;
    color: #ffffff;
}

.custom-select::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #10b981;
    pointer-events: none;
    transition: all 0.3s ease;
}

.custom-select:hover::after {
    border-top-color: #34d399;
}

.custom-select.focused::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: #10b981;
}

/* Position indicator */
.custom-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.custom-select.focused::before {
    transform: scaleX(1);
}

/* Position type badges/icons */
.position-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
}

.custom-select.has-value .position-icon {
    opacity: 1;
}

.custom-select.has-value select {
    padding-left: 52px;
}

/* Enhanced form field states */
.contact-card .form-field {
    position: relative;
    transition: all 0.3s ease;
}

.contact-card .form-field.focused {
    transform: translateY(-2px);
}

.contact-card .form-field.valid input,
.contact-card .form-field.valid select,
.contact-card .form-field.valid textarea {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.contact-card .form-field.error input,
.contact-card .form-field.error select,
.contact-card .form-field.error textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success button state */
.contact-card button.success {
    background: linear-gradient(135deg, #10b981, #34d399) !important;
    transform: scale(1.02);
}

/* Custom select dropdown animation */
.custom-select select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select.focused select {
    transform: translateY(-1px);
}

/* Position type specific styling */
.custom-select[data-position="full-time"] .position-icon {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.custom-select[data-position="part-time"] .position-icon {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.custom-select[data-position="internship"] .position-icon {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.custom-select[data-position="contract"] .position-icon {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.custom-select[data-position="freelance"] .position-icon {
    background: linear-gradient(135deg, #10b981, #34d399);
}

/* Animation delay classes */
.animate-delay-2s {
    animation-delay: 2s;
}

/* FontAwesome animation duration classes */
.fa-animation-1s {
    --fa-animation-duration: 1s;
}

.fa-animation-2s {
    --fa-animation-duration: 2s;
}

.fa-animation-3s {
    --fa-animation-duration: 3s;
}

/* Additional responsive styles for compatibility */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: #4F46E5 #1E293B;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 8px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: #1E293B;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background-color: #4F46E5;
    border-radius: 4px;
}

/* Roadmap Styles */
.timeline-dot {
    width: 12px;
    height: 12px;
    background-color: #3b82f6;
    border-radius: 50%;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* About Section Styles */
.hover-scale:hover {
    transform: scale(1.05);
}

/* Futuristic Contact Form Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(74, 223, 134, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(74, 223, 134, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 223, 134, 0); }
}

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

.animate-pulse-glow {
    animation: pulse-glow 2s infinite;
}

.glow-hover:hover {
    filter: drop-shadow(0 0 8px rgba(74, 223, 134, 0.5));
}

.slide-in {
    animation: slideIn 1s ease-out forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.contact-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.contact-card input:focus, 
.contact-card textarea:focus,
.contact-card select:focus {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Override dark mode styles for contact section */
#contact {
    background-color: #111827 !important;
}

#contact .dark {
    background-color: #111827 !important;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    #about .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item::before {
        left: -30px;
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-box {
        flex-direction: column;
    }
    
    .contact-info {
        width: 100%;
    }
    
    .contact-form {
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 1rem;
    }
    
    /* Adjust roadmap for mobile */
    .roadmap-item-right, .roadmap-item-left {
        margin-left: 20px;
    }
    
    .roadmap-dot {
        left: -16px;
    }
    
    .roadmap-connector {
        left: -8px;
    }
}

/* Cross-browser user-select fix */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* No select for particles */
.particles, .particles * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader-content {
    text-align: center;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1rem;
}



.preloader-content {
    text-align: center;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
