/* ====== Projeto Cards Premium Mobile ====== */
.video-text-container .project-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.video-text-container .project-title {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.video-text-container .project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
}

.video-text-container .project-chip {
  font-size: 0.68rem;
  padding: 0.13rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  border: 1px solid color-mix(in oklab, var(--border) 64%, var(--gold) 36%);
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04rem;
}

.video-text-container .project-chip.status {
  border-color: color-mix(in oklab, #7ae582 75%, var(--gold) 25%);
  color: color-mix(in oklab, #c8f7cc 84%, #fff 16%);
  background: color-mix(in oklab, #7ae582 15%, transparent);
}

.video-text-container .project-number {
  position: absolute;
  right: 1.1rem;
  bottom: 0.7rem;
  font-size: 2.1rem;
  font-family: var(--font-heading);
  color: var(--gold);
  opacity: 0.18;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

@media (max-width: 700px) {
  .video-text-container {
    position: relative;
    padding-bottom: 2.2rem;
  }
  .video-text-container .project-title {
    font-size: 1rem;
  }
  .video-text-container .project-meta {
    gap: 0.18rem;
  }
  .video-text-container .project-chip {
    font-size: 0.62rem;
    padding: 0.09rem 0.38rem;
  }
  .video-text-container .project-number {
    font-size: 1.7rem;
    right: 0.7rem;
    bottom: 0.3rem;
  }
}

/* ====== Design Tokens (CSS Variables) ====== */
:root {
  /* Typography */
  --font-heading: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Core palette */
  --bg: #090c10;              /* preto azulado */
  --surface: #11161d;
  --card: #10161d;
  --text: #e7ebf0;            /* texto primário no dark */
  --text-soft: #a8b2bf;
  --primary: #1a628f;         /* azul acentuado, uso moderado */
  --primary-700: #144c6e;
  --gold: #c19a3a;            /* dourado dominante */
  --muted: #252a33;
  --border: #2a313b;
  --topbar-bg: rgba(9, 12, 16, 0.95);
  --shadow: 0 10px 32px rgba(0,0,0,0.35);
  --ring: 0 0 0 3px rgba(212, 180, 71, 0.45); /* anel de foco dourado */
  --cinematic-overlay: linear-gradient(150deg, rgba(8, 10, 12, 0.7) 0%, rgba(13, 18, 24, 0.38) 40%, rgba(8, 10, 12, 0.74) 100%);
  --cinematic-glow: radial-gradient(circle at 35% 10%, rgba(193, 154, 58, 0.07) 0%, rgba(26, 98, 143, 0.06) 32%, transparent 72%);
  --cinema-bar-size: 0px;
  --hero-pulse: 0;
  --glitch-duration: 0.34s;
  --cursor-scale: 1.16;
  --scanline-opacity: 0.12;
  --panel-active-glow: 0.3;
}

/* Tema claro em três camadas: fundo azul-acinzentado -> seções bege -> cards branco quente.
   Dourado #8A6000 (e não #956800): é o tom que mantém contraste >= 4,5:1 nos três fundos. */
[data-theme="light"] {
  --bg: #e8edf2;
  --surface: #f3f0ea;
  --card: #faf9f6;
  --text: #1f2937;
  --text-soft: #475569;
  --heading: #18344d;
  --primary: #2e5f8a;
  --primary-700: #224969;
  --gold: #8a6000;
  --muted: #e2ddd3;
  --border: #c9c3b7;
  --topbar-bg: rgba(250, 249, 246, 0.9);
  --shadow: 0 8px 22px rgba(24, 52, 77, 0.12);
  --ring: 0 0 0 3px rgba(46, 95, 138, 0.26);
  --cinematic-overlay: linear-gradient(150deg, rgba(247, 249, 251, 0.78) 0%, rgba(236, 241, 246, 0.44) 40%, rgba(242, 245, 249, 0.7) 100%);
  --cinematic-glow: radial-gradient(circle at 35% 10%, rgba(154, 107, 0, 0.08) 0%, rgba(46, 95, 138, 0.06) 35%, transparent 76%);
}

/* ====== Light Premium Overrides ====== */
[data-theme="light"] body {
  color: var(--text);
  background: var(--bg);
}

[data-theme="light"] .navegacao {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid color-mix(in oklab, var(--border) 72%, var(--gold) 28%);
  box-shadow: 0 5px 16px rgba(16, 24, 40, 0.108);
  backdrop-filter: blur(9px) saturate(105%);
}

[data-theme="light"] .navegacao_link {
  color: #374151;
}

[data-theme="light"] .navegacao_link:hover,
[data-theme="light"] .navegacao_link.active {
  color: var(--gold);
}

[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border-color: color-mix(in oklab, var(--border) 70%, var(--gold) 30%);
  color: #374151;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.1);
}

[data-theme="light"] .banner {
  background-image: var(--cinematic-overlay), var(--cinematic-glow), linear-gradient(112deg, #f6f8fb 0%, #e6edf4 50%, #f2f5f9 100%);
}

[data-theme="light"] .cinematic-layer-back {
  filter: saturate(calc(1 + (var(--hero-pulse) * 0.18))) brightness(calc(1 + (var(--hero-pulse) * 0.06)));
  background:
    radial-gradient(circle at 18% 24%, rgba(154, 107, 0, 0.1), transparent 55%),
    radial-gradient(circle at 78% 18%, rgba(46, 95, 138, 0.08), transparent 56%);
}

[data-theme="light"] .cinematic-layer-mid {
  opacity: 0.22;
}

[data-theme="light"] .cinematic-grain {
  opacity: 0.015;
}

[data-theme="light"] .hero-subtitle {
  color: #735100;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
}

[data-theme="light"] .hero-value {
  color: #3c4b5d;
}




[data-theme="light"] #sobre,
[data-theme="light"] #tech-content,
[data-theme="light"] .video-text-container,
[data-theme="light"] .meus_jogos_container__jogo,
[data-theme="light"] .site-footer,
[data-theme="light"] .stat-item,
[data-theme="light"] .tech-card {
  border-color: color-mix(in oklab, var(--border) 78%, var(--gold) 22%);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
}

[data-theme="light"] #sobre {
  background: linear-gradient(160deg, #ffffff 0%, #f4f7fa 100%);
}

[data-theme="light"] #projetos {
  background: linear-gradient(180deg, #f4f8fc 0%, #edf3f9 100%);
}

[data-theme="light"] .video-text-container {
  background: linear-gradient(160deg, #ffffff 0%, #f4f7fb 100%);
}

[data-theme="light"] #meus_jogos {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(238, 244, 250, 0.92) 100%),
    url("../images/codigosClean.jpg");
  background-blend-mode: normal;
}

[data-theme="light"] #meus_jogos::before {
  opacity: 0.015;
}

[data-theme="light"] .panel::after {
  background: radial-gradient(circle at 50% 0%, rgba(154, 107, 0, 0.08), transparent 62%);
}

[data-theme="light"] .project-chip {
  background: #f3f6fa;
  color: #465363;
  border-color: color-mix(in oklab, var(--border) 70%, var(--gold) 30%);
}

[data-theme="light"] .project-chip.status {
  background: #e9f7ec;
  border-color: #7bbf87;
  color: #205235;
}

[data-theme="light"] .text-container1 p,
[data-theme="light"] .text-container2 p {
  color: #384252;
}

[data-theme="light"] .text-container1 p a,
[data-theme="light"] .text-container2 p a {
  color: #8a6100;
}

html {
  overflow-x: hidden;
  overflow-y: auto;
  height: 100%;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
}

/* ====== Scrollbar Custom ====== */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--gold) 75%, var(--primary) 25%) color-mix(in oklab, var(--surface) 84%, #000 16%);
}

*::-webkit-scrollbar {
  width: 12px;
}

*::-webkit-scrollbar-track {
  background: color-mix(in oklab, var(--surface) 84%, #000 16%);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, color-mix(in oklab, var(--gold) 80%, var(--primary) 20%), color-mix(in oklab, var(--gold) 62%, var(--primary) 38%));
  border-radius: 999px;
  border: 2px solid color-mix(in oklab, var(--surface) 80%, #000 20%);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, color-mix(in oklab, var(--gold) 88%, var(--primary) 12%), color-mix(in oklab, var(--gold) 68%, var(--primary) 32%));
}

/* ====== Accessibility Skip Link ====== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: var(--bg);
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 0.5rem 0;
  font-weight: bold;
}

.skip-link:focus {
  top: 0;
}

/* ====== Reading Progress Bar ====== */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--primary));
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease;
  box-shadow: 0 0 10px var(--gold);
}

.cinema-bars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}

.cinema-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--cinema-bar-size);
  background: linear-gradient(180deg, rgba(3, 4, 6, 0.98) 0%, rgba(3, 4, 6, 0.88) 100%);
  transition: height 0.25s ease;
}

.cinema-bar-top {
  top: 0;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.cinema-bar-bottom {
  bottom: 0;
  box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.45);
}

body, .section-full, .container, .responsive-box {
  background: var(--bg);
  overflow-x: hidden;
}

/* ====== Cursor GTA ====== */
@media (pointer: fine) {
  /* Disabled: custom crosshair element not present in HTML */
  /* body {
    cursor: none;
  }

  a,
  button,
  input,
  textarea,
  select,
  [role="button"],
  .link_game,
  .video,
  .theme-toggle,
  .navegacao_link {
    cursor: none;
  } */
}

.custom-crosshair {
  display: none !important;
}

/* body baseline overrides for better layout */
body {
  color: var(--text);
  font-family: var(--font-body);
  height: auto;
  min-height: 100%;
  width: 100%;
  background: var(--bg);
  overflow-y: hidden;
  transition: background 0.55s ease, color 0.35s ease;
}

body.trailer-lock {
  overflow: hidden;
}

.trailer-intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 169, 94, 0.22), transparent 40%),
    linear-gradient(160deg, rgba(6, 9, 12, 0.98) 0%, rgba(9, 12, 17, 0.95) 55%, rgba(6, 9, 12, 0.98) 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.trailer-intro.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.trailer-intro-content {
  text-align: center;
  padding: 1.5rem;
}

.trailer-kicker {
  text-transform: uppercase;
  letter-spacing: 0.24rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.trailer-title {
  margin: 0.75rem 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.2rem;
  color: var(--gold);
}

.trailer-copy {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.trailer-skip {
  border: 1px solid color-mix(in oklab, var(--gold) 60%, var(--text) 40%);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.trailer-skip:hover,
.trailer-skip:focus-visible {
  outline: none;
  color: var(--gold);
  border-color: var(--gold);
}

body[data-scene="hero"] {
  --cinematic-glow: radial-gradient(circle at 35% 10%, rgba(193, 154, 58, 0.07) 0%, rgba(26, 98, 143, 0.06) 32%, transparent 72%);
}

body[data-scene="sobre"] {
  --cinematic-glow: radial-gradient(circle at 20% 18%, rgba(193, 154, 58, 0.06) 0%, rgba(84, 98, 116, 0.08) 38%, transparent 72%);
}

body[data-scene="tech-content"] {
  --cinematic-glow: radial-gradient(circle at 70% 15%, rgba(26, 98, 143, 0.1) 0%, rgba(84, 98, 116, 0.06) 30%, transparent 72%);
}

body[data-scene="meus_jogos"] {
  --cinematic-glow: radial-gradient(circle at 50% 8%, rgba(193, 154, 58, 0.08) 0%, rgba(26, 98, 143, 0.06) 34%, transparent 75%);
}

body[data-scene="projetos"] {
  --cinematic-glow: radial-gradient(circle at 75% 14%, rgba(193, 154, 58, 0.07) 0%, rgba(26, 98, 143, 0.06) 35%, transparent 72%);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.25rem; font-weight: 600; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  font-family: var(--font-body);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Utility Classes for Spacing */
.section-spacing { margin: 4rem 0; }
.section-spacing-lg { margin: 6rem 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* Legacy scrollbar rules aligned with GTA theme */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, color-mix(in oklab, var(--gold) 80%, var(--primary) 20%), color-mix(in oklab, var(--gold) 62%, var(--primary) 38%));
  border-radius: 999px;
  border: 2px solid color-mix(in oklab, var(--surface) 80%, #000 20%);
}

::-webkit-scrollbar-track {
  background-color: color-mix(in oklab, var(--surface) 84%, #000 16%);
}

header {
  margin-top: 0;
  margin-bottom: 0;
  overflow: hidden;
}

.headline {
  font-size: 5vw;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2rem 0;
  margin-top: 2rem;
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
}

.navegacao {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 5%;
  list-style: none;
  font-size: 20%;
  width: 100%;
}

.navegacao_link {
  font-size: 0.9rem;
  letter-spacing: 0.125rem;
  transform: scale(1.08);
  color: var(--text-soft);
  position: relative;
  -webkit-text-stroke-width: 0;
  transform: scale(1.2);
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.25s ease, transform 0.25s ease;
}

.navegacao_link:hover {
  color: var(--gold);
  font-weight: 600;
  transform: scale(1.1);
}

/* Topbar sticky look */
.navegacao {
  position: sticky;
  top: 5rem;
  z-index: 1000;
  backdrop-filter: saturate(120%) blur(8px);
  background: var(--topbar-bg);
  padding: 0.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), rgba(255,255,255,0.02));
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--ring); }

h2 {
  font-size: 200%;
  color: var(--gold);
  font-weight: bold;
  letter-spacing: 0.22rem;
  text-align: center;
  text-transform: uppercase;
  margin-top: 1.5625rem;
  margin-bottom: 1.5625rem;
}

p { color: var(--text-soft); }

section {
  margin: 6.25rem auto;
  width: 100%;
}

section#projetos {
  margin-bottom: 2rem;
}

.banner {
  background-image: var(--cinematic-overlay), var(--cinematic-glow), linear-gradient(rgba(0, 0, 0, .54), color-mix(in oklab, var(--gold) 18%, var(--primary) 18%, transparent), rgba(0, 0, 0, .68));
  background-size: auto;
  background-repeat: no-repeat;
  height: 80vh;
  min-height: 80vh;
  width: 100%;
  padding-top: 0.5rem;
  border-bottom: 0.0625rem solid color-mix(in oklab, var(--gold) 40%, var(--primary) 40%, transparent);
  background-position: center center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  isolation: isolate;
  overflow: hidden;
}

.cinematic-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cinematic-layer-back {
  z-index: 1;
  filter: saturate(calc(1 + (var(--hero-pulse) * 0.35))) brightness(calc(1 + (var(--hero-pulse) * 0.12)));
  background:
    radial-gradient(circle at 18% 24%, rgba(193, 154, 58, 0.18), transparent 48%),
    radial-gradient(circle at 78% 18%, rgba(26, 98, 143, 0.16), transparent 52%);
}

.cinematic-layer-mid {
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.5;
  background:
    linear-gradient(112deg, transparent 0%, rgba(255, 185, 88, 0.08) 30%, transparent 65%),
    linear-gradient(-108deg, transparent 5%, rgba(68, 132, 173, 0.1) 45%, transparent 78%);
}

/* Camadas fotograficas do hero (parallax) - somente tema escuro, ver overrides [data-theme="light"] abaixo */
.hero-photo-layer,
.hero-ornament-fore {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-photo-layer {
  z-index: 0;
  background-image: url("../images/hero-background.webp");
}

.hero-ornament-fore {
  z-index: 4;
  opacity: 0.9;
  background-image: url("../images/hero-foreground-overlay.webp");
}

/* Tema claro: usa a versao clara da foto de fundo; o ornamento em primeiro plano
   e transparente e funciona em ambos os temas, entao so a imagem de fundo troca. */
[data-theme="light"] .hero-photo-layer {
  background-image: url("../images/hero-background-w.webp");
}

/* Eco discreto do hero em outras secoes - brilho abstrato (sem formas figurativas),
   so tema escuro, mesma paleta dourado/azul do resto do site. */
.panel-ornament {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* #sobre/#tech-content usam overflow:visible, entao a propria camada
     precisa herdar o border-radius do pai para nao vazar quadrada por cima
     dos cantos arredondados do cartao. */
  border-radius: inherit;
  overflow: hidden;
}

.panel-ornament-crystal {
  background:
    radial-gradient(circle at 88% 12%, rgba(26, 98, 143, 0.20), transparent 52%),
    radial-gradient(circle at 6% 88%, rgba(193, 154, 58, 0.10), transparent 48%);
}

.panel-ornament-gold {
  background:
    radial-gradient(circle at 10% 10%, rgba(193, 154, 58, 0.20), transparent 52%),
    radial-gradient(circle at 92% 92%, rgba(26, 98, 143, 0.10), transparent 48%);
}

[data-theme="light"] .panel-ornament {
  display: none;
}

/* Garante que o conteudo das secoes fique acima do ornamento */
#sobre > *:not(.panel-ornament),
#tech-content > *:not(.panel-ornament) {
  position: relative;
  z-index: 1;
}

.cinematic-grain {
  z-index: 5;
  opacity: 0.04;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 4px 4px;
}

.cinematic-content {
  position: relative;
  z-index: 7;
  min-height: 0;
}

.hero-title {
  letter-spacing: 0.22rem;
  text-shadow: 0 0 20px rgba(193, 154, 58, 0.18), 0 4px 18px rgba(0, 0, 0, 0.22);
  transform: translateY(calc(var(--hero-pulse) * -2px));
  margin-top: 0.2rem;
  margin-bottom: 0.3rem;
  font-size: 2.1rem;
}



@keyframes availabilityPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(122, 229, 130, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(122, 229, 130, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(122, 229, 130, 0);
  }
}

.hero-title.glitch-ready {
  position: relative;
  isolation: isolate;
}

.hero-title.glitch-ready::before,
.hero-title.glitch-ready::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.hero-title.glitch-ready::before {
  color: rgba(255, 66, 66, 0.72);
}

.hero-title.glitch-ready::after {
  color: rgba(74, 178, 255, 0.72);
}

.hero-title.glitch-ready.is-glitching::before,
.hero-title.glitch-ready.is-glitching::after {
  opacity: 1;
  animation: heroGlitch var(--glitch-duration) steps(2, end);
}

@keyframes heroGlitch {
  0% {
    transform: translate(0);
    clip-path: inset(0 0 85% 0);
  }
  20% {
    transform: translate(-2px, 0);
    clip-path: inset(20% 0 48% 0);
  }
  40% {
    transform: translate(2px, -1px);
    clip-path: inset(62% 0 12% 0);
  }
  60% {
    transform: translate(-3px, 1px);
    clip-path: inset(38% 0 36% 0);
  }
  80% {
    transform: translate(2px, 0);
    clip-path: inset(75% 0 6% 0);
  }
  100% {
    transform: translate(0);
    clip-path: inset(0);
  }
}

.scroll-cue {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 2.4rem;
  height: 3.2rem;
  margin-top: 0;
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  border: 1.5px solid color-mix(in oklab, var(--gold) 65%, var(--text) 35%);
  border-radius: 1.5rem;
  opacity: 0.9;
}

.scroll-cue span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--gold);
  animation: scrollPulse 1.7s infinite ease-in-out;
}

@keyframes scrollPulse {
  0% { transform: translateY(-6px); opacity: 0.2; }
  50% { transform: translateY(4px); opacity: 1; }
  100% { transform: translateY(10px); opacity: 0.15; }
}

.panel {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 0%, rgba(193, 154, 58, 0.14), transparent 60%);
  transition: opacity 0.38s ease;
}

.panel.is-panel-active {
  filter: saturate(calc(1 + (var(--panel-active-glow) * 0.12))) brightness(calc(1 + (var(--panel-active-glow) * 0.06)));
}

.panel.is-panel-active::after {
  opacity: var(--panel-active-glow);
}

section.panel {
  margin: 0 auto;
}

.panel-story,
.panel-skills,
.panel-games,
.panel-projects {
  scroll-margin-top: 90px;
}

.panel-projects {
  overflow: visible;
  min-height: auto;
  scroll-snap-align: none;
}

.panel-skills {
  min-height: auto;
  scroll-snap-align: none;
}

.is-revealed {
  opacity: 1;
  transform: none;
}

.meus_jogos_container__jogo {
  transform: translate3d(0, 20px, 0);
  opacity: 0;
}

.panel-wipe {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    linear-gradient(180deg, rgba(8, 11, 16, 0.92) 0%, rgba(8, 11, 16, 0.66) 45%, rgba(8, 11, 16, 0) 100%),
    linear-gradient(120deg, rgba(255, 175, 95, 0.16) 0%, rgba(46, 125, 161, 0.08) 65%, transparent 100%);
  transform: translateY(0%);
  opacity: 0;
}

.split-title .split-char {
  display: inline-block;
  will-change: transform, opacity;
}

.split-title .split-char.space-char {
  width: 0.34em;
}

/* Banner específico para página de cursos */
header.banner ~ #tech-content {
  margin-top: 0;
}

header.banner:not(:has(.banner-content)) {
  height: auto;
  min-height: auto;
  padding: 0.5rem 0;
  justify-content: flex-start;
}

.banner .banner-content {
  color: var(--text);
  width: 100%;
  margin: 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0.6rem 1rem 0.6rem;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  z-index: 2;
}

.banner h1 {
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  -webkit-text-fill-color: var(--gold);
  -webkit-text-stroke-width: 0;
}

.hero-title,
.hero-title .split-char {
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
}

.banner p {
  font-size: 1.25rem;
  margin: 1rem 0 1.5rem;
}

.banner .logo {
  background-color: rgba(0, 0, 0, .2);
  height: clamp(6rem, 20vh, 12rem);
  width: clamp(6rem, 20vh, 12rem);
  margin: clamp(0.4rem, 2vh, 1.2rem) auto clamp(0.3rem, 1vh, 0.6rem) auto;
  padding: 1rem;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  animation: floatY 6s ease-in-out infinite;
  z-index: 2;
}

.banner .logo img {
  margin: auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--gold) 55%, var(--primary) 35%, transparent)) brightness(1.05);
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

@keyframes floatY {
  0% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}

.banner .banner-content button {
  color: var(--bg);
  font-size: 1rem;
  font-weight: bold;
  padding: 1rem 2rem;
  letter-spacing: 0.2rem;
  background-color: var(--gold);
  border: 1px solid color-mix(in oklab, var(--gold) 70%, var(--primary) 30%);
  border-radius: 0.625rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.banner .banner-content button:hover {
  background-color: color-mix(in oklab, var(--gold) 60%, var(--primary) 40%);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0.625rem;
}

.social-icon {
  margin: 0 0.625rem;
}

.hero-social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 2.2rem;
  position: relative;
  z-index: 2;
}

.social-icon img {
  width: 3.125rem;
  height: 3.125rem;
  filter: brightness(0) saturate(100%) invert(76%) sepia(28%) saturate(623%) hue-rotate(356deg) brightness(92%) contrast(89%) drop-shadow(0 0 10px rgba(193, 154, 58, 0.55));
  transition: transform 0.3s, filter 0.3s;
}

.social-icon img:hover {
  transform: scale(1.2);
  filter: brightness(0) saturate(100%) invert(82%) sepia(30%) saturate(676%) hue-rotate(357deg) brightness(102%) contrast(95%) drop-shadow(0 0 14px rgba(193, 154, 58, 0.78));
}

.btn-home img {
  width: 3.125rem;
  height: 3.125rem;
  filter: drop-shadow(0 0 12px rgba(212, 180, 71, 0.8)) drop-shadow(0 0 20px rgba(212, 180, 71, 0.6));
  transition: transform 0.3s;
}

.btn-home {
  /* Reset de <button>: o elemento virou um <button> de verdade (foco/teclado nativos),
     entao remove o visual padrao do navegador pra manter a mesma aparencia de antes. */
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  border-radius: 50%;
  /* visibility troca so no fim do fade (mesma duracao da opacity) ao esconder, e na hora
     ao mostrar - assim o botao invisivel sai da ordem de tabulacao do teclado. */
  transition: opacity 0.4s ease-in-out, visibility 0s linear 0.4s;
  pointer-events: none;
}

.btn-home.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.4s ease-in-out, visibility 0s linear 0s;
}

.btn-home:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.cta-contact {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold) 0%, color-mix(in oklab, var(--gold) 65%, var(--primary) 35%) 100%);
  color: #14181f;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease, visibility 0s linear 0.4s;
}

.cta-contact.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.4s ease-in-out, transform 0.3s ease, box-shadow 0.3s ease, visibility 0s linear 0s;
}

.cta-contact:hover,
.cta-contact:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.cta-contact:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.cta-contact-icon {
  width: 1.1rem;
  height: 1.1rem;
  filter: brightness(0) saturate(100%);
}

@media (max-width: 700px) {
  .cta-contact {
    left: 16px;
    bottom: 16px;
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
    max-width: calc(100vw - 32px);
  }
}

#main {
  width: 100%;
  padding: 2%;
}

#tech-content {
  width: 90%;
  margin: 2rem auto;
  padding: 1rem 2% 2rem 2%;
  text-align: center;
  background: radial-gradient(circle, color-mix(in oklab, var(--primary) 20%, var(--surface)) 0%, var(--bg) 100%);
  border-radius: 1.25rem;
  box-shadow: 0.3125rem 0.3125rem 0.3125rem 0.3125rem rgba(90, 86, 86, 0.5);
  overflow: visible;
}

#tech-content .galeria_tech {
  display: grid;
  gap: 1.35rem;
}

#tech-content .galeria_tech > p {
  margin: 0;
  font-size: clamp(1.1rem, 1.7vw, 1.8rem);
  color: var(--text-soft);
  letter-spacing: 0.02rem;
  -webkit-text-stroke-width: 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 0.35rem;
  margin-top: 0.35rem;
  margin-bottom: 0.05rem;
}

.tech-grid-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.tech-grid-tools .tech-card {
  flex: 0 0 88px;
}

.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 86px;
  border: 1px solid color-mix(in oklab, var(--border) 72%, var(--gold) 28%);
  border-radius: 0.8rem;
  background: linear-gradient(165deg, color-mix(in oklab, var(--card) 80%, transparent) 0%, color-mix(in oklab, var(--surface) 88%, transparent) 100%);
  padding: 0.45rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tech-card img {
  max-height: 36px;
  width: auto;
  max-width: 86px;
}

.tech-card-label {
  font-size: 0.66rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  color: var(--text-soft);
}

.tech-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 8px 18px rgba(193, 154, 58, 0.22);
}

[data-theme="light"] #tech-content {
  border: 3px solid var(--gold);
}

#tech-content h2 {
  font-size: 200%;
}

#tech-content .tech-list .tech a {
  color: var(--gold);
  text-decoration: none;
}

.galeria_tech {
  -webkit-text-stroke-width: 0.03125rem;
  -webkit-text-stroke-color: #000;
  font-size: 1.5rem;
}

.galeria1 {
  -webkit-text-stroke-width: 0.03125rem;
  -webkit-text-stroke-color: #000;
  font-size: 1rem;
  padding: 0.8rem 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.galeria_tech img:hover, .galeria1 img:hover, .galeria_cursos img:hover {
  scale: 1.1;
  transition: 0.5s;
  cursor: pointer;
}

.galeria_cursos img {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: filter 0.3s ease;
}

[data-theme="light"] .galeria_cursos img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)) drop-shadow(0 0 12px rgba(184, 134, 11, 0.4));
}

.galeria1 img {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: filter 0.3s ease;
}

[data-theme="light"] .galeria1 img {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(184, 134, 11, 0.6));
}

#meus_jogos {
  min-height: 43.75rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  background-size: cover;
  background-image: url("../images/codigos.webp");
  background-attachment: fixed;
  border-top: 0.0625rem solid color-mix(in oklab, var(--gold) 50%, var(--primary) 25%, transparent);
  border-bottom: 0.0625rem solid color-mix(in oklab, var(--gold) 50%, var(--primary) 25%, transparent);
  padding: 6% 3% 6% 3%;
  padding-inline: clamp(1rem, 3vw, 2.2rem);
  background-position: center center;
}

#meus_jogos::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.045) 0,
      rgba(255, 255, 255, 0.045) 1px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0) 4px
    );
  opacity: var(--scanline-opacity);
  mix-blend-mode: soft-light;
  z-index: 1;
}

#meus_jogos > * {
  position: relative;
  z-index: 2;
}

[data-theme="light"] #meus_jogos {
  background-image: url("../images/codigosClean.jpg");
}

.link_game {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  align-self: center;
  margin-top: 0.5rem;
  padding: 0.6rem 1.25rem;
  background-color: var(--gold);
  color: var(--bg);
  border: 2px solid color-mix(in oklab, var(--gold) 70%, var(--primary) 30%);
  border-radius: 0.5rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.2s ease;
}

.link_game:hover {
  background-color: color-mix(in oklab, var(--gold) 55%, var(--primary) 45%);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.meus_jogos__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  height: auto;
  align-items: stretch;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
  /* justify-items removido para alinhar à esquerda */
}

.meus_jogos_container__jogo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  /* width removido para centralização */
  height: 100%;
  box-sizing: border-box;
  position: relative;
  background-color: var(--card);
  border-radius: 0.625rem;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.meus_jogos_container__jogo.is-tilting {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px color-mix(in oklab, var(--gold) 35%, transparent);
}

.meus_jogos_container__jogo img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-bottom: 0.0625rem;
  border: 1px solid color-mix(in oklab, var(--border) 70%, var(--gold) 30%);
}

.meus_jogos_container__jogo h2 {
  color: var(--text);
  font-size: 90%;
  -webkit-text-stroke-width: 0.03125rem;
  -webkit-text-stroke-color: gray;
  text-align: center;
}

.meus_jogos_container__jogo p {
  font-family: arial, 'sans serif';
  color: var(--text-soft);
  text-align: justify;
  flex: 1;
  margin: 0;
}

.meus_jogos_container__jogo a {
  text-decoration: none;
  align-items: center;
  text-align: justify;
}

#certificados {
  font-family: Calibri, 'Trebuchet MS';
  padding: 0 1rem;
  text-align: center;
  text-align: justify;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  flex-basis: 40%;
  color: var(--text);
  width: min(1580px, 98%);
  margin: 0 auto 2rem;
  box-sizing: border-box;
}

#certificados h2 {
  text-align: left;
  padding: 0rem 1.875rem;
  justify-content: center;
}

.column h2 {
  position: relative;
  padding: 0 0 0.9rem 1.875rem;
  margin-bottom: 1rem;
  color: var(--gold);
}

.column h2::after {
  content: "";
  position: absolute;
  left: 1.875rem;
  bottom: 0.2rem;
  width: 88px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.column {
  flex-basis: 49%;
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  box-sizing: border-box;
}

.column ol {
  margin: 0;
  padding-left: 1.3rem;
  list-style-position: inside;
  overflow-x: hidden;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
  scrollbar-width: thin;
}

.column ol li {
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 0.5rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.courses-featured {
  width: min(1580px, 98%);
  margin: 0.35rem auto 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.95rem;
  border: 1px solid color-mix(in oklab, var(--border) 74%, var(--gold) 26%);
  background: linear-gradient(160deg, color-mix(in oklab, var(--surface) 88%, transparent) 0%, color-mix(in oklab, var(--card) 92%, transparent) 100%);
  box-shadow: var(--shadow);
}

.courses-featured h3 {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-family: var(--font-heading);
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  font-size: 1rem;
}

.featured-course-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 0.5rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.featured-course-list li {
  color: var(--text-soft);
  font-size: 0.92rem;
  border-left: 2px solid color-mix(in oklab, var(--gold) 70%, transparent);
  padding-left: 0.55rem;
}

.featured-course-list li.is-hidden {
  display: none;
}

.featured-toggle {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  border: 1px solid color-mix(in oklab, var(--border) 68%, var(--gold) 32%);
  background: color-mix(in oklab, var(--card) 85%, transparent);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
}

.featured-toggle:hover {
  border-color: var(--gold);
}

#projetos {
  text-align: center;
  width: 100%;
  background-size: cover;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: stretch;
  justify-content: flex-start;
  padding: 3rem 3% 4rem;
  box-sizing: border-box;
  counter-reset: projectCard;
}

.project-title-break {
  display: inline;
}

.video-text-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin-bottom: 0;
  gap: 2.5rem;
  position: relative;
  counter-increment: projectCard;
  padding: 1.3rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in oklab, var(--border) 68%, var(--gold) 32%);
  background: linear-gradient(160deg, color-mix(in oklab, var(--card) 84%, #000 16%) 0%, color-mix(in oklab, var(--surface) 90%, #000 10%) 100%);
  overflow: hidden;
}

.video-text-container::before {
  content: counter(projectCard, decimal-leading-zero);
  position: absolute;
  left: 1rem;
  bottom: 0.3rem;
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 8vw, 5rem);
  line-height: 1;
  color: color-mix(in oklab, var(--gold) 40%, transparent);
  opacity: 0.2;
  pointer-events: none;
}

#projetos .video-text-container:nth-child(even)::before {
  left: auto;
  right: 1rem;
}

.video-text-container > .video,
.video-text-container > .text-container1,
.video-text-container > .text-container2 {
  max-width: none;
  min-width: 0;
}

#projetos img {
  width: 45%;
  border-radius: 0.625rem;
  box-shadow: var(--shadow);
  padding: 1%;
  border: 1px solid color-mix(in oklab, var(--border) 70%, var(--gold) 30%);
}

.video-text-container .video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: min(50vh, 360px);
  position: relative;
  object-fit: contain;
  border-radius: 0.625rem;
  box-shadow: var(--shadow);
  padding: 0;
  border: 1px solid color-mix(in oklab, var(--border) 70%, var(--gold) 30%);
  background: var(--card);
  will-change: transform, filter;
}

/* Empurra os videos para o centro do card sem alterar dimensoes */
.video-text-container > .video:first-child {
  left: 0.6rem;
}

.video-text-container > .text-container2 + .video {
  left: -0.6rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 0.35rem;
  align-items: center;
}

.project-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.66rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  border: 1px solid color-mix(in oklab, var(--border) 64%, var(--gold) 36%);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  color: var(--text-soft);
}

.project-chip.status {
  border-color: color-mix(in oklab, #7ae582 75%, var(--gold) 25%);
  color: color-mix(in oklab, #c8f7cc 84%, #fff 16%);
  background: color-mix(in oklab, #7ae582 15%, transparent);
}

.video-text-container .text-container {
  width: 45%;
  text-align: center;
}

.text-container1 {
  text-align: left;
  padding-left: 0;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  align-self: center;
  text-align: justify;
}

.text-container2 {
  text-align: right;
  padding-right: 0;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  align-self: center;
  text-align: justify;
}

.text-container1 p,
.text-container2 p {
  line-height: 1.7;
  max-width: 62ch;
  margin: 0 auto;
  font-size: clamp(0.98rem, 1.05vw, 1.12rem);
  color: color-mix(in oklab, var(--text-soft) 88%, var(--text) 12%);
}

.text-container1 p a,
.text-container2 p a {
  color: color-mix(in oklab, var(--gold) 74%, var(--primary) 26%);
  text-underline-offset: 0.18rem;
  text-decoration-thickness: 1.25px;
}

footer {
  padding: 3rem;
  text-align: center;
  background-size: 100%;
  background-image: linear-gradient(rgba(0, 0, 0, 0), color-mix(in oklab, var(--gold) 18%, var(--primary) 12%, transparent));
  width: 100%;
  border-top: 0.0625rem solid color-mix(in oklab, var(--gold) 50%, var(--primary) 20%, transparent);
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

footer .logo {
  width: 6.25rem;
  margin-bottom: 0.5rem;
}

footer p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

footer .footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}

footer .footer-info p {
  margin: 0;
}

footer .brand {
  font-weight: 600;
  color: var(--gold);
}

@media (max-width: 700px) {
  header {
    margin: 0;
    overflow: hidden;
  }

  header.banner {
    display: flex;
    flex-direction: column;
    min-height: 80vh;
  }

  .container {
    width: 95vw;
    height: auto;
  }

  .banner {
    margin-top: 0;
    width: 100%;
    min-height: 80vh;
    font-size: 20%;
    overflow-y: hidden;
    background-attachment: scroll;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .panel {
    min-height: auto;
  }

  .banner .logo {
    height: 60%;
    width: 60%;
    margin-bottom: 0.5rem;
  }

  .banner-content {
    max-width: 80%;
  }

  .banner-content p {
    font-size: 1rem;
  }

  .banner h1 {
    font-size: 2rem;
    margin: 0.5rem 0;
  }

  /* Layout do menu para mobile */
  /* Menu será tratado pelo menu hamburger - veja CSS do menu-toggle acima */

  /* Games em mobile - 4 colunas lado a lado */
  .meus_jogos__container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .meus_jogos_container__jogo {
    padding: 0.75rem 0.4rem;
    box-sizing: border-box;
    border-radius: 0.8rem;
    margin-bottom: 0.5rem;
    background: var(--card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  }

  .meus_jogos_container__jogo h2 {
    font-size: 0.8rem;
  }

  .meus_jogos_container__jogo p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .link_game {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  #certificados {
    flex-direction: column;
    align-items: center;
  }

  #tech-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.75rem 0.2rem;
    min-height: auto;
    overflow: visible;
    box-sizing: border-box;
  }

  .tech-grid {
    grid-template-columns: repeat(3, minmax(68px, 1fr));
    gap: 0.45rem;
  }

  .tech-grid-tools {
    gap: 0.45rem;
  }

  .tech-grid-tools .tech-card {
    flex-basis: 70px;
  }

  .tech-card {
    min-height: 72px;
    padding: 0.35rem;
  }

  .tech-card img {
    max-height: 30px;
    max-width: 70px;
  }

  .tech-card-label {
    font-size: 0.56rem;
  }

  #tech-content .galeria_tech .galeria {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  .galeria1 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 0.2rem 0.7rem 0.2rem;
    width: 100%;
    box-sizing: border-box;
  }

  .galeria1 a {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .galeria1 img {
    width: 45px;
    height: auto;
  }

  .galeria_cursos img {
    height: 2.2rem;
    margin: 0.25rem;
  }

  .courses-summary {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .summary-card {
    min-height: 76px;
    padding: 0.75rem;
  }

  .courses-page header.banner {
    min-height: auto;
    padding-bottom: 0.45rem;
  }

  .courses-page header.banner > #tech-content {
    width: min(94%, 100%);
    min-height: auto;
    margin-top: 0.25rem;
    padding: 0.68rem 0.56rem 0.5rem;
    gap: 0.46rem;
    grid-template-rows: auto;
  }

  .courses-page header.banner > nav {
    width: min(94%, 100%);
    margin-top: 0.25rem;
  }

  .courses-page #tech-content > h2 {
    font-size: 1.1rem;
  }

  .courses-page #tech-content > p {
    font-size: 0.78rem;
    max-width: 100%;
  }

  .courses-page .courses-summary {
    width: 100%;
    margin-bottom: 0.3rem;
  }

  .courses-page .galeria_cursos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.36rem;
  }

  .courses-page .galeria_cursos a {
    min-height: 54px;
    padding: 0.28rem;
    border-radius: 0.62rem;
  }

  .courses-page .galeria_cursos a img {
    max-width: 42px;
    max-height: 31px;
  }

  .courses-page .galeria1 {
    width: 100%;
    margin-top: 0.18rem;
    padding: 0.08rem 0;
    border-radius: 0.9rem;
  }

  .courses-page .galeria1 a {
    min-height: 34px;
    padding: 0.1rem 0.42rem;
  }

  .courses-page .galeria1::before,
  .courses-page .galeria1::after {
    width: 28px;
  }

  .courses-page .galeria_cursos {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 0.25rem !important;
  }

  .courses-page .galeria1-track {
    animation-duration: 38s;
  }

  .courses-page .galeria1 img {
    max-height: 27px;
  }

  .courses-page .galeria_cursos a {
    min-height: 42px !important;
    padding: 0.16rem !important;
    border-radius: 0.48rem !important;
  }

  .courses-featured {
    padding: 0.65rem 0.65rem 0.75rem;
    margin: 0.25rem auto 0.8rem;
  }

  .courses-featured h3 {
    font-size: 0.86rem;
  }

  .courses-page .galeria_cursos a img,
  .courses-page .galeria_cursos img {
    max-width: 100% !important;
    max-height: 26px !important;
  }

  .featured-course-list {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .featured-course-list li {
    font-size: 0.72rem;
  }

  #certificados h2 {
    font-size: 1.4rem;
  }

  .column ol li {
    font-size: 0.59rem;
    margin-left: -1rem;
    white-space: normal;
  }

  .column ol {
    overflow-x: visible;
  }

  #tech-content h2 {
    font-size: 0.9rem;
  }

  #tech-content .galeria1 img {
    width: auto;
    max-width: 40px;
    height: 40px;
    margin: 0.25rem;
  }

  #tech-content p {
    font-size: 0.8rem;
    margin-top: 0;
  }

  #tech-content .galeria1 p {
    font-size: 75%;
  }

  #projetos h2 {
    font-size: 1.1rem;
    margin: -5% 0 7% 0;
  }

  #projetos p {
    font-size: 70%;
  }

  .video-text-container {
    flex-direction: column;
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
  }

  #projetos .video {
    width: 100%;
  }

  .video-text-container > .video,
  .video-text-container > .text-container1,
  .video-text-container > .text-container2 {
    max-width: 100%;
    order: initial;
  }

  .video-text-container .video {
    margin-bottom: 1rem;
    max-height: min(45vh, 280px);
    left: 0;
  }

  .video-text-container::before {
    right: 0.55rem;
    bottom: 0.1rem;
    font-size: 2.1rem;
    opacity: 0.18;
  }
}

/* Parallax fallback for reduced motion or small screens */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  [data-parallax] {
    background-attachment: scroll !important;
    background-position: center center !important;
  }
}

/* ====== Filtros de Cursos ====== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: center;
  width: 90%;
  margin: 1rem auto 0 auto;
  padding: 1rem;
  border-radius: 0.75rem;
  background: radial-gradient(circle, color-mix(in oklab, var(--gold) 18%, var(--surface)) 0%, var(--bg) 100%);
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in oklab, var(--border) 70%, var(--gold) 30%);
}

.galeria_cursos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 0.85rem;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.galeria_cursos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 74px;
  padding: 0.55rem;
  border-radius: 0.9rem;
  border: 1px solid color-mix(in oklab, var(--border) 72%, var(--gold) 28%);
  background: linear-gradient(160deg, color-mix(in oklab, var(--card) 82%, transparent) 0%, color-mix(in oklab, var(--surface) 88%, transparent) 100%);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.galeria_cursos a img {
  width: 100%;
  max-width: 72px;
  max-height: 58px;
  height: auto;
  object-fit: contain;
}

.courses-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 0.85rem;
  width: min(860px, 100%);
  margin: 0 auto 1.4rem;
}

.summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 92px;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  border: 1px solid color-mix(in oklab, var(--border) 72%, var(--gold) 28%);
  background: linear-gradient(160deg, color-mix(in oklab, var(--card) 84%, transparent) 0%, color-mix(in oklab, var(--surface) 90%, transparent) 100%);
  box-shadow: var(--shadow);
}

.summary-number {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  color: var(--gold);
  line-height: 1;
}

.summary-label {
  font-size: 0.8rem;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  color: var(--text-soft);
  text-align: center;
}

/* ====== Courses Page Hero Layout ====== */
.courses-page header.banner {
  min-height: auto;
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: start;
  padding-bottom: 0.7rem;
}

.courses-page header.banner > #tech-content {
  width: min(1320px, 96%);
  min-height: auto;
  margin: 0.45rem auto 0;
  padding: 0.85rem 0.9rem 0.65rem;
  display: grid;
  grid-template-rows: auto;
  align-content: start;
  gap: 0.55rem;
}

.courses-page #tech-content > h2 {
  margin-bottom: 0.15rem;
}

.courses-page #tech-content > p {
  max-width: 900px;
  margin: 0 auto 0.2rem;
  text-align: center;
}

.courses-page .courses-summary {
  width: min(700px, 100%);
  margin: 0 auto 0.28rem;
}

.courses-page .summary-card {
  min-height: 74px;
  padding: 0.58rem 0.75rem;
  background: transparent;
}

.courses-page .galeria_cursos {
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 0.5rem;
  width: min(1180px, 100%);
  align-content: start;
}

.courses-page .galeria_cursos a {
  min-height: 62px;
  min-width: 0;
  padding: 0.32rem;
  border-radius: 0.7rem;
  border-color: color-mix(in oklab, var(--border) 84%, var(--gold) 16%);
  background: linear-gradient(160deg, color-mix(in oklab, var(--card) 90%, transparent) 0%, color-mix(in oklab, var(--surface) 93%, transparent) 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.courses-page .galeria_cursos a img {
  max-width: 56px;
  max-height: 42px;
}

.courses-page .galeria1 {
  width: min(980px, 100%);
  margin: 0.22rem auto 0;
  padding: 0 1.5rem;
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 1.1rem;
  border: 1px solid color-mix(in oklab, var(--border) 76%, var(--gold) 24%);
  background: linear-gradient(180deg, color-mix(in oklab, var(--surface) 92%, transparent) 0%, color-mix(in oklab, var(--card) 86%, transparent) 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
  mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.courses-page .galeria1 a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--border) 82%, var(--gold) 18%);
  background: color-mix(in oklab, var(--card) 90%, transparent);
  backdrop-filter: blur(8px);
}

.courses-page .galeria1::before,
.courses-page .galeria1::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  pointer-events: none;
  z-index: 2;
}

.courses-page .galeria1::before {
  left: 0;
  background: linear-gradient(90deg, color-mix(in oklab, var(--bg) 92%, transparent) 0%, transparent 100%);
}

.courses-page .galeria1::after {
  right: 0;
  background: linear-gradient(270deg, color-mix(in oklab, var(--bg) 92%, transparent) 0%, transparent 100%);
}

.courses-page .galeria1-track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.3rem;
  will-change: transform;
  animation: course-ribbon-scroll 52s linear infinite;
}

.courses-page .galeria1:hover .galeria1-track,
.courses-page .galeria1:focus-within .galeria1-track {
  animation-play-state: paused;
}

.courses-page .galeria1 .is-ribbon-clone {
  opacity: 0.94;
}

.courses-page .galeria1 img {
  max-height: 34px;
  width: auto;
}

@keyframes course-ribbon-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 0.325rem));
  }
}

.courses-page header.banner > nav {
  width: min(1320px, 96%);
  margin: 0.45rem auto 0;
  padding: 0;
}

[data-theme="light"].courses-page header.banner > #tech-content {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82) 0%, rgba(246, 248, 250, 0.96) 100%);
}

[data-theme="light"].courses-page .galeria1 a {
  background: linear-gradient(160deg, #d9e0e9 0%, #c8d2de 100%);
  border-color: #9fabb9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38), 0 4px 10px rgba(16, 24, 40, 0.11);
}

[data-theme="light"].courses-page .galeria1 {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(243, 246, 250, 0.98) 100%);
  border-color: #b9c3d0;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

[data-theme="light"].courses-page .galeria1::before {
  background: linear-gradient(90deg, rgba(238, 242, 247, 0.99) 0%, transparent 100%);
}

[data-theme="light"].courses-page .galeria1::after {
  background: linear-gradient(270deg, rgba(238, 242, 247, 0.99) 0%, transparent 100%);
}

.galeria_cursos a:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklab, var(--border) 58%, var(--gold) 42%);
  box-shadow: 0 10px 18px rgba(193, 154, 58, 0.12);
}

/* ====== Cursos Light Premium ====== */
[data-theme="light"] header.banner > #tech-content {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.78) 0%, rgba(246, 248, 250, 0.92) 100%);
  border: 1px solid color-mix(in oklab, var(--border) 76%, var(--gold) 24%);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
}

[data-theme="light"] .galeria_cursos a {
  background: linear-gradient(160deg, #ffffff 0%, #f7f8fa 100%);
  border-color: color-mix(in oklab, var(--border) 84%, var(--gold) 16%);
  box-shadow: 0 5px 12px rgba(16, 24, 40, 0.06);
}

[data-theme="light"] .courses-summary .summary-card {
  background: transparent;
  border-color: color-mix(in oklab, var(--border) 78%, var(--gold) 22%);
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
}

[data-theme="light"] .summary-number {
  color: #8a6100;
}

[data-theme="light"] .summary-label {
  color: #526072;
}

[data-theme="light"] #certificados {
  color: var(--text);
}

[data-theme="light"] .column {
  background: linear-gradient(160deg, #ffffff 0%, #f5f7fa 100%);
  border: 1px solid color-mix(in oklab, var(--border) 78%, var(--gold) 22%);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08);
}

[data-theme="light"] .column h2 {
  color: var(--gold);
}

[data-theme="light"] .column ol li {
  color: #425062;
}

[data-theme="light"] .courses-featured {
  background: linear-gradient(160deg, #ffffff 0%, #f3f6fa 100%);
  border-color: #b8c2cf;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.1);
}

[data-theme="light"] .featured-course-list li {
  color: #3f4e62;
}

[data-theme="light"] .filters {
  background: linear-gradient(160deg, #ffffff 0%, #eef2f7 100%);
  border-color: #b7c1ce;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.12);
}

[data-theme="light"] .filter-group label {
  color: #8f6500;
}

[data-theme="light"] .filter-group select,
[data-theme="light"] .filter-group input[type="search"],
[data-theme="light"] .filter-group input[type="text"] {
  background-color: #ffffff;
  color: #17212f;
  border-color: #aeb8c6;
  box-shadow: inset 0 0 0 1px rgba(174, 184, 198, 0.34);
}

[data-theme="light"] .filter-group select:focus-visible,
[data-theme="light"] .filter-group input[type="search"]:focus-visible,
[data-theme="light"] .filter-group input[type="text"]:focus-visible {
  outline: none;
  border-color: #8f6500;
  box-shadow: 0 0 0 3px rgba(143, 101, 0, 0.22);
}

[data-theme="light"] #filter-clear {
  color: #ffffff;
  background-color: #825c00;
  border-color: #9a7000;
}

[data-theme="light"] #filter-clear:hover {
  background-color: #9a7000;
  border-color: #ad7f00;
}

[data-theme="light"] #filter-count {
  color: #2f3d4d;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filter-group label {
  color: var(--gold);
  font-weight: bold;
  letter-spacing: 0.05rem;
}

.filter-group select,
.filter-group input[type="search"],
.filter-group input[type="text"] {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid color-mix(in oklab, var(--gold) 45%, var(--primary) 25%, var(--border) 30%);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-width: 12rem;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--border) 70%, transparent);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#filter-clear {
  background-color: var(--gold);
  color: var(--bg);
  border: 2px solid color-mix(in oklab, var(--gold) 70%, var(--primary) 30%);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

#filter-clear:hover {
  background-color: color-mix(in oklab, var(--gold) 60%, var(--primary) 40%);
  border-color: var(--primary);
}

#filter-count {
  color: var(--text);
}

@media (max-width: 700px) {
  .filters {
    width: 95%;
    gap: 0.75rem;
  }

  .filter-group select,
  .filter-group input[type="search"],
  .filter-group input[type="text"] {
    min-width: 9rem;
  }
}

/* ====== Hero/Banner Improvements ====== */
.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 0.18rem;
  font-family: var(--font-heading);
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.hero-value {
  max-width: 760px;
  margin: 0.08rem auto 0.18rem;
  font-size: clamp(0.93rem, 1.1vw, 1.01rem);
  line-height: 1.45;
  color: var(--text-soft);
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
}

/* ====== Seção Sobre Mim ====== */
#sobre {
  background: var(--surface);
  min-height: 82svh;
  display: flex;
  align-items: center;
  padding: 1rem 2rem 1.1rem;
  border-radius: 1.25rem;
  margin: 1.5rem auto 2rem;
  max-width: 1200px;
  width: 90%;
  scroll-margin-top: 140px;
  border: 2.5px solid var(--gold);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(212, 180, 71, 0.1);
}

.container-sobre {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.container-sobre h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.sobre-content {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.sobre-visual {
  margin: 0;
  align-self: stretch;
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.sobre-photo {
  position: absolute;
  inset: 0.35rem 0 0 0;
  width: 100%;
  height: calc(100% - 0.35rem);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.32));
}

.sobre-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 1.1rem;
  text-align: justify;
}

.sobre-text strong {
  color: var(--gold);
  font-weight: 600;
}

.stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--card);
  border-radius: 0.75rem;
  min-width: 140px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(212, 180, 71, 0.2);
  border-color: var(--gold);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-heading);
}

.stat-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-top: 0.5rem;
}

/* ====== Footer Completo ======
   Duas faixas horizontais: identidade | navegacao | contato numa linha so,
   e uma segunda faixa so com os direitos autorais. Altura compacta (~150-180px). */
.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--border);
  padding: 1.75rem 0 0.875rem;
  margin-top: 2rem;
  margin-bottom: 0;
}

.footer-container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.footer-col-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

/* A coluna de navegacao usa a tag semantica <nav>, mas existe um seletor global "nav {}"
   (menu do cabecalho) que tambem bateria aqui - zera o que vaza pra manter fluxo normal. */
.footer-col-nav {
  display: block;
  width: auto;
  margin-top: 0;
  padding: 0;
  position: static;
  z-index: auto;
  flex: initial;
}

.footer-logo-link {
  display: inline-flex;
  border-radius: 0.4rem;
  flex-shrink: 0;
}

.footer-logo-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.footer-logo {
  height: 40px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(212, 180, 71, 0.3));
}

.footer-slogan {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-style: italic;
  margin: 0;
}

/* Navegacao horizontal, sem titulo visual (o <nav aria-label> ja da contexto pra quem usa leitor de tela). */
.footer-col-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col-nav ul li a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 200ms ease, transform 200ms ease;
  display: inline-block;
}

.footer-col-nav ul li a:hover,
.footer-col-nav ul li a:focus-visible {
  color: var(--gold);
  transform: translateY(-1px);
}

.footer-col-nav ul li a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Contato + redes sociais unificados: um unico link por meio de contato (icone + rotulo),
   sem repetir a mesma informacao em lista textual e em icones separados. Sem titulo visual
   (o role="group" aria-label no container ja identifica o bloco pra leitores de tela). */
.footer-contact-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.25rem 0.35rem;
  margin: -0.25rem -0.35rem;
  border-radius: 0.5rem;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: color 200ms ease, transform 200ms ease, background 200ms ease;
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
  color: var(--gold);
  transform: translateY(-1px);
}

.footer-contact-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.footer-contact-icon {
  /* Mesmo tamanho/alinhamento pros tres icones. Os arquivos-fonte agora tem
     enquadramento equivalente (linkedin.png foi recortado pra bater com email/github). */
  width: 23px;
  height: 23px;
  flex-shrink: 0;
  object-fit: contain;
  /* Icones-fonte sao pretos; no escuro precisam de contraste - clareia em repouso e
     fica dourado so no hover/foco (dourado reservado para titulos, hover e detalhes). */
  filter: invert(0.9) brightness(1.05);
  transition: filter 200ms ease;
}

.footer-contact-link:hover .footer-contact-icon,
.footer-contact-link:focus-visible .footer-contact-icon {
  filter: brightness(0) saturate(100%) invert(82%) sepia(30%) saturate(676%) hue-rotate(357deg) brightness(102%) contrast(95%);
}

[data-theme="light"] .footer-contact-icon {
  /* No claro os icones ja sao pretos sobre fundo claro: contraste bom sem filtro. */
  filter: none;
}

[data-theme="light"] .footer-contact-link:hover .footer-contact-icon,
[data-theme="light"] .footer-contact-link:focus-visible .footer-contact-icon {
  filter: brightness(0) saturate(100%) invert(82%) sepia(30%) saturate(676%) hue-rotate(357deg) brightness(102%) contrast(95%);
}

.footer-bottom {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--text-soft);
  font-size: 0.8rem;
  margin: 0;
}

.footer-bottom .brand {
  color: var(--gold);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .footer-col-nav ul li a,
  .footer-contact-link,
  .footer-contact-icon {
    transition: none;
  }

  .footer-col-nav ul li a:hover,
  .footer-col-nav ul li a:focus-visible,
  .footer-contact-link:hover,
  .footer-contact-link:focus-visible {
    transform: none;
  }
}

/* Tablet: identidade na 1a linha, navegacao na 2a, contato na 3a - tudo centralizado,
   sem tres colunas apertadas. */
@media (max-width: 900px) and (min-width: 601px) {
  .footer-main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-col-nav ul {
    justify-content: center;
  }

  .footer-contact-list {
    justify-content: center;
  }
}

/* Celular: logo acima da frase, navegacao em duas colunas, contatos centralizados com quebra. */
@media (max-width: 600px) {
  .site-footer {
    /* Espaco extra embaixo reserva a area onde os botoes flutuantes ficam presos
       (fixed, bottom: 16-20px) - sem isso, no scroll maximo eles cobrem os direitos
       autorais, ja que nesta largura o rodape empilha em uma coluna so e fica mais alto. */
    padding: 1.5rem 0 calc(0.875rem + 60px);
  }

  .footer-main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.125rem;
  }

  .footer-col-brand {
    flex-direction: column;
    gap: 0.4rem;
  }

  .footer-col-nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1.25rem;
    justify-items: center;
  }

  .footer-contact-list {
    justify-content: center;
  }
}

/* ====== Navegação Ativa ====== */
.navegacao_link.active {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  font-weight: 600;
}

/* ====== Menu Hamburger (Mobile) ====== */
@media (max-width: 700px) {
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
  }
}

.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  transition: all 0.3s ease;
}

.menu-toggle:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 25px;
}

.hamburger .line {
  width: 100%;
  height: 3px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Menu Hamburger - Estado Ativo */
.menu-toggle.active .line:nth-child(1) {
  transform: rotate(45deg) translate(9px, 8px);
}

.menu-toggle.active .line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Theme Toggle - Sempre visível */
.theme-toggle {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), rgba(255,255,255,0.02));
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  margin-left: 1rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.theme-toggle:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: none;
}

.theme-toggle:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Menu Responsivo no Mobile */
@media (max-width: 700px) {
  nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
  }

  .menu-toggle {
    display: flex;
  }

  .navegacao {
    position: absolute;
    /* width removido para centralização */
    left: 0;
    right: 0;
    background: var(--topbar-bg);
    backdrop-filter: saturate(120%) blur(10px);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.32);
    z-index: 1000;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
  }

  .navegacao.active {
    max-height: 320px;
    padding: 0.3rem 0.1rem;
  }

  .navegacao li {
    width: 100%;
    padding: 0;
    border-bottom: 1px solid var(--border);
  }

  .navegacao li:last-child {
    border-bottom: none;
  }

  .navegacao_link {
    display: block;
    padding: 0.6rem 1rem;
    text-align: left;
    width: 100%;
    border: none;
    font-size: 0.85rem;
  }

  .navegacao_link:hover {
    background-color: var(--muted);
    color: var(--gold);
  }

  .navegacao_link.active {
    background-color: rgba(212, 180, 71, 0.1);
    color: var(--gold);
    border-bottom: none;
    border-left: 3px solid var(--gold);
    padding-left: calc(1.5rem - 3px);
  }

  .theme-toggle {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

}


/* ====== Loading States / Skeleton ====== */
.img-loading {
  background: linear-gradient(90deg, var(--muted) 25%, var(--surface) 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Animação sutil na logo do hero */
.banner .logo img {
  transition: transform 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.banner .logo img:hover {
  transform: scale(1.05);
}

/* ====== Responsive Sobre Mim ====== */
@media (max-width: 768px) {
  #sobre {
    padding: 1.5rem 1rem !important;
    width: 100% !important;
    margin: 1rem auto !important;
    box-sizing: border-box !important;
  }
  
  .container-sobre h2 {
    font-size: 2rem !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    text-align: center !important;
  }
  
  .sobre-text p {
    font-size: 0.85rem !important;
    text-align: center !important;
    max-width: 80vw !important;
    margin: 0 auto 0.6rem !important;
  }

  .logo{
    margin-top: -2rem;
  }

  .stats {
    gap: 0.8rem !important;
    flex-wrap: nowrap !important;
    justify-content: space-around !important;
    width: 100% !important;
    max-width: 80vw !important;
    margin: 0 auto !important;
  }
  
  .stat-item {
    min-width: auto !important;
    flex: 1 !important;
    padding: 0.8rem 0.4rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .stat-number {
    font-size: 1.5rem !important;
  }
  
  .stat-label {
    font-size: 0.7rem !important;
    text-align: center !important;
    text-transform: uppercase !important;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }

  .scroll-cue {
    display: none;
  }

  .trailer-title {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --cinematic-bar-size: 0px !important;
  }

  .scroll-cue {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.4rem;
    height: 3.2rem;
    position: absolute;
    left: 50%;
    bottom: 1.2rem;
    transform: translateX(-50%);
    border: 1.5px solid color-mix(in oklab, var(--gold) 65%, var(--text) 35%);
    border-radius: 1.5rem;
    opacity: 0.9;
    background: rgba(0,0,0,0.01);
    z-index: 3;
  }
}

/* ====== Mobile Hardening (consolidated overrides) ====== */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
  }

  nav {
    position: relative;
    z-index: 30;
    padding: 0.28rem 0.62rem;
    gap: 0.38rem;
    width: 100%;
    justify-content: space-between;
  }

  .navegacao {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
  }

  .navegacao_link {
    transform: none;
    letter-spacing: 0.04rem;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.15;
  }

  .menu-toggle {
    padding: 0.2rem;
  }

  .hamburger {
    width: 18px;
    gap: 0.24rem;
  }

  .hamburger .line {
    height: 2px;
  }

  .theme-toggle {
    margin-left: 0.35rem;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
    margin-right: 0.6rem;
    right: 0.6rem;
    border-color: color-mix(in oklab, var(--gold) 65%, var(--border) 35%);
    background: radial-gradient(circle at 30% 25%, rgba(255, 223, 140, 0.22) 0%, rgba(13, 18, 27, 0.88) 65%);
    box-shadow: 0 0 0 1px rgba(193, 154, 58, 0.25), 0 0 12px rgba(193, 154, 58, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  }

  .theme-toggle #theme-label {
    display: none;
  }

  .theme-toggle::before {
    content: '🌙';
    font-size: 0.92rem;
    line-height: 1;
    text-shadow: 0 0 8px rgba(193, 154, 58, 0.45);
  }

  .theme-toggle:hover,
  .theme-toggle:active {
    transform: translateY(-1px);
    border-color: color-mix(in oklab, var(--gold) 82%, #f9e7a7 18%);
    box-shadow: 0 0 0 1px rgba(193, 154, 58, 0.38), 0 0 16px rgba(193, 154, 58, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  [data-theme="light"] .theme-toggle::before {
    content: '☀️';
  }

  .banner .banner-content {
    position: relative;
    z-index: 10;
  }

  .banner {
    min-height: auto;
    padding-bottom: 1rem;
  }

  .banner .banner-content {
    width: min(94vw, 560px);
    max-width: 100%;
    padding: 0 0.35rem;
  }

  /* Remove decorative target icon on mobile */
  .banner::before,
  .banner-content::before,
  .cinematic-layer::before {
    display: none !important;
  }

  .banner .logo {
    margin: 0 auto 0.6rem;
    margin-top: 0.32rem;
    width: clamp(130px, 42vw, 194px);
    height: auto;
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 3.9vw, 1.12rem);
    line-height: 1.35;
    margin-bottom: 0.45rem;
    font-family: var(--font-heading);
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  }

  .hero-value {
    max-width: 28ch;
    margin: 0.15rem auto 0.7rem;
    font-size: clamp(0.75rem, 0.95vw, 0.92rem);
    line-height: 1.35;
  }


  .social-icons {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0.625rem;
  }
  .social-icon {
    margin: 0 0.625rem;
  }
  .social-icon img {
    width: 2.35rem;
    height: 2.35rem;
  }

  .hero-social-row {
    width: auto;
    gap: 0.4rem;
    margin-top: 0.2rem;
  }

  .hero-social-row .scroll-cue {
    display: none;
  }

  #sobre {
    min-height: auto;
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 1rem 1.5rem 1rem !important;
    margin: 1rem auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .container-sobre {
    width: 100% !important;
    max-width: 80vw !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .container-sobre h2 {
    font-size: clamp(1.6rem, 7vw, 2rem) !important;
    margin: 0 0 1rem 0 !important;
    text-align: center !important;
    width: 100% !important;
  }

  .sobre-content {
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
  }

  .sobre-text {
    width: 100% !important;
    max-width: 80vw !important;
    text-align: center !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .sobre-text p {
    font-size: clamp(0.78rem, 2.7vw, 0.9rem) !important;
    line-height: 1.48 !important;
    margin-bottom: 0.72rem !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 80vw !important;
  }

  #sobre.panel {
    overflow: visible;
  }

  .btn-home {
    right: 20px;
    bottom: 20px;
  }

  .btn-home img {
    width: 2.15rem;
    height: 2.15rem;
  }

  .stats {
    width: 100% !important;
    max-width: 80vw !important;
    margin: 1rem auto 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.8rem !important;
    place-items: center !important;
    flex-wrap: nowrap !important;
    justify-content: space-around !important;
  }

  .stat-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 0.8rem 0.4rem !important;
    border-radius: 0.7rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
  }

  .stat-label {
    font-size: 0.64rem !important;
    white-space: normal !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04rem !important;
    width: 100% !important;
  }


  #projetos {
    width: min(96vw, 900px);
  }

  .video-text-container {
    gap: 0.9rem;
    padding: 1rem 0.9rem;
  }

  .video-text-container > .video,
  .video-text-container > .text-container1,
  .video-text-container > .text-container2 {
    width: 100%;
    max-width: 100%;
    order: initial;
  }

  .video-text-container .video {
    border-radius: 0.7rem;
  }

  #projetos .text-container1,
  #projetos .text-container2 {
    font-size: clamp(0.9rem, 2.8vw, 1rem);
  }

  #projetos .text-container1 p,
  #projetos .text-container2 p {
    font-size: clamp(0.78rem, 2.45vw, 0.92rem);
    line-height: 1.52;
    max-width: 54ch;
  }

  /* no mobile o <p> fica alinhado à esquerda: o wrapper não centraliza */
  #projetos .text-container1 .project-copy,
  #projetos .text-container2 .project-copy {
    max-width: none;
    margin: 0;
  }

  #projetos .text-container1 p b,
  #projetos .text-container2 p b,
  #projetos .text-container1 .project-name,
  #projetos .text-container2 .project-name {
    font-size: clamp(0.9rem, 2.65vw, 1rem);
  }

  #projetos .text-container1 p a,
  #projetos .text-container2 p a {
    font-size: clamp(0.78rem, 2.45vw, 0.9rem);
  }

  .courses-page header.banner {
    min-height: auto;
    padding-bottom: 0.95rem;
  }

  .courses-page header.banner > #tech-content,
  .courses-page header.banner > nav {
    width: min(96vw, 860px);
  }

  .courses-page header.banner > #tech-content {
    margin-top: 0.35rem;
    padding: 0.9rem 0.7rem 0.72rem;
    gap: 0.65rem;
  }

  .courses-page .courses-summary {
    margin-bottom: 0.5rem;
  }

  .courses-page .galeria_cursos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.48rem;
  }

  .courses-page .galeria_cursos a {
    min-height: 60px;
    border-radius: 0.72rem;
  }

  .courses-page .galeria_cursos a img {
    max-width: 48px;
    max-height: 34px;
  }

  .courses-page .galeria1 {
    margin-top: 0.45rem;
    padding: 0.2rem 0;
  }

  .courses-page .galeria1-track {
    gap: 0.56rem;
    animation-duration: 36s;
  }

  .courses-page .galeria1 a {
    min-height: 36px;
    padding: 0.15rem 0.56rem;
  }

  .courses-page .galeria1 img {
    max-height: 30px;
  }

  #filtros .filters {
    width: min(94vw, 100%) !important;
    padding: 0.85rem !important;
    gap: 0.65rem !important;
  }

  .filter-group {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  .filter-group select,
  .filter-group input[type="search"],
  .filter-group input[type="text"] {
    min-width: 100% !important;
  }

  .filter-actions {
    width: 100%;
    justify-content: space-between;
  }

  #certificados {
    width: min(96vw, 980px);
    gap: 1rem;
  }

  .column {
    flex-basis: 100%;
    padding: 1rem 0.85rem 0.9rem;
  }

  .column h2 {
    font-size: 1.15rem;
    padding-left: 0.5rem;
  }

  .column h2::after {
    left: 0.5rem;
  }

  .column ol {
    padding-left: 1.05rem;
    overflow-x: visible;
  }

  .column ol li {
    font-size: 0.86rem;
    line-height: 1.5;
    white-space: normal;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .meus_jogos__container {
    gap: 0.4rem 0.2rem !important;
  }
}

/* ====== Mobile-only fine tuning (no desktop impact) ====== */
/* REMOVED: Duplicate @media (max-width: 700px) - consolidated into @media (max-width: 768px) below */

/* ====== Courses page polish (low impact) ====== */
.courses-page #tech-content > h2 {
  text-shadow: 0 6px 18px rgba(193, 154, 58, 0.14);
}

.courses-page .summary-number {
  color: color-mix(in oklab, var(--gold) 90%, #f4e3b2 10%);
}

.courses-page #certificados {
  width: min(1580px, 96%);
  margin: 1.25rem auto 2rem;
  row-gap: 1.25rem;
}

.courses-page #filtros {
  width: 100%;
  position: sticky;
  top: 84px;
  z-index: 25;
  box-sizing: border-box;
  overflow-x: hidden;
}

.courses-page #filtros .filters {
  width: 100%;
  margin: 0;
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  overflow-x: hidden;
}

.courses-page .courses-featured {
  margin-top: 0.2rem;
}

.courses-page .column h2 {
  letter-spacing: 0.08rem;
}

.courses-page .column ol li {
  color: color-mix(in oklab, var(--text-soft) 78%, var(--text) 22%);
}

.courses-page #filter-count:not(:empty) {
  font-weight: 700;
}

[data-theme="light"].courses-page .summary-number {
  color: #7b5400;
}

[data-theme="light"].courses-page .summary-label {
  color: #4a5a6b;
}

[data-theme="light"].courses-page .galeria_cursos a {
  background: linear-gradient(160deg, #fafbfd 0%, #f0f4f8 100%);
  border-color: #b8c1cd;
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.1);
}

[data-theme="light"].courses-page .galeria_cursos a img {
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.12));
}

[data-theme="light"].courses-page .column ol li {
  color: #39485a;
}

[data-theme="light"].courses-page .filter-group label {
  color: #765300;
}

[data-theme="light"].courses-page #filter-count:not(:empty) {
  color: #6f4f00;
}

[data-theme="light"].courses-page .theme-toggle {
  background: linear-gradient(180deg, #fdfefe 0%, #edf2f7 100%);
  border-color: #a8b2c0;
  box-shadow: 0 0 0 1px rgba(153, 112, 0, 0.35), 0 4px 10px rgba(15, 23, 42, 0.12);
}

@media (max-width: 900px) {
  .courses-page #certificados {
    margin-top: 0.9rem;
  }

  .courses-page #filtros {
    position: static;
  }
}

/* ====== Sobre Mim - alinhamento final (DESKTOP ONLY) ====== */
@media (min-width: 769px) {
  #sobre {
    display: grid;
    place-items: center;
    min-height: auto;
    margin-top: clamp(2rem, 4.2vw, 3rem);
    margin-bottom: 1.6rem;
    padding: clamp(0.75rem, 1.45vw, 1.2rem) clamp(0.9rem, 1.7vw, 1.35rem);
  }

  .container-sobre {
    width: min(1020px, 100%);
  }

  .container-sobre h2 {
    margin-top: 0.2rem;
    margin-bottom: 0.85rem;
  }

  .sobre-content {
    display: grid;
    grid-template-columns: minmax(170px, 250px) minmax(0, 1fr);
    gap: 0.55rem;
    align-items: stretch;
  }

  .sobre-visual {
    margin-left: -0.95rem;
  }

  .sobre-photo {
    object-position: left bottom;
    transform: translateX(-0.6rem);
  }

  .sobre-text {
    width: 100%;
    max-width: 860px;
    margin: 0;
  }

  .sobre-text p {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    margin-bottom: 0.78rem;
    text-align: justify;
    text-wrap: pretty;
  }

  .stats {
    width: min(700px, 100%);
    margin: 0.85rem auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 0.9rem;
  }

  .stat-item {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  #sobre {
    margin-top: 1.25rem;
    margin-bottom: 1rem;
    padding: 1.1rem 0.85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .container-sobre {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  .sobre-content {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(102px, 122px) minmax(0, 1fr) !important;
    align-items: start !important;
    justify-content: start !important;
    gap: 0.4rem !important;
  }

  .sobre-visual {
    width: min(122px, 30vw) !important;
    max-width: 122px !important;
    margin: 0 !important;
    padding-top: 0 !important;
    position: static !important;
    flex: 0 0 auto !important;
    align-self: start !important;
    overflow: hidden !important;
    justify-self: start !important;
  }

  .sobre-photo {
    display: block !important;
    position: static !important;
    width: 116% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center bottom !important;
    transform: translateX(-0.75rem) scale(1.04) !important;
    transform-origin: left bottom !important;
  }

  .sobre-text {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    text-align: left !important;
    margin: 0 !important;
  }

  .sobre-text p {
    margin-bottom: 0.5rem !important;
    text-align: left !important;
    max-width: none !important;
    font-size: 0.87rem !important;
    line-height: 1.42 !important;
  }

  .stats {
    gap: 0.45rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.8rem auto 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .stat-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.45rem 0.15rem !important;
    min-width: 0 !important;
  }

  .stat-number {
    font-size: clamp(1.08rem, 4.8vw, 1.35rem) !important;
    text-align: center !important;
  }

  .stat-label {
    font-size: clamp(0.5rem, 1.7vw, 0.62rem) !important;
    text-align: center !important;
    text-transform: uppercase !important;
    white-space: normal !important;
    letter-spacing: 0.03rem !important;
  }
}

/* ====== Home Visual V2 (refino cinematografico) ====== */
nav {
  width: min(1320px, 96%);
  margin: 1.15rem auto 0;
}

.navegacao {
  column-gap: clamp(1rem, 2.2vw, 2.4rem);
}

.navegacao_link {
  transform: none;
  letter-spacing: 0.08rem;
  font-weight: 600;
  color: color-mix(in oklab, var(--text-soft) 88%, var(--text) 12%);
}

.navegacao_link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 45%, transparent 100%);
  transform: scaleX(0.2);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.navegacao_link:hover::after,
.navegacao_link.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.banner {
  min-height: 100svh;
}

.cinematic-grain {
  opacity: 0.02;
}

.cinematic-layer-mid {
  opacity: 0.34;
}

.banner .banner-content {
  max-width: min(960px, 92vw);
  padding: 0.75rem 1rem 1rem;
}

.hero-title {
  font-size: clamp(1.9rem, 4.6vh + 1.6vw, 4rem);
  letter-spacing: 0.14rem;
  margin-bottom: clamp(0.15rem, 1vh, 0.4rem);
}

.hero-subtitle {
  font-size: clamp(0.92rem, 2.6vh, 1.45rem);
  line-height: 1.35;
  max-width: 42ch;
  margin: 0 auto clamp(0.1rem, 0.6vh, 0.25rem);
}

.hero-value {
  max-width: 60ch;
  margin: clamp(0.2rem, 1vh, 0.4rem) auto clamp(0.3rem, 1.2vh, 0.6rem);
  font-size: clamp(0.88rem, 1.1vw, 1.08rem);
  line-height: 1.55;
  color: color-mix(in oklab, var(--text-soft) 80%, var(--text) 20%);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  border: 1px solid color-mix(in oklab, var(--border) 76%, var(--gold) 24%);
  border-radius: 0.95rem;
  padding: clamp(0.5rem, 1.8vh, 0.85rem) 1rem;
  backdrop-filter: blur(8px);
}

.hero-social-row {
  margin-top: clamp(0.2rem, 1vh, 0.5rem);
  margin-bottom: clamp(0.6rem, 4vh, 1.35rem);
}

.social-icon img {
  width: clamp(2rem, 6vh, 2.65rem);
  height: clamp(2rem, 6vh, 2.65rem);
}

.custom-crosshair::before {
  box-shadow: 0 0 7px rgba(193, 154, 58, 0.42);
}

#projetos {
  gap: 1.5rem;
  padding-top: 2.25rem;
}

.video-text-container {
  border-radius: 1.15rem;
  border: 1px solid color-mix(in oklab, var(--border) 72%, var(--gold) 28%);
  background: linear-gradient(160deg, color-mix(in oklab, var(--card) 88%, #000 12%) 0%, color-mix(in oklab, var(--surface) 93%, #000 7%) 100%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.video-text-container:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--gold) 44%, var(--border) 56%);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.3);
}

.video-text-container::before {
  opacity: 0.14;
}

.video-text-container .video {
  border-radius: 0.85rem;
}

.text-container1 p,
.text-container2 p {
  line-height: 1.64;
}

.text-container1 p b,
.text-container2 p b {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: clamp(1.03rem, 1.2vw, 1.24rem);
  letter-spacing: 0.03rem;
  color: color-mix(in oklab, var(--text) 68%, var(--gold) 32%);
}

/* Título do projeto como <h3> (SEO) com o mesmo visual do antigo <b>.
   .project-copy tem a mesma fonte/largura do <p>, para o título alinhar com o texto */
.text-container1 .project-copy,
.text-container2 .project-copy {
  max-width: 62ch;
  margin: 0 auto;
  font-size: clamp(0.98rem, 1.05vw, 1.12rem);
}

.text-container1 .project-name,
.text-container2 .project-name {
  margin: 0 0 0.55rem;
  font-family: inherit;
  font-size: clamp(1.03rem, 1.2vw, 1.24rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.03rem;
  text-align: left;
  color: color-mix(in oklab, var(--text) 68%, var(--gold) 32%);
}

.sobre-text p {
  max-width: 74ch;
  margin-left: auto;
  margin-right: auto;
}

.meus_jogos__container {
  gap: 1.25rem;
}

.meus_jogos_container__jogo {
  padding: 0.85rem;
  border-radius: 1rem;
  background: linear-gradient(160deg, color-mix(in oklab, var(--card) 90%, #000 10%) 0%, color-mix(in oklab, var(--surface) 94%, #000 6%) 100%);
}

.meus_jogos_container__jogo img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0.72rem;
}

.meus_jogos_container__jogo h2 {
  font-size: 1.02rem;
  letter-spacing: 0.04rem;
}

.meus_jogos_container__jogo p {
  font-family: var(--font-body);
  line-height: 1.55;
}

@media (min-width: 701px) {
  .navegacao_link.active {
    border-bottom: none;
  }
}

@media (max-width: 700px) {
  .banner {
    min-height: 92svh;
  }

  .hero-value {
    max-width: 34ch;
    padding: 0.7rem 0.75rem;
    font-size: 0.9rem;
  }

  .social-icon img {
    width: 2.25rem;
    height: 2.25rem;
  }

  #projetos {
    padding-top: 1.4rem;
  }

  .video-text-container:hover {
    transform: none;
  }
}

[data-theme="light"] .hero-value {
  background: rgba(255, 255, 255, 0.72);
  color: #3b4958;
}

/* ====== Games layout fix (desktop) ====== */
.panel-games {
  overflow: visible;
}

@media (min-width: 1101px) {
  .meus_jogos__container {
    width: min(1260px, 100%);
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 0.25rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }

  .meus_jogos_container__jogo {
    width: 100%;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .meus_jogos__container {
    width: min(980px, 96%);
    margin: 0 auto;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }
}

/* ====== Tech Section V3 ====== */
#tech-content {
  width: min(1240px, 94%);
  margin: 1.5rem auto 2.4rem;
  padding: clamp(1rem, 2.2vw, 1.8rem) clamp(0.8rem, 2vw, 1.5rem) clamp(1.2rem, 2.6vw, 2.1rem);
  background:
    radial-gradient(circle at 50% -14%, rgba(193, 154, 58, 0.18) 0%, rgba(193, 154, 58, 0) 42%),
    linear-gradient(130deg, color-mix(in oklab, var(--surface) 89%, #000 11%) 0%, color-mix(in oklab, var(--card) 94%, #000 6%) 56%, color-mix(in oklab, var(--surface) 90%, #000 10%) 100%);
  border: 1px solid color-mix(in oklab, var(--border) 68%, var(--gold) 32%);
  border-radius: 1.4rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.33), inset 0 0 0 1px rgba(193, 154, 58, 0.08);
}

#tech-content > h2 {
  margin-top: 0.2rem;
  margin-bottom: 0.95rem;
}

#tech-content .galeria_tech.tech-gallery-v3 {
  display: grid;
  gap: 0.95rem;
}

#tech-content .galeria_tech.tech-gallery-v3 > p.tech-group-title {
  margin: 0.5rem 0 0.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: clamp(1.04rem, 1.6vw, 1.42rem);
  color: color-mix(in oklab, var(--text-soft) 82%, var(--text) 18%);
  font-weight: 500;
  letter-spacing: 0.01rem;
  text-align: center;
}

#tech-content .galeria_tech.tech-gallery-v3 > p.tech-group-title::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--gold) 70%, var(--border) 30%);
  color: var(--gold);
  font-size: 0.72rem;
  box-shadow: inset 0 0 0 1px rgba(193, 154, 58, 0.14);
}

#tech-content .tech-group-title-languages::before {
  content: "</>";
}

#tech-content .tech-group-title-frameworks::before {
  content: "#";
}

#tech-content .tech-group-title-tools::before {
  content: "*";
}

#tech-content .tech-grid {
  gap: 0.68rem;
  margin: 0.1rem 0 0.65rem;
}

#tech-content .tech-grid-languages {
  grid-template-columns: repeat(7, minmax(112px, 1fr));
}

#tech-content .tech-grid-frameworks {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

#tech-content .tech-grid-tools {
  display: grid;
  grid-template-columns: repeat(10, minmax(86px, 1fr));
  gap: 0.62rem;
}

#tech-content .tech-grid-tools .tech-card {
  flex: unset;
}

#tech-content .tech-card {
  min-height: 98px;
  border-radius: 0.92rem;
  border: 1px solid color-mix(in oklab, var(--border) 74%, var(--gold) 26%);
  background: linear-gradient(160deg, color-mix(in oklab, var(--card) 96%, #000 4%) 0%, color-mix(in oklab, var(--surface) 97%, #000 3%) 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  gap: 0.48rem;
  transform: translateY(7px);
  opacity: 0;
  animation: techCardIn 0.55s ease forwards;
  animation-delay: calc(var(--tech-index, 0) * 0.04s);
}

#tech-content .tech-card-frameworks {
  min-height: 108px;
}

#tech-content .tech-card-tools {
  min-height: 94px;
}

#tech-content .tech-card img {
  height: 38px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
  filter: grayscale(0) saturate(1.08) contrast(1.08) brightness(1.06);
  transition: filter 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

/* Chip claro por tras dos icones de linguagens/ferramentas: da contraste garantido
   a logos escuros/monocromaticos (ex: Markdown) sobre o card escuro. Os badges de
   Frameworks ja tem fundo colorido proprio (shields.io), entao ficam de fora. */
#tech-content .tech-card-languages img,
#tech-content .tech-card-tools img {
  height: 44px;
  padding: 0.3rem;
  background: color-mix(in oklab, white 94%, var(--gold) 6%);
  border-radius: 0.6rem;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--border) 55%, transparent);
}

#tech-content .tech-card-frameworks img {
  height: 33px;
  max-width: 120px;
}

#tech-content .tech-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.045rem;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--text) 92%, #fff 8%);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

#tech-content .tech-card:hover,
#tech-content .tech-card:focus-within {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--gold) 56%, var(--border) 44%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28), 0 0 22px rgba(193, 154, 58, 0.12);
}

#tech-content .tech-card:hover img,
#tech-content .tech-card:focus-within img {
  filter: grayscale(0) saturate(1.08) contrast(1.03) brightness(1);
  transform: translateY(-1px);
}

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

[data-theme="light"] #tech-content {
  background:
    radial-gradient(circle at 50% -14%, rgba(154, 107, 0, 0.15) 0%, rgba(154, 107, 0, 0) 42%),
    linear-gradient(130deg, rgba(255, 255, 255, 0.94) 0%, rgba(245, 248, 251, 0.98) 54%, rgba(240, 244, 249, 0.94) 100%);
  border-color: color-mix(in oklab, var(--border) 76%, var(--gold) 24%);
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.1), inset 0 0 0 1px rgba(154, 107, 0, 0.08);
}

[data-theme="light"] #tech-content .tech-card {
  background: linear-gradient(160deg, #ffffff 0%, #f5f8fb 100%);
  box-shadow: 0 8px 16px rgba(16, 24, 40, 0.08);
}

[data-theme="light"] #tech-content .tech-card img {
  filter: grayscale(0) saturate(1.02) contrast(1.02) brightness(0.98);
}

[data-theme="light"] #tech-content .tech-card-label {
  color: #334155;
  text-shadow: none;
}

@media (max-width: 1100px) {
  #tech-content .tech-grid-languages {
    grid-template-columns: repeat(4, minmax(112px, 1fr));
  }

  #tech-content .tech-grid-tools {
    grid-template-columns: repeat(5, minmax(86px, 1fr));
  }
}

@media (max-width: 700px) {
  #tech-content {
    width: min(96vw, 900px);
    padding: 0.9rem 0.6rem 1rem;
    border-radius: 1.05rem;
  }

  #tech-content > h2 {
    margin-bottom: 0.75rem;
  }

  #tech-content .galeria_tech.tech-gallery-v3 {
    gap: 0.72rem;
  }

  #tech-content .galeria_tech.tech-gallery-v3 > p.tech-group-title {
    margin-top: 0.38rem;
    font-size: 1rem;
  }

  #tech-content .tech-grid-languages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tech-content .tech-grid-frameworks {
    grid-template-columns: 1fr;
  }

  #tech-content .tech-grid-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tech-content .tech-card,
  #tech-content .tech-card-frameworks,
  #tech-content .tech-card-tools {
    min-height: 84px;
    border-radius: 0.84rem;
  }

  #tech-content .tech-card img {
    height: 33px;
    max-width: 90px;
  }

  #tech-content .tech-card-languages img,
  #tech-content .tech-card-tools img {
    height: 33px;
    padding: 0.22rem;
  }

  #tech-content .tech-card-frameworks img {
    height: 30px;
  }

  #tech-content .tech-card-label {
    font-size: 0.68rem;
    letter-spacing: 0.03rem;
  }
}

/* ====== Tech Section — Mobile Grid 4 Colunas Premium ====== */
@media (max-width: 900px) {
  .meus_jogos__container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.7rem 0.5rem !important;
    width: 100%;
    align-items: stretch;
  }
  .meus_jogos_container__jogo {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
  }
  .meus_jogos_container__jogo h2 {
    font-size: clamp(0.85rem, 3vw, 1.1rem) !important;
    word-break: normal !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: center;
    letter-spacing: 0.02em;
    margin-bottom: 0.2rem;
    hyphens: none !important;
  }
}
@media (max-width: 480px) {
  .meus_jogos__container {
    gap: 0.4rem 0.2rem !important;
  }
}

/* ====== MOBILE FULL OPTIMIZATION (max-width: 768px) ===== 
   Redesign completo para mobile com foco em adaptação viewport
   Cada seção cabe totalmente na tela do celular sem cortes
===== */
@media (max-width: 768px) {
  
  /* ===== VIEWPORT & BODY HARDENING ===== */
  html, body {
    overflow-x: hidden;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
  }

  header.banner {
    margin: 0 !important;
    width: 100vw;
  }

  /* ===== HERO SECTION OPTIMIZATION ===== */
  .banner {
    margin: 0 !important;
    width: 100vw;
    min-height: 100svh;
    height: auto;
    padding-bottom: 2rem;
    padding-top: 0;
    justify-content: center;
    background-attachment: scroll;
    background-size: cover;
    background-position: center center;
  }

  .banner-content {
    width: min(96vw, 100%);
    max-width: 100%;
    padding: 0.5rem 1rem !important;
    margin: 0 auto;
  }

  .banner .logo {
    height: 45vh;
    width: 45vh;
    max-height: 180px;
    max-width: 180px;
    margin: 0.5rem auto 1rem;
    padding: 0.75rem;
  }

  .banner .logo img {
    filter: drop-shadow(0 0 8px rgba(193, 154, 58, 0.4)) brightness(0.98);
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
    margin: 0.5rem 0 0.3rem;
    letter-spacing: 0.12rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: clamp(0.9rem, 3vw, 1rem);
    margin: 0.4rem 0;
    line-height: 1.3;
    max-width: 95vw;
  }

  .hero-value {
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 95vw;
    margin: 0.5rem 0;
    color: var(--text-soft);
  }

  .hero-social-row {
    gap: 0.4rem;
    margin: 1rem 0;
  }

  .social-icon img {
    width: 2.5rem;
    height: 2.5rem;
  }

  .scroll-cue {
    display: none;
  }

  /* ===== ABOUT SECTION OPTIMIZATION ===== */
  #sobre {
    padding: 1.2rem 1rem;
    margin: 1.5rem auto;
    width: min(98vw, 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: auto;
  }

  .container-sobre {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }

  .container-sobre h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin: 0 0 0.6rem 0;
    text-align: center;
  }

  .sobre-content {
    width: 100%;
  }

  .sobre-text {
    width: 100%;
  }

  .sobre-text p {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    margin-bottom: 0.75rem;
  }

  .sobre-text strong {
    font-weight: 600;
    color: var(--gold);
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
    width: 100%;
  }

  .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.8rem;
    border-radius: 0.6rem;
    background: color-mix(in oklab, var(--card) 80%, transparent);
    border: 1px solid color-mix(in oklab, var(--border) 60%, var(--gold) 40%);
  }

  .stat-number {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    color: var(--gold);
    font-weight: 700;
  }

  .stat-label {
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.03rem;
  }

  /* ===== TECH SECTION OPTIMIZATION ===== */
  #tech-content {
    width: min(98vw, 100%);
    margin: 1.5rem auto;
    padding: 1rem;
    border-radius: 0.9rem;
    min-height: auto;
  }

  #tech-content > h2 {
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    margin-bottom: 1rem;
  }

  #tech-content .galeria_tech.tech-gallery-v3 {
    gap: 0.6rem;
  }

  #tech-content .galeria_tech.tech-gallery-v3 > p.tech-group-title {
    font-size: 0.9rem;
    margin: 0.5rem 0 0.3rem;
    gap: 0.3rem;
  }

  #tech-content .tech-group-title::before {
    width: 1.1rem;
    height: 1.1rem;
    font-size: 0.6rem;
  }

  #tech-content .tech-grid {
    margin: 0.3rem 0 0.5rem;
    gap: 0.4rem;
  }

  #tech-content .tech-grid-languages {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  #tech-content .tech-grid-frameworks {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #tech-content .tech-grid-tools {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  #tech-content .tech-card,
  #tech-content .tech-card-frameworks,
  #tech-content .tech-card-tools {
    min-height: 55px;
    border-radius: 0.6rem;
    padding: 0.25rem;
    gap: 0.2rem;
  }

  #tech-content .tech-card-tools {
    min-height: 75px !important;
    padding: 0.4rem 0.25rem !important;
  }

  #tech-content .tech-card img {
    height: 22px;
    max-width: 60px;
  }

  #tech-content .tech-card-languages img {
    height: 22px !important;
    padding: 0.16rem !important;
  }

  #tech-content .tech-card-tools img {
    height: 24px !important;
    max-width: 55px !important;
    padding: 0.16rem !important;
  }

  #tech-content .tech-card-frameworks img {
    height: 20px;
    max-width: 70px;
  }

  #tech-content .tech-card-label {
    font-size: 0.5rem;
    letter-spacing: 0.02rem;
  }

  #tech-content .tech-card-label {
    word-break: break-word !important;
    white-space: normal !important;
    line-height: 1.1 !important;
    max-width: 55px !important;
  }

  /* Python: keep in single line */
  #tech-content .tech-grid-languages .tech-card:nth-child(2) .tech-card-label {
    max-width: 50px !important;
  }

  /* JavaScript: break into two lines */
  #tech-content .tech-grid-languages .tech-card:nth-child(5) .tech-card-label {
    max-width: 38px !important;
  }

  /* ===== GAMES SECTION OPTIMIZATION ===== */
  #meus_jogos {
    padding: 2rem 0.5rem;
    min-height: auto;
    background-attachment: scroll;
  }

  #meus_jogos::before {
    opacity: 0.03;
  }

  .meus_jogos__container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.6rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 0.6rem !important;
    box-sizing: border-box !important;
  }

  .meus_jogos_container__jogo {
    width: 100% !important;
    margin: 0 !important;
    padding: 0.6rem !important;
    border-radius: 0.6rem !important;
    min-height: auto !important;
    gap: 0.4rem !important;
  }

  .meus_jogos_container__jogo h2 {
    font-size: clamp(0.8rem, 2.5vw, 1rem) !important;
    margin-bottom: 0.3rem !important;
    line-height: 1.2;
  }

  .meus_jogos_container__jogo img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
  }

  .meus_jogos_container__jogo p {
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0.3rem 0;
    max-height: 3em;
    overflow: hidden;
  }

  .link_game {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    margin-top: 0.4rem;
  }

  /* ===== PROJECTS SECTION OPTIMIZATION ===== */
  #projetos {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 2.4rem 0.5rem 1.5rem;
    gap: 1.5rem;
    box-sizing: border-box;
    background-image: var(--cinematic-overlay), var(--cinematic-glow), linear-gradient(rgba(0, 0, 0, .56), color-mix(in oklab, var(--gold) 16%, var(--primary) 16%, transparent), rgba(0, 0, 0, .7));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
  }

  #projetos > h2 {
    font-size: clamp(1.08rem, 4.1vw, 1.42rem);
    margin-top: 0.2rem;
    margin-bottom: 2.5rem;
    word-break: keep-all !important;
    word-spacing: normal !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    line-height: 1.2;
    text-wrap: wrap;
    letter-spacing: 0.06rem !important;
  }

  #projetos > h2 .project-title-break {
    display: block;
  }

  .video-text-container {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 1rem !important;
    padding: 1rem !important;
    border-radius: 0.8rem !important;
    margin-bottom: 0.5rem !important;
    align-items: stretch !important;
  }

  .video-text-container > .video,
  .video-text-container > .text-container1,
  .video-text-container > .text-container2 {
    width: 100% !important;
    max-width: none !important;
  }

  /* Force same structure for every project card on mobile:
     title + tech chips + description, then video */
  .video-text-container > .text-container1,
  .video-text-container > .text-container2 {
    order: 1 !important;
  }

  .video-text-container > .video {
    order: 2 !important;
    margin-top: 0.6rem !important;
    margin-bottom: 0 !important;
  }

  .video-text-container .video {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    border-radius: 0.6rem;
  }

  .text-container1,
  .text-container2 {
    width: 100% !important;
  }

  .text-container1 p,
  .text-container2 p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0.5rem 0;
  }

  .text-container1 p a,
  .text-container2 p a {
    color: var(--gold);
    text-decoration: underline;
    word-break: break-word;
  }

  .project-header {
    gap: 0.2rem !important;
    margin-bottom: 0.4rem !important;
  }

  .project-title {
    font-size: 0.95rem !important;
  }

  .project-meta {
    gap: 0.15rem !important;
  }

  .project-chip {
    font-size: 0.6rem !important;
    padding: 0.08rem 0.3rem !important;
  }

  .project-number {
    font-size: 1.4rem !important;
    right: 0.5rem !important;
    bottom: 0.2rem !important;
    opacity: 0.12 !important;
  }

  .video-text-container::before {
    display: none !important;
  }

  /* Footer no mobile: ver ".site-footer"/".footer-main" dentro de
     "@media (max-width: 600px)" na secao "Footer Completo", que ja cobre esse caso. */

  /* ===== NAVIGATION & MENU OPTIMIZATION ===== */
  nav {
    padding: 0.45rem 0.55rem !important;
    gap: 0.35rem !important;
  }

  .menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.35rem !important;
    width: 2.4rem !important;
    height: 2.4rem !important;
    border-radius: 0.6rem !important;
    border: 1px solid color-mix(in oklab, var(--border) 65%, var(--gold) 35%) !important;
    background: linear-gradient(160deg, color-mix(in oklab, var(--surface) 86%, #000 14%) 0%, color-mix(in oklab, var(--card) 90%, #000 10%) 100%) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28) !important;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.24rem;
    width: 1rem;
  }

  .hamburger .line {
    width: 100%;
    height: 2px;
    background: color-mix(in oklab, var(--text) 90%, var(--gold) 10%);
  }

  .navegacao {
    position: fixed !important;
    top: 4.05rem !important;
    left: 0.55rem !important;
    right: 0.55rem !important;
    width: auto !important;
    flex-direction: column !important;
    background:
      linear-gradient(165deg, color-mix(in oklab, var(--surface) 86%, #000 14%) 0%, color-mix(in oklab, var(--card) 92%, #000 8%) 100%) !important;
    padding: 0.58rem !important;
    gap: 0.34rem !important;
    max-height: calc(100svh - 5rem) !important;
    overflow-y: auto !important;
    z-index: 999 !important;
    display: none !important;
    border: 1px solid color-mix(in oklab, var(--border) 62%, var(--gold) 38%) !important;
    border-radius: 0.95rem !important;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(193, 154, 58, 0.16) inset !important;
    backdrop-filter: blur(10px) saturate(118%) !important;
  }

  .navegacao.active {
    display: flex !important;
  }

  .navegacao li {
    width: 100%;
    border-bottom: none !important;
    padding: 0 !important;
  }

  .navegacao_link {
    box-sizing: border-box; /* width:100% + padding/borda passava da caixa do menu e era cortado */
    font-size: 0.87rem;
    padding: 0.56rem 0.66rem;
    text-align: center;
    border: 1px solid color-mix(in oklab, var(--border) 76%, transparent 24%) !important;
    border-radius: 0.62rem !important;
    background: color-mix(in oklab, var(--surface) 78%, transparent 22%) !important;
    text-decoration: none !important;
    letter-spacing: 0.035rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }

  .navegacao_link:hover,
  .navegacao_link:focus-visible {
    background: color-mix(in oklab, var(--gold) 14%, var(--surface) 86%) !important;
    border-color: color-mix(in oklab, var(--gold) 56%, var(--border) 44%) !important;
    transform: translateY(-1px);
  }

  .navegacao_link.active {
    background: color-mix(in oklab, var(--gold) 18%, var(--surface) 82%) !important;
    border-color: color-mix(in oklab, var(--gold) 68%, var(--border) 32%) !important;
    color: var(--gold) !important;
    border-bottom-width: 1px !important;
  }

  .theme-toggle {
    width: 2rem !important;
    height: 2rem !important;
    padding: 0 !important;
    border-radius: 50% !important;
    margin-left: auto !important;
  }

  .theme-toggle #theme-label {
    display: none !important;
  }

  /* ===== COURSES PAGE OPTIMIZATION ===== */
  .courses-page header.banner {
    min-height: 60vh;
  }

  /* CodeVerse tambem usa .courses-page (mesmo layout de grid do header), mas o cabecalho
     dele e bem mais curto (so titulo + abas) - sem essa altura minima sobra um vao vazio
     enorme entre as abas e o inicio do conteudo. */
  .codeverse-page header.banner {
    min-height: auto;
  }

  .courses-featured {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.72rem 0.55rem !important;
    margin: 1rem auto !important;
    box-sizing: border-box !important;
  }

  .courses-featured h3 {
    font-size: 0.64rem !important;
    line-height: 1.06 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    margin: 0 0 0.5rem !important;
  }

  .courses-page .courses-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.32rem !important;
    width: 100% !important;
    margin: 0 auto 0.42rem !important;
  }

  .courses-page .summary-card {
    min-height: 62px !important;
    padding: 0.38rem 0.28rem !important;
  }

  .courses-page .summary-number {
    font-size: clamp(1.12rem, 4.4vw, 1.42rem) !important;
  }

  .courses-page .summary-label {
    font-size: 0.58rem !important;
    line-height: 1.05 !important;
    letter-spacing: 0.02rem !important;
  }

  .courses-page .courses-summary .summary-card:last-child {
    grid-column: auto !important;
  }

  .featured-course-list {
    grid-template-columns: 1fr !important;
    gap: 0.4rem !important;
  }

  .featured-course-list li {
    font-size: 0.72rem !important;
    line-height: 1.24 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    padding-left: 0.42rem !important;
  }

  #certificados {
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0.8rem !important;
    box-sizing: border-box !important;
    margin: 1rem auto !important;
  }

  .courses-page #certificados {
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0.8rem !important;
    box-sizing: border-box !important;
    margin: 1rem auto !important;
  }

  .column {
    flex-basis: 100% !important;
    padding: 0.7rem 0.55rem !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .courses-page .column {
    flex-basis: 100% !important;
    padding: 0.7rem 0.55rem !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .column h2 {
    font-size: 0.78rem !important;
    line-height: 1.05 !important;
    letter-spacing: 0.01rem !important;
    text-align: center !important;
    white-space: nowrap !important;
    padding: 0 0 0.45rem 0 !important;
  }

  .column h2::after {
    width: 56px;
    left: 50%;
    transform: translateX(-50%);
  }

  .column ol {
    font-size: 0.4rem !important;
    line-height: 1.12 !important;
    padding-left: 0 !important;
    margin: 0 auto !important;
    list-style-position: inside !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    word-break: normal !important;
  }

  .column ol li {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    margin-left: 0 !important;
  }

  .filters {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    padding: 0.8rem !important;
  }

  #filtros .filters,
  .courses-page #filtros .filters {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .filter-group {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }

  .filter-group label {
    font-size: 0.8rem !important;
  }

  .filter-group select,
  .filter-group input[type="search"],
  .filter-group input[type="text"] {
    min-width: 100% !important;
    font-size: 0.85rem;
  }

  .filter-actions {
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  #filter-clear {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem !important;
  }

  .galeria_cursos {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 0.22rem !important;
    padding: 0.6rem !important;
  }

  .galeria_cursos a {
    min-height: 40px !important;
    padding: 0.14rem !important;
    border-radius: 0.45rem !important;
  }

  .galeria_cursos img {
    max-height: 24px !important;
    width: auto;
    height: auto;
  }

  .galeria_cursos a:hover {
    transform: translateY(-1px);
  }

  /* ===== ANIMATION REDUCTIONS FOR PERFORMANCE ===== */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation: none !important;
      transition: none !important;
    }
  }

  /* ===== Courses Page - Final Mobile Override ===== */
  .courses-page .courses-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.28rem !important;
    width: 100% !important;
    margin: 0 auto 0.38rem !important;
  }

  .courses-page .summary-card {
    min-height: 58px !important;
    padding: 0.32rem 0.22rem !important;
    background: transparent !important;
  }

  .courses-page .summary-number {
    font-size: clamp(1.04rem, 4vw, 1.28rem) !important;
    color: var(--gold) !important;
  }

  .courses-page .summary-label {
    font-size: 0.53rem !important;
    line-height: 1.02 !important;
    letter-spacing: 0.015rem !important;
  }

  .courses-page .courses-summary .summary-card:last-child {
    grid-column: auto !important;
  }

  .courses-page .galeria_cursos {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 0.18rem !important;
    width: 100% !important;
    padding: 0.35rem 0 !important;
  }

  .courses-page .galeria_cursos a {
    min-height: 36px !important;
    padding: 0.12rem !important;
    border-radius: 0.4rem !important;
  }

  .courses-page .galeria_cursos a img,
  .courses-page .galeria_cursos img {
    max-width: 100% !important;
    max-height: 22px !important;
    width: auto !important;
    height: auto !important;
  }

  /* ====== Filtros mobile - espaçamento de bordas ====== */
  #filtros {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  #filtros .filters,
  .filters {
    width: 100% !important;
    max-width: calc(100vw - 1.6rem) !important;
    margin: 0 auto !important;
    padding: 0.6rem 1rem !important;
    gap: 0.5rem !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  .filter-group {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .filter-group select,
  .filter-group input[type="search"],
  .filter-group input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    max-height: 36px !important;
  }

  .filter-actions {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

}

/* ====== Pagina CodeVerse ====== */
.codeverse-page header.banner {
  padding-bottom: 1.5rem;
}

.codeverse-hero {
  width: min(1100px, 94%);
  margin: 1.5rem auto 0;
  text-align: center;
}

.codeverse-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--gold);
  letter-spacing: 0.08rem;
  margin-bottom: 0.5rem;
}

.codeverse-hero-subtitle {
  color: var(--text-soft);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  max-width: 60ch;
  margin: 0 auto 1.5rem;
}

.codeverse-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.codeverse-tab {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--border) 68%, var(--gold) 32%);
  background: color-mix(in oklab, var(--card) 84%, transparent);
  color: var(--text-soft);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.codeverse-tab:hover {
  border-color: var(--gold);
  color: var(--text);
  transform: translateY(-1px);
}

.codeverse-tab.is-active {
  background: linear-gradient(135deg, var(--gold) 0%, color-mix(in oklab, var(--gold) 65%, var(--primary) 35%) 100%);
  border-color: transparent;
  color: #14181f;
  box-shadow: var(--shadow);
}

.codeverse-intro {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: min(1100px, 94%);
  margin: 2rem auto;
  padding: 1.4rem;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in oklab, var(--border) 72%, var(--gold) 28%);
  background: linear-gradient(160deg, color-mix(in oklab, var(--card) 88%, transparent) 0%, color-mix(in oklab, var(--surface) 92%, transparent) 100%);
  box-shadow: var(--shadow);
}

.codeverse-cover {
  width: 100%;
  height: auto;
  border-radius: 0.9rem;
  display: block;
}

.codeverse-intro-text h2 {
  font-family: var(--font-heading);
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.codeverse-year-description p {
  color: var(--text-soft);
  line-height: 1.65;
  margin-bottom: 0.7rem;
}

.codeverse-stats {
  margin-top: 0.5rem;
}

.codeverse-stat-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 1.1rem;
  border-radius: 0.8rem;
  border: 1px solid color-mix(in oklab, var(--gold) 40%, var(--border) 60%);
  background: color-mix(in oklab, var(--gold) 10%, transparent);
}

.codeverse-stat-badge strong {
  color: var(--gold);
  font-size: 1.15rem;
  font-family: var(--font-heading);
}

.codeverse-stat-badge span {
  color: var(--text-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04rem;
}

/* ====== Secao de artigos CodeVerse: cabecalho + filtro por mes + busca + grid de cards ====== */
:root {
  --codeverse-card-bg: color-mix(in oklab, var(--card) 78%, transparent);
  --codeverse-card-border: color-mix(in oklab, var(--border) 76%, var(--gold) 24%);
  --codeverse-card-border-hover: color-mix(in oklab, var(--gold) 55%, var(--border) 45%);
}

.codeverse-articles {
  width: min(1100px, 94%);
  margin: 0 auto 3rem;
}

.codeverse-articles-header {
  text-align: center;
  margin-bottom: 1.7rem;
}

.codeverse-articles-title {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  margin-bottom: 0.5rem;
}

.codeverse-articles-desc {
  color: var(--text-soft);
  max-width: 62ch;
  margin: 0 auto 1rem;
  line-height: 1.6;
}

.codeverse-articles-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.codeverse-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--codeverse-card-border);
  background: var(--codeverse-card-bg);
  font-size: 0.82rem;
  color: var(--text-soft);
}

.codeverse-stat-chip strong {
  color: var(--gold);
  font-family: var(--font-heading);
}

/* ---- Controles: filtro de mes (rolagem horizontal) + busca ---- */
.codeverse-controls {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.8rem;
}

.codeverse-month-filter {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.3rem 0.15rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--gold) 60%, var(--border) 40%) transparent;
}

.codeverse-filter-btn {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.6rem 1.05rem;
  min-height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--codeverse-card-border);
  background: var(--codeverse-card-bg);
  color: var(--text-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.codeverse-filter-btn:hover {
  border-color: var(--gold);
  color: var(--text);
}

.codeverse-filter-btn.is-active {
  background: linear-gradient(135deg, var(--gold) 0%, color-mix(in oklab, var(--gold) 65%, var(--primary) 35%) 100%);
  border-color: transparent;
  color: #14181f;
}

.codeverse-filter-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.codeverse-search-group {
  width: min(420px, 100%);
  margin: 0 auto;
}

/* ---- Resultados: cabecalho de mes (quando "Todos") + grade de cards ---- */
.codeverse-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.codeverse-results[hidden] {
  display: none;
}

/* Reseta o "section { margin: 6.25rem auto; }" global: aqui o espacamento
   entre grupos de mes deve vir apenas do gap acima, senao fica distante demais. */
.codeverse-month-group {
  margin: 0;
  width: 100%;
}

.codeverse-month-group-title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.03rem;
  text-transform: uppercase;
  padding-bottom: 0.65rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--codeverse-card-border);
}

.codeverse-month-group-count {
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.codeverse-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.codeverse-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid var(--codeverse-card-border);
  background: var(--codeverse-card-bg);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.codeverse-card:hover,
.codeverse-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--codeverse-card-border-hover);
  box-shadow: var(--shadow);
}

.codeverse-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.codeverse-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.codeverse-card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--gold) 16%, transparent);
  color: var(--gold);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
}

.codeverse-card-arrow {
  color: var(--text-soft);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.codeverse-card:hover .codeverse-card-arrow,
.codeverse-card:focus-visible .codeverse-card-arrow {
  transform: translateX(3px);
  color: var(--gold);
}

.codeverse-card-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
  margin: 0;
  transition: color 0.2s ease;
}

.codeverse-card:hover .codeverse-card-title,
.codeverse-card:focus-visible .codeverse-card-title {
  color: var(--gold);
}

.codeverse-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.codeverse-card-date {
  font-size: 0.74rem;
  color: var(--text-soft);
}

.codeverse-card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 18%, transparent);
  color: color-mix(in oklab, var(--primary) 60%, var(--text) 40%);
}

.codeverse-card-read {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gold);
  margin-left: auto;
}

.codeverse-empty {
  text-align: center;
  color: var(--text-soft);
  padding: 2.5rem 1rem;
}

@media (max-width: 700px) {
  .codeverse-intro {
    flex-direction: column;
    padding: 1rem;
  }

  .codeverse-award {
    flex-direction: column;
    align-items: stretch;
  }

  .codeverse-award-image {
    width: 100%;
  }

  .codeverse-card-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .codeverse-month-filter {
    margin: 0 -0.2rem;
    padding: 0.3rem 0.9rem 0.5rem;
    /* Esmaece os botoes nas bordas em vez de corta-los de forma seca - deixa claro que
       a lista continua e pode ser rolada, sem parecer que o conteudo foi cortado. */
    -webkit-mask-image: linear-gradient(to right, transparent, black 1.6rem, black calc(100% - 1.6rem), transparent);
    mask-image: linear-gradient(to right, transparent, black 1.6rem, black calc(100% - 1.6rem), transparent);
  }

  .codeverse-search-group {
    width: 100%;
  }

  .codeverse-card {
    padding: 1rem;
  }
}

.codeverse-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin: 1.1rem 0;
}

.codeverse-highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid color-mix(in oklab, var(--border) 76%, var(--gold) 24%);
  background: color-mix(in oklab, var(--card) 70%, transparent);
}

.codeverse-highlight-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.codeverse-highlight strong {
  display: block;
  color: var(--gold);
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.codeverse-highlight span {
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.codeverse-closing {
  color: var(--text-soft);
  font-style: italic;
  line-height: 1.6;
  margin: 1rem 0;
  padding-top: 0.8rem;
  border-top: 1px solid color-mix(in oklab, var(--border) 70%, var(--gold) 30%);
}

/* ---- Selo de premiacao/indicacao (ex.: DIO Awards), exibido so quando a temporada tiver o dado ---- */
.codeverse-award {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 1.1rem 0;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in oklab, var(--gold) 45%, var(--border) 55%);
  background: linear-gradient(135deg, color-mix(in oklab, var(--gold) 14%, transparent) 0%, color-mix(in oklab, var(--card) 85%, transparent) 100%);
}

/* "display: flex" acima tem a mesma especificidade do "[hidden]{display:none}" do navegador
   e vem depois na cascata, entao vencia e deixava a div vazia visivel (ex.: CodeVerse2026,
   que nao tem selo cadastrado). Este seletor mais especifico garante que [hidden] prevaleça. */
.codeverse-award[hidden] {
  display: none;
}

.codeverse-award-image {
  width: min(220px, 38%);
  flex-shrink: 0;
  border-radius: 0.7rem;
  display: block;
}

.codeverse-award-title {
  display: block;
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.codeverse-award-text {
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.codeverse-award-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.codeverse-award-link:hover,
.codeverse-award-link:focus-visible {
  border-color: var(--gold);
  color: var(--text);
}

/* ---- Bloco de codigo em destaque (CodeVerse) ---- */
.codeverse-code {
  width: min(1100px, 94%);
  margin: 0 auto 2.5rem;
}

.codeverse-code-card {
  border-radius: 1.1rem;
  border: 1px solid color-mix(in oklab, var(--border) 72%, var(--gold) 28%);
  background: color-mix(in oklab, var(--card) 85%, transparent);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.codeverse-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, var(--gold) 30%);
}

.codeverse-code-header h3 {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.codeverse-code-header p {
  color: var(--text-soft);
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 62ch;
}

.codeverse-copy-btn {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--gold) 45%, var(--border) 55%);
  background: color-mix(in oklab, var(--gold) 12%, transparent);
  color: var(--gold);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.codeverse-copy-btn:hover {
  background: color-mix(in oklab, var(--gold) 22%, transparent);
  transform: translateY(-1px);
}

.codeverse-code-block {
  max-height: 520px;
  overflow: auto;
  margin: 0 !important;
  border-radius: 0 !important;
  font-size: 0.82rem !important;
}

@media (max-width: 700px) {
  .codeverse-code-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .codeverse-code-block {
    max-height: 420px;
    font-size: 0.74rem !important;
  }
}

/* ====== CodeVerse2026: apresentacao (tagline + CTAs), indicadores, temas,
   projetos apresentados, cards ricos do catalogo e chamada final ====== */

.codeverse-year-tagline {
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin: -0.3rem 0 0.9rem;
}

.codeverse-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.codeverse-ctas[hidden] {
  display: none;
}

.codeverse-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  min-height: 2.5rem;
  border-radius: 0.7rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid color-mix(in oklab, var(--gold) 55%, var(--border) 45%);
  background: color-mix(in oklab, var(--gold) 12%, transparent);
  color: var(--gold);
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.codeverse-cta-btn:hover,
.codeverse-cta-btn:focus-visible {
  background: linear-gradient(135deg, var(--gold) 0%, color-mix(in oklab, var(--gold) 65%, var(--primary) 35%) 100%);
  color: #14181f;
  transform: translateY(-2px);
}

.codeverse-cta-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---- Titulo compartilhado pelas novas secoes (indicadores / temas / projetos) ---- */
.codeverse-section-title {
  width: min(1100px, 94%);
  margin: 0 auto 1.2rem;
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  text-align: center;
}

/* ---- 2. Indicadores do projeto ---- */
.codeverse-indicators {
  width: min(1100px, 94%);
  margin: 0 auto 3rem;
}

.codeverse-indicators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
}

.codeverse-indicator-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  padding: 1.1rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid var(--codeverse-card-border);
  background: var(--codeverse-card-bg);
}

.codeverse-indicator-card strong {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.4rem;
}

.codeverse-indicator-card span {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.codeverse-indicator-card--status {
  flex-direction: row;
  justify-content: center;
  gap: 0.5rem;
  border-color: color-mix(in oklab, #7ae582 55%, var(--codeverse-card-border) 45%);
  background: color-mix(in oklab, #7ae582 12%, var(--codeverse-card-bg) 88%);
}

.codeverse-indicator-card--status span {
  color: color-mix(in oklab, #7ae582 65%, var(--text) 35%);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04rem;
}

.codeverse-indicator-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #7ae582;
  flex-shrink: 0;
}

/* ---- 3. Temas abordados: grade compacta de tags, sem linha do tempo ---- */
.codeverse-topics {
  width: min(1100px, 94%);
  margin: 0 auto 3rem;
}

.codeverse-topics-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.codeverse-topic-chip {
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--codeverse-card-border);
  background: var(--codeverse-card-bg);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.codeverse-topic-chip:hover {
  border-color: var(--codeverse-card-border-hover);
  color: var(--gold);
}

/* ---- Moldura de capa compartilhada (cards de artigo ricos + projetos), com fallback ---- */
.codeverse-cover-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface) 88%, var(--gold) 12%);
  flex-shrink: 0;
}

.codeverse-cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 0.35s ease;
}

/* Estado de carregamento: as capas do CodeVerse2026 vem de outro repositorio e podem
   demorar pra baixar (arquivos grandes) - um shimmer deixa claro que esta carregando,
   em vez de um retangulo cinza parado que parece quebrado. */
.codeverse-cover-frame.is-loading {
  background: linear-gradient(
    100deg,
    color-mix(in oklab, var(--surface) 88%, var(--gold) 12%) 35%,
    color-mix(in oklab, var(--surface) 76%, var(--gold) 24%) 50%,
    color-mix(in oklab, var(--surface) 88%, var(--gold) 12%) 65%
  );
  background-size: 250% 100%;
  animation: codeverse-shimmer 1.6s ease-in-out infinite;
}

.codeverse-cover-frame.is-loading img {
  opacity: 0;
}

@keyframes codeverse-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.codeverse-cover-frame.is-broken {
  display: flex;
  align-items: center;
  justify-content: center;
}

.codeverse-cover-frame.is-broken::after {
  content: "🖼";
  font-size: 1.6rem;
  opacity: 0.35;
}

/* ---- Botoes de acao compartilhados (cards ricos de artigo) ---- */
.codeverse-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  min-height: 2.5rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.codeverse-card-btn--primary {
  background: linear-gradient(135deg, var(--gold) 0%, color-mix(in oklab, var(--gold) 65%, var(--primary) 35%) 100%);
  color: #14181f;
  border: 1px solid transparent;
}

.codeverse-card-btn--primary:hover,
.codeverse-card-btn--primary:focus-visible {
  transform: translateY(-2px);
}

.codeverse-card-btn--ghost {
  border: 1px solid var(--codeverse-card-border);
  background: transparent;
  color: var(--text-soft);
}

.codeverse-card-btn--ghost:hover,
.codeverse-card-btn--ghost:focus-visible {
  border-color: var(--codeverse-card-border-hover);
  color: var(--gold);
}

.codeverse-card-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---- Card de artigo "rico" do catalogo CodeVerse2026: layout horizontal e compacto
   (capa a esquerda, conteudo a direita), evitando que a capa dite a altura do card. ---- */
.codeverse-card--rich {
  padding: 0;
  gap: 0;
  overflow: hidden;
  flex-direction: row;
  align-items: stretch;
  min-height: 190px;
}

.codeverse-card--rich:focus-within {
  transform: translateY(-3px);
  border-color: var(--codeverse-card-border-hover);
  box-shadow: var(--shadow);
}

.codeverse-card--rich .codeverse-card-cover {
  width: 40%;
  min-width: 210px;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
}

.codeverse-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  flex: 1;
  min-width: 0; /* permite que titulo/data encolham em vez de estourar a largura do card */
}

.codeverse-card--rich .codeverse-card-top {
  justify-content: flex-start;
  gap: 0.4rem;
}

.codeverse-card--rich .codeverse-card-number,
.codeverse-card--rich .codeverse-card-tag {
  min-height: 1.6rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
}

.codeverse-card-soon {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: color-mix(in oklab, var(--gold) 70%, var(--text) 30%);
  border: 1px dashed color-mix(in oklab, var(--gold) 55%, var(--border) 45%);
}

.codeverse-card-soon-note {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-style: italic;
}

.codeverse-card--rich .codeverse-card-title {
  margin: 0;
  /* Limita a 2 linhas com reticencias; o texto completo continua acessivel via atributo
     "title" (tooltip nativo), adicionado no momento da renderizacao. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.codeverse-card--rich .codeverse-card-date {
  display: block;
  font-size: 0.74rem;
  color: var(--text-soft);
}

.codeverse-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

.codeverse-card--rich.is-coming-soon {
  opacity: 0.85;
}

/* Grade e espacamentos: aplicados apenas quando ha cards "ricos" (CodeVerse2026), sem afetar
   a grade mais simples do CodeVerse Python 2025 (usa :has, ja adotado em outras partes do CSS). */
.codeverse-card-grid:has(.codeverse-card--rich) {
  gap: 20px;
}

.codeverse-results:has(.codeverse-card--rich) {
  gap: 36px;
}

.codeverse-results:has(.codeverse-card--rich) .codeverse-month-group-title {
  margin-bottom: 16px;
  font-size: 0.98rem;
}

/* Tablet (600-900px): mantem o card horizontal, uma coluna, capa um pouco mais estreita. */
@media (max-width: 900px) {
  .codeverse-card-grid:has(.codeverse-card--rich) {
    grid-template-columns: 1fr;
  }

  .codeverse-card--rich {
    min-height: 180px;
  }

  .codeverse-card--rich .codeverse-card-cover {
    width: 35%;
    min-width: 180px;
  }
}

/* Celular (abaixo de 600px): card volta a ser vertical, capa em cima. */
@media (max-width: 600px) {
  .codeverse-card--rich {
    flex-direction: column;
    min-height: 0;
  }

  .codeverse-card--rich .codeverse-card-cover {
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
  }

  .codeverse-card-body {
    padding: 1rem 1.1rem;
    gap: 0.5rem;
  }

  .codeverse-card-actions .codeverse-card-btn {
    flex: 1 1 auto;
  }
}

/* ---- 6. Chamada final ---- */
.codeverse-final-cta {
  width: min(900px, 94%);
  margin: 0 auto 4rem;
  text-align: center;
  padding: 2.2rem 1.6rem;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in oklab, var(--gold) 40%, var(--border) 60%);
  background: linear-gradient(160deg, color-mix(in oklab, var(--gold) 10%, transparent) 0%, color-mix(in oklab, var(--card) 88%, transparent) 100%);
}

.codeverse-final-cta-title {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin-bottom: 0.7rem;
}

.codeverse-final-cta-text {
  color: var(--text-soft);
  max-width: 60ch;
  margin: 0 auto 1.3rem;
  line-height: 1.6;
}

.codeverse-final-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

@media (max-width: 700px) {
  .codeverse-indicators-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .codeverse-final-cta {
    padding: 1.6rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .codeverse-card--rich,
  .codeverse-cta-btn,
  .codeverse-card-btn--primary,
  .codeverse-topic-chip {
    transition: none;
  }

  .codeverse-card--rich:hover,
  .codeverse-card--rich:focus-within,
  .codeverse-cta-btn:hover,
  .codeverse-card-btn--primary:hover {
    transform: none;
  }

  .codeverse-cover-frame.is-loading {
    animation: none;
    background: color-mix(in oklab, var(--surface) 82%, var(--gold) 18%);
  }

  .codeverse-cover-frame img {
    transition: none;
  }
}



/* Texto só para leitores de tela e buscadores (ex.: h1 da página de cursos) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ====== CodeVerse.edu: aba com visual espacial (codeverse.html) ======
   Ativa com body.is-codeverse-edu (alternado por codeverse.js). Os cards de
   personagens são sempre escuros, porque as artes originais têm fundo azul-marinho. */
.codeverse-page {
  --cve-bg: #0b1026;
  --cve-bg-2: #131b44;
  --cve-card: rgba(22, 31, 72, 0.72);
  --cve-border: rgba(110, 168, 255, 0.28);
  --cve-text: #eef2ff;
  --cve-soft: #b9c4e4;
  --cve-accent: #5ad1ff;
  --cve-heading-alt: #ffd36b;
  --cve-yellow: #ffc83d;
  --cve-success: #4ade80;
  --cve-shadow: 0 10px 30px rgba(3, 8, 30, 0.45);
  --cve-star: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .codeverse-page {
  --cve-bg: #eef4ff;
  --cve-bg-2: #dbe7ff;
  --cve-card: rgba(255, 255, 255, 0.92);
  --cve-border: rgba(37, 99, 235, 0.22);
  --cve-text: #0f1b3d;
  --cve-soft: #3d4b6b;
  --cve-accent: #0369a1;
  --cve-heading-alt: #1d4ed8;
  --cve-success: #15803d;
  --cve-shadow: 0 8px 24px rgba(30, 58, 138, 0.1);
  --cve-star: rgba(37, 99, 235, 0.22);
}

/* Alterna entre o painel do CodeVerse.edu e as seções geradas das outras abas */
.codeverse-page:not(.is-codeverse-edu) #codeverse-edu,
.is-codeverse-edu #codeverse-content > section:not(#codeverse-edu) {
  display: none !important;
}

/* Fundo espacial discreto: estrelas pequenas em ladrilhos + brilho azul no topo */
body.codeverse-page.is-codeverse-edu {
  background-color: var(--cve-bg);
  background-image:
    radial-gradient(circle at 24px 36px, var(--cve-star) 1px, transparent 1.6px),
    radial-gradient(circle at 150px 90px, var(--cve-star) 0.8px, transparent 1.4px),
    radial-gradient(circle at 210px 190px, var(--cve-star) 1.1px, transparent 1.7px),
    radial-gradient(circle at 80px 230px, var(--cve-star) 0.7px, transparent 1.3px),
    radial-gradient(ellipse 90% 50% at 50% 0%, color-mix(in oklab, var(--cve-bg-2) 100%, transparent) 0%, transparent 70%);
  background-size: 260px 260px, 260px 260px, 260px 260px, 260px 260px, 100% 1200px;
  background-repeat: repeat, repeat, repeat, repeat, no-repeat;
}

.is-codeverse-edu header.banner {
  background: transparent;
  border-bottom: 0;
}

/* Abas no modo CodeVerse.edu */
.is-codeverse-edu .codeverse-tab {
  min-height: 44px;
  background: var(--cve-card);
  border-color: var(--cve-border);
  color: var(--cve-text);
}

.is-codeverse-edu .codeverse-tab:hover {
  border-color: var(--cve-accent);
  color: var(--cve-text);
}

.is-codeverse-edu .codeverse-tab.is-active {
  background: var(--cve-yellow);
  border-color: transparent;
  color: #1a1606;
  box-shadow: 0 6px 18px rgba(255, 200, 61, 0.3);
}

.codeverse-tab:focus-visible {
  outline: 3px solid var(--cve-accent);
  outline-offset: 3px;
}

/* Painel */
.cve {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  width: min(1100px, 92%);
  margin: 1.2rem auto 4rem;
  color: var(--cve-text);
}

.cve ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cve-card {
  background: var(--cve-card);
  border: 1px solid var(--cve-border);
  border-radius: 1.1rem;
  box-shadow: var(--cve-shadow);
}

.cve-icon {
  width: 24px;
  height: 24px;
  flex: none;
}

.cve-title {
  margin: 0 0 0.7rem;
  font-family: var(--font-body);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: none;
  text-align: left;
  color: var(--cve-accent);
}

.cve-title--center {
  text-align: center;
  margin-bottom: -0.4rem;
}

/* Apresentação principal: texto + logo */
.cve-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem 2.5rem;
  padding: 1.5rem 0;
}

.cve-intro-copy {
  border-left: 5px solid #ffc83d;
  padding-left: 1.4rem;
}

.cve-intro-title {
  margin: 0 0 0.7rem;
  font-family: var(--font-body);
  font-size: clamp(1.65rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
  text-align: left;
  text-transform: none;
  color: var(--cve-text);
}

.cve-intro-title span {
  display: block;
  color: var(--cve-accent);
}

.cve-intro-text {
  margin: 0 0 1.5rem;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--cve-soft);
}

.cve-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.cve-intro-actions .cve-btn--primary {
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
}

.cve-btn--outline,
.cve-btn--outline:visited {
  border: 2px solid var(--cve-accent);
  background: transparent;
  color: var(--cve-text);
}

.cve-btn--outline .cve-icon {
  color: var(--cve-accent);
}

.cve-intro-logo {
  justify-self: center;
  width: min(380px, 100%);
  height: auto;
  filter: drop-shadow(0 14px 34px color-mix(in oklab, var(--cve-accent) 28%, transparent));
}

/* Sobre o projeto: ícone + título | divisor | texto */
.cve-about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
  align-items: center;
  scroll-margin-top: 1rem;
}

.cve-about-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 1.8rem;
}

.cve-about-head .cve-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.1;
}

.cve-about-icon {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
}

.cve-about-book {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 52px;
  color: var(--cve-accent);
}

.cve-about-star {
  position: absolute;
  top: -8px;
  left: 20px;
  width: 24px;
  height: 24px;
  color: #ffc83d;
}

.cve-about-text {
  padding: 1.6rem 1.8rem;
  border-left: 1px solid var(--cve-border);
}

.cve-about-text p {
  margin: 0 0 0.85rem;
  color: var(--cve-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.cve-about-text p:last-child {
  margin-bottom: 0;
}

.cve-about-text strong {
  color: var(--cve-text);
}

.cve a:focus-visible {
  outline: 3px solid var(--cve-yellow);
  outline-offset: 3px;
}

/* Galeria "Veja o app funcionando" */
.cve-app {
  margin: 0; /* anula o "section { margin: 6.25rem auto }" global */
}

.cve-app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.3rem;
}

.cve-shot {
  margin: 0;
}

.cve-shot--wide {
  grid-column: 1 / -1;
}

.cve-shot a {
  display: block;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--cve-border);
  box-shadow: var(--cve-shadow);
  transition: transform 0.2s ease;
}

.cve-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.cve-shot a:hover {
  transform: translateY(-2px);
}

.cve-shot figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--cve-soft);
}

/* Indicadores */
.cve-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.cve-stat {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.1rem;
  color: var(--cve-text);
  font-weight: 600;
  line-height: 1.25;
}

.cve-stat > .cve-icon {
  width: 30px;
  height: 30px;
  color: var(--cve-accent);
}

.cve-stat strong {
  font-size: 1.15rem;
}

.cve-stat small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--cve-soft);
}

.cve-stat--status {
  border-color: color-mix(in oklab, var(--cve-success) 60%, transparent);
}

.cve-stat--status > .cve-icon {
  color: var(--cve-success);
}

/* Recursos */
.cve-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

/* Ícone e título na mesma linha; descrição e selo ocupam a largura toda abaixo */
.cve-feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-content: start;
  column-gap: 0.8rem;
  padding: 1.1rem 1.15rem 1.2rem;
}

.cve-feature > p,
.cve-feature > .cve-badge {
  grid-column: 1 / -1;
}

.cve-feature-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--cve-accent) 14%, transparent);
  color: var(--cve-accent);
}

.cve-feature h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--cve-heading-alt);
}

.cve-feature p {
  margin: 0.7rem 0 0;
  color: var(--cve-soft);
  font-size: 0.94rem;
  line-height: 1.5;
}

.cve-badge {
  justify-self: start;
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cve-heading-alt);
}

/* Tripulação */
.cve-subtitle {
  margin: 0 auto;
  max-width: 62ch;
  text-align: center;
  color: var(--cve-soft);
  line-height: 1.55;
}

.cve-crew {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.8rem;
}

.cve-crew-card {
  padding: 0.7rem 0.55rem 1rem;
  text-align: center;
  background: #151d42;
  border-color: rgba(110, 168, 255, 0.3);
}

.cve-crew-card img {
  display: block;
  width: 100%;
  max-width: 146px;
  height: auto;
  margin: 0 auto 0.45rem;
}

.cve-crew-card h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.cve-crew-card p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: #c3cdec;
}

.cve-crew-link {
  margin: -0.6rem 0 0;
  text-align: center;
}

.cve-crew-link a,
.cve-crew-link a:visited {
  color: var(--cve-accent);
  font-weight: 700;
  text-underline-offset: 0.2rem;
}

/* Chamada final */
.cve-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding-top: 0.6rem;
  text-align: center;
}

.cve-cta p {
  margin: 0;
  max-width: 62ch;
  color: var(--cve-soft);
  line-height: 1.6;
}

.cve-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
}

.cve-btn,
.cve-btn:visited {
  box-sizing: border-box; /* min-height de 48px inclui o padding (área de toque sem inflar o botão) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cve-btn--primary,
.cve-btn--primary:visited {
  padding: 1rem 2.6rem;
  background: #ffc83d;
  color: #1a1606;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  box-shadow: 0 8px 26px rgba(255, 200, 61, 0.35);
}

.cve-btn--ghost,
.cve-btn--ghost:visited {
  border: 1px solid var(--cve-border);
  background: var(--cve-card);
  color: var(--cve-text);
}

.cve-btn:hover {
  transform: translateY(-2px);
}

@media (max-width: 960px) {
  .cve-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cve-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cve-crew {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .cve-intro {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 0.5rem;
  }

  .cve-intro-logo {
    width: min(260px, 70%);
  }

  .cve-about {
    grid-template-columns: minmax(0, 1fr);
  }

  .cve-about-head {
    padding: 1.2rem 1.15rem 0;
  }

  .cve-about-text {
    padding: 1rem 1.15rem 1.2rem;
    border-left: 0;
  }

  .is-codeverse-edu .codeverse-tab {
    padding: 0.6rem 1rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 560px) {
  .cve {
    width: min(1100px, 94%);
    gap: 1.4rem;
  }

  /* Abertura */
  .cve-intro {
    gap: 1.1rem;
    padding: 0.25rem 0 0.75rem;
  }

  .cve-intro-copy {
    padding-left: 1rem;
  }

  .cve-intro-text {
    margin-bottom: 1.1rem;
  }

  .cve-intro-logo {
    width: min(210px, 58%);
  }

  .cve-intro-actions .cve-btn,
  .cve-cta-buttons .cve-btn {
    width: 100%;
  }

  /* Sobre o projeto */
  .cve-about-head {
    padding: 1.15rem 1.1rem 0;
  }

  .cve-about-text {
    padding: 0.85rem 1.1rem 1.15rem;
  }

  .cve-about-text p {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  /* Capturas: uma por linha para dar para ler as telas */
  .cve-app-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .cve-shot--phone {
    width: min(300px, 100%);
    margin: 0 auto;
  }

  /* Indicadores */
  .cve-stat {
    padding: 0.8rem 0.85rem;
    gap: 0.6rem;
  }

  .cve-stat > .cve-icon {
    width: 24px;
    height: 24px;
  }

  /* Tripulação: 3 centralizados + 4 (grade de 8 colunas, cada card ocupa 2) */
  .cve-crew {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.55rem 0.4rem;
  }

  .cve-crew-card {
    grid-column: span 2;
    padding: 0.5rem 0.25rem 0.7rem;
  }

  .cve-crew-card:first-child {
    grid-column: 2 / span 2;
  }

  .cve-crew-card img {
    margin-bottom: 0.3rem;
  }

  .cve-crew-card h3 {
    font-size: 0.92rem;
  }

  .cve-crew-card p {
    font-size: 0.72rem;
    line-height: 1.3;
  }
}

/* Tela estreita demais para 4 cards legíveis: 3 + 3 + 1 centralizado */
@media (max-width: 345px) {
  .cve-crew {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cve-crew-card,
  .cve-crew-card:first-child {
    grid-column: auto;
  }

  .cve-crew-card:last-child {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* "Conhecer o projeto" pula direto, sem rolagem animada */
  html:has(body.codeverse-page) {
    scroll-behavior: auto;
  }

  .cve-shot a,
  .cve-btn {
    transition: none;
  }

  .cve-shot a:hover,
  .cve-btn:hover {
    transform: none;
  }
}

/* Aba CodeVerse Python 2025: fundo azul-escuro inspirado na capa do J.A.R.V.I.S. (só no tema escuro) */
:root:not([data-theme="light"]) body.codeverse-page[data-codeverse-tab="2025"] {
  --bg: #050f18;
  --surface: #0a1824;
  --card: #0a1621;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(34, 211, 238, 0.08), transparent 70%);
}

/* ====== CodeVerse: ajustes gerais (abas, aba ativa, ampliação, botões flutuantes) ====== */
/* Aba ativa também sublinhada: não depende só da cor */
.codeverse-tab.is-active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Ampliação das capturas (<dialog>) */
.cve-lightbox {
  width: min(96vw, 1100px);
  max-height: 94vh;
  padding: 0.75rem;
  border: 1px solid rgba(110, 168, 255, 0.35);
  border-radius: 1rem;
  background: #0b1026;
  color: #eef2ff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.cve-lightbox::backdrop {
  background: rgba(3, 6, 20, 0.82);
}

.cve-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 7rem);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 0.6rem;
}

.cve-lightbox-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 0 0.5rem auto;
  border: 1px solid rgba(110, 168, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.cve-lightbox-close:focus-visible {
  outline: 3px solid #ffc83d;
  outline-offset: 3px;
}

.cve-lightbox-caption {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: #c3cdec;
}

@media (max-width: 560px) {
  /* Abas sempre numa linha */
  .codeverse-page .codeverse-tabs {
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .codeverse-page .codeverse-tab {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* Abaixo de ~420px o nome completo não cabe: a aba do meio vira "Python 2025" (aria-label mantém o nome completo) */
@media (max-width: 419px) {
  .codeverse-page .codeverse-tab {
    padding: 0.5rem 0.45rem;
    font-size: clamp(0.72rem, 3.4vw, 0.84rem);
  }

  .codeverse-tab-prefix {
    display: none;
  }
}

@media (max-width: 700px) {
  /* Botões flutuantes compactos, respeitando a área segura do aparelho */
  .courses-page .cta-contact {
    left: calc(12px + env(safe-area-inset-left));
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
  }

  .courses-page .cta-contact-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .courses-page .cta-contact-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .courses-page .btn-home {
    right: calc(12px + env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
  }

  /* Espaço no fim para os botões não cobrirem o rodapé */
  .courses-page .site-footer {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
  }
}

/* ====== Tecnologias (home) no celular: logos e rótulos sempre dentro do card ====== */
@media (max-width: 768px) {
  #tech-content .tech-card {
    min-width: 0;
  }

  #tech-content .tech-card img,
  #tech-content .tech-card-languages img,
  #tech-content .tech-card-tools img {
    box-sizing: border-box; /* o padding do "chip" branco conta dentro da largura */
    max-width: 100% !important;
  }

  #tech-content .tech-card-label,
  #tech-content .tech-grid-languages .tech-card:nth-child(n) .tech-card-label {
    max-width: 100% !important; /* anula os limites fixos antigos (55px, Python 50px, JavaScript 38px) */
    word-break: normal !important; /* evitava "MARKDOW N" e "JAVASC RIPT": só quebra entre palavras */
    overflow-wrap: normal;
  }
}

/* Celular: 4 por linha em linguagens e ferramentas (7 e 5 deixavam logos e rótulos sem espaço).
   Grade de 8 colunas com cada card ocupando 2, para centralizar a última linha incompleta. */
@media (max-width: 480px) {
  #tech-content .tech-grid-languages,
  #tech-content .tech-grid-tools {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }

  #tech-content .tech-grid-languages .tech-card,
  #tech-content .tech-grid-tools .tech-card {
    grid-column: span 2;
  }

  /* Primeiro card de uma última linha com 3, 2 ou 1 card: desloca para centralizar */
  #tech-content .tech-grid-languages .tech-card:nth-child(4n + 1):nth-last-child(3),
  #tech-content .tech-grid-tools .tech-card:nth-child(4n + 1):nth-last-child(3) {
    grid-column: 2 / span 2;
  }

  #tech-content .tech-grid-languages .tech-card:nth-child(4n + 1):nth-last-child(2),
  #tech-content .tech-grid-tools .tech-card:nth-child(4n + 1):nth-last-child(2) {
    grid-column: 3 / span 2;
  }

  #tech-content .tech-grid-languages .tech-card:nth-child(4n + 1):last-child,
  #tech-content .tech-grid-tools .tech-card:nth-child(4n + 1):last-child {
    grid-column: 4 / span 2;
  }
}

/* ====== Capa v3 (home): cenário + foto + mesa + cartão à esquerda, texto à direita ======
   Ordem de trás para frente: fundo (.hero-photo-layer) -> foto -> mesa -> cartão -> texto.
   .hero-stage não cria camada própria (sem z-index/transform), então foto, mesa e cartão
   se intercalam dentro da camada do .cinematic-content. A mesa ocupa a largura da tela. */
#home .hero-layout {
  --layout-w: min(1180px, 92vw);
  /* Proporções medidas na imagem de referência: mesa fina (~13% da altura, o notebook do fundo
     fica apoiado nela) e foto ~1,8x a altura da tela, de modo que o tampo passe na altura da
     perna cruzada (42% da foto) e os pés fiquem abaixo da borda da capa. */
  --desk-h: clamp(80px, 13svh, 140px);
  --photo-h: min(147.6svh, 94vw); /* reduzida 2x 10% a pedido */
  --stage-left: calc((100vw - var(--layout-w)) / 2);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  width: var(--layout-w);
  max-width: none;
  margin: 0 auto;
  padding: 0;
  flex: 1 1 auto;
  text-align: left;
}

#home .hero-stage {
  position: relative;
  min-height: 0;
}

/* Foto maior que a área: a parte de baixo (pés e base da cadeira) sai pela borda e fica atrás da mesa */
#home .hero-visual-photo {
  position: absolute;
  z-index: 1;
  /* celular na mão por volta de 45% da largura da tela, como na referência */
  left: calc(46.5vw - 0.47 * var(--photo-h) - var(--stage-left));
  /* o tampo da mesa cai a 42% da altura da foto (perna cruzada): pés, tênis e base da
     cadeira ficam atrás da mesa e fora da capa */
  bottom: calc(var(--desk-h) - 0.58 * var(--photo-h));
  width: auto;
  max-width: none;
  height: var(--photo-h);
  pointer-events: none;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.5));
}

#home .hero-desk {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: calc((100vw - var(--layout-w)) / -2);
  width: 100vw;
  height: var(--desk-h);
  pointer-events: none;
}

#home .hero-desk {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

#home .hero-desk img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  /* tampo escuro e brilhante como na referência (a imagem original é grafite claro) */
  filter: brightness(0.5) saturate(1.4);
}

/* Reflexos: azul sob o cartão, dourado sob o notebook, e tom azul-marinho escurecendo para a frente */
#home .hero-desk::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 13% 95% at 14% 0%, rgba(56, 160, 255, 0.38), transparent 70%),
    radial-gradient(ellipse 22% 95% at 84% 0%, rgba(255, 178, 80, 0.3), transparent 70%),
    linear-gradient(to bottom, rgba(60, 100, 170, 0.2) 0%, rgba(5, 10, 25, 0.35) 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* Cartão holográfico apoiado sobre o tampo, na frente da foto, sem cobrir o rosto */
#home .hero-visual-card {
  position: absolute;
  z-index: 3;
  left: calc(2.6vw - var(--stage-left));
  bottom: calc(var(--desk-h) * 0.7);
  /* reduzido 23% a pedido (antes: clamp(170px, min(26vw, 40svh), 380px)) */
  width: clamp(131px, min(20vw, 30.8svh), 293px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.35));
}

/* Notebook à direita, apoiado no tampo (mesma camada do cartão: na frente da mesa, atrás do texto).
   A ponta direita sai um pouco da tela, como na referência. */
#home .hero-notebook {
  position: absolute;
  z-index: 3;
  left: calc(67vw - var(--stage-left));
  bottom: calc(var(--desk-h) * 0.6);
  width: min(42vw, 88svh);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55));
}

#home .hero-copy {
  position: relative;
  z-index: 4;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  /* título a ~18% da altura (referência); não acompanha a cabeça para o bloco não descer
     sobre a perna cruzada. Limitado para (~22rem) terminar acima da mesa em telas baixas. */
  padding: max(1rem, min(10svh, calc(100svh - var(--desk-h) - 5rem - 22rem))) 0 0;
  text-align: left;
}

#home .hero-copy .hero-title {
  margin: 0 0 0.3rem;
  font-size: clamp(2.6rem, 5.2vw, 4.8rem);
  line-height: 1.05;
  text-align: left;
}

/* Profissão em branco, menor, com uma linha dourada abaixo */
#home .hero-copy .hero-subtitle {
  margin: 0 0 0.9rem;
  max-width: none;
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-transform: none;
  text-align: left;
  color: var(--text);
  -webkit-text-fill-color: currentColor;
}

#home .hero-copy .hero-subtitle::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 0.85rem;
  border-radius: 2px;
  background: var(--gold);
}

#home .hero-copy .hero-value {
  margin: 0.9rem 0 1.5rem;
  max-width: 46ch;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: clamp(1.02rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  text-align: left;
  color: color-mix(in oklab, var(--text) 82%, var(--text-soft) 18%);
}

#home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.hero-btn,
.hero-btn:visited {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-btn .cgs-icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.hero-btn--primary,
.hero-btn--primary:visited {
  background: linear-gradient(135deg, #e9c45c 0%, var(--gold) 100%);
  color: #14181f;
  box-shadow: 0 8px 22px rgba(193, 154, 58, 0.3);
}

.hero-btn--ghost,
.hero-btn--ghost:visited {
  border: 1.5px solid color-mix(in oklab, var(--text) 55%, transparent);
  background: transparent;
  color: var(--text);
}

.hero-btn:hover {
  transform: translateY(-2px);
}

.hero-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Ícones sociais menores, para não competir com os botões */
#home .hero-copy .hero-social-row {
  justify-content: flex-start;
  width: auto;
  margin: 0;
}

#home .hero-copy .social-icon img {
  width: 34px;
  height: 34px;
}

/* Fundo novo (escritório com mesa e notebook) só no tema escuro; no claro segue o fundo claro.
   Ancorado embaixo; os cristais flutuantes saem para limpar a cena. */
:root:not([data-theme="light"]) #home .hero-photo-layer {
  /* cópia do fundo sem o notebook original: o notebook agora é uma imagem separada (.hero-notebook) */
  background-image: url("../images/hero-escritorio-sem-notebook.webp");
  background-position: center bottom;
}

:root:not([data-theme="light"]) #home .hero-ornament-fore {
  display: none;
}

/* Celular/tablet: a mesa da frente fica sob a foto, então a mesa do próprio fundo sai de vista
   (fundo ampliado e ancorado no topo) para não parecerem duas mesas */
@media (max-width: 900px) {
  :root:not([data-theme="light"]) #home .hero-photo-layer {
    background-size: auto 130%;
    background-position: 25% top;
  }
}

/* ===== Cabeçalho da home: marca à esquerda, links à direita (desktop) ===== */
.nav-brand {
  display: none;
}

/* leão antes do nome; em em para acompanhar o tamanho da fonte da marca */
.nav-brand-logo {
  width: 1.75em;
  height: 1.75em;
  margin-right: 0.45em;
  vertical-align: middle;
  filter: drop-shadow(0 2px 6px rgba(212, 180, 71, 0.35));
}

.nav-brand:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

@media (min-width: 769px) {
  #home > nav,
  .courses-page header.banner > nav {
    margin-top: clamp(0.6rem, 2svh, 1.1rem);
    gap: 1.5rem;
    width: min(1180px, 92vw);
    margin-left: auto;
    margin-right: auto;
    padding: 0.4rem 0.65rem 0.4rem 1.4rem;
    border: 1px solid color-mix(in oklab, var(--gold) 28%, var(--border) 72%);
    border-radius: 0.9rem;
    background: var(--topbar-bg);
    backdrop-filter: blur(8px) saturate(120%);
    box-sizing: border-box;
  }

  #home .nav-brand,
  .courses-page header.banner .nav-brand {
    display: inline-block;
    flex: none;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gold);
  }

  #home .navegacao,
  .courses-page header.banner .navegacao {
    position: static;
    justify-content: flex-end;
    width: auto;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
  }
}

/* Telas médias (769–1100px): menu compacto para marca + 6 links + tema caberem numa linha */
@media (min-width: 769px) and (max-width: 1100px) {
  #home > nav {
    gap: 0.9rem;
    padding-left: 1rem;
  }

  #home .nav-brand {
    font-size: 0.95rem;
  }

  #home .navegacao {
    column-gap: 0.85rem;
  }

  #home .navegacao_link {
    font-size: 0.74rem;
    letter-spacing: 0.04rem;
  }

  /* botão de tema só com o ícone (o texto continua no aria-label do botão) */
  #home .theme-toggle #theme-label {
    display: inline-block;
    width: 1.2em;
    overflow: hidden;
    white-space: nowrap;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  #home .nav-brand {
    display: none;
  }
}

/* O indicador de rolagem ficaria em cima da mesa; o link "Sobre mim" do menu já leva à seção */
@media (min-width: 901px) {
  #home .scroll-cue {
    display: none;
  }
}

/* Desktop: botões e ícones na escala da referência */
@media (min-width: 1101px) {
  #home .hero-actions .hero-btn {
    min-height: 52px;
    padding: 0.85rem 1.8rem;
    font-size: 1.05rem;
  }

  #home .hero-copy .social-icon img {
    width: 38px;
    height: 38px;
  }
}

/* Notebook pequeno (901–1100px): a foto é limitada pela largura, então o texto fica um pouco
   menor e sobe, para terminar acima da mesa */
@media (min-width: 901px) and (max-width: 1100px) {
  #home .hero-copy {
    padding-top: min(12svh, max(1rem, calc(100svh - var(--desk-h) - 0.42 * var(--photo-h) - 6rem)));
  }

  #home .hero-copy .hero-title {
    font-size: clamp(2.4rem, 4.2vw, 3rem);
  }

  #home .hero-copy .hero-subtitle {
    font-size: 1.4rem;
  }

  #home .hero-copy .hero-value {
    margin: 0.7rem 0 1.1rem;
    font-size: 1rem;
  }
}

/* Celular/tablet: uma coluna; o palco tem altura própria com a mesa na base dele */
@media (max-width: 900px) {
  #home .hero-layout {
    --layout-w: min(560px, 92vw);
    /* faixa larga como na referência mobile: ~0,63 da largura, mesa fina na base */
    --stage-h: clamp(210px, calc(var(--layout-w) * 0.63), 350px);
    --desk-h: calc(var(--stage-h) * 0.14);
    --photo-h: calc(var(--stage-h) * 1.95);
    grid-template-columns: minmax(0, 1fr);
    /* empilha do topo: sem isso a sobra de altura da capa vira buracos entre imagem e texto */
    align-content: start;
    padding-top: 0.9rem;
    padding-bottom: 2.5rem;
    text-align: center;
  }

  #home .hero-stage {
    height: var(--stage-h);
    /* corta só embaixo: o que passa da mesa (base da cadeira, pés) não invade o texto,
       mas a mesa continua ocupando a largura da tela pelas laterais */
    clip-path: inset(-100vh -100vw 0 -100vw);
  }

  /* foto grande à esquerda; tampo a 42% da foto (pés atrás da mesa) e cabeça perto do topo */
  #home .hero-visual-photo {
    left: -6%;
    bottom: calc(var(--desk-h) - 0.58 * var(--photo-h));
    height: var(--photo-h);
  }

  /* mesa centrada no palco (que fica no meio da tela) e mais larga que a tela: o recuo lateral
     da capa não deixa falta de mesa na esquerda; o excesso é cortado pela capa */
  #home .hero-desk {
    left: 50%;
    width: 110vw;
    margin-left: -55vw;
  }

  /* notebook à direita, atrás do cartão; cartão à direita da foto, apoiado na mesa */
  #home .hero-notebook {
    left: 56%;
    bottom: calc(var(--desk-h) * 0.45);
    width: 50%;
  }

  #home .hero-visual-card {
    z-index: 4;
    left: auto;
    right: 4%;
    bottom: calc(var(--desk-h) * 0.55);
    width: 27%;
  }

  #home .hero-copy {
    align-items: center;
    padding: 1.5rem 0 0;
    text-align: center;
  }

  #home .hero-copy .hero-title,
  #home .hero-copy .hero-subtitle,
  #home .hero-copy .hero-value {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  #home .hero-copy .hero-title {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  #home .hero-copy .hero-subtitle {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
  }

  #home .hero-copy .hero-subtitle::after {
    margin-left: auto;
    margin-right: auto;
  }


  #home .hero-actions {
    justify-content: center;
  }

  #home .hero-copy .hero-social-row {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  #home .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  #home .hero-actions .hero-btn {
    width: 100%;
  }
}

/* ====== Sobre mim: foto de pé + três blocos + indicadores ======
   Classes novas (about-*) para não disputar com as regras antigas do celular (com !important);
   .container-sobre, .stats e .stat-number continuam por causa das animações em script.js. */
#sobre .container-sobre {
  width: min(1100px, 92%) !important;
  max-width: none !important;
  margin: 0 auto !important;
}

#sobre .about-card {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem clamp(1.5rem, 4vw, 2.75rem);
  width: 100%;
}

#sobre .about-photo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 320px;
  margin: 0;
  padding: 1rem 1rem 0;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--gold) 42%, var(--border) 58%);
  border-radius: 1rem;
  background:
    radial-gradient(ellipse 70% 60% at 50% 35%, color-mix(in oklab, var(--primary) 30%, transparent), transparent 75%),
    color-mix(in oklab, var(--card) 85%, transparent);
}

#sobre .about-photo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 330px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
}

#sobre .about-blocks {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

#sobre .about-block {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 0.9rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid color-mix(in oklab, var(--gold) 22%, transparent);
}

#sobre .about-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

#sobre .about-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in oklab, var(--gold) 45%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, var(--gold) 10%, transparent);
  color: var(--gold);
}

#sobre .about-icon .cgs-icon {
  width: 22px;
  height: 22px;
}

#sobre .about-block h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
  text-transform: none;
  color: var(--gold);
}

#sobre .about-block p {
  max-width: none;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: left;
  color: var(--text-soft);
}

#sobre .about-block strong {
  color: var(--text);
}

#sobre .stats.about-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.9rem !important;
  width: 100% !important;
  max-width: none !important;
  margin: 1.5rem 0 0 !important;
  padding: 0 !important;
  place-items: stretch !important; /* regra antiga do celular centralizava e encolhia os cards */
}

#sobre .about-stats .stat-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 1rem 0.6rem !important;
  border: 1px solid color-mix(in oklab, var(--gold) 35%, var(--border) 65%);
  border-radius: 0.9rem !important;
  background: color-mix(in oklab, var(--card) 85%, transparent);
}

#sobre .about-stats .stat-number {
  font-size: clamp(1.8rem, 4vw, 2.6rem) !important;
  color: var(--gold);
}

#sobre .about-stats .stat-label {
  font-size: 0.9rem !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  white-space: normal !important;
}

@media (max-width: 760px) {
  #sobre .about-card {
    grid-template-columns: minmax(0, 1fr);
  }

  #sobre .about-photo {
    justify-self: center;
    width: min(260px, 100%);
    min-height: 0;
  }

  #sobre .about-photo img {
    height: 270px;
  }

  #sobre .about-stats .stat-item {
    padding: 0.85rem 0.4rem !important;
  }

  #sobre .about-stats .stat-label {
    font-size: 0.8rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-btn {
    transition: none;
  }

  .hero-btn:hover {
    transform: none;
  }
}

/* O reset.css não é carregado pelas páginas: sem isto o body fica com a margem padrão de 8px
   (moldura escura em volta da capa e 8px de rolagem horizontal) */
body {
  margin: 0;
}

/* ====== Capa: dourado no tom do leão do cartão (tema escuro) ======
   Medido na arte do cartão: âmbar #CB7A11 -> dourado #EDB23F -> brilho #FFE9A6.
   No tema claro segue o dourado escuro do site, que tem contraste com o fundo claro. */
:root:not([data-theme="light"]) .courses-page header.banner > nav {
  --lion-gold: #edb23f;
}

:root:not([data-theme="light"]) #home {
  --lion-gold: #edb23f;
  --lion-gold-gradient: linear-gradient(180deg, #ffe9a6 0%, #f2bf4c 48%, #cb7a11 100%);
}

/* Nome com degradê metálico; o brilho vira drop-shadow (text-shadow cobriria o degradê).
   O degradê vai nas letras (.split-char, criadas pela animação) ou no h1 quando ele não é
   dividido (movimento reduzido); nunca nos dois, senão o recorte do h1 empilha as letras. */
:root:not([data-theme="light"]) #home .hero-copy .hero-title:not(.split-title),
:root:not([data-theme="light"]) #home .hero-copy .hero-title .split-char {
  background: var(--lion-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

:root:not([data-theme="light"]) #home .hero-copy .hero-title.split-title {
  background: none;
  text-shadow: none;
}

:root:not([data-theme="light"]) #home .hero-copy .hero-title {
  filter: drop-shadow(0 2px 12px rgba(203, 122, 17, 0.35));
}

/* o efeito glitch usa cópias do texto em ::before/::after: mantém a cor própria delas */
:root:not([data-theme="light"]) #home .hero-copy .hero-title::before,
:root:not([data-theme="light"]) #home .hero-copy .hero-title::after {
  -webkit-text-fill-color: currentColor;
}

:root:not([data-theme="light"]) #home .hero-copy .hero-subtitle::after {
  background: linear-gradient(90deg, #ffe39a 0%, var(--lion-gold) 55%, #cb7a11 100%);
}

:root:not([data-theme="light"]) #home .nav-brand,
:root:not([data-theme="light"]) .courses-page header.banner .nav-brand {
  color: var(--lion-gold);
}

:root:not([data-theme="light"]) #home .hero-btn--primary,
:root:not([data-theme="light"]) #home .hero-btn--primary:visited {
  background: linear-gradient(135deg, #ffe39a 0%, var(--lion-gold) 45%, #cb7a11 100%);
  color: #1a1206;
  box-shadow: 0 8px 24px rgba(237, 178, 63, 0.35);
}

/* Ícones sociais (PNG pretos recoloridos por filtro): cadeias calculadas para #EDB23F e #FFD36E */
:root:not([data-theme="light"]) #home .social-icon img {
  filter: brightness(0) saturate(100%) invert(29%) sepia(5%) saturate(5416%) hue-rotate(0deg) brightness(258%) contrast(86%) drop-shadow(0 0 10px rgba(237, 178, 63, 0.5));
}

:root:not([data-theme="light"]) #home .social-icon img:hover {
  filter: brightness(0) saturate(100%) invert(70%) sepia(62%) saturate(295%) hue-rotate(1deg) brightness(101%) contrast(112%) drop-shadow(0 0 14px rgba(255, 211, 110, 0.7));
}

/* ====== Home no celular (referência mobile): cabeçalho compacto e "Sobre mim" em cards ======
   Só #home e larguras pequenas; o desktop não é afetado. */
@media (max-width: 768px) {
  /* barra: marca à esquerda, tema + menu à direita; acima do conteúdo da capa (z 7) para o
     menu aberto não ficar atrás da foto */
  #home > nav,
  .courses-page header.banner > nav {
    z-index: 20;
    width: min(560px, 92vw);
    margin: 0.6rem auto 0;
    padding: 0.35rem 0.4rem 0.35rem 1rem !important;
    border: 1px solid color-mix(in oklab, var(--gold) 30%, var(--border) 70%);
    border-radius: 0.85rem;
    background: var(--topbar-bg);
    box-sizing: border-box;
  }

  #home .nav-brand,
  .courses-page header.banner .nav-brand {
    display: inline-block;
    order: 0;
    margin-right: auto;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--gold);
  }

  #home .theme-toggle,
  .courses-page header.banner .theme-toggle {
    order: 1;
    width: 2.75rem !important;
    height: 2.75rem !important;
    margin: 0 !important;
  }

  #home .menu-toggle,
  .courses-page header.banner .menu-toggle {
    order: 2;
    width: 2.75rem !important;
    height: 2.75rem !important;
  }
}

@media (max-width: 760px) {
  /* foto dentro do 1º card, os outros dois embaixo; a lista vira "transparente" para os
     itens entrarem na mesma grade da foto (role="list" no HTML mantém a semântica) */
  #sobre .about-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }

  #sobre .about-blocks {
    display: contents;
  }

  #sobre .about-photo {
    grid-row: 1;
    grid-column: 1;
    z-index: 1;
    justify-self: start;
    align-self: center;
    width: 84px;
    min-height: 0;
    height: 104px;
    margin-left: 0.85rem;
    padding: 0.35rem 0.35rem 0;
  }

  /* recorte de rosto e tronco (sem distorcer) para caber no quadro pequeno */
  #sobre .about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 6%;
  }

  #sobre .about-block,
  #sobre .about-block:last-child {
    padding: 0.95rem 1rem;
    border: 1px solid color-mix(in oklab, var(--gold) 30%, var(--border) 70%);
    border-radius: 0.9rem;
    background: color-mix(in oklab, var(--card) 85%, transparent);
  }

  #sobre .about-block:first-child {
    grid-row: 1;
    grid-column: 1;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    min-height: 120px;
    padding-left: calc(84px + 1.7rem);
  }

  #sobre .about-block:first-child .about-icon {
    display: none;
  }

  #sobre .about-block p {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  /* indicadores numa caixa só, com divisórias, como na referência */
  #sobre .stats.about-stats {
    gap: 0 !important;
    border: 1px solid color-mix(in oklab, var(--gold) 30%, var(--border) 70%);
    border-radius: 0.9rem;
    background: color-mix(in oklab, var(--card) 85%, transparent);
    overflow: hidden;
  }

  #sobre .about-stats .stat-item {
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
  }

  #sobre .about-stats .stat-item + .stat-item {
    border-left: 1px solid color-mix(in oklab, var(--gold) 25%, var(--border) 75%) !important;
  }
}

/* Botões flutuantes compactos na página inicial (mesmo padrão já usado no CodeVerse) */
@media (max-width: 700px) {
  body:has(> #home) .cta-contact {
    left: calc(12px + env(safe-area-inset-left));
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
  }

  body:has(> #home) .cta-contact-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  body:has(> #home) .btn-home {
    right: calc(12px + env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
  }
}

/* telas muito estreitas: indicadores ficam um abaixo do outro */
@media (max-width: 340px) {
  #sobre .stats.about-stats {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #sobre .about-stats .stat-item + .stat-item {
    border-left: 0 !important;
    border-top: 1px solid color-mix(in oklab, var(--gold) 25%, var(--border) 75%) !important;
  }
}

/* ====== Movimento e transições suaves (todas as páginas) ======
   Só opacidade e transform/translate. "translate" (propriedade própria) não briga com os
   transform: translateY() dos hovers já existentes nem com o GSAP. */
:root {
  --ease-out-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Cores de botões, links e ícones mudam suave no hover/foco; :where não pesa na especificidade,
   então qualquer transition já definida continua valendo. Sem transform/opacity aqui: o GSAP
   anima esses dois nos ícones da capa. */
:where(a, button, .social-icon img, .navegacao_link) {
  transition-property: color, background-color, border-color, box-shadow, text-decoration-color, filter;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

/* Revelação ao rolar (classes postas pelo script.js; sem JS nada fica escondido) */
.reveal-pending {
  opacity: 0;
}

.reveal-in {
  animation: cgs-reveal 0.5s var(--ease-out-soft) var(--reveal-delay, 0ms) both;
}

@keyframes cgs-reveal {
  from {
    opacity: 0;
    translate: 0 16px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* AOS com deslocamentos curtos (o padrão da biblioteca é 100px e zoom de 60%).
   Seletor duplo vence o do AOS, mas perde para o .aos-animate dele (estado final). */
[data-aos="fade-up"][data-aos="fade-up"] {
  transform: translate3d(0, 24px, 0);
}

[data-aos="fade-left"][data-aos="fade-left"] {
  transform: translate3d(24px, 0, 0);
}

[data-aos="fade-right"][data-aos="fade-right"] {
  transform: translate3d(-24px, 0, 0);
}

[data-aos="zoom-in-up"][data-aos="zoom-in-up"] {
  transform: translate3d(0, 24px, 0) scale(0.96);
}

[data-aos="zoom-in"][data-aos="zoom-in"] {
  transform: scale(0.96);
}

/* Troca de tema: só enquanto o script marca a troca (nunca no carregamento) */
html.theme-fading,
html.theme-fading *,
html.theme-fading *::before,
html.theme-fading *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, fill 0.3s ease, stroke 0.3s ease !important;
}

/* Cards que ainda não tinham hover: leve elevação e borda dourada (só com mouse) */
@media (hover: hover) and (pointer: fine) {
  .cve-feature,
  .cve-crew-card,
  .cve-stat {
    transition: transform 0.25s var(--ease-out-soft), border-color 0.25s ease, box-shadow 0.25s ease;
  }

  .cve-feature:hover,
  .cve-crew-card:hover,
  .cve-stat:hover {
    transform: translateY(-3px);
    border-color: color-mix(in oklab, var(--gold) 55%, var(--cve-border, var(--border)) 45%);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22), 0 0 18px rgba(193, 154, 58, 0.16);
  }
}

/* Toque: retorno breve ao pressionar (celular/tablet) */
@media (hover: none) {
  :is(.hero-btn, .link_game, .cve-btn, .codeverse-tab, .codeverse-filter-btn, .codeverse-cta-btn,
    .codeverse-card-btn--primary, .codeverse-card-btn--ghost, .theme-toggle, .menu-toggle,
    .social-icon, .navegacao_link, #filter-clear, .footer-contact-link):active {
    transform: scale(0.96);
  }

  :is(.video-text-container, .tech-card, .stat-item, .codeverse-card, .galeria_cursos a,
    .cve-shot a, .cve-feature, .cve-crew-card):active {
    transform: scale(0.985);
  }
}

/* Voltar ao topo: a seta sobe um pouco ao ser acionada */
.btn-home:active img {
  transform: translateY(-4px);
}

/* Menu mobile: abre/fecha com fade curto. Onde o navegador não anima display, abre e fecha
   na hora, como antes. */
@media (max-width: 768px) {
  .navegacao {
    opacity: 0;
    translate: 0 -6px;
    transition: opacity 0.2s ease, translate 0.2s var(--ease-out-soft), display 0.2s allow-discrete !important;
  }

  .navegacao.active {
    opacity: 1;
    translate: 0 0;
  }

  @starting-style {
    .navegacao.active {
      opacity: 0;
      translate: 0 -6px;
    }
  }

  /* "X" do botão: as linhas do mobile são menores (2px, 0,24rem de vão), então o deslocamento
     do X padrão (feito para 3px/0,4rem) deixava as linhas desencontradas */
  .menu-toggle.active .line:nth-child(1) {
    transform: translateY(calc(0.24rem + 2px)) rotate(45deg);
  }

  .menu-toggle.active .line:nth-child(3) {
    transform: translateY(calc(-0.24rem - 2px)) rotate(-45deg);
  }
}

/* Cartão holográfico: flutua 4px bem devagar (só desktop; no celular ele fica apoiado na mesa) */
@media (min-width: 901px) {
  #home .hero-visual-card {
    animation: cgs-card-float 7s ease-in-out 3s infinite;
    /* inclinação 3D com o mouse (script.js, como nos cards de jogos): o cartão passa a receber
       o mouse só no desktop, onde não fica em cima de nenhum link ou botão */
    pointer-events: auto;
    -webkit-user-drag: none;
    user-select: none;
  }
}

@keyframes cgs-card-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #home .hero-visual-card,
  .reveal-in {
    animation: none;
  }

  .navegacao {
    translate: none !important;
    transition: none !important;
  }

  .cve-feature:hover,
  .cve-crew-card:hover,
  .cve-stat:hover,
  .btn-home:active img {
    transform: none;
  }

  #tech-content .tech-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ====== Tema claro: fundo, seções e cards em camadas (só [data-theme="light"]) ======
   As cores vêm das variáveis do tema claro no topo do arquivo; aqui só se troca o branco fixo
   das regras antigas por essas variáveis. O tema escuro não é tocado. */

/* Títulos principais em azul-marinho; ícones, indicadores e detalhes seguem dourados */
[data-theme="light"] .container-sobre > h2,
[data-theme="light"] #tech-content > h2,
[data-theme="light"] #projetos > h2,
[data-theme="light"] .column h2,
[data-theme="light"] #sobre .about-block h3,
[data-theme="light"] .project-name {
  color: var(--heading);
}

/* Cabeçalho e menu */
[data-theme="light"] .navegacao_link {
  color: var(--heading);
}

[data-theme="light"] .navegacao_link:hover,
[data-theme="light"] .navegacao_link.active {
  color: var(--gold);
}

[data-theme="light"] .theme-toggle,
[data-theme="light"] .courses-page .theme-toggle {
  background: var(--card);
  color: var(--heading);
}

@media (max-width: 768px) {
  [data-theme="light"] .navegacao {
    background: var(--card) !important;
    box-shadow: 0 18px 34px rgba(24, 52, 77, 0.18), 0 0 0 1px rgba(138, 96, 0, 0.12) inset !important;
  }

  [data-theme="light"] .navegacao_link {
    background: var(--surface) !important;
  }

  [data-theme="light"] .menu-toggle {
    background: var(--card) !important;
  }
}

/* Sobre mim: bloco principal bege, cards e indicadores em branco quente */
[data-theme="light"] #sobre {
  background: linear-gradient(160deg, var(--surface) 0%, #efebe3 100%);
}

[data-theme="light"] #sobre .about-photo {
  background:
    radial-gradient(ellipse 70% 60% at 50% 35%, rgba(46, 95, 138, 0.14), transparent 75%),
    var(--card);
}

[data-theme="light"] #sobre .stat-item {
  background: var(--card);
}

@media (max-width: 760px) {
  [data-theme="light"] #sobre .about-block,
  [data-theme="light"] #sobre .about-stats {
    background: var(--card) !important;
  }
}

/* Tecnologias: seção bege com brilho dourado; cards claros para os logos */
[data-theme="light"] #tech-content {
  background:
    radial-gradient(circle at 50% -14%, rgba(138, 96, 0, 0.12) 0%, rgba(138, 96, 0, 0) 42%),
    linear-gradient(130deg, var(--surface) 0%, #efebe3 100%);
}

[data-theme="light"] #tech-content .tech-card {
  background: linear-gradient(160deg, #fdfcfa 0%, var(--card) 100%);
  border-color: color-mix(in oklab, var(--border) 80%, var(--gold) 20%);
  box-shadow: 0 6px 14px rgba(24, 52, 77, 0.08);
}

/* Jogos: fundo azul mantido, cards em branco quente (antes cinza) */
[data-theme="light"] .meus_jogos_container__jogo {
  background: var(--card);
}

[data-theme="light"] .meus_jogos_container__jogo h2 {
  color: var(--heading);
  -webkit-text-stroke-width: 0;
}

/* Projetos: cards brancos quentes sobre o fundo azul-acinzentado */
[data-theme="light"] #projetos {
  background: linear-gradient(180deg, var(--bg) 0%, #e2e8ee 100%);
}

[data-theme="light"] .video-text-container {
  background: var(--card);
  border-color: color-mix(in oklab, var(--border) 85%, var(--gold) 15%);
  box-shadow: 0 8px 20px rgba(24, 52, 77, 0.08);
}

[data-theme="light"] .project-chip {
  background: var(--surface);
}

[data-theme="light"] .text-container1 p a,
[data-theme="light"] .text-container2 p a {
  color: var(--gold);
}

/* Cursos: cabeçalho, listas, destaques e filtros nas mesmas camadas */
[data-theme="light"] header.banner > #tech-content,
[data-theme="light"] .courses-page header.banner > #tech-content {
  background: linear-gradient(160deg, var(--surface) 0%, #efebe3 100%);
}

[data-theme="light"] .courses-page .galeria1 {
  background: var(--card);
  border-color: var(--border);
}

/* as bordas que esmaecem a faixa de logos precisam ter a cor do fundo dela */
[data-theme="light"] .courses-page .galeria1::before {
  background: linear-gradient(90deg, var(--card) 0%, transparent 100%);
}

[data-theme="light"] .courses-page .galeria1::after {
  background: linear-gradient(270deg, var(--card) 0%, transparent 100%);
}

/* Logos FAT e Alura são brancos (somem no fundo claro): pintados de azul-marinho #18344D */
[data-theme="light"] .courses-page .galeria1 img:is([alt="FAT"], [alt="Alura"]) {
  filter: brightness(0) saturate(100%) invert(49%) sepia(27%) saturate(1967%) hue-rotate(175deg) brightness(28%) contrast(88%);
}

/* Ada (verde-limão) e Potência Tech (branco + laranja) têm cores da marca feitas para fundo
   escuro: em vez de repintar, o cartão delas fica azul-marinho e as cores originais se mantêm */
[data-theme="light"] .courses-page .galeria1 a:has(img:is([alt="Ada Tech"], [alt="Potência Tech"], [alt="IBSEC"])) {
  background: var(--heading);
  border-color: color-mix(in oklab, var(--heading) 70%, var(--gold) 30%);
}

[data-theme="light"] .galeria_cursos a,
[data-theme="light"] .courses-page .galeria_cursos a,
[data-theme="light"] .column,
[data-theme="light"] .courses-featured,
[data-theme="light"] .filters {
  background: var(--card);
  border-color: color-mix(in oklab, var(--border) 85%, var(--gold) 15%);
}

[data-theme="light"] #filter-clear {
  background-color: var(--gold);
  border-color: var(--gold);
}

/* Rodapé bege com linha dourada discreta no topo */
[data-theme="light"] .site-footer {
  background: var(--surface);
  border-top-color: color-mix(in oklab, var(--border) 70%, var(--gold) 30%);
}

/* ====== Cursos: faixa de logos das instituições ====== */
/* Univesp (texto cinza fino) e Escola Virtual Gov / IFRS (imagens com fundo branco próprio):
   cartão branco nos dois temas e sem o brilho dourado do tema claro, que embaçava o texto */
.courses-page .galeria1 a:has(img:is([alt="Univesp"], [alt="Escola Virtual Gov"], [alt="IFRS"])) {
  background: #fff;
}

.courses-page .galeria1 img:is([alt="Univesp"], [alt="Escola Virtual Gov"], [alt="IFRS"]) {
  filter: none;
}

/* O SVG da Alura não declara tamanho próprio; sem a proporção ele some (0x0) no celular */
.courses-page .galeria1 img[alt="Alura"] {
  aspect-ratio: 106 / 32;
  height: 35px;
  width: auto;
}

/* Desktop: mesma largura da caixa de filtros (seção de certificados: min(1580px, 96%) menos 1rem de cada lado) */
@media (min-width: 769px) {
  .courses-page .galeria1 {
    box-sizing: border-box;
    width: calc(min(1580px, 96%) - 2rem);
  }
}
