/* ============================================================
   Portfólio v0.1 — tema dark/vermelho, vibe terminal
   ============================================================ */

:root {
  --bg: #0a0a0f;
  --bg-2: #100a0e;
  --bg-panel: #14090d;
  --surface: #1a0f14;
  --border: #3a1520;
  --red: #ff2b4a;
  --red-soft: #ff5c73;
  --red-dark: #8b0016;
  --red-glow: rgba(255, 43, 74, 0.55);
  --text: #e8e3e5;
  --text-dim: #9a8f94;
  --green: #3ddc84;
  --yellow: #ffc44d;
  --mono: "JetBrains Mono", Consolas, monospace;
  --sans: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100vw; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 43, 74, 0.08), transparent),
    linear-gradient(var(--bg), var(--bg-2));
  min-height: 100vh;
}

::selection { background: var(--red); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red-dark); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ============ cursor piscando ============ */
.cursor {
  display: inline-block;
  color: var(--red);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============ NAVBAR ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 2rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar__logo {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.logo__prompt {
  color: var(--red);
  text-shadow: 0 0 12px var(--red-glow);
}

.tabs {
  position: relative;
  display: flex;
  gap: 0.25rem;
}

.tab {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: color 0.25s, background 0.25s, text-shadow 0.25s;
  position: relative;
  z-index: 1;
}
.tab:hover { color: var(--red-soft); }
.tab.is-active {
  color: var(--red);
  text-shadow: 0 0 10px var(--red-glow);
}

.tabs__indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow), 0 0 4px var(--red);
  transition: left 0.35s cubic-bezier(0.65, 0, 0.35, 1), width 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

/* burger (mobile) */
.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.navbar__burger span {
  width: 24px;
  height: 2px;
  background: var(--red);
  transition: transform 0.3s, opacity 0.3s;
}
.navbar__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.is-open span:nth-child(2) { opacity: 0; }
.navbar__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ PANELS (abas) ============ */
.panel {
  display: none;
  animation: panelIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.panel.is-active { display: block; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.container--narrow { max-width: 720px; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* em telas estreitas: texto primeiro, telinha do ASCII depois */
.hero__content { order: 1; }
.hero__aside { order: 2; }

/* vídeo cinemático de fundo (aparece só se video/hero.mp4 existir) */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero.has-video .hero__video { opacity: 1; }
.hero.has-video .hero__aurora { display: none; }
/* escurece o vídeo para o texto continuar legível */
.hero.has-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 15, 0.5),
    rgba(10, 10, 15, 0.55) 55%,
    var(--bg) 100%
  );
  pointer-events: none;
}

/* manchas de luz vermelha flutuando (aurora) */
.hero__aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  filter: blur(90px);
}
.hero__aurora span {
  position: absolute;
  border-radius: 50%;
  opacity: 0.35;
}
.hero__aurora span:nth-child(1) {
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, var(--red) 0%, transparent 65%);
  top: -12%;
  left: -8%;
  animation: auroraDrift1 16s ease-in-out infinite;
}
.hero__aurora span:nth-child(2) {
  width: 38vw;
  height: 38vw;
  background: radial-gradient(circle, var(--red-dark) 0%, transparent 65%);
  bottom: -15%;
  right: -6%;
  animation: auroraDrift2 20s ease-in-out infinite;
}
.hero__aurora span:nth-child(3) {
  width: 26vw;
  height: 26vw;
  background: radial-gradient(circle, #ff5c73 0%, transparent 65%);
  top: 35%;
  left: 55%;
  animation: auroraDrift3 13s ease-in-out infinite;
}
@keyframes auroraDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10vw, 8vh) scale(1.15); }
}
@keyframes auroraDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12vw, -10vh) scale(0.9); }
}
@keyframes auroraDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.35; }
  50% { transform: translate(-8vw, 10vh) scale(1.25); opacity: 0.2; }
}

.hero__scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
}

.hero__corner-video {
  display: none;
  z-index: 2;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-panel);
  box-shadow: 0 0 60px rgba(255, 43, 74, 0.28);
}
.hero__corner-video .terminal-bar { border-bottom: 1px solid var(--border); }
.hero__corner-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #05040a;
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 820px;
  min-width: 0;
  width: 100%;
}

.hero__hello {
  font-family: var(--mono);
  color: var(--green);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* ============ NOME: brilho varrendo o texto ============ */
.glitch {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 5rem);
  letter-spacing: -0.02em;
  display: inline-block;
  position: relative;
  background: linear-gradient(
    100deg,
    var(--text) 0%,
    var(--text) 40%,
    #fff 48%,
    var(--red-soft) 52%,
    var(--text) 60%,
    var(--text) 100%
  );
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 43, 74, 0.4));
  animation: nameShine 5s ease-in-out infinite;
}
@keyframes nameShine {
  0%, 15% { background-position: 100% 0; }
  55%, 100% { background-position: -60% 0; }
}

.hero__fullname {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-top: 0.4rem;
}
.hero__imdb {
  color: var(--yellow);
  font-size: 0.75rem;
  opacity: 0.8;
}

.hero__role {
  font-family: var(--mono);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--red);
  min-height: 2.2em;
  margin: 0.75rem 0 1.25rem;
  text-shadow: 0 0 18px var(--red-glow);
}
.hero__role-prefix { color: var(--text-dim); margin-right: 0.5rem; }

.hero__tagline {
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.45;
  max-width: 620px;
  margin: 0 auto 1rem;
  border-left: 3px solid var(--red);
  padding-left: 1rem;
  text-align: left;
}

.hero__bio {
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 2rem;
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: justify;
  text-align-last: center;
  hyphens: auto;
}

/* ============ HERO: painel de credenciais (prova social) ============ */
.hero__creds {
  background: rgba(20, 9, 13, 0.75);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
}
.hero__creds-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  flex: 1;
}
.hero__cred {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
}
.hero__cred:last-child { border-bottom: none; }
.hero__cred-name {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
}
.hero__cred-role {
  color: var(--red-soft);
  font-size: 0.72rem;
  white-space: nowrap;
  opacity: 0.85;
}
.hero__creds-more {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--red);
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  padding: 0.7rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}
.hero__creds-more:hover {
  background: rgba(255, 43, 74, 0.08);
  color: var(--red-soft);
}

/* ============ HERO: assinatura ASCII (abaixo do hero) ============ */
.hero-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem auto 3rem;
}
.hero-signature .hero__donut {
  margin: 0;
  width: 100%;
  max-width: 520px;
}
.hero-signature__caption {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  max-width: 520px;
}

/* ============ BOTÕES ============ */
.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s, background 0.3s, color 0.3s;
  border: 1px solid var(--red);
}
.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 43, 74, 0.35);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px var(--red-glow);
  background: var(--red-soft);
}
.btn--ghost {
  background: transparent;
  color: var(--red);
}
.btn--ghost:hover {
  background: rgba(255, 43, 74, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(255, 43, 74, 0.25);
}
.btn__arrow {
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.25s;
}
.btn--primary:hover .btn__arrow { transform: translateX(5px); }

/* ============ STATS ============ */
.hero__stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat__num {
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--red);
  text-shadow: 0 0 15px var(--red-glow);
  display: block;
}
.stat__num::after { content: "+"; font-size: 1.4rem; }
.stat__label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

/* ============ DONUT ASCII (hero) ============ */
.hero__donut {
  max-width: 480px;
  margin: 2.5rem auto 0;
  background: rgba(20, 9, 13, 0.75);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(4px);
}
.donut {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 10px;
  letter-spacing: 1px;
  color: var(--red);
  text-shadow: 0 0 8px var(--red-glow);
  padding: 0.8rem;
  text-align: center;
  min-height: 250px;
  margin: 0;
  user-select: none;
}

/* ============ CENA: GRADE 3D ONDULANTE (dentro da telinha do donut) ============ */
.grid3d-stage {
  width: 100%;
  height: 100%;
  min-height: 224px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 420px;
  perspective-origin: 50% 20%;
}
.grid3d-grid {
  transform-style: preserve-3d;
  transform: rotateX(58deg);
  display: grid;
}
.grid3d-tile {
  background: rgba(232, 227, 229, 0.85);
  border: 1px solid rgba(10, 10, 15, 0.6);
}
.grid3d-tile.is-center {
  background: var(--red);
  box-shadow: 0 0 10px 2px var(--red-glow);
}

/* ============ IMPRENSA & RECONHECIMENTOS ============ */
.press-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.press-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.press-card:hover {
  transform: translateX(6px);
  border-color: var(--red);
  box-shadow: 0 8px 26px rgba(255, 43, 74, 0.18);
}
.press-card__tag {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.press-card__tag--premio { background: rgba(255, 196, 77, 0.15); color: var(--yellow); border: 1px solid rgba(255, 196, 77, 0.4); }
.press-card__tag--materia { background: rgba(77, 195, 255, 0.15); color: #4dc3ff; border: 1px solid rgba(77, 195, 255, 0.4); }
.press-card__tag--palestra { background: rgba(255, 43, 74, 0.12); color: var(--red-soft); border: 1px solid rgba(255, 43, 74, 0.4); }
.press-card__tag--entrevista { background: rgba(61, 220, 132, 0.15); color: var(--green); border: 1px solid rgba(61, 220, 132, 0.4); }
.press-card__body { flex: 1; min-width: 0; }
.press-card__body h3 {
  font-family: var(--mono);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.press-card__body p {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.press-card__arrow {
  flex-shrink: 0;
  font-size: 1.3rem;
  color: var(--text-dim);
  transition: color 0.25s, transform 0.25s;
}
.press-card:hover .press-card__arrow { color: var(--red); transform: translate(2px, -2px); }

@media (max-width: 600px) {
  .press-card { flex-wrap: wrap; }
  .press-card__arrow { display: none; }
}

/* ============ FUNDO DE PARTÍCULAS + CURSOR GLOW ============ */
#bgParticles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
#cursorGlow {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 43, 74, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 4;
}
@media (hover: none) {
  #cursorGlow { display: none; }
}

/* ============ SEÇÕES ============ */
.section-title {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.section-title__hash {
  color: var(--red);
  text-shadow: 0 0 15px var(--red-glow);
  margin-right: 0.35rem;
}
.section-sub {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
}

/* ============ TERMINAL BAR (janelas) ============ */
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.dot--r { background: #ff5f57; }
.dot--y { background: #febc2e; }
.dot--g { background: #28c840; }
.terminal-bar__title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: 0.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ SUB-ABAS (projetos) ============ */
.subtabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.subtab {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  cursor: pointer;
  transition: all 0.3s;
}
.subtab:hover { color: var(--red-soft); border-color: var(--red); }
.subtab.is-active {
  color: #fff;
  background: linear-gradient(120deg, var(--red-dark), var(--red));
  border-color: var(--red);
  box-shadow: 0 0 20px rgba(255, 43, 74, 0.35);
}

.projects-group { display: none; }
.projects-group.is-active {
  display: block;
  animation: panelIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============ CARROSSEL (setas para os lados) ============ */
.carousel { position: relative; }
.projects-grid.carousel__track {
  display: flex;
  grid-template-columns: none;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.3rem 0.3rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--red-dark) transparent;
}
.carousel__track::-webkit-scrollbar { height: 6px; }
.carousel__track::-webkit-scrollbar-thumb { background: var(--red-dark); border-radius: 3px; }
.carousel__track > * {
  flex: 0 0 340px;
  scroll-snap-align: start;
}
.carousel__arrow {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20, 9, 13, 0.9);
  border: 1px solid var(--border);
  color: var(--red);
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
}
.carousel__arrow:hover {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 20px var(--red-glow);
  border-color: var(--red);
}
.carousel__arrow--prev { left: -14px; }
.carousel__arrow--next { right: -14px; }
@media (max-width: 700px) {
  .carousel__arrow { width: 34px; height: 34px; font-size: 1.1rem; }
  .carousel__arrow--prev { left: -6px; }
  .carousel__arrow--next { right: -6px; }
  .carousel__track > * { flex-basis: 280px; }
}

/* ============ PROJETOS ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
}
.project-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: var(--red);
  box-shadow: 0 12px 40px rgba(255, 43, 74, 0.2), 0 0 0 1px rgba(255, 43, 74, 0.3);
}

/* imagem/poster das produções de animação */
.project-card__img {
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 43, 74, 0.05) 14px 28px),
    linear-gradient(135deg, #2b0d18, #12060a 70%);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0.5rem;
}
.project-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-card:hover .project-card__img img { transform: scale(1.07); }

/* slideshow: várias imagens revezando dentro do mesmo card */
.project-card__img--slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-card__img--slideshow .slide.is-active { opacity: 1; }
/* brilho que varre o poster no hover */
.project-card__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 92, 115, 0.18) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.7s ease;
}
.project-card:hover .project-card__img::after { transform: translateX(110%); }

/* badge de cargo */
.cargo {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: var(--yellow);
  background: rgba(255, 196, 77, 0.08);
  border: 1px solid rgba(255, 196, 77, 0.35);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  margin-bottom: 0.7rem;
  max-width: 100%;
}
.cargo em { opacity: 0.75; font-style: italic; }
.cargo--star {
  color: var(--red-soft);
  background: rgba(255, 43, 74, 0.1);
  border-color: rgba(255, 43, 74, 0.4);
}

/* nota de confidencialidade (NDA) */
.nda-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 2.2rem;
}
.nda-note__lock { flex-shrink: 0; }

.project-card__body { padding: 1.4rem; }
.project-card__body h3 {
  font-family: var(--mono);
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.project-card__body p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.project-card__body em { opacity: 0.6; font-size: 0.8rem; }

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red-soft);
  background: rgba(255, 43, 74, 0.1);
  border: 1px solid rgba(255, 43, 74, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.project-card__links { display: flex; gap: 1rem; }
.link {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--red);
  text-decoration: none;
  transition: text-shadow 0.25s, color 0.25s;
}
.link:hover {
  color: var(--red-soft);
  text-shadow: 0 0 12px var(--red-glow);
}

/* ============ HABILIDADES ============ */
.skills-group__title {
  font-family: var(--mono);
  color: var(--red);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 12px var(--red-glow);
}

/* células que enchem de líquido vermelho */
.skills-group { margin-bottom: 2.5rem; }

.skills-cells {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 1rem;
}

.skill-cell {
  position: relative;
  height: 140px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-panel);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  --fill-top: 130%;
}
.skill-cell:hover {
  border-color: var(--red);
  box-shadow: 0 8px 28px rgba(255, 43, 74, 0.25);
  transform: translateY(-5px);
}

.skill-cell__liquid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* quadrados arredondados girando = ondas do líquido */
.wave {
  position: absolute;
  left: 50%;
  top: var(--fill-top);
  width: 340px;
  height: 340px;
  margin-left: -170px;
  border-radius: 42%;
  background: rgba(139, 0, 22, 0.55);
  animation: waveSpin 8s linear infinite;
  transition: top 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.wave--front {
  border-radius: 46%;
  background: rgba(255, 43, 74, 0.42);
  animation-duration: 5.5s;
}
@keyframes waveSpin {
  to { transform: rotate(360deg); }
}

.skill-cell__info {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-family: var(--mono);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.skill-icon {
  width: 30px;
  height: 30px;
  color: #fff;
  opacity: 0.92;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
  margin-bottom: 0.1rem;
}
.skill-icon svg, .skill-icon img { width: 100%; height: 100%; display: block; object-fit: contain; }
.skill-cell__name { font-size: 0.9rem; font-weight: 600; }
.skill-cell__pct {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--red-soft);
}

.roles__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.role-chip {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--text-dim);
  transition: all 0.3s;
  cursor: default;
}
.role-chip:hover {
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 18px rgba(255, 43, 74, 0.25);
  transform: translateY(-3px);
}

/* ============ SCRIPTS (code windows) ============ */
.code-window {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.code-window:hover {
  border-color: rgba(255, 43, 74, 0.5);
  box-shadow: 0 8px 30px rgba(255, 43, 74, 0.12);
}

.copy-btn {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.7rem;
  cursor: pointer;
  transition: all 0.25s;
}
.copy-btn:hover { color: var(--red); border-color: var(--red); }

.code {
  padding: 1.3rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.7;
  color: var(--text);
}
/* syntax highlight manual */
.code .c { color: #6b5f66; font-style: italic; }   /* comentário */
.code .k { color: var(--red); }                    /* keyword */
.code .s { color: #ffc44d; }                       /* string */
.code .f { color: #4dc3ff; }                       /* função */
.code .n { color: #c792ea; }                       /* número */

/* ============ CONTATO ============ */
.contact-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contact-form__label {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--green);
}
.contact-form input,
.contact-form textarea {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 15px rgba(255, 43, 74, 0.2);
}
.contact-form ::placeholder { color: #5a4f55; }
.contact-form .btn { align-self: flex-start; }

.contact-form__feedback {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--green);
  min-height: 1.4em;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.social-link {
  font-family: var(--mono);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.25s, text-shadow 0.25s, transform 0.25s;
}
.social-link:hover {
  color: var(--red);
  text-shadow: 0 0 15px var(--red-glow);
  transform: translateY(-2px);
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.footer__heart { color: var(--red); }
.footer__version {
  color: var(--red);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  margin-left: 0.3rem;
}

/* ============ REVEAL ON SCROLL ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ RESPONSIVO ============ */
@media (max-width: 820px) {
  .navbar { padding: 0.8rem 1.2rem; }
  .navbar__burger { display: flex; }

  .tabs {
    position: fixed;
    top: 57px;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.97);
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.5rem;
    transform: translateX(110%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .tabs.is-open { transform: translateX(0); }
  .tabs__indicator { display: none; }
  .tab { text-align: left; border-radius: 6px; }
  .tab.is-active { background: rgba(255, 43, 74, 0.12); }

  .hero__stats { gap: 1.8rem; }
  .container { padding: 3rem 1.2rem; }
}

/* ============ SCROLL HINT + DESTAQUES NA HOME ============ */
.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin: 2.5rem auto 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: color 0.3s;
}
.hero__scroll:hover { color: var(--red); }
.hero__scroll-arrow {
  color: var(--red);
  font-size: 0.9rem;
  animation: bounceDown 1.6s ease-in-out infinite;
  text-shadow: 0 0 10px var(--red-glow);
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(7px); opacity: 1; }
}

.home-featured { padding-top: 2rem; }
.home-featured__more {
  text-align: center;
  margin-top: 2.5rem;
}

/* ============ INTRO EM VÍDEO ============ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #0a0a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease;
}
.intro--done { opacity: 0; pointer-events: none; }
body.intro-lock { overflow: hidden; }

.intro video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s ease, opacity 0.9s ease;
}
.intro--done video { transform: scale(1.12); }

.intro__skip {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  background: rgba(10, 10, 15, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.intro__skip:hover { color: var(--red); border-color: var(--red); }

/* ============ BOTÕES FLUTUANTES: WhatsApp e e-mail ============ */
.floating-contact {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.floating-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s, box-shadow 0.25s;
}
.floating-btn svg { width: 26px; height: 26px; }
.floating-btn:hover { transform: translateY(-4px) scale(1.06); }
.floating-btn--whatsapp {
  background: #25d366;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.4);
}
.floating-btn--whatsapp:hover { box-shadow: 0 6px 26px rgba(37, 211, 102, 0.6); }
.floating-btn--email {
  background: var(--red);
  box-shadow: 0 4px 18px var(--red-glow);
}
.floating-btn--email:hover { box-shadow: 0 6px 26px var(--red-glow); }

.floating-btn--game {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.floating-btn--game:hover {
  border-color: var(--red);
  box-shadow: 0 6px 26px rgba(255, 43, 74, 0.35);
  color: var(--red);
}

.game-launcher {
  position: relative;
}
.game-launcher__tip {
  position: absolute;
  right: calc(100% + 0.8rem);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  width: 200px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 210;
}
.game-launcher:hover .game-launcher__tip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.game-launcher__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.6rem);
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  z-index: 210;
}
.game-launcher__menu.is-open { display: flex; }
.game-launcher__option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.5rem 0.8rem;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.game-launcher__option svg { width: 18px; height: 18px; flex-shrink: 0; }
.game-launcher__option:hover {
  border-color: var(--red);
  color: var(--red);
}
@media (max-width: 700px) {
  .game-launcher__tip { display: none; }
}

/* ============ MODAL DO MINIJOGO ============ */
.game-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(5, 4, 6, 0.85);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.game-modal.is-open { display: flex; }
.game-modal__box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(255, 43, 74, 0.25);
  max-width: 100%;
}
#gameCanvas, #snakeCanvas {
  display: block;
  background: #05040a;
  max-width: 100%;
  height: auto;
}
.game-modal__hint {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0.7rem;
}
@media (max-width: 700px) {
  .floating-contact { right: 1rem; bottom: 1rem; gap: 0.6rem; }
  .floating-btn { width: 46px; height: 46px; }
  .floating-btn svg { width: 22px; height: 22px; }
}

/* respeita usuários que preferem menos animação */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============ HERO: layout em 2 colunas com vídeo ao lado do nome ============ */
@media (min-width: 1150px) {
  .hero {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 4vw;
    padding: 3.2rem 3.5rem 0;
  }
  .hero__content {
    flex-shrink: 0;
    order: 1;
    text-align: left;
    margin: 0;
    max-width: 560px;
  }
  .hero__bio { margin-left: 0; margin-right: 0; text-align-last: left; }
  .hero__ctas { justify-content: flex-start; }
  .hero__stats { justify-content: flex-start; }
  .hero__aside {
    order: 2;
    flex: 1 1 480px;
    max-width: 560px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0.2rem;
  }
  .hero__corner-video {
    display: block;
    max-width: none;
  }
  .hero__creds { flex: 1; }
}
@media (min-width: 1700px) {
  .hero { gap: 6vw; }
}

/* ============================================================
   UPGRADE v2 — faixa de stack, títulos e profundidade
   ============================================================ */

/* --- faixa animada do stack tecnológico --- */
.stack-marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 43, 74, 0.05), transparent 60%),
    rgba(255, 255, 255, 0.015);
  padding: 1rem 0;
  margin-top: 1.5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.stack-marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.stack-marquee:hover .stack-marquee__track { animation-play-state: paused; }
.stack-marquee__group {
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
}
.stack-marquee__group span { padding: 0 1.5rem; transition: color 0.2s; }
.stack-marquee__group span::after {
  content: "◆";
  color: var(--red);
  opacity: 0.4;
  font-size: 0.55rem;
  vertical-align: middle;
  margin-left: 1.5rem;
}
.stack-marquee:hover .stack-marquee__group span { color: var(--text); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- títulos de seção com sublinhado em gradiente --- */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 0.35rem;
  letter-spacing: -0.015em;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-soft) 35%, transparent 100%);
  border-radius: 2px;
}
.section-sub { padding-left: 0.1rem; }

/* --- profundidade e brilho superior nos painéis --- */
.project-card {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 1;
}
.project-card { position: relative; }
.hero__creds, .hero__donut {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* --- botões: brilho sutil ao passar o mouse --- */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
}
.btn--primary:hover::after { left: 130%; }

@media (prefers-reduced-motion: reduce) {
  .stack-marquee__track { animation: none; }
}

/* --- contato: grid 2x2 (janelas na linha de cima, extras embaixo) --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem 3rem;
  align-items: stretch;
}
@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-rows: auto auto;
  }
}
/* as duas janelas ficam na 1ª linha → mesma altura automaticamente */
.contact-window, .contact-ascii {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-bottom: 0;
}
.contact-window .contact-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.contact-form__msg { flex: 1; }
.contact-window .contact-form textarea {
  flex: 1;
  resize: vertical;
  min-height: 120px;
}
/* telinha ASCII ocupa toda a altura da janela */
.contact-ascii {
  margin: 0;
  max-width: none;
  width: 100%;
}
.contact-ascii .donut {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}
.contact-layout__caption {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  align-self: start;
}
