/* ===== Tokens ===== */
:root {
  --bg: #f7f8fa;
  --bg-2: #ffffff;
  --text: #0f172a;
  --muted: #5b6474;
  --line: #e3e7ee;
  --accent: #059669;
  --accent-soft: rgba(5, 150, 105, .1);
  --term-bg: #0b0f14;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
  --maxw: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f14;
    --bg-2: #121820;
    --text: #e6edf3;
    --muted: #8b96a5;
    --line: #1f2833;
    --accent: #34d399;
    --accent-soft: rgba(52, 211, 153, .12);
    --term-bg: #0e141b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f14;
  --bg-2: #121820;
  --text: #e6edf3;
  --muted: #8b96a5;
  --line: #1f2833;
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, .12);
  --term-bg: #0e141b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.accent { color: var(--accent); }
.center { text-align: center; justify-content: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { font: 600 18px "JetBrains Mono", monospace; margin-right: auto; }
.logo .prompt { color: var(--accent); }
.menu { display: flex; gap: 28px; font-size: 15px; }
.menu a { color: var(--muted); transition: color .15s; }
.menu a:hover, .menu a.active { color: var(--text); }
.theme-btn, .menu-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); color: var(--text); cursor: pointer;
}
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
.menu-btn { display: none; gap: 5px; align-content: center; }
.menu-btn span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 760px) {
  nav { order: 3; }
  .menu-btn { display: grid; }
  .menu {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    display: none;
  }
  .menu.open { display: flex; }
  .menu a { display: block; padding: 12px 0; font-size: 17px; }
}

/* ===== Hero ===== */
.hero {
  display: grid; gap: 48px; align-items: center;
  min-height: calc(100svh - 64px);
  padding-top: 48px; padding-bottom: 64px;
}
@media (min-width: 920px) { .hero { grid-template-columns: 1.1fr .9fr; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 20px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(36px, 6.4vw, 64px); font-weight: 700; margin-bottom: 20px; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 56ch; }
.lead.center { margin-left: auto; margin-right: auto; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.btn { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 600; font-size: 15px; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #062a1e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #062a1e; } }
.btn.ghost { border: 1px solid var(--line); background: var(--bg-2); }
.btn.ghost:hover { border-color: var(--accent); }
.social { display: flex; gap: 10px; }
.social a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); border: 1px solid var(--line); transition: color .15s, border-color .15s; }
.social a:hover { color: var(--accent); border-color: var(--accent); }
.social svg { width: 19px; height: 19px; fill: currentColor; }
svg.stroke { fill: none !important; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Terminal */
.terminal { background: var(--term-bg); border: 1px solid #1f2833; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #1f2833; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; font: 12px "JetBrains Mono", monospace; color: #6b7686; }
.terminal pre { margin: 0; padding: 20px; font-size: clamp(12px, 1.6vw, 14.5px); line-height: 1.75; color: #c9d4e0; overflow-x: auto; }
.k { color: #c792ea; } .v { color: #82aaff; } .p { color: #7fdbca; } .s { color: #c3e88d; } .n { color: #f78c6c; } .f { color: #ffcb6b; }
.caret { color: #34d399; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ===== Sections ===== */
.section { padding-top: 88px; padding-bottom: 32px; }
.sec-title { display: flex; align-items: baseline; gap: 12px; font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 36px; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 280px; align-self: center; }
.sec-title.center::after { display: none; }
.num { color: var(--accent); font-size: .6em; font-weight: 600; }

.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.card h3 { font-size: 18px; margin-bottom: 14px; }

/* Sobre */
.about { display: grid; gap: 32px; }
@media (min-width: 860px) { .about { grid-template-columns: 1.5fr 1fr; gap: 56px; } }
.about-text p { color: var(--muted); }
.facts { display: grid; gap: 12px; align-content: start; }
.facts li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.facts span { font-size: 20px; }
.facts b { display: block; font-size: 14px; }
.facts small { color: var(--muted); font-size: 14px; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 500 13px "JetBrains Mono", monospace; padding: 5px 11px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.tags.sm li { font-size: 12px; padding: 3px 9px; }

.stack-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Timeline */
.timeline { position: relative; display: grid; gap: 32px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; gap: 6px; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
@media (min-width: 760px) { .timeline li { grid-template-columns: 170px 1fr; gap: 24px; } }
.when { font-size: 13px; color: var(--muted); padding-top: 2px; }
.timeline h3 { font-size: 19px; margin-bottom: 8px; }
.at { color: var(--accent); font-weight: 500; }
.timeline p { color: var(--muted); margin-bottom: 12px; }


/* Contato */
.contact { text-align: center; padding-bottom: 96px; }
.contact .sec-title { justify-content: center; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 32px; text-align: center; }
.footer p { font-size: 13px; color: var(--muted); margin: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Destaques */
.creds ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); overflow: hidden; }
.creds li { padding: 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.creds b { display: block; font-size: 17px; }
.creds span { font-size: 14px; color: var(--muted); }

/* Interesses */
.interests { margin-top: 16px; }
.interests:hover { transform: none; }
.check-list { display: grid; gap: 10px 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.check-list li { position: relative; padding-left: 28px; font-size: 15px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.f-ico { font-size: 20px; }

/* Experiência */
.company-head { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.company-logo { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 12px; background: #fcfc30; color: #2f45c5; font-weight: 700; font-size: 16px; }
.company-head h3 { font-size: 20px; }
.company-head small { color: var(--muted); font-size: 14px; }
.timeline .where { font-size: 14px; margin: -4px 0 8px; }


/* Formação */
.edu-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.edu h3 { margin-bottom: 6px; }
.edu p { color: var(--muted); font-size: 15px; }
.edu .at { font-size: 15px; margin-bottom: 12px; }
.kind { font-size: 12px; color: var(--accent); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; }
.badge { display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent) !important; margin: 0; }

/* Contato */
.contact { text-align: center; padding: 56px 24px; margin-bottom: 64px; background: linear-gradient(135deg, var(--accent-soft), var(--bg-2) 60%); }
.contact:hover { transform: none; }
.contact h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 14px; }
.creds { margin-top: -16px; }

/* Projetos profissionais */
.work-list { display: grid; gap: 16px; }
.work { border-left: 3px solid var(--accent); }
.work h3 { font-size: 20px; margin-bottom: 10px; }
.work p:not(.kind) { color: var(--muted); font-size: 15.5px; max-width: 80ch; }
