:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --ink: #121826;
  --muted: #5a6478;
  --line: #d5dbe6;
  --accent: #2f4fe0;
  --accent-ink: #ffffff;
  --accent-soft: #e3e8fc;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --surface: #171e2e;
    --ink: #e8ecf5;
    --muted: #9aa5bb;
    --line: #2a3348;
    --accent: #7e94ff;
    --accent-ink: #0f1420;
    --accent-soft: #232c4d;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); max-width: 1180px; margin: 0 auto; }

/* Barra lateral */
.side {
  position: sticky; top: 0; align-self: start; height: 100vh;
  padding: 56px 32px; display: flex; flex-direction: column; gap: 32px;
  border-right: 1px solid var(--line);
}
.brand { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.15; margin: 0; }
.role { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { text-decoration: none; padding: 6px 0; color: var(--muted); font-weight: 500; border-left: 3px solid transparent; padding-left: 12px; margin-left: -15px; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); border-left-color: var(--accent); }
.socials { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; font-size: .95rem; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: 50%;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.socials a svg { width: 20px; height: 20px; }
.socials a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Conteúdo */
main { padding: 56px 48px 96px; }
section { padding: 24px 0 64px; scroll-margin-top: 8px; }
h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; max-width: 15ch; }
h2 { font-size: 1.9rem; margin-bottom: 24px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 52ch; margin: 24px 0 32px; }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 12px 22px; border-radius: 8px; font-weight: 500; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); margin-left: 8px; }

/* Tecnologias (filtro) */
.hint { color: var(--muted); margin: -12px 0 20px; max-width: 56ch; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: inherit; font-weight: 500; cursor: pointer; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Projetos */
.projects { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.project h3 { font-family: var(--display); font-size: 1.3rem; margin: 0; }
.project p { margin: 0; color: var(--muted); font-size: .98rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .82rem; background: var(--accent-soft); color: var(--ink); padding: 2px 10px; border-radius: 6px; }
.links { margin-top: auto; display: flex; gap: 16px; font-weight: 500; }
.links a { color: var(--accent); text-underline-offset: 3px; }
.empty { color: var(--muted); grid-column: 1 / -1; }

/* Sobre / Contato */
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1em; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; max-width: 62ch; }
.facts li { padding-left: 16px; border-left: 3px solid var(--accent); }
footer { color: var(--muted); font-size: .9rem; padding-top: 24px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .layout { display: block; }
  .side { position: static; height: auto; padding: 28px 20px 8px; border-right: 0; gap: 16px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
  .nav a { border-left: 0; margin: 0; padding: 4px 0; }
  .nav a.on { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 3px; }
  main { padding: 24px 20px 64px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
