/* Base Variables */
:root {
    --bg-color: #f8f6ff;
    --bg-soft: #eef6ff;
    --text-main: #17245c;
    --text-muted: #5f6690;
    --accent-primary: #7b4dff;
    --accent-secondary: #58d3ff;
    --accent-gradient: linear-gradient(135deg, #58d3ff 0%, #7b4dff 55%, #9b6dff 100%);

    --card-bg: rgba(255, 255, 255, 0.72);
    --border-color: rgba(123, 77, 255, 0.18);
    --shadow-soft: 0 24px 70px rgba(123, 77, 255, 0.14);
    --shadow-hover: 0 28px 80px rgba(79, 124, 255, 0.22);

    --font-display: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
    --container-width: 1200px;
}

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

body {
    background:
        radial-gradient(circle at 12% 12%, rgba(88, 211, 255, 0.18), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(123, 77, 255, 0.16), transparent 30%),
        radial-gradient(circle at 50% 90%, rgba(155, 109, 255, 0.12), transparent 35%),
        linear-gradient(135deg, var(--bg-color) 0%, var(--bg-soft) 52%, #ffffff 100%);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section {
    padding: 120px 0;
    position: relative;
    width: 100%;
}


/* 
========================================
   INTRO OVERLAY - SG Web Atelier Style
========================================
*/
#intro-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 25% 20%, rgba(88, 211, 255, 0.25), transparent 28%),
        radial-gradient(circle at 75% 70%, rgba(123, 77, 255, 0.24), transparent 32%),
        linear-gradient(135deg, #f8f6ff 0%, #eef6ff 50%, #ffffff 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    pointer-events: auto;
}

#intro-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.32;
    background-image:
        linear-gradient(rgba(23, 36, 92, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 36, 92, 0.04) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black, transparent 72%);
}

.intro-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.intro-symbol {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 28px;
    background: var(--accent-gradient);
    box-shadow:
        0 20px 55px rgba(123, 77, 255, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    animation: introFloat 1.8s ease-in-out infinite alternate;
}

.intro-symbol::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.intro-symbol span {
    position: absolute;
    display: block;
    background: #ffffff;
    border-radius: 999px;
    transform: rotate(-45deg);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.45);
}

.intro-symbol span:nth-child(1) {
    width: 22px;
    height: 7px;
    left: 16px;
    top: 34px;
    transform: rotate(-45deg) skewX(-18deg);
}

.intro-symbol span:nth-child(2) {
    width: 22px;
    height: 7px;
    right: 16px;
    top: 34px;
    transform: rotate(135deg) skewX(18deg);
}

.intro-symbol span:nth-child(3) {
    width: 7px;
    height: 38px;
    left: 34px;
    top: 19px;
    transform: rotate(-45deg);
}

.intro-text {
    min-height: 38px;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 3vw, 2rem);
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: -0.03em;
}

.intro-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    background: radial-gradient(circle, rgba(88, 211, 255, 0.9), rgba(123, 77, 255, 0.12));
    box-shadow: 0 0 32px rgba(123, 77, 255, 0.35);
    transform: translate(-50%, -50%);
    opacity: 0;
}

@keyframes introFloat {
    from {
        transform: rotate(45deg) translateY(0) scale(1);
    }

    to {
        transform: rotate(45deg) translateY(-8px) scale(1.04);
    }
}

@media (max-width: 768px) {
    .intro-symbol {
        width: 64px;
        height: 64px;
        border-radius: 23px;
    }

    .intro-text {
        font-size: 1.25rem;
    }

    .intro-cursor {
        display: none;
    }
}

/* 
========================================
   NAVIGATION
========================================
*/
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: background 0.3s ease, padding 0.3s ease;
}

.top-nav.scrolled {
    background: rgba(248, 246, 255, 0.82);
    backdrop-filter: blur(16px);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    font-family: var(--font-display);
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

.nav-btn {
    padding: 10px 20px;
    background: var(--accent-gradient);
    color: #fff !important;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 12px 28px rgba(123, 77, 255, 0.22);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(79, 124, 255, 0.28);
}


/* 
========================================
   HERO SECTION
========================================
*/
.hero-section {
    min-height: 100vh;
    padding-top: 100px;
    /* Reduced specific padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
    gap: 40px;
}

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

.hero-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 6.5rem);
    /* Slightly tighter */
    margin-bottom: 30px;
    letter-spacing: -0.04em;
    /* Tighter tracking */
}

.hero-title .line-wrapper {
    overflow: hidden;
    display: block;
    line-height: 1.1;
}

.hero-title .word {
    display: inline-block;
    transform: translateY(110%);
    /* For animation */
}

.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 50px;
    line-height: 1.6;
    opacity: 0;
}

.accent-text {
    color: var(--accent-primary);
    font-weight: 700;
}

.hero-actions {
    display: flex;
    gap: 20px;
    opacity: 0;
}

.btn {
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 16px 35px rgba(123, 77, 255, 0.24);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(79, 124, 255, 0.3);
}

.btn-secondary {
    border-color: rgba(123, 77, 255, 0.22);
    background: rgba(255, 255, 255, 0.48);
    color: var(--text-main);
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--accent-primary);
}

/* Profile Photo */
.hero-profile {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    opacity: 0;
}

.profile-img {
    width: 100%;
    max-width: 350px;
    border-radius: 40px;
    box-shadow:
        0 28px 80px rgba(123, 77, 255, 0.22),
        -18px -18px 55px rgba(255, 255, 255, 0.75);
    transform: rotate(-3deg);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.62);
}

.profile-img:hover {
    transform: rotate(0deg) scale(1.02);
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-profile {
        order: -1;
        margin-top: 40px;
        margin-bottom: 20px;
    }
}


/* 
========================================
   SCROLL SEQUENCE 1: EXPAND + SLIDE
========================================
*/
.scroll-sequence-section {
    width: 100%;
    position: relative;
    z-index: 10;
}

.sequence-pin-wrapper {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-color), var(--bg-soft));
}

.feature-card {
    width: 400px;
    height: 500px;
    border-radius: 24px;
    overflow: hidden;
    position: absolute;
    z-index: 2;
    box-shadow: 0 30px 90px rgba(123, 77, 255, 0.22);
    transform-origin: center center;
    border: 1px solid rgba(255, 255, 255, 0.55);
}

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

.horizontal-track-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 3;
    pointer-events: none;
}

.horizontal-track {
    display: flex;
    gap: 40px;
    padding-left: 100vw;
    padding-right: 100px;
    width: max-content;
    pointer-events: auto;
}

.slide-item {
    width: 60vw;
    max-width: 800px;
    height: 60vh;
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    border-radius: 24px;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.project-slide-card {
    position: relative;
    width: 60vw;
    max-width: 900px;
    height: 68vh;
    min-height: 520px;
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 36px;
    background: #ffffff;
    border: 1px solid rgba(123, 77, 255, 0.16);
    box-shadow: 0 28px 80px rgba(123, 77, 255, 0.14);
}

.project-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.project-slide-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top,
            rgba(20, 28, 70, 0.82) 0%,
            rgba(20, 28, 70, 0.42) 38%,
            rgba(20, 28, 70, 0.12) 68%,
            rgba(20, 28, 70, 0.03) 100%);
    z-index: 1;
}

.project-slide-info {
    position: relative;
    z-index: 2;
    width: 100%;
    color: #ffffff;
}

.project-slide-info .slide-category {
    color: #d7c8ff;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
    display: block;
}

.project-slide-info .slide-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    margin-bottom: 24px;
    color: #ffffff;
    max-width: 700px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.project-tech span {
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.project-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.project-links a {
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
}

.project-links a:first-child {
    color: #ffffff;
    background: linear-gradient(135deg, #58d3ff 0%, #7b4dff 60%, #9b6dff 100%);
    box-shadow: 0 18px 40px rgba(123, 77, 255, 0.22);
}

.project-links a:last-child {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.project-links a:hover {
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .project-slide-card {
        width: 82vw;
        min-height: 440px;
        height: 72vh;
        padding: 24px;
    }

    .project-slide-info .slide-title {
        font-size: 2rem;
    }

    .project-links a {
        width: 100%;
        text-align: center;
    }
}

.slide-category {
    font-size: 0.9rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    font-weight: 700;
}

.slide-title {
    font-size: 3rem;
    margin-bottom: 30px;
}

.slide-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
}


/* 
========================================
   SCROLL SEQUENCE 2: 3D CAROUSEL (CENTER)
========================================
*/
.carousel-3d-section {
    width: 100%;
    position: relative;
    z-index: 9;
    overflow: hidden;
    background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.8), transparent 70%);
}

.carousel-3d-container {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
    /* Essential for 3D effect */
}

/* The rotating ring */
.carousel-3d-wheel {
    width: 1000px;
    /* Diameter of ring logic */
    height: 600px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s linear;
    /* GSAP usually overrides, but good fallback */
}

.wheel-3d-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 350px;
    margin-left: -250px;
    /* Center */
    margin-top: -175px;

    transform-style: preserve-3d;
}

/* 
   3 Items in a circle (0, 120, 240 deg).
   Radius Z: translateZ(500px).
   Since we want them facing OUT, and we are INSIDE or looking at it?
   User asked for "rotating wheel/ring in the CENTER".
   
   Let's place them around a circle.
*/
/* 4 cards distribuídos igualmente pela roda 3D */
.wheel-3d-item:nth-child(1) {
    transform: rotateY(0deg) translateZ(600px);
}

.wheel-3d-item:nth-child(2) {
    transform: rotateY(90deg) translateZ(600px);
}

.wheel-3d-item:nth-child(3) {
    transform: rotateY(180deg) translateZ(600px);
}

.wheel-3d-item:nth-child(4) {
    transform: rotateY(270deg) translateZ(600px);
}

/* ==================================================
   BACK-END PROJECT CARDS — VIDEO + DIAGONAL GLASS
================================================== */

.wheel-card.backend-project-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;

    color: #ffffff;
    text-align: left;
    text-decoration: none;

    background:
        radial-gradient(circle at 75% 18%,
            rgba(88, 211, 255, 0.22),
            transparent 38%),
        linear-gradient(145deg,
            #111942 0%,
            #20245e 52%,
            #44318e 100%);

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 26px;

    box-shadow:
        0 32px 90px rgba(33, 30, 90, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    transition:
        box-shadow 0.45s ease,
        border-color 0.45s ease;
}

/*
Não usamos transform no card externo.
A rotação continua pertencendo ao .wheel-3d-item.
*/
.wheel-card.backend-project-card:hover {
    border-color: rgba(158, 234, 255, 0.62);

    box-shadow:
        0 38px 110px rgba(55, 45, 145, 0.38),
        0 0 42px rgba(88, 211, 255, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}


/* Parte superior: vídeo recortado pela diagonal */
.backend-video-area {
    position: absolute;
    inset: 0;
    z-index: 1;

    overflow: hidden;

    clip-path: polygon(0 0,
            100% 0,
            100% 58%,
            0 73%);

    background:
        radial-gradient(circle at 70% 15%,
            rgba(88, 211, 255, 0.3),
            transparent 36%),
        linear-gradient(135deg,
            #17245c,
            #5538a3);
}

.backend-video-area video {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    transition:
        transform 0.8s var(--ease-out),
        filter 0.5s ease;
}

.backend-project-card:hover .backend-video-area video {
    transform: scale(1.045);
    filter: saturate(1.08) contrast(1.03);
}


/* Mantém o texto superior legível sobre qualquer vídeo */
.backend-video-shade {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(to bottom,
            rgba(7, 10, 34, 0.14) 0%,
            rgba(7, 10, 34, 0.02) 42%,
            rgba(7, 10, 34, 0.55) 100%);
}


/* Etiqueta da linguagem no topo */
.backend-project-language {
    position: absolute;
    top: 22px;
    left: 24px;

    padding: 8px 13px;

    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    background: rgba(12, 17, 50, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow: 0 10px 28px rgba(5, 8, 28, 0.2);
}


/* Parte inferior fosca com recorte diagonal inverso */
.backend-card-info {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;

    min-height: 45%;
    padding: 48px 30px 24px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    background:
        linear-gradient(145deg,
            rgba(255, 255, 255, 0.9),
            rgba(235, 225, 255, 0.8));

    border-top: 1px solid rgba(123, 77, 255, 0.22);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    clip-path: polygon(0 18%,
            100% 0,
            100% 100%,
            0 100%);
}


/* Linha luminosa acompanhando a diagonal */
.backend-card-info::before {
    content: "";
    position: absolute;

    top: 33px;
    left: -3%;
    width: 106%;
    height: 1px;

    background: linear-gradient(90deg,
            transparent,
            rgba(158, 234, 255, 0.72),
            rgba(190, 167, 255, 0.7),
            transparent);

    transform: rotate(-5.4deg);
    transform-origin: center;

    box-shadow: 0 0 14px rgba(88, 211, 255, 0.34);
}


.backend-project-type {
    margin-bottom: 7px;

    color: #9eeaff;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}


.backend-card-info h3 {
    margin: 0 0 9px;

    color: #ffffff;
    font-size: clamp(1.55rem, 2.2vw, 2.15rem);
    line-height: 1.02;
    letter-spacing: -0.045em;

    text-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
}


.backend-card-info p {
    max-width: 430px;
    margin-bottom: 14px;

    color: rgba(238, 242, 255, 0.8);
    font-size: 0.82rem;
    line-height: 1.45;
}


.backend-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-bottom: 15px;
}

.backend-tech span {
    padding: 5px 9px;

    color: rgba(255, 255, 255, 0.9);
    font-size: 0.65rem;
    font-weight: 700;

    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

/* Botões dos projetos backend */
.backend-project-actions {
    width: 100%;
    margin-top: auto;

    display: flex;
    align-items: center;
    gap: 10px;
}

.backend-action {
    min-height: 36px;
    padding: 8px 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border-radius: 999px;

    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.backend-action-primary {
    color: #ffffff;

    background:
        linear-gradient(135deg,
            #9b6dff 0%,
            #7b4dff 55%,
            #6840d1 100%);

    border: 1px solid rgba(123, 77, 255, 0.25);

    box-shadow:
        0 10px 24px rgba(123, 77, 255, 0.22);
}

.backend-action-secondary {
    color: #5e3cad;

    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(123, 77, 255, 0.22);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.backend-action:hover {
    transform: translateY(-2px);
}

.backend-action-primary:hover {
    box-shadow:
        0 14px 30px rgba(123, 77, 255, 0.32);
}

.backend-action-secondary:hover {
    color: #4e2d9e;
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(123, 77, 255, 0.45);
}

.backend-action:focus-visible {
    outline: 3px solid rgba(123, 77, 255, 0.45);
    outline-offset: 3px;
}

@media (max-width: 560px) {
    .backend-project-actions {
        gap: 7px;
    }

    .backend-action {
        padding: 8px 10px;
        font-size: 0.64rem;
    }
}

/* Foco de teclado */
.backend-project-card:focus-visible {
    outline: 3px solid rgba(88, 211, 255, 0.85);
    outline-offset: 6px;
}


/* Mobile */
@media (max-width: 900px) {
    .wheel-3d-item {
        width: min(82vw, 460px);
        height: 330px;
        margin-left: calc(min(82vw, 460px) / -2);
        margin-top: -165px;
    }

    .backend-card-info {
        min-height: 56%;
        padding: 62px 22px 20px;
    }

    .backend-card-info h3 {
        font-size: 1.55rem;
    }

    .backend-card-info p {
        font-size: 0.76rem;
    }
}

@media (max-width: 560px) {
    .wheel-3d-item {
        width: 86vw;
        height: 320px;
        margin-left: -43vw;
        margin-top: -160px;
    }

    .backend-card-info {
        min-height: 60%;
        padding: 58px 19px 18px;
    }

    .backend-card-info p {
        display: none;
    }

    .backend-tech {
        margin-bottom: 12px;
    }
}

/* 
========================================
   STATS SECTION
========================================
*/
.stats-section {
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* 
========================================
   MARKETING / CREATIVE / DEV GRIDS
========================================
*/
.grid-section-header {
    margin-bottom: 80px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.section-label {
    color: var(--accent-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    display: block;
}

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

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.content-card {
    background: var(--card-bg);
    backdrop-filter: blur(18px);
    border-radius: 18px;
    padding: 40px;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
    box-shadow: var(--shadow-soft);
}

.content-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(88, 211, 255, 0.5);
}

.card-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.8rem;
    background: rgba(123, 77, 255, 0.08);
    border: 1px solid rgba(123, 77, 255, 0.12);
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--text-muted);
    font-weight: 600;
}

.card-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.card-link {
    font-weight: 600;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.content-card:hover .card-link::after {
    transform: translateX(5px);
}


.creative-section {
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(12px);
}

/* 
========================================
   CONTACT
========================================
*/
.contact-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 30%, rgba(123, 77, 255, 0.16), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f3f0ff 55%, #eef6ff 100%);
}

.contact-container {
    text-align: center;
}

.contact-heading {
    font-size: clamp(3rem, 6vw, 6rem);
    margin-bottom: 40px;
    line-height: 1;
}

.email-huge {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-main);
    position: relative;
    display: inline-block;
}

.email-huge::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--accent-gradient);
    transition: width 0.5s var(--ease-out);
}

.email-huge:hover::after {
    width: 100%;
}

/* 
========================================
   FOOTER
========================================
*/
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.46);
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    font-family: var(--font-display);
    color: var(--text-main);
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.02em;
}

.nav-logo .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
}

.nav-logo .dot {
    display: inline-block;
    color: var(--accent-primary);
    animation: dotPulse 1.8s ease-in-out infinite;
}

@keyframes dotPulse {

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

    50% {
        transform: scale(1.18);
        opacity: 0.75;
    }
}

.orbit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 240px;
    height: 240px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.planet {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.25) 16%, transparent 17%),
        radial-gradient(circle at 40% 38%, rgba(198, 238, 255, 0.55), transparent 30%),
        radial-gradient(circle at 68% 72%, rgba(123, 77, 255, 0.35), transparent 28%),
        linear-gradient(135deg, #e7dcff 0%, #b7d9ff 35%, #8ccfff 55%, #a57dff 100%);
    box-shadow:
        0 0 30px rgba(123, 77, 255, 0.22),
        0 0 90px rgba(88, 211, 255, 0.18),
        inset -18px -20px 40px rgba(83, 49, 171, 0.18),
        inset 12px 12px 24px rgba(255, 255, 255, 0.4);
    animation: planetFloat 5s ease-in-out infinite;
}

.planet::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.32), transparent 30%),
        radial-gradient(circle at 70% 60%, rgba(155, 109, 255, 0.18), transparent 26%);
    opacity: 0.7;
}

.planet-ring {
    position: absolute;
    top: 52%;
    left: 50%;
    width: 300px;
    height: 92px;
    transform: translate(-50%, -50%) rotate(-14deg);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.42);
    box-shadow:
        0 0 16px rgba(123, 77, 255, 0.18),
        inset 0 0 18px rgba(88, 211, 255, 0.1);
    background: linear-gradient(90deg, rgba(88, 211, 255, 0.08), rgba(123, 77, 255, 0.12), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(4px);
}

.sparkle-layer {
    position: absolute;
    inset: -40px;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(210, 225, 255, 0.8) 35%, rgba(255, 255, 255, 0) 75%);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.75);
    opacity: 0;
    animation: twinkle 2.8s ease-in-out infinite;
}

.sparkle::before,
.sparkle::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 999px;
}

.sparkle::before {
    width: 1px;
    height: 14px;
}

.sparkle::after {
    width: 14px;
    height: 1px;
}

@keyframes planetFloat {

    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes twinkle {

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

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

    70% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

.carousel-3d-wheel {
    z-index: 2;
    position: relative;
}

@media (max-width: 900px) {
    .orbit-core {
        width: 170px;
        height: 170px;
    }

    .planet-ring {
        width: 220px;
        height: 68px;
    }
}

/* ==================================================
   PROJECT SLIDES — INFO MAIS ALTA E MAIS LEGÍVEL
================================================== */

.project-slide-card {
    position: relative;
    display: block;
    padding: 0;
}

/* Escurece sobretudo o lado esquerdo,
   deixando a imagem do projeto visível à direita */
.project-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg,
            rgba(8, 12, 38, 0.94) 0%,
            rgba(20, 28, 70, 0.86) 32%,
            rgba(20, 28, 70, 0.52) 52%,
            rgba(20, 28, 70, 0.16) 72%,
            rgba(20, 28, 70, 0.02) 100%),
        linear-gradient(to bottom,
            rgba(8, 12, 38, 0.22) 0%,
            transparent 45%,
            rgba(8, 12, 38, 0.12) 100%);
}

/* Bloco sobe e passa a funcionar como painel glass */
.project-slide-info {
    position: absolute;
    z-index: 2;

    top: clamp(76px, 11vh, 108px);
    left: clamp(28px, 4vw, 54px);

    width: min(560px, 53%);
    padding: 22px 24px;

    color: #ffffff;

    background:
        linear-gradient(135deg,
            rgba(16, 22, 62, 0.76),
            rgba(28, 33, 82, 0.48));

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    box-shadow:
        0 22px 60px rgba(5, 8, 30, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Categoria */
.project-slide-info .slide-category {
    display: block;
    margin-bottom: 10px;

    color: #9eeaff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Título menor para não competir com a imagem */
.project-slide-info .slide-title {
    max-width: 540px;
    margin-bottom: 18px;

    color: #ffffff;
    font-size: clamp(2rem, 3.2vw, 3.25rem);
    line-height: 1;
    letter-spacing: -0.045em;

    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

/* Tecnologias mais compactas */
.project-tech {
    gap: 9px;
    margin-bottom: 20px;
}

.project-tech span {
    padding: 7px 12px;

    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;

    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Botões */
.project-links {
    gap: 12px;
}

.project-links a {
    padding: 11px 17px;
    font-size: 0.86rem;
}

.project-links a:first-child {
    background: linear-gradient(135deg,
            #58d3ff 0%,
            #7b4dff 58%,
            #9b6dff 100%);

    box-shadow: 0 14px 34px rgba(123, 77, 255, 0.3);
}

.project-links a:last-child {
    background: rgba(10, 15, 44, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

/* Mobile */
@media (max-width: 900px) {
    .project-slide-info {
        top: auto;
        right: 20px;
        bottom: 20px;
        left: 20px;

        width: auto;
        padding: 18px;
        border-radius: 18px;
    }

    .project-slide-info .slide-title {
        margin-bottom: 15px;
        font-size: 1.85rem;
    }

    .project-tech {
        margin-bottom: 16px;
    }

    .project-tech span {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .project-links a {
        width: auto;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .project-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .project-links a {
        width: 100%;
    }
}


/* ==================================================
   BACK-END CARDS — SG LILAC / WHITE PALETTE OVERRIDE
   Keeps the existing 3D rotation and diagonal layout.
================================================== */

.wheel-card.backend-project-card {
    color: var(--text-main);
    background:
        radial-gradient(circle at 78% 12%,
            rgba(255, 255, 255, 0.95),
            transparent 34%),
        radial-gradient(circle at 18% 82%,
            rgba(123, 77, 255, 0.18),
            transparent 38%),
        linear-gradient(145deg,
            #ffffff 0%,
            #f4efff 44%,
            #d8c8ff 100%);
    border-color: rgba(123, 77, 255, 0.24);
    box-shadow:
        0 28px 78px rgba(123, 77, 255, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.wheel-card.backend-project-card:hover {
    border-color: rgba(123, 77, 255, 0.52);
    box-shadow:
        0 34px 95px rgba(123, 77, 255, 0.28),
        0 0 34px rgba(155, 109, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.backend-video-area {
    background:
        radial-gradient(circle at 70% 18%,
            rgba(255, 255, 255, 0.92),
            transparent 32%),
        linear-gradient(135deg,
            #f7f3ff 0%,
            #d9cbff 48%,
            #9b6dff 100%);
}

.backend-video-shade {
    background:
        linear-gradient(to bottom,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(123, 77, 255, 0.02) 42%,
            rgba(73, 45, 135, 0.28) 100%);
}

.backend-project-language {
    color: #ffffff;
    background: rgba(91, 55, 170, 0.70);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 10px 28px rgba(91, 55, 170, 0.20);
}

.backend-card-info {
    background:
        linear-gradient(145deg,
            rgba(255, 255, 255, 0.88),
            rgba(235, 225, 255, 0.78));
    border-top-color: rgba(123, 77, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.backend-card-info::before {
    background: linear-gradient(90deg,
            transparent,
            rgba(123, 77, 255, 0.72),
            rgba(155, 109, 255, 0.80),
            transparent);
    box-shadow: 0 0 14px rgba(123, 77, 255, 0.28);
}

.backend-project-type {
    color: #7b4dff;
}

.backend-card-info h3 {
    color: #2f235f;
    text-shadow: none;
}

.backend-card-info p {
    color: rgba(47, 35, 95, 0.76);
}

.backend-tech span {
    color: #493678;
    background: rgba(123, 77, 255, 0.08);
    border-color: rgba(123, 77, 255, 0.16);
}

.backend-view-project {
    color: #6e42df;
}

.backend-project-card:focus-visible {
    outline-color: rgba(123, 77, 255, 0.82);
}

/* ==================================================
   AJUSTE FINAL — MAIS ESPAÇO PARA O VÍDEO
================================================== */

.backend-video-area {
    clip-path: polygon(0 0,
            100% 0,
            100% 66%,
            0 77%);
}

.backend-project-language {
    z-index: 5;
}

.backend-card-info {
    min-height: 47%;
    padding: 46px 30px 22px;

    clip-path: polygon(0 15%,
            100% 0,
            100% 100%,
            0 100%);
}

.backend-card-info::before {
    top: 22px;
    transform: rotate(-4.2deg);
}

.backend-card-info h3 {
    margin-bottom: 7px;
    font-size: clamp(1.4rem, 2vw, 1.9rem);
}

.backend-card-info p {
    margin-bottom: 10px;
    font-size: 0.74rem;
    line-height: 1.35;
}

.backend-tech {
    margin-bottom: 10px;
}

.backend-project-actions {
    margin-top: 0;
}

@media (max-width: 900px) {
    .backend-card-info {
        min-height: 49%;
        padding: 44px 22px 18px;
    }
}

@media (max-width: 560px) {
    .backend-card-info {
        min-height: 54%;
        padding: 44px 19px 16px;
    }
}

/* Evita mostrar novamente a introdução
   durante a mesma sessão do navegador */

.skip-portfolio-intro #intro-overlay {
    display: none !important;
}

.card-link-static {
    cursor: default;
    pointer-events: none;
}