/* style.css */
:root {
    /* Cores - Dark Theme Moderno */
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6; /* Azul vibrante */
    --accent-secondary: #8b5cf6; /* Roxo vibrante */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    /* Tipografia */
    --font-main: 'Inter', sans-serif;
    
    /* Espaçamento e Layout */
    --container-width: 1120px;
    --header-height: 70px; /* Altura menor para mobile */
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    font-size: 100%; /* Base 16px */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Previne scroll horizontal indesejado */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

/* Utilitários */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem; /* 20px de padding lateral */
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Botões */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-align: center;
}

.btn--primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn--outline {
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
}

.btn--outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn--ghost {
    color: var(--text-secondary);
}

.btn--ghost:hover {
    color: var(--text-primary);
}

/* Header - Mobile First */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    z-index: 1002;
}

.highlight {
    color: var(--accent-primary);
}

/* Nav - Mobile Default (Off-canvas) */
.nav__list {
    position: fixed;
    top: 0;
    right: -100%; /* Escondido por padrão */
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    padding: 2rem;
}

.nav__list.active {
    right: 0;
}

.nav__link {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav__link:hover, .nav__link.active {
    color: var(--text-primary);
}

/* Mobile Toggle */
.mobile-toggle {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1002;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* Animação do Toggle */
.mobile-toggle.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active .bar:nth-child(2) { opacity: 0; }
.mobile-toggle.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Hero Section */
.hero {
    padding: calc(var(--header-height) + 3rem) 0 4rem;
    min-height: 100vh;
    min-height: 100dvh; /* Altura dinâmica para mobile browsers */
    display: flex;
    align-items: center;
    text-align: center; /* Centralizado no mobile */
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__greeting {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
    font-size: 1rem;
}

.hero__title {
    font-size: clamp(2rem, 8vw, 3.5rem); /* Tipografia Fluida */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero__subtitle {
    font-size: clamp(1rem, 4vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Sections Geral */
.section {
    padding: 4rem 0;
}

.section__title {
    font-size: clamp(1.75rem, 5vw, 2rem);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Sobre */
.about__grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 coluna no mobile */
    gap: 3rem;
    align-items: center;
}

.about__text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about__text strong {
    color: var(--text-primary);
}

.about__stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
}

.stat__number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat__label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.about__tech-visual {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Opcional: esconder em telas muito pequenas se necessário */
}

.code-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.code-line {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    width: 100%;
}

.code-line.short {
    width: 60%;
}

/* Projetos */
.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Ajustado para telas menores */
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
}

.project-card__image {
    width: 100%;
    aspect-ratio: 16/9; /* Mantém proporção consistente */
    background-size: cover;
    background-position: center;
}

/* Placeholders visuais para os projetos (CSS Gradients) */
.project-bg-1 { background: linear-gradient(45deg, #1e293b, #334155); }
.project-bg-2 { background: linear-gradient(45deg, #0f172a, #1e1b4b); }
.project-bg-3 { background: linear-gradient(45deg, #171717, #262626); }

.project-card__content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-card__desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex: 1; /* Empurra os links para o final */
}

.project-card__tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.project-card__tags li {
    font-size: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.project-card__links {
    display: flex;
    gap: 1.5rem;
}

.link-arrow, .link-github {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.link-arrow:hover, .link-github:hover {
    color: var(--accent-primary);
}

/* Skills */
.skills__wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.skills__category h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.skills__list li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.skills__list li::before {
    content: '▹';
    color: var(--accent-secondary);
    margin-right: 10px;
}

/* Contato */
.contact__container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact__text {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.contact__links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.social-icons {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-icons a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem; /* Área de toque maior */
}

.social-icons a:hover {
    color: var(--accent-primary);
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer__credit {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Animações de Scroll (Fade In) */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   BREAKPOINTS (Tablet & Desktop)
   ========================================= */

/* Tablet (768px+) */
@media (min-width: 768px) {
    :root { --header-height: 80px; }

    .logo { font-size: 1.5rem; }

    /* Reset do Menu para Desktop */
    .mobile-toggle { display: none; }
    
    .nav__list {
        position: static;
        width: auto;
        height: auto;
        max-width: none;
        background: transparent;
        flex-direction: row;
        box-shadow: none;
        padding: 0;
        transform: none;
        right: auto;
    }

    .nav__link { font-size: 0.95rem; }

    /* Hero */
    .hero { text-align: left; }
    .hero__content { align-items: flex-start; }
    .hero__actions { justify-content: flex-start; }

    /* About */
    .about__stats { justify-content: flex-start; }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .about__grid {
        grid-template-columns: 1.5fr 1fr;
    }
    
    .section { padding: 100px 0; }
}
