:root {
    --bg: #0f0f0f;
    --text: #e0e0e0;
    --accent: #00ffff;
    --card: rgba(255, 255, 255, 0.05);
    --border: rgba(0, 255, 255, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.logo span { color: var(--accent); }
.nav-link {
    color: white;
    text-decoration: none;
    margin: 0 20px;
    font-weight: 500;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: 0.4s;
}
.nav-link:hover::after { width: 100%; }

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    transition: 0.4s;
}
.theme-toggle:hover { transform: rotate(360deg); }

/* HERO SECTION - UPDATED */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    gap: 4rem;
    background: var(--bg);
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.hero-left {
    flex: 1;
    min-width: 300px;
}

.hero-left h3 {
    color: var(--accent);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.hero-left h1 {
    font-size: 4rem;
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.about-text {
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 20px 0;
    max-width: 600px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.contact-item {
    color: #aaa;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.contact-item:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.contact-item i {
    color: var(--accent);
}

/* PROFILE PIC */
.hero-right {
    position: relative;
}

.profile-pic {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--accent);
    box-shadow: 0 0 60px rgba(0, 255, 255, 0.4);
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.glow-effect {
    position: absolute;
    inset: -20px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 4s infinite;
}

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

/* ABOUT SECTION - NEW & GORGEOUS */
.about-section {
    padding: 120px 5%;
    background: linear-gradient(135deg, #0f0f1f 0%, #1a0033 100%);
    position: relative;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 2;
    color: #ddd;
    margin-bottom: 20px;
}

.about-text strong {
    color: #00ffff;
    font-weight: 700;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 3rem;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.stat p {
    color: #aaa;
    font-size: 1rem;
    margin-top: 8px;
}

.about-image {
    position: relative;
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.about-image img {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #00ffff;
    box-shadow: 0 0 80px rgba(0, 255, 255, 0.5);
}

.image-glow {
    position: absolute;
    inset: -20px;
    border: 4px solid #00ffff;
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse 4s infinite;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-stats {
        justify-content: center;
    }
}



/* Sections */
.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Skills */
/* SKILLS SECTION */
.skills-section {
    padding: 120px 5%;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1300px;
    margin: 60px auto 0;
}

.skill-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 35px 25px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s;
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 255, 255, 0.25);
    border-color: #00ffff;
}

.skill-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.skill-card h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    border-radius: 50px;
    position: relative;
    transition: width 2s ease;
}

.percent {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: #000;
}

/* Projects */
/* PROJECTS SECTION */
.projects-section {
    padding: 120px 5%;
    background: #0a0a0a;
    text-align: center;
}

.section-title {
    font-size: 3.5rem;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.section-subtitle {
    color: #aaa;
    font-size: 1.2rem;
    margin-bottom: 60px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.project-info p {
    color: #00ffff;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-view, .btn-github {
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    font-size: 0.9rem;
}

.btn-view {
    background: #00ffff;
    color: #000;
}

.btn-view:hover {
    background: #00ff88;
    transform: translateY(-3px);
}

.btn-github {
    background: transparent;
    color: #fff;
    border: 2px solid #00ffff;
}

.btn-github:hover {
    background: #00ffff;
    color: #000;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}
.modal-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    padding: 40px;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    border: 1px solid var(--accent);
}
.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 3rem;
    color: var(--accent);
    cursor: pointer;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* FOOTER */
.footer {
    background: #0a0a0a;
    padding: 80px 5% 30px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    margin-top: 100px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.footer-left h3 {
    font-size: 2rem;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.footer-left p {
    color: #aaa;
    font-size: 1rem;
}

.footer-center h4,
.footer-right h4 {
    color: #00ffff;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-center ul {
    list-style: none;
}

.footer-center a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin: 12px 0;
    transition: 0.3s;
}

.footer-center a:hover {
    color: #00ffff;
    transform: translateX(8px);
}

.social-links {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #00ffff;
    transition: all 0.4s ease;
}

.social-links a:hover {
    background: #00ffff;
    color: #000;
    transform: translateY(-8px) rotate(360deg);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4);
}

.contact-number {
    color: #00ffff;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding: 30px 0;
    color: #666;
    font-size: 0.9rem;
}

.heart {
    color: #ff0066;
    animation: beat 1.5s infinite;
}

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

.built-with {
    margin-top: 8px;
    color: #00ffff;
    font-family: 'Courier New', monospace;
}

/* LET'S BUILD SOMETHING - FULLY WORKING */
.build-section {
    padding: 150px 5%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0033 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.build-title {
    font-size: 5.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200%;
    animation: gradientShift 6s ease infinite;
}

.magic-word {
    display: inline-block;
    transform: scale(1.2);
    color: #ff00ff;
    text-shadow: 0 0 40px #ff00ff;
    animation: pulseMagic 2s infinite;
}

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

@keyframes pulseMagic {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.35); }
}

.build-subtitle {
    font-size: 1.4rem;
    color: #ccc;
    max-width: 700px;
    margin: 0 auto 60px;
    line-height: 1.8;
}

.magnetic-area {
    perspective: 1000px;
    margin: 50px 0;
    display: inline-block;
}

.magnetic-btn {
    position: relative;
    padding: 25px 60px;
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    color: #000;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: all 0.4s ease;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.4);
    overflow: hidden;
}

.magnetic-btn:hover {
    transform: translateY(-10px) rotateX(15deg);
    box-shadow: 0 30px 60px rgba(255, 0, 255, 0.6);
}

.sparkles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.sparkle {
    position: absolute;
    width: 6px; height: 6px;
    background: white;
    border-radius: 50%;
    animation: sparkle 2s infinite;
}
.sparkle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 30%; right: 25%; animation-delay: 0.5s; }
.sparkle:nth-child(3) { bottom: 25%; left: 30%; animation-delay: 1s; }
.sparkle:nth-child(4) { bottom: 20%; right: 20%; animation-delay: 1.5s; }

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

.contact-card {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(15, 15, 35, 0.95);
    padding: 50px;
    border-radius: 30px;
    border: 2px solid #00ffff;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 100px rgba(0, 255, 255, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 500px;
    width: 90%;
}

.contact-card.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.card-glow {
    position: absolute;
    inset: -10px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border-radius: 30px;
    z-index: -1;
    animation: rotateGlow 4s linear infinite;
}

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

.contact-card h3 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.contact-options { margin: 30px 0; }
.contact-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 15px;
    margin: 15px 0;
    color: white;
    text-decoration: none;
    transition: 0.4s;
}

.contact-option:hover {
    background: #00ffff;
    color: #000;
    transform: translateX(10px);
}
.whatsapp { background: rgba(37, 211, 102, 0.2); border-color: #25d366; }

.close-card {
    background: transparent;
    color: #ff00ff;
    border: 2px solid #ff00ff;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    transition: 0.3s;
}
.close-card:hover {
    background: #ff00ff;
    color: white;
}
/* IMPROVED CHATBOT WIDGET */
.chatbot-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    font-family: 'Space Grotesk', sans-serif;
}

.chat-toggle-btn {
    background: linear-gradient(135deg, #6e07f3, #00d4ff);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 26px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(110, 7, 243, 0.35);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    touch-action: manipulation;   /* Better mobile response */
}

.chat-toggle-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(110, 7, 243, 0.45);
}

.chat-toggle-btn:active {
    transform: scale(0.95);
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 560px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-window.active {
    display: flex;
    opacity: 1;
    transform: scale(1) translateY(0);
}

.chat-header {
    background: linear-gradient(135deg, #6e07f3, #00d4ff);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.9);
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255,255,255,0.2);
}

/* Mobile Improvements */
@media (max-width: 480px) {
    .chat-window {
        width: 94vw;
        height: 82vh;
        bottom: 100px;
        right: 3vw;
        border-radius: 16px;
    }
    
    .chat-toggle-btn {
        padding: 14px 22px;
        font-size: 15px;
    }
}