html {
    scroll-behavior: smooth;
}

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

/* Remove focus/outline styles on sections to prevent border on navigation */
section, .hero, .about, .education, .internship, .skills, .projects, .contact, footer {
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

section:focus,
section:target,
.hero:focus,
.about:focus,
.education:focus,
.internship:focus,
.skills:focus,
.projects:focus,
.contact:focus,
section:has(:target) {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Make sections non-focusable to prevent focus rings */
#home, #about, #education, #internship, #skills, #projects, #contact {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* Remove any focus ring from sections in all browsers */
section:-webkit-focus-ring,
section:focus-visible,
section::-moz-focus-inner {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

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

.btn-secondary:hover {
    background: #3498db;
    color: white;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

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

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #3498db;
}

.theme-toggle:hover {
    color: #3498db;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

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

/* Nav Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 990; /* Below navbar (1000) */
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

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

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    text-align: center;
}

.profile-placeholder {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.profile-placeholder i {
    font-size: 8rem;
    opacity: 0.8;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 50%;
    display: block;
}

.highlight {
    color: #FFD700;
}



/* About Section */
.about {
    padding: 80px 0;
    background: #f8f9fa;
}

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

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #666;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat h3 {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #666;
    font-weight: 500;
}

.about-image {
    text-align: center;
}

.about-placeholder {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

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

/* Education Section */
.education {
    padding: 80px 0;
    background: #f8f9fa;
}

.education-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.education-item {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 600px;
    width: 100%;
    transition: transform 0.3s ease;
}

.education-item:hover {
    transform: translateY(-5px);
}

.education-icon {
    font-size: 4rem;
    color: #3498db;
    flex-shrink: 0;
}

.education-details {
    text-align: center;
}

.education-details h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.education-details p {
    color: #666;
    margin-bottom: 0.5rem;
}

.education-description {
    font-weight: 500;
    color: #3498db;
}

/* Internship Section */
.internship {
    padding: 80px 0;
}

.internship-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.internship-item {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
    gap: 1rem;
    width: 100%;
    transition: transform 0.3s ease;
}

.internship-item:hover {
    transform: translateY(-5px);
}

.internship-icon {
    font-size: 3rem;
    color: #3498db;
    align-self: flex-start;
}

.internship-details {
    flex: 1;
}

.internship-details h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.internship-company {
    font-weight: 600;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.internship-duration {
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.internship-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.internship-projects {
    list-style: none;
    padding: 0;
    margin: 0;
}

.internship-projects li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.internship-projects li::before {
    content: '•';
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.internship-projects strong {
    color: #2c3e50;
}

.internship-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.internship-link {
    text-decoration: none;
    color: #3498db;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.internship-link:hover {
    color: #2980b9;
}

/* Skills Section */
.skills {
    padding: 80px 0;
}

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

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-item {
    background: #f8f9fa;
    color: #3498db;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

/* Projects Section */
.projects {
    padding: 80px 0;
    background: #f8f9fa;
}

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

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    animation: float 1s ease-in-out;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-image {
    height: 200px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

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

.ai-assistant-image {
    position: relative;
    background: linear-gradient(45deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}



.ai-assistant-image::after {
    content: 'AI Virtual Assistant';
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 1;
}

.prediction-image {
    position: relative;
    height: 200px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.prediction-image::before {
    content: 'Age: 20-25 | Gender: Female';
    position: absolute;
    bottom: 10%;
    right: 10%;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
    z-index: 11;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.project-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

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

.project-tech span {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.project-link {
    text-decoration: none;
    color: #3498db;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #2980b9;
}

/* Contact Section */
.contact {
    padding: 80px 0;
}

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

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.contact-info p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #666;
    min-width: 0;
}

.contact-item i {
    color: #3498db;
    width: 20px;
    flex-shrink: 0;
}

.contact-item span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

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

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

.social-link:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

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

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.footer-social-link {
    color: #bdc3c7;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    color: #3498db;
    transform: translateY(-3px);
}

/* Scroll Animation Classes - Optimized for smooth performance */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.slide-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.slide-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

.stagger-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.stagger-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Performance optimization */
.fade-in.animate, .slide-in-left.animate, .slide-in-right.animate,
.scale-in.animate, .stagger-animation.animate {
    will-change: auto;
}

/* Laptop hover optimizations - transform only */
.project-card:hover,
.education-item:hover,
.internship-item:hover {
    transform: translateY(-8px) !important;
}

/* Reduced motion support removed to allow continuous mobile animations */

/* Form Message Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Float Animation for Project Cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Dark Theme */
body.dark-theme {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-theme .section-title {
    color: #f5f5f5;
}

body.dark-theme .navbar {
    background: rgba(18, 18, 18, 0.95);
}

body.dark-theme .nav-logo,
body.dark-theme .theme-toggle {
    color: #f5f5f5;
}

body.dark-theme .nav-menu a {
    color: #e0e0e0;
}

body.dark-theme .nav-menu a:hover,
body.dark-theme .theme-toggle:hover {
    color: #3498db;
}

body.dark-theme .hamburger .bar {
    background: #e0e0e0;
}

body.dark-theme .about,
body.dark-theme .education,
body.dark-theme .projects {
    background: #1a1a1a;
}

body.dark-theme .about-text p,
body.dark-theme .stat p,
body.dark-theme .education-details p,
body.dark-theme .internship-duration,
body.dark-theme .internship-description,
body.dark-theme .internship-projects li,
body.dark-theme .project-content p,
body.dark-theme .contact-info p,
body.dark-theme .contact-item {
    color: #b3b3b3;
}

body.dark-theme .education-item,
body.dark-theme .internship-item,
body.dark-theme .project-card {
    background: #242424;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
    transition-property: transform, box-shadow;
    transition-duration: 0.3s, 0.3s;
    transition-timing-function: ease;
}

body.dark-theme .education-item:hover,
body.dark-theme .internship-item:hover,
body.dark-theme .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(52, 152, 219, 0.15);
}

body.dark-theme .education-details h3,
body.dark-theme .internship-details h3,
body.dark-theme .internship-projects strong,
body.dark-theme .skill-category h3,
body.dark-theme .project-content h3,
body.dark-theme .contact-info h3 {
    color: #f5f5f5;
}

body.dark-theme .skill-item {
    background: #2a2a2a;
    border-color: #333;
    color: #3498db;
}

body.dark-theme .project-tech span {
    background: #2a2a2a;
    color: #e0e0e0;
}

body.dark-theme .social-link {
    background: #2a2a2a;
}

body.dark-theme .contact-form input,
body.dark-theme .contact-form textarea {
    background: #242424;
    border-color: #333;
    color: #e0e0e0;
}

body.dark-theme .nav-menu.active {
    background: rgba(24, 24, 24, 0.98);
}

body.dark-theme .footer {
    background: #0f0f0f;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Prevent all horizontal shifting on mobile by converting slide-in to vertical fade */
    .slide-in-left, .slide-in-right {
        transform: translateY(30px) !important;
    }
    .slide-in-left.animate, .slide-in-right.animate {
        transform: translateY(0) !important;
    }

    /* Remove all borders, outlines and shadows from sections on mobile */
    section,
    .hero,
    .about,
    .education,
    .internship,
    .skills,
    .projects,
    .contact,
    footer,
    .education-item,
    .internship-item,
    .project-card {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    /* Also remove from dark theme elements on mobile */
    body.dark-theme .education-item,
    body.dark-theme .internship-item,
    body.dark-theme .project-card {
        border: none !important;
        box-shadow: none !important;
    }

    body.dark-theme .education-item:hover,
    body.dark-theme .internship-item:hover,
    body.dark-theme .project-card:hover {
        box-shadow: none !important;
    }

    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Mobile menu open state */
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        right: 0;
        background: rgba(255,255,255,0.98);
        padding: 1rem 1.25rem;
        border-radius: 8px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
        gap: 1rem;
        z-index: 1100;
        min-width: 180px;
        max-width: calc(100vw - 40px);
        border: none;
    }

    .nav-menu.active a {
        color: #2c3e50;
    }

    .hamburger.open .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .hamburger.open .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

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

    .hero-content,
    .hero-image,
    .about-text,
    .about-image,
    .contact-info,
    .contact-form {
        min-width: 0;
    }

    .internship-content {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }

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

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

    .profile-placeholder,
    .about-placeholder {
        width: 250px;
        height: 250px;
    }

    .profile-placeholder i,
    .about-placeholder i {
        font-size: 6rem;
    }
}

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

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

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

    .footer-content {
        gap: 1rem;
    }
}
