/* ============================================================
   DS TUSHAR PORTFOLIO - STYLES & ANIMATIONS
   15+ Animations: Particles, Typewriter, 3D Card, Scroll Reveal,
   Float, Gradient Text, Cursor Trail, Page Transition, Skill Bar,
   Chart Anim, Button Glow, Image Reveal, Lightning Pulse,
   Testimonial Carousel, Nav Magnetic, Background Parallax
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: #161638;
    --accent: #00ff88;
    --accent-dim: #00cc6a;
    --accent-glow: rgba(0, 255, 136, 0.4);
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0c0;
    --text-muted: #6a6a8a;
    --font-main: 'Poppins', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
    --font-code: 'Fira Code', monospace;
    --font-elegant: 'Playfair Display', serif;
    --nav-height: 70px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: none;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: none; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea { font-family: inherit; }

/* ---------- Custom Cursor - Snake (Animation 7) ---------- */
.snake-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: visible;
}
.snake-segment {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent-glow);
    pointer-events: none;
    transform: translate(-50%, -50%);
}
.snake-head {
    width: 14px; height: 14px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent-glow);
    z-index: 3;
}
.snake-segment:nth-child(2) { width: 11px; height: 11px; opacity: 0.9; }
.snake-segment:nth-child(3) { width: 9px; height: 9px; opacity: 0.8; }
.snake-segment:nth-child(4) { width: 8px; height: 8px; opacity: 0.7; }
.snake-segment:nth-child(5) { width: 7px; height: 7px; opacity: 0.6; }
.snake-segment:nth-child(6) { width: 6px; height: 6px; opacity: 0.5; }
.snake-segment:nth-child(7) { width: 5px; height: 5px; opacity: 0.4; }
.snake-segment:nth-child(8) { width: 4px; height: 4px; opacity: 0.35; }
.snake-segment:nth-child(9) { width: 3px; height: 3px; opacity: 0.3; }
.snake-segment:nth-child(10) { width: 2px; height: 2px; opacity: 0.25; }
.custom-cursor { display: none; }
.cursor-trail { display: none; }

/* ---------- Particle Canvas (Animation 1) ---------- */
#particleCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- Spider Game Canvas ---------- */
#spiderCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ---------- Score Popups ---------- */
#scorePopups {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
}
.score-popup {
    position: absolute;
    color: #00ff88;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
    animation: scoreFloat 1s ease-out forwards;
    pointer-events: none;
}
@keyframes scoreFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(1.5);
    }
}

/* ---------- Score Display ---------- */
.score-display {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(22, 22, 56, 0.95);
    border: 2px solid rgba(0, 255, 136, 0.4);
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 999;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateX(0);
}
.score-display i {
    color: #fbbf24;
    font-size: 1.2rem;
    animation: trophyBounce 1s ease infinite;
}
.score-display span {
    color: #00ff88;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-heading);
    min-width: 30px;
    text-align: center;
}
@keyframes trophyBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ---------- Matrix Easter Egg ---------- */
#matrixCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9998;
    pointer-events: none;
    display: none;
}
#matrixCanvas.active { display: block; }

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    z-index: 1000;
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(10, 10, 26, 0.95);
    box-shadow: 0 4px 30px rgba(0, 255, 136, 0.1);
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
}
.logo-ds { color: var(--accent); }
.logo-tushar { color: var(--text-primary); }
.logo-dot { color: var(--accent); font-size: 2rem; line-height: 0; }

.nav-menu {
    display: flex;
    gap: 0.5rem;
}
.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.nav-link i { margin-right: 0.3rem; font-size: 0.8rem; }
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::before,
.nav-link.active::before { width: 80%; }
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link.active { background: rgba(0, 255, 136, 0.08);text-wrap:nowrap; }

/* Nav Magnetic Effect (Animation 15) - applied via JS */

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.like-btn {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    transition: var(--transition);
}
.like-btn:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}
.like-btn.liked .fa-heart { color: #ff6b6b; }
.like-btn .fa-heart { transition: transform 0.3s; }
.like-btn.liked .fa-heart { transform: scale(1.3); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}
.hamburger span {
    width: 28px; height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ---------- Pages / Sections ---------- */
.page {
    display: none;
    min-height: 100vh;
    padding: calc(var(--nav-height) + 2rem) 2rem 4rem;
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
/* Page Transition (Animation 8) */
.page.entering { animation: pageEnter 0.6s ease forwards; }
.page.leaving { animation: pageLeave 0.3s ease forwards; }
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pageLeave {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-20px) scale(0.98); }
}

.page-header { text-align: center; margin-bottom: 4rem; }
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 0.5rem;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ---------- Gradient Text (Animation 6) ---------- */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), #4ecdc4, #a855f7, #ff6b6b, var(--accent));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ---------- Hero Section ---------- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: calc(100vh - var(--nav-height) - 6rem);
}
.hero-greeting {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.hero-name {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    min-height: 1.2em;
}
/* Typewriter cursor (Animation 2) */
.hero-name::after {
    content: '|';
    color: var(--accent);
    animation: blink 0.7s step-end infinite;
    font-weight: 100;
}
.hero-name.typed::after { display: none; }
@keyframes blink {
    50% { opacity: 0; }
}

.hero-title {
    font-family: var(--font-elegant);
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.hero-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 540px;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }

/* Buttons (Animation 11 - Glow) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}
.btn-primary:hover {
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(0,255,136,0.2);
    transform: translateY(-2px);
}
.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
}
.btn-outline:hover {
    background: rgba(0,255,136,0.08);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}
.glow-btn::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.glow-btn:hover::before { width: 300px; height: 300px; }

/* Social Links */
.social-links { display: flex; gap: 1rem; }
.social-link {
    width: 45px; height: 45px;
    border: 2px solid rgba(0,255,136,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}
.social-link:hover {
    border-color: var(--accent);
    background: rgba(0,255,136,0.1);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-3px) scale(1.1);
    color: var(--accent);
}

/* ---------- 3D Profile Card (Animation 3) ---------- */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.profile-card-3d {
    position: relative;
    width: 350px; height: 430px;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
    border-radius: 20px;
}
.card-glow {
    position: absolute;
    inset: -3px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--accent), #4ecdc4, #a855f7);
    opacity: 0.6;
    filter: blur(15px);
    z-index: -1;
    animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.4; filter: blur(15px); }
    50% { opacity: 0.8; filter: blur(25px); }
}
.card-holographic {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(
        135deg,
        rgba(0,255,136,0.1) 0%,
        rgba(78,205,196,0.1) 25%,
        rgba(168,85,247,0.1) 50%,
        rgba(255,107,107,0.1) 75%,
        rgba(0,255,136,0.1) 100%
    );
    background-size: 200% 200%;
    animation: holoShift 3s ease infinite;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: overlay;
}
@keyframes holoShift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}
.profile-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 2px solid rgba(0,255,136,0.2);
    position: relative;
    z-index: 2;
}
.card-border-anim {
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                linear-gradient(135deg, var(--accent), #4ecdc4, #a855f7, #ff6b6b) border-box;
    animation: borderRotate 4s linear infinite;
    pointer-events: none;
}
@keyframes borderRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Hero Circle Animation */
.hero-circle-anim {
    position: absolute;
    width: 400px; height: 400px;
    border: 3px solid rgba(0,255,136,0.15);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spinCircle 8s linear infinite;
    pointer-events: none;
}
@keyframes spinCircle {
    to { transform: rotate(360deg); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.scroll-arrow {
    width: 20px; height: 20px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 1; }
    50% { transform: rotate(45deg) translate(5px, 5px); opacity: 0.5; }
}

/* ---------- Scroll Reveal (Animation 4) ---------- */
.reveal-text, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-text { transform: translateY(30px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal-scale { transform: scale(0.85); }
.reveal-text.visible, .reveal-left.visible, .reveal-right.visible, .reveal-scale.visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* ---------- About Section ---------- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 5rem;
}
.about-img-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}
.about-img {
    width: 100%;
    border-radius: 20px;
    transition: transform 0.5s ease;
}
.about-img:hover { transform: scale(1.03); }
/* Image Reveal (Animation 12) */
.img-reveal-overlay {
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform-origin: left;
    animation: imgReveal 1.2s ease forwards;
}
@keyframes imgReveal {
    0% { transform: scaleX(1); }
    50% { transform: scaleX(1); transform-origin: left; }
    51% { transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

.about-text h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}
.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}
.about-text strong { color: var(--accent); }
.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
.stat-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(0,255,136,0.1);
    transition: var(--transition);
}
.stat-item:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-5px);
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
}
.stat-suffix {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent);
}
.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* ---------- Timeline ---------- */
.story-timeline { margin-top: 2rem; }
.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 3rem;
}
.timeline {
    position: relative;
    padding: 2rem 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    transform: translateX(-50%);
}
.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 2rem);
    margin-bottom: 3rem;
    position: relative;
}
.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 2rem);
}
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 1rem;
    width: 16px; height: 16px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 15px var(--accent-glow);
    z-index: 2;
}
.timeline-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(0,255,136,0.1);
    max-width: 400px;
    transition: var(--transition);
}
.timeline-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}
.timeline-date {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}
.timeline-card h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin: 0.5rem 0;
}
.timeline-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---------- Skills Section ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}
.skill-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(0,255,136,0.08);
    transition: var(--transition);
}
.skill-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 25px var(--accent-glow);
    transform: translateY(-8px);
}
.skill-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.8rem;
}
.skill-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}
.skill-bar {
    height: 6px;
    background: rgba(0,255,136,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
/* Skill Bar Fill (Animation 9) */
.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #4ecdc4);
    border-radius: 3px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-percent {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Float Animation (Animation 5) */
.float-anim {
    animation: floatBob 3s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes floatBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- Projects Section ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}
.project-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0,255,136,0.08);
    transition: var(--transition);
    position: relative;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-accent, var(--accent)), transparent);
    opacity: 0.6;
    transition: opacity 0.3s;
}
.project-card:hover::before { opacity: 1; height: 4px; }
.project-card:hover {
    border-color: rgba(0,255,136,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 20px rgba(0,255,136,0.05);
    transform: translateY(-6px);
}
.project-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0;
}
.project-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    transition: var(--transition);
}
.project-card:hover .project-icon { transform: scale(1.1) rotate(-5deg); }
.project-live-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(0,255,136,0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent);
    transition: var(--transition);
}
.project-live-link:hover {
    background: rgba(0,255,136,0.1);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}
.project-info {
    padding: 1.2rem 1.5rem 1.5rem;
}
.project-info h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}
.project-info p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.project-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag {
    padding: 0.2rem 0.6rem;
    background: rgba(0,255,136,0.06);
    border: 1px solid rgba(0,255,136,0.15);
    border-radius: 50px;
    font-size: 0.72rem;
    color: var(--accent);
}

/* ---------- Experience Section ---------- */
.experience-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}
.exp-card {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0,255,136,0.08);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.exp-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}
.exp-icon {
    font-size: 2rem;
    color: var(--accent);
    min-width: 50px;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 0.3rem;
}
.exp-period {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}
.exp-details h4 {
    font-size: 1.1rem;
    margin: 0.3rem 0;
}
.exp-company {
    color: var(--accent-dim);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.exp-details p:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Lightning Glow Cards (Animation 13) */
.glow-card {
    position: relative;
}
.glow-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), transparent, #a855f7, transparent, var(--accent));
    background-size: 300% 300%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    animation: borderRotate 3s linear infinite;
    border-radius: inherit;
}
.glow-card:hover::after { opacity: 0.5; }

/* ---------- Charts ---------- */
.chart-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0,255,136,0.08);
    margin-bottom: 2rem;
}
.chart-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
}
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}
.chart-container.small-chart { height: 280px; }

/* ---------- Testimonials (Animation 14) ---------- */
.testimonials {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(0,255,136,0.08);
}
.testimonial-carousel { position: relative; min-height: 200px; }
.testimonial-card {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    pointer-events: none;
}
.testimonial-card.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.testimonial-stars { color: #fbbf24; margin-bottom: 1rem; font-size: 1.2rem; display: flex; gap: 0.2rem; }
.testimonial-text {
    font-family: var(--font-elegant);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
    margin-bottom: 1.5rem;
}
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.author-avatar {
    width: 45px; height: 45px;
    border-radius: 50%;
    background: rgba(0,255,136,0.1);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
}
.testimonial-author strong { display: block; font-size: 0.95rem; }
.testimonial-author span { color: var(--text-muted); font-size: 0.8rem; }
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.carousel-dots .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(0,255,136,0.2);
    cursor: pointer;
    transition: var(--transition);
}
.carousel-dots .dot.active { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }

/* ---------- Contact Section ---------- */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.contact-info h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent);
}
.contact-info > p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}
.contact-items { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid rgba(0,255,136,0.08);
    transition: var(--transition);
}
.contact-item:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateX(5px);
}
.contact-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.contact-icon.whatsapp { background: rgba(37,211,102,0.15); color: #25d366; }
.contact-icon.telegram { background: rgba(0,136,204,0.15); color: #0088cc; }
.contact-icon.facebook { background: rgba(24,119,242,0.15); color: #1877f2; }
.contact-icon.email { background: rgba(0,255,136,0.1); color: var(--accent); }
.contact-item strong { display: block; font-size: 0.95rem; }
.contact-item span { color: var(--text-muted); font-size: 0.85rem; }

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(0,255,136,0.08);
}
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0,255,136,0.03);
    border: 1px solid rgba(0,255,136,0.15);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0,255,136,0.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-line {
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}
.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line { width: 100%; }

/* ---------- Footer ---------- */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(0,255,136,0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-tagline { margin-top: 0.3rem; font-size: 0.8rem; }

/* ---------- AI Chatbot ---------- */
.chat-bubble {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 60px; height: 60px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    color: white;
    z-index: 2000;
    cursor: pointer;
    box-shadow: 0 4px 25px var(--accent-glow);
    transition: var(--transition);
    animation: chatPulse 2s ease infinite;
}
@keyframes chatPulse {
    0%, 100% { box-shadow: 0 4px 25px var(--accent-glow); }
    50% { box-shadow: 0 4px 40px rgba(0,255,136,0.6), 0 0 60px rgba(0,255,136,0.2); }
}
.chat-bubble:hover { transform: scale(1.1); }
.chat-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: #ff6b6b;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.chat-panel {
    position: fixed;
    bottom: 6rem; right: 2rem;
    width: 380px;
    max-height: 500px;
    background: var(--bg-secondary);
    border: 1px solid rgba(0,255,136,0.2);
    border-radius: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0) translateY(20px);
    transform-origin: bottom right;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}
.chat-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    background: rgba(0,255,136,0.05);
    border-bottom: 1px solid rgba(0,255,136,0.1);
}
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.chat-header-info .fa-user-tie { font-size: 1.5rem; color: white; }
.chat-header-info strong { display: block; font-size: 0.95rem; }
.chat-status { font-size: 0.75rem; color: var(--text-muted); }
.chat-close {
    font-size: 1.2rem;
    padding: 0.3rem;
    transition: var(--transition);
}
.chat-close:hover { color: #ff6b6b; }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 350px;
}
.chat-msg {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: msgSlide 0.3s ease;
}
@keyframes msgSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot {
    background: rgba(0,255,136,0.08);
    border: 1px solid rgba(0,255,136,0.1);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}
.chat-msg.user {
    background: var(--accent);
    color: var(--bg-primary);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    font-weight: 500;
}
.chat-msg.typing { display: flex; gap: 4px; align-items: center; padding: 1rem; }
.chat-msg.typing span {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: typingDot 1.4s ease infinite;
}
.chat-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}
.chat-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
    border-top: 1px solid rgba(0,255,136,0.1);
}
.chat-input-area input {
    flex: 1;
    padding: 0.7rem 1rem;
    background: rgba(0,255,136,0.03);
    border: 1px solid rgba(0,255,136,0.15);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}
.chat-input-area input:focus { border-color: var(--accent); }
.chat-send {
    width: 40px; height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--bg-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}
.chat-send:hover { box-shadow: 0 0 15px var(--accent-glow); transform: scale(1.1); }

/* Scrollbar for chat */
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.2); border-radius: 2px; }

/* ---------- Responsive Design ---------- */

/* Tablet */
@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .hero-content { order: 2; }
    .hero-image { order: 1; }
    .hero-description { max-width: 100%; margin: 0 auto 2rem; }
    .hero-buttons { justify-content: center; }
    .social-links { justify-content: center; }
    .profile-card-3d { width: 280px; height: 350px; }
    .hero-circle-anim { width: 320px; height: 320px; }
    .about-content { grid-template-columns: 1fr; gap: 2rem; }
    .about-image { max-width: 400px; margin: 0 auto; }
    .experience-content { grid-template-columns: 1fr; }
    .contact-content { grid-template-columns: 1fr; gap: 2rem; }
    .projects-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .timeline::before { left: 1rem; }
    .timeline-item { padding-right: 0; padding-left: 3rem; justify-content: flex-start; }
    .timeline-item:nth-child(even) { padding-left: 3rem; }
    .timeline-dot { left: 1rem; }
    .timeline-card { max-width: 100%; }
    .exp-charts { margin-top: 1rem; }
}

/* Mobile */
@media (max-width: 768px) {
    :root { --nav-height: 60px; }
    body { cursor: auto; }
    .snake-cursor, .custom-cursor, .cursor-trail { display: none !important; }
    button, a { cursor: pointer; }

    .hamburger { display: flex; }
    
    /* Mobile Sidebar Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, rgba(10,10,26,0.99) 0%, rgba(22,22,56,0.99) 100%);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        padding:0;
        gap: 1rem; /* Gap er issue */
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-right: 2px solid rgba(0,255,136,0.2);
        z-index: 1001; /* Above navbar */
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.7);
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .nav-menu.open { 
        transform: translateX(0);
    }
    
    /* Sidebar Header */
    .nav-menu::before {
        content: 'NAVIGATION';
        display: flex;
        align-items: center;
        height: 60px;
        padding: 0 1.5rem;
        background: linear-gradient(90deg, rgba(0, 255, 136, 0.1) 0%, transparent 100%);
        border-bottom: 2px solid rgba(0,255,136,0.3);
        margin-bottom: 0.5rem;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 2px;
        color: var(--accent);
    }
    
    /* Navigation Links */
    .nav-link { 
        padding: 1rem 1.5rem; 
        border-radius: 0;
        background: transparent;
        margin: 0;
        font-size: 0.95rem;
        color: white; /* White text by default */
        border-left: 3px solid transparent;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .nav-link i { 
        margin-top:10px;
        margin-right: 0.8rem; 
        font-size: 1rem;
        width: 20px;
        text-align: center;
    }
    
    .nav-link::before {
        display: none; /* Remove bottom line on mobile */
    }
    
    /* Hover State - No background */
    .nav-link:hover {
        background: transparent;
        border-left-color: rgba(255, 255, 255, 0.3);
        padding-left: 1.8rem;
        color: white;
    }
    
    /* Active State - Only green text, no background */
    .nav-link.active { 
        background: transparent;
        border-left-color: var(--accent);
        color: var(--accent); /* Green text for active page */
        font-weight: 600;
        padding-left: 1.8rem;
    }
    
    .nav-link.active::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 60%;
        background: var(--accent);
        border-radius: 2px;
    }
    
    /* Overlay when menu is open */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 280px; /* Start from sidebar edge */
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999; /* Below sidebar (1001) */
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none; /* Don't block clicks when not visible */
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
        pointer-events: auto; /* Allow clicking overlay to close menu */
    }
    
    /* Sidebar Footer */
    .nav-menu::after {
        content: '';
        display: block;
        margin-top: auto;
        padding: 1.5rem;
        border-top: 1px solid rgba(0,255,136,0.1);
        background: rgba(0, 0, 0, 0.3);
        min-height: 80px;
    }
    .nav-actions { gap: 0.5rem; }
    .like-btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

    .page { 
        padding: calc(var(--nav-height) + 1.5rem) 1rem 3rem;
        z-index: 1; /* Ensure page content is below nav menu */
    }
    .page-header { margin-bottom: 2.5rem; }
    .section-title { font-size: clamp(1.8rem, 5vw, 2.5rem); }
    .section-subtitle { font-size: 0.95rem; }

    .hero { min-height: auto; padding-top: 1rem; }
    .profile-card-3d { width: 200px; height: 260px; }
    .hero-circle-anim { width: 240px; height: 240px; }
    .hero-name { font-size: clamp(2rem, 8vw, 3rem); }
    .hero-title { font-size: clamp(1.1rem, 3vw, 1.5rem); }
    .hero-description { font-size: 0.9rem; line-height: 1.6; }
    .hero-greeting { font-size: 0.9rem; letter-spacing: 2px; }
    .scroll-indicator { display: none; }

    .about-stats { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .stat-item { padding: 1rem; }
    .stat-number { font-size: 1.6rem; }
    .stat-suffix { font-size: 1rem; }
    .stat-label { font-size: 0.75rem; }
    .about-text h3 { font-size: 1.4rem; }
    .about-text p { font-size: 0.9rem; }

    .timeline-card { padding: 1rem; }
    .timeline-card h4 { font-size: 1rem; }
    .timeline-card p { font-size: 0.85rem; }

    .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .skill-card { padding: 1rem; }
    .skill-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
    .skill-card h4 { font-size: 0.82rem; }
    .skill-percent { font-size: 0.72rem; }

    .projects-grid { grid-template-columns: 1fr; gap: 1rem; }
    .project-card-header { padding: 1.2rem 1.2rem 0; }
    .project-info { padding: 1rem 1.2rem 1.2rem; }
    .project-icon { width: 42px; height: 42px; font-size: 1.2rem; }
    .project-info h4 { font-size: 0.95rem; }
    .project-info p { font-size: 0.83rem; }

    .exp-card { padding: 1.2rem; gap: 1rem; }
    .exp-icon { font-size: 1.5rem; min-width: 35px; }
    .exp-details h4 { font-size: 1rem; }
    .exp-details p { font-size: 0.85rem; }

    .chart-container { height: 250px; }
    .chart-container.small-chart { height: 220px; }
    .chart-title { font-size: 1rem; }

    .contact-info h3 { font-size: 1.4rem; }
    .contact-info > p { font-size: 0.9rem; }
    .contact-item { padding: 1rem; }
    .contact-icon { width: 42px; height: 42px; font-size: 1.1rem; }
    .contact-form-wrapper { padding: 1.5rem; }
    .form-group input, .form-group textarea { font-size: 0.9rem; padding: 0.8rem; }

    .chat-panel {
        right: 0.5rem;
        bottom: 5rem;
        width: calc(100vw - 1rem);
        max-height: 60vh;
    }
    .chat-bubble { bottom: 1rem; right: 1rem; width: 50px; height: 50px; font-size: 1.2rem; }

    .footer { padding: 1.5rem 1rem; font-size: 0.8rem; }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; padding: 0.75rem 1.5rem; }
    .social-links { flex-wrap: wrap; justify-content: center; gap: 0.7rem; }
    .social-link { width: 40px; height: 40px; font-size: 1rem; }
    .about-stats { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .exp-card { flex-direction: column; text-align: center; align-items: center; }
    .exp-icon { justify-content: center; }
    .nav-logo { font-size: 1.1rem; }
    .chart-section { padding: 1rem; }
    .project-tags .tag { font-size: 0.65rem; padding: 0.15rem 0.5rem; }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .page { max-width: 1300px; }
    .profile-card-3d { width: 400px; height: 500px; }
    .hero-circle-anim { width: 450px; height: 450px; }
}

/* ---------- Utility / Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(10, 10, 26, 0.5); }
::-webkit-scrollbar-thumb { 
    background: linear-gradient(180deg, rgba(0,255,136,0.3), rgba(0,255,136,0.6)); 
    border-radius: 3px;
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover { 
    background: linear-gradient(180deg, rgba(0,255,136,0.5), rgba(0,255,136,0.9)); 
}

/* Selection */
::selection { background: rgba(0,255,136,0.3); color: var(--text-primary); }
