:root {
  --bg: #07061a;
  --bg-2: #0d0a26;
  --card-bg: #0d0b25;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .14);
  --text: #eeecff;
  --muted: #aaa7d0;
  --dim: #77749e;

  --purple: #a855f7;
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #34d399;

  --grad: linear-gradient(120deg, #c084fc 0%, #a855f7 22%, #818cf8 50%, #60a5fa 75%, #22d3ee 100%);
  --grad-btn: linear-gradient(120deg, #9333ea, #6366f1 50%, #2563eb);
  --glow: 0 10px 40px -10px rgba(139, 92, 246, .6);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --container: 1180px;
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: rgba(168, 85, 247, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor; stroke: none; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-anim {
  background: linear-gradient(90deg, #c084fc, #818cf8, #60a5fa, #22d3ee, #a855f7, #c084fc);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 9s linear infinite;
}
@keyframes gradShift { to { background-position: 300% 0; } }

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 10px 16px; border-radius: 12px;
  background: var(--grad-btn); color: #fff; font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 16px; }

/* ---------- Fundo ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 700px at 50% -10%, #19113f 0%, transparent 60%), var(--bg);
}
.blob { position: absolute; border-radius: 50%; will-change: transform; }
.b1 {
  width: 62vmax; height: 62vmax; left: -18vmax; top: -24vmax;
  background: radial-gradient(circle, rgba(147, 51, 234, .42), transparent 62%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.b2 {
  width: 56vmax; height: 56vmax; right: -20vmax; top: 4vmax;
  background: radial-gradient(circle, rgba(37, 99, 235, .38), transparent 62%);
  animation: drift2 31s ease-in-out infinite alternate;
}
.b3 {
  width: 46vmax; height: 46vmax; left: 22vmax; bottom: -28vmax;
  background: radial-gradient(circle, rgba(99, 102, 241, .34), transparent 62%);
  animation: drift3 35s ease-in-out infinite alternate;
}
.b4 {
  width: 30vmax; height: 30vmax; right: 8vmax; bottom: -12vmax;
  background: radial-gradient(circle, rgba(34, 211, 238, .2), transparent 62%);
  animation: drift1 23s ease-in-out infinite alternate-reverse;
}
@keyframes drift1 { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-12vmax, 12vmax, 0) scale(.9); } }
@keyframes drift3 { to { transform: translate3d(-9vmax, -10vmax, 0) scale(1.15); } }

.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 25%, transparent 75%);
}
.bg-noise {
  position: absolute; inset: 0; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-spot {
  position: absolute; inset: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, -30%), rgba(139, 92, 246, .11), transparent 60%);
}

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span {
  display: block; height: 100%;
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: var(--grad);
  box-shadow: 0 0 12px rgba(139, 92, 246, .8);
}

/* ---------- Navegação ---------- */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; pointer-events: none; }
.nav-inner {
  position: relative; pointer-events: auto;
  width: min(100% - 24px, 980px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 8px 8px 12px;
  border-radius: 999px;
  background: rgba(14, 11, 38, .5);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  transition: background .35s, border-color .35s, box-shadow .35s;
}
.nav.scrolled .nav-inner {
  background: rgba(10, 8, 30, .78);
  border-color: rgba(168, 85, 247, .22);
  box-shadow: 0 12px 40px -14px rgba(0, 0, 0, .7);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: .85rem; color: #fff;
  background: var(--grad-btn);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand-name { font-size: 1.05rem; }

.nav-links { position: relative; display: flex; gap: 2px; }
.nav-links a {
  position: relative; z-index: 1;
  padding: 8px 15px; border-radius: 999px;
  font-size: .92rem; font-weight: 500; color: var(--muted);
  transition: color .25s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-indicator {
  position: absolute; z-index: 0; top: 0; left: 0; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(168, 85, 247, .3), rgba(59, 130, 246, .3));
  border: 1px solid rgba(168, 85, 247, .35);
  opacity: 0;
  transition: transform .5s var(--ease), width .5s var(--ease), opacity .3s;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.lang button {
  padding: 6px 12px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; letter-spacing: .06em; color: var(--muted);
  transition: color .25s, background .25s, box-shadow .25s;
}
.lang button:hover { color: #fff; }
.lang button[aria-pressed="true"] { color: #fff; background: var(--grad-btn); box-shadow: 0 4px 14px -4px rgba(99, 102, 241, .9); }

.menu-btn { display: none; }

/* ---------- Botões ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; line-height: 1.2;
  transition: transform .35s var(--ease), box-shadow .35s, background-position .7s var(--ease);
}
.btn svg { font-size: 1.15em; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, #9333ea, #6366f1, #2563eb, #9333ea);
  background-size: 250% 100%;
  box-shadow: 0 10px 30px -10px rgba(124, 58, 237, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -12px rgba(99, 102, 241, .95), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-ghost {
  color: #fff;
  border: 1.5px solid transparent;
  background: linear-gradient(#100c2c, #100c2c) padding-box, var(--grad) border-box;
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(59, 130, 246, .8); }
.btn-sm { padding: 10px 18px; font-size: .88rem; }

.icon-btn {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 14px; font-size: 20px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  transition: transform .35s var(--ease), color .25s, border-color .25s, box-shadow .35s;
}
.icon-btn:hover { color: #fff; transform: translateY(-3px); border-color: rgba(168, 85, 247, .5); box-shadow: 0 10px 24px -10px rgba(139, 92, 246, .9); }

/* ---------- Revelar ao rolar ---------- */
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Início ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 90px; }
/* Os anéis giram e, girando, a caixa deles passa da largura da tela; sem este corte o Safari do iPhone reduz a página inteira. */
.hero { overflow-x: hidden; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px; padding: 7px 15px 7px 12px; border-radius: 999px;
  background: rgba(168, 85, 247, .08); border: 1px solid rgba(168, 85, 247, .3);
  font-size: .86rem; font-weight: 500; color: #ddd6fe;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
}

.hero-name {
  margin: 0 0 22px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.7rem, 6.3vw, 5.3rem); line-height: 1; letter-spacing: -.04em;
}
.hero-name span { display: block; }
.hero-name span + span { padding-bottom: .08em; }

.hero-headline {
  margin: 0 0 20px; max-width: 30ch;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.35; color: #dcd9f7;
}
.hero-meta {
  list-style: none; margin: 0 0 22px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  color: var(--muted); font-size: .93rem;
}
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { font-size: 17px; color: #a78bfa; }
.hero-bio { margin: 0 0 32px; max-width: 60ch; color: var(--muted); font-size: 1.03rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero-social { display: flex; gap: 10px; }

.hero-visual {
  --tx: 0px; --ty: 0px;
  position: relative; justify-self: center;
  width: min(100%, 470px); aspect-ratio: 1 / 1.08;
  display: grid; place-items: center;
}
.halo {
  position: absolute; inset: 10%; border-radius: 50%;
  background: conic-gradient(from 0deg, #a855f7, #6366f1, #3b82f6, #22d3ee, #e879f9, #a855f7);
  filter: blur(64px); opacity: .5;
  animation: spin 16s linear infinite;
}
.disc {
  position: absolute; inset: 13%; border-radius: 50%;
  background: radial-gradient(circle at 32% 25%, rgba(168, 85, 247, .32), rgba(14, 11, 40, .92) 68%);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 70px rgba(99, 102, 241, .35), 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.ring {
  position: absolute; inset: 7%; border-radius: 50%; padding: 2px;
  background: conic-gradient(from 0deg, transparent 0 12%, #c084fc 30%, #6366f1 48%, #22d3ee 62%, transparent 80%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 9s linear infinite;
}
.ring-2 { inset: 0; padding: 1px; opacity: .45; animation-duration: 24s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.floor {
  position: absolute; bottom: 4%; left: 50%; z-index: 1;
  width: 46%; height: 24px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .65), transparent);
  transform: translateX(-50%);
  animation: floor 6s ease-in-out infinite;
}
@keyframes floor { 50% { transform: translateX(-50%) scale(.82); opacity: .6; } }

.funko-wrap { position: relative; z-index: 2; width: 66%; translate: var(--tx) var(--ty); transition: translate .2s linear; }
.funko {
  width: 100%; height: auto;
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .55)) drop-shadow(0 0 32px rgba(139, 92, 246, .28));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-16px) rotate(1.2deg); }
}

.chip {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: #fff; white-space: nowrap;
  background: rgba(18, 14, 46, .72); border: 1px solid rgba(255, 255, 255, .13);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .7);
  translate: calc(var(--tx) * -1.6) calc(var(--ty) * -1.6);
  transition: translate .2s linear;
  animation: bob 5.5s ease-in-out infinite;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.c1 { top: 14%; left: -2%; }
.c2 { top: 30%; right: -4%; animation-delay: -1.6s; }
.c3 { bottom: 26%; left: -6%; animation-delay: -3.1s; }
.c4 { bottom: 10%; right: 2%; animation-delay: -2.2s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
  width: 26px; height: 42px; border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, .25);
  display: flex; justify-content: center; padding-top: 7px;
  transition: border-color .3s;
}
.scroll-hint:hover { border-color: rgba(168, 85, 247, .7); }
.scroll-hint span { width: 4px; height: 8px; border-radius: 2px; background: var(--grad); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Seções ---------- */
.section { position: relative; padding: clamp(84px, 11vw, 140px) 0; }
.section-head { margin-bottom: 48px; }
.kicker { margin: 0 0 12px; font-family: var(--font-mono); font-size: .86rem; color: #a78bfa; }
.section-title {
  margin: 0 0 14px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.05; letter-spacing: -.035em;
}
.section-sub { margin: 0; max-width: 58ch; color: var(--muted); font-size: 1.06rem; }

/* ---------- Trajetória ---------- */
.about-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 56px; align-items: start; }
.about-left { position: sticky; top: 120px; }
.about-lead {
  margin: 0 0 32px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.45rem, 2.6vw, 2.05rem); line-height: 1.28; letter-spacing: -.015em;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat {
  padding: 18px 16px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .3s, transform .4s var(--ease);
}
.stat:hover { border-color: rgba(168, 85, 247, .35); transform: translateY(-3px); }
.stat strong { display: block; margin-bottom: 8px; font-family: var(--font-display); font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; }

.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 30px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, #a855f7, #6366f1 55%, rgba(59, 130, 246, 0));
}
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -30px; top: 28px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid #a855f7;
  box-shadow: 0 0 0 5px rgba(168, 85, 247, .14), 0 0 16px rgba(168, 85, 247, .6);
}
.tl-item.now .tl-dot { background: #a855f7; animation: dot 2.2s infinite; }
@keyframes dot {
  0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, .6), 0 0 16px rgba(168, 85, 247, .6); }
  70%, 100% { box-shadow: 0 0 0 12px rgba(168, 85, 247, 0), 0 0 16px rgba(168, 85, 247, .6); }
}
.tl-card {
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .45s var(--ease), border-color .3s, background .3s;
}
.tl-card:hover { transform: translateX(6px); border-color: rgba(168, 85, 247, .35); background: var(--surface-2); }
.tl-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tl-ico {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; font-size: 18px;
  color: #e9d5ff; background: linear-gradient(135deg, rgba(168, 85, 247, .25), rgba(59, 130, 246, .25));
  border: 1px solid rgba(168, 85, 247, .3);
}
.tl-date { font-family: var(--font-mono); font-size: .8rem; color: #93c5fd; }
.badge-now {
  margin-left: auto; padding: 4px 10px; border-radius: 999px;
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #6ee7b7; background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3);
}
.tl-card h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.01em; }
.tl-role { margin: 2px 0 8px; color: #c4b5fd; font-weight: 500; font-size: .95rem; }
.tl-card p:last-child { margin: 0; color: var(--muted); }

/* ---------- Faixa de tecnologias ---------- */
.stack { padding: 8px 0 12px; }
.stack .kicker { margin-bottom: 18px; }
.marquee {
  overflow: hidden; padding: 7px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; animation-duration: 52s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tech {
  display: inline-flex; align-items: center; gap: 11px; margin-right: 14px;
  padding: 13px 22px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: #e4e2ff; white-space: nowrap;
  transition: border-color .3s, background .3s;
}
.tech:hover { border-color: rgba(168, 85, 247, .45); background: var(--surface-2); }
.tech i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, #a855f7); box-shadow: 0 0 12px var(--c, #a855f7); }

/* ---------- Projetos ---------- */
.filters {
  position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 36px; padding: 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.filter {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px;
  font-size: .92rem; font-weight: 500; color: var(--muted);
  transition: color .3s;
}
.filter:hover, .filter[aria-pressed="true"] { color: #fff; }
.filter .count:empty { display: none; }
.filter .count { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: .74rem; text-align: center; background: rgba(255, 255, 255, .1); }
.filter-pill {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0;
  border-radius: 999px; background: var(--grad-btn);
  box-shadow: 0 6px 20px -6px rgba(99, 102, 241, .9);
  transition: transform .5s var(--ease), width .5s var(--ease);
}

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.state { margin: 0; padding: 36px; text-align: center; color: var(--muted); border: 1px dashed var(--border-2); border-radius: var(--radius); }

.card {
  --mx: 50%; --my: 50%;
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  border-radius: 26px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: transform .55s var(--ease), box-shadow .55s var(--ease), border-color .4s;
}
.card[hidden] { display: none !important; }
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(139, 92, 246, .15), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.card::after {
  content: ""; position: absolute; inset: -1px; z-index: 3; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx) var(--my), #c084fc, #3b82f6 45%, transparent 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0; transition: opacity .4s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 34px 70px -34px rgba(99, 102, 241, .75); }
.card:hover::before, .card:hover::after { opacity: 1; }
.card.card-in { animation: cardIn .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }

.card.feature { grid-column: 1 / -1; flex-direction: row; }

.media {
  position: relative; z-index: 1; overflow: hidden;
  margin: 10px 10px 0; border-radius: 18px; aspect-ratio: 16 / 10;
  background: #0a0820;
}
.card.feature .media { flex: 1.15 1 0; margin: 10px 0 10px 10px; aspect-ratio: auto; min-height: 340px; }
.media video, .media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .media video, .card:hover .media > img { transform: scale(1.04); }
.media.has-video { cursor: zoom-in; }
.media-play {
  position: absolute; inset: 0; margin: auto; z-index: 2;
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; color: #fff;
  background: rgba(124, 58, 237, .55); border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -8px rgba(124, 58, 237, .9);
  pointer-events: none; transition: opacity .35s, transform .35s var(--ease);
}
.media-play svg { translate: 2px 0; }
.media.playing .media-play { opacity: 0; transform: scale(.8); }
.media-expand {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 17px;
  background: rgba(8, 6, 24, .65); border: 1px solid rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .3s, background .3s;
}
.card:hover .media-expand, .media-expand:focus-visible { opacity: 1; }
.media-expand:hover { background: rgba(124, 58, 237, .7); }
.media-tabs {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(8, 6, 24, .72); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.media-tabs button { padding: 5px 12px; border-radius: 999px; font-size: .75rem; font-weight: 600; color: var(--muted); transition: background .25s, color .25s; }
.media-tabs button:hover { color: #fff; }
.media-tabs button[aria-pressed="true"] { color: #fff; background: var(--grad-btn); }

.cover {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(168, 85, 247, .6), transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(59, 130, 246, .6), transparent 55%),
    linear-gradient(135deg, #170f3c, #0b1a3f);
}
.cover::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}
.cover-window {
  position: relative; width: 80%; overflow: hidden; border-radius: 14px;
  background: rgba(10, 8, 30, .78); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .75);
  transform: perspective(1000px) rotateX(7deg) rotateY(-9deg);
  transition: transform .9s var(--ease);
}
.card:hover .cover-window { transform: perspective(1000px) translateY(-4px); }
.cover-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.cover-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.cover-bar i:nth-child(2) { background: #febc2e; }
.cover-bar i:nth-child(3) { background: #28c840; }
.cover-window > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.cover-body { padding: clamp(18px, 3vw, 28px); }
.cover-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.1; letter-spacing: -.02em; }
.cover-lines span { display: block; height: 8px; margin-top: 12px; border-radius: 4px; background: rgba(255, 255, 255, .09); }
.cover-lines span:nth-child(1) { width: 82%; }
.cover-lines span:nth-child(2) { width: 64%; }
.cover-lines span:nth-child(3) { width: 72%; }
.cover-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.cover-tags i { font-style: normal; font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: #e9d5ff; background: rgba(168, 85, 247, .18); border: 1px solid rgba(168, 85, 247, .35); }

.card-body { position: relative; z-index: 1; flex: 1 1 0; display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 24px; }
.card.feature .card-body { padding: 30px 32px; justify-content: center; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat { padding: 4px 11px; border-radius: 999px; font-family: var(--font-mono); font-size: .74rem; border: 1px solid; }
.cat.projeto { color: #d8b4fe; background: rgba(168, 85, 247, .1); border-color: rgba(168, 85, 247, .35); }
.cat.mini { color: #93c5fd; background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .35); }
.num { font-family: var(--font-mono); font-size: .8rem; color: var(--dim); }
.card h3 { margin: 0; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.15; letter-spacing: -.015em; }
.card.feature h3 { font-size: clamp(1.7rem, 2.6vw, 2.15rem); }
.desc { margin: 0; color: var(--muted); }
.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .92rem; color: #d2cfee; }
.feats li { display: flex; align-items: baseline; gap: 10px; }
.feats li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); translate: 0 -2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 10px; border-radius: 8px; font-size: .78rem; font-weight: 500; color: #d6d3f0; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }

.card.skeleton {
  min-height: 380px; border: 1px solid var(--border);
  background: linear-gradient(100deg, rgba(255, 255, 255, .025) 30%, rgba(255, 255, 255, .07) 50%, rgba(255, 255, 255, .025) 70%) var(--card-bg);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
.card.skeleton:hover { transform: none; box-shadow: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Contato ---------- */
.contact-panel {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(40px, 6vw, 76px) clamp(20px, 5vw, 64px);
  border-radius: 34px; text-align: center;
  border: 1px solid transparent;
  background:
    linear-gradient(#0d0a26, #0d0a26) padding-box,
    linear-gradient(135deg, rgba(168, 85, 247, .65), rgba(99, 102, 241, .15) 40%, rgba(34, 211, 238, .55)) border-box;
}
.contact-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(500px circle at 12% 0%, rgba(147, 51, 234, .35), transparent 60%),
    radial-gradient(500px circle at 90% 100%, rgba(37, 99, 235, .35), transparent 60%);
}
.contact-title {
  margin: 0 0 16px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.04; letter-spacing: -.04em;
}
.contact-text { margin: 0 auto 40px; max-width: 52ch; color: var(--muted); font-size: 1.06rem; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; text-align: left; }
.contact-card {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
  transition: transform .4s var(--ease), border-color .3s, background .3s, box-shadow .4s;
}
.contact-card:hover { transform: translateY(-4px); border-color: rgba(168, 85, 247, .45); background: rgba(255, 255, 255, .065); box-shadow: 0 22px 40px -22px rgba(124, 58, 237, .8); }
.contact-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.contact-ico {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; font-size: 20px;
  color: #ede9fe; background: linear-gradient(135deg, rgba(168, 85, 247, .3), rgba(59, 130, 246, .3));
  border: 1px solid rgba(168, 85, 247, .32);
}
.contact-info { min-width: 0; display: flex; flex-direction: column; }
.contact-label { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.contact-value { overflow-wrap: anywhere; font-weight: 600; font-size: .95rem; line-height: 1.35; }
.contact-arrow { font-size: 18px; color: var(--dim); transition: color .3s, transform .4s var(--ease); }
.contact-card:hover .contact-arrow { color: #fff; transform: translate(2px, -2px); }
.copy-btn {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font-size: 17px;
  color: var(--muted); background: rgba(255, 255, 255, .05); border: 1px solid var(--border);
  transition: color .25s, background .25s, border-color .25s;
}
.copy-btn:hover { color: #fff; background: rgba(124, 58, 237, .4); border-color: rgba(168, 85, 247, .5); }

/* ---------- Rodapé, aviso e vídeo ampliado ---------- */
.footer { padding: 28px 0 36px; border-top: 1px solid var(--border); color: var(--dim); font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.footer p { margin: 0; }
.to-top { transition: color .25s; }
.to-top:hover { color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80;
  padding: 12px 20px; border-radius: 999px;
  background: rgba(20, 16, 50, .94); border: 1px solid rgba(168, 85, 247, .45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font-size: .9rem; font-weight: 500;
  translate: -50% 20px; opacity: 0; pointer-events: none;
  transition: opacity .35s, translate .45s var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }

.lightbox {
  width: min(1100px, 94vw); max-width: none; padding: 0; overflow: visible;
  border: 0; background: transparent; color: var(--text);
}
.lightbox::backdrop { background: rgba(4, 3, 14, .84); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox[open] { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.lightbox video {
  width: 100%; max-height: 78vh; border-radius: 18px; background: #000;
  border: 1px solid rgba(168, 85, 247, .4);
  box-shadow: 0 40px 100px -20px rgba(99, 102, 241, .65);
}
.lightbox-close {
  position: absolute; right: 0; top: -52px;
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; font-size: 20px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15);
  transition: background .25s;
}
.lightbox-close:hover { background: rgba(124, 58, 237, .6); }
.lightbox-caption { margin: 14px 0 0; text-align: center; color: var(--muted); }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .hero { min-height: auto; padding: 108px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { order: -1; width: min(74vw, 340px); }
  .scroll-hint { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-left { position: static; }
  .card.feature { flex-direction: column; }
  .card.feature .media { flex: none; margin: 10px 10px 0; min-height: 0; aspect-ratio: 16 / 10; }
  .card.feature .card-body { padding: 22px 24px 24px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .brand-name { display: none; }
  .menu-btn {
    display: grid; place-items: center; align-content: center; gap: 5px;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--border);
  }
  .menu-btn span { display: block; width: 16px; height: 2px; border-radius: 2px; background: #fff; transition: transform .35s var(--ease); }
  .nav.open .menu-btn span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.open .menu-btn span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav-links {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; gap: 4px; padding: 10px;
    border-radius: 22px; background: rgba(12, 10, 32, .96); border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .8);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top center;
    transition: opacity .3s, transform .4s var(--ease), visibility .3s;
  }
  .nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 13px 16px; font-size: 1rem; }
  .nav-links a.active { background: linear-gradient(120deg, rgba(168, 85, 247, .22), rgba(59, 130, 246, .22)); }
  .nav-indicator { display: none; }

  .projects { grid-template-columns: 1fr; }
  .stats { gap: 8px; }
  .stat { padding: 14px 12px; }
  .stat strong { font-size: 1.9rem; }
  .chip { font-size: .72rem; padding: 6px 11px; }
  .c1 { left: 0; } .c2 { right: 0; } .c3 { left: -2%; }
  .filters { display: flex; width: 100%; }
  .filter { flex: 1; justify-content: center; padding: 10px 12px; }
  .media-expand { opacity: 1; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .stat span { font-size: .78rem; }
  .filter { font-size: .86rem; padding: 10px 8px; }
  .filter .count { display: none; }
}

/* Telas de toque: menos camadas animadas e desfocadas, que pesam na memória de vídeo do iPhone. */
@media (hover: none) {
  .blob { animation: none; will-change: auto; }
  .halo { animation: none; }
  .bg-spot { display: none; }
}

/* ---------- Menos movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { width: auto; flex-wrap: wrap; justify-content: center; row-gap: 10px; animation: none !important; }
  .marquee.reverse, .tech.dup { display: none; }
}
