/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --bg-dark: #0a0a12;
    --bg-darker: #050508;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --primary: #5271ff;
    /* Neon Blue */
    --secondary: #9d4edd;
    /* Neon Purple */
    --accent: #00ffff;
    /* Cyan */
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Fonts */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor for custom one */
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   2. UTILITIES & GLASSMORPHISM
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.glass-panel {
    background: rgba(10, 10, 18, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--spacing-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(82, 113, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Glow effect helper */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transition: 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

/* =========================================
   3. BACKGROUND CANVASES
   ========================================= */
#bg-canvas,
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#neural-canvas {
    z-index: -1;
    /* Above bg, below content */
    opacity: 0.4;
}

/* =========================================
   4. CUSTOM CURSOR
   ========================================= */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    z-index: 100001;
    pointer-events: none;
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: rgba(82, 113, 255, 0.1);
    backdrop-filter: blur(1px);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    z-index: 100000;
    pointer-events: none;
}

@keyframes cursorSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

body:hover .cursor-dot,
body:hover .cursor-outline {
    opacity: 1;
}

/* =========================================
   5. NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 30px;
    height: 30px;
    background: rgba(82, 113, 255, 0.1);
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-normal);
}

.hex-inner {
    width: 60%;
    height: 60%;
    background: var(--primary);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: pulse-logo 3s infinite;
}

.logo:hover .logo-icon {
    transform: rotate(180deg);
    background: rgba(0, 255, 255, 0.2);
}

@keyframes pulse-logo {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.logo .accent {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
}

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 70px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.greeting {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 1px;
}

.hero-name {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-xs);
    background: linear-gradient(to right, #fff, #a0a0a0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    max-width: 500px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 350px;
    height: 350px;
    background: transparent;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    margin-left: 80px;
    /* Align more to the right */
}

/* Animated Border */
.hero-visual::before {
    content: '';
    position: absolute;
    inset: -10px;
    /* Thicker border */
    z-index: -1;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            var(--primary) 90deg,
            var(--secondary) 180deg,
            transparent 360deg);
    border-radius: 50%;
    animation: spin 4s linear infinite;
}

/* Inner Background */
.hero-visual::after {
    content: '';
    position: absolute;
    inset: 4px;
    z-index: -1;
    background: var(--bg-card);
    border-radius: 50%;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    filter: drop-shadow(0 0 20px rgba(82, 113, 255, 0.3));
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.05);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(82, 113, 255, 0.3);
}

.btn-primary:hover {
    background: #405ef7;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(82, 113, 255, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.btn-text {
    color: var(--text-muted);
    padding: 0.5rem 1rem;
}

.btn-text:hover {
    color: var(--primary);
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: var(--text-main);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(30px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 90px, 0);
    }

    40% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    60% {
        clip: rect(50px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    100% {
        clip: rect(60px, 9999px, 50px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(15px, 9999px, 85px, 0);
    }

    20% {
        clip: rect(65px, 9999px, 5px, 0);
    }

    40% {
        clip: rect(95px, 9999px, 35px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 70px, 0);
    }

    80% {
        clip: rect(55px, 9999px, 15px, 0);
    }

    100% {
        clip: rect(35px, 9999px, 45px, 0);
    }
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--text-muted);
    font-size: 1.5rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* =========================================
   7. SECTIONS GENERAL
   ========================================= */
.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

/* Circuit Divider Line */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.section::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.section-title::after {
    content: attr(data-text);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.03);
    z-index: -1;
    white-space: nowrap;
    font-weight: 800;
}

/* =========================================
   8. ABOUT SECTION
   ========================================= */
.about-card {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-muted);
}

/* =========================================
   9. SKILLS SECTION
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--spacing-sm);
    color: var(--text-main);
}

.accent-icon {
    color: var(--primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(82, 113, 255, 0.1);
}

/* =========================================
   10. PROJECTS SECTION
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-md);
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-main);
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--spacing-md);
}

.tech-tag {
    font-size: 0.8rem;
    color: var(--secondary);
    background: rgba(157, 78, 221, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.project-links {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

/* =========================================
   11. ACHIEVEMENTS SECTION
   ========================================= */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.achievement-card {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.achievement-icon {
    font-size: 2rem;
    color: var(--accent);
    background: rgba(0, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.achievement-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.achievement-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   12. CONTACT SECTION
   ========================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.contact-item i {
    font-size: 1.625rem;
    color: var(--primary);
    width: 40px;
    text-align: center;
    transition: transform 0.3s, color 0.3s;
}

.contact-item h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-item a {
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.contact-form .btn-primary {
    animation: pulse-glow 2s infinite;
}

.contact-form .btn-primary:hover {
    background: var(--bg-darker);
    color: var(--text-muted);
    box-shadow: 0 0 15px rgba(82, 113, 255, 0.2);
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(82, 113, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(82, 113, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(82, 113, 255, 0);
    }
}

/* =========================================
   13. FOOTER
   ========================================= */
.footer {
    padding: var(--spacing-md) 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-darker);
}

/* =========================================
   15. LOADER & ANIMATIONS
   ========================================= */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(82, 113, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-family: var(--font-heading);
    color: var(--primary);
    letter-spacing: 2px;
    font-size: 1.2rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Hero Intro Animations */
.hero-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   14. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        padding-bottom: 50px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-name {
        font-size: 3rem;
    }

    .hero-subtitle {
        margin: 0 auto 2rem auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-dark);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
        /* Hide custom cursor on touch devices */
    }

    * {
        cursor: auto;
        /* Reset cursor */
    }

    #bg-canvas,
    #neural-canvas {
        /* Reduce opacity or hide on very low end */
        opacity: 0.2;
    }

    .hero-image {
        animation: none;
        /* Disable heavy animation on mobile */
    }

    .hero-visual {
        animation: float 6s ease-in-out infinite;
        /* Keep container float but simpler */
        margin-left: 0;
        width: 250px;
        height: 250px;
    }

    .hero-visual::before {
        display: none;
        /* Remove complex spinning border on mobile for performance */
    }

    .hero-visual {
        border: 4px solid var(--primary);
        /* Simple border instead */
        box-shadow: 0 0 20px rgba(82, 113, 255, 0.3);
    }
}

/* =========================================
   16. RESUME PRINT STYLES
   ========================================= */
#resume-print-content {
    background: white;
    color: black;
    padding: 40px;
    font-family: 'Times New Roman', Times, serif;
    width: 800px;
    /* specific width for PDF generation */
}

#resume-print-content h1 {
    font-size: 24pt;
    text-align: center;
    margin-bottom: 5px;
    color: #000;
}

#resume-print-content h3 {
    font-size: 14pt;
    text-align: center;
    margin-bottom: 5px;
    color: #333;
    font-weight: normal;
}

#resume-print-content p {
    font-size: 11pt;
    color: #333;
    margin-bottom: 5px;
}

#resume-print-content .resume-header {
    border-bottom: 2px solid #000;
    padding-bottom: 15px;
    margin-bottom: 20px;
    text-align: center;
}

#resume-print-content .resume-section {
    margin-bottom: 15px;
}

#resume-print-content h4 {
    font-size: 12pt;
    text-transform: uppercase;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 10px;
    color: #000;
}

#resume-print-content ul {
    list-style: disc;
    margin-left: 20px;
}

/* =========================================
   17. CHATBOT STYLES
   ========================================= */
#chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#chatbot-container.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    padding: 15px;
    background: rgba(82, 113, 255, 0.1);
    border-bottom: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

#close-chat {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bot-message {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-message {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.chip {
    background: rgba(82, 113, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}

.chip:hover {
    background: var(--primary);
    color: white;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

#chat-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 15px;
    color: var(--text-main);
    outline: none;
}

#send-btn {
    background: var(--primary);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(82, 113, 255, 0.4);
    z-index: 1000;
    transition: transform 0.3s;
    animation: pulse 2s infinite;
}

#chat-toggle-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 480px) {

    /* Chatbot Mobile */
    #chatbot-container {
        width: 90%;
        right: 5%;
        left: 5%;
        bottom: 90px;
        height: 60vh;
        max-height: 500px;
    }

    #chat-toggle-btn {
        bottom: 20px;
        right: 20px;
    }

    /* Hero Mobile */
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding-top: 120px;
        /* More space for navbar */
        padding-bottom: 60px;
        /* Space at bottom */
    }

    .hero-name {
        font-size: 2.2rem;
        /* Smaller for mobile */
    }

    .hero-title {
        font-size: 1.1rem;
    }

    .hero-visual {
        width: 200px;
        height: 200px;
        margin-top: 20px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        /* Full width buttons */
        margin: 0;
    }

    /* Dashboard Mobile */
    #analytics-dashboard {
        width: 95%;
        padding: 15px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* General Padding & Alignment */
    .section {
        padding: 60px 0;
        text-align: center;
    }

    .container,
    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        text-align: center;
    }

    .about-content,
    .skills-container,
    .projects-grid,
    .achievements-grid {
        text-align: center;
    }

    /* Flex items centering */
    .contact-item {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        margin-bottom: 20px;
    }

    .contact-item i {
        margin-bottom: 10px;
    }

    .project-tech {
        justify-content: center;
    }

    /* Navbar Hover/Active Fix */
    .nav-link:active,
    .nav-link:focus {
        color: var(--primary);
    }

    .nav-link:active::after,
    .nav-link:focus::after {
        width: 100%;
    }
}

/* =========================================
   18. ANALYTICS DASHBOARD
   ========================================= */
#analytics-dashboard {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background: rgba(10, 10, 18, 0.98);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 20px;
    z-index: 10000;
    display: none;
    box-shadow: 0 0 50px rgba(82, 113, 255, 0.2);
}

#analytics-dashboard.active {
    display: block;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-card h4 {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
}

.bar-container {
    margin-bottom: 10px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.bar-bg {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--secondary);
    border-radius: 5px;
    transition: width 1s ease;
}