:root {
  --bg: #070709;
  --panel: rgba(18, 18, 22, 0.75);
  --panel2: rgba(12, 12, 16, 0.55);
  --border: rgba(255, 255, 255, 0.08);

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);

  --yellow: #ffd400;
  --yellow2: #ffef7a;

  --shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
  --shadow2: 0 14px 35px rgba(0, 0, 0, 0.45);

  --radius: 20px;
  --radius2: 26px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

b {
  color: rgba(255, 255, 255, 0.96);
}

.container {
  width: min(var(--max), calc(100% - 44px));
  margin: 0 auto;
  padding: 110px 0 70px;
}

/* ===== Background FX ===== */
.bg {
  position: fixed;
  inset: 0;
  z-index: -5;
}

.grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 62%);
}

.glow {
  position: absolute;
  width: 780px;
  height: 780px;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.22;
}

.glow-a {
  left: -220px;
  top: -260px;
  background: radial-gradient(circle, var(--yellow) 0%, transparent 60%);
}

.glow-b {
  right: -240px;
  bottom: -280px;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.75) 0%, transparent 60%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

/* ===== Cursor Glow ===== */
.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  filter: blur(42px);
  opacity: 0;
  transition: opacity 240ms ease;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.24) 0%, transparent 62%);
}

/* ===== Navbar ===== */
.nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 14px 0;
  backdrop-filter: blur(12px);
}

.nav {
  width: min(var(--max), calc(100% - 44px));
  margin: 0 auto;
  background: rgba(8, 8, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.brand-text span {
  color: var(--yellow);
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 0 6px rgba(255, 212, 0, 0.14);
}
.brand-dot.small {
  width: 10px;
  height: 10px;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-links a {
  opacity: 0.85;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 12px;
  transition: transform 220ms ease, opacity 220ms ease, background 220ms ease;
}

.nav-links a:hover {
  opacity: 1;
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  margin: 4px auto;
  border-radius: 3px;
}

.mobile-menu {
  display: none;
  width: min(var(--max), calc(100% - 44px));
  margin: 10px auto 0;
  background: rgba(8, 8, 10, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow2);
}
.mobile-menu a {
  display: block;
  padding: 12px 12px;
  border-radius: 14px;
  opacity: 0.9;
}
.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  opacity: 1;
}

/* ===== Buttons ===== */
.btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
}

.btn.primary {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow2) 100%);
  color: #0b0b0d;
  border: 0;
  box-shadow: 0 16px 45px rgba(255, 212, 0, 0.16);
}

.btn.primary:hover {
  box-shadow: 0 22px 65px rgba(255, 212, 0, 0.20);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}

.icon {
  font-size: 16px;
  line-height: 1;
}

/* ===== Sections ===== */
.section {
  padding: 44px 0;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -0.5px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow2);
  color: rgba(255, 255, 255, 0.85);
  width: fit-content;
}

.ping {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 0 0 6px rgba(255, 212, 0, 0.12);
  position: relative;
}
.ping::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 212, 0, 0.35);
  opacity: 0.7;
  animation: ping 1.6s ease-in-out infinite;
}

@keyframes ping {
  0% { transform: scale(0.55); opacity: 0.0; }
  35% { opacity: 0.75; }
  100% { transform: scale(1.1); opacity: 0; }
}

.headline {
  margin: 16px 0 10px;
  font-size: 46px;
  line-height: 1.03;
  letter-spacing: -1px;
}

.accent {
  color: var(--yellow);
  text-shadow: 0 0 28px rgba(255, 212, 0, 0.22);
}

.sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
  max-width: 62ch;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow2);
}

.stat-num {
  font-size: 24px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

.stat-label {
  color: var(--muted);
  margin-top: 6px;
  font-weight: 650;
}

/* ===== Cards ===== */
.card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(20, 20, 26, 0.78) 0%, rgba(10, 10, 14, 0.55) 100%);
  border-radius: var(--radius2);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle at 18% 0%, rgba(255, 212, 0, 0.20) 0%, transparent 45%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.chip {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  background: rgba(255, 212, 0, 0.10);
  border: 1px solid rgba(255, 212, 0, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

.dots {
  display: flex;
  gap: 6px;
}
.dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.terminal {
  border-radius: 18px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.t-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.t-dim { color: rgba(255, 255, 255, 0.45); }
.t-out { color: rgba(255, 212, 0, 0.95); font-weight: 800; }

.blink {
  display: inline-block;
  margin-left: 3px;
  opacity: 0.9;
  animation: blink 0.9s steps(2) infinite;
}

@keyframes blink {
  0% { opacity: 0; }
  50% { opacity: 1; }
}

.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.badge {
  font-size: 12px;
  font-weight: 850;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
}

/* ===== Layout blocks ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.78);
}
.list li {
  margin: 8px 0;
}

.mini-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.mini {
  border-radius: 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
}

.mini-title {
  display: block;
  font-weight: 900;
  margin-bottom: 6px;
}

.mini-sub {
  display: block;
  color: var(--muted);
  font-weight: 650;
}

/* ===== Projects ===== */
.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tag {
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 212, 0, 0.10);
  border: 1px solid rgba(255, 212, 0, 0.25);
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.project-points {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.point {
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 212, 0, 0.95);
  box-shadow: 0 0 0 6px rgba(255, 212, 0, 0.12);
}

.project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ===== Skills ===== */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chips .chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ===== CTA/Footer ===== */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.70);
  padding: 10px 2px;
}

.footer-right {
  display: flex;
  gap: 14px;
}
.footer-right a {
  opacity: 0.8;
}
.footer-right a:hover {
  opacity: 1;
}

/* ===== Reveal Animations ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  background: rgba(10, 10, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow2);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 99;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .headline {
    font-size: 40px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .projects,
  .skills {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: inline-block;
  }

  .mobile-menu.show {
    display: block;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(var(--max), calc(100% - 26px));
  }

  .headline {
    font-size: 34px;
  }
}

/* ===== Optional: "theme" (slightly different contrast) ===== */
body.alt {
  --panel: rgba(22, 22, 26, 0.78);
  --panel2: rgba(16, 16, 20, 0.62);
}

/* ===== Light Mode (modo claro) ===== */
body.light {
  --bg: #f7f7fb;

  --panel: rgba(255, 255, 255, 0.72);
  --panel2: rgba(255, 255, 255, 0.60);
  --border: rgba(0, 0, 0, 0.10);

  --text: rgba(10, 10, 14, 0.92);
  --muted: rgba(10, 10, 14, 0.62);

  --shadow: 0 18px 55px rgba(0, 0, 0, 0.16);
  --shadow2: 0 14px 35px rgba(0, 0, 0, 0.12);
}

/* Ajustes finos do fundo no modo claro */
body.light .grid {
  opacity: 0.22;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 62%);
}

body.light .glow {
  opacity: 0.16;
}

body.light .noise {
  opacity: 0.06;
}

/* Navbar e cards no claro (mais limpos) */
body.light .nav {
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light .card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.70) 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light .terminal {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

body.light .btn.ghost {
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(0, 0, 0, 0.04);
}

/* Glow do cursor no modo claro */
body.light .cursor-glow {
  background: radial-gradient(circle, rgba(255, 212, 0, 0.18) 0%, transparent 62%);
}

/* ===== Correção completa do modo claro ===== */

body.light {
  color: var(--text);
}

/* textos principais */
body.light h1,
body.light h2,
body.light h3,
body.light h4,
body.light strong,
body.light b {
  color: var(--text);
}

/* textos secundários */
body.light p,
body.light span,
body.light li,
body.light .muted,
body.light .stat-label,
body.light .mini-sub,
body.light .t-line {
  color: var(--muted);
}

/* terminal específico */
body.light .t-dim {
  color: rgba(0, 0, 0, 0.45);
}

body.light .t-out {
  color: #b58900; /* amarelo mais escuro para contraste */
}

/* navbar links */
body.light .nav-links a {
  color: var(--text);
}

/* footer */
body.light .footer,
body.light .footer a {
  color: var(--muted);
}

/* cards e elementos pequenos */
body.light .chip,
body.light .badge,
body.light .mini-title,
body.light .stat-num {
  color: var(--text);
}

/* botões ghost */
body.light .btn.ghost {
  color: var(--text);
}

/* pontos amarelos continuam visíveis */
body.light .dot {
  background: #e6b800;
}

/* headline destaque continua amarelo */
body.light .accent {
  color: #e6b800;
}