/* ==================== */
/* Variáveis CSS        */
/* ==================== */

:root {
    --primary-gradient: linear-gradient(135deg, #5b9cf6 0%, #7c6ff7 100%);
    --header-bg: rgba(11, 11, 14, 0.75);
    --text-light: #f0f0f2;
    --text-gray: #6b7280;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-bg-hover: rgba(255, 255, 255, 0.07);
    --border-color: rgba(255, 255, 255, 0.07);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.4);
    --accent: #5b9cf6;
    --accent-rgb: 91, 156, 246;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-heading: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
}

/* ==================== */
/* Reset e Base         */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0b0b0e;
}
::-webkit-scrollbar-thumb {
    background: rgba(91, 156, 246, 0.35);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 156, 246, 0.6);
}

/* Text selection */
::selection {
    background: rgba(91, 156, 246, 0.3);
    color: #fff;
}

/* Focus ring */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: #0b0b0e;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::after {
    content: '';
    position:  fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(91, 156, 246, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(124, 111, 247, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ==================== */
/* Header               */
/* ==================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
    position: relative;
    transition: color 0.3s ease;
}

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

.logo-group:hover .logo-text {
    color: var(--accent);
}

.logo-group:hover .logo-text::after {
    width: 100%;
}

.nav {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    position: relative;
    transition: var(--transition);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

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

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


/* ==================== */
/* Hero Section         */
/* ==================== */

.hero {
    margin-top: 150px;
    min-height: 50vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow: visible;
    padding: var(--spacing-lg) var(--spacing-md);
}

.page-about .hero {
    margin-bottom: -250px;
}
.page-about .footer{
    margin-top: -70px;
}

.page-contact .hero {
    margin-bottom: -250px;
}
.page-contact .footer {
    margin-top: -70px;
}
.page-contact .back-section {
    margin-top: 20px;
    margin-bottom: 40px;
}





.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 800px;
    -webkit-user-select: none;
    user-select: none;
}

.hero-greeting {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: var(--spacing-sm);
    opacity: 1;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    animation: heroEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
    min-height: 1.2em;
}

.hero-greeting::after {
    content: '|';
    display: inline-block;
    margin-left: 1px;
    animation: blink 0.9s step-end infinite;
    color: var(--accent);
    opacity: 0; /* hidden by default; JS enables it when typewriter starts */
}

.hero-greeting.typing::after {
    opacity: 1;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Accent gradient span inside headings */
.accent-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: var(--text-light);
    line-height: 1.05;
    letter-spacing: -0.04em;
    animation: heroEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--spacing-lg);
    line-height: 1.75;
    letter-spacing: 0.005em;
    animation: heroEnter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.18;
    will-change: transform;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #5b9cf6, #7c6ff7);
    top: 10%;
    right: -10%;
    animation: float 6s ease-in-out infinite;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #7c6ff7, #5b9cf6);
    bottom: 20%;
    left: -5%;
    animation: float 7s ease-in-out infinite 1s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #5b9cf6, #7c6ff7);
    top: 50%;
    left: 50%;
    animation: float 8s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

/* ==================== */
/* Buttons              */
/* ==================== */

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 1.5s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-light);
    box-shadow: 0 4px 20px rgba(91, 156, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(91, 156, 246, 0.5);
}

.btn-secondary {
    background: rgba(91, 156, 246, 0.07);
    color: var(--text-light);
    border: 1px solid rgba(91, 156, 246, 0.18);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(91, 156, 246, 0.14);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(91, 156, 246, 0.15);
    border-color: rgba(91, 156, 246, 0.35);
}

/* ==================== */
/* Projects Section     */
/* ==================== */

.projects {
    position: relative;
    z-index: 10;
    margin-top: 0;
    padding-top: 1rem;
    /* padding-bottom: 1rem; */
    background: transparent;
    contain: layout;
}

.projects-container {
    max-width: 1200px;
    margin: 0 auto;
}

.projects-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 20px;
}

.section-title {
    color: var(--text-light);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: var(--spacing-sm);
    -webkit-user-select: none;
    user-select: none;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.7;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(91, 156, 246, 0.06);
    border: 1px solid rgba(91, 156, 246, 0.15);
    color: #93c5fd;
    font-size: 0.85rem;
    margin-bottom: var(--spacing-sm);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

/* ==================== */
/* Cards                */
/* ==================== */

.card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: 
        transform 1s ease,
        box-shadow 1s cubic-bezier(0.4, 0, 0.2, 1),
        background 1s ease,
        border-color 1s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(91, 156, 246, 0.15),
                0 0 30px rgba(91, 156, 246, 0.06);
    border-color: rgba(91, 156, 246, 0.604);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 40%);
    opacity: 0;
    transition: opacity 1.5s ease;
    z-index: 1;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, rgba(91, 156, 246, 0.06), rgba(124, 111, 247, 0.06));
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.7);
}

.card-content {
    position: relative;
    z-index: 2;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.28);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.01em;
}

.card-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.card .btn-secondary {
    align-self: center;
    margin-top: auto;
}

.card-link-icon {
    margin-left: 0.4rem;
    opacity: 0.85;
}

/* ==================== */
/* Contact Section      */
/* ==================== */

.contact {
    position: relative;
    z-index: 10;
    padding: var(--spacing-xl) var(--spacing-md);
    margin: var(--spacing-xl) 0;
    display: none;
}

/* ==================== */
/* Back Section         */
/* ==================== */

.back-section {
    position: relative;
    z-index: 10;
    padding: var(--spacing-xl) var(--spacing-md);
    /* margin: var(--spacing-xl) 0; */
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.about-content {
    position: relative;
    z-index: 10;
    padding-top: var(--spacing-xl);
    padding-bottom: 10px;
    background: transparent;
    contain: layout;
}

.page-about .about-content {
    margin-bottom: -120px;
}

.page-contact .about-content {
    margin-bottom: -120px;
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.about-section {
    background: rgba(91, 156, 246, 0.04);
    border: 1px solid rgba(91, 156, 246, 0.1);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    transition: var(--transition);
}

.about-section:hover {
    background: rgba(91, 156, 246, 0.07);
    border-color: rgba(91, 156, 246, 0.2);
}

.about-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    font-size: 1rem;
}

.experience-item {
    margin-bottom: var(--spacing-md);
}

.experience-item h3 {
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.experience-date {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

/* ==================== */
/* Footer               */
/* ==================== */

.footer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    margin-top: 25px;
    position: relative;
    z-index: 10;
    contain: layout;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--text-light);

    /* Transições suaves (entrada + saída) */
    transition: 
        transform 1.5s cubic-bezier(0.16, 1, 0.3, 1),
        background 1.5s ease,
        border-color 1.5s ease,
        box-shadow 1.5s cubic-bezier(0.16, 1, 0.3, 1);

    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);

    /* melhora performance */
    will-change: transform;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);

    /* leve profundidade */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}


.social-icon.linkedin,
.social-icon.github,
.social-icon.email {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-bottom {
    text-align: center;
    width: 100%;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* ==================== */
/* Nav Toggle (Burger)  */
/* ==================== */

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 10px;
    cursor: pointer;
    z-index: 1001;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 998;
    backdrop-filter: blur(2px);
}

.nav-overlay.active {
    display: block;
}

/* ==================== */
/* Responsividade       */
/* ==================== */

@media (max-width: 1024px) {
    .nav {
        gap: var(--spacing-md);
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 80vw);
        height: 100dvh;
        background: rgba(11, 11, 14, 0.98);
        backdrop-filter: blur(24px);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
        padding: 90px var(--spacing-md) var(--spacing-md);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 999;
        will-change: transform;
    }

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

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
    }

    .hero {
        margin-top: 70px;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    /* .projects {
        padding: var(--spacing-lg) var(--spacing-sm);
    } */

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .blob-1 { width: 150px; height: 150px; }
    .blob-2 { width: 120px; height: 120px; }
    .blob-3 { width: 100px; height: 100px; }

    .social-links {
        gap: var(--spacing-sm);
        flex-wrap: wrap;
    }

    .social-icon {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .about-content {
        padding: var(--spacing-lg) var(--spacing-sm);
        margin: var(--spacing-md) 0;
    }

    .page-about .hero {
        margin-bottom: 0;
    }

    .page-about .about-content {
        margin-bottom: 0;
    }

    .page-about .footer {
        margin-top: 25px;
    }

    .page-contact .hero {
        margin-bottom: 0;
    }

    .page-contact .about-content {
        margin-bottom: 0;
    }

    .page-contact .footer {
        margin-top: 25px;
    }

    .back-section {
        padding: var(--spacing-md) var(--spacing-sm);
        margin: 0;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }

    .hero {
        margin-top: 66px;
        min-height: 40vh;
    }

    .hero-title {
        margin-bottom: var(--spacing-md);
    }

    .section-title {
        font-size: 1.8rem;
    }

    .card {
        border-radius: var(--border-radius);
    }

    .card-image {
        height: 180px;
    }

    .btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.9rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .footer {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
}

@media (max-width: 360px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 1.75rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .hero-title {
        letter-spacing: -0.03em;
    }
}

/* ==================== */
/* Scroll Progress Bar  */
/* ==================== */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--primary-gradient);
    z-index: 1001;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(91, 156, 246, 0.5);
}

/* ==================== */
/* Back to Top Button   */
/* ==================== */

#back-to-top {
    position: fixed;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(91, 156, 246, 0.4);
    opacity: 0;
    transform: translateY(12px) scale(0.85);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 900;
    will-change: transform, opacity;
}
#back-to-top span {
    display: inline-block;
    transform: translateY(-3px); /* 🔥 AQUI você controla */
}


#back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#back-to-top:hover {
    transform: translateY(3px) scale(1.08);
    box-shadow: 0 1px 28px rgba(91, 156, 246, 0.55);
}

/* ==================== */
/* Utilities            */
/* ==================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ==================== */
/* Animations           */
/* ==================== */

@keyframes heroEnter {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes iconPulse {
    0%   { transform: translateY(0) scale(1); }
    45%  { transform: translateY(-8px) scale(1.14); }
    100% { transform: translateY(-5px) scale(1); }
}

/* Scroll reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
}

[data-reveal][data-delay="1"] { transition-delay: 0.08s; }
[data-reveal][data-delay="2"] { transition-delay: 0.16s; }
[data-reveal][data-delay="3"] { transition-delay: 0.24s; }
[data-reveal][data-delay="4"] { transition-delay: 0.32s; }
[data-reveal][data-delay="5"] { transition-delay: 0.40s; }
[data-reveal][data-delay="6"] { transition-delay: 0.48s; }

/* Restaura transição completa nos cards (evita conflito com [data-reveal]) */
.card[data-reveal] {
    transition:
        transform 1s ease,
        box-shadow 1s cubic-bezier(0.4, 0, 0.2, 1),
        background 1s ease,
        border-color 1s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Active nav link */
.nav-link-active {
    color: var(--accent);
}

.nav-link-active::after {
    width: 100%;
}

/* Active logo (index.html) */
.logo-text-active {
    color: var(--accent);
    transition: none;
}

.logo-text-active::after {
    width: 100%;
    transition: none;
}

.logo-group:hover .logo-text-active {
    color: var(--accent);
}

.logo-group:hover .logo-text-active::after {
    width: 100%;
}

/* Header scroll state */
.header {
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.header.scrolled {
    background: rgba(11, 11, 14, 0.97);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    #scroll-progress {
        transition: none;
    }

    .hero-greeting::after {
        animation: none;
    }
}

/* ============================= */
/* Skills Page                   */
/* ============================= */

.skill-category {
    margin-bottom: var(--spacing-xl);
}

.skill-category h3 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid;
    border-image: var(--primary-gradient) 1;
    padding-left: var(--spacing-md);
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

.skill-badge {
    background: rgba(91, 156, 246, 0.1);
    color: var(--text-light);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 50px;
    border: 1px solid rgba(91, 156, 246, 0.25);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.skill-badge:hover {
    background: rgba(91, 156, 246, 0.2);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(91, 156, 246, 0.2);
}

/* ============================= */
/* Contact Page                  */
/* ============================= */


.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.info-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    background: var(--card-bg-hover);
    box-shadow: var(--shadow);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.info-card h3 {
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.info-card p {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================= */
/* Social Page                   */
/* ============================= */

.section-intro {
    max-width: 760px;
    margin: 0 auto var(--spacing-xl);
    text-align: center;
}

.section-eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--spacing-md);
    margin: 0 auto var(--spacing-xl);
    max-width: 1000px;
}

.stat {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(91, 156, 246, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: left;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.stat::before {
    content: '';
    position: absolute;
    inset: auto -20px -20px auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.stat:hover {
    transform: translateY(-6px);
    border-color: rgba(91, 156, 246, 0.3);
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

.stat h3 {
    color: var(--text-light);
    font-size: 2rem;
    margin: 0;
}

.stat p {
    color: rgba(255, 255, 255, 0.74);
    margin: var(--spacing-sm) 0 0;
    font-size: 0.92rem;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-xl) auto;
    max-width: 1100px;
}

.social-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06));
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: var(--spacing-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    min-height: 100%;
    box-shadow: var(--shadow-light);
}

.social-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 45%);
    opacity: 0;
    transition: var(--transition);
}

.social-card:hover {
    transform: translateY(-10px);
    background: var(--card-bg-hover);
    box-shadow: var(--shadow);
    border-color: rgba(255, 255, 255, 0.28);
}

.social-card:hover::before {
    opacity: 1;
}

.social-card.facebook:hover { border-color: #1877f2; }
.social-card.instagram:hover { border-color: #e1306c; }
.social-card.twitter:hover  { border-color: #1da1f2; }
.social-card.linkedin:hover { border-color: #0077b5; }
.social-card.github:hover   { border-color: #f5f5f5; }
.social-card.email:hover    { border-color: #5b9cf6; }

.social-top,
.social-footer {
    position: relative;
    z-index: 1;
}

.social-top {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.social-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.social-card.facebook .social-icon-wrap { background: rgba(24, 119, 242, 0.18); }
.social-card.instagram .social-icon-wrap { background: rgba(225, 48, 108, 0.18); }
.social-card.twitter .social-icon-wrap  { background: rgba(29, 161, 242, 0.18); }
.social-card.linkedin .social-icon-wrap { background: rgba(0, 119, 181, 0.18); }
.social-card.github .social-icon-wrap   { background: rgba(255, 255, 255, 0.14); }

.social-meta h2 {
    color: var(--text-light);
    font-size: 1.35rem;
    margin: 0;
}

.social-handle {
    display: block;
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.92rem;
    margin-top: 0.1rem;
}

.social-description {
    position: relative;
    z-index: 1;
    font-size: 0.96rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
    margin: 0;
}

.social-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: auto;
    flex-wrap: wrap;
}

.social-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.15rem;
    background: var(--primary-gradient);
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(91, 156, 246, 0.3);
}


@media (max-width: 768px) {
    .social-top {
        flex-direction: column;
        text-align: center;
    }

    .social-card {
        text-align: center;
    }

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

}

/* ============================= */
/* Project Pages                 */
/* ============================= */
.project-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-xxl) var(--spacing-lg);
}

.project-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.project-tag-label {
    background: rgba(91, 156, 246, 0.12);
    color: var(--accent);
    padding: 0.35em 1.1em;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid rgba(91, 156, 246, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.project-description-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.project-description-block h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0 0 var(--spacing-md);
    color: var(--text-light);
}

.project-description-block p {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.85;
    margin: 0;
}

.tech-section {
    margin-bottom: var(--spacing-xl);
}

.tech-section > h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-light);
}

.tech-group {
    margin-bottom: var(--spacing-lg);
}

.tech-group h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tech-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.tech-highlight-card {
    background: rgba(91, 156, 246, 0.07);
    border: 1px solid rgba(91, 156, 246, 0.18);
    border-radius: 14px;
    padding: var(--spacing-lg);
    transition: var(--transition);
}

.tech-highlight-card:hover {
    background: rgba(91, 156, 246, 0.14);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(91, 156, 246, 0.15);
}

.tech-highlight-card .tech-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.tech-highlight-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--accent);
    margin: 0 0 0.4em;
}

.tech-highlight-card p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.55;
}

.project-link-section {
    text-align: center;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: var(--spacing-xl);
}

.project-link-section p {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--spacing-lg);
    font-size: 0.92rem;
}

@media (max-width: 600px) {
    .tech-highlight-grid {
        grid-template-columns: 1fr 1fr;
    }
    .project-detail {
        padding: var(--spacing-xl) var(--spacing-md);
    }
}
