:root {
  --bg: #07111f;
  --card: rgba(13, 21, 37, 0.72);
  --line: rgba(255,255,255,0.08);
  --text: #eef4ff;
  --muted: #a7b6d0;
  --accent: #6ee7ff;
  --accent-2: #8b5cf6;
  --accent-3: #35d399;
  --shadow: 0 18px 60px rgba(0,0,0,0.35);
  --radius-xl: 28px;
  --max: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(110,231,255,0.14), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(139,92,246,0.16), transparent 30%),
    radial-gradient(circle at 70% 70%, rgba(53,211,153,0.10), transparent 22%),
    linear-gradient(180deg, #050b16 0%, #07111f 55%, #091526 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,.32), transparent 85%);
  pointer-events: none; z-index: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; position: relative; z-index: 2; }
.blur-orb { position: fixed; border-radius: 50%; filter: blur(70px); opacity: .35; pointer-events: none; z-index: 1; animation: float 12s ease-in-out infinite; }
.orb-1 { width: 220px; height: 220px; top: 10%; left: -40px; background: rgba(110,231,255,.22); }
.orb-2 { width: 260px; height: 260px; top: 45%; right: -60px; background: rgba(139,92,246,.18); animation-delay: -3s; }
.orb-3 { width: 180px; height: 180px; bottom: 10%; left: 18%; background: rgba(53,211,153,.18); animation-delay: -6s; }
@keyframes float { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-18px) translateX(12px); } }
.topbar { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(18px); background: rgba(4,10,20,0.55); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 14px; font-weight: 800; letter-spacing: .02em; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; position: relative; background: linear-gradient(135deg, rgba(110,231,255,.35), rgba(139,92,246,.35)); border: 1px solid rgba(255,255,255,0.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 30px rgba(0,0,0,.25); overflow: hidden; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); transform: skew(-16deg); }
.brand-mark::after { inset: 13px; background: linear-gradient(135deg, rgba(110,231,255,.6), rgba(139,92,246,.45)); border: 0; opacity: .9; }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .22em; text-transform: uppercase; }
nav { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
nav a { padding: 10px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; transition: .25s ease; }
nav a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; border-radius: 999px; padding: 14px 20px; font-size: 15px; font-weight: 700; transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease; font-family: inherit; }
.btn:hover, button:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #71b8ff 48%, var(--accent-2)); color: #05101f; box-shadow: 0 12px 28px rgba(110,231,255,.22); }
.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid rgba(255,255,255,0.08); }
.hero { padding: 72px 0 34px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 28px; align-items: stretch; }
.glass { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.08); box-shadow: var(--shadow); }
.hero-main { padding: 34px; border-radius: var(--radius-xl); position: relative; overflow: hidden; }
.hero-main::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 88% 14%, rgba(110,231,255,.16), transparent 24%), radial-gradient(circle at 8% 94%, rgba(139,92,246,.15), transparent 22%); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #d6e4ff; margin-bottom: 18px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-3)); box-shadow: 0 0 0 6px rgba(110,231,255,.1); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.15); opacity: .8; } }
h1 { font-size: clamp(40px, 7vw, 74px); line-height: .96; letter-spacing: -0.05em; margin: 0 0 18px; max-width: 12ch; }
.gradient-text { background: linear-gradient(135deg, #f4f9ff 0%, #8fe6ff 40%, #9f8bff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 64ch; font-size: 18px; line-height: 1.75; color: var(--muted); margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 999px; font-size: 14px; color: #dbe8ff; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.08); }
.chip strong { color: white; font-weight: 700; }
.panel { padding: 22px; border-radius: var(--radius-xl); display: grid; gap: 18px; min-height: 100%; }
.terminal { background: linear-gradient(180deg, rgba(4,10,20,.92), rgba(9,17,31,.84)); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; overflow: hidden; }
.terminal-top { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02); }
.terminal-top span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.terminal-body { padding: 18px; font-family: "SFMono-Regular", Consolas, Monaco, monospace; font-size: 14px; line-height: 1.8; color: #d7f7ff; }
.terminal-body .cmd { color: #8eeeff; } .terminal-body .ok { color: #8affc3; } .terminal-body .purple { color: #caa9ff; } .terminal-body .muted { color: #8fa2c2; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat-card { padding: 18px; border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025)); border: 1px solid rgba(255,255,255,.07); min-height: 132px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -26px; bottom: -28px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(110,231,255,.16), transparent 70%); }
.stat-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: #9db0cf; margin-bottom: 12px; display: block; }
.stat-value { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.05em; margin-bottom: 8px; }
.stat-copy { color: var(--muted); font-size: 14px; line-height: 1.55; }
.ticker-wrap { padding: 22px 0 18px; overflow: hidden; position: relative; }
.ticker { display: flex; gap: 14px; width: max-content; animation: ticker 28s linear infinite; }
.ticker-item { padding: 11px 16px; border-radius: 999px; background: rgba(255,255,255,.05); color: #d8e6ff; border: 1px solid rgba(255,255,255,.08); font-size: 14px; white-space: nowrap; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
section { padding: 36px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.section-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #9cb0d3; margin-bottom: 10px; display: block; }
h2 { font-size: clamp(28px, 4vw, 48px); line-height: 1.02; letter-spacing: -0.04em; margin: 0; }
.section-copy { max-width: 64ch; color: var(--muted); line-height: 1.8; margin-top: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { padding: 24px; border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025)); border: 1px solid rgba(255,255,255,.08); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at top right, rgba(110,231,255,.10), transparent 28%); pointer-events: none; }
.card h3 { margin: 0 0 12px; font-size: 22px; letter-spacing: -0.03em; }
.card p, .card li { color: var(--muted); line-height: 1.72; font-size: 15px; }
.muted { color: var(--muted); }
.kpi { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.kpi span { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #dce9ff; }
.experience-list { display: grid; gap: 18px; }
.xp-card { padding: 26px; border-radius: 26px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.08); position: relative; overflow: hidden; }
.xp-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; flex-wrap: wrap; margin-bottom: 16px; }
.role { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.period { padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #d8e5ff; white-space: nowrap; }
.bullets { margin: 0; padding-left: 18px; display: grid; gap: 10px; color: var(--muted); line-height: 1.72; }
.xp-summary { color: var(--muted); line-height: 1.78; margin: 0 0 18px; max-width: 82ch; }
.xp-projects { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.xp-projects-label { font-size: 13px; color: #9db0cf; }
.pill-link { padding: 8px 12px; font-size: 13px; border-radius: 999px; background: rgba(110,231,255,.10); border: 1px solid rgba(110,231,255,.25); color: #cdeeff; }
.pill-link:hover { background: rgba(110,231,255,.18); }
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stack-card { padding: 18px; border-radius: 20px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); }
.stack-card strong { display: block; margin-bottom: 10px; font-size: 15px; color: white; }
.stack-card span { display: inline-flex; margin: 0 8px 8px 0; padding: 9px 11px; font-size: 13px; border-radius: 999px; background: rgba(255,255,255,.05); color: #d9e6ff; border: 1px solid rgba(255,255,255,.06); }
.timeline { display: grid; gap: 18px; }
.timeline-item { position: relative; padding: 22px 22px 22px 72px; border-radius: 22px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); }
.timeline-item::before { content: ""; position: absolute; left: 28px; top: 24px; bottom: -22px; width: 2px; background: linear-gradient(180deg, rgba(110,231,255,.45), rgba(139,92,246,.08)); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 18px; top: 20px; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 6px rgba(110,231,255,.08); }
.timeline-item h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.03em; }
.timeline-item .meta { font-size: 14px; color: #d7e4ff; margin-bottom: 8px; }
.contact-card { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: stretch; }
.contact-links { display: grid; gap: 12px; }
.contact-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); color: #eaf2ff; }
.contact-link span:last-child { color: var(--muted); font-size: 14px; }
.footer { padding: 26px 0 44px; color: #98aace; font-size: 14px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.show { opacity: 1; transform: translateY(0); }

/* ---- PROJETOS (cards clicaveis) ---- */
.project-card { display: block; width: 100%; text-align: left; padding: 24px; cursor: pointer; color: var(--text); }
.project-card:hover { transform: translateY(-4px); border-color: rgba(110,231,255,.28); }
.project-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.project-empresa { font-weight: 800; color: #fff; font-size: 15px; }
.project-setor { font-size: 12px; color: #9db0cf; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.project-card h3 { font-size: 20px; }
.project-cta { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 700; color: var(--accent); }

/* ---- MODAL ---- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(3,8,16,.72); backdrop-filter: blur(6px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(680px, 100%); max-height: 88vh; overflow-y: auto; padding: 34px; border-radius: 26px; background: linear-gradient(180deg, #0d1830, #0a1424); border: 1px solid rgba(255,255,255,.10); box-shadow: 0 30px 90px rgba(0,0,0,.55); animation: modalIn .28s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; padding: 0; font-size: 22px; line-height: 1; border-radius: 12px; background: rgba(255,255,255,.06); color: #dbe8ff; border: 1px solid rgba(255,255,255,.08); }
.modal-tag { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8fb6d6; margin-bottom: 10px; }
.modal h3 { margin: 0 0 10px; font-size: 26px; letter-spacing: -0.03em; }
.modal-lead { color: var(--muted); line-height: 1.7; margin: 0 0 22px; }
.modal-block { margin-bottom: 20px; }
.modal-block h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.modal-block p { margin: 0; color: #dbe6f7; line-height: 1.75; }
.modal-block .bullets { color: #dbe6f7; }
.modal-result { padding: 16px 18px; border-radius: 16px; background: rgba(53,211,153,.08); border: 1px solid rgba(53,211,153,.22); }
.modal-result h4 { color: var(--accent-3); }
body.modal-open { overflow: hidden; }

@media (max-width: 1080px) {
  .hero-grid, .grid-3, .grid-2, .contact-card, .stack-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .topbar-inner { align-items: start; flex-direction: column; padding: 14px 0; }
  nav { justify-content: flex-start; }
  .hero { padding-top: 34px; }
  .hero-main, .panel, .card, .xp-card, .timeline-item, .modal { padding: 20px; }
  h1 { max-width: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .xp-head { flex-direction: column; align-items: start; }
  .timeline-item { padding-left: 56px; }
  .timeline-item::before { left: 20px; }
  .timeline-dot { left: 10px; }
}

/* ---- Botão de tema ---- */
.theme-toggle { width: 44px; height: 44px; padding: 0; border-radius: 12px; font-size: 18px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); }
.theme-toggle:hover { transform: translateY(-2px); }

/* ================= TEMA CLARO ================= */
html[data-theme="light"] {
  --text: #14203a;
  --muted: #51617d;
  --line: rgba(20,32,58,0.10);
  --accent: #0a95b8;
  --accent-2: #7c3aed;
  --accent-3: #12a672;
  --shadow: 0 12px 34px rgba(20,32,58,0.10);
}
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 20% 20%, rgba(10,149,184,0.10), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(124,58,237,0.10), transparent 30%),
    linear-gradient(180deg, #f7faff 0%, #eef3fb 100%);
}
html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(20,32,58,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,32,58,0.05) 1px, transparent 1px);
}
html[data-theme="light"] .topbar { background: rgba(255,255,255,0.72); }
html[data-theme="light"] nav a { color: #51617d; }
html[data-theme="light"] nav a:hover { background: rgba(20,32,58,0.05); color: #14203a; }
html[data-theme="light"] .glass,
html[data-theme="light"] .card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .xp-card,
html[data-theme="light"] .stack-card,
html[data-theme="light"] .timeline-item,
html[data-theme="light"] .contact-link,
html[data-theme="light"] .modal { background: #ffffff; border-color: rgba(20,32,58,0.10); box-shadow: var(--shadow); }
html[data-theme="light"] .card::before,
html[data-theme="light"] .hero-main::before { display: none; }
html[data-theme="light"] .chip,
html[data-theme="light"] .kpi span,
html[data-theme="light"] .stack-card span,
html[data-theme="light"] .period,
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .ticker-item,
html[data-theme="light"] .project-setor,
html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .theme-toggle { background: rgba(20,32,58,0.04); border-color: rgba(20,32,58,0.10); color: #33415c; }
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] .card h3,
html[data-theme="light"] .project-card h3,
html[data-theme="light"] .timeline-item h3,
html[data-theme="light"] .modal h3,
html[data-theme="light"] .role,
html[data-theme="light"] .stat-value,
html[data-theme="light"] .project-empresa,
html[data-theme="light"] .chip strong,
html[data-theme="light"] .stack-card strong { color: #14203a; }
html[data-theme="light"] .contact-link,
html[data-theme="light"] .contact-link span:last-child,
html[data-theme="light"] .modal-block p,
html[data-theme="light"] .modal-lead,
html[data-theme="light"] .bullets { color: #33415c; }
html[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #0f7c96 0%, #2b6fd6 45%, #7c3aed 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="light"] .modal-backdrop { background: rgba(20,32,58,.35); }
html[data-theme="light"] .modal-result { background: rgba(18,166,114,.10); border-color: rgba(18,166,114,.28); }
/* o terminal continua escuro de propósito no tema claro (fica bonito) */
