/* Fontes: stack local (sem links externos). Se Space Grotesk/Inter/JetBrains Mono estiverem instaladas, são usadas. */
:root {
  --bg: #0B0F17; --bg-alt: #111827; --surface: #161E2E; --border: #243047;
  --text: #E6EAF2; --text-muted: #94A3B8;
  --accent: #22D3EE; --accent-2: #A78BFA; --success: #34D399; --code-bg: #0D1320;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 14px; --radius-sm: 8px;
  --shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  --font-head: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'SF Mono', Consolas, ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.7 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-2); color: var(--bg); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
section:nth-of-type(even) { background: var(--bg-alt); }
@media (max-width: 768px) { section { padding: 64px 0; } h2 { font-size: 1.85rem; } }
.eyebrow { font: 500 .875rem var(--font-mono); color: var(--accent); letter-spacing: .02em; margin-bottom: 8px; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-muted); }
h2.title::after { content: ""; display: block; width: 64px; height: 3px; margin-top: 14px; background: var(--gradient); border-radius: 3px; }
.section-head { margin-bottom: 40px; }

/* Navbar */
.nav { position: fixed; inset: 0 0 auto; z-index: 10; padding: 16px 0; transition: background .3s; }
.nav.scrolled { background: rgba(11,15,23,.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font: 600 1.1rem var(--font-mono); color: var(--text); }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-muted); font-size: .95rem; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 6px 10px; cursor: pointer; font-size: 1.1rem; }
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(11,15,23,.95); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 24px; }
}

/* Botões */
.btn { display: inline-flex; gap: 8px; align-items: center; padding: 12px 22px; border-radius: 999px; font: 500 .95rem var(--font-body); cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s, color .2s; border: 0; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gradient); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -6px rgba(34,211,238,.5); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); border-color: rgba(34,211,238,.45); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--text-muted); font-size: .98rem; margin-bottom: 0; }
.grid-3 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.icon { width: 28px; height: 28px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; display: block; }
.chip { display: inline-block; padding: 4px 12px; margin: 4px 6px 0 0; border-radius: 999px; font: 400 .8rem var(--font-mono); color: var(--accent-2); background: rgba(167,139,250,.1); border: 1px solid rgba(167,139,250,.25); }
.chips { margin-top: 14px; }

/* Hero */
.hero { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; padding: 120px 0 80px; background-image: radial-gradient(rgba(36,48,71,.7) 1px, transparent 1px); background-size: 28px 28px; }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -120px; background: var(--gradient); filter: blur(140px); opacity: .25; pointer-events: none; }
.hero .container { position: relative; }
.hero .role { font: 400 1.05rem var(--font-mono); color: var(--text-muted); margin-bottom: 20px; min-height: 1.7em; }
.hero .role .caret { display: inline-block; width: 9px; height: 1.1em; background: var(--accent); vertical-align: text-bottom; margin-left: 3px; animation: blink 1s steps(1) infinite; }
.hero .tagline { font-size: 1.25rem; max-width: 560px; margin-bottom: 32px; }
@keyframes blink { 50% { opacity: 0; } }

/* Sobre */
.about { display: grid; grid-template-columns: 3fr 2fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.pillar { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; }
.pillar + .pillar { border-top: 1px solid var(--border); }
.pillar .icon { margin: 2px 0 0; flex: none; }
.pillar h3 { margin: 0 0 2px; font-size: 1.1rem; }
.pillar p { font-size: .92rem; }

/* Janela de código */
.code-window { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 28px; }
.code-window__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); font: .8rem var(--font-mono); color: var(--text-muted); }
.code-window__bar .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #FF5F57; } .dot.y { background: #FEBC2E; } .dot.g { background: #28C840; }
.code-window__bar .fname { margin-left: 8px; flex: 1; }
.copy-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); border-radius: 6px; padding: 3px 10px; font: .78rem var(--font-mono); cursor: pointer; transition: color .2s, border-color .2s; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.done { color: var(--success); border-color: var(--success); }
.code-window pre { margin: 0; padding: 24px 24px 24px 0; overflow-x: auto; font: .9rem/1.65 var(--font-mono); color: var(--text); counter-reset: ln; }
.code-window code { display: block; font: inherit; }
.code-window .l { display: block; padding-left: 64px; position: relative; white-space: pre; min-height: 1.65em; }
.code-window .l::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 40px; text-align: right; color: #475569; user-select: none; }
.tk-k { color: #A78BFA; } .tk-s { color: #34D399; } .tk-f { color: #22D3EE; } .tk-n { color: #F59E0B; } .tk-c { color: #64748B; font-style: italic; }
.terminal-out { font: .85rem/1.6 var(--font-mono); color: var(--success); padding: 16px 24px; border-top: 1px dashed var(--border); overflow-x: auto; white-space: pre; }
.terminal-out .prompt { color: var(--text-muted); }

/* Contato */
.contact { text-align: center; }
.contact .section-head { margin-bottom: 24px; }
.contact h2.title::after { margin-left: auto; margin-right: auto; }
.email-big { display: inline-block; font: 500 clamp(1.1rem, 3.4vw, 1.9rem) var(--font-mono); margin: 12px 0 28px; word-break: break-all; }
.contact .btn-row { justify-content: center; }

footer { padding: 32px 0; border-top: 1px solid var(--border); text-align: center; font: .85rem var(--font-mono); color: var(--text-muted); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }
