/* Custom CSS for Personal Website */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Seamless Navigation Animations */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

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

/* Seamless Navigation Effects */
#navbar {
    animation: slideInFromRight 1.2s ease-out;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-link-seamless {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-link-seamless::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-seamless:hover::before {
    left: 100%;
}

.nav-link-seamless:hover {
    animation: gentlePulse 2s ease-in-out infinite;
}

.nav-link-seamless span {
    animation: fadeInUp 0.6s ease-out forwards;
}

.nav-link-seamless:nth-child(1) span { animation-delay: 0.1s; }
.nav-link-seamless:nth-child(2) span { animation-delay: 0.2s; }
.nav-link-seamless:nth-child(3) span { animation-delay: 0.3s; }
.nav-link-seamless:nth-child(4) span { animation-delay: 0.4s; }
.nav-link-seamless:nth-child(5) span { animation-delay: 0.5s; }

.mobile-nav-link-seamless {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-nav-link-seamless::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-link-seamless:hover::before {
    left: 100%;
}

/* Subtle floating animation for navbar */
@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-1px);
    }
}

#navbar:hover {
    animation: gentleFloat 4s ease-in-out infinite;
}

/* Smooth transitions for all interactive elements */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced backdrop blur support */
@supports (backdrop-filter: blur(20px)) {
    #navbar {
        background: rgba(255, 255, 255, 0.05);
    }
}

@supports not (backdrop-filter: blur(20px)) {
    #navbar {
        background: rgba(255, 255, 255, 0.9);
    }
}

/* Enhanced Hero Section Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

/* Typing animation */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: #2563eb; }
}

/* Floating shapes animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

/* Bounce animations */
@keyframes bounceSubtle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Text color animation */
@keyframes colorChange {
    0% { color: #2563eb; }
    50% { color: #1d4ed8; }
    100% { color: #2563eb; }
}

/* Scroll arrow animation */
@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
}

.animate-fade-in-up-delay {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.animate-fade-in-up-delay-2 {
    animation: fadeInUp 1s ease-out 0.6s both;
}

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

.animate-slide-left {
    animation: slideInLeft 1s ease-out;
}

.animate-slide-right {
    animation: slideInRight 1s ease-out;
}

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

/* Typing effect */
.typing-text {
    display: inline-block;
    overflow: hidden;
    border-right: 3px solid #2563eb;
    white-space: nowrap;
    animation: typing 3s steps(20, end), blink 1s infinite;
}

/* Floating background shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(37, 99, 235, 0.1), rgba(99, 102, 241, 0.1));
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 30%;
    animation-delay: 1s;
}

/* Enhanced button styles */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.btn-secondary {
    border: 2px solid #2563eb;
    color: #2563eb;
    background: transparent;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-content {
    position: relative;
    z-index: 1;
}

.animate-bounce-subtle {
    animation: bounceSubtle 2s ease-in-out infinite;
}

.animate-bounce-subtle-delay {
    animation: bounceSubtle 2s ease-in-out infinite 0.5s;
}

/* Animated text */
.animated-text {
    animation: colorChange 3s ease-in-out infinite;
}

/* Scroll indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, #2563eb, transparent);
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #2563eb;
    border-bottom: 2px solid #2563eb;
    transform: rotate(45deg);
}

/* Enhanced Portfolio Animations */
.portfolio-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }
.portfolio-item:nth-child(5) { animation-delay: 0.5s; }
.portfolio-item:nth-child(6) { animation-delay: 0.6s; }

.portfolio-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.portfolio-item:hover .fas {
    transform: scale(1.2) rotate(5deg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Portfolio image hover effects */
.portfolio-item .h-48 {
    position: relative;
    overflow: hidden;
}

.portfolio-item .h-48::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.6s ease;
}

.portfolio-item:hover .h-48::before {
    left: 100%;
}

/* Technology tag animations */
.portfolio-item span {
    transition: all 0.3s ease;
}

.portfolio-item:hover span {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Portfolio link animations */
.portfolio-item a {
    position: relative;
    transition: all 0.3s ease;
}

.portfolio-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.portfolio-item a:hover::after {
    width: 100%;
}

.portfolio-item a:hover {
    transform: translateX(5px);
}

/* Skill bars animation */
.skill-bar {
    transition: width 1.5s ease-in-out;
}

/* Navigation active state */
.nav-link.active {
    color: #2563eb;
    background-color: #eff6ff;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Form focus effects */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::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-primary:hover::before {
    left: 100%;
}

/* Social media icons hover effect */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Loading animation for portfolio items */
.portfolio-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.portfolio-item.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating animation for hero section */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Pulse animation for CTA buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.cta-button {
    animation: pulse 2s infinite;
}

/* Skill progress animation */
.skill-progress {
    position: relative;
    overflow: hidden;
}

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

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

/* Contact form success/error states */
.form-success {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.form-error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #2563eb;
    transform: translateY(-3px);
}

/* Section dividers */
.section-divider {
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    margin: 0 auto;
    border-radius: 2px;
    width: 100px;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Text selection */
::selection {
    background: #3b82f6;
    color: white;
}

/* Focus visible for accessibility */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #374151 !important;
    }
    
    .text-gray-400 {
        color: #6b7280 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-fade-in,
    .animate-slide-left,
    .animate-slide-right,
    .animate-scale-in {
        animation: none !important;
    }
}
