:root {
    /* Dark Theme (Default) */
    --primary-color: #0f172a;
    --secondary-color: #818cf8;
    --accent-color: #c084fc;
    --background-color: #050b14;
    --card-bg: rgba(30, 41, 59, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-glow: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    --shadow-main: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --neon-glow: 0 0 10px rgba(99, 102, 241, 0.5), 0 0 20px rgba(99, 102, 241, 0.3);
    --input-bg: rgba(5, 11, 20, 0.4);
    --input-border: rgba(255, 255, 255, 0.05);
    --text-gradient: linear-gradient(to right, #fff, #94a3b8);
    --placeholder-color: rgba(255, 255, 255, 0.3);
}

/* Light Theme Variables */
[data-theme="light"] {
    --primary-color: #ffffff;
    --secondary-color: #4f46e5;
    --accent-color: #7c3aed;
    --background-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --gradient-main: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --shadow-main: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --neon-glow: 0 0 10px rgba(79, 70, 229, 0.3);
    --input-bg: rgba(255, 255, 255, 0.6);
    --input-border: rgba(0, 0, 0, 0.1);
    --text-gradient: linear-gradient(to right, #1e293b, #475569);
    --placeholder-color: rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08) 0%, transparent 25%);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Switcher Styles */
.theme-switch-wrapper {
    position: relative;
    display: inline-block;
}

#theme-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle-btn:hover {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.05);
}

.theme-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--background-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 120px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1001;
}

.theme-dropdown.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.theme-dropdown button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.theme-dropdown button:hover,
.theme-dropdown button.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--secondary-color);
}

[data-theme="light"] .theme-dropdown {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] #theme-toggle-btn {
    border-color: rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

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

/* Particle Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav-container {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--input-border);
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient-main);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 2rem;
    position: relative;
}

/* Glow effect behind hero */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.profile-img-container {
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    animation: float 6s ease-in-out infinite;
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--text-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; 
}

.glitch {
    position: relative;
}

.typewriter {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.hero-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.2rem;
    font-weight: 300;
}

.social-links {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.social-links a:hover {
    color: #fff;
    transform: translateY(-5px) scale(1.1);
    background: var(--gradient-main);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.5);
}

.btn-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary-color);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* Sections Global */
.section {
    padding: 8rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 5rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    width: 100%;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-main);
    margin: 20px auto 0;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* About Section */
.about-content {
    background: var(--card-bg);
    padding: 4rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.15rem;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.info-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
     justify-content: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.info-item i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

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

.skill-category {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.skill-category:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(99, 102, 241, 0.05);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.skill-category h3 i {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
    border-color: transparent;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--secondary-color), transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 20px 50px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

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

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

.timeline-item::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--background-color);
    border: 4px solid var(--secondary-color);
    top: 24px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    transition: all 0.3s ease;
}

.timeline-item:hover::after {
    background: var(--secondary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
}

.timeline-item:nth-child(even)::after {
    left: -12px;
}

.timeline-item:nth-child(odd)::after {
    right: -12px;
}

.timeline-content {
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-align: left;
}

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

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.date {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.15);
    color: var(--secondary-color);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.timeline-content h3 {
    margin-bottom: 0.3rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.timeline-content h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 1rem;
}

.timeline-content ul {
    list-style-position: inside;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-content ul li {
    margin-bottom: 0.6rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    height: 100%;
    backdrop-filter: blur(10px);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(99, 102, 241, 0.4);
}

.project-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    font-size: 0.85rem;
    color: var(--secondary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* Contact Section - Attractive & Active */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 4rem;
    border-radius: 24px;
    position: relative;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Gradient Border Effect */
.contact-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-main);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.contact-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.2);
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: var(--input-bg);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
    transform: scale(1.02);
}

/* Floating label effect using placeholder workaround or just styling */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--placeholder-color);
    transition: all 0.3s ease;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    opacity: 0.5;
    transform: translateX(10px);
}

/* Footer */
footer {
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
}

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

.footer-socials a {
    color: var(--text-secondary);
    font-size: 1.4rem;
    margin: 0;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.footer-socials a:hover {
    color: #fff;
    background: var(--gradient-main);
    transform: translateY(-3px);
}

/* Responsive */
@media screen and (max-width: 900px) {
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        left: 0 !important;
    }

    .timeline-item::after {
        left: 17px !important;
    }

    .timeline-item:nth-child(even)::after,
    .timeline-item:nth-child(odd)::after {
        left: 17px !important;
        right: auto !important;
    }
    
    .timeline-content {
        text-align: left !important;
    }
}

@media screen and (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--card-bg);
        padding: 2rem;
        border-bottom: 2px solid var(--secondary-color);
        backdrop-filter: blur(25px);
        gap: 1.5rem;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
        z-index: 1100;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        font-size: 1.1rem;
        display: block;
        text-align: center;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .section-title {
        font-size: 2.2rem;
    }
    
    .about-content,
    .contact-content {
        padding: 2rem;
    }
}