/* Cyberpunk Neon Theme */
:root {
  --bg-0: #0a0a0a;
  --bg-1: #0d0d0d;
  --bg-2: #121212;
  --text: #f0f0f0;
  --muted: #bdbdbd;
  --neon-pink: #ffffff; /* sem cor: tudo PB */
  --neon-blue: #ffffff;
  --neon-purple: #ffffff;
  --neon-cyan: #ffffff;
  --glass: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-0));
  color: var(--text);
  font-family: "Rajdhani", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  overflow-x: hidden;
}
html { scroll-behavior: smooth; }

/* Splash / Preloader */
.splash { position: fixed; inset: 0; background: #0a0a0b; display: grid; place-items: center; z-index: 1000; transition: opacity 500ms ease, visibility 500ms ease; }
.splash-inner { display: flex; gap: 12px; align-items: baseline; opacity: 0; transform: translateY(8px); animation: splashIn 800ms ease forwards; }
.splash-brand { font-family: "Orbitron", sans-serif; font-size: clamp(22px, 4vw, 42px); color: #e7e7e7; letter-spacing: 0.06em; text-shadow: 0 0 12px rgba(255,255,255,0.28); }
.splash-sub { font-family: "Rajdhani", sans-serif; font-size: clamp(18px, 3vw, 28px); color: #bfbfbf; opacity: 0.9; }
@keyframes splashIn { to { opacity: 1; transform: translateY(0); } }
.splash.hidden { opacity: 0; visibility: hidden; }

.neon-text { font-family: "Orbitron", sans-serif; letter-spacing: 0.02em; text-transform: uppercase; }
.neon-text span { color: var(--neon-pink); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(7,9,12,0.9), rgba(7,9,12,0.6) 60%, rgba(7,9,12,0));
  backdrop-filter: blur(8px);
}
.nav { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.nav .brand { font-size: 18px; color: #ffffff; text-shadow: 0 0 8px rgba(255,255,255,0.4), 0 0 16px rgba(255,255,255,0.2); }
.nav ul { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; }
.nav a { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 8px; position: relative; }
.nav a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; background: linear-gradient(90deg, #fff, #bfbfbf); opacity: 0; transform: scaleX(0.3); transition: 200ms ease; filter: drop-shadow(0 0 6px rgba(255,255,255,0.45)); }
.nav a:hover::after, .nav a:focus-visible::after { opacity: 1; transform: scaleX(1); }

.section { position: relative; padding: 96px 20px; }
.section .container { max-width: 1100px; margin: 0 auto; position: relative; }
.section .container.tight { max-width: 1000px; }
.section-title { font-size: 28px; margin: 0 0 12px; }
.about-title-center { text-align: center; }
.section-subtitle { margin: 0 0 36px; color: var(--muted); }
.section-title-wrap { display: flex; align-items: center; gap: 10px; }
.title-icon { color: #bfbfbf; opacity: 1; transition: opacity 200ms ease, transform 200ms ease; display: inline-flex; }
.title-icon:hover { opacity: 1; transform: translateY(-1px); }
.section-title-wrap .section-title { color: #bfbfbf; }

/* Backgrounds */
.section.hero { min-height: 88vh; display: grid; place-items: center; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); overflow: clip; }
.section.hero .container { text-align: center; padding: 48px 0; }
#particles-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero .container > * { position: relative; z-index: 1; }
/* Particulas reutilizaveis em secoes */
.particles-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.projects .container > * { position: relative; z-index: 1; }

.title { font-size: clamp(38px, 8vw, 84px); line-height: 1.05; margin: 0 0 8px; text-shadow: 0 0 16px rgba(255,255,255,0.18), 0 0 28px rgba(255,255,255,0.12); }
.hero .title { color: #bfbfbf; }
.hero .title.neon-text span { color: #bfbfbf; }
.subtitle { font-size: clamp(16px, 2.6vw, 22px); color: var(--muted); margin: 0 0 14px; }
.description { max-width: 680px; margin: 0 auto 24px; color: var(--text); opacity: 0.9; }

.cta { display: inline-flex; gap: 12px; }
.btn { cursor: pointer; user-select: none; border: 1px solid var(--border); color: var(--text); background: rgba(255,255,255,0.04); padding: 10px 16px; border-radius: 12px; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(255,255,255,0.22), 0 0 24px rgba(255,255,255,0.12) inset; }
.btn:active { transform: translateY(0); }
.btn-primary { background: transparent; border-color: var(--border); box-shadow: none; color: inherit; }
.btn-ghost { background: transparent; }
.btn-link { background: transparent; border: none; padding: 6px 0; color: #ffffff; text-shadow: 0 0 6px rgba(255,255,255,0.35); }

/* Projects */
.section.projects { background: linear-gradient(180deg, var(--bg-1), var(--bg-0)); }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.10); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { box-shadow: 0 0 24px rgba(255,255,255,0.22), 0 0 24px rgba(255,255,255,0.12) inset; transform: translateY(-1px); border-color: rgba(255,255,255,0.35); }
.card h4 { margin: 0 0 8px; font-family: "Orbitron", sans-serif; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card a[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

/* 3D */
.section.interactive3d { background: var(--bg-0); }
.three-container { height: clamp(320px, 60vh, 580px); border-radius: 0; border: none; background: transparent; position: relative; overflow: hidden; }
.three-container iframe.three-embed { width: 100%; height: 100%; display: block; border: 0; border-radius: inherit; position: relative; z-index: 1; }
/* 3D colorido (sem PB) */
.three-container, .three-container iframe.three-embed { filter: none; }
/* masks para ocultar topbar e timeline do Sketchfab */
.three-mask-top, .three-mask-bottom { position: absolute; left: -2px; right: -2px; pointer-events: none; z-index: 3; }
.three-mask-top { top: 0; height: clamp(90px, 13vh, 180px); background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-0) 60%, rgba(0,0,0,0) 100%); }
.three-mask-bottom { bottom: 0; height: clamp(100px, 15vh, 200px); background: linear-gradient(0deg, var(--bg-0) 0%, var(--bg-0) 60%, rgba(0,0,0,0) 100%); }
.three-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--muted); background: linear-gradient(180deg, rgba(10,14,23,0.3), rgba(10,11,16,0.3)); }
.hint { color: var(--muted); margin-top: 10px; }
.three-caption { margin-top: 12px; font-family: "Orbitron", sans-serif; text-transform: uppercase; letter-spacing: 0.08em; color: #ffffff; text-shadow: 0 0 10px rgba(255,255,255,0.25); text-align: center; cursor: pointer; pointer-events: auto; }

/* Inline runner abaixo da legenda */
.egg-inline { margin: 8px auto 0; width: 100%; max-width: 1100px; height: 240px; background: #0f0f0f; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; overflow: hidden; position: relative; }
.egg-inline canvas { width: 100%; height: 100%; display: block; }
.egg-inline .hud { position: absolute; top: 6px; left: 10px; font-family: "Orbitron", sans-serif; font-size: 12px; color: #f0f0f0; text-shadow: 0 1px 0 rgba(0,0,0,0.6); }

/* Easter Egg - Game Boy Overlay (preto e branco) */
.egg-overlay { position: fixed; inset: 0; display: none; place-items: center; background: rgba(0,0,0,0.9); z-index: 10000; }
.egg-overlay.visible { display: grid; }
.egg-gb { position: relative; width: min(92vw, 860px); aspect-ratio: 10 / 14; background: linear-gradient(180deg, #e5e5e5, #cfcfcf); border-radius: 24px 24px 80px 24px; box-shadow: 0 24px 60px rgba(0,0,0,0.7), inset 0 0 0 2px rgba(255,255,255,0.35); padding: 22px; }
.egg-gb .bezel { position: absolute; inset: 18px 18px auto 18px; height: 58%; border-radius: 16px; background: linear-gradient(180deg, #222, #111); box-shadow: inset 0 0 0 2px #000, 0 6px 18px rgba(0,0,0,0.6); }
.egg-gb .screen { position: absolute; left: 50%; top: 28%; transform: translate(-50%, -50%); width: 80%; height: 46%; background: #f2f2f2; border-radius: 8px; box-shadow: inset 0 0 0 4px #111; overflow: hidden; }
.egg-gb canvas.egg-canvas { width: 100%; height: 100%; display: block; }
.egg-gb .logo { position: absolute; top: calc(58% + 8px); left: 24px; font-family: "Orbitron", sans-serif; font-weight: 700; color: #5a5a5a; letter-spacing: 0.08em; }
.egg-gb .hud { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); font-family: "Orbitron", sans-serif; font-size: 12px; color: #111; text-shadow: none; }
.egg-gb .controls { position: absolute; bottom: 24px; right: 24px; display: flex; gap: 14px; }
.egg-btn { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #f4f4f4, #bdbdbd 60%, #8a8a8a); box-shadow: inset 0 4px 6px rgba(255,255,255,0.35), inset 0 -6px 10px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.45); border: none; cursor: pointer; }
.egg-gb .meta { position: absolute; bottom: 26px; left: 24px; display: flex; gap: 12px; align-items: center; }
.egg-pill { padding: 8px 12px; border-radius: 999px; background: #6b6e72; color: #fff; font-size: 12px; border: 1px solid rgba(0,0,0,0.3); box-shadow: inset 0 2px 0 rgba(255,255,255,0.2); }
.egg-close { position: absolute; top: 10px; right: 10px; background: transparent; border: 0; color: #222; cursor: pointer; font-size: 18px; }

.egg-hint { position: absolute; top: 8px; right: 8px; color: #6b6b6b; font-size: 12px; }

/* Dock inferior do mini-jogo */
.egg-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; justify-items: center; padding: 8px; pointer-events: none; }
.egg-dock .dock-toggle { pointer-events: auto; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); color: #f0f0f0; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-family: "Orbitron", sans-serif; }
.egg-dock .dock-inner { pointer-events: auto; width: min(680px, 96vw); background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; margin-top: 8px; padding: 8px; box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
.egg-dock .dock-screen { position: relative; height: 200px; background: #f2f2f2; border-radius: 8px; overflow: hidden; }
.egg-dock .dock-screen canvas { width: 100%; height: 100%; display: block; }
.egg-dock .dock-hud { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-family: "Orbitron", sans-serif; font-size: 12px; color: #111; }
.egg-dock .dock-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.btn.small { padding: 6px 10px; font-size: 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.06); color: var(--text); cursor: pointer; }

/* About */
.section.about { background: var(--bg-0); }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; position: relative; }
.about-text p { margin-top: 0; }
.about-text.readable { background: transparent; padding: 0; backdrop-filter: none; }
.tech-cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 24px; margin-top: 14px; opacity: 0.28; pointer-events: none; }
.tech-cloud span { color: #d0d0d0; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; text-shadow: 0 1px 0 rgba(255,255,255,0.02); font-size: clamp(16px, 2.6vw, 34px); animation: floatA 9s ease-in-out infinite alternate; }
.tech-cloud span:nth-child(3n) { font-size: clamp(20px, 3.2vw, 40px); opacity: 0.95; animation-duration: 11s; }
.tech-cloud span:nth-child(4n) { font-size: clamp(14px, 2.1vw, 24px); opacity: 0.85; animation-duration: 7s; }
.tech-cloud span:nth-child(5n) { animation-name: floatLeftRot; animation-duration: 8s; }
.tech-cloud span:nth-child(6n) { animation-name: floatRightRot; animation-duration: 10s; }
.tech-cloud span:nth-child(odd) { animation-delay: .3s; }
.tech-cloud span:nth-child(3n+2) { animation-delay: .6s; }
.tech-cloud span:nth-child(5n+1) { animation-delay: 1.1s; }

@keyframes floatA { from { transform: translateY(0); } to { transform: translateY(-6px); } }
@keyframes floatLeftRot { from { transform: translateY(2px) rotate(-1deg); } to { transform: translateY(-6px) translateX(-6px) rotate(-1deg); } }
@keyframes floatRightRot { from { transform: translateY(-2px) rotate(1deg); } to { transform: translateY(6px) translateX(6px) rotate(1deg); } }
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.skills li { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.10); border-radius: 12px; padding: 8px 10px; color: #d0d0d0; }
.mini-card { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(77,208,255,0.25); text-align: center; }
.mini-card .label { color: var(--muted); font-size: 12px; }
.mini-card .value { font-family: "Orbitron", sans-serif; letter-spacing: 0.06em; color: var(--neon-pink); }

/* Contact */
.section.contact { background: var(--bg-0); }
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.glass { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); backdrop-filter: blur(8px); }
.form-row { display: grid; gap: 6px; margin-bottom: 10px; }
label { font-size: 14px; color: var(--muted); }
input, textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text); font: inherit; }
.form-actions { display: flex; justify-content: flex-end; }
.form-status { margin-top: 8px; min-height: 20px; color: var(--neon-blue); }
.socials { display: grid; gap: 10px; }

.site-footer { border-top: 1px solid rgba(255,255,255,0.08); background: var(--bg-0); }
.site-footer .container { max-width: 1100px; margin: 0 auto; padding: 16px 20px; color: var(--muted); }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 500ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Parallax */
[data-parallax] { transform: translateY(var(--parallax-y, 0px)); will-change: transform; }

/* Responsive */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav ul { gap: 10px; }
  .section { padding: 72px 16px; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* Scrollbar translucida */
html { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.45) transparent; }
/* Chrome/Edge/Safari */
::-webkit-scrollbar { width: 10px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.45);
  border-radius: 8px;
  border: 2px solid rgba(0,0,0,0);
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.6); }

/* Breakpoints dedicados para o viewer 3D */
@media (max-width: 639px) {
  .three-container { height: 56vh; }
  .three-mask-top { height: 120px; }
  .three-mask-bottom { height: 150px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .three-container { height: 60vh; }
  .three-mask-top { height: 140px; }
  .three-mask-bottom { height: 170px; }
}
@media (min-width: 1024px) and (max-width: 1439px) {
  .three-container { height: 62vh; }
  .three-mask-top { height: 160px; }
  .three-mask-bottom { height: 190px; }
}
@media (min-width: 1440px) {
  .three-container { height: 64vh; }
  .three-mask-top { height: 180px; }
  .three-mask-bottom { height: 210px; }
}


/* Acessibilidade: reduzir movimentos */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .btn, .nav a::after { transition: none; }
  [data-parallax] { transform: none !important; }
}


