:root {
    --bg-main: #060913; 
    --bg-alt: #0d1326;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --transition: all 0.3s ease;
}

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

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

.relative-z { position: relative; z-index: 10; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h3 { margin-bottom: 0.5rem; }
p { color: var(--text-muted); font-size: 1.1rem; }

.gradient-text { background: linear-gradient(90deg, #6366f1, #38bdf8); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Transições de Seções (Gradientes fluidos) */
.section { padding: 80px 0; }
.bg-dark { background-color: var(--bg-alt); }

.transition-gradient { height: 120px; width: 100%; border: none; }
.main-to-dark { background: linear-gradient(to bottom, var(--bg-main), var(--bg-alt)); }
.dark-to-main { background: linear-gradient(to bottom, var(--bg-alt), var(--bg-main)); }

.text-center { text-align: center; }
.mt-3 { margin-top: 3rem; }
.w-100 { width: 100%; }

/* Header Fixo - Centralizado */
header { position: fixed; top: 0; width: 100%; z-index: 1000; padding: 1.5rem 0; transition: var(--transition); }
header.scrolled { background: rgba(6, 9, 19, 0.85); backdrop-filter: blur(12px); padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
nav { display: flex; justify-content: center; align-items: center; }
.nav-links { display: flex; list-style: none; gap: 2.5rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: var(--transition); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text-main); }

/* Menu hamburguer - escondido em desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Menu mobile overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(6, 9, 19, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-nav-links li {
    margin: 1rem 0;
}

.mobile-nav-links a {
    display: block;
    color: var(--text-main);
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.mobile-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.mobile-nav-links a:hover::after {
    width: 100px;
}

.btn { display: inline-block; padding: 0.8rem 2rem; border-radius: 8px; text-decoration: none; font-weight: 600; transition: var(--transition); cursor: pointer; border: none; font-size: 1rem; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 15px var(--accent-glow); }
.btn-secondary { border: 1px solid var(--text-muted); color: var(--text-main); margin-left: 1rem; background: transparent; }
.btn-secondary:hover { background: rgba(255,255,255,0.05); }
.btn-small { padding: 0.5rem 1.2rem; background: var(--primary); color: white; border-radius: 6px; }

/* Remove ícone automático de PDF do navegador */
a[download$=".pdf"],
a[href$=".pdf"] { -webkit-user-modify: read-only !important; }

a[download$=".pdf"]::after,
a[href$=".pdf"]::after,
a[download$=".pdf"]::-webkit-link-source,
a[href$=".pdf"]::-webkit-link-source { display: none !important; content: none !important; }

/* Esconde ícone de PDF do Chrome em links de download */
a[download]::-webkit-download-indicator,
a[download$=".pdf"]::-webkit-download-indicator { display: none !important; }

/* Wrapper para isolar ícone de PDF do botão principal */
.pdf-link-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.pdf-link-wrapper::after,
.pdf-link-wrapper a::after { 
    display: none !important; 
    content: none !important; 
}

/* Força esconder qualquer pseudo-elemento em links de PDF */
a.btn-primary[download$=".pdf"],
a.btn-primary[href$=".pdf"] {
    position: relative;
    overflow: hidden;
}

a.btn-primary[download$=".pdf"]::after,
a.btn-primary[href$=".pdf"]::after {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* --- HERO 3D --- */
.hero { height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; background-color: var(--bg-main); }
.hero-light {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1;
    background: radial-gradient(circle 500px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99, 102, 241, 0.15), transparent 80%);
    will-change: background;
}

/* Grid lines no lado esquerdo */
.hero-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: 
        linear-gradient(to right, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to right, rgba(0,0,0,0.8) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.8) 0%, transparent 100%);
}

/* Layout split: texto esquerda, terminal direita */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-left {
    text-align: left;
}

.hero-subtitle {
    margin-bottom: 2.5rem;
}

.hero-social-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.social-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    margin: 0 0.5rem;
}

.view-projects {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.view-projects::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.view-projects:hover {
    color: var(--text-main);
}

.view-projects:hover::after {
    width: 100%;
}

.hero-right {
    display: flex;
    justify-content: flex-end;
    perspective: 1000px;
    position: relative;
}

/* Segundo terminal atrás */
.terminal-back {
    position: absolute;
    top: -20px;
    right: 40px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #1a1d29;
    border-radius: 12px;
    opacity: 0.4;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) scale(0.95);
    z-index: -1;
}

.terminal-window {
    width: 100%;
    max-width: 420px;
    background: #1a1d29;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    /* Transform inicial será controlado pelo JS */
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.terminal-header {
    background: linear-gradient(to bottom, #2d313e, #252831);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.terminal-btn.close { background: #ff5f56; }
.terminal-btn.minimize { background: #ffbd2e; }
.terminal-btn.maximize { background: #27c93f; }

.terminal-btn::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
}

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    color: #8b92a8;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
}

.terminal-progress-bar {
    height: 3px;
    background: #1a1d29;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.terminal-progress-bar.active {
    opacity: 1;
}

.terminal-progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #6366f1, #38bdf8);
    transform-origin: left;
    transform: scaleX(1);
    transition: transform linear;
}

.terminal-body {
    padding: 20px;
    background: #0d1117;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.terminal-body.focused {
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.5);
}

.code-line.static {
    pointer-events: none;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: text;
}

#typed-text {
    color: #c9d1d9;
    margin-left: 4px;
}

.message-line {
    color: #a5d6ff;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.matrix-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #0f0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s;
}

.matrix-overlay.active {
    opacity: 1;
}

.matrix-column {
    position: absolute;
    top: -100%;
    animation: matrix-fall linear infinite;
    text-shadow: 0 0 5px #0f0;
}

@keyframes matrix-fall {
    to { transform: translateY(200%); }
}

/* EASTER EGG: Logo Pop Effect */
.logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 100;
    background: rgba(13, 17, 23, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-overlay.active {
    opacity: 1;
}

.logo-popup {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.6), 0 0 80px rgba(99, 102, 241, 0.3);
    transform: scale(0);
    opacity: 0;
}

.logo-popup.pop-in {
    animation: logoPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.logo-popup.pop-out {
    animation: logoPopOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes logoPopIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(10deg);
        opacity: 1;
    }
    70% {
        transform: scale(0.95) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes logoPopOut {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) rotate(-10deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
}

.code-line {
    color: #c9d1d9;
    font-size: 0.9rem;
    line-height: 1.6;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

.code-line.indent {
    padding-left: 20px;
}

.code-line.cursor-line {
    margin-top: 8px;
}

/* Syntax Highlighting */
.code-keyword { color: #ff7b72; }
.code-var { color: #79c0ff; }
.code-prop { color: #9cdcfe; }
.code-string { color: #a5d6ff; }
.code-number { color: #79c0ff; }
.code-bool { color: #ff7b72; }
.code-comment { color: #8b949e; font-style: italic; }
.code-func { color: #dcdcaa; }
.code-method { color: #dcdcaa; }
.code-prompt { color: #27c93f; font-weight: bold; margin-right: 8px; }

.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: #27c93f;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

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

/* --- A4 CURRÍCULO 3D (Abstrato Antigo) --- */
.resume-wrapper { display: flex; flex-direction: column; align-items: center; perspective: 1500px; }
.a4-container { 
    display: block; width: 100%; max-width: 450px; text-decoration: none; 
    transform-style: preserve-3d; transition: transform 0.1s ease-out; cursor: pointer; 
}

.a4-paper {
    background: #ffffff; aspect-ratio: 1 / 1.414; border-radius: 4px; position: relative; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(0,0,0,0.1);
    padding: 30px; display: flex; flex-direction: column; transform-style: preserve-3d;
}

.a4-glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,0.8) 0%, transparent 50%); mix-blend-mode: overlay; pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 10; }
.a4-container:hover .a4-glare { opacity: 1; }

.a4-content { opacity: 0.6; filter: grayscale(1); pointer-events: none; }
.a4-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.a4-photo { width: 50px; height: 50px; border-radius: 50%; background: #ccc; }
.a4-title { font-size: 1.5rem; font-weight: bold; color: #333; }
.a4-subtitle { font-size: 1rem; font-weight: bold; color: #555; margin-bottom: 10px; }
.a4-line { height: 6px; background: #ddd; border-radius: 3px; margin-bottom: 8px; }
.a4-box-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a4-box { height: 30px; background: #eee; border-radius: 4px; }

/* --- MODAL DO PDF --- */
.modal {
    display: flex; position: fixed; z-index: 2000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
    justify-content: center; align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal.show { 
    opacity: 1; 
    visibility: visible; 
}
.modal-content {
    background: var(--bg-alt); padding: 20px; border-radius: 12px;
    width: 90%; max-width: 800px; height: 90vh; display: flex; flex-direction: column;
    position: relative; border: 1px solid rgba(255,255,255,0.1);
    transform: scale(0.8) translateY(30px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.close-btn {
    position: absolute; top: 10px; right: 20px; color: white; font-size: 32px; font-weight: bold; cursor: pointer; transition: color 0.3s;
}
.close-btn:hover { color: var(--primary); }
.pdf-preview { width: 100%; flex: 1; border: none; border-radius: 8px; background: white; margin-top: 30px; margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 15px; padding-bottom: 10px; }

/* --- GITHUB CHART  --- */
.gh-container { background: #0d1117; border: 1px solid #30363d; border-radius: 6px; padding: 1.5rem; max-width: 850px; margin: 0 auto; transition: transform 0.3s; text-align: left;}
.gh-container:hover { transform: translateY(-5px); border-color: #8b949e; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.gh-header { font-size: 0.85rem; color: #c9d1d9; margin-bottom: 15px; padding-left: 35px; }

.gh-body { display: flex; gap: 10px; }
.gh-weekdays { display: flex; flex-direction: column; font-size: 0.75rem; color: #8b949e; padding-top: 20px; gap: 14px; margin-right: 5px; }
.gh-weekdays span { height: 14px; line-height: 14px; }

.gh-scroll-area { overflow-x: auto; flex: 1; padding-bottom: 5px; }
/* Esconde a barra de rolagem nativa feia */
.gh-scroll-area::-webkit-scrollbar { height: 6px; }
.gh-scroll-area::-webkit-scrollbar-track { background: #0d1117; }
.gh-scroll-area::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }

.gh-months { display: flex; font-size: 0.75rem; color: #8b949e; margin-bottom: 5px; min-width: 800px; justify-content: space-between; padding-right: 20px; }
.gh-grid { min-width: 800px; } /* O layout do grid será gerido pelo flex no JS */

.gh-square { width: 14px; height: 14px; border-radius: 3px; transition: all 0.2s; }
.gh-square:hover { transform: scale(1.4); position: relative; z-index: 10; box-shadow: 0 0 5px var(--primary); outline: 1px solid rgba(255,255,255,0.5); }

/* Cores oficias do Github mescladas com a cor do site */
.level-0 { background: #161b22; }
.level-1 { background: rgba(99, 102, 241, 0.3); }
.level-2 { background: rgba(99, 102, 241, 0.6); }
.level-3 { background: rgba(99, 102, 241, 0.8); }
.level-4 { background: var(--primary); }

.gh-legend { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 0.75rem; color: #8b949e; margin-top: 15px; }

/* --- SEÇÕES GERAIS --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.skills-grid { 
display: grid; 
grid-template-columns: 1fr 1fr; 
gap: 1.5rem; 
}

.skill-card { 
background: rgba(255,255,255,0.02); 
padding: 1.75rem; 
border-radius: 16px; 
border: 1px solid rgba(255,255,255,0.05);
position: relative;
overflow: hidden;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cores temáticas para cada card */
.skill-card:nth-child(1) { --card-color: #f59e0b; --card-glow: rgba(245, 158, 11, 0.3); }
.skill-card:nth-child(2) { --card-color: #6366f1; --card-glow: rgba(99, 102, 241, 0.3); }
.skill-card:nth-child(3) { --card-color: #10b981; --card-glow: rgba(16, 185, 129, 0.3); }
.skill-card:nth-child(4) { --card-color: #ec4899; --card-glow: rgba(236, 72, 153, 0.3); }

.skill-card::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, var(--card-glow), transparent);
transition: left 0.6s ease;
}

.skill-card::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: var(--card-color);
opacity: 0.6;
transition: all 0.4s ease;
}

.skill-card:hover {
transform: translateY(-8px) scale(1.02);
border-color: var(--card-color);
box-shadow: 
0 20px 40px -10px var(--card-glow),
0 0 0 1px var(--card-color),
inset 0 1px 0 rgba(255,255,255,0.1);
background: rgba(255,255,255,0.04);
}

.skill-card:hover::before {
left: 100%;
}

.skill-card:hover::after {
opacity: 1;
height: 4px;
box-shadow: 0 0 20px var(--card-color);
}

.skill-card h3 {
position: relative;
z-index: 1;
transition: color 0.3s ease;
display: flex;
align-items: center;
gap: 0.75rem;
font-size: 1.1rem;
margin-bottom: 0.75rem;
}

/* Ícones dos cards */
/* .skill-card:nth-child(1) h3::before { content: '⚡'; font-size: 1.2rem; }
.skill-card:nth-child(2) h3::before { content: '🔧'; font-size: 1.2rem; }
.skill-card:nth-child(3) h3::before { content: '🚀'; font-size: 1.2rem; }
.skill-card:nth-child(4) h3::before { content: '⚙️'; font-size: 1.2rem; } */

.skill-card:hover h3 {
color: var(--card-color);
}

.skill-card p {
position: relative;
z-index: 1;
line-height: 1.7;
}
.highlight-quote { margin-top: 2rem; padding-left: 1rem; border-left: 4px solid var(--primary); font-style: italic; color: var(--text-main); }

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: center; }
.service-card { background: var(--bg-main); padding: 2.5rem 2rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); transition: var(--transition); position: relative; }
.service-card:hover { transform: translateY(-5px); border-color: rgba(99, 102, 241, 0.5); }
.service-card.featured { background: #0c0f2b; border: 2px solid var(--primary); box-shadow: 0 10px 40px var(--accent-glow); transform: scale(1.05); }
.service-card.featured:hover { transform: scale(1.05) translateY(-5px); }
.badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); font-size: 0.75rem; font-weight: bold; padding: 0.4rem 1rem; border-radius: 20px; text-transform: uppercase; }
.price { font-size: 1.2rem; font-weight: 700; color: var(--text-main); margin-top: 1.5rem; }

.carousel-wrapper {
overflow: hidden;
position: relative;
}

.projects-carousel {
display: flex;
gap: 2rem;
transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
will-change: transform;
}

.project-card {
flex: 0 0 calc(50% - 1rem);
background: var(--bg-main);
border-radius: 12px;
overflow: hidden;
border: 1px solid rgba(255,255,255,0.05);
transition: var(--transition);
}

.project-card:hover { border-color: var(--primary); }

.carousel-dots {
display: flex;
justify-content: center;
gap: 12px;
margin-top: 2rem;
}

.carousel-dots .dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: rgba(255,255,255,0.3);
cursor: pointer;
transition: all 0.3s ease;
}

.carousel-dots .dot:hover {
background: rgba(255,255,255,0.5);
}

.carousel-dots .dot.active {
background: var(--primary);
box-shadow: 0 0 10px var(--accent-glow);
}

.project-img { height: 250px; background: #1e293b; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 1.2rem; font-weight: bold; }
.project-info { padding: 2rem; }
.link { color: var(--primary); text-decoration: none; font-weight: 600; display: inline-block; margin-top: 1rem; }

.contact-wrapper { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
input, textarea { width: 100%; padding: 1rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: white; font-family: inherit; transition: var(--transition); }
input:focus, textarea:focus { border-color: var(--primary); outline: none; background: rgba(255,255,255,0.05); }

.footer { padding: 2rem 0; border-top: 1px solid rgba(255,255,255,0.05); text-align: center; }
.footer .container { display: flex; justify-content: space-between; align-items: center; }
.social-links a { color: var(--text-muted); text-decoration: none; margin-left: 1.5rem; transition: var(--transition); }
.social-links a:hover { color: var(--primary); }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
.services-grid { grid-template-columns: 1fr; }
.service-card.featured { transform: scale(1); margin: 2rem 0; }
.grid-2 { grid-template-columns: 1fr; }
.hero { height: auto; min-height: 100vh; padding: 5rem 0 3rem; }
.hero-split { grid-template-columns: 1fr; text-align: center; gap: 2rem; padding-top: 2rem; }
.hero-left { text-align: center; }
.hero-right { justify-content: center; }
.hero-social-row { justify-content: center; }
.hero-grid-lines { width: 100%; mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 70%); }
}

@media (max-width: 768px) {
    /* Header mobile com menu hamburguer */
    header { 
        padding: 0.8rem 0; 
        background: rgba(6, 9, 19, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    header.scrolled { 
        padding: 0.6rem 0; 
        background: rgba(6, 9, 19, 0.98);
    }
    nav { 
        width: 100%;
        justify-content: space-between;
        padding: 0 0.5rem;
    }
    .nav-links { 
        display: none; /* Esconde nav desktop em mobile */
    }
    .menu-toggle {
        display: flex; /* Mostra hamburguer em mobile */
    }
    .mobile-menu {
        display: block; /* Ativa o menu mobile */
    }
    .container { padding: 0 1rem; }
    
/* Skills grid mobile */
.skills-grid { 
gap: 1rem; 
}
.skill-card { 
padding: 1.25rem; 
border-radius: 12px;
}
.skill-card h3 {
font-size: 1rem;
gap: 0.5rem;
}
.skill-card p {
font-size: 0.95rem;
}
    
/* Hero mobile */
h1 { font-size: 2rem; line-height: 1.2; }
.hero-split { padding-top: 5rem; gap: 1.5rem; }
.hero-subtitle { font-size: 1rem; margin-bottom: 1.5rem; }
.hero-social-row { 
flex-wrap: wrap; 
gap: 0.75rem;
margin-top: 1.5rem;
}
.social-icon {
width: 40px;
height: 40px;
}
.social-icon svg {
width: 18px;
height: 18px;
}
.divider { height: 20px; }
.view-projects { font-size: 0.9rem; }
    
/* Terminal mobile */
.terminal-window { max-width: 100%; }
.terminal-back { display: none; }
.hero-right { width: 100%; }
    
.project-card { flex: 0 0 100%; }
.footer .container { flex-direction: column; gap: 1rem; }
}

@media (max-width: 480px) {
.nav-links { 
gap: 0.4rem 0.6rem; 
font-size: 0.75rem; 
}
.nav-links a {
padding: 0.35rem 0.6rem;
}
h1 { font-size: 1.75rem; }
.hero-split { padding-top: 4.5rem; }
    
/* Skills em uma coluna em telas muito pequenas */
.skills-grid {
grid-template-columns: 1fr;
gap: 0.875rem;
}
.skill-card {
padding: 1rem;
}
}