:root {
    --bg-color: #0c0c0e;
    --surface-color: rgba(24, 25, 28, 0.85);
    --surface-border: rgba(255, 255, 255, 0.06);
    --text-primary: #f0f0f0;
    --text-secondary: #8a8f98;
    --accent-color: #c0392b;
    --accent-glow: rgba(192, 57, 43, 0.35);
    --accent-soft: rgba(192, 57, 43, 0.12);

    --chart-domains: #5b8def;
    --chart-langs: #e67e22;
    --chart-cloud: #bdc3c7;
    --chart-dl: #f1c40f;
    --chart-db: #1abc9c;
    --chart-tools: #2ecc71;

    --font-heading: 'Poppins', sans-serif;
    --font-nav: 'Open Sans', sans-serif;
    --font-body: 'Barlow', sans-serif;

    --transition-speed: 0.3s;
    --radius: 14px;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background: var(--accent-color);
    color: #fff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---- Fixed background ---- */
.fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    z-index: -2;
    pointer-events: none;
}

/* ---- Glass Cards ---- */
.glass-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
}

h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 600;
    margin-bottom: 0;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-nav);
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-outline {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ======== NAVIGATION ======== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(12, 12, 14, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: background 0.4s, padding 0.4s, box-shadow 0.4s;
    padding: 1.2rem 0;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(12, 12, 14, 0.92);
    padding: 0.8rem 0;
    border-bottom-color: var(--surface-border);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

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

.logo {
    text-decoration: none;
    font-size: 1.4rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.85;
}

.logo-img {
    height: 34px;
    width: auto;
}

.logo-text {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    text-decoration: none;
    font-family: var(--font-nav);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.88rem;
    transition: color 0.25s ease;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 1px;
}

.nav-links a:not(.btn):hover,
.nav-links a:not(.btn).active {
    color: var(--text-primary);
}

.nav-links a:not(.btn).active::after {
    width: 100%;
    left: 0;
}

.nav-links a:not(.btn):hover::after {
    width: 70%;
    left: 15%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger .line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.35s ease;
    transform-origin: center;
}

.hamburger.toggle .line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.toggle .line:nth-child(2) {
    opacity: 0;
}

.hamburger.toggle .line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ======== LAYOUT ======== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 0.8rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ======== FADE-IN ANIMATION ======== */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ======== HERO ======== */
.hero {
    min-height: 75vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--bg-color), transparent);
    pointer-events: none;
}

.hero-content {
    max-width: 750px;
}

.hero-content h1 {
    background: linear-gradient(135deg, var(--text-primary) 0%, rgba(255, 255, 255, 0.65) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-portrait {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(192, 57, 43, 0.1);
}

.hero-subtitle {
    font-family: var(--font-nav);
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ======== ABOUT ======== */
.about-grid {
    display: flex;
    gap: 3.5rem;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.4rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-image {
    flex-shrink: 0;
}

.about-portrait {
    width: 220px;
    height: auto;
    border-radius: var(--radius);
    object-fit: cover;
    border: 2px solid var(--surface-border);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 60px var(--accent-soft);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-portrait:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6), 0 0 80px var(--accent-glow);
}

/* ======== EXPERIENCE / EDUCATION ======== */
.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.exp-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.exp-card-link .glass-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
    border-left: 3px solid transparent;
}

.exp-card-link:hover .glass-card {
    transform: translateX(6px);
    border-color: rgba(255, 255, 255, 0.08);
    border-left-color: var(--accent-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.exp-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.3rem 1.8rem;
}

.exp-logo {
    width: 100px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.exp-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.7);
    transition: opacity 0.3s ease;
}

.exp-card-link:hover .exp-logo img {
    filter: brightness(0) invert(1) opacity(1);
}

.exp-details {
    flex-grow: 1;
}

.exp-title {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.exp-title strong {
    color: var(--text-primary);
}

/* Nike logo sizing */
.exp-logo img[alt="Nike"] {
    max-width: 55px;
    max-height: 28px;
}

/* Quid Pro Quo logo - more visible (keep original colors, no invert) */
.exp-logo--qpq img {
    filter: none;
    opacity: 1;
    max-width: 110px;
    max-height: 55px;
}

/* Current job highlight */
.exp-card--current {
    border-left: 3px solid var(--accent-color);
    background: rgba(192, 57, 43, 0.04);
}

.exp-card-link:hover .exp-card--current {
    background: rgba(192, 57, 43, 0.08);
}

.current-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-color);
    background: rgba(192, 57, 43, 0.15);
    padding: 0.2em 0.5em;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* ======== PUBLICATIONS ======== */
.publications-list {
    display: grid;
    gap: 0.8rem;
    max-width: 900px;
    margin: 0 auto;
}

.pub-card {
    padding: 1.2rem 1.8rem;
    position: relative;
    transition: border-left-color 0.3s ease;
    border-left: 3px solid transparent;
}

.pub-card:has(a) {
    cursor: pointer;
}

.pub-card:has(a):hover {
    border-left-color: var(--accent-color);
}

.pub-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pub-card a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.25s ease;
}

.pub-card a:hover {
    color: var(--text-primary);
}

.pub-card a::after {
    content: ' \2197';
    font-size: 0.75em;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.pub-card a:hover::after {
    opacity: 1;
}

/* ======== SKILLS CHART ======== */
.skills-chart-container {
    font-family: var(--font-nav);
    max-width: 800px;
    margin: 0 auto;
    background: transparent;
    padding: 1rem 2rem;
    color: var(--text-primary);
}

.skills-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.skill-row {
    display: flex;
    align-items: center;
}

.skill-name {
    width: 180px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
    padding-right: 16px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.skill-bar-track {
    flex-grow: 1;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar {
    height: 8px;
    border-radius: 4px;
}

.skill-spacer {
    height: 14px;
}

.domains {
    background-color: var(--chart-domains);
}

.langs {
    background-color: var(--chart-langs);
}

.cloud {
    background-color: var(--chart-cloud);
}

.dl {
    background-color: var(--chart-dl);
}

.db {
    background-color: var(--chart-db);
}

.tools {
    background-color: var(--chart-tools);
}

.skills-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-top: 28px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-box {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* ======== CONTACT ======== */
.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    text-align: left;
    margin-top: 2rem;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.contact-list svg {
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 3px;
    opacity: 0.8;
}

.contact-list a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

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

.contact-list address {
    font-style: normal;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

address small {
    display: block;
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
}

/* ======== FOOTER ======== */
footer {
    border-top: 1px solid var(--surface-border);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.footer-logo {
    height: 26px;
    width: auto;
    opacity: 0.85;
}

.footer-text {
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
}

.footer-copy {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 0.3rem;
}

/* ======== SKIP LINK ======== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    z-index: 9999;
    border-radius: 0 0 8px 0;
    font-size: 0.85rem;
}

.skip-link:focus {
    top: 0;
}

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

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: rgba(12, 12, 14, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-left: 1px solid var(--surface-border);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a:not(.btn)::after {
        display: none;
    }

    .about-grid {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    .about-portrait {
        width: 160px;
    }

    .exp-card {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .exp-card-link:hover .glass-card {
        transform: translateX(0) translateY(-2px);
    }

    .skill-name {
        width: 110px;
        font-size: 0.72rem;
    }

    .hero {
        min-height: 80vh;
    }

    section {
        padding: 3.5rem 0;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 1.2rem;
    }

    .nav-content {
        padding: 0 1.2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .about-portrait {
        width: 130px;
    }
}

/* ======== CHAT WIDGET ======== */
#chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9000;
    font-family: var(--font-body);
}

#chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--accent-color);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#chat-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px var(--accent-glow), 0 3px 12px rgba(0, 0, 0, 0.5);
}

#chat-panel {
    display: none;
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 380px;
    max-height: 520px;
    background: #161618;
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    overflow: hidden;
}

#chat-panel.open {
    display: flex;
    animation: chatSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chatSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }

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

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--surface-border);
    background: rgba(20, 20, 22, 0.95);
}

.chat-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
}

.chat-header-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.chat-header-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 360px;
    min-height: 200px;
}

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

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* --- Chat message layout --- */
.chat-msg--bot {
    display: flex;
}

.chat-msg--user {
    display: flex;
    justify-content: flex-end;
}

/* --- Chat bubble (wrapper) --- */
.chat-msg-content {
    padding: 0.7rem 1rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.6;
    max-width: 90%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-msg--bot .chat-msg-content {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.chat-msg--user .chat-msg-content {
    background: var(--accent-color);
    color: #fff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
    margin-left: auto;
}

/* --- Markdown inside bot bubbles --- */
.chat-msg-content p {
    margin: 0 0 0.5em;
}

.chat-msg-content p:last-child {
    margin-bottom: 0;
}

.chat-msg-content h1,
.chat-msg-content h2,
.chat-msg-content h3,
.chat-msg-content h4,
.chat-msg-content h5,
.chat-msg-content h6 {
    color: var(--text-primary);
    margin: 0.6em 0 0.3em;
    line-height: 1.3;
}

.chat-msg-content h1 {
    font-size: 1.15em;
}

.chat-msg-content h2 {
    font-size: 1.08em;
}

.chat-msg-content h3 {
    font-size: 1.02em;
}

.chat-msg-content h4,
.chat-msg-content h5,
.chat-msg-content h6 {
    font-size: 0.95em;
}

.chat-msg-content h1:first-child,
.chat-msg-content h2:first-child,
.chat-msg-content h3:first-child {
    margin-top: 0;
}

.chat-msg-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.chat-msg-content em {
    font-style: italic;
}

.chat-msg-content a {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chat-msg--user .chat-msg-content a {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

.chat-msg-content ul,
.chat-msg-content ol {
    margin: 0.4em 0;
    padding-left: 1.4em;
}

.chat-msg-content li {
    margin-bottom: 0.25em;
}

.chat-msg-content li:last-child {
    margin-bottom: 0;
}

.chat-msg-content code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.82em;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15em 0.35em;
    border-radius: 4px;
}

.chat-msg-content pre {
    margin: 0.5em 0;
    padding: 0.6em 0.8em;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-msg-content pre code {
    background: none;
    padding: 0;
    font-size: 0.8em;
    line-height: 1.5;
}

.chat-msg-content blockquote {
    margin: 0.5em 0;
    padding: 0.3em 0.8em;
    border-left: 3px solid var(--accent-color);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 6px 6px 0;
}

.chat-msg-content blockquote p {
    margin: 0;
}

.chat-msg-content hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.6em 0;
}

.chat-msg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5em 0;
    font-size: 0.85em;
}

.chat-msg-content th,
.chat-msg-content td {
    padding: 0.3em 0.5em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.chat-msg-content th {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-weight: 600;
}

.chat-typing {
    display: flex;
    gap: 4px;
    padding: 0.7rem 1rem;
    align-self: flex-start;
}

.chat-typing span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

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

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

@keyframes typingDot {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

#chat-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--surface-border);
    background: rgba(20, 20, 22, 0.95);
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

#chat-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

#chat-input:focus {
    border-color: var(--accent-color);
}

#chat-send {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--accent-color);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

#chat-send:hover {
    opacity: 0.85;
}

@media (max-width: 480px) {
    #chat-panel {
        width: calc(100vw - 2rem);
        right: -0.5rem;
        max-height: 70vh;
    }
}