/* ============================================
   RESET E CONFIGURAÇÕES GERAIS
   ============================================ */

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

:root {
    /* Cores Principais */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-text: #f1f5f9;
    --gray-text: #94a3b8;
    --card-bg: #1e293b;
    --hover-bg: #334155;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    
    /* Transições */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Espaçamentos */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

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

/* ============================================
   NAVEGAÇÃO
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

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

.nav-brand a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text);
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.nav-brand a span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--gray-text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--light-text);
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--light-text);
    transition: all var(--transition-normal);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   SEÇÃO HOME
   ============================================ */

.home-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

/* Partículas de Fundo */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

.home-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.home-text {
    animation: fadeInLeft 1s ease;
}

.greeting {
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
}

.name {
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.title {
    font-size: 2rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    min-height: 3rem;
}

.typed-text {
    font-weight: 600;
}

.cursor {
    display: inline-block;
    background-color: var(--primary-color);
    margin-left: 0.1rem;
    width: 3px;
    animation: blink 1s infinite;
}

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

.description {
    font-size: 1.1rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.home-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--light-text);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    font-size: 1.3rem;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.social-links a:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Imagem do Perfil */
.home-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease;
}

.image-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 5px solid var(--card-bg);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
    background: var(--card-bg);
}

.image-border {
    position: absolute;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    border-radius: 50%;
    background: var(--gradient-primary);
    z-index: 1;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll Down */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: var(--gray-text);
    font-size: 2rem;
    transition: color var(--transition-fast);
}

.scroll-down a:hover {
    color: var(--primary-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Animações */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   SEÇÕES GERAIS
   ============================================ */

section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Poppins', sans-serif;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--gray-text);
}

/* ============================================
   SEÇÃO SOBRE
   ============================================ */

.sobre-section {
    background: var(--darker-bg);
}

.sobre-content {
    max-width: 1000px;
    margin: 0 auto;
}

.sobre-info {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform var(--transition-normal);
}

.info-card:hover {
    transform: translateY(-10px);
}

.info-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.info-card p {
    color: var(--gray-text);
    line-height: 1.8;
}

.sobre-text {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.sobre-text p {
    color: var(--gray-text);
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.sobre-text p:last-child {
    margin-bottom: 0;
}

/* Skills */
.skills-section {
    margin-top: 3rem;
}

.skills-section h3 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--light-text);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.skill-card span {
    display: block;
    color: var(--light-text);
    font-weight: 600;
}

/* ============================================
   SEÇÃO PROJETOS
   ============================================ */

.projetos-section {
    background: var(--dark-bg);
}

.projetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: stretch; /* garante que os cards estiquem igualmente */
}

.projeto-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    display: flex;            /* permite controlar a altura interna */
    flex-direction: column;   /* imagem em cima, conteúdo abaixo */
    height: 100%;             /* ocupar altura total da célula do grid */
}

.projeto-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.projeto-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.projeto-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.projeto-card:hover .projeto-image img {
    transform: scale(1.1);
}

.projeto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.projeto-card:hover .projeto-overlay {
    opacity: 1;
}

.projeto-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.projeto-tags span {
    background: white;
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.projeto-content {
    padding: 1.5rem;
    display: flex;          /* habilita empurrar o footer para baixo */
    flex-direction: column;
    flex: 1;                /* ocupa o espaço restante do card */
}

.projeto-content h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem); /* tipografia responsiva para caber com os links */
    margin-bottom: 1rem;
    color: var(--light-text);
}

.projeto-content p {
    color: var(--gray-text);
    margin-bottom: 1.2rem;
    line-height: 1.6;
    font-size: 0.95rem; /* reduz leve para evitar quebra excessiva */
}

.projeto-footer {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto;       /* fixa o footer no rodapé do card */
}

.btn-projeto {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem; /* botão um pouco menor para caber melhor no card */
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.btn-projeto:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-projeto:nth-child(2) {
    background: var(--gradient-secondary);
}

.projetos-cta {
    text-align: center;
    margin-top: 3rem;
}

.projetos-cta p {
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 1.5rem;
}

/* ============================================
   SEÇÃO CONTATO
   ============================================ */

.contato-section {
    background: var(--darker-bg);
}

.contato-content {
    max-width: 900px;
    margin: 0 auto;
}

.contato-text {
    text-align: center;
    margin-bottom: 3rem;
}

.contato-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.contato-text p {
    color: var(--gray-text);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.contato-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: stretch; /* cards com a mesma altura */
}

.contato-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    height: 100%;        /* preencher a célula do grid */
    min-height: 156px;   /* ligeiro aumento para acomodar conteúdo e ícones */
}

.contato-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.contato-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.contato-details h4 {
    color: var(--light-text);
    margin-bottom: 0.3rem;
    font-size: 1rem; /* reduz leve para caber melhor no card */
}

.contato-details p {
    color: var(--gray-text);
    font-size: 0.9rem; /* reduz leve para caber melhor no card */
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--darker-bg);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--card-bg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.footer-brand h3 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--gray-text);
}

.footer-links h4,
.footer-social h4 {
    color: var(--light-text);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    transition: all var(--transition-normal);
}

.social-icons a:hover {
    background: var(--gradient-primary);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--card-bg);
    color: var(--gray-text);
}

.footer-bottom p {
    margin-bottom: 5 rem;
}

.footer-bottom i {
    color: var(--accent-color);
}

/* ============================================
   BOTÃO VOLTAR AO TOPO
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    z-index: 999;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 968px) {
    .home-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .name {
        font-size: 3rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .home-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .image-container {
        width: 300px;
        height: 300px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(15, 23, 42, 0.98);
        width: 100%;
        text-align: center;
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .projetos-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .title {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .home-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .contato-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2rem;
    }
    
    .title {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .image-container {
        width: 250px;
        height: 250px;
    }
    
    .projetos-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ANIMAÇÕES DE SCROLL
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    animation: fadeIn 0.5s ease;
}
