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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

/* Particle Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

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

/* Loading Animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-size: 1.2rem;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    animation: slideDown 0.8s ease forwards;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #6366f1;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    border-radius: 25px;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

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

.nav-link:hover {
    color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 80%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::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 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-10px) translateY(-10px); }
    50% { transform: translateX(10px) translateY(-5px); }
    75% { transform: translateX(-5px) translateY(10px); }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease 0.5s forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.highlight {
    color: #fbbf24;
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    animation: highlightGlow 2s ease-in-out infinite;
}

@keyframes highlightGlow {
    0%, 100% { box-shadow: 0 0 5px #fbbf24; }
    50% { box-shadow: 0 0 20px #fbbf24, 0 0 30px #f59e0b; }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #e5e7eb;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease 0.8s forwards;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #d1d5db;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease 1.1s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 1s ease 1.4s forwards;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::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 ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: #1f2937;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(251, 191, 36, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.2);
    border-color: #fbbf24;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateX(50px) rotate(10deg);
    animation: slideInRight 1s ease 1.7s forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
}

.profile-photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: none; }
body.dark .profile-photo { filter: none; }

.image-placeholder { overflow: hidden; box-shadow: inset 0 0 0 9999px rgba(99,102,241,0.06), 0 20px 40px rgba(0, 0, 0, 0.1); }
body.dark .image-placeholder { box-shadow: inset 0 0 0 9999px rgba(139,92,246,0.08), 0 20px 40px rgba(0, 0, 0, 0.25); }

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #6366f1, #8b5cf6);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 4s linear infinite;
}

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

.image-placeholder i {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.9);
    animation: bounce 2s ease-in-out infinite;
}

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

/* Section Styles */
section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.05), transparent);
    animation: sectionShimmer 8s ease-in-out infinite;
}

@keyframes sectionShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1f2937;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: expandWidth 1s ease 0.5s forwards;
    width: 0;
}

@keyframes expandWidth {
    to { width: 60px; }
}

/* About Section */
.about {
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat:hover::before {
    left: 100%;
}

.stat:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.stat p {
    color: #6b7280;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.about-image .image-placeholder {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
}

.about-image .image-placeholder i {
    font-size: 6rem;
    color: white;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1f2937;
    text-align: center;
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.skill-item:hover::before {
    left: 100%;
}

.skill-item:hover {
    background: #e0e7ff;
    transform: translateX(10px) scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.skill-item i {
    font-size: 1.5rem;
    color: #6366f1;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.skill-item:hover i {
    transform: scale(1.2) rotate(10deg);
    color: #4f46e5;
}

.skill-item span {
    font-weight: 500;
    color: #374151;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.skill-item:hover span {
    color: #1f2937;
}

/* Projects Section */
.projects {
    background: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.2);
}

.project-card > * {
    position: relative;
    z-index: 2;
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image .image-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.project-image .image-placeholder i {
    font-size: 2.5rem;
    color: white;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: #e0e7ff;
    color: #6366f1;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #4f46e5;
}

/* Education Section */
.education-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 80px;
}

.timeline-marker {
    position: absolute;
    left: 20px;
    top: 10px;
    width: 20px;
    height: 20px;
    background: #6366f1;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px #e0e7ff;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 20px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid white;
}

.timeline-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: #6366f1;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: #4b5563;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item i {
    color: #6366f1;
    font-size: 1.2rem;
    width: 20px;
}

.contact-item span {
    color: #374151;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #4f46e5;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-items {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .image-placeholder {
        width: 200px;
        height: 200px;
    }

    .image-placeholder i {
        font-size: 4rem;
    }
}

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

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

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4f46e5, #7c3aed);
}

/* Additional animations and effects */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.8), 0 0 30px rgba(139, 92, 246, 0.6); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

/* Add hover effects to all interactive elements */
.btn, .nav-link, .skill-item, .project-card, .stat {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add focus states for accessibility */
.btn:focus, .nav-link:focus, .skill-item:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Add selection styling */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #1f2937;
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.2);
    color: #1f2937;
}

/* Add smooth transitions to all elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Add loading animation for images */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation: none !important;
        transition: none !important;
    }
    .hero::before,
    .hero::after,
    .image-placeholder,
    .loading-spinner,
    .section-title,
    .stat,
    .skill-item,
    .project-card {
        animation: none !important;
    }
}

/* Lightweight mode toggles */
body.lite .particles { display: none !important; }
body.lite .image-placeholder { animation: none !important; }
body.lite .hero::before { animation: none !important; }
body.lite .hero::after { animation: none !important; }
body.lite .hero-title,
body.lite .hero-subtitle,
body.lite .hero-description,
body.lite .hero-buttons,
body.lite .hero-image { animation-duration: 0.6s; }
body.lite .project-card:hover { transform: translateY(-6px); box-shadow: 0 10px 20px rgba(99,102,241,0.15); }
body.lite .skill-item:hover { transform: translateX(6px); box-shadow: 0 3px 8px rgba(99,102,241,0.12); }

/* Contact section background override */
.contact { background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.06)) !important; }
body.dark .contact { background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03)) !important; }

/* Subtle site background (light and dark) */
body { 
    background:
        radial-gradient(1200px 600px at -10% -10%, rgba(99,102,241,0.10), transparent 60%),
        radial-gradient(900px 500px at 110% 120%, rgba(139,92,246,0.12), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,247,255,0.96));
}
body.dark {
    background:
        radial-gradient(1200px 600px at -10% -10%, rgba(99,102,241,0.12), transparent 60%),
        radial-gradient(900px 500px at 110% 120%, rgba(139,92,246,0.14), transparent 60%),
        linear-gradient(180deg, #0b1020, #0e1326);
}

.hero .image-placeholder { box-shadow: none !important; background: transparent !important; border: none !important; padding: 0 !important; }
.hero .image-placeholder::before, .hero .image-placeholder::after { display: none !important; }

/* Animated gradient blobs */
.blobs { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.blob { position: absolute; width: 480px; height: 480px; border-radius: 50%; filter: blur(60px); opacity: 0.35; }
.blob.b1 { background: #6366f1; top: -120px; left: -120px; animation: floatA 18s ease-in-out infinite; }
.blob.b2 { background: #8b5cf6; bottom: -140px; right: -140px; animation: floatB 22s ease-in-out infinite; }
.blob.b3 { background: #f59e0b; top: 40%; left: 60%; animation: floatC 26s ease-in-out infinite; opacity: 0.25; }
@keyframes floatA { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(80px,40px) scale(1.1);} }
@keyframes floatB { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(-100px,-60px) scale(1.05);} }
@keyframes floatC { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(-60px,80px) scale(1.12);} }
body.dark .blob { opacity: 0.22; filter: blur(70px); }

/* Aurora background overlay */
.aurora { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.aurora::before, .aurora::after { content: ''; position: absolute; inset: -20%; filter: blur(60px); opacity: 0.35; background: conic-gradient(from 180deg at 50% 50%, rgba(99,102,241,0.35), rgba(139,92,246,0.35), rgba(245,158,11,0.28), rgba(99,102,241,0.35)); animation: auroraMove 18s ease-in-out infinite; }
.aurora::after { animation-duration: 24s; mix-blend-mode: screen; }
@keyframes auroraMove { 0% { transform: translate(0,0) rotate(0deg);} 50% { transform: translate(6%, -4%) rotate(180deg);} 100% { transform: translate(0,0) rotate(360deg);} }
body.dark .aurora::before, body.dark .aurora::after { opacity: 0.22; filter: blur(80px); }

/* Spotlight cursor */
.spotlight { position: fixed; width: 260px; height: 260px; border-radius: 50%; pointer-events: none; z-index: 1; background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.05) 60%, transparent 70%); mix-blend-mode: overlay; transform: translate(-50%, -50%); transition: opacity .3s ease; opacity: 0; }
body:hover .spotlight { opacity: 1; }

/* Light sweep utility */
.light-sweep { position: relative; overflow: hidden; }
.light-sweep::before { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.25) 45%, transparent 90%); transform: skewX(-20deg); transition: left .8s ease; pointer-events: none; }
.light-sweep:hover::before { left: 140%; }

/* Apply sweep to buttons/cards/titles */
.btn, .project-card, .skill-category, .section-title { position: relative; }
.btn.light-sweep, .project-card.light-sweep, .skill-category.light-sweep, .section-title.light-sweep { }

/* Ensure z-index layering */
.navbar { z-index: 10; }
.hero, section { position: relative; z-index: 2; }

/* Remove neon styles by overriding */
.neon-bg, .beam { display: none !important; }

/* Modern animated mesh gradient background */
.mesh-bg { position: fixed; inset: 0; z-index: -3; background: radial-gradient(800px 500px at 10% 20%, #e9d5ff 0%, transparent 60%), radial-gradient(900px 600px at 90% 10%, #bfdbfe 0%, transparent 65%), radial-gradient(900px 700px at 50% 100%, #fde68a 0%, transparent 60%), linear-gradient(180deg, #ffffff, #f8fafc); filter: saturate(1.05); animation: meshShift 24s ease-in-out infinite alternate; }
@keyframes meshShift { 0%{ background-position: 0 0, 0 0, 0 0, 0 0; } 100%{ background-position: 10% -6%, -8% 12%, 0% 8%, 0 0; } }
body.dark .mesh-bg { background: radial-gradient(800px 500px at 10% 20%, rgba(99,102,241,0.22) 0%, transparent 60%), radial-gradient(900px 600px at 90% 10%, rgba(139,92,246,0.22) 0%, transparent 65%), radial-gradient(900px 700px at 50% 100%, rgba(245,158,11,0.16) 0%, transparent 60%), linear-gradient(180deg, #0b1020, #0e1326); }

/* Contrast tweaks for readability */
.skills .section-title, .education .section-title, .contact .section-title { color: var(--text); text-shadow: 0 1px 2px rgba(0,0,0,0.15); }

/* Make cards a bit more opaque for readability */
.skill-category, .timeline-content, .contact-form { background: rgba(255,255,255,0.86); backdrop-filter: blur(14px); border: 1px solid rgba(0,0,0,0.05); }
body.dark .skill-category, body.dark .timeline-content, body.dark .contact-form { background: rgba(17,24,39,0.78); border-color: rgba(255,255,255,0.08); }

/* Section containers get a subtle darker overlay for text clarity */
.skills, .education, .contact { position: relative; }
.skills::before, .education::before, .contact::before { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.55); mix-blend-mode: lighten; z-index: 0; pointer-events: none; opacity: 0.25; }
body.dark .skills::before, body.dark .education::before, body.dark .contact::before { background: rgba(0,0,0,0.6); mix-blend-mode: normal; opacity: 0.35; }
.skills .container, .education .container, .contact .container { position: relative; z-index: 1; }

/* Stronger heading and paragraph contrast in these sections */
.skills h3, .education h3, .contact h3 { color: var(--text); }
.skills p, .education p, .contact p { color: var(--text); opacity: 0.9; }

/* Contact form inputs readability */
.contact-form input, .contact-form textarea { background: rgba(255,255,255,0.95); color: #111827; border-color: rgba(0,0,0,0.08); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #6b7280; opacity: 1; }
body.dark .contact-form input, body.dark .contact-form textarea { background: rgba(31,41,55,0.95); color: #e5e7eb; border-color: rgba(255,255,255,0.12); }
body.dark .contact-form input::placeholder, body.dark .contact-form textarea::placeholder { color: #9ca3af; }

/* Contact info text clarity */
.contact-item span { color: var(--text); }
body.dark .contact-item i { color: #a5b4fc; }

/* Make background static - disable animations */
.mesh-bg { animation: none !important; }
.blob { animation: none !important; }
.aurora::before, .aurora::after { animation: none !important; }
#particles { display: none !important; }

/* Subtle lighting gradient animation on hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: heroGradient 18s ease-in-out infinite;
}

/* Soft moving light sweep overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 80% at 20% 20%, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.0) 60%),
                radial-gradient(50% 70% at 80% 40%, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.0) 60%);
    pointer-events: none;
    animation: heroLight 24s linear infinite;
}

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

@keyframes heroLight {
    0%   { transform: translateX(-2%) translateY(0%); opacity: 0.7; }
    50%  { transform: translateX(2%) translateY(-1%); opacity: 0.9; }
    100% { transform: translateX(-2%) translateY(0%); opacity: 0.7; }
}

/* Neon-style animated background similar to the reference image */
.neon-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    z-index: -2;
    animation: neonPulse 8s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% { 
        opacity: 0.8;
        filter: hue-rotate(0deg) brightness(1);
    }
    50% { 
        opacity: 1;
        filter: hue-rotate(20deg) brightness(1.1);
    }
}

/* Neon animated grid pattern */
.neon-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
    opacity: 0.3;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Neon glow effects for programming language items */
/* Base neon glow styles */
.skill-item.neon-glow {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 
        0 0 10px rgba(99, 102, 241, 0.3),
        inset 0 0 10px rgba(99, 102, 241, 0.1);
    animation: neonFlicker 3s ease-in-out infinite;
    position: relative;
    overflow: visible;
}

/* Different animation style classes */
.skill-item.neon-wave {
    animation: neonWave 2s ease-in-out infinite;
}

.skill-item.neon-breathe {
    animation: neonBreathe 4s ease-in-out infinite;
}

.skill-item.neon-spark {
    animation: neonSpark 1.5s ease-in-out infinite;
}

.skill-item.neon-morph {
    animation: neonMorph 3s ease-in-out infinite;
}

.skill-item.neon-glitch {
    animation: neonGlitch 2s ease-in-out infinite;
}

.skill-item.neon-float {
    animation: neonFloat 3s ease-in-out infinite;
}

.skill-item.neon-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(99, 102, 241, 0.4), 
        rgba(139, 92, 246, 0.4), 
        rgba(245, 158, 11, 0.4), 
        rgba(99, 102, 241, 0.4));
    border-radius: 12px;
    z-index: -1;
    animation: neonRotate 4s linear infinite;
    opacity: 0.6;
}

@keyframes neonFlicker {
    0%, 100% { 
        box-shadow: 
            0 0 10px rgba(99, 102, 241, 0.3),
            inset 0 0 10px rgba(99, 102, 241, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 20px rgba(99, 102, 241, 0.6),
            0 0 30px rgba(139, 92, 246, 0.4),
            inset 0 0 15px rgba(99, 102, 241, 0.2);
    }
}

/* Multiple animation styles for neon effects */

/* 1. Rotating gradient border */
@keyframes neonRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 2. Pulsing wave effect */
@keyframes neonWave {
    0%, 100% { 
        transform: scale(1) translateY(0);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.05) translateY(-2px);
        opacity: 1;
    }
}

/* 3. Breathing glow effect */
@keyframes neonBreathe {
    0%, 100% { 
        box-shadow: 
            0 0 10px rgba(99, 102, 241, 0.3),
            inset 0 0 10px rgba(99, 102, 241, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 25px rgba(99, 102, 241, 0.6),
            0 0 35px rgba(139, 92, 246, 0.4),
            inset 0 0 15px rgba(99, 102, 241, 0.2);
    }
}

/* 4. Sliding light effect */
@keyframes neonSlide {
    0% { 
        background-position: -100% 0;
        opacity: 0;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        background-position: 100% 0;
        opacity: 0;
    }
}

/* 5. Matrix-style digital rain */
@keyframes neonMatrix {
    0% { 
        transform: translateY(-100%);
        opacity: 0;
    }
    10% { 
        opacity: 1;
    }
    90% { 
        opacity: 1;
    }
    100% { 
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* 6. Electric spark effect */
@keyframes neonSpark {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    25% { 
        transform: scale(1.1) rotate(1deg);
        filter: brightness(1.5);
    }
    75% { 
        transform: scale(0.95) rotate(-1deg);
        filter: brightness(0.8);
    }
}

/* 7. Morphing shape animation */
@keyframes neonMorph {
    0% { 
        border-radius: 10px;
        transform: scale(1);
    }
    25% { 
        border-radius: 20px;
        transform: scale(1.02);
    }
    50% { 
        border-radius: 15px;
        transform: scale(1.05);
    }
    75% { 
        border-radius: 25px;
        transform: scale(1.02);
    }
    100% { 
        border-radius: 10px;
        transform: scale(1);
    }
}

/* 8. Glitch effect */
@keyframes neonGlitch {
    0%, 100% { 
        transform: translateX(0);
        filter: hue-rotate(0deg);
    }
    10% { 
        transform: translateX(-2px);
        filter: hue-rotate(90deg);
    }
    20% { 
        transform: translateX(2px);
        filter: hue-rotate(180deg);
    }
    30% { 
        transform: translateX(-1px);
        filter: hue-rotate(270deg);
    }
    40% { 
        transform: translateX(1px);
        filter: hue-rotate(360deg);
    }
}

/* 9. Floating particles */
@keyframes neonFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    50% { 
        transform: translateY(-10px) rotate(180deg);
        opacity: 1;
    }
}

/* 10. Neon scan line effect */
@keyframes neonScan {
    0% { 
        transform: translateY(-100%);
        opacity: 0;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        transform: translateY(100%);
        opacity: 0;
    }
}

.skill-item.neon-glow:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 
        0 0 25px rgba(99, 102, 241, 0.8),
        0 0 35px rgba(139, 92, 246, 0.6),
        inset 0 0 20px rgba(99, 102, 241, 0.3);
    transform: translateX(10px) scale(1.05) translateZ(0);
}

.skill-item.neon-glow i {
    color: #6366f1;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 20px rgba(99, 102, 241, 1),
                     0 0 30px rgba(139, 92, 246, 0.6);
        transform: scale(1.1);
    }
}

.skill-item.neon-glow span {
    color: #1f2937;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(99, 102, 241, 0.5);
}

/* Consistent neon colors using portfolio color scheme */
.skill-item.neon-glow i { 
    color: #6366f1; 
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}

.skill-item.neon-glow::before { 
    background: linear-gradient(45deg, 
        rgba(99, 102, 241, 0.4), 
        rgba(139, 92, 246, 0.4), 
        rgba(245, 158, 11, 0.3), 
        rgba(99, 102, 241, 0.4));
}

.skill-item.neon-glow { 
    border-color: rgba(99, 102, 241, 0.3); 
}

/* Hover state with consistent colors */
.skill-item.neon-glow:hover i {
    color: #4f46e5;
    text-shadow: 0 0 20px rgba(99, 102, 241, 1),
                 0 0 30px rgba(139, 92, 246, 0.6);
}

.skill-item.neon-glow:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 
        0 0 25px rgba(99, 102, 241, 0.8),
        0 0 35px rgba(139, 92, 246, 0.6),
        inset 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Dark mode neon effects */
body.dark .neon-bg {
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
        linear-gradient(135deg, #0b1020 0%, #0e1326 100%);
}

body.dark .neon-grid {
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.15) 1px, transparent 1px);
    opacity: 0.4;
}

body.dark .skill-item.neon-glow {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

body.dark .skill-item.neon-glow span {
    color: #e5e7eb;
}

/* Add neon background to body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    z-index: -3;
    animation: neonPulse 8s ease-in-out infinite;
}

body.dark::before {
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
        linear-gradient(135deg, #0b1020 0%, #0e1326 100%);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    animation: gridMove 20s linear infinite;
    opacity: 0.3;
}

body.dark::after {
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.15) 1px, transparent 1px);
    opacity: 0.4;
}

@media (prefers-reduced-motion: reduce) {
    .hero { animation: none; }
    .hero::before { animation: none; }
    .neon-bg, .neon-grid, .skill-item.neon-glow, .skill-item.neon-glow::before, .skill-item.neon-glow i, body::before, body::after { animation: none !important; }
}
