:root {
    --bg-dark: #050505;
    --text-light: #f5f5f7;
    --accent: #2997ff;
    --overlay: rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* Fundo com degradê dinâmico */
#scroll-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 0%, rgba(41, 151, 255, 0.15), transparent 70%);
    transition: background 0.1s ease-out;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Tipografia e botões */
h1 { font-size: 4rem; font-weight: 800; letter-spacing: -0.05em; }
h2 { font-size: 2.5rem; font-weight: 600; margin-bottom: 1.5rem; }
p { font-size: 1.1rem; line-height: 1.6; color: #a1a1a6; }

a { color: var(--text-light); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent); }

.btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--text-light);
    border-radius: 30px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background: var(--text-light);
    color: var(--bg-dark);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.profile-frame {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

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

.subtitle {
    font-size: 1.2rem;
    margin: 1rem 0 2rem;
}

.links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    font-weight: 600;
}

/* Sobre */
.about {
    padding: 8rem 0;
    text-align: center;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.4rem;
}

/* Galeria de Projetos Estilo Ferrari */
.project-showcase {
    position: relative;
    width: 100vw;
    height: 80vh;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.project-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.no-media {
    background: linear-gradient(135deg, #111, #1a1a24);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

.project-info {
    position: relative;
    z-index: 3;
    padding-bottom: 5rem;
    width: 100%;
}

.project-info h3 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.tech-stack {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.tech-stack span {
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    letter-spacing: 1px;
}

/* Animações On Scroll */
.fade-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

footer {
    text-align: center;
    padding: 4rem 0;
    color: #555;
}

/* Estilos para a galeria de fotos */
.gallery-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Força todas as imagens a ocuparem o mesmo espaço, sobrepostas */
.showcase-gallery .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1); /* Transição suave */
}

/* Apenas a imagem com a classe 'active' fica visível */
.showcase-gallery .slide.active {
    opacity: 1;
}

/* Container principal do carrossel 3D */
.articles-3d-section {
    padding: 6rem 0;
    overflow: hidden; /* Evita rolagem horizontal indesejada */
}

.carousel-3d-container {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px; /* Dá a sensação de espaço 3D */
}

/* Área onde os cards ficam posicionados */
.carousel-3d-track {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilo padrão de cada card (escondido/fundo) */
.carousel-3d-item {
    position: absolute;
    width: 320px;
    height: 450px;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s, z-index 0.6s;
    opacity: 0;
    z-index: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #111;
}

/* Estado: Card Central (Frente) */
.carousel-3d-item.active {
    transform: translateX(0) scale(1.1);
    opacity: 1;
    z-index: 3;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* Estado: Card à Esquerda (Menor e mais escuro) */
.carousel-3d-item.prev {
    transform: translateX(-65%) scale(0.85);
    opacity: 0.5;
    z-index: 2;
    cursor: pointer;
}

/* Estado: Card à Direita (Menor e mais escuro) */
.carousel-3d-item.next {
    transform: translateX(65%) scale(0.85);
    opacity: 0.5;
    z-index: 2;
    cursor: pointer;
}

/* Efeito hover nos cards laterais para indicar que são clicáveis */
.carousel-3d-item.prev:hover, 
.carousel-3d-item.next:hover {
    opacity: 0.8;
}

/* Imagem de fundo e Conteúdo interno do card */
.item-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6);
}

.item-content {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    color: var(--text-light);
}

.item-content h3 { font-size: 1.2rem; margin: 0.5rem 0; }
.item-content p { font-size: 0.9rem; color: #ccc; margin-bottom: 1rem; line-height: 1.4; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.8rem; border-color: var(--accent); color: var(--accent); }
.btn-small:hover { background: var(--accent); color: #fff; }

/* Botões de navegação lateral */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    backdrop-filter: blur(5px);
}

.carousel-btn:hover { background: var(--accent); }
.prev-btn { left: 5%; }
.next-btn { right: 5%; }

@media(max-width: 768px) {
    .carousel-3d-item.prev { transform: translateX(-40%) scale(0.8); }
    .carousel-3d-item.next { transform: translateX(40%) scale(0.8); }
    .prev-btn { left: 2%; }
    .next-btn { right: 2%; }
}