:root {
    --navy: #0f172a;
    --navy-2: #1e293b;
    --blue: #2563eb;
    --blue-l: #60a5fa;
    --ink: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg-alt: #f8fafc;
    --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { font-family: 'Roboto', system-ui, sans-serif; color: var(--ink); line-height: 1.6; background: #fff; }
a { color: var(--blue); text-decoration: none; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.wrap { width: min(1100px, 92%); margin: 0 auto; }

/* Botões */
.btn { display: inline-block; background: var(--blue); color: #fff; padding: 12px 22px; border-radius: 6px; font-weight: 500; border: 2px solid var(--blue); cursor: pointer; font-size: 15px; transition: .2s; }
.btn:hover { background: #1d4ed8; border-color: #1d4ed8; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: #fff; }
.btn-sm { padding: 7px 16px; font-size: 14px; color: #fff !important; }

/* Navegação */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: .3s; }
.nav.scrolled { background: rgba(15,23,42,.92); backdrop-filter: blur(8px); box-shadow: 0 2px 20px rgba(0,0,0,.2); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { color: #fff; font-weight: 900; font-size: 20px; letter-spacing: 1px; }
.logo span { color: var(--blue-l); font-weight: 500; }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { color: #cbd5e1; font-size: 15px; }
.nav-links a:hover { color: #fff; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.menu-btn span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 140px 0 100px; border-bottom: 4px solid var(--blue); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(96,165,250,.12) 1px, transparent 1px); background-size: 26px 26px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--blue-l); font-size: 15px; margin-bottom: 8px; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 900; line-height: 1.05; letter-spacing: -1px; }
.role { color: var(--blue-l); font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin: 12px 0 18px; font-size: 16px; }
.lead { color: #cbd5e1; font-size: 18px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; margin: 30px 0 26px; flex-wrap: wrap; }
.socials { display: flex; gap: 22px; }
.socials a { color: #94a3b8; font-size: 14px; border-bottom: 1px solid transparent; }
.socials a:hover { color: #fff; border-color: var(--blue-l); }

.code-card { background: #0b1220; border: 1px solid #334155; border-radius: var(--radius); box-shadow: 0 30px 60px rgba(0,0,0,.4); overflow: hidden; }
.code-top { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #111a2e; border-bottom: 1px solid #1f2a40; }
.code-top i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.code-top i:nth-child(2) { background: #f59e0b; }
.code-top i:nth-child(3) { background: #22c55e; }
.code-top span { margin-left: 10px; color: #64748b; font-size: 13px; }
.code-card pre { padding: 22px 24px; font-size: 14px; line-height: 1.75; color: #e2e8f0; overflow-x: auto; }
.code-card .k { color: #c084fc; } .code-card .t { color: #5eead4; } .code-card .s { color: #fbbf24; }

/* Secções */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.title { font-size: 30px; font-weight: 900; color: var(--navy); margin-bottom: 40px; display: flex; align-items: center; gap: 14px; }
.title .mono { color: var(--blue); font-size: 20px; font-weight: 500; }
.title::after { content: ''; flex: 1; max-width: 260px; height: 1px; background: var(--line); }
.section.alt .lead, .contact .lead { color: var(--muted); }

/* Sobre */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 50px; align-items: start; }
.about-text p { margin-bottom: 16px; font-size: 17px; color: #334155; }
.langs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.langs span { background: #eff6ff; color: #1e40af; border-radius: 30px; padding: 6px 16px; font-size: 14px; }
.stats { display: grid; gap: 16px; }
.stat { border-left: 4px solid var(--blue); background: var(--bg-alt); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; }
.stat-num { display: block; font-size: 36px; font-weight: 900; color: var(--navy); line-height: 1; }
.stat-txt { color: var(--muted); font-size: 15px; }

/* Competências */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: .25s; }
.skill-card:hover { border-color: #bfdbfe; box-shadow: 0 12px 30px rgba(37,99,235,.08); transform: translateY(-3px); }
.skill-card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--navy); margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: #eff6ff; color: #1e40af; border: 1px solid #dbeafe; border-radius: 5px; padding: 4px 10px; font-size: 13.5px; }
.tags.small .tag { font-size: 12.5px; padding: 3px 9px; background: #f1f5f9; color: #334155; border-color: var(--line); }

/* Timeline */
.timeline { list-style: none; position: relative; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.job { position: relative; padding-bottom: 38px; }
.job::before { content: ''; position: absolute; left: -34px; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); }
.job:first-child::before { background: var(--blue); box-shadow: 0 0 0 5px #dbeafe; }
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.job h3 { font-size: 19px; color: var(--navy); }
.job .at { color: var(--blue); font-weight: 500; }
.period { color: var(--muted); font-size: 13px; }
.job ul { margin: 0 0 12px 18px; color: #334155; }
.job li { margin-bottom: 4px; }

/* Projetos */
.projects { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.project { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 14px; transition: .25s; }
.project:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15,23,42,.08); }
.project-top { display: flex; justify-content: space-between; align-items: center; }
.folder { font-family: 'JetBrains Mono', monospace; color: var(--blue); font-size: 26px; font-weight: 500; }
.year { color: var(--muted); font-size: 13px; }
.project h3 { font-size: 21px; color: var(--navy); }
.project p { color: #475569; }
.link { font-weight: 500; margin-top: auto; }
.project-more { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border: 0; justify-content: center; }
.project-more h3 { color: #fff; }
.project-more p { color: #cbd5e1; }
.project-more .link { color: var(--blue-l); margin-top: 6px; }

/* Formação */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.sub { font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin: 0 0 16px; }
.sub:not(:first-child) { margin-top: 30px; }
.edu, .cert { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.edu .year { min-width: 42px; padding-top: 2px; color: var(--blue); }
.edu strong, .cert strong { display: block; color: var(--navy); }
.edu span:not(.year), .cert span:not(.badge) { color: var(--muted); font-size: 14px; }
.badge { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: #dbeafe; color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.plain { list-style: none; }
.plain li { padding: 6px 0 6px 18px; position: relative; color: #334155; }
.plain li::before { content: '▹'; position: absolute; left: 0; color: var(--blue); }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; margin-top: 28px; }
.contact-list li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list span { min-width: 80px; color: var(--muted); font-size: 14px; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--navy); }
.form input, .form textarea { font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 6px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--blue); }
.hp { position: absolute; left: -9999px; }
.alert { padding: 12px 14px; border-radius: 6px; font-size: 14px; }
.alert.sucesso { background: #dcfce7; color: #166534; }
.alert.erro { background: #fee2e2; color: #991b1b; }

.footer { background: var(--navy); color: #94a3b8; padding: 26px 0; font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; }

/* Animação ao aparecer */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Responsivo */
@media (max-width: 900px) {
    .hero-inner, .about, .edu-grid, .contact, .projects { grid-template-columns: 1fr; }
    .skills { grid-template-columns: 1fr 1fr; }
    .hero { padding: 120px 0 70px; }
}
@media (max-width: 760px) {
    .menu-btn { display: block; }
    .nav-links { position: fixed; top: 66px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--navy); padding: 10px 0 20px; display: none; }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; text-align: center; }
    .nav-links a { display: block; padding: 12px; }
    .nav-links .btn-sm { display: inline-block; margin-top: 8px; }
    .nav { background: rgba(15,23,42,.95); }
    .skills { grid-template-columns: 1fr; }
    .section { padding: 70px 0; }
    .title { font-size: 25px; }
    .code-card pre { font-size: 12.5px; }
}
