:root {
  --bg: #05060a;
  --bg-2: #0a0c14;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #e9edf5;
  --muted: #8d96aa;
  --cyan: #5ef0ff;
  --violet: #8b5cff;
  --lime: #c6ff5e;
  --grad: linear-gradient(100deg, #5ef0ff 0%, #8b5cff 55%, #ff5ecb 100%);
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, canvas, svg { display: block; max-width: 100%; }
::selection { background: var(--violet); color: #fff; }

/* fundo: grade + brilho que segue o cursor */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.55;
}
.glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 620px; height: 620px; border-radius: 50%;
  left: 0; top: 0;
  background: radial-gradient(circle, rgba(139, 92, 255, 0.16), rgba(94, 240, 255, 0.05) 45%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
}

.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* navegação */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: 0.02em; }
.brand svg { width: 38px; height: 38px; }
.brand span small { display: block; font: 500 10px var(--mono); color: var(--muted); letter-spacing: 0.22em; }
.logo-path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.8s 0.2s cubic-bezier(0.6, 0, 0.2, 1) forwards; }
.logo-dot { opacity: 0; animation: pop 0.5s 1.7s forwards; transform-origin: center; transform-box: fill-box; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.menu { display: flex; align-items: center; gap: 34px; font-size: 15px; }
.menu a { color: var(--muted); position: relative; transition: color 0.2s; }
.menu a:hover, .menu a.on { color: var(--text); }
.menu a.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
  background: var(--grad); border-radius: 2px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px;
  font: 600 15px var(--sans); color: #05060a !important;
  background: var(--grad); background-size: 180% 100%;
  transition: background-position 0.5s, transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 0 0 rgba(139, 92, 255, 0);
}
.btn:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 10px 40px rgba(139, 92, 255, 0.35); }
.btn.ghost { background: transparent; color: var(--text) !important; border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--cyan); box-shadow: 0 0 30px rgba(94, 240, 255, 0.15); }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.burger i { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px auto; transition: transform 0.3s, opacity 0.3s; }

/* hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; }
#cosmos { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px; z-index: -1;
  background: linear-gradient(transparent, var(--bg));
}
.tag {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px var(--mono); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan); padding: 8px 14px; border: 1px solid rgba(94, 240, 255, 0.25);
  border-radius: 999px; background: rgba(94, 240, 255, 0.05);
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
h1 {
  font-size: clamp(44px, 8.2vw, 112px); line-height: 0.98; letter-spacing: -0.04em;
  font-weight: 700; margin: 28px 0 26px; max-width: 12ch;
}
.hero p.lead { font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); max-width: 56ch; }
.hero p.lead b { color: var(--text); font-weight: 500; }
.typed { color: var(--cyan); font-family: var(--mono); }
.typed::after { content: "▍"; animation: pulse 1s steps(1) infinite; margin-left: 2px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }
.scroll-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font: 500 11px var(--mono); letter-spacing: 0.3em; color: var(--muted); }
.scroll-hint::after { content: ""; display: block; width: 1px; height: 44px; margin: 10px auto 0; background: linear-gradient(var(--cyan), transparent); animation: drop 2s infinite; }
@keyframes drop { 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; } }

/* seções */
section { padding: 110px 0; position: relative; }
.eyebrow { font: 500 12px var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--violet); margin-bottom: 16px; }
.eyebrow::before { content: "// "; color: var(--muted); }
h2 { font-size: clamp(32px, 4.6vw, 58px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; max-width: 18ch; }
.sub { color: var(--muted); max-width: 60ch; margin-top: 18px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 56px; }
.more { font: 500 14px var(--mono); color: var(--cyan); }
.more::after { content: " →"; transition: margin 0.2s; }
.more:hover::after { margin-left: 6px; }

/* faixa */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 20px 0; background: rgba(255, 255, 255, 0.015); }
.marquee div { display: flex; gap: 56px; width: max-content; animation: slide 38s linear infinite; font: 500 13px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.marquee span::before { content: "◆"; color: var(--violet); margin-right: 56px; font-size: 9px; vertical-align: middle; }
@keyframes slide { to { transform: translateX(-50%); } }

/* números */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.stat { background: var(--bg); padding: 34px 28px; }
.stat b { display: block; font-size: clamp(36px, 4.4vw, 58px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.stat span { display: block; margin-top: 12px; color: var(--muted); font-size: 14px; }

/* sobre */
.about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.about p { color: var(--muted); margin-top: 20px; }
.about p b { color: var(--text); font-weight: 500; }
.orb { position: relative; aspect-ratio: 1; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.orb canvas { width: 100%; height: 100%; }
.orb figcaption { position: absolute; left: 20px; bottom: 16px; font: 500 11px var(--mono); letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; }

/* cartões */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, box-shadow 0.4s;
  transform-style: preserve-3d; display: flex; flex-direction: column;
}
.card:hover { border-color: rgba(94, 240, 255, 0.4); box-shadow: 0 30px 80px -30px rgba(139, 92, 255, 0.45); }
.card .art { aspect-ratio: 16 / 10; background: var(--bg-2); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.card .art canvas { width: 100%; height: 100%; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card:hover .art canvas { transform: scale(1.06); }
.card .art .status { position: absolute; top: 14px; left: 14px; }
.status { font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; background: rgba(5, 6, 10, 0.7); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.status.live { color: var(--lime); border-color: rgba(198, 255, 94, 0.35); }
.status.beta { color: var(--cyan); border-color: rgba(94, 240, 255, 0.35); }
.status.build { color: #ffb45e; border-color: rgba(255, 180, 94, 0.35); }
.status.next { color: var(--muted); }
.card .body { padding: 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card h3 { font-size: 23px; letter-spacing: -0.02em; line-height: 1.2; }
.card p { color: var(--muted); font-size: 15.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.chips li { list-style: none; font: 500 11px var(--mono); color: var(--muted); padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; }
.meta { font: 500 12px var(--mono); color: var(--muted); letter-spacing: 0.08em; display: flex; gap: 14px; }
.meta em { color: var(--cyan); font-style: normal; }

/* projeto em página cheia */
.proj { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 70px 0; border-top: 1px solid var(--line); }
.proj:nth-child(even) .art-xl { order: 2; }
.art-xl { aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); position: relative; }
.art-xl canvas { width: 100%; height: 100%; }
.art-xl .num { position: absolute; right: 22px; bottom: 10px; font: 700 84px var(--sans); letter-spacing: -0.05em; color: rgba(255, 255, 255, 0.07); }
.proj h3 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.03em; line-height: 1.1; margin: 18px 0 14px; }
.proj p { color: var(--muted); }
.proj ul.facts { list-style: none; margin: 22px 0; display: grid; gap: 10px; }
.proj ul.facts li { padding-left: 26px; position: relative; color: var(--text); font-size: 15.5px; }
.proj ul.facts li::before { content: ""; position: absolute; left: 0; top: 11px; width: 14px; height: 1px; background: var(--cyan); }

/* página interna */
.page-hero { padding: 180px 0 60px; }
.page-hero h1 { font-size: clamp(42px, 6.6vw, 88px); max-width: 16ch; }

/* artigo */
.post { width: min(760px, 100% - 48px); margin-inline: auto; padding-bottom: 80px; }
.post h1 { font-size: clamp(34px, 5vw, 60px); max-width: none; line-height: 1.05; margin: 22px 0; }
.post .lead { font-size: 20px; color: var(--muted); margin-bottom: 30px; }
.post .cover { aspect-ratio: 21 / 9; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); margin: 34px 0 46px; background: var(--bg-2); }
.post .cover canvas { width: 100%; height: 100%; }
.post h2 { font-size: 28px; margin: 48px 0 14px; max-width: none; letter-spacing: -0.02em; }
.post p { color: #c3cad8; margin: 16px 0; }
.post ul, .post ol { margin: 16px 0 16px 22px; color: #c3cad8; }
.post li { margin: 8px 0; }
.post li::marker { color: var(--cyan); }
.post strong { color: var(--text); }
.post blockquote { border-left: 2px solid var(--violet); padding: 6px 0 6px 22px; margin: 28px 0; font-size: 20px; color: var(--text); }
.post code { font: 500 14px var(--mono); background: rgba(255, 255, 255, 0.06); padding: 2px 7px; border-radius: 5px; color: var(--cyan); }
.post pre { font: 500 13px/1.7 var(--mono); background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 20px; overflow-x: auto; margin: 24px 0; color: #b8c2d6; }
.post table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 15px; }
.post th { text-align: left; font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.post td { padding: 13px 12px; border-bottom: 1px solid var(--line); color: #c3cad8; }
.post td:first-child { color: var(--text); font-weight: 500; }
.bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; min-width: 90px; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 4px; transition: width 1.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.in .bar i { width: var(--w); }
.back { font: 500 13px var(--mono); color: var(--muted); }
.back::before { content: "← "; }
.back:hover { color: var(--cyan); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0; }
.kpi { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: rgba(255, 255, 255, 0.02); }
.kpi b { display: block; font-size: 32px; letter-spacing: -0.03em; line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--muted); }

/* contato + rodapé */
.contact { text-align: center; }
.contact h2 { margin-inline: auto; max-width: 16ch; }
.contact .mail { display: inline-block; margin-top: 34px; font-size: clamp(20px, 3.4vw, 40px); font-weight: 500; letter-spacing: -0.02em; border-bottom: 1px solid var(--line-2); padding-bottom: 6px; transition: border-color 0.3s, color 0.3s; }
.contact .mail:hover { color: var(--cyan); border-color: var(--cyan); }
footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 24px; }
footer a:hover { color: var(--text); }

/* entrada ao rolar */
.rv { opacity: 0; transform: translateY(34px); transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .grid, .grid.two { grid-template-columns: 1fr 1fr; }
  .about, .proj { grid-template-columns: 1fr; gap: 34px; }
  .proj:nth-child(even) .art-xl { order: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .grid, .grid.two, .kpis { grid-template-columns: 1fr; }
  section { padding: 76px 0; }
  .burger { display: block; }
  .menu {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; padding: 10px 24px 26px;
    background: rgba(5, 6, 10, 0.96); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .menu a { padding: 16px 0; width: 100%; border-bottom: 1px solid var(--line); font-size: 18px; }
  .menu a.on::after { display: none; }
  .menu .btn { margin-top: 18px; justify-content: center; border-bottom: 0; }
  .open .menu { transform: none; }
  .open .burger i:first-child { transform: translateY(7px) rotate(45deg); }
  .open .burger i:nth-child(2) { opacity: 0; }
  .open .burger i:last-child { transform: translateY(-7px) rotate(-45deg); }
  .glow { display: none; }
  .post table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .logo-path { stroke-dashoffset: 0; }
  .logo-dot { opacity: 1; }
  .bar i { width: var(--w); }
}
