:root {
  --bg: #09070f;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.095);
  --text: #f4efff;
  --muted: #beb2d8;
  --soft: #7e7398;
  --accent: #9d7ce5;
  --accent-2: #7ce5d0;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --font: "JetBrainsMono Nerd Font", "JetBrainsMono NF", "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --mx: 50%; --my: 30%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: rgba(157, 124, 229, .35); border-radius: 999px; }
html::-webkit-scrollbar-thumb:hover { background: rgba(157, 124, 229, .55); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(circle at 10% 10%, rgba(157, 124, 229, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 12%, rgba(124, 229, 208, 0.12), transparent 28rem),
    radial-gradient(circle at 50% 100%, rgba(157, 124, 229, 0.16), transparent 28rem),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 50;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform .1s linear;
}

/* spotlight segue o cursor na página inteira; --mx/--my atualizados via JS */
.spotlight {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(560px circle at var(--mx) var(--my), rgba(157, 124, 229, .10), transparent 65%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.32;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  backdrop-filter: blur(18px);
  background: rgba(9, 7, 15, 0.72);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: .8rem; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--accent);
  font-weight: 700;
  font-size: .95rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 0 34px rgba(157, 124, 229, .32);
}
.brand strong { display: block; letter-spacing: -.01em; font-weight: 700; font-size: 1rem; }
.brand small { display: block; color: var(--muted); font-size: .72rem; }

.nav { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; font-size: .85rem; }
.nav a {
  position: relative;
  padding: .55rem .75rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color .18s, border-color .18s, background .18s;
}
.nav a:hover { color: var(--text); border-color: var(--line); background: var(--surface); }
.nav a.active { color: var(--accent-2); border-color: rgba(124, 229, 208, .35); background: rgba(124, 229, 208, .08); }

main { position: relative; z-index: 3; width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.section { padding: clamp(2.5rem, 5vw, 5rem) 0; }
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2.5rem, 7vw, 6rem) 0;
}

.eyebrow {
  color: var(--accent-2); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700;
  display: flex; align-items: center; gap: .6rem;
  margin: 0 0 .9rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent-2); opacity: .6; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; color: var(--muted); line-height: 1.65; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); line-height: 1.08; letter-spacing: -.01em; max-width: 820px; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.12; letter-spacing: -.005em; }
h3 { font-size: 1.05rem; }

.lead { max-width: 700px; font-size: clamp(1rem, 1.6vw, 1.15rem); margin-top: 1rem; }
.lead strong { color: var(--accent-2); font-weight: 600; }

.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  justify-content: center;
  min-height: 46px;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  font-size: .9rem; font-weight: 500;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.btn.primary { background: linear-gradient(135deg, var(--accent), #c7a8ff); color: #120a1e; border: 0; font-weight: 700; }
.btn.ghost:hover, .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(157, 124, 229, .55); }

.stat-line {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin-top: 1.8rem; font-size: .82rem; color: var(--soft);
}
.stat-line b { color: var(--accent-2); font-size: .95rem; }
.stat-line .dot { color: var(--line); }

/* ── entrada suave dos cards (stagger via --i definido inline no JS) ── */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(124, 229, 208, .45); } 70% { box-shadow: 0 0 0 9px rgba(124, 229, 208, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 229, 208, 0); } }

.status-card, .stack-card, .project-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.stack-card, .project-card {
  animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.stack-card:hover, .project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(157, 124, 229, .4);
  box-shadow: 0 20px 46px -20px rgba(157, 124, 229, .5);
}
.status-card { position: relative; padding: 1.4rem; overflow: hidden; }
.status-card::before {
  content: "";
  position: absolute;
  inset: -30% -40% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(157, 124, 229, .22);
  filter: blur(18px);
}
.status-card h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.status-card > p { margin-top: 0; }
.pulse {
  display: inline-block;
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
  background: var(--accent-2);
  animation: pulse-dot 2s infinite;
  margin-bottom: .8rem;
}
dl { display: grid; gap: .6rem; margin: 1.3rem 0 0; font-size: .85rem; }
dl div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: .6rem; }
dt { color: var(--soft); } dd { margin: 0; color: var(--text); }

.section-head { max-width: 680px; margin-bottom: 1.4rem; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; gap: 1rem; align-items: end; }
.section-head h2 { margin-bottom: .5rem; }
.section-head > p { margin-top: .3rem; }
.stack-grid, .project-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack-card, .project-card { padding: 1.15rem; }
.stack-card h3 { margin-bottom: .2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.chips span {
  padding: .38rem .62rem;
  border-radius: 999px;
  background: rgba(157, 124, 229, .12);
  border: 1px solid rgba(157, 124, 229, .22);
  color: #dfd5ff;
  font-size: .78rem;
}

.filters { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; }
.filter {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: .6rem .85rem;
  transition: color .18s, background .18s, border-color .18s;
}
.filter.active, .filter:hover { color: #120a1e; background: var(--accent); border-color: transparent; }

.project-card { display: flex; flex-direction: column; min-height: 260px; }
.project-card.featured { border-color: rgba(157, 124, 229, .45); }
.project-card.clickable { cursor: pointer; }
.project-card.clickable:hover { border-color: rgba(157, 124, 229, .5); }
.project-card.disabled { opacity: .72; }
.project-topline { display: flex; align-items: center; gap: .5rem; color: var(--accent-2); font-size: .72rem; font-weight: 700; letter-spacing: .1em; }
.cat-ico {
  width: 26px; height: 26px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-weight: 700; font-size: .78rem; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.project-topline small { margin-left: auto; color: var(--soft); letter-spacing: 0; font-weight: 500; }
.project-card h3 { margin: .8rem 0 .4rem; }
.project-actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 1rem; font-size: .85rem; }
.project-actions span { color: var(--soft); }
.repo-link {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .4rem;
  color: var(--text); border-bottom: 1px solid var(--accent); padding-bottom: .15rem; transition: color .18s;
}
.repo-link:hover { color: var(--accent-2); }

.footer {
  position: relative; z-index: 3;
  width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 3rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
}
.footer p { font-size: .85rem; }
.footer-links { display: flex; gap: .8rem; align-items: center; font-size: .85rem; }
.footer-links a { border-bottom: 1px solid transparent; transition: color .18s, border-color .18s; }
.footer-links a:hover { color: var(--accent-2); border-color: var(--accent-2); }
.footer-links .sep { color: var(--line); }
.icon-link { display: inline-flex; align-items: center; gap: .45rem; }

@media (max-width: 900px) {
  .section-grid, .stack-grid, .project-grid { grid-template-columns: 1fr !important; }
  .section-head.split { align-items: start; flex-direction: column; }
  .site-header { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .stack-card, .project-card { animation: none; }
  .pulse { animation: none; }
  .spotlight { display: none; }
}
