
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --dark-color: #0f172a;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --header-bg: rgba(255, 255, 255, 0.90);
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --hero-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --transition: all 0.3s ease;
}

body.dark-theme {
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --secondary-color: #94a3b8;
    --dark-color: #f8fafc;
    --light-bg: #0f172a;
    --white: #1e293b;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(15, 23, 42, 0.90);
    --border-color: #334155;
    --input-bg: #0f172a;
    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: var(--light-bg);
    color: var(--dark-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }

h2 { text-align: center; font-size: 2.2rem; margin-bottom: 50px; position: relative; }
h2::after { content: ''; display: block; width: 60px; height: 4px; background: var(--primary-color); margin: 12px auto 0; border-radius: 2px; }


header {
    position: sticky; top: 0; z-index: 100;
    background-color: var(--header-bg);
    backdrop-filter: blur(8px);
    padding: 1.2rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.logo { font-size: 1.5rem; font-weight: 800; }
.logo span { color: var(--primary-color); }

nav ul { display: flex; list-style: none; gap: 30px; }
nav a { text-decoration: none; color: var(--secondary-color); font-weight: 600; transition: var(--transition); }
nav a:hover { color: var(--primary-color); }

/* Estilo do Botão Lua/Sol */
#theme-toggle {
    background: none; border: none; color: var(--dark-color);
    font-size: 1.8rem; cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
    padding: 5px;
}
#theme-toggle:hover { color: var(--primary-color); transform: scale(1.1); }

#hero {
    position: relative; 
    overflow: hidden;
    min-height: 85vh; display: flex; align-items: center; justify-content: center; text-align: center;
    background-color: var(--light-bg); 
    width: 100%; max-width: 100%; padding: 0 5%;
    transition: background-color 0.3s ease;
}


#matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative; 
    z-index: 1; 
    max-width: 800px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px); 
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-theme .hero-content {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-content p { font-size: 1.2rem; color: var(--dark-color); margin-bottom: 40px; font-weight: 600; }

body.dark-theme .hero-content p { color: #f8fafc; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

.btns { display: flex; gap: 15px; justify-content: center; }
.btn-primary, .btn-secondary { padding: 14px 32px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: var(--transition); }
.btn-primary { background: var(--primary-color); color: #ffffff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-secondary { background: var(--white); color: var(--dark-color); border: 2px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--dark-color); transform: translateY(-2px); }

.sobre-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: center; }
#sobre img { width: 100%; max-width: 320px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 8px solid var(--white); box-shadow: var(--shadow); justify-self: center; }
.sobre-texto p { font-size: 1.1rem; color: var(--secondary-color); margin-bottom: 20px; text-align: justify; }

.skills-container { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; max-width: 800px; margin: 0 auto; }
.skill-tag { background: var(--white); padding: 12px 25px; border-radius: 50px; font-weight: 600; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border-bottom: 3px solid var(--primary-color); transition: var(--transition); }
.skill-tag:hover { transform: translateY(-5px); border-bottom-width: 6px; }

.projetos-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card-projeto { background: var(--white); padding: 35px 30px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid var(--border-color); transition: var(--transition); display: flex; flex-direction: column; height: 100%; }
.card-projeto:hover { transform: translateY(-10px); box-shadow: var(--shadow); border-color: var(--primary-color); }
.card-projeto h3 { font-size: 1.3rem; margin-bottom: 15px; }
.card-projeto p { color: var(--secondary-color); margin-bottom: 25px; flex-grow: 1; }
.link-projeto { color: var(--primary-color); font-weight: 600; text-decoration: none; align-self: flex-start; }

form { background-color: var(--white); padding: 50px; border-radius: 16px; max-width: 600px; margin: 0 auto; box-shadow: var(--shadow); border: 1px solid var(--border-color); transition: background-color 0.3s ease, border-color 0.3s ease; }
.campo { display: flex; flex-direction: column; margin-bottom: 25px; }
form label { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; color: var(--secondary-color); }
form input, form textarea { padding: 16px; border: 2px solid var(--border-color); border-radius: 8px; font-family: inherit; font-size: 1rem; background-color: var(--input-bg); color: var(--dark-color); transition: var(--transition); }
form input:focus, form textarea:focus { outline: none; border-color: var(--primary-color); background-color: var(--white); }
form textarea { resize: vertical; min-height: 150px; }
form button { width: 100%; margin-top: 10px; padding: 18px; background-color: var(--primary-color); color: #ffffff; border: none; border-radius: 8px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: var(--transition); }
form button:hover { background-color: var(--primary-hover); transform: translateY(-2px); }


footer { text-align: center; padding: 40px; background-color: var(--white); color: var(--secondary-color); margin-top: 40px; border-top: 1px solid var(--border-color); transition: background-color 0.3s ease; }

.redes-sociais { display: flex; justify-content: center; gap: 25px; margin-bottom: 20px; }
.redes-sociais a { color: var(--secondary-color); font-size: 2.5rem; transition: var(--transition); }
.redes-sociais a:hover { color: var(--primary-color); transform: translateY(-5px); }

@media (max-width: 768px) {
    header { flex-direction: column; gap: 15px; }
    .sobre-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content { padding: 20px; }
    .btns { flex-direction: column; }
}
