/* ===========================
   CSS VARIABLES & RESET
   =========================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1e1e38;
    --accent-cyan: #00d4ff;
    --accent-purple: #7c3aed;
    --accent-pink: #f72585;
    --gradient: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(0, 212, 255, 0.3);
    --glow-cyan: 0 0 30px rgba(0, 212, 255, 0.25);
    --glow-purple: 0 0 30px rgba(124, 58, 237, 0.25);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 70px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    max-width: 100vw;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

::selection {
    background: rgba(0, 212, 255, 0.25);
    color: var(--accent-cyan);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 3px;
}

/* ===========================
   UTILITY
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
}

.section {
    padding: clamp(5rem, 10vh, 9rem) 0;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1.5px solid var(--border-accent);
    color: var(--accent-cyan);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.btn-ghost {
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    background: transparent;
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-right: auto;
}

.logo-bracket {
    color: var(--accent-cyan);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 1px;
    transform: translateX(-50%);
    transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
   HERO
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
    padding: 2rem clamp(1rem, 5vw, 2rem);
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.06);
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease both;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.3);
    }
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.8s 0.1s ease both;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-weight: 500;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-bottom: 1.5rem;
    height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    animation: fadeInUp 0.8s 0.2s ease both;
}

.static-text {
    color: var(--text-secondary);
}

.typing-text {
    color: var(--accent-cyan);
    min-width: 2px;
}

.cursor {
    color: var(--accent-cyan);
    animation: blink 0.8s step-end infinite;
    font-weight: 300;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s 0.3s ease both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s 0.4s ease both;
}

.hero-socials {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s 0.5s ease both;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent-cyan);
    border-color: var(--border-accent);
    background: rgba(0, 212, 255, 0.08);
    box-shadow: var(--glow-cyan);
    transform: translateY(-3px);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    animation: fadeInUp 1s 1s ease both;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--border-accent);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 2px;
    animation: scroll-anim 1.8s ease-in-out infinite;
}

@keyframes scroll-anim {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

/* ===========================
   SECTION HEADERS
   =========================== */
.section-header {
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-tag {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-cyan);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
}

/* ===========================
   REVEAL ANIMATION
   =========================== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ===========================
   ABOUT
   =========================== */
.about {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.about-image-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.2), rgba(124, 58, 237, 0.15), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate-glow 6s linear infinite;
}

@keyframes rotate-glow {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.about-avatar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 3px solid var(--border-accent);
    object-fit: cover;
    position: relative;
    z-index: 1;
    box-shadow: var(--glow-cyan);
    transition: transform var(--transition);
}

.about-avatar:hover {
    transform: scale(1.04);
}

.about-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 2;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse-dot 2s infinite;
}

.about-heading {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

.about-text {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.75rem 0;
}

.about-facts li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    transition: border-color var(--transition);
}

.about-facts li:hover {
    border-color: var(--border-accent);
}

.fact-icon {
    font-size: 1rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.about-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===========================
   SKILLS
   =========================== */
.skills {
    background: var(--bg-secondary);
}

.skills-categories {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.skill-category {}

.category-title {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.4rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: default;
    opacity: 0;
    transform: translateY(16px);
    animation: skill-in 0.4s ease forwards;
}

@keyframes skill-in {
    to { opacity: 1; transform: translateY(0); }
}

/* stagger: cada card recebe delay via nth-child */
.skill-card:nth-child(1)  { animation-delay: 0.05s; }
.skill-card:nth-child(2)  { animation-delay: 0.12s; }
.skill-card:nth-child(3)  { animation-delay: 0.19s; }
.skill-card:nth-child(4)  { animation-delay: 0.26s; }
.skill-card:nth-child(5)  { animation-delay: 0.33s; }
.skill-card:nth-child(6)  { animation-delay: 0.40s; }
.skill-card:nth-child(7)  { animation-delay: 0.47s; }
.skill-card:nth-child(8)  { animation-delay: 0.54s; }
.skill-card:nth-child(9)  { animation-delay: 0.61s; }
.skill-card:nth-child(10) { animation-delay: 0.68s; }

.skill-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    box-shadow: var(--glow-cyan);
    transform: translateY(-5px);
}

.skill-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    transition: transform var(--transition);
}

.skill-card:hover .skill-icon {
    transform: scale(1.12);
}

.skill-icon-text {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border: 1.5px solid var(--border-accent);
    border-radius: var(--radius-sm);
}

.skill-invert {
    filter: invert(1) brightness(0.85);
}

.skill-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    transition: color var(--transition);
}

.skill-card:hover .skill-name {
    color: var(--text-primary);
}

/* ===========================
   PROJECTS
   =========================== */
.projects {
    background: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--glow-cyan), 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-8px);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-img {
    transform: scale(1.06);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
    backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link-btn {
    padding: 0.6rem 1.5rem;
    border: 1.5px solid var(--accent-cyan);
    border-radius: var(--radius-full);
    color: var(--accent-cyan);
    font-size: 0.88rem;
    font-weight: 600;
    background: rgba(0, 212, 255, 0.1);
    transition: var(--transition);
}

.project-link-btn:hover {
    background: var(--accent-cyan);
    color: #0a0a0f;
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.73rem;
    font-family: var(--font-mono);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.tag-ai {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.4);
    color: #a78bfa;
}

.tag-react {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--border-accent);
    color: var(--accent-cyan);
}

.tag-star {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
}

.project-links {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.project-github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.project-github-link:hover {
    color: var(--accent-cyan);
}

.projects-more {
    text-align: center;
}

/* ===========================
   IA NO DIA A DIA
   =========================== */
.ia-daily {
    background: var(--bg-secondary);
}

.ia-daily-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ia-daily-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    transition: var(--transition);
}

.ia-daily-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    box-shadow: var(--glow-cyan);
    transform: translateY(-4px);
}

.ia-daily-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border-accent);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
}

.ia-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ia-icon-invert {
    filter: invert(1) brightness(0.85);
}

.ia-icon-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ia-daily-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ia-daily-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ia-daily-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.ia-daily-tag {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-mono);
    border-radius: 20px;
    border: 1px solid var(--border-accent);
    color: var(--accent-cyan);
    width: fit-content;
}

/* ===========================
   CONTACT
   =========================== */
.contact {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: clamp(3rem, 6vw, 5rem);
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.contact-icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--accent-cyan);
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    border-color: var(--border-accent);
    box-shadow: var(--glow-cyan);
}

.contact-label {
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.contact-value {
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.contact-value:hover {
    color: var(--accent-cyan);
}

/* FORM */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.8rem 1.1rem;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    resize: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
    flex: 1;
}

.heart {
    color: var(--accent-pink);
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 1.5rem 2rem 2rem;
        gap: 0.25rem;
        border-bottom: 1px solid var(--border);
        animation: fadeInDown 0.3s ease;
    }

    .nav-links.open .nav-link {
        padding: 0.85rem 0;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open .nav-link:last-child {
        border-bottom: none;
    }

    .hamburger {
        display: flex;
    }

    /* --- About --- */
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
        overflow: hidden;
    }

    .about-image-wrapper {
        margin: 0 auto;
        min-width: 0;
        max-width: 100%;
    }

    .about-content {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .about-heading {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .about-text {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .about-facts {
        grid-template-columns: 1fr;
    }

    .about-facts li {
        text-align: left;
    }

    .about-actions {
        justify-content: center;
    }

    .about-stats {
        width: 100%;
        margin: 2rem auto 0;
    }

    .stat-label {
        white-space: normal;
    }

    /* --- Skills --- */
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    /* --- Contact --- */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 1.5rem;
    }

    /* --- Footer --- */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* --- Hero --- */
    .hero-title {
        font-size: clamp(1.8rem, 9vw, 2.6rem);
    }

    .hero-subtitle {
        font-size: clamp(0.95rem, 5vw, 1.25rem);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }

    /* --- About --- */
    .about-avatar {
        width: 175px;
        height: 175px;
    }

    .about-actions {
        flex-direction: column;
        align-items: center;
    }

    /* --- Projects --- */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* --- Timeline --- */
    .timeline {
        padding-left: 1.25rem;
    }

    /* --- Section --- */
    .section {
        padding: clamp(3.5rem, 8vh, 6rem) 0;
    }
}

@media (min-width: 1400px) {
    .projects-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===========================
   SCROLL PROGRESS BAR
   =========================== */
#scroll-prog {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    z-index: 99999;
    transition: width 0.08s linear;
    pointer-events: none;
}

/* ===========================
   LOADER
   =========================== */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

#loader.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ld-ring-wrap {
    position: relative;
    width: 130px;
    height: 130px;
}

.ld-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ld-ring-outer {
    border-top-color: var(--accent-cyan);
    border-right-color: rgba(0, 212, 255, 0.2);
    animation: ld-spin 1.8s linear infinite;
}

.ld-ring-inner {
    inset: 16px;
    border-bottom-color: var(--accent-purple);
    border-left-color: rgba(124, 58, 237, 0.2);
    animation: ld-spin 1.2s linear infinite reverse;
}

@keyframes ld-spin {
    to { transform: rotate(360deg); }
}

.ld-logo-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    animation: ld-pulse 2s ease-in-out infinite;
}

.ld-bracket {
    color: var(--accent-cyan);
}

@keyframes ld-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.ld-bar-wrap {
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: hidden;
}

.ld-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 2px;
    animation: ld-fill 1.8s 0.2s ease forwards;
}

@keyframes ld-fill {
    to { width: 100%; }
}

.ld-tagline {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    animation: ld-blink 1.2s ease-in-out infinite;
}

@keyframes ld-blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.9; }
}

/* ===========================
   MARQUEE / TICKER
   =========================== */
.marquee-section {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    padding: 0.8rem 0;
    background: var(--bg-secondary);
}

.marquee-wrap {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
    display: flex;
    gap: 0;
    white-space: nowrap;
    width: max-content;
    animation: marquee-scroll 28s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-track span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 1.4rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.marquee-track span:hover {
    color: var(--accent-cyan);
}

.marquee-track .mq-sep {
    color: var(--accent-purple);
    opacity: 0.6;
    padding: 0 0.2rem;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ===========================
   CTA DE IMPACTO
   =========================== */
.cta-section {
    position: relative;
    overflow: hidden;
    padding: clamp(5rem, 10vh, 8rem) 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
}

.cta-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(90px);
}

.cta-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.12), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-60%, -50%);
}

.cta-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(0%, -50%);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0.75rem 0 1.25rem;
}

.cta-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================
   BOTÃO VOLTAR AO TOPO
   =========================== */
/* ===========================
   FLOATING BUTTONS — wrapper
   =========================== */
.float-group {
    position: fixed;
    bottom: 1.8rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 501;
}

/* ===========================
   BOTÃO VOLTAR AO TOPO
   =========================== */
#back-to-top {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.85);
    transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                visibility 0.4s ease,
                box-shadow 0.3s ease;
    pointer-events: none;
    position: relative;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: btt-float 2.8s ease-in-out infinite;
}

/* animação subindo e descendo */
@keyframes btt-float {
    0%, 100% { transform: translateY(0);   }
    50%       { transform: translateY(-7px); }
}

#back-to-top:hover {
    box-shadow: 0 6px 28px rgba(236, 72, 153, 0.55), 0 0 0 4px rgba(236, 72, 153, 0.15);
    animation-play-state: paused;
    transform: translateY(-4px) scale(1.08);
}

/* remove anel giratório anterior */
#back-to-top::before {
    display: none;
}

@keyframes btt-spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   WHATSAPP FLUTUANTE
   =========================== */
.wa-float {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366, #128c7e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    text-decoration: none;
    position: relative;
    animation: wa-enter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes wa-enter {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.wa-float:hover {
    transform: scale(1.12) rotate(-8deg);
    box-shadow: 0 8px 36px rgba(37, 211, 102, 0.6);
}

.wa-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.25);
    animation: wa-ripple 2s ease-out infinite;
    pointer-events: none;
}

.wa-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.15);
    animation: wa-ripple 2s ease-out 0.7s infinite;
}

@keyframes wa-ripple {
    0%   { transform: scale(1);    opacity: 0.7; }
    100% { transform: scale(1.55); opacity: 0;   }
}

@media (max-width: 768px) {
    .float-group {
        bottom: 1.2rem;
        right: 1rem;
        gap: 0.6rem;
    }

    #back-to-top {
        width: 42px;
        height: 42px;
    }

    .wa-float {
        width: 46px;
        height: 46px;
    }
}

/* ===========================
   STATS DO ABOUT
   =========================== */
.about-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    width: fit-content;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0 1.5rem;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-plus {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
    flex-shrink: 0;
}

/* ===========================
   TIMELINE
   =========================== */
.timeline-section {
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 1.75rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.35rem;
    top: 0.35rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent-cyan);
    transition: var(--transition);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.timeline-dot-accent {
    background: var(--gradient);
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2), var(--glow-purple);
}

.timeline-item:hover .timeline-dot {
    box-shadow: 0 0 0 5px rgba(0, 212, 255, 0.2), var(--glow-cyan);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: var(--transition);
}

.timeline-item:hover .timeline-content {
    border-color: var(--border-accent);
    box-shadow: var(--glow-cyan);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.timeline-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.4rem 0 0.5rem;
}

.timeline-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-badge {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-mono);
    border-radius: 20px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.4);
    color: #a78bfa;
}

/* ===========================
   FILTRO DE PROJETOS
   =========================== */
.project-filters {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.45rem 1.2rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--border-accent);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.06);
}

.filter-btn.active {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--glow-cyan);
}

.project-card.hidden {
    display: none;
}

/* ===========================
   TOOLTIPS DOS BOTÕES FLUTUANTES
   =========================== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: rgba(15, 15, 26, 0.97);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), var(--glow-cyan);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* seta apontando para o botão */
[data-tooltip]::before {
    content: '';
    position: absolute;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    border: 5px solid transparent;
    border-left-color: var(--border-accent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* no mobile esconde tooltip para não sobrepor conteúdo */
@media (max-width: 768px) {
    [data-tooltip]::after,
    [data-tooltip]::before {
        display: none;
    }
}

/* chat FAB fica à esquerda — tooltip aparece à direita */
.chat-float-left[data-tooltip]::after {
    right: auto;
    left: calc(100% + 12px);
    transform: translateY(-50%) translateX(-6px);
}

.chat-float-left[data-tooltip]:hover::after {
    transform: translateY(-50%) translateX(0);
}

.chat-float-left[data-tooltip]::before {
    right: auto;
    left: calc(100% + 6px);
    border-left-color: transparent;
    border-right-color: var(--border-accent);
    transform: translateY(-50%) translateX(-4px);
}

.chat-float-left[data-tooltip]:hover::before {
    transform: translateY(-50%) translateX(0);
}

/* ===========================
   AI CHAT WIDGET
   =========================== */

/* --- FAB do chat --- */
.chat-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    animation: wa-enter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.3s;
    overflow: hidden;
    padding: 0;
}

/* Imagem de avatar no FAB */
.chat-fab-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Ícone fallback (quando não há imagem) */
.chat-fab-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    z-index: 0;
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.5);
}

.chat-fab-icon,
.chat-fab-close {
    position: absolute;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
}

.chat-fab-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.7);
}

.chat-fab.active .chat-fab-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.7);
}

.chat-fab.active .chat-fab-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Badge ponto vermelho (nova mensagem) */
.chat-fab-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f72585;
    border: 2px solid var(--bg-primary);
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.chat-fab-badge.show {
    opacity: 1;
    transform: scale(1);
}

/* --- FAB flutuante esquerda --- */
.chat-float-left {
    position: fixed;
    bottom: 1.8rem;
    left: 1.5rem;
    z-index: 501;
}

/* --- Widget container --- */
.chat-widget {
    position: fixed;
    bottom: 6.5rem;
    left: 1.5rem;
    width: 360px;
    max-width: calc(100vw - 2rem);
    z-index: 500;
    pointer-events: none;
}

/* --- Janela do chat --- */
.chat-window {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 480px;
    max-height: calc(100vh - 9rem);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 212, 255, 0.08);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease;
    pointer-events: none;
    transform-origin: bottom left;
}

.chat-widget.chat-open {
    pointer-events: auto;
}

.chat-widget.chat-open .chat-window {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* --- Header --- */
.chat-header {
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(124, 58, 237, 0.12));
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-avatar-letters {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    letter-spacing: 0.03em;
    overflow: hidden;
    flex-shrink: 0;
}

.chat-avatar-letters img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bg-card);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}

.chat-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.chat-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-status-text {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    opacity: 0.85;
}

.chat-close-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.chat-close-btn:hover {
    background: rgba(247, 37, 133, 0.15);
    color: #f72585;
    border-color: rgba(247, 37, 133, 0.3);
}

/* --- Mensagens --- */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.chat-msg {
    max-width: 82%;
    padding: 0.65rem 0.9rem;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.55;
    animation: msg-in 0.25s ease both;
}

@keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-msg-bot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg-user {
    background: var(--gradient);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-msg p {
    margin: 0;
}

/* --- Typing indicator --- */
.chat-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.7rem 1rem;
    max-width: 72px;
}

.chat-typing span {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-cyan);
    animation: typing-dot 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%            { transform: translateY(-6px); opacity: 1; }
}

/* --- Input area --- */
.chat-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.55rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-input:focus {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.05);
}

.chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.35);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Responsivo mobile --- */
@media (max-width: 480px) {
    .chat-float-left {
        bottom: 1.2rem;
        left: 1rem;
    }

    .chat-widget {
        bottom: 5.5rem;
        left: 0.75rem;
        width: calc(100vw - 1.5rem);
    }

    .chat-window {
        height: 420px;
        border-radius: 16px;
    }

    .chat-fab {
        width: 46px;
        height: 46px;
    }
}

/* ===========================
   RESPONSIVE — OVERRIDES FINAIS
   (após estilos base para garantir cascata correta)
   =========================== */
@media (max-width: 768px) {
    /* About stats: sobrescreve width:fit-content e white-space:nowrap dos estilos base */
    .about-stats {
        width: 100%;
        margin: 2rem auto 0;
        justify-content: space-around;
        padding: 1.25rem 0.75rem;
    }

    .stat-item {
        padding: 0 0.75rem;
    }

    .stat-label {
        white-space: normal;
        text-align: center;
    }

    /* Section headers centralizados */
    .section-header {
        text-align: center;
    }

    .section-tag,
    .section-title {
        text-align: center;
    }

    .section-desc {
        margin-left: auto;
        margin-right: auto;
    }

    /* Project filters */
    .project-filters {
        justify-content: center;
    }

    /* Timeline */
    .timeline-content {
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .about-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        padding: 1rem 0.5rem;
    }

    .stat-item {
        flex: 1 1 calc(50% - 1rem);
        min-width: 80px;
        padding: 0.5rem;
    }

    .stat-divider {
        display: none;
    }
}