:root {
  --bg: #0b0814;
  --bg-alt: #0f0b1b;
  --card: #151024;
  --border: rgba(168, 85, 247, 0.18);
  --text: #e9e4f5;
  --muted: #9a93b0;
  --accent: #a855f7;
  --accent-strong: #8b3df0;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.center { text-align: center; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(11, 8, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.02em; }
.logo .fa { color: var(--accent); font-size: 20px; }
.logo em, .swap-b em { font-style: normal; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.nav a { padding: 4px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover { color: var(--accent); }
.nav a.active { border-color: var(--accent); }
.lang-slot { display: flex; }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 9px; width: 22px; height: 2px; background: var(--text);
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -7px; left: 0; }
.nav-toggle span::after { top: 7px; left: 0; }

/* Baxx <-> Bruno Andrade hover swap */
.swap { display: inline-grid; vertical-align: bottom; }
.swap-a, .swap-b { grid-area: 1 / 1; white-space: nowrap; transition: opacity .6s, transform .6s; transform-origin: left; }
.swap-b { opacity: 0; transform: scale(0.4); color: var(--accent); }
.swap:hover .swap-a, a:hover > .swap .swap-a { opacity: 0; transform: scale(0.4); }
.swap:hover .swap-b, a:hover > .swap .swap-b { opacity: 1; transform: scale(1); }

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 110px 0 190px; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 80% 40%, rgba(168, 85, 247, 0.22), transparent 70%),
    linear-gradient(rgba(168, 85, 247, 0.05) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(168, 85, 247, 0.05) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 40px; position: relative; z-index: 2; }
.terminal { display: inline-block; font-family: var(--mono); font-size: 13px; color: var(--muted);
  background: rgba(168, 85, 247, 0.1); border: 1px solid var(--border); padding: 4px 12px; border-radius: 4px; margin-bottom: 20px; }
.terminal span { color: var(--accent); }
.hero h1 { font-size: clamp(56px, 9vw, 104px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.name-first, .name-last { display: block; }
.name-last { color: var(--accent); }
.role { margin-top: 24px; font-family: var(--mono); font-size: 15px; color: var(--accent); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.stack li { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px;
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: rgba(168, 85, 247, 0.08); }
.stack img { width: 16px; height: 16px; }
.tagline { color: var(--muted); max-width: 520px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: transform .2s, background .2s, box-shadow .2s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-strong); box-shadow: 0 6px 24px rgba(139, 61, 240, 0.4); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--border); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: var(--accent); }

.hero-art { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.avatar { position: relative; width: 320px; height: 320px; }
.avatar-img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; image-rendering: pixelated;
  border: 3px solid var(--accent); box-shadow: 0 0 60px rgba(168, 85, 247, 0.35); }
.espeon { position: absolute; right: -6px; bottom: 6px; width: 96px; height: 96px; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--card); border: 2px solid var(--border); border-radius: 50%; transition: box-shadow .3s, border-color .3s, transform .3s; }
.espeon img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transform: scale(1.7) translateY(6%); }
.espeon:hover { transform: scale(1.08); border-color: var(--accent); }
.espeon.on { border-color: var(--accent); box-shadow: 0 0 24px rgba(168, 85, 247, 0.7); }
.hint { font-family: var(--mono); font-size: 12px; color: var(--muted); opacity: 0; transition: opacity .2s; }
.hero-art:has(.avatar-img:hover) .hint { opacity: 1; }
@media (hover: none) { .hint { opacity: 1; } }

/* Walking Pokémon (opt-in via the Espeon button) */
#pokemon-area { position: absolute; left: 0; bottom: 24px; width: 100%; height: 150px; overflow: hidden;
  pointer-events: none; opacity: 0; transition: opacity .6s ease-in-out; z-index: 1; }
#pokemon-area.visible { opacity: 1; }
.pokemon { position: absolute; }
.pokemon.flipped { transform: scaleX(-1); }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 32px; }
.section-title::after { content: ''; display: block; width: 56px; height: 4px; background: var(--accent); border-radius: 2px; margin-top: 12px; }
.center .section-title::after { margin-left: auto; margin-right: auto; }
.lead { font-size: 19px; margin-bottom: 16px; }
#about p:not(.lead) { color: var(--muted); }

.group-title { font-family: var(--mono); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin: 32px 0 14px; }
.group-title:first-of-type { margin-top: 0; }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.skills li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; font-size: 13px; color: var(--muted);
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; transition: transform .2s, border-color .2s, color .2s; }
.skills li:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--text); }
.skills img { width: 40px; height: 40px; object-fit: contain; }

/* Experience */
.job { position: relative; padding: 0 0 40px 28px; border-left: 2px solid var(--border); margin-left: 6px; }
.job:last-child { padding-bottom: 0; }
.job::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.job-date { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.05em; }
.job-role { font-size: 22px; font-weight: 700; margin-top: 2px; }
.job-company { color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.job-intro { margin-bottom: 8px; }
.job ul li { position: relative; padding-left: 20px; margin-bottom: 8px; color: var(--muted); }
.job ul li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.project { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s; }
.project:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 32px rgba(139, 61, 240, 0.2); }
.project-img { height: 170px; display: flex; align-items: center; justify-content: center; background: #1b1530; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.project-img[class*="--icon"] .fa { font-size: 72px; color: var(--accent); }
.project-body { padding: 18px 20px 22px; }
.project-body h3 { font-size: 18px; margin-bottom: 6px; }
.project-body p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* Contact */
#contact p { color: var(--muted); }
.social { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 28px 0; }
.social a { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 110px; padding: 16px 0; font-size: 13px; color: var(--muted);
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; transition: transform .2s, border-color .2s, color .2s; }
.social a:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--text); }
.social .fa { font-size: 28px; color: var(--accent); }
.social .icon-discord { width: 32px; height: 28px; color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.to-top { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; transition: border-color .2s, color .2s; }
.to-top:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 24px 20px;
    background: rgba(11, 8, 20, 0.97); border-bottom: 1px solid var(--border); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 8px 0; }
  .hero { padding-bottom: 170px; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; }
  .avatar { width: 220px; height: 220px; }
  .espeon { width: 72px; height: 72px; }
  .section { padding: 72px 0; }
}
