:root {
    --primary: #8A2BE2;
    --secondary: #9370DB;
    --accent: #DA70D6;
    --success: #9b5fe0;
    --error: #ff6b6b;
    
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #333;
    --text-secondary: #6c757d;
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-sticky-bg: rgba(255, 255, 255, 0.98);
    --card-bg: #ffffff;
    --border-color: #eee;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --home-bg: linear-gradient(135deg, #f5f7fa 0%, #d8bfd8 100%);
}

[data-theme="dark"] {
    --bg-primary: #1a1029;
    --bg-secondary: #2d1b4e;
    --text-primary: #f8f9ff;
    --text-secondary: #d9cfff;
    --header-bg: rgba(45, 27, 78, 0.95);
    --header-sticky-bg: rgba(45, 27, 78, 0.98);
    --card-bg: #3b2a5c;
    --border-color: #7d5fd3;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --home-bg: linear-gradient(135deg, #2d1b4e 0%, #4a2c8d 100%);
    --error: #ff6b6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ORIGINAL CURSOR - The one you love! */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease-out;
    opacity: 0.5;
}

/* Doodle elements - ONLY IN HOME SECTION */
.doodle {
    position: absolute; /* Changed from fixed to absolute */
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.doodle-1 {
    width: 60px;
    height: 60px;
    border: 3px dashed var(--primary);
    border-radius: 50%;
    top: 20%;
    left: 5%;
    animation: float 8s ease-in-out infinite;
}

.doodle-2 {
    width: 40px;
    height: 40px;
    background-color: var(--accent);
    transform: rotate(45deg);
    top: 70%;
    right: 10%;
    animation: float 6s ease-in-out infinite reverse;
}

.doodle-3 {
    width: 80px;
    height: 30px;
    border: 2px dotted var(--secondary);
    border-radius: 10px;
    bottom: 20%;
    left: 15%;
    animation: float 10s ease-in-out infinite;
}

.doodle-4 {
    width: 50px;
    height: 50px;
    border: 3px solid var(--primary);
    border-radius: 5px;
    top: 40%;
    right: 5%;
    transform: rotate(15deg);
    animation: float 7s ease-in-out infinite reverse;
}

.doodle-5 {
    width: 70px;
    height: 70px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    top: 60%;
    left: 8%;
    animation: float 9s ease-in-out infinite;
}

.doodle-6 {
    width: 45px;
    height: 45px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    transform: rotate(30deg);
    bottom: 30%;
    right: 8%;
    animation: float 11s ease-in-out infinite reverse;
}

/* Enhanced 3D Effect for Profile Image */
.profile-img-container {
    position: relative;
    perspective: 1200px;
}

.profile-img {
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(138, 43, 226, 0.1);
    animation: float 6s ease-in-out infinite;
    border: 3px solid transparent;
    background: linear-gradient(45deg, var(--primary), var(--secondary)) border-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) padding-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.profile-img:hover {
    transform: 
        rotateY(15deg) 
        rotateX(10deg) 
        scale(1.08)
        translateZ(20px);
    animation-play-state: paused;
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(138, 43, 226, 0.2),
        0 0 30px rgba(138, 43, 226, 0.1);
}

/* Enhanced 3D Card Effects */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(138, 43, 226, 0.1) 0%, 
        rgba(147, 112, 219, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.card-3d:hover {
    transform: 
        translateY(-8px) 
        rotateX(5deg) 
        rotateY(2deg)
        translateZ(10px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 15px 35px rgba(138, 43, 226, 0.1);
}

.card-3d:hover::before {
    opacity: 1;
}

/* Fix for project buttons - they should NOT have 3D effect */
.project-demo button {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(142, 45, 226, 0.3);
    position: relative;
    overflow: hidden;
    transform: none !important;
}

.project-demo button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 18px rgba(142, 45, 226, 0.4);
}

.project-demo button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

.project-demo button:hover:before {
    left: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: none;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    color: var(--primary);
    transform: rotate(30deg);
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

header.sticky {
    padding: 0.7rem 5%;
    background: var(--header-sticky-bg);
}

.header-container {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
}

.social-links a {
    margin-right: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.menu-toggle {
    display: none;
    cursor: none;
    font-size: 1.6rem;
    color: var(--text-primary);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 999;
    transition: all 0.5s ease;
    padding: 80px 20px 20px;
}

.nav.active {
    right: 0;
}

.nav ul {
    list-style: none;
}

.nav ul li {
    margin-bottom: 1.2rem;
}

.nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
}

.nav ul li a:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav ul li a:hover {
    color: var(--accent);
    padding-left: 10px;
}

.nav ul li a:hover:before {
    width: 100%;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-primary);
    font-size: 1.6rem;
    cursor: none;
}

/* Section Common Styles */
section {
    padding: 4.5rem 5%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative;
    overflow: hidden;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    position: relative;
    color: var(--text-primary);
}

section h2:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* Home Section */
.home {
    background: var(--home-bg);
    position: relative; /* Added for doodle containment */
    overflow: hidden;
    padding: 6rem 5% 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 1;
    transform: none;
}

.home:before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(138, 43, 226, 0.1), transparent);
    transform: rotate(-45deg);
    animation: shimmer 8s infinite linear;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(-45deg); }
    100% { transform: translateX(100%) rotate(-45deg); }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.home-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.intro {
    flex: 1;
    padding-right: 2rem;
}

.intro h2 {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.intro h1 {
    font-size: 3rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intro h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
}

.home p {
    font-size: 1rem;
    margin-top: 1.2rem;
    max-width: 500px;
    line-height: 1.7;
    color: var(--text-primary);
}

.profile-img-container {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-img {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
}

/* About Section */
.about {
    background-color: var(--bg-secondary);
}

.about p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    max-width: 800px;
    color: var(--text-primary);
}

/* Resume Section */
.resume-section {
    background: linear-gradient(to right, var(--bg-secondary), var(--bg-primary));
    text-align: left;
}

.resume-section p {
    margin-bottom: 1.8rem;
    max-width: 600px;
    color: var(--text-primary);
}

/* Education Section */
.education {
    background-color: var(--bg-secondary);
}

.education ul {
    list-style: none;
}

.education ul li {
    background: var(--card-bg);
    padding: 1.3rem;
    margin-bottom: 1.3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.3s ease;
}

.education ul li.visible {
    opacity: 1;
    transform: translateY(0);
}

.education ul li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

/* Skills Section */
.skills {
    background: linear-gradient(to right, var(--bg-secondary), var(--bg-primary));
}

.skills ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.3rem;
    position: relative;
}

.skills ul li {
    background: var(--card-bg);
    padding: 1.3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.3s ease;
}

.skills ul li.visible {
    opacity: 1;
    transform: translateY(0);
}

.skills ul li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

/* Internships Section */
.internships {
    background-color: var(--bg-secondary);
}

.internships h3 {
    margin-top: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.internships p {
    margin-bottom: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
}

/* Projects Section */
#projects {
    background: linear-gradient(to right, var(--bg-secondary), var(--bg-primary));
}

#projects ul {
    list-style: none;
}

#projects ul li {
    background: var(--card-bg);
    padding: 1.8rem;
    margin-bottom: 1.8rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.3s ease;
}

#projects ul li.visible {
    opacity: 1;
    transform: translateY(0);
}

#projects ul li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.project-demo {
    margin-top: 0.9rem;
    display: flex;
    gap: 0.9rem;
}

/* Certifications & Achievements */
.certifications, .achievements {
    background-color: var(--bg-secondary);
}

.certifications ul, .achievements ul {
    list-style: none;
}

.certifications ul li, .achievements ul li {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.certifications ul li.visible, .achievements ul li.visible {
    opacity: 1;
    transform: translateY(0);
}

.certifications ul li:before, .achievements ul li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    text-align: center;
}

.contact h2:after {
    left: 50%;
    transform: translateX(-50%);
    background: white;
}

.contact ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.3rem;
    margin-top: 1.8rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.contact ul li {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.3rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease, background 0.3s ease;
}

.contact ul li.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact ul li:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
}

.contact a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact a:hover {
    color: var(--accent);
}

/* Contact Form */
.contact-form {
    margin-top: 2.5rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(6px);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s ease, background 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

.contact-form h3 {
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.contact-form label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    resize: none;
    transition: background 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    background: rgba(255, 255, 255, 0.25);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
}

.contact-form button {
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: var(--accent, #ffb703);
    color: #000;
    font-weight: 600;
    cursor: none;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 1rem;
}

.contact-form button:hover {
    background: #fff;
    transform: translateY(-2px);
}

.contact-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.contact-form button:disabled:hover {
    transform: none;
    background: var(--accent, #ffb703);
}

.form-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-status.processing {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.form-status.success {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.form-status.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}
@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Thanks Section */
.thanks {
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-align: center;
}

.thanks h2:after {
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-align: center;
    padding: 1.5rem;
}

/* Hover effects for custom cursor */
a:hover ~ .cursor-dot,
button:hover ~ .cursor-dot {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: var(--accent);
}

a:hover ~ .cursor-outline,
button:hover ~ .cursor-outline {
    transform: translate(-50%, -50%) scale(1.2);
    border-color: var(--accent);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 992px) {
    .home-container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .intro {
        padding-right: 0;
        margin-top: 1.8rem;
    }

    .intro h2 {
        font-size: 1.4rem;
    }

    .intro h1 {
        font-size: 2.5rem;
    }

    .profile-img {
        width: 220px;
        height: 220px;
    }

    .menu-toggle {
        display: block;
    }

    .social-links {
        display: none;
    }
    
    /* Show default cursor on mobile */
    * {
        cursor: auto;
    }
    
    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    .contact ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .doodle {
        display: none;
    }
}

@media (max-width: 768px) {
    section {
        padding: 3.5rem 5%;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .intro h1 {
        font-size: 2rem;
    }

    .profile-img {
        width: 180px;
        height: 180px;
    }

    .project-demo {
        flex-direction: column;
    }
    
    .home {
        padding: 5rem 5% 3rem;
    }
    
    .theme-toggle {
        margin-right: 0.5rem;
        font-size: 1.2rem;
    }

    .contact ul {
        grid-template-columns: 1fr;
    }
}