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

/* CSS Variables for Theme */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #2d3748;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a202c;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-soft: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-color: #7c3aed;
    --secondary-color: #a855f7;
    --accent-color: #c084fc;
    --text-dark: #f8fafc;
    --text-light: #1e293b;
    --bg-light: #0f172a;
    --bg-dark: #020617;
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #c084fc 0%, #e879f9 100%);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--text-light);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

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

/* Disable scroll behavior for About section specifically */
#about {
    scroll-snap-type: none;
    overflow: visible;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    z-index: 1000;
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: var(--gradient-primary);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-avatar img {
    width: 150px;
    height: 150px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

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

.hero-buttons .btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-buttons .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-buttons .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-buttons .btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Typing Animation */
.typing-text {
    font-size: 1.2rem;
    font-weight: 500;
    min-height: 30px;
}

.typed-text {
    color: rgba(255, 255, 255, 0.9);
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-down {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    position: relative;
}

.scroll-down::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: scroll-animation 2s infinite;
}

@keyframes scroll-animation {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
#about {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    /* Remove scroll-snap-type to disable scroll snapping */
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.about-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.02);
}

.about-stats {
    margin-top: 40px;
}

.about-stats .row {
    gap: 20px;
}

.about-stats .col-4,
.about-stats .col-md-3 {
    flex: 1;
    max-width: calc(33.333% - 14px);
}

/* Statistics */
.stat-item {
    padding: 20px;
    border-radius: 15px;
    background: var(--gradient-soft);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-primary);
}

.stat-item:hover h3,
.stat-item:hover p {
    color: var(--text-light);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.stat-item p {
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

/* Skills Section */
.skill-category {
    background: var(--text-light);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.skill-category h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.skill-item {
    margin-bottom: 20px;
}

.progress {
    height: 10px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary);
    transition: width 2s ease-in-out;
}

/* Tech Stack */
.tech-badge {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px;
    background: var(--gradient-soft);
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: var(--gradient-primary);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Portfolio Section */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.portfolio-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-content {
    text-align: center;
    color: white;
    padding: 20px;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-content {
    transform: translateY(0);
}

.portfolio-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.portfolio-content p {
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 50%;
    padding: 0 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    border: 4px solid var(--text-light);
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    background: var(--text-light);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-content h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-content h5 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 15px;
}

/* Contact Section */
.contact-info {
    background: var(--text-light);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 1.2rem;
}

.contact-details h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-details p {
    color: var(--text-dark);
    margin: 0;
}

.social-links-contact h4 {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.social-btn {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-btn:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: var(--shadow-lg);
}

/* Contact Form */
.contact-form {
    background: var(--text-light);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.contact-form h4 {
    color: var(--text-dark);
    margin-bottom: 30px;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-light);
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 8px;
}

/* Footer */
footer {
    background: var(--bg-dark) !important;
    color: var(--text-light) !important;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

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

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Theme Toggle */
.theme-toggle .btn {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.theme-toggle .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 70px;
        text-align: left !important;
    }
    
    .timeline-dot {
        left: 20px !important;
        right: auto !important;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-item:hover {
        transform: translateX(0);
    }
    
    .about-stats .col-4 {
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .portfolio-item {
        margin-bottom: 20px;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.hover-grow:hover {
    transform: scale(1.05);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}