/* Identidade visual compartilhada pelo Currículo (/) e pela Bancada (/bancada): tokens, base, cabeçalho, botões, abas, chips, gráficos e transições.
   O Currículo é a referência; cada área só acrescenta o que é dela (portfolio.css e estilo.css). Base azul-ardósia, acento verde #20d676, dois acentos suaves, cor forte só para estado. */
:root {
  --fundo: #f5f6fa; --superficie: #ffffff; --superficie-2: #eef0f6; --linha: #dde1ea;
  --texto: #1a2030; --texto-2: #596378;
  --acento: #20d676; --acento-texto: #0a7a3c; --acento-borda: #0f9447; --acento-2: #1a7a70; --acento-3: #6b4fb3; --sobre-acento: #0e1219;
  --ok: #277a4c; --atencao: #8a5a0a; --perigo: #b03a48;
  --pontos: rgba(26, 32, 48, .09);
  --f-corpo: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
  --raio: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fundo: #0e1219; --superficie: #141922; --superficie-2: #1a2030; --linha: #262e3d;
    --texto: #e4e8f0; --texto-2: #98a3b8;
    --acento: #20d676; --acento-texto: #20d676; --acento-borda: #20d676; --acento-2: #5cc1b2; --acento-3: #b4a0e6; --sobre-acento: #0e1219;
    --ok: #72c492; --atencao: #e0b062; --perigo: #ee8d98;
    --pontos: rgba(228, 232, 240, .07);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fundo: #0e1219; --superficie: #141922; --superficie-2: #1a2030; --linha: #262e3d;
  --texto: #e4e8f0; --texto-2: #98a3b8;
  --acento: #20d676; --acento-texto: #20d676; --acento-borda: #20d676; --acento-2: #5cc1b2; --acento-3: #b4a0e6; --sobre-acento: #0e1219;
  --ok: #72c492; --atencao: #e0b062; --perigo: #ee8d98;
  --pontos: rgba(228, 232, 240, .07);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background-color: var(--fundo); color: var(--texto); font: 400 15px/1.55 var(--f-corpo); -webkit-text-size-adjust: 100%;
  background-image: radial-gradient(var(--pontos) 1px, transparent 1px); background-size: 22px 22px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--superficie); }
a { color: var(--acento-texto); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--acento-borda); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.mut { color: var(--texto-2); }
.dev { font: 500 13px var(--f-mono); color: var(--acento-2); }
.ponto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); flex: none; }

/* cabeçalho: a mesma marca nas duas áreas; o trecho em mono diz onde o visitante está */
.topo { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--superficie) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--linha); }
.topo .barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.topo .marca { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; min-width: 0; color: var(--texto); text-decoration: none; white-space: nowrap; }
.monograma { width: 28px; height: 28px; border-radius: 7px; background: var(--acento); color: var(--sobre-acento); display: grid; place-items: center; font: 700 12px var(--f-mono); flex: none; }
.topo .marca small { color: var(--texto-2); font: 500 12px var(--f-mono); margin-left: 6px; }
a.marca:hover small { color: var(--acento-texto); }

/* botões */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linha); background: var(--superficie); color: var(--texto); font: 600 13px var(--f-corpo); padding: 8px 12px; min-height: 36px; border-radius: 7px; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s; }
.btn:hover:not([disabled]) { border-color: var(--acento-borda); }
.btn.primario { background: var(--acento); border-color: var(--acento); color: var(--sobre-acento); }
.btn.primario:hover:not([disabled]) { background: color-mix(in srgb, var(--acento) 88%, var(--texto)); }

/* abas */
.abas { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.aba { flex: 0 0 auto; border: 0; background: transparent; color: var(--texto-2); font: 600 14px var(--f-corpo); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: color .2s, border-color .2s, background .2s; }
.aba:hover { color: var(--texto); }
.aba[aria-selected="true"] { color: var(--texto); border-bottom-color: var(--acento-borda); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.chip { font: 600 12.5px var(--f-mono); padding: 3px 10px; border: 1px solid var(--linha); border-radius: 6px; color: var(--texto-2); background: var(--superficie-2); white-space: nowrap; }
.chip.a { color: var(--acento-texto); border-color: color-mix(in srgb, var(--acento-borda) 45%, var(--linha)); }
.chip.t { color: var(--acento-2); border-color: color-mix(in srgb, var(--acento-2) 45%, var(--linha)); }
.chip.v { color: var(--acento-3); border-color: color-mix(in srgb, var(--acento-3) 45%, var(--linha)); }

/* gráficos: SVG feito à mão, cores pelos tokens do tema */
.fig { padding: 18px; background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); min-width: 0; }
.figt { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fig .figt h3 { font: 600 12px var(--f-mono); letter-spacing: .04em; color: var(--acento-2); margin: 0; }
.figt span { color: var(--texto-2); font-size: 13px; }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig svg text { font-family: var(--f-corpo); font-size: 12.5px; fill: var(--texto-2); }
.fig svg .tx { fill: var(--texto); font-weight: 600; }
.fig svg .mono { font-family: var(--f-mono); font-size: 11px; }
.fig svg .grande { font-size: 26px; font-weight: 700; fill: var(--texto); }
.grade { stroke: var(--linha); stroke-width: 1; stroke-dasharray: 2 4; }
.b-a { fill: var(--acento); } .b-t { fill: var(--acento-2); } .b-v { fill: var(--acento-3); } .b-n { fill: var(--texto-2); }
.s-a { stroke: var(--acento-borda); } .s-t { stroke: var(--acento-2); } .s-v { stroke: var(--acento-3); }
.caixa { fill: var(--superficie-2); stroke: var(--linha); stroke-width: 1; }
.caixa.dest { stroke: var(--acento-borda); fill: color-mix(in srgb, var(--acento) 10%, var(--superficie)); }
.lig { fill: none; stroke: var(--texto-2); stroke-width: 1.4; }
.pt { fill: var(--texto-2); }
.cresce { transform-box: fill-box; transform-origin: left center; animation: cresce .8s ease-out both; }
@keyframes cresce { from { transform: scaleX(0); } }

/* movimento: a mesma entrada nas trocas de aba do Currículo, entre as telas da Bancada e na passagem de uma área para a outra.
   Na navegação entre páginas o cabeçalho fica no lugar e só o conteúdo troca (View Transitions; navegador sem suporte troca direto). */
@keyframes entra { from { opacity: 0; } }
@keyframes sobe { from { opacity: 0; transform: translateY(18px); } }
/* 1) entre páginas (e na troca de tema): a tela antiga esmaece na nova; o cabeçalho fica no lugar */
@view-transition { navigation: auto; }
.topo { view-transition-name: topo; }
::view-transition-old(root) { animation-duration: .2s; }
::view-transition-new(root) { animation-duration: .35s; }
/* 2) ao abrir uma aba do Currículo ou uma tela da Bancada, os blocos sobem em cascata (vale em qualquer navegador).
   O trecho #vivo fica de fora: ele é trocado a cada 1,5 s e piscaria. */
.pagina:not([hidden]) > *, .tela > :not(#vivo) { animation: sobe .5s cubic-bezier(.2, .7, .2, 1) backwards; }
.pagina:not([hidden]) > :nth-child(2), .tela > :nth-child(2) { animation-delay: .06s; }
.pagina:not([hidden]) > :nth-child(3), .tela > :nth-child(3) { animation-delay: .12s; }
.pagina:not([hidden]) > :nth-child(4), .tela > :nth-child(4) { animation-delay: .18s; }
.pagina:not([hidden]) > :nth-child(n+5), .tela > :nth-child(n+5) { animation-delay: .24s; }
/* 3) janelas e avisos entram do mesmo jeito */
dialog[open] { animation: sobe .28s cubic-bezier(.2, .7, .2, 1); }
dialog[open]::backdrop { animation: entra .28s ease-out; }
.aviso { animation: sobe .3s cubic-bezier(.2, .7, .2, 1); }
/* 4) resposta ao toque e ao mouse */
a { transition: color .15s; }
.btn { transition: border-color .15s, background .15s, color .15s, transform .1s; }
.btn:active:not([disabled]) { transform: scale(.97); }
/* quem pediu menos movimento ao sistema fica só com o esmaecimento: nada desliza, cresce ou pulsa */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes sobe { from { opacity: 0; } }
  .cresce, .halo, .troca { animation: none !important; }
  .btn:active:not([disabled]) { transform: none; }
}
