/* ==========================================================================
   tema.css — Tema futurista com vidro líquido (Liquid Glass) em CSS puro.
   Compartilhado entre o currículo (_fonte/curriculo.html) e a tela de acesso
   (body.portal-body), que é gerada pelo build e pode não ter JavaScript.

   Sumário
     1. Fontes e variáveis
     2. Base e fundo animado (orbes + grade em perspectiva + ruído) — só CSS
     3. Vidro líquido: .vidro (painel), .vidro-btn (botão), .vidro-barra (barra)
     4. Currículo: barra de progresso, barra de ações, cabeçalho, seções,
        cartões, competências, rodapé
     5. Certificados (.cert-grid / .cert-card) — pronto para uso futuro
     6. Tela de acesso (.portal ...)
     7. Responsivo
     8. Acessibilidade: movimento e transparência reduzidos, fallback sem
        backdrop-filter
     9. Impressão (A4, fundo branco, sem efeitos)
   ========================================================================== */

/* 1. Fontes e variáveis ================================================== */
/* As fontes (Sora, Inter, JetBrains Mono) vêm do <link> do Google Fonts em cada
   página que usa este tema — o tema não as importa para não baixá-las duas vezes. */

:root {
  color-scheme: dark;

  /* Paleta */
  --fundo: #05060f;
  --fundo-2: #0a0f1f;
  --texto: #e8ecf6;          /* texto principal  (~16:1 sobre o fundo) */
  --texto-2: #c4cbdc;        /* texto corrido    (~11:1) */
  --mudo: #949fb8;           /* rótulos/datas    (~7:1)  */
  --ciano: #67e8f9;
  --ciano-forte: #22d3ee;
  --violeta: #a78bfa;
  --violeta-forte: #8b5cf6;
  --rosa: #f0abfc;
  --verde: #6ee7b7;
  --erro: #fda4af;
  --neon: linear-gradient(90deg, var(--ciano) 0%, var(--violeta) 60%, var(--rosa) 100%);

  /* Tipografia */
  --f-titulo: "Sora", "Space Grotesk", system-ui, sans-serif;
  --f-texto: "Inter", "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Vidro */
  --vidro-blur: 18px;
  --vidro-sat: 175%;
  --vidro-raio: 18px;
  --vidro-fundo:
    linear-gradient(160deg,
      rgba(255, 255, 255, .11) 0%,
      rgba(255, 255, 255, .045) 42%,
      rgba(255, 255, 255, .03) 60%,
      rgba(255, 255, 255, .07) 100%);
  --vidro-borda:
    linear-gradient(140deg,
      rgba(255, 255, 255, .55) 0%,
      rgba(255, 255, 255, .12) 22%,
      rgba(255, 255, 255, .04) 50%,
      rgba(167, 139, 250, .22) 78%,
      rgba(103, 232, 249, .45) 100%);
  --vidro-sombra:
    inset 0 1px 0 0 rgba(255, 255, 255, .30),          /* brilho especular da aresta superior */
    inset 0 -1px 0 0 rgba(255, 255, 255, .06),
    inset 0 0 18px 0 rgba(255, 255, 255, .035),        /* espessura do vidro */
    inset 0 -14px 26px -16px rgba(103, 232, 249, .16), /* luz refratada na base */
    0 1px 1px rgba(0, 0, 0, .30),
    0 18px 42px -20px rgba(0, 0, 0, .75);

  --ease-mola: cubic-bezier(.34, 1.56, .64, 1);
  --ease-suave: cubic-bezier(.16, 1, .3, 1);
}

/* 2. Base e fundo ======================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--fundo);
  /* ruído fino + vinheta */
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
    radial-gradient(120% 80% at 50% -10%, #0d1430 0%, var(--fundo) 60%);
  background-attachment: fixed, fixed;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--texto);
  font-family: var(--f-texto);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(103, 232, 249, .28); color: #fff; }

/* Orbes de luz em movimento lento (camada fixa atrás de tudo) */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 22% 28%, rgba(34, 211, 238, .30), transparent 70%),
    radial-gradient(closest-side at 78% 22%, rgba(139, 92, 246, .32), transparent 72%),
    radial-gradient(closest-side at 62% 78%, rgba(240, 171, 252, .16), transparent 70%),
    radial-gradient(closest-side at 18% 82%, rgba(99, 102, 241, .22), transparent 70%);
  filter: blur(20px) saturate(120%);
  animation: orbes 38s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes orbes {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  33%  { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.06); }
  66%  { transform: translate3d(-3%, 4%, 0) rotate(-6deg) scale(.97); }
  100% { transform: translate3d(2%, 2%, 0) rotate(4deg) scale(1.04); }
}

/* Grade em perspectiva ("chão" sintético) que desliza devagar */
body::after {
  content: "";
  position: fixed;
  left: -50%;
  right: -50%;
  bottom: -8vh;
  height: 62vh;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(103, 232, 249, .55) 2px, transparent 2px),
    linear-gradient(90deg, rgba(167, 139, 250, .5) 2px, transparent 2px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(64deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .55) 35%, transparent 80%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .55) 35%, transparent 80%);
  opacity: .38;
  animation: grade 14s linear infinite;
}

@keyframes grade { to { background-position: 0 64px, 0 0; } }

a { color: inherit; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

/* 3. Vidro líquido ======================================================= */
/*
   Receita:
   - backdrop-filter blur + saturate (+ -webkit- para Safari) desfoca e
     intensifica as cores do que está atrás;
   - fundo translúcido em gradiente (mais claro em cima, como luz incidente);
   - ::before  -> borda de 1px em gradiente (máscara xor/exclude);
   - ::after   -> reflexo especular (brilho no topo + ponto de luz que segue
                  o ponteiro nos botões via --mx/--my);
   - sombras internas dão espessura e a "luz refratada" na base;
   - html.refracao (definida pelo JS só no Chromium) acrescenta um filtro SVG
     feDisplacementMap ao backdrop-filter, distorcendo levemente o fundo.
*/
.vidro,
.vidro-btn,
.vidro-barra {
  position: relative;
  isolation: isolate;
  background: var(--vidro-fundo);
  -webkit-backdrop-filter: blur(var(--vidro-blur)) saturate(var(--vidro-sat));
  backdrop-filter: blur(var(--vidro-blur)) saturate(var(--vidro-sat));
  border-radius: var(--vidro-raio);
  box-shadow: var(--vidro-sombra);
}

.vidro::before,
.vidro-btn::before,
.vidro-barra::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: var(--vidro-borda);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.vidro::after,
.vidro-btn::after,
.vidro-barra::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(140% 70% at 50% -20%, rgba(255, 255, 255, .16), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 38%);
  pointer-events: none;
}

/* Botão de vidro */
.vidro-btn {
  --vidro-raio: 999px;
  --vidro-blur: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.5rem;
  padding: .55rem 1.15rem;
  border: 0;
  color: var(--texto);
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .35s var(--ease-mola), box-shadow .3s ease, background .3s ease, color .2s ease;
}

.vidro-btn::after {
  background:
    radial-gradient(90px circle at var(--mx, 50%) var(--my, -30%), rgba(255, 255, 255, .30), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, .14), transparent 50%);
  transition: opacity .3s ease;
}

.vidro-btn:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06) 50%, rgba(103, 232, 249, .10));
  box-shadow:
    var(--vidro-sombra),
    0 0 0 1px rgba(103, 232, 249, .18),
    0 10px 30px -8px rgba(34, 211, 238, .35);
}

.vidro-btn:active { transform: translateY(0) scale(.96); transition-duration: .12s; }
.vidro-btn:focus-visible { outline-offset: 4px; border-radius: 999px; }
.vidro-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.vidro-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform .35s var(--ease-mola);
}
.vidro-btn:hover svg { transform: translateY(1px) scale(1.08); }

/* Barra de vidro (contêineres fixos, trilhos) */
.vidro-barra {
  --vidro-raio: 999px;
  --vidro-blur: 22px;
  --vidro-sat: 190%;
}

/* Refração (progressivo: só quando o JS liga html.refracao no Chromium) */
html.refracao .vidro-barra,
html.refracao .vidro-refrata {
  -webkit-backdrop-filter: url(#vidro-refracao) blur(var(--vidro-blur)) saturate(var(--vidro-sat));
  backdrop-filter: url(#vidro-refracao) blur(var(--vidro-blur)) saturate(var(--vidro-sat));
}

/* 4. Currículo (layout de portfólio) ===================================== */

/* Barra de progresso de rolagem (trilho de vidro + preenchimento neon) */
.progresso {
  --vidro-blur: 12px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  z-index: 700;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
#progress-bar {
  position: absolute;
  inset: 1px 0 1px 0;
  width: 100%;
  border-radius: 0 999px 999px 0;
  background: var(--neon);
  box-shadow: 0 0 12px rgba(103, 232, 249, .7), 0 0 24px rgba(167, 139, 250, .45);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .12s linear;
}
#progress-bar::after {          /* reflexo especular sobre o preenchimento */
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .65), rgba(255, 255, 255, 0));
}

/* Partículas (canvas fixo atrás do conteúdo) */
#particles-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: .7;
}

/* Link "pular para o conteúdo" (visível só no foco por teclado) */
.pular {
  position: fixed;
  top: -100px;
  left: 14px;
  z-index: 800;
}
.pular:focus { top: 18px; }

/* ---- Barra de navegação fixa de vidro ---- */
.nav {
  --vidro-raio: 999px;
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 600;
  width: min(1180px, calc(100% - 28px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .42rem .45rem .42rem .5rem;
  transition: background .35s ease, box-shadow .35s ease, top .35s ease;
}
.nav.rolado {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05) 45%, rgba(255, 255, 255, .07)),
    rgba(8, 11, 26, .45);
  box-shadow: var(--vidro-sombra), 0 20px 50px -24px rgba(0, 0, 0, .9);
}

.nav-marca {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex: none;
  padding-right: .4rem;
  color: var(--texto);
  text-decoration: none;
  font-family: var(--f-titulo);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
  border-radius: 999px;
}
.nav-mono {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: #05060f;
  background: linear-gradient(135deg, var(--ciano), var(--violeta) 70%, var(--rosa));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 0 18px rgba(103, 232, 249, .45);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .15rem;
  margin-inline: auto;
}
.nav-links a {
  position: relative;
  padding: .55rem .9rem;
  border-radius: 999px;
  color: var(--texto-2);
  font-size: .84rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background .25s ease, box-shadow .25s ease;
}
.nav-links a:hover { color: var(--texto); background: rgba(255, 255, 255, .06); }
.nav-links a.ativo {
  color: #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 6px 18px -8px rgba(34, 211, 238, .5);
}
.nav-links a.ativo::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 14px;
  height: 2px;
  margin-left: -7px;
  border-radius: 2px;
  background: var(--ciano);
  box-shadow: 0 0 8px var(--ciano);
}

.btn-container {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex: none;
}
.btn-container .vidro-btn { --vidro-blur: 10px; min-height: 2.45rem; padding: .5rem 1rem; font-size: .68rem; }
.btn-container .btn-sair:hover {
  box-shadow:
    var(--vidro-sombra),
    0 0 0 1px rgba(253, 164, 175, .25),
    0 10px 30px -8px rgba(244, 114, 182, .35);
}
.nav-menu-btn { display: none !important; }
.nav-menu-btn svg line { transition: transform .3s var(--ease-mola); transform-origin: 8px 8px; }
.nav.menu-aberto .nav-menu-btn .l1 { transform: translateY(3px) rotate(45deg); }
.nav.menu-aberto .nav-menu-btn .l2 { transform: translateY(-3px) rotate(-45deg); }

/* ---- Layout ---- */
.wrapper {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  overflow-x: clip;               /* o orbe decorativo sangra até a borda da tela sem criar rolagem lateral */
}

/* ---- Hero (tela cheia) ---- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  align-items: center;
  gap: 2rem;
  padding: 7.5rem 0 6rem;
}
.hero-conteudo { position: relative; z-index: 1; min-width: 0; }

.tagline {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--f-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ciano);
  margin-bottom: 1.3rem;
  overflow: hidden;
}
.tagline::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ciano);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, .18), 0 0 14px var(--ciano);
  animation: pulso 2.4s ease-in-out infinite;
}
.tagline-inner {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: subir .6s .15s var(--ease-suave) forwards;
}
@keyframes subir { to { opacity: 1; transform: translateY(0); } }
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.hero h1 {
  font-family: var(--f-titulo);
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.04em;
  color: var(--texto);
}
.word-wrap { display: block; overflow: hidden; padding-bottom: .07em; }
.word-inner {
  display: block;
  transform: translateY(110%);
  opacity: 0;
  animation: palavra .85s var(--ease-suave) forwards;
}
.word-wrap:nth-child(1) .word-inner { animation-delay: .3s; }
.word-wrap:nth-child(2) .word-inner { animation-delay: .46s; }
.word-wrap:nth-child(3) .word-inner { animation-delay: .62s; }
@keyframes palavra { to { transform: translateY(0); opacity: 1; } }

.a1 {
  background: linear-gradient(95deg, var(--ciano) 0%, #93c5fd 40%, var(--violeta) 80%, var(--rosa) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--ciano);
  animation: palavra .85s .46s var(--ease-suave) forwards, brilho 9s 1.4s ease-in-out infinite alternate;
}
@keyframes brilho { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.a2 {
  /* "vidro fosco" no texto: branco que esmaece para baixo */
  background: linear-gradient(180deg, rgba(232, 236, 246, .92) 0%, rgba(214, 220, 236, .8) 60%, rgba(196, 181, 253, .74) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--texto-2);
}

.hero-cargo,
.hero-frase,
.hero-acoes {
  opacity: 0;
  animation: entrar .8s var(--ease-suave) forwards;
}
.hero-cargo {
  margin-top: 1.6rem;
  font-family: var(--f-titulo);
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--texto);
  animation-delay: .8s;
}
.hero-frase {
  margin-top: .6rem;
  max-width: 44ch;
  font-size: clamp(.98rem, 1.4vw, 1.1rem);
  line-height: 1.7;
  color: var(--texto-2);
  animation-delay: .92s;
}
.hero-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.2rem;
  animation-delay: 1.05s;
}
@keyframes entrar { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.cta { min-height: 3rem; padding: .8rem 1.4rem; font-size: .74rem; }
.cta-principal {
  background: linear-gradient(160deg, rgba(103, 232, 249, .26), rgba(139, 92, 246, .22) 70%, rgba(240, 171, 252, .18));
  box-shadow: var(--vidro-sombra), 0 0 0 1px rgba(103, 232, 249, .25), 0 12px 34px -12px rgba(34, 211, 238, .55);
}
.cta-principal:hover svg { transform: translateY(3px); }

/* Orbe de vidro decorativo (refrata um blob de luz que gira atrás dele) */
.hero-orbe {
  position: relative;
  justify-self: center;
  width: min(420px, 100%);
  aspect-ratio: 1;
  opacity: 0;
  animation: entrar 1.2s .5s var(--ease-suave) forwards;
}
.hero-orbe::before {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
  background: conic-gradient(from 0deg, var(--ciano-forte), var(--violeta-forte), var(--rosa), #38bdf8, var(--ciano-forte));
  filter: blur(6px);
  opacity: .9;
  animation: girar 16s linear infinite, morfar 10s ease-in-out infinite alternate;
}
@keyframes morfar {
  from { border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; }
  to   { border-radius: 58% 42% 45% 55% / 40% 58% 42% 60%; }
}
.orbe-esfera.vidro {
  --vidro-raio: 50%;
  --vidro-blur: 22px;
  --vidro-sat: 160%;
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .42), rgba(255, 255, 255, .08) 32%, transparent 52%),
    radial-gradient(circle at 70% 80%, rgba(103, 232, 249, .20), transparent 55%),
    rgba(255, 255, 255, .04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset -24px -34px 60px rgba(139, 92, 246, .30),
    inset 22px 18px 50px rgba(103, 232, 249, .16),
    0 40px 90px -30px rgba(34, 211, 238, .45);
  animation: flutuar 7s ease-in-out infinite alternate;
}
.orbe-esfera.vidro::after {
  inset: 8% 22% 58% 18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .55), transparent);
  filter: blur(4px);
}
@keyframes flutuar { from { transform: translateY(-8px); } to { transform: translateY(10px); } }

.orbe-anel {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 1px solid rgba(103, 232, 249, .35);
  transform: perspective(900px) rotateX(72deg) rotateZ(0deg);
  animation: orbita 18s linear infinite;
  pointer-events: none;
}
.orbe-anel::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--ciano);
  box-shadow: 0 0 12px var(--ciano), 0 0 24px var(--ciano);
}
.anel-2 { inset: 0; border-color: rgba(167, 139, 250, .28); transform: perspective(900px) rotateX(72deg) rotateY(18deg); animation-duration: 26s; animation-direction: reverse; }
.anel-2::after { background: var(--violeta); box-shadow: 0 0 12px var(--violeta), 0 0 24px var(--violeta); }
.anel-3 { inset: 9%; border-color: rgba(240, 171, 252, .22); transform: perspective(900px) rotateX(76deg) rotateY(-14deg); animation-duration: 22s; }
.anel-3::after { width: 6px; height: 6px; margin-top: -3px; background: var(--rosa); box-shadow: 0 0 10px var(--rosa); }
@keyframes orbita {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}

/* Indicador de rolar */
.rolar {
  position: absolute;
  left: 50%;
  bottom: 1.8rem;
  transform: translateX(-50%);
  padding: .4rem;
  border-radius: 999px;
  opacity: 0;
  animation: entrar .8s 1.6s ease forwards;
}
.rolar-mouse {
  display: block;
  width: 24px;
  height: 38px;
  border-radius: 14px;
  border: 1.5px solid rgba(232, 236, 246, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 16px rgba(103, 232, 249, .2);
  position: relative;
}
.rolar-ponto {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 7px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--ciano);
  box-shadow: 0 0 8px var(--ciano);
  animation: rolarPonto 1.8s ease-in-out infinite;
}
@keyframes rolarPonto {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  80%, 100% { transform: translateY(14px); opacity: 0; }
}

/* ---- Seções ---- */
main { counter-reset: secao; }
.secao {
  position: relative;
  padding-top: 6.5rem;
  scroll-margin-top: 1rem;
  counter-increment: secao;
}
.secao-cabeca {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2.4rem;
}
.secao-cabeca::after {          /* numeral gigante vazado, decorativo */
  content: counter(secao, decimal-leading-zero);
  position: absolute;
  right: 0;
  bottom: -.2em;
  font-family: var(--f-titulo);
  font-size: clamp(4rem, 11vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(167, 139, 250, .22);
  pointer-events: none;
  z-index: -1;
}
.secao-rotulo.vidro {
  --vidro-raio: 999px;
  --vidro-blur: 12px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .42rem .95rem .42rem .8rem;
  font-family: var(--f-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ciano);
}
.secao-titulo {
  font-family: var(--f-titulo);
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.035em;
  color: var(--texto);
}

/* Revelação ao rolar (só com JS; sem JS tudo aparece).
   A opacidade é animada nos próprios painéis de vidro — nunca num ancestral —
   para não quebrar o backdrop-filter dos filhos durante a transição. */
.js .revelar {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .8s var(--ease-suave), box-shadow .3s ease, background .3s ease;
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .revelar.visivel { opacity: 1; transform: none; }

/* ---- Sobre ---- */
.objective-box {
  --vidro-raio: 26px;
  padding: 2.2rem 2.6rem 2.2rem 2.8rem;
  font-size: clamp(1.02rem, 1.55vw, 1.2rem);
  line-height: 1.85;
  color: var(--texto-2);
}
.objective-box > .acento {
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--ciano), var(--violeta));
  box-shadow: 0 0 14px rgba(103, 232, 249, .7);
}

/* ---- Experiência: linha do tempo ---- */
.linha-tempo {
  list-style: none;
  position: relative;
  display: grid;
  gap: 1.4rem;
  padding-left: 2.6rem;
}
.linha-tempo::before {
  content: "";
  position: absolute;
  left: .6rem;
  top: 1.2rem;
  bottom: 1.2rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--ciano), var(--violeta) 60%, rgba(167, 139, 250, .1));
  box-shadow: 0 0 12px rgba(103, 232, 249, .45);
}
.lt-item { position: relative; }
.lt-no {
  position: absolute;
  left: calc(-2.6rem + .6rem + 1px);
  top: 2.1rem;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--fundo);
  border: 2px solid var(--violeta);
  box-shadow: 0 0 12px rgba(167, 139, 250, .7);
}
.lt-item:first-child .lt-no {
  background: var(--ciano);
  border-color: #fff;
  box-shadow: 0 0 0 5px rgba(103, 232, 249, .18), 0 0 18px var(--ciano);
}

.exp-card {
  --vidro-raio: 22px;
  padding: 1.7rem 2rem 1.6rem 2.2rem;
}
.exp-accent-bar {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--violeta), var(--ciano));
  box-shadow: 0 0 14px rgba(167, 139, 250, .7);
  transition: width .3s ease, box-shadow .3s ease;
}
.exp-card:hover { box-shadow: var(--vidro-sombra), 0 22px 50px -22px rgba(34, 211, 238, .4); }
.exp-card:hover .exp-accent-bar { width: 5px; box-shadow: 0 0 22px rgba(103, 232, 249, .9); }

/* Destaque: card de experiência em evidência (.exp-card.destaque) */
.exp-card.destaque {
  --vidro-raio: 26px;
  --vidro-borda:
    linear-gradient(140deg,
      rgba(103, 232, 249, .85) 0%,
      rgba(255, 255, 255, .16) 26%,
      rgba(255, 255, 255, .04) 52%,
      rgba(167, 139, 250, .55) 80%,
      rgba(240, 171, 252, .75) 100%);
  padding: 2.2rem 2.4rem 2rem 2.6rem;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(103, 232, 249, .14), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(139, 92, 246, .16), transparent 60%),
    var(--vidro-fundo);
  box-shadow: var(--vidro-sombra), 0 30px 80px -34px rgba(34, 211, 238, .55);
}
.exp-card.destaque .exp-company {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  background: linear-gradient(95deg, #fff 0%, var(--ciano) 60%, var(--violeta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.exp-card.destaque .exp-accent-bar { width: 4px; background: var(--neon); }
.exp-card.destaque ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
}
.exp-card.destaque li:nth-last-child(2) { border-bottom: 0; }

.exp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem 1rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.exp-company {
  font-family: var(--f-titulo);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--texto);
}
.exp-date {
  font-family: var(--f-mono);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--texto-2);
  white-space: nowrap;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.exp-role {
  font-family: var(--f-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ciano);
  margin-bottom: 1.1rem;
}
.exp-card ul { list-style: none; }
.exp-card li {
  position: relative;
  padding: .5rem 0 .5rem 1.6rem;
  font-size: .94rem;
  line-height: 1.7;
  color: var(--texto-2);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.exp-card li:last-child { border-bottom: 0; }
.exp-card li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: .55rem;
  font-family: var(--f-mono);
  font-size: .8rem;
  color: var(--violeta);
  transition: transform .25s ease, color .25s ease;
}
.exp-card:hover li::before { transform: translateX(3px); color: var(--ciano); }

/* ---- Competências agrupadas ---- */
.skills-hint {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--mudo);
  margin: -1.2rem 0 1.4rem;
}
.skills-grupos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.skills-grupo {
  --vidro-raio: 24px;
  padding: 1.6rem 1.5rem 1.7rem;
}
.skills-grupo-titulo {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.15rem;
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ciano);
}
.skills-grupo-titulo::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  transform: rotate(45deg);
}
.skills-grupo:nth-child(2) .skills-grupo-titulo { color: var(--violeta); }
.skills-grupo:nth-child(3) .skills-grupo-titulo { color: var(--rosa); }

.skills-cloud { display: flex; flex-wrap: wrap; gap: .55rem; }
.skill-tag {
  --vidro-blur: 12px;
  min-height: 2.3rem;
  padding: .5rem 1rem;
  font-family: var(--f-texto);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--texto-2);
}
.skill-tag:hover { color: var(--texto); }
.skill-tag.active {
  color: #fff;
  background:
    linear-gradient(160deg, rgba(103, 232, 249, .34), rgba(139, 92, 246, .30) 70%, rgba(240, 171, 252, .26));
  box-shadow:
    var(--vidro-sombra),
    0 0 0 1px rgba(103, 232, 249, .45),
    0 0 22px rgba(103, 232, 249, .35),
    0 10px 28px -10px rgba(139, 92, 246, .6);
  text-shadow: 0 0 10px rgba(255, 255, 255, .45);
  transform: translateY(-2px);
}
.skill-tag.active::before {
  background: linear-gradient(140deg, rgba(255, 255, 255, .8), rgba(103, 232, 249, .6) 40%, rgba(167, 139, 250, .7));
}

/* ---- Formação ---- */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.edu-card {
  --vidro-raio: 24px;
  padding: 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.edu-card:hover { box-shadow: var(--vidro-sombra), 0 22px 50px -22px rgba(139, 92, 246, .45); }
.edu-degree {
  font-family: var(--f-titulo);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: .45rem;
}
.edu-school { font-size: .9rem; color: var(--texto-2); margin-bottom: 1rem; }
.edu-status {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--f-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .32rem .85rem;
  border-radius: 999px;
  color: var(--texto-2);
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.edu-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.edu-status.cursando {
  color: var(--verde);
  background: rgba(110, 231, 183, .10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(110, 231, 183, .28);
}
.edu-status.cursando::before { box-shadow: 0 0 8px var(--verde); animation: pulso 1.4s ease-in-out infinite; }

/* ---- Contato ---- */
.contato-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  font-style: normal;
}
.contato-card {
  --vidro-raio: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  padding: 1.5rem 1.6rem 1.6rem;
  color: var(--texto);
  text-decoration: none;
}
a.contato-card:hover {
  box-shadow: var(--vidro-sombra), 0 0 0 1px rgba(103, 232, 249, .25), 0 22px 50px -22px rgba(34, 211, 238, .5);
}
a.contato-card:hover .contato-valor { color: var(--ciano); }
.contato-icone {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: .8rem;
  border-radius: 14px;
  color: var(--ciano);
  background: linear-gradient(160deg, rgba(103, 232, 249, .18), rgba(139, 92, 246, .14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 0 20px rgba(103, 232, 249, .18);
}
.contato-icone svg { width: 20px; height: 20px; }
.contact-label {
  display: block;
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mudo);
}
.contato-valor {
  font-size: 1.02rem;
  font-weight: 500;
  overflow-wrap: anywhere;
  transition: color .2s ease;
}

@media (min-width: 721px) and (max-width: 1100px) {
  /* 2 colunas, com o e-mail (texto longo) ocupando a largura toda */
  .contato-grid { grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; }
  .contato-card[href^="mailto:"] { grid-column: 1 / -1; }
}

/* ---- Rodapé ---- */
footer {
  position: relative;
  margin-top: 5rem;
  padding: 2.2rem 0 2.5rem;
  text-align: center;
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mudo);
}
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, .45), rgba(167, 139, 250, .45), transparent);
}

/* 5. Projetos e Certificados (prontos para uso futuro) =================== */
/*
   Projetos — marcação esperada:
   <div class="projetos-grid">
     <article class="projeto-card vidro">
       <div class="projeto-capa"><img src="…" alt="…" loading="lazy"></div>
       <div class="projeto-corpo">
         <h3 class="projeto-titulo">…</h3>
         <p class="projeto-desc">…</p>
         <ul class="projeto-tags"><li class="projeto-tag">…</li></ul>
         <div class="projeto-links">
           <a class="vidro-btn" href="…" target="_blank" rel="noopener">Ver site</a>
           <a class="vidro-btn" href="…" target="_blank" rel="noopener">Código</a>
         </div>
       </div>
     </article>
   </div>
*/
.projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}
.projeto-card {
  --vidro-raio: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .5s var(--ease-suave), box-shadow .3s ease, opacity .7s ease;
}
.projeto-card:hover { transform: translateY(-4px); box-shadow: var(--vidro-sombra), 0 26px 60px -26px rgba(34, 211, 238, .5); }
.projeto-capa {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: .6rem .6rem 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(103, 232, 249, .18), rgba(139, 92, 246, .2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.projeto-capa img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-suave);
}
.projeto-card:hover .projeto-capa img { transform: scale(1.04); }
.projeto-capa::after {           /* reflexo de vidro sobre a capa */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 35%);
  pointer-events: none;
}
.projeto-corpo {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  flex: 1;
  padding: 1.3rem 1.5rem 1.5rem;
}
.projeto-titulo {
  font-family: var(--f-titulo);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--texto);
}
.projeto-desc { font-size: .92rem; line-height: 1.7; color: var(--texto-2); }
.projeto-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.projeto-tag {
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .28rem .7rem;
  border-radius: 999px;
  color: var(--ciano);
  background: rgba(103, 232, 249, .08);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, .25);
}
.projeto-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .4rem; }
.projeto-links .vidro-btn { min-height: 2.3rem; padding: .45rem 1rem; font-size: .66rem; }

/*
   Certificados — marcação esperada:
   <div class="cert-grid">
     <article class="cert-card vidro">
       <h3 class="cert-titulo">…</h3>
       <p class="cert-emissor">…</p>
       <p class="cert-data">…</p>
       <a class="cert-link vidro-btn" href="arquivos/…pdf" data-protegido target="_blank">Ver certificado</a>
     </article>
   </div>
*/
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.cert-card {
  --vidro-raio: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  padding: 1.4rem 1.5rem 1.3rem;
  transition: transform .5s var(--ease-suave), box-shadow .3s ease, opacity .7s ease;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--vidro-sombra), 0 22px 50px -22px rgba(34, 211, 238, .4); }
.cert-titulo {
  font-family: var(--f-titulo);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--texto);
}
.cert-emissor { font-size: .86rem; color: var(--texto-2); }
.cert-data {
  font-family: var(--f-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--mudo);
  margin-bottom: .8rem;
}
.cert-link { margin-top: auto; font-size: .68rem; min-height: 2.2rem; padding: .45rem 1rem; }

/* 6. Tela de acesso ====================================================== */
body.portal-body { overflow: hidden auto; }

.portal {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1.1rem;
}

.portal-card {
  --vidro-raio: 28px;
  --vidro-blur: 26px;
  --vidro-sat: 190%;
  width: min(440px, 100%);
  padding: 2.6rem 2.2rem 2.2rem;
  text-align: center;
  animation: portalEntrar .9s var(--ease-suave) both;
}
.portal-card::after {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255, 255, 255, .18), transparent 55%),
    radial-gradient(80% 50% at 100% 110%, rgba(103, 232, 249, .10), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 35%);
}
@keyframes portalEntrar {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.portal-titulo {
  font-family: var(--f-titulo);
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: .7rem;
  background: linear-gradient(95deg, var(--texto) 0%, var(--ciano) 55%, var(--violeta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--texto);
}
.portal-sub {
  font-family: var(--f-mono);
  font-size: .74rem;
  letter-spacing: .08em;
  color: var(--texto-2);
  margin-bottom: 1.9rem;
}

.portal-form { display: grid; gap: .9rem; }

.portal-input {
  width: 100%;
  min-height: 3.2rem;
  padding: .8rem 1rem;
  border: 0;
  border-radius: 14px;
  outline: none;
  font-family: var(--f-mono);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  text-align: center;
  color: var(--texto);
  caret-color: var(--ciano);
  background: rgba(3, 6, 18, .45);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(255, 255, 255, .10),
    0 1px 0 rgba(255, 255, 255, .10);
  transition: box-shadow .25s ease, background .25s ease;
}
.portal-input::placeholder { color: var(--mudo); opacity: 1; letter-spacing: .2em; }
.portal-input:focus,
.portal-input:focus-visible {
  background: rgba(3, 6, 18, .6);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(103, 232, 249, .65),
    0 0 0 4px rgba(103, 232, 249, .16),
    0 0 26px rgba(103, 232, 249, .25);
}
.portal-input[aria-invalid="true"] {
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, .45),
    inset 0 0 0 1px rgba(253, 164, 175, .7),
    0 0 0 4px rgba(253, 164, 175, .14);
}

.portal-form .vidro-btn {
  width: 100%;
  min-height: 3rem;
  font-size: .8rem;
  letter-spacing: .22em;
}
.portal-form .vidro-btn:not(.carregando) {
  background:
    linear-gradient(160deg, rgba(103, 232, 249, .22), rgba(139, 92, 246, .20) 70%, rgba(240, 171, 252, .16));
}

.portal-erro {
  display: none;
  margin-top: .2rem;
  font-family: var(--f-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--erro);
}
.portal-erro.visivel { display: block; animation: subir .35s var(--ease-suave) both; }

.portal-card.tremer { animation: tremer .5s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes tremer {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

/* Estado de carregamento: o texto some e o reflexo (::after) vira um spinner */
.vidro-btn.carregando {
  color: transparent !important;
  pointer-events: none;
  cursor: progress;
}
.vidro-btn.carregando > * { visibility: hidden; }
.vidro-btn.carregando::after {
  inset: auto;
  left: 50%;
  top: 50%;
  width: 1.25rem;
  height: 1.25rem;
  margin: -.625rem 0 0 -.625rem;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--ciano) 300deg, #fff 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  animation: girar .8s linear infinite;
  z-index: 1;
}
@keyframes girar { to { transform: rotate(1turn); } }

/* 7. Responsivo ========================================================== */
@media (max-width: 1240px) {
  /* Botões de ação só com ícone na barra (o nome segue acessível) */
  .btn-container .actionBtn { width: 2.45rem; padding: 0; gap: 0; }
  .btn-container .actionBtn > span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}

@media (max-width: 900px) {
  .nav { gap: .5rem; }
  .nav-menu-btn { display: inline-flex !important; width: 2.45rem; padding: 0; }
  .nav-marca { margin-right: auto; }

  /* Menu compacto: painel de vidro que desce da barra */
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding: .6rem;
    border-radius: 24px;
    background:
      linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03)),
      rgba(9, 12, 28, .97);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    box-shadow: var(--vidro-sombra), 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 60px -20px rgba(0, 0, 0, .9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.98);
    transform-origin: top center;
    transition: opacity .25s ease, transform .35s var(--ease-mola), visibility 0s linear .35s;
  }
  .nav.menu-aberto .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s ease, transform .35s var(--ease-mola), visibility 0s;
  }
  .nav-links a { padding: .85rem 1.1rem; font-size: .95rem; border-radius: 16px; }
  .nav-links a.ativo::after { left: auto; right: 1.1rem; bottom: 50%; width: 6px; height: 6px; margin: 0 0 -3px; border-radius: 50%; }

  .wrapper { padding: 0 1.5rem 2rem; }
  .hero { grid-template-columns: 1fr; padding: 7rem 0 6rem; gap: 1rem; }
  .hero-orbe { position: absolute; z-index: 0; right: -22%; top: 12%; width: min(360px, 70vw); opacity: 0; animation-name: entrarSuave; }
  @keyframes entrarSuave { to { opacity: .55; } }
  .skills-grupos { grid-template-columns: 1fr 1fr; }
  .skills-grupo:last-child { grid-column: 1 / -1; }
  .secao { padding-top: 5rem; }
}

@media (max-width: 720px) {
  .nav { top: 10px; width: calc(100% - 20px); }
  .wrapper { padding: 0 1.1rem 1.5rem; }
  .hero { padding: 6.2rem 0 5.5rem; min-height: 100svh; align-content: center; }
  /* No celular o orbe desce para o canto inferior, longe do nome, e fica mais discreto */
  .hero-orbe { top: auto; bottom: 4%; right: -26%; width: min(300px, 72vw); }
  @keyframes entrarSuave { to { opacity: .4; } }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 3.8rem); }
  .hero-acoes { gap: .6rem; }
  .cta { min-height: 2.85rem; padding: .7rem 1.1rem; font-size: .68rem; }
  .secao { padding-top: 4.2rem; }
  .secao-cabeca { margin-bottom: 1.8rem; }
  .secao-cabeca::after { font-size: 4.6rem; bottom: -.1em; }
  .objective-box { padding: 1.5rem 1.4rem 1.5rem 1.7rem; }
  .linha-tempo { padding-left: 1.9rem; }
  .linha-tempo::before { left: .4rem; }
  .lt-no { left: calc(-1.9rem + .4rem + 1px); }
  .exp-card, .exp-card.destaque { padding: 1.35rem 1.25rem 1.25rem 1.5rem; }
  .exp-card.destaque ul { grid-template-columns: 1fr; }
  .exp-card.destaque li:nth-last-child(2) { border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .exp-card li { font-size: .9rem; }
  .skills-grupos, .edu-grid { grid-template-columns: 1fr; }
  .skills-grupo { padding: 1.3rem 1.2rem 1.4rem; }
  .skill-tag { font-size: .8rem; padding: .45rem .9rem; min-height: 2.25rem; }
  footer { margin-top: 3.5rem; }
}

@media (max-width: 420px) {
  .nav-nome { display: none; }
  .btn-container { gap: .25rem; }
  .btn-container .vidro-btn { width: 2.35rem; min-height: 2.35rem; }
  .cta { flex: 1 1 auto; }
  .portal-card { padding: 2.1rem 1.3rem 1.6rem; }
  .portal-input { letter-spacing: .22em; font-size: 1.02rem; }
}

/* 8. Acessibilidade e fallbacks ========================================== */
/* Sem backdrop-filter: vidro "fosco" mais opaco para manter a leitura */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .vidro, .vidro-btn, .vidro-barra {
    background: linear-gradient(160deg, rgba(30, 38, 66, .94), rgba(16, 21, 40, .96));
  }
  .skill-tag.active { background: linear-gradient(160deg, #1b5463, #3b2a74); }
}

@media (prefers-reduced-transparency: reduce) {
  .vidro, .vidro-btn, .vidro-barra {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: linear-gradient(160deg, #1c2440, #10152a);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  body::before, body::after { animation: none !important; }
  .js .revelar { opacity: 1; transform: none; }
}

@media (forced-colors: active) {
  .vidro, .vidro-btn, .vidro-barra { border: 1px solid CanvasText; }
  #progress-bar { background: Highlight; }
}

/* 9. Impressão =========================================================== */
@media print {
  @page { size: A4; margin: 11mm 13mm 12mm; }

  :root { color-scheme: light; }
  html, body {
    background: #fff !important;
    color: #111 !important;
    font-size: 10pt;
    line-height: 1.4;
  }
  body::before, body::after,
  .progresso, #progress-bar, #particles-canvas, .svg-defs, .pular,
  .nav, .hero-orbe, .rolar, .hero-frase, .hero-acoes,
  .skills-hint, .secao-rotulo, .contato-icone, .lt-no { display: none !important; }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    text-shadow: none !important;
  }

  .vidro, .vidro-btn, .vidro-barra {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  .vidro::before, .vidro::after,
  .vidro-btn::before, .vidro-btn::after,
  .vidro-barra::before, .vidro-barra::after { display: none !important; }

  .wrapper { max-width: none; padding: 0; display: flex; flex-direction: column; }
  .hero { order: 0; }
  #contato { order: 1; }
  .secao { order: 2; }
  footer { order: 3; }

  .js .revelar, .word-inner, .tagline-inner, .hero-cargo { opacity: 1 !important; transform: none !important; }

  /* Cabeçalho */
  .hero {
    display: block;
    min-height: 0;
    padding: 0 0 .7rem;
    margin-bottom: .2rem;
    border-bottom: 1.5pt solid #111;
  }
  .tagline { color: #1f4e79; margin-bottom: .35rem; }
  .tagline::before { display: none; }
  .hero h1 { font-size: 26pt; color: #111; letter-spacing: -.02em; line-height: 1.05; }
  .word-wrap { display: inline; }
  .word-wrap + .word-wrap::before { content: " "; }
  .word-inner { display: inline; }
  .a1 {
    background: none !important;
    -webkit-text-fill-color: #1f4e79 !important;
    color: #1f4e79 !important;
  }
  .a2 { background: none !important; color: #111 !important; -webkit-text-fill-color: #111 !important; }
  .hero-cargo { margin-top: .3rem; font-size: 12pt; color: #333; }

  /* Seções */
  .secao { padding-top: .65rem; }
  .secao-cabeca { margin-bottom: .5rem; break-after: avoid; page-break-after: avoid; }
  .secao-cabeca::after { display: none; }
  .secao-titulo {
    width: 100%;
    padding-bottom: .2rem;
    font-size: 13pt;
    color: #111;
    letter-spacing: -.01em;
    border-bottom: .75pt solid #bbb;
  }

  /* Contato logo abaixo do nome, em linha */
  #contato { padding-top: .5rem; }
  #contato .secao-cabeca { display: none; }
  .contato-grid { display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; }
  .contato-card { padding: 0 !important; border: 0 !important; color: #111; flex-direction: row; align-items: baseline; gap: .4rem; }
  .contact-label { color: #555; font-size: 7.5pt; }
  .contato-valor { font-size: 10pt; color: #111 !important; }

  .objective-box, .exp-card, .edu-card, .skills-grupo, .cert-card, .projeto-card {
    padding: .55rem .8rem !important;
    border: .75pt solid #ccc !important;
    border-radius: 6px;
    color: #222;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .objective-box > .acento, .exp-accent-bar { display: none; }
  .objective-box { font-size: 9.6pt; line-height: 1.5; }

  .linha-tempo { padding-left: 0; gap: .5rem; }
  .linha-tempo::before { display: none; }
  .exp-company, .exp-card.destaque .exp-company, .edu-degree, .cert-titulo, .projeto-titulo {
    color: #111 !important;
    background: none !important;
    -webkit-text-fill-color: #111 !important;
    font-size: 12pt !important;
  }
  .exp-card.destaque ul { display: block; }
  .exp-date { background: none; box-shadow: none; padding: 0; color: #444; }
  .exp-role { color: #1f4e79; margin-bottom: .3rem; }
  .exp-card li, .exp-card.destaque li:nth-last-child(2) { color: #222; font-size: 9.4pt; line-height: 1.4; padding: .08rem 0 .08rem 1.1rem; border-bottom: .5pt solid #eee; }
  .exp-card li:last-child { border-bottom: 0; }
  .exp-card li::before { color: #1f4e79; top: .15rem; }

  .skills-grupos { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .skills-grupo:last-child { grid-column: auto; }
  .skills-grupo-titulo { color: #1f4e79 !important; margin-bottom: .4rem; }
  .skills-grupo-titulo::before { display: none; }
  .skills-cloud { gap: .25rem; }
  .skill-tag, .skill-tag.active {
    min-height: 0;
    padding: .1rem .55rem;
    border: .75pt solid #999 !important;
    border-radius: 999px;
    color: #111 !important;
    font-size: 8.8pt;
    transform: none !important;
  }

  .edu-grid { gap: .5rem; }
  .edu-school, .cert-emissor { color: #333; margin-bottom: .3rem; }
  .edu-status, .edu-status.cursando {
    background: none;
    box-shadow: none;
    padding: .05rem .55rem;
    border: .75pt solid #333;
    color: #222;
    font-size: 7.5pt;
  }
  .edu-status.cursando { color: #14532d; border-color: #14532d; font-weight: 600; }
  .edu-status::before { box-shadow: none !important; }

  .cert-data { color: #444; }
  .cert-link, .projeto-links, .projeto-capa { display: none !important; }

  footer { margin-top: .8rem; padding: .45rem 0 0; color: #555; border-top: .75pt solid #ccc; }
  footer::before { display: none; }

  a { text-decoration: none; }
}

/* Impressão: Qualificações em formato compacto, para o currículo caber em uma página A4. */
@media print {
  @page { margin: 10mm 12mm 10mm; }
  .secao { padding-top: .45rem; }
  .secao-cabeca { margin-bottom: .35rem; }
  .exp-card li, .exp-card.destaque li:nth-last-child(2) { line-height: 1.32; }
  .cert-grid { gap: .4rem; }
  .cert-card {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: baseline !important;
    gap: .1rem .5rem !important;
    padding: .35rem .75rem !important;
  }
  .cert-titulo { font-size: 10.5pt !important; }
  .cert-emissor { margin: 0 !important; font-size: 9pt; }
  .cert-data { order: 3; margin: 0 !important; font-size: 7.5pt; text-transform: uppercase; }
}
