/* Custom Styles */
* {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0A0E1A 0%, #1A1F2E 50%, #2A3441 100%);
    color: #FFFFFF;
}

/* Custom animations */
@keyframes glow {
    from { box-shadow: 0 0 20px rgba(0, 217, 255, 0.3); }
    to { box-shadow: 0 0 30px rgba(0, 217, 255, 0.6); }
}

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

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

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #00D9FF; }
}

/* Navigation Styles */
.nav-link {
    @apply text-text-secondary hover:text-accent transition-all duration-300 font-medium relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(90deg, #00D9FF, #8B5CF6);
    transition: all 0.3s;
}

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

.mobile-nav-link {
    @apply text-text-secondary hover:text-accent transition-all duration-300 block px-3 py-2 rounded-md hover:bg-accent/10;
}

/* Hamburger Menu Animation */
.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    transform: rotate(0deg);
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.hamburger-line {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.3s ease-in-out;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.hamburger-line:nth-child(1) {
    top: 0px;
}

.hamburger-line:nth-child(2) {
    top: 8px;
}

.hamburger-line:nth-child(3) {
    top: 16px;
}

.hamburger-icon.open .hamburger-line:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.hamburger-icon.open .hamburger-line:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger-icon.open .hamburger-line:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

/* Button Styles */
.btn-primary {
    @apply inline-flex items-center px-8 py-3 bg-gradient-to-r from-accent to-accent-purple text-white font-medium rounded-lg transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl;
    animation: glow 2s ease-in-out infinite alternate;
}

.btn-secondary {
    @apply inline-flex items-center px-8 py-3 border-2 border-accent text-accent hover:bg-gradient-to-r hover:from-accent hover:to-accent-purple hover:text-white font-medium rounded-lg transition-all duration-300 transform hover:scale-105;
}

/* Social Links */
.social-link {
    @apply text-text-muted hover:text-accent transition-all duration-300 transform hover:scale-110;
    filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.3));
}

/* Hero Animation */
.hero-content {
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 10;
}

/* Ensure consistent spacing after animations */
.hero-content .animate-fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

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

/* Skill Categories */
.skill-category {
    @apply bg-secondary/50 p-6 rounded-lg hover:bg-secondary/70 transition-colors duration-200;
}

.skill-header {
    @apply text-center mb-6;
}

.skill-item {
    @apply mb-4;
}

.skill-bar {
    @apply w-full bg-gray-700 rounded-full h-2;
}

.skill-progress {
    @apply h-2 bg-gradient-to-r from-accent to-accent-light rounded-full transition-all duration-1000 ease-out;
}

/* Project Cards */
.project-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.project-image {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border-bottom: 1px solid rgba(75, 85, 99, 0.2);
}

/* Enhanced media display */
.project-image video {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.project-image img {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.project-image:hover video,
.project-image:hover img {
    transform: scale(1.02);
}

/* Image slideshow functionality */
.image-slideshow {
    cursor: pointer;
}

.image-slideshow:hover .absolute.inset-0 {
    background: rgba(0, 0, 0, 0.1);
}

/* Loading state for videos */
.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #00D9FF;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.project-tech {
    @apply inline-block bg-accent/20 text-accent px-2 py-1 rounded text-xs mr-2 mb-2;
}

.project-stats {
    @apply flex items-center text-sm text-gray-400;
}

.project-stat {
    @apply flex items-center mr-4;
}

/* Improved buttons */
.btn-primary, .btn-secondary {
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Contact Form */
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(42, 52, 65, 0.8);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    color: #FFFFFF !important;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: #00D9FF;
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
    background: rgba(42, 52, 65, 1);
    color: #FFFFFF !important;
}

.form-input::placeholder {
    color: #94A3B8 !important;
    opacity: 0.7;
}

.form-input::-webkit-input-placeholder {
    color: #94A3B8 !important;
    opacity: 0.7;
}

.form-input::-moz-placeholder {
    color: #94A3B8 !important;
    opacity: 0.7;
}

.form-input:-ms-input-placeholder {
    color: #94A3B8 !important;
    opacity: 0.7;
}

.contact-item {
    @apply flex items-center space-x-4;
}

/* Stats */
.stat-item {
    @apply text-center;
}

/* Experience Cards */
.experience-card {
    position: relative;
    transition: all 0.3s ease;
}

.experience-card::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #3B82F6, #60A5FA);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.experience-card:hover::before {
    opacity: 1;
}

/* Why Hire Me Cards */
.hire-me-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.hire-me-card:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Loading Animation */
.loading {
    @apply flex justify-center items-center py-20;
}

.spinner {
    @apply animate-spin rounded-full h-12 w-12 border-b-2 border-accent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-content {
        padding-bottom: 4rem;
    }
    
    .btn-primary, .btn-secondary {
        @apply px-6 py-2 text-sm;
    }
    
    /* Mobile Navigation Enhancements */
    #mobile-menu {
        @apply border-t border-accent/20;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-nav-link {
        @apply text-lg font-medium text-gray-300 hover:text-accent hover:bg-accent/10 transition-all duration-300 mx-2 my-1 rounded-lg;
        border-left: 3px solid transparent;
    }
    
    .mobile-nav-link:hover {
        border-left-color: #00D9FF;
        transform: translateX(5px);
    }
    
    /* Down arrow positioning fix for mobile */
    .scroll-indicator {
        @apply fixed bottom-4 left-1/2 transform -translate-x-1/2 z-30;
    }
    
    /* Better spacing for mobile sections */
    section {
        @apply px-6;
    }
    
    .max-w-7xl {
        @apply px-4;
    }
    
    /* Enhanced mobile cards */
    .hire-me-card {
        @apply mb-6;
    }
    
    /* Mobile-specific skill adjustments */
    .skill-category {
        @apply mb-6;
    }
    
    /* Better mobile project cards */
    .project-card {
        @apply mb-6;
    }
    
    /* Mobile contact section improvements */
    .contact-item {
        @apply mb-4 text-center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .btn-primary, .btn-secondary {
        @apply px-4 py-2 text-sm;
    }
    
    /* Even smaller screens adjustments */
    section {
        @apply py-12;
    }
    
    .mobile-nav-link {
        @apply text-base;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet specific styles */
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .grid {
        gap: 1.5rem;
    }
    
    .hire-me-card {
        @apply p-6;
    }
}

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #60a5fa;
}

/* Smooth transitions for all interactive elements */
a, button, .skill-category, .project-card {
    transition: all 0.2s ease-in-out;
}

/* Focus styles for accessibility */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Enhanced Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

/* Professional gradient backgrounds */
.gradient-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.gradient-card:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Line clamp utilities for text truncation */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Terminal Typing Animation */
.animate-typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #00D9FF;
    animation: typing 2s steps(20, end), blink-caret 1s step-end infinite;
    animation-delay: 1s;
    animation-fill-mode: both;
}
