/* ================================================================
   RESET & ROOT VARIABLES
================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00d4ff;
    --secondary: #0099ff;
    --accent: #00ffaa;
    --dark: #0a0e27;
    --darker: #050816;
    --light: #e8f1ff;
    --gray: #8892b0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--darker);
    color: var(--light);
    overflow-x: hidden;
    line-height: 1.6;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

/* ================================================================
   ANIMATED BACKGROUND
================================================================ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ================================================================
   NAVIGATION
================================================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 5px 30px rgba(0, 212, 255, 0.3);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

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

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    transition: all 0.3s ease;
}

/* ================================================================
   HERO SECTION
================================================================ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 2rem;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    z-index: 1;
}

.hero-greeting {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--light), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.8;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 5px 25px rgba(0, 212, 255, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    transition: left 0.3s ease;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 40px;
    background: var(--primary);
    left: 50%;
    transform: translateX(-50%);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ================================================================
   SHARED SECTION STYLES
================================================================ */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   ABOUT SECTION
================================================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.8;
}

.about-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
}

.about-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary);
    border-radius: 20px;
    z-index: -1;
}

.about-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--light);
}

/* ================================================================
   SKILLS SECTION
================================================================ */
.skills-category {
    margin-bottom: 2.5rem;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.skills-category-title {
    font-size: 1.4rem;
    color: var(--light);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    position: relative;
}

.skills-category-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--light);
}

/* ================================================================
   PROJECTS SECTION
================================================================ */
.projects-grid {
    display: grid;
    gap: 3rem;
    margin-top: 3rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
}

.project-header {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 255, 170, 0.1));
    padding: 2.5rem;
    position: relative;
}

.project-number {
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 4rem;
    font-weight: bold;
    opacity: 0.2;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.project-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    list-style: none;
    padding: 0;
}

.project-description li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
}

.project-description li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1rem;
}

.project-description li:last-child {
    margin-bottom: 0;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tech-tag {
    padding: 0.4rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary);
}

/* ================================================================
   EXPERIENCE TIMELINE
================================================================ */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 45%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 4px solid var(--darker);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary);
    z-index: 1;
}

.timeline-date {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.timeline-company {
    color: var(--accent);
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--gray);
    line-height: 1.6;
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-description li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.6rem;
}

.timeline-description li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1rem;
}

.timeline-description li:last-child {
    margin-bottom: 0;
}

/* ================================================================
   EDUCATION SECTION
================================================================ */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.education-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.2;
}

.education-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.education-degree {
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.education-institution {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.education-year {
    color: var(--gray);
}

/* ================================================================
   CERTIFICATIONS & TRAINING SECTION
================================================================ */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.certification-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.certification-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.certification-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.certification-title {
    font-size: 1.15rem;
    color: var(--light);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.certification-org {
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.certification-date {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ================================================================
   ACTIVITIES & INTERESTS SECTION
================================================================ */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.activity-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.activity-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.activity-title {
    font-size: 1.3rem;
    color: var(--light);
    margin-bottom: 0.8rem;
}

.activity-description {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ================================================================
   CONTACT SECTION
================================================================ */
#contact {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(0, 255, 170, 0.05));
    border-radius: 30px;
    padding: 4rem 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.contact-label {
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.contact-value {
    color: var(--light);
    font-size: 1.1rem;
    word-break: break-word;
}

.contact-value a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-value a:hover {
    color: var(--accent);
}

/* ================================================================
   FOOTER
================================================================ */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--dark);
    color: var(--gray);
}

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

.social-link {
    color: var(--primary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    color: var(--accent);
    transform: translateY(-5px);
}

/* ================================================================
   RESPONSIVE — PORTFOLIO
================================================================ */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: rgba(10, 14, 39, 0.98);
        padding: 2rem;
        border-radius: 10px;
        transition: right 0.3s ease;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 2rem;
    }

    .timeline-content {
        width: 100%;
    }

    .timeline-dot {
        left: 0;
        transform: translateX(-50%);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}


/* ================================================================
   AI CHATBOT STYLES
================================================================ */

/* ---- Chat Bubble ---- */
.chat-bubble {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* z-index matches navbar — sits alongside it, never covers nav links */
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    color: #fff;
    padding: 0;
    line-height: 1;
}

.chat-bubble:hover {
    transform: scale(1.12);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.7);
}

.chat-bubble:active {
    transform: scale(0.96);
}

/* Icons — centered absolutely inside button */
.chat-bubble-icon,
.chat-bubble-close {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

/* Close icon hidden by default */
.chat-bubble-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.7);
}

/* Swap icons when open */
.chat-bubble.is-open .chat-bubble-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.7);
}

.chat-bubble.is-open .chat-bubble-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Pulse ring */
.chat-bubble-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.35);
    animation: chatPulse 2.5s ease-out infinite;
    pointer-events: none;
}

.chat-bubble.is-open .chat-bubble-pulse {
    display: none;
}

@keyframes chatPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

/* ---- Chat Window ----
   bottom: 6rem  =  bubble height (60px) + gap (32px) + breathing room
   z-index: 999  =  always below navbar (1000), never overlaps nav
*/
.chat-window {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 355px;
    max-height: 540px;
    background: rgba(10, 14, 39, 0.97);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 212, 255, 0.08);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom right;
}

.chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* ---- Chat Header ---- */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(0, 255, 170, 0.08));
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--darker);
    position: relative;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.chat-avatar-status {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: #00ffaa;
    border-radius: 50%;
    border: 2px solid rgba(10, 14, 39, 0.97);
}

.chat-header-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--light);
}

.chat-header-status {
    font-size: 0.76rem;
    color: var(--accent);
    margin-top: 1px;
}

.chat-new-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    color: var(--primary);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    white-space: nowrap;
}

.chat-new-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* ---- Messages Area ---- */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

/* ---- Message Rows ---- */
.chat-msg {
    display: flex;
    gap: 0.55rem;
    animation: msgSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

.chat-msg.user {
    flex-direction: row-reverse;
}

@keyframes msgSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-msg.bot .msg-avatar {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--darker);
}

.chat-msg.user .msg-avatar {
    background: linear-gradient(135deg, #6c63ff, #a78bfa);
    color: #fff;
}

/* ---- Bubbles ---- */
.msg-bubble {
    max-width: 80%;
    padding: 0.7rem 0.95rem;
    border-radius: 16px;
    font-size: 0.87rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-msg.bot .msg-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.18);
    color: var(--light);
    border-bottom-left-radius: 5px;
}

.chat-msg.user .msg-bubble {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-bottom-right-radius: 5px;
}

.msg-bubble.error {
    background: rgba(255, 80, 80, 0.1);
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff8080;
}

/* ---- Bot Message Rich Formatting ---- */
.chat-msg.bot .msg-bubble strong {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.chat-msg.bot .msg-bubble .bot-line {
    display: block;
    margin-bottom: 0.22rem;
}

.chat-msg.bot .msg-bubble .bot-spacer {
    display: block;
    height: 0.4rem;
}

.chat-msg.bot .msg-bubble .bot-list {
    margin: 0.3rem 0 0.3rem 0.2rem;
    padding-left: 1.1rem;
    list-style-position: outside;
}

.chat-msg.bot .msg-bubble ul.bot-list {
    list-style-type: disc;
}

.chat-msg.bot .msg-bubble ol.bot-list {
    list-style-type: decimal;
}

.chat-msg.bot .msg-bubble .bot-list li {
    margin-bottom: 0.28rem;
    line-height: 1.55;
    color: var(--light);
}

.chat-msg.bot .msg-bubble ul.bot-list li::marker {
    color: var(--primary);
}

.chat-msg.bot .msg-bubble ol.bot-list li::marker {
    color: var(--primary);
    font-weight: 700;
}

/* ---- Welcome Card ---- */
.chat-welcome {
    text-align: center;
    padding: 1.2rem 1rem 0.4rem;
}

.chat-welcome-emoji {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
}

.chat-welcome-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 0.3rem;
}

.chat-welcome-sub {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.5;
}

/* ---- Typing Indicator ---- */
.typing-indicator {
    display: flex;
    gap: 0.55rem;
    align-items: flex-end;
    animation: msgSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 16px;
    border-bottom-left-radius: 5px;
    padding: 0.65rem 0.9rem;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: typingBounce 1.3s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.30s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ---- Suggestions ---- */
.chat-suggestions {
    padding: 0 0.9rem 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    flex-shrink: 0;
}

.suggestion-btn {
    padding: 0.35rem 0.8rem;
    background: rgba(0, 212, 255, 0.07);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 20px;
    color: var(--primary);
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.22s ease;
    font-family: inherit;
    white-space: nowrap;
}

.suggestion-btn:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

/* ---- Input Area ---- */
.chat-input-area {
    padding: 0.7rem 0.9rem 0.9rem;
    border-top: 1px solid rgba(0, 212, 255, 0.12);
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 14px;
    padding: 0.45rem 0.45rem 0.45rem 0.9rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--light);
    font-size: 0.88rem;
    font-family: inherit;
    resize: none;
    height: 22px;
    min-height: 22px;
    max-height: 110px;
    line-height: 1.5;
    padding: 0;
    margin: 0;
    display: block;
    overflow-y: hidden;
}

.chat-input::placeholder {
    color: var(--gray);
}

.chat-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.35);
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.5);
}

.chat-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.chat-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chat-footer-note {
    font-size: 0.7rem;
    color: rgba(136, 146, 176, 0.55);
    text-align: center;
    margin-top: 0.5rem;
}

/* ---- Responsive — Chat ---- */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 1.4rem);
        right: 0.7rem;
        bottom: 5.6rem;
        max-height: 66vh;
        border-radius: 18px;
    }

    .chat-bubble {
        bottom: 1.2rem;
        right: 1.2rem;
        width: 54px;
        height: 54px;
    }

    .chat-suggestions {
        gap: 0.38rem;
    }

    .suggestion-btn {
        font-size: 0.73rem;
    }
}