:root {
  --bg: #f7f8fb;
  --bg-alt: #eef2fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #55607a;
  --border: #dfe5f1;
  --accent: #1d4ed8;
  --accent-strong: #1e3a8a;
  --accent-soft: #e0e9ff;
  --on-accent: #ffffff;
  --ok: #16a34a;
  --danger: #dc2626;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 10px 30px rgb(29 78 216 / 0.06);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1022;
    --bg-alt: #0d152c;
    --surface: #111a33;
    --text: #e8edf9;
    --muted: #93a0bd;
    --border: #1f2b4a;
    --accent: #6b9bff;
    --accent-strong: #1d4ed8;
    --accent-soft: #17254a;
    --on-accent: #0a1022;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1022;
  --bg-alt: #0d152c;
  --surface: #111a33;
  --text: #e8edf9;
  --muted: #93a0bd;
  --border: #1f2b4a;
  --accent: #6b9bff;
  --accent-strong: #1d4ed8;
  --accent-soft: #17254a;
  --on-accent: #0a1022;
  --shadow: none;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; margin-bottom: 0.7em; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.title-dot { color: var(--accent); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

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

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.8em 1.35em;
  background: var(--accent); color: var(--on-accent);
  border: 1.5px solid var(--accent); border-radius: 8px;
  font: 600 0.92rem var(--font); text-decoration: none; cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}
.btn:hover { transform: translateY(-1px); background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn--ghost:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--light { background: #fff; color: #1d4ed8; border-color: #fff; }
.btn--light:hover { background: #e0e9ff; color: #1e3a8a; border-color: #e0e9ff; }
.btn--sm { padding: 0.45em 1.05em; font-size: 0.875rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); cursor: pointer; font-size: 1.05rem;
}
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: inline; }
}

/* ---------- navegação ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.nav__links a:not(.btn):hover, .nav__links a.active { color: var(--accent); }
.nav__actions { display: flex; gap: 8px; }
.nav__burger { display: none; }

@media (max-width: 820px) {
  .nav__burger { display: grid; }
  nav[aria-label="Principal"] { order: 3; }
  .nav__actions { margin-left: auto; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links li a:not(.btn) { display: block; padding: 12px 0; }
  .nav__links .btn { margin-top: 8px; width: 100%; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(56px, 8vw, 100px); }
.hero__inner { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.hero__greeting { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 300; letter-spacing: -0.02em; margin-bottom: 0.2em; }
.hl { color: var(--accent); }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--muted); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 48px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-size: 0.82rem; font-weight: 500; margin-bottom: 20px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}
.stats { display: flex; flex-wrap: wrap; gap: clamp(28px, 6vw, 56px); list-style: none; padding: 0; margin: 0; }
.stats li { border-left: 3px solid var(--accent); padding-left: 14px; }
.stats strong { display: block; font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 0.88rem; }

.hero__avatar {
  position: relative; aspect-ratio: 1; width: min(100%, 400px); justify-self: center;
  border-radius: 50%; padding: 22px;
}
.hero__avatar::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0.55;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 78%);
}
.hero__avatar::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); top: 14%; right: 8%;
  box-shadow: 0 0 0 6px var(--bg);
}
.hero__avatar-inner {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #3b82f6, #1d4ed8 55%, #1e3a8a);
  color: #fff; font-size: clamp(3rem, 9vw, 6rem); font-weight: 700; letter-spacing: -0.04em;
}
.hero__avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__avatar { order: -1; width: 180px; justify-self: start; padding: 12px; }
  .hero__avatar::after { width: 12px; height: 12px; }
}

/* ---------- seções ---------- */
.section { padding: clamp(64px, 10vw, 112px) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.section__head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.grid-2--services { grid-template-columns: 1fr 1.5fr; }
.sticky-head { position: sticky; top: 100px; }
@media (max-width: 860px) {
  .grid-2, .grid-2--services { grid-template-columns: 1fr; }
  .sticky-head { position: static; }
}
.prose p { color: var(--muted); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}

/* ---------- skills ---------- */
.skills { display: grid; gap: 28px; }
.skills h3 { font-size: 0.95rem; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li, .tag {
  font: 500 0.82rem var(--font); padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.tag { padding: 2px 10px; font-size: 0.75rem; background: var(--accent-soft); border-color: transparent; color: var(--accent); }
:root[data-theme="dark"] .tag { color: #a9c4ff; }

.socials { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; padding: 0; margin: 24px 0 0; }
.socials a { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.socials a:hover { color: var(--accent); }

/* ---------- experiência ---------- */
.xp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.xp-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px;
}
.xp-item__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.xp-item h3 { margin: 0; font-size: 1rem; }
.xp-item h3 span { color: var(--accent); font-weight: 600; }
.xp-item p { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }
.xp-item__period { font: 500 0.8rem var(--mono); color: var(--muted); white-space: nowrap; }
@media (max-width: 600px) {
  .xp-item { grid-template-columns: auto 1fr; }
  .xp-item__period { grid-column: 2; }
}

/* ---------- serviços ---------- */
.service-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.service-row {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  transition: border-color 0.2s, transform 0.2s;
}
.service-row:hover { border-color: var(--accent); transform: translateX(4px); }
.service-row .icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; background: var(--accent); color: var(--on-accent); font-size: 1.25rem;
}
.service-row h3 { margin: 0 0 4px; }
.service-row p { color: var(--muted); margin: 0; font-size: 0.93rem; }

/* ---------- projetos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: 500 0.875rem var(--font); padding: 7px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer;
}
.filters button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
@media (max-width: 400px) { .cards { grid-template-columns: 1fr; } }
.project { display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: transform 0.2s, border-color 0.2s; }
.project:hover { transform: translateY(-4px); border-color: var(--accent); }
.project__thumb {
  position: relative; overflow: hidden; aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  background: #c9d6ee;
  margin: 12px 12px 0; border-radius: 12px;
}
:root[data-theme="dark"] .project__thumb { background: #1a2647; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .project__thumb { background: #1a2647; } }
/* onda decorativa inspirada no Purplefolio */
.project__thumb::before {
  content: ""; position: absolute; width: 140%; aspect-ratio: 1; border-radius: 50%;
  border: 22px solid #1d4ed8; top: 45%; left: -20%;
}
.project__mock {
  position: relative; width: 72%; aspect-ratio: 16 / 10; border-radius: 8px;
  background: #fff; box-shadow: 0 12px 30px rgb(15 23 42 / 0.25);
  display: grid; grid-template-columns: 22% 1fr; overflow: hidden;
}
.project__mock::before { content: ""; background: #eef2fb; border-right: 1px solid #dfe5f1; }
.project__mock span {
  display: grid; place-items: center; font-weight: 700; color: #1d4ed8; font-size: clamp(1rem, 2.4vw, 1.4rem);
}
.project__thumb img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.project__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project__body p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.project__body h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.project__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project__links { display: flex; gap: 18px; margin-top: auto; padding-top: 6px; }
.project__links a { font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--accent); }
.project__links a:hover { text-decoration: underline; }
.project.is-hidden { display: none; }

/* ---------- processo ---------- */
.steps {
  list-style: none; padding: 0; margin: 8px 0 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px;
}
.steps li { counter-increment: step; padding-top: 20px; border-top: 2px solid var(--border); position: relative; }
.steps li::before {
  content: "0" counter(step); font: 500 0.85rem var(--mono); color: var(--accent);
  display: block; margin-bottom: 8px;
}
.steps li::after { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--accent); }
.steps p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ---------- faixa azul ---------- */
.cta-band {
  background: linear-gradient(120deg, #1e3a8a, #1d4ed8 55%, #2563eb);
  color: #fff; padding: clamp(56px, 9vw, 96px) 0; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; width: 520px; aspect-ratio: 1; border-radius: 50%;
  border: 40px solid rgb(255 255 255 / 0.07); right: -160px; top: -200px;
}
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; position: relative; z-index: 1; }
.cta-band h2 { margin: 0; color: #fff; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem var(--mono); color: var(--accent); line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 20px; }

/* ---------- contato ---------- */
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
.contact-list li { display: grid; }
.contact-list a { font-weight: 600; font-size: 1.1rem; text-decoration: none; word-break: break-all; }
.contact-list a:hover { color: var(--accent); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 0.95rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 14px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form__status { margin: 0; font-size: 0.9rem; }
.form__status.ok { color: var(--ok); }
.form__status.err { color: var(--danger); }
.hp { position: absolute; left: -9999px; }

/* ---------- rodapé ---------- */
.footer { background: #0b1e5b; color: #dbe5ff; padding: clamp(56px, 8vw, 88px) 0 28px; }
.footer a { color: #dbe5ff; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgb(255 255 255 / 0.12); }
.footer__name { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 700; letter-spacing: -0.04em; color: #fff; margin: 0; line-height: 1.1; }
.footer__role { color: #9fb4e8; margin: 8px 0 0; }
.footer__cols { display: flex; gap: clamp(32px, 8vw, 80px); }
.footer__cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; font-size: 0.92rem; }
.footer__label { font-weight: 600; color: #fff; margin-bottom: 4px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: 0.85rem; color: #9fb4e8; }
.footer__bottom p { margin: 0; }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / 0.2);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.06); }

/* ---------- animação de entrada ---------- */
.reveal { opacity: 0; translate: 0 16px; transition: opacity 0.6s ease, translate 0.6s ease, transform 0.2s, border-color 0.2s; }
.reveal.in { opacity: 1; translate: none; }
