/* Reset e Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Altura aproximada do header; ajustada em mobile abaixo */
    --header-h: 80px;
}

html {
    scroll-behavior: smooth;
    /* Offset para navegação por âncoras (header sticky) */
    scroll-padding-top: var(--header-h);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f7f7;
    font-size: 16px;
}

/* Acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #007acc;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1001;
}

.skip-link:focus {
    top: 6px;
}

/* Header */
header {
    background: #fff;
    color: #333;
    padding: 0.8rem 0;
    /* Reduzido */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eaeaea;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
}

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

header nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    /* Reduzido */
}

header nav ul li a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: #007acc;
    /* Cor de destaque */
}

/* Seção Hero */
#hero {
    display: flex;
    align-items: center;
    /* Evita o header sobrepor o conteúdo em ancoragem e pequenas telas */
    min-height: calc(100vh - var(--header-h));
    padding: 4rem 2rem;
    /* Reduzido */
    background: #ffffff;
    flex-wrap: wrap;
    gap: 2rem;
    border-bottom: 1px solid #eaeaea;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    --mesh-x: 50%;
    --mesh-y: 50%;
    --mesh-spot-size: 240px;
    --mesh-cell: 52px;
}

#hero::before,
#hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

#hero::before {
    background-image:
        linear-gradient(rgba(0, 122, 204, 0.24) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 122, 204, 0.24) 1px, transparent 1px);
    background-size: var(--mesh-cell) var(--mesh-cell), var(--mesh-cell) var(--mesh-cell);
    animation: hero-mesh-flow 5s linear infinite;
    opacity: 0;
    transition: opacity 0.25s ease;
    -webkit-mask-image: radial-gradient(circle var(--mesh-spot-size) at var(--mesh-x) var(--mesh-y), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 34%, rgba(0, 0, 0, 0) 76%);
    mask-image: radial-gradient(circle var(--mesh-spot-size) at var(--mesh-x) var(--mesh-y), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 34%, rgba(0, 0, 0, 0) 76%);
    z-index: 0;
}

#hero.hero-mesh-active::before {
    opacity: 1;
}


#hero::after {
    background-image:
        linear-gradient(rgba(0, 122, 204, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 122, 204, 0.08) 1px, transparent 1px);
    background-size: var(--mesh-cell) var(--mesh-cell), var(--mesh-cell) var(--mesh-cell);
    animation: hero-mesh-flow 5s linear infinite;
    opacity: 0.9;
    z-index: -1;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-content-left {
    flex: 1;
    min-width: 300px;
}

.hero-content-left h1 {
    font-size: 3rem;
    /* Reduzido */
    color: #111;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content-left small {
    display: flex;
    font-size: 1.2rem;
    color: #007acc;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-subtitle {
    display: flex;
    font-size: 1.2rem;
    color: #007acc !important;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-content-left p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    /* Reduzido */
    color: #555;
    max-width: 1200px;
}

.hero-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
}

.hero-content-left .btn {
    display: inline-block;
    padding: 0.6rem 2rem;
    background: #007acc;
    border: 2px solid #007acc !important;
    color: #fff;
    text-decoration: none;
    text-wrap: nowrap;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.hero-content-left .btn:hover {
    background: #005f9e;
}

.hero-content-right {
    flex: 1;
    min-width: 300px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content-right img {
    max-width: 100%;
    border-radius: 100%;
    width: 300px;
    height: 300px;
    object-fit: cover;
}

.hero-image-frame {
    position: relative;
    width: 300px;
    height: 300px;
}

.hero-orbit {
    position: absolute;
    inset: -8px;
    width: calc(100% + 16px);
    height: calc(100% + 16px);
    pointer-events: none;
    animation: orbit-spin 11s linear infinite;
    transform-origin: center;
    overflow: visible;
}

.hero-orbit-ring {
    fill: none;
    stroke: #007acc;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 250 76;
    shape-rendering: geometricPrecision;
}

@keyframes orbit-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes hero-mesh-flow {
    from {
        background-position: 0 0, 0 0;
        transform: none;
    }

    50% {
        background-position: calc(var(--mesh-cell) * 0.5) calc(var(--mesh-cell) * 0.5), calc(var(--mesh-cell) * -0.5) calc(var(--mesh-cell) * 0.5);
        transform: none;
    }

    to {
        background-position: var(--mesh-cell) var(--mesh-cell), calc(var(--mesh-cell) * -1) var(--mesh-cell);
        transform: none;
    }
}

@keyframes hero-glow-drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-2.5%, 2%, 0) scale(1.05);
    }
}

.btn-secondary {
    background: transparent !important;
    color: #007acc !important;
    border: 2px solid #007acc !important;
}

/* Seção de Projetos */
#projects {
    padding: 4rem 2rem;
    /* Reduzido */
    background: #f7f7f7;
}

#projects h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    /* Reduzido */
    color: #111;
    font-weight: 700;
}

.projects-info {
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    padding: 0;
    text-align: center;
}

.projects-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.info-icon {
    margin-right: 0.3rem;
}

.external-link-symbol {
    font-weight: bold;
    color: #007acc;
}

.projects-info-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin: 0 0.2rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    border: 1px solid #dce9f5;
    background: #f4f9ff;
    color: #007acc;
}

.projects-info-link-icon svg {
    width: 0.72rem;
    height: 0.72rem;
    fill: currentColor;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    /* Reduzido */
    gap: 1.5rem;
    /* Reduzido */
    max-width: 1200px;
    margin: 0 auto;
}

.card-title {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    /* Reduzido */
}

.card-content p {
    display: block;
}

.maintenance-tag {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #fff4d6;
    color: #8a5a00;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.project-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.card-link-indicator {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    border: 1px solid #dce9f5;
    background: #f4f9ff;
    color: #007acc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-link-indicator svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.project-card.clickable:hover .card-title {
    color: #007acc;
}

.project-card.clickable:hover .card-link-indicator {
    background: #e7f3ff;
    border-color: #bfdcff;
}

.project-card.clickable:hover {
    border-color: #007acc;
}

.project-card.clickable {
    cursor: pointer;
}

.project-card p {
    color: #555;
    margin-bottom: 1.5rem;
}

.hero-technologies {
    margin: 0 0 1.2rem;
    max-width: 560px;
}

.technologies-marquee {
    width: 100%;
    overflow: hidden;
    margin-top: 0.4rem;
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.technologies-marquee:hover .technologies-marquee-content {
    animation-play-state: paused;
}

.technologies-marquee-content {
    display: flex;
    width: max-content;
    gap: 0.6rem;
    animation: tech-marquee-scroll 18s linear infinite;
}

.technologies-group {
    display: flex;
    gap: 0.5rem;
}

@keyframes tech-marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 0.3rem));
    }
}

.card-footer {
    display: flex;
    width: 100%;
    flex-direction: column;
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.github-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 2rem;
    background: #007acc;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    text-align: center  ;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.github-link:hover {
    background-color: #005f9e;
}

.technologies.card-footer {
    margin-top: auto;
    padding-top: 1rem;
}

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    background: #eef6fc;
    color: #007acc;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    /* Reduzido */
    font-weight: 500;
    white-space: nowrap;
}

.tech-badge-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tech-badge-clickable:hover {
    background: #007acc;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.2);
}

.tech-badge-clickable:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 122, 204, 0.15);
}

.tech-badge-clickable:focus-visible {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

.tech-badge-overflow {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tech-badge-overflow-trigger {
    cursor: pointer;
    border: 1px dashed #9dc6e8;
    background: #f4f9ff;
    color: #0065aa;
}

.tech-badge-overflow-stack {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 160px;
    max-width: 260px;
    padding: 0.45rem;
    border-radius: 10px;
    background: #1f2a37;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 12;
}

.tech-badge-overflow-item {
    border-radius: 10px;
    border: 1px solid #3f5b7d;
    background: #27364a;
    color: #e7f3ff;
    text-align: center;
}

.tech-badge-overflow-item:hover {
    border-color: #5cb6ff;
    box-shadow: none;
}

.tech-badge-overflow:hover .tech-badge-overflow-stack,
.tech-badge-overflow:focus-within .tech-badge-overflow-stack {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tech-badge-overflow:hover .tech-badge-overflow-stack,
.tech-badge-overflow:focus-within .tech-badge-overflow-stack {
    transform: translateX(-50%) translateY(0);
}

.tech-badge-overflow-trigger:focus-visible {
    outline: 2px solid #007acc;
    outline-offset: 2px;
}

/* Seções Sobre e Skills */
#about,
#skills {
    padding: 4rem 2rem;
    /* Reduzido */
    border-top: 1px solid #eaeaea;
}

#about {
    background: #fff;
}

#about h2,
#skills h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    /* Reduzido */
    color: #111;
    font-weight: 700;
}

#about p {
    font-size: 1.05rem;
    /* Reduzido */
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    text-align: center;
}

#about h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #111;
    font-size: 1.8rem;
}

.about-timeline {
    max-width: 900px;
    margin: 0 auto;
    padding-left: 1.2rem;
    border-left: 3px solid #d6e8f7;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    background: #fff;
    border: 1px solid #e7edf4;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    border-color: #007acc;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.95rem;
    top: 1.15rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: #007acc;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px #d6e8f7;
}

.timeline-date {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #007acc;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.timeline-title {
    margin: 0.35rem 0 0.55rem;
    color: #111;
    font-size: 1.1rem;
}

.timeline-description {
    margin: 0;
    color: #555;
    line-height: 1.65;
}

.timeline-tags {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.timeline-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    background: #eef6fc;
    color: #0065aa;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Skills - Badges Simples */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skills-category h4 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    color: #111;
    font-weight: 600;
}

.skills-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 25px;
    padding: 0.7rem 1.2rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: default;
}

.skill-badge:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border-color: #007acc;
}

.skill-badge .tech-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.skill-badge .tech-icon-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #eef6fc;
    color: #007acc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
}



/* removido o estilo antigo de estrelas */

/* Filtros de Categoria */
#category-filters {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.filter-btn.active {
    background: #007acc;
    color: #fff;
    border-color: #007acc;
}

/* Paginação */
#pagination-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #f0f0f0;
}

.pagination-btn.active {
    background: #007acc;
    color: #fff;
    border-color: #007acc;
}

/* Rodapé */
footer {
    padding: 2.4rem 1.5rem 1.2rem;
    background: #fff;
    color: #333;
    border-top: 1px solid #eaeaea;
}

.footer-shell {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(240px, 1.2fr) minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
    gap: 1.4rem;
    align-items: start;
}

.footer-brand h3 {
    margin-bottom: 0.6rem;
    font-size: 1.45rem;
    line-height: 1.25;
    color: #111;
}

.footer-brand p {
    max-width: 45ch;
    color: #555;
}

.footer-quick-links h4,
.footer-contact h4 {
    margin-bottom: 0.65rem;
    color: #111;
}

.footer-quick-links nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.footer-quick-links a {
    color: #555;
    text-decoration: none;
    width: fit-content;
    transition: color 0.2s ease;
}

.footer-quick-links a:hover {
    color: #007acc;
}

.footer-email {
    color: #555;
    text-decoration: none;
    font-weight: 500;
}

.footer-email:hover {
    color: #007acc;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 5px;
    border: 1px solid #e1e7ee;
    background: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.footer-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-block;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.55);
    opacity: 0.9;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.contact-item:hover {
    border-color: #bfdcff;
    background: #f4f9ff;
}

.contact-item:hover .footer-icon {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
}

.download-cv {
    display: flex;
    justify-content: flex-end;
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #007acc;
    border: 2px solid #007acc;
    color: #fff;
    padding: 0.65rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    text-wrap: nowrap;
}

.cv-download-btn:hover {
    background: #005f9e;
    box-shadow: 0 8px 20px rgba(0, 95, 158, 0.24);
    transform: translateY(-2px);
}

.cv-download-btn svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    margin-top: 1.6rem;
    padding-top: 1rem;
    border-top: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-bottom p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

.footer-back-top {
    color: #555;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-back-top:hover {
    color: #007acc;
}

@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .download-cv {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 2rem 1.2rem 1rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .footer-quick-links nav {
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }

    .download-cv {
        justify-content: center;
    }

    .cv-download-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .about-timeline {
        padding-left: 0.9rem;
        border-left-width: 2px;
    }

    .timeline-item {
        padding: 0.9rem 1rem;
    }

    .timeline-item::before {
        left: -1.4rem;
        width: 0.65rem;
        height: 0.65rem;
    }
}

/* Animação de entrada (fade-in) para seções */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-section {
    opacity: 0;
    transform: translateY(16px);
    will-change: opacity, transform;
}

.fade-section.visible {
    animation: fadeInUp 0.6s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .fade-section {
        opacity: 1 !important;
        transform: none !important;
    }
    .fade-section.visible {
        animation: none !important;
    }

    .technologies-marquee-content {
        animation: none !important;
        width: 100%;
        flex-wrap: wrap;
    }

    #hero::before,
    #hero::after {
        animation: none !important;
    }

    #hero::before {
        transition: none !important;
    }

    header {
        transition: none !important;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    :root { --header-h: 112px; }

    header {
        padding: 0.7rem 0;
        transition: transform 0.28s ease;
        will-change: transform;
    }

    header.header-hidden-mobile {
        transform: translateY(calc(-100% - 2px));
    }

    body {
        font-size: 16px;
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .header-logo {
        max-height: 60px;
        transition: opacity 0.22s ease, transform 0.22s ease, max-height 0.22s ease, margin 0.22s ease;
    }

    header:not(.header-at-top-mobile) .header-logo {
        opacity: 0;
        transform: translateY(-6px) scale(0.94);
        max-height: 0;
        margin: 0;
        pointer-events: none;
    }

    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem 1rem;
    }

    header nav ul li a {
        font-size: 1rem;
    }

    #hero {
        flex-direction: column-reverse;
        text-align: center;
        /* Mais espaço no topo para não colidir com o header empilhado */
        padding: calc(2rem + 8px) 1.25rem 2.5rem;
        min-height: calc(92vh - var(--header-h));
    }

    #hero::after {
        --mesh-cell: 36px;
        opacity: 0.82;
    }

    #hero::before {
        --mesh-spot-size: 170px;
    }

    .hero-content {
        flex-direction: column-reverse;
        align-items: center;
        gap: 1.4rem;
    }

    .hero-content-left,
    .hero-content-right {
        flex: 0 0 100%;
        min-width: 0;
        width: 100%;
    }

    .hero-content-left h1 {
        font-size: 2.2rem;
        /* Reduzido */
    }

    .hero-content-left small {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        justify-content: center;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        justify-content: center;
    }

    .hero-content-left p {
        font-size: 1rem;
        /* Reduzido */
        margin-bottom: 1.4rem;
    }

    .hero-content-left .btn{
        flex: 1;
        width: 100%;
    }

    .hero-technologies {
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .technologies-marquee {
        overflow: visible;
        mask-image: none;
    }

    .technologies-marquee-content {
        animation: none;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .technologies-group {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .technologies-group[aria-hidden="true"] {
        display: none;
    }

    .tech-badge {
        font-size: 0.72rem;
        padding: 0.25rem 0.7rem;
    }

    .hero-image-frame {
        width: min(68vw, 260px);
        height: min(68vw, 260px);
    }

    .hero-content-right img {
        width: 100%;
        height: 100%;
    }

    #projects,
    #about,
    #skills {
        padding: 3rem 1.5rem;
    }

    #projects h2,
    #about h2,
    #skills h2 {
        font-size: 2rem;
        /* Reduzido */
    }

    .projects-info {
        margin: 0 auto 1rem;
    }

    /* Ajustes para badges em mobile */
    .skills-badges {
        gap: 0.7rem;
    }

    .skill-badge {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .skill-badge .tech-icon {
        width: 18px;
        height: 18px;
    }

    .skill-badge .tech-icon-badge {
        width: 18px;
        height: 18px;
        font-size: 0.55rem;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-content-left .btn{
        flex: 1;
        width: 100%;
    }
    
    /* Ajustes para badges em tablet */
    .skills-badges {
        gap: 0.8rem;
    }

    .skill-badge {
        padding: 0.6rem 1.1rem;
    }
}

/* Garante offset por seção ao usar links com # âncora */
section { scroll-margin-top: var(--header-h); }