/* ========== IMPORTAÇÕES ========== */
@import url('variables.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ========== RESET E ESTILOS GLOBAIS ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: var(--line-height-normal);
    font-size: var(--font-size-body);
}

/* ========== TIPOGRAFIA ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--font-size-h5); }
h6 { font-size: var(--font-size-h6); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base) var(--easing-smooth);
}

a:hover {
    color: var(--accent-color);
}

/* ========== HEADER E NAVEGAÇÃO ========== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: var(--z-index-sticky);

    /* Glassmorphism */
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: var(--glass-blur-strong) saturate(180%);
    -webkit-backdrop-filter: var(--glass-blur-strong) saturate(180%);
    border-bottom: 1px solid var(--glass-border);

    transition: all var(--transition-base) var(--easing-smooth);
}

header.scrolled {
    background: rgba(15, 15, 15, 0.95);
    box-shadow: var(--shadow-md);
    padding: 15px var(--container-padding);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    margin: 0;
    padding: 0;
}

nav li {
    position: relative;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: 0.95rem;
    position: relative;
    padding: 8px 0;

    transition: color var(--transition-fast) var(--easing-smooth);
}

/* Efeito underline animado */
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));

    transition: width var(--transition-base) var(--easing-smooth);
}

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

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

nav a.active {
    color: var(--accent-color);
}

/* ========== INDICADOR DE PROGRESSO DE SCROLL ========== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: calc(var(--z-index-sticky) + 1);
    transition: width 0.1s linear;
}

/* ========== SEÇÕES PARALLAX ========== */
.parallax-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    scroll-snap-align: start;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ========== HERO SECTION ========== */
.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 900px;
    padding: 0 var(--spacing-md);
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--spacing-md);

    /* Gradiente animado */
    background: linear-gradient(135deg, #fff 0%, #00d4ff 50%, #007bff 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-content .subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-weight: var(--font-weight-regular);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content .tagline {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--text-color);
    margin-bottom: var(--spacing-xl);
    font-weight: var(--font-weight-medium);
}

/* ========== BOTÕES ========== */
.btn {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;

    position: relative;
    overflow: hidden;

    transition: all var(--transition-base) var(--easing-smooth);
}

/* Efeito de brilho ao hover */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);

    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* ========== SEÇÕES DE CONTEÚDO ========== */
.content-section {
    padding: var(--spacing-3xl) var(--container-padding);
    min-height: 100vh;
    position: relative;
    scroll-snap-align: start;
}

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

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: var(--font-size-h2);
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--border-radius-full);
}

.section-subtitle {
    font-size: var(--font-size-body);
    color: var(--text-secondary);
    max-width: 700px;
    margin: var(--spacing-lg) auto 0;
}

/* ========== CONTAINER ========== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========== GRID DE PROJETOS ========== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.project-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--glass-border);

    position: relative;
    overflow: hidden;

    transition: all var(--transition-base) var(--easing-smooth);
}

/* Gradiente de fundo ao hover */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 212, 255, 0.1));
    opacity: 0;

    transition: opacity var(--transition-base) var(--easing-smooth);
}

.project-card:hover {
    transform: translateY(-10px);
    background: var(--glass-bg-hover);
    border-color: rgba(0, 123, 255, 0.3);
    box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
}

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

/* Conteúdo sobre o gradiente */
.project-card > * {
    position: relative;
    z-index: 1;
}

.project-card h3 {
    font-size: var(--font-size-h4);
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.project-card p {
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-md);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.tag {
    padding: 6px 12px;
    background: rgba(0, 123, 255, 0.2);
    border: 1px solid rgba(0, 123, 255, 0.4);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-small);
    color: var(--accent-color);
    font-weight: var(--font-weight-medium);
}

/* ========== TIMELINE ========== */
.timeline {
    position: relative;
    padding: var(--spacing-lg) 0;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 45%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);

    transition: all var(--transition-base) var(--easing-smooth);
}

.timeline-content:hover {
    background: var(--glass-bg-hover);
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    box-shadow: var(--shadow-glow-cyan);
}

.timeline-date {
    font-size: var(--font-size-small);
    color: var(--accent-color);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-xs);
}

.timeline-title {
    font-size: var(--font-size-h5);
    margin-bottom: var(--spacing-xs);
}

.timeline-company {
    font-size: var(--font-size-small);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

/* ========== SOBRE MIM ========== */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.about-image {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-glow-blue);
}

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

.about-text h2 {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.about-text p {
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-relaxed);
    text-align: justify;
}

.about-text ul {
    max-width: 700px;
    margin: var(--spacing-lg) auto;
    padding-left: var(--spacing-xl);
}

.about-text ul li {
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-relaxed);
}

.contact-info-box {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
    margin-top: var(--spacing-2xl);
    transition: all var(--transition-base) var(--easing-smooth);
}

.contact-info-box:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(0, 123, 255, 0.3);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.contact-info-box p {
    margin-bottom: 0;
}

.contact-info-box strong {
    color: var(--accent-color);
    font-size: 1.1rem;
}

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

.skill-category h4 {
    color: var(--accent-color);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-h6);
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.skill-category li::before {
    content: '▸';
    color: var(--primary-color);
    font-weight: bold;
}

/* ========== FOOTER ========== */
footer {
    background: var(--bg-secondary);
    padding: var(--spacing-2xl) var(--container-padding);
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

footer p {
    color: var(--text-secondary);
    margin: 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base) var(--easing-smooth);
}

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

/* ========== ANIMAÇÕES DE SCROLL ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow) var(--easing-smooth),
                transform var(--transition-slow) var(--easing-smooth);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 1024px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-item:nth-child(odd) {
        flex-direction: column;
    }

    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 60px;
    }

    .timeline-dot {
        left: 30px;
    }
}

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

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

    .hero-content h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 50px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 15px var(--container-padding);
    }

    nav ul {
        flex-direction: column;
        gap: var(--spacing-sm);
        display: none; /* Implementar menu hamburger depois */
    }

    .content-section {
        padding: var(--spacing-2xl) var(--container-padding);
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }
}

/* ========== MENU HAMBURGER (MOBILE) ========== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: calc(var(--z-index-sticky) + 2);
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 10px;
    transition: all var(--transition-base) var(--easing-smooth);
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

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

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

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

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: var(--glass-blur-strong);
        padding-top: 80px;
        transition: right var(--transition-base) var(--easing-smooth);
        z-index: calc(var(--z-index-sticky) + 1);
    }

    nav.active {
        right: 0;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-md);
    }

    nav li {
        width: 100%;
        border-bottom: 1px solid var(--glass-border);
    }

    nav a {
        display: block;
        padding: var(--spacing-md);
        font-size: 1.1rem;
    }

    nav a::after {
        bottom: var(--spacing-md);
    }
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: var(--z-index-sticky);
    transition: all var(--transition-base) var(--easing-smooth);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--glass-bg-hover);
    box-shadow: var(--shadow-glow-blue);
}

.theme-toggle svg {
    width: 28px;
    height: 28px;
    fill: var(--text-color);
    transition: transform var(--transition-slow) var(--easing-smooth);
}

.theme-toggle:hover svg {
    transform: rotate(180deg);
}

/* Light Mode Styles */
body.light-mode {
    --bg-color: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8e8;
    --text-color: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #757575;
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-bg-hover: rgba(0, 0, 0, 0.08);
    --glass-border: rgba(0, 0, 0, 0.1);
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode header.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

body.light-mode .project-card {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .project-card:hover {
    background: rgba(0, 0, 0, 0.06);
}

body.light-mode .timeline-content {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .hero-content h1 {
    background: linear-gradient(135deg, #1a1a1a 0%, #007bff 50%, #00d4ff 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode nav {
    background: rgba(255, 255, 255, 0.98);
}

@media (max-width: 768px) {
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .theme-toggle svg {
        width: 24px;
        height: 24px;
    }
}

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