/* Custom Styles for Arvind K. Maurya Portfolio */

/* Font Configuration */
body {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
}

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

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

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

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

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

/* Navigation Styles */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #2563eb, #9333ea);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Gradient Text Animation */
.gradient-text {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

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

.card-hover: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);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

/* Section Transitions */
section {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Skills Progress Bars */
.skill-bar {
    height: 8px;
    background: linear-gradient(to right, #2563eb, #9333ea);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Timeline Styles */
.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #2563eb, #9333ea);
    transform: translateX(-50%);
}

/* Project Card Styles */
.project-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.project-card img {
    transition: transform 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

/* Contact Form Styles */
input:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Scroll to Top Button */
#scrollTop {
    transition: all 0.3s ease;
}

#scrollTop.show {
    opacity: 1;
    visibility: visible;
}

#scrollTop:hover {
    transform: translateY(-4px);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #2563eb, #9333ea);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #1e40af, #7e22ce);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print Styles */
@media print {
    nav,
    #scrollTop,
    #contact form {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
}

.shadow-glow {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
}

/* Hero Section Enhancements */
.hero-avatar {
    position: relative;
    z-index: 1;
}

.hero-avatar::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
    border-radius: 50%;
    opacity: 0.1;
    z-index: -1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.2;
    }
}

/* Statistics Counter Animation */
.stat-number {
    transition: all 0.3s ease;
}

/* Tag Cloud Styles */
.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Experience Timeline Mobile */
@media (max-width: 768px) {
    .timeline-item::before {
        left: 0;
    }
}

/* Contact Form Success/Error Messages */
.form-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Animations for Stats */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-count {
    animation: countUp 0.8s ease-out;
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: all 0.3s ease;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Footer Styles */
footer a:hover {
    color: #60a5fa;
    transition: color 0.3s ease;
}

/* Loading State for Images */
img {
    transition: opacity 0.3s ease;
}

img.loading {
    opacity: 0.5;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

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

/* Performance Optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent FOUC (Flash of Unstyled Content) */
.no-js {
    display: none;
}

/* Intersection Observer Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Project Image Placeholder */
.project-image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
    color: white;
}

.badge-success {
    background-color: #10b981;
    color: white;
}

/* Testimonial Styles (if needed later) */
.testimonial {
    position: relative;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -1rem;
    left: 1rem;
    font-size: 4rem;
    color: #2563eb;
    opacity: 0.2;
    font-family: Georgia, serif;
}

/* Skill Category Icons */
.skill-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #2563eb 0%, #9333ea 100%);
    color: white;
    font-size: 1.5rem;
}

/* Enhanced Links */
a {
    transition: all 0.2s ease;
}

/* Grid Animations */
.grid-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

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

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

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

/* Improved Button Accessibility */
button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced Box Shadows */
.shadow-soft {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Mobile Responsive Padding */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}