/* ---------- tokens ---------- */
:root {
  --bg: #0a0f1a;
  --surface: #111a2b;
  --border: #21324d;
  --text: #e6edf3;
  --muted: #94a6bf;
  --accent: #4da3ff;
  --accent-ink: #04162b;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f7fc;
    --surface: #ffffff;
    --border: #d3deee;
    --text: #0f1c30;
    --muted: #506080;
    --accent: #1257c7;
    --accent-ink: #ffffff;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --border: #d3deee;
  --text: #0f1c30;
  --muted: #506080;
  --accent: #1257c7;
  --accent-ink: #ffffff;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px; z-index: 20;
}
.skip:focus { left: 8px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-in { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand { font-family: var(--mono); font-weight: 700; color: var(--text); margin-right: auto; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; gap: 20px; font-size: 14px; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--text); text-decoration: none; }

.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
  padding-block: 88px 72px;
}
.prompt { font-family: var(--mono); color: var(--muted); font-size: 15px; }
.prompt span { color: var(--accent); }
h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1.05; letter-spacing: -0.03em; margin-top: 10px; }
.role { font-family: var(--mono); color: var(--accent); font-size: clamp(1rem, 2.4vw, 1.25rem); margin-top: 12px; }
.meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 56ch; margin-top: 18px; }

.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
  display: inline-block; padding: 10px 18px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 15px;
  transition: border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.hero-side { display: grid; justify-items: center; gap: 20px; }
.avatar { width: 200px; height: 200px; border-radius: 50%; border: 3px solid var(--accent); object-fit: cover; }
.hero-badges { display: flex; gap: 8px; }
.hero-badges img { width: 72px; height: 72px; object-fit: contain; }

/* ---------- seções ---------- */
section { padding-block: 56px; }
h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin-bottom: 28px; display: flex; align-items: center; gap: 12px; }
h2 span { font-family: var(--mono); font-size: 1rem; color: var(--accent); font-weight: 400; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.about p + p { margin-top: 14px; }
.about p { color: var(--muted); }
.about strong { color: var(--text); }
.facts { display: grid; gap: 12px; }
.facts li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.facts strong { font-family: var(--mono); font-size: 1.6rem; color: var(--accent); min-width: 3ch; }
.facts span { color: var(--muted); }

.skills, .projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.skills article, .project, .cert {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.skills article { padding: 20px; }
.skills h3 { font-size: 1rem; margin-bottom: 12px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  padding: 3px 9px; border: 1px solid var(--border); border-radius: 6px;
}

/* ---------- experiência ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.timeline > li {
  display: grid; grid-template-columns: 170px 1fr; gap: 24px;
  padding: 22px; background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius);
}
.when { font-family: var(--mono); font-size: 13.5px; color: var(--accent); padding-top: 3px; }
.timeline h3 { font-size: 1.1rem; line-height: 1.3; }
.timeline h3 span { color: var(--muted); font-weight: 500; }
.where { font-size: 14px; margin-bottom: 10px; }
.timeline p { color: var(--muted); }
.bullets { list-style: disc; padding-left: 20px; margin: 10px 0 14px; color: var(--muted); display: grid; gap: 6px; }
.bullets li::marker { color: var(--accent); }
.bullets strong { color: var(--text); }
.cert.edu:hover { border-color: var(--border); transform: none; }

/* ---------- certificações ---------- */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cert {
  display: flex; align-items: center; gap: 16px; padding: 18px; color: var(--text);
  transition: border-color .15s, transform .15s;
}
.cert:hover, .project:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.cert img { width: 88px; height: 88px; object-fit: contain; flex: none; }
.cert h3 { font-size: 1rem; line-height: 1.3; }
.cert p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.certs.small .cert { padding: 12px 14px; }
.certs.small img { width: 56px; height: 56px; }
.certs.small h3 { font-size: .92rem; }
.sub { font-size: 1rem; color: var(--muted); margin: 32px 0 14px; font-weight: 600; }
.more { margin-top: 20px; font-family: var(--mono); font-size: 14px; }

/* ---------- projetos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  font: 600 14px var(--sans); color: var(--muted);
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--border);
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.project {
  display: flex; flex-direction: column; gap: 10px; padding: 20px; color: var(--text);
  transition: border-color .15s, transform .15s;
}
.project[hidden] { display: none; }
.project h3 { font-family: var(--mono); font-size: .95rem; color: var(--accent); overflow-wrap: anywhere; }
.project p { color: var(--muted); font-size: 15px; flex: 1; }

/* ---------- contato / rodapé ---------- */
.contact { text-align: center; padding-bottom: 80px; }
.contact .lead { margin-inline: auto; }
.contact .cta { justify-content: center; }
.contact .btn { overflow-wrap: anywhere; }

footer { border-top: 1px solid var(--border); padding-block: 24px; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- responsivo ---------- */
@media (max-width: 760px) {
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-block: 48px 40px; gap: 32px; }
  .hero-side { order: -1; justify-items: start; }
  .avatar { width: 120px; height: 120px; }
  .hero-badges img { width: 56px; height: 56px; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .timeline > li { grid-template-columns: 1fr; gap: 6px; padding: 18px; }
  section { padding-block: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
