:root {
    --primary: #2563eb;
    --secondary: #3b82f6;
    --background: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --card: #ffffff;
    --border: #e5e7eb;
    --accent: #dbeafe;
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --secondary: #60a5fa;
    --background: #0f172a;
    --text: #f3f4f6;
    --text-light: #9ca3af;
    --card: #1e293b;
    --border: #334155;
    --accent: #1e3a8a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}

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

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: var(--accent);
    color: var(--primary);
}

/* About Section */
.about {
    padding: 4rem 2rem;
    background: var(--card);
    border-radius: 20px;
    margin: 4rem auto;
    max-width: 1000px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.about-text {
    padding: 2rem;
    background: var(--background);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2rem;
}

.education {
    margin-top: 2rem;
}

.education-item {
    padding: 1.5rem;
    margin: 1rem 0;
    background: var(--accent);
    border-radius: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.education-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.education-item h4 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.education-item p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: var(--text);
}

.courses {
    color: var(--text-light);
    font-style: italic;
    padding: 0.5rem 0;
}
.about-text span {
    display: inline-block;
    padding: 0.4rem 1rem;
    margin: 0.3rem;
    background: var(--accent);
    border-radius: 20px;
    font-size: 1rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.about-text span:hover {
    transform: translateY(-3px);
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.education-item span {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--background);
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--text);
    margin: 0.2rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.education-item span:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.key-courses {
    margin-top: 0.5rem;
}

.key-courses span {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    margin: 0.2rem;
    background: var(--accent);
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.key-courses span:hover {
    transform: scale(1.05);
    background: var(--primary);
    color: white;
}
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 2rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.stat-item:hover::before {
    transform: translateX(100%);
}

.stat-item .count {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-item span:last-child {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    display: block;
    font-weight: 500;
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-item .count {
        font-size: 2rem;
    }
}


/* Theme Toggle Button */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    margin-left: 2rem;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

.theme-toggle i {
    font-size: 1.8rem;
    color: var(--primary);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

.theme-toggle:hover i {
    transform: rotate(360deg);
}

[data-theme="dark"] .theme-toggle {
    background: var(--accent);
}

[data-theme="dark"] .theme-toggle i {
    color: var(--primary);
}

/* Smooth Theme Transition */
body {
    transition: background-color 0.5s ease,
                color 0.5s ease;
}

* {
    transition: background-color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.navbar {
    transition: background-color 0.5s ease,
                backdrop-filter 0.5s ease;
}


/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    margin-top: -80px;
}

.hero-content {
    max-width: 800px;
    text-align: center;
}

.glitch {
    font-size: 4.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 3px 3px 0px var(--accent);
}

.typing-text {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    height: 2.5rem;
    color: var(--accent);
}

.hero-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.hero-links .social-link {
    text-decoration: none;
    font-size: 2.5rem;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--accent);
}

.hero-links .social-link:hover {
    transform: translateY(-5px);
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero-links .social-link i {
    transition: transform 0.3s ease;
}

.hero-links .social-link:hover i {
    transform: scale(1.1);
}


/* Projects Section */
.projects {
    max-width: 1000px;
    margin: 6rem auto;
    padding: 2rem;
}

.project-card {
    background: var(--card);
    border-radius: 20px;
    margin-bottom: 3rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-content {
    padding: 2.5rem;
}

.project-content h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin: 1rem 0;
    background: var(--accent);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateX(10px);
    background: var(--accent);
}

.feature-item i {
    color: var(--primary);
    font-size: 1.2rem;
    padding: 0.8rem;
    background: var(--background);
    border-radius: 50%;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.tech-stack span {
    background: var(--accent);
    color: var(--text);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tech-stack span:hover {
    transform: translateY(-3px);
    background: var(--primary);
    color: white;
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Skills Section */
.skills {
    padding: 4rem 2rem;
    background: var(--card);
    border-radius: 20px;
    margin: 4rem auto;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.skill-category {
    background: var(--background);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.skill-category h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent);
    position: relative;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.25rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--accent);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.skill-item:hover {
    transform: translateX(10px);
    background: var(--primary);
    border-color: var(--accent);
}

.skill-item:hover i,
.skill-item:hover span {
    color: white;
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--primary);
    transition: color 0.3s ease;
}

.skill-item span {
    font-size: 1rem;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .skills {
        padding: 2rem 1rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-items {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}


.experience {
    padding: 4rem 2rem;
    background: var(--card);
    border-radius: 20px;
    margin: 2rem auto;
    max-width: 1000px;
}

.timeline-item {
    background: var(--background);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--primary);
}

.company-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
}

.company-header h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.company-header h4 {
    color: var(--text);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.date {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--accent);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text);
}

.achievements {
    display: grid;
    gap: 1.5rem;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--card);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.achievement-item:hover {
    transform: translateX(10px);
}

.achievement-item i {
    color: var(--primary);
    font-size: 1.2rem;
    padding: 0.8rem;
    background: var(--accent);
    border-radius: 50%;
}

.achievement-item p {
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .experience {
        padding: 2rem 1rem;
    }
    
    .timeline-item {
        padding: 1.5rem;
    }
    
    .achievement-item {
        flex-direction: column;
        align-items: flex-start;
    }
}




/* Get in Touch Section */
.contact {
    background: var(--primary);
    padding: 4rem 2rem;
    margin-top: 4rem;
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0% 100%);
    color: white;
}

.contact .section-title {
    color: white;
    text-align: center;
    margin-bottom: 3rem;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

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

.contact-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    width: 250px;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
}

.contact-item i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

/* Footer */
footer {
    background: var(--card);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        transparent
    );
}

footer p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact {
        clip-path: polygon(0 5%, 100% 0, 100% 100%, 0% 100%);
        padding: 3rem 1rem;
    }
    
    .contact-item {
        width: 90%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact {
        padding: 3rem 1rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .contact-item i {
        font-size: 1.25rem;
        width: 35px;
        height: 35px;
    }
    
    .contact-item span {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .contact-item i {
        margin-right: 0;
    }
}


/* Animations */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

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

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .timeline::before {
        left: 0;
    }
    
    .timeline-content {
        margin-left: 2rem;
        width: calc(100% - 2rem);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}
/* Add loading optimization */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Improve animations */
.project-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add container queries for better responsiveness */
@container (min-width: 700px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
