/* ==========================================================================
   PORTFÓLIO — ALISON ROCHA
   Estrutura do arquivo:
   1. Reset & variáveis (design tokens)
   2. Utilitários base (container, botões, textos)
   3. Cursor customizado (HUD/reticle) + barra de progresso
   4. Header / navegação
   5. Hero (grid animado, partículas, terminal digitando)
   6. Seção "Sobre mim"
   7. Seção "Projetos"
   8. Seção "Contato / Redes sociais"
   9. Rodapé + botão voltar ao topo
   10. Animações on-scroll (reveal)
   11. Responsividade (mobile-first)
   12. Acessibilidade (prefers-reduced-motion)
   ========================================================================== */

/* ---------- 1. RESET & VARIÁVEIS ---------- */
:root {
  /* Paleta — tema "IDE escura" */
  --bg: #05070d;
  --bg-elev: #0d111c;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --text: #edeff7;
  --text-dim: #8991a6;
  --accent: #47f0c0;        /* mint/teal — ação primária */
  --accent-2: #b18aff;      /* violeta — apoio / gradientes */
  --accent-rgb: 71, 240, 192;
  --accent-2-rgb: 177, 138, 255;

  /* Tipografia */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --container-w: 1180px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* , *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

::selection { background: var(--accent); color: #05070d; }

/* ---------- 2. UTILITÁRIOS BASE ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 120px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015) 15%, rgba(255,255,255,0.015) 85%, transparent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 18px;
}

.section-subtitle {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 0 48px;
  font-size: 1.05rem;
}

.gradient-text {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* Botões — transições um pouco mais lentas para um hover mais suave */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 0.5s var(--ease);
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #04140f;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -10px rgba(var(--accent-rgb), 0.45);
}
.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.08);
}
.btn-small { padding: 10px 20px; font-size: 0.85rem; }

/* ---------- 3. CURSOR CUSTOMIZADO (HUD/RETICLE) + BARRA DE PROGRESSO ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Cursor tecnológico: ponto central com brilho + radar/mira em SVG que
   gira continuamente. Ao passar sobre algo clicável, a mira "trava o
   alvo": fecha, gira mais rápido e muda de cor com um leve glow. */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s;
}
.cursor-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(var(--accent-rgb), 0.75);
  z-index: 99999;
  transition: opacity 0.2s, background 0.35s, box-shadow 0.35s;
}
.cursor-ring {
  width: 48px; height: 48px;
  z-index: 99998;
  --cursor-color: var(--accent);
  transition: opacity 0.2s, filter 0.35s var(--ease);
}
.cursor-ring.is-active {
  --cursor-color: var(--accent-2);
  filter: drop-shadow(0 0 7px rgba(var(--accent-2-rgb), 0.6));
}

.cursor-svg {
  width: 100%;
  height: 100%;
  display: block;
  animation: cursor-rotate 7s linear infinite;
  transition: transform 0.4s var(--ease);
}
.cursor-ring.is-active .cursor-svg {
  transform: scale(0.58) rotate(90deg);
  animation-duration: 1.6s;
}

.cursor-dash {
  fill: none;
  stroke: var(--cursor-color);
  stroke-width: 1.4;
  stroke-dasharray: 5 9;
  transition: stroke 0.35s var(--ease), stroke-dasharray 0.35s var(--ease);
}
.cursor-ring.is-active .cursor-dash { stroke-dasharray: 2 4; }

.cursor-tick {
  stroke: var(--cursor-color);
  stroke-width: 2.2;
  stroke-linecap: round;
  transition: stroke 0.35s var(--ease);
}

@keyframes cursor-rotate { to { transform: rotate(360deg); } }

/* Só ativa o cursor customizado (e some com o cursor nativo) em telas com
   mouse de precisão. IMPORTANTE: o "*" garante que o cursor do sistema não
   volte a aparecer sobre cards, botões ou imagens. */
@media (pointer: fine) {
  .cursor-dot, .cursor-ring { opacity: 1; }
  *, *::before, *::after { cursor: none !important; }
}

/* ---------- 4. HEADER / NAVEGAÇÃO ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(5, 7, 13, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.logo-prompt { color: var(--accent); }
.logo-blink { animation: blink 1.1s steps(2) infinite; color: var(--accent-2); }

.nav-links {
  display: flex;
  gap: 4px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-dim);
  transition: color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav-link:hover, .nav-link.is-active {
  color: var(--text);
  background: var(--surface);
}
.nav-link.is-active { color: var(--accent); }

.nav-cta { margin-left: 4px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  z-index: 501;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle 480px at var(--mx, 50%) var(--my, 30%), rgba(0,0,0,0.9), transparent 75%);
  mask-image: radial-gradient(circle 480px at var(--mx, 50%) var(--my, 30%), rgba(0,0,0,0.9), transparent 75%);
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  animation: drift linear infinite;
}
.hero-particles span:nth-child(3n) { background: var(--accent-2); }

@keyframes drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-120vh); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  padding: 60px 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
}
.reveal-line { display: block; }

.hero-subtitle {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 480px;
  margin: 0 0 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Terminal (elemento-assinatura) */
.terminal {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02);
  backdrop-filter: blur(10px);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.tf-dot { width: 10px; height: 10px; border-radius: 50%; }
.tf-red { background: #ff5f57; }
.tf-yellow { background: #febc2e; }
.tf-green { background: #28c840; }
.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.terminal-body {
  margin: 0;
  padding: 26px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.7;
  color: #d7f7ec;
  min-height: 260px;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-cursor {
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  z-index: 2;
}
.scroll-hint-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--accent), transparent);
  animation: scroll-line 1.8s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- 6. SOBRE MIM ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 72px;
  align-items: center;
}

.about-visual { position: relative; justify-self: center; }

.avatar-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius-lg);
  padding: 3px;
  background: conic-gradient(from var(--spin, 0deg), var(--accent), var(--accent-2), var(--accent));
  animation: spin-border 6s linear infinite;
}
@keyframes spin-border { to { --spin: 360deg; } }

/* Wrapper que recorta o zoom da foto ao passar o mouse */
.avatar-inner {
  border-radius: calc(var(--radius-lg) - 3px);
  overflow: hidden;
  aspect-ratio: 3/3.5;
  background: var(--bg-elev);
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.avatar-frame:hover .avatar-img {
  transform: scale(1.08);
}
.avatar-badge {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.5);
}

.about-text {
  color: var(--text-dim);
  margin: 0 0 18px;
  max-width: 560px;
}

.stats-row {
  display: flex;
  gap: 40px;
  margin: 36px 0;
  flex-wrap: wrap;
}
.stat { font-family: var(--font-display); }
.stat-number, .stat-suffix {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.skills { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  color: var(--text-dim);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.45s var(--ease), transform 0.45s var(--ease), color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
/* Sintaxe de tag de código: <HTML5/> — reforça a identidade "dev" dos chips */
.skill-chip::before,
.skill-chip::after {
  color: var(--accent-2);
  opacity: 0.65;
  transition: opacity 0.45s var(--ease), color 0.45s var(--ease);
}
.skill-chip::before { content: '<'; margin-right: 3px; }
.skill-chip::after { content: '/>'; margin-left: 3px; }
/* Brilho diagonal que "escaneia" o chip no hover */
.skill-chip { background-position: -120% 0; }
.skill-chip {
  background-image: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    linear-gradient(115deg, transparent 40%, rgba(var(--accent-rgb), 0.18) 50%, transparent 60%);
  background-size: 100% 100%, 220% 100%;
  background-repeat: no-repeat;
  background-position: 0 0, -120% 0;
}
.skill-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.6);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -14px rgba(var(--accent-rgb), 0.5);
  background-position: 0 0, 120% 0;
  transition: border-color 0.45s var(--ease), transform 0.45s var(--ease), color 0.45s var(--ease),
    box-shadow 0.45s var(--ease), background-position 0.7s var(--ease);
}
.skill-chip:hover::before,
.skill-chip:hover::after {
  opacity: 1;
  color: var(--accent);
}

/* ---------- 7. PROJETOS ---------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.filter-btn.is-active {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #04140f;
  border-color: transparent;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

/* Cada card é um <a> — o card inteiro leva direto ao site ao vivo */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease-out, box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
  transform-style: preserve-3d;
  perspective: 800px;
}
.project-card:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 30px 60px -25px rgba(var(--accent-2-rgb), 0.25);
}
.project-card.is-hidden { display: none; }

.project-media { overflow: hidden; aspect-ratio: 16/10.5; }
.project-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.project-card:hover .project-media img { transform: scale(1.06); }

.project-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 10px;
}
.project-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0 0 16px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease), background 0.4s var(--ease);
}
.project-tags span::before { content: '<'; color: var(--accent-2); opacity: 0.65; margin-right: 2px; }
.project-tags span::after { content: '/>'; color: var(--accent-2); opacity: 0.65; margin-left: 2px; }
.project-card:hover .project-tags span {
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.06);
}
.project-link {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  position: relative;
  align-self: flex-start;
}
.project-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}
.project-card:hover .project-link::after { width: 100%; }

/* ---------- 8. CONTATO / REDES SOCIAIS ---------- */
.contact-inner { text-align: center; }
.contact-inner .section-subtitle { margin-left: auto; margin-right: auto; }
.contact-inner .eyebrow { justify-content: center; }

.email-copy {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  padding: 18px 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 56px;
  transition: border-color 0.45s var(--ease), transform 0.45s var(--ease);
}
.email-copy:hover { border-color: rgba(var(--accent-rgb), 0.5); transform: translateY(-2px); }
.email-copy-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-body);
}

/* Cards de redes sociais — só ícone + usuário, sem o nome da rede escrito */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.social-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(10px);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.social-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.06);
}
.social-card-whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.55);
  background: rgba(37, 211, 102, 0.08);
}
.social-card-whatsapp:hover .social-icon { color: #25d366; }
.social-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: var(--accent);
}
.social-icon svg { width: 22px; height: 22px; }
.social-handle { font-size: 0.92rem; font-weight: 500; font-family: var(--font-mono); }

/* ---------- 9. RODAPÉ + BOTÃO VOLTAR AO TOPO ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s;
  z-index: 400;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent); }

/* ---------- 10. ANIMAÇÕES ON-SCROLL (REVEAL) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 11. RESPONSIVIDADE (MOBILE-FIRST — ajustes para telas maiores) ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { margin-bottom: 20px; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .site-header.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(5,7,13,0.97);
    backdrop-filter: blur(16px);
    padding: 20px 24px 30px;
    border-bottom: 1px solid var(--border);
  }
  .site-header.menu-open .nav-cta {
    display: inline-flex;
    margin: 0 24px 24px;
  }
  .nav-toggle { display: flex; }

  .section { padding: 80px 0; }
  .stats-row { gap: 26px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .terminal-body { min-height: 220px; font-size: 0.82rem; }
}

/* O cursor customizado só faz sentido com mouse de precisão; em telas
   touch, o cursor nativo do sistema volta a funcionar normalmente. */
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- 12. ACESSIBILIDADE ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .cursor-dot, .cursor-ring { display: none; }
  body, *, *::before, *::after { cursor: auto !important; }
}