/* ------------ Reset & base ------------ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root{
  --bg: #0b0e14;
  --panel: #151a22;
  --text: #e6e6e6;
  --muted: #a8b0bf;
  --accent: #6ee7ff;
  --accent-2:#a78bfa;
  --shadow: 0 10px 30px rgba(0,0,0,.4);
}
html{ scroll-behavior: smooth; }
body{
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(110,231,255,.08), transparent),
              radial-gradient(1200px 600px at 90% 10%, rgba(167,139,250,.08), transparent),
              var(--bg);
}

/* ------------ Nav ------------ */
.nav{ position: sticky; top:0; backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(10,13,20,.85), rgba(10,13,20,.65));
  border-bottom: 1px solid rgba(255,255,255,.06); z-index: 50; }
.nav-inner{ display:flex; align-items:center; justify-content:space-between; padding: 14px 0; }
.container{ width:min(1100px, 92%); margin-inline:auto; }
.brand{ font-weight:700; letter-spacing:.3px; font-size:1.25rem; }
.brand span{ color: var(--accent); }
.nav a{ color: var(--muted); text-decoration:none; margin-left: 20px; }
.nav a:hover{ color: var(--text); }
#themeToggle{ margin-left: 16px; font-size: 1rem; background: transparent; color: var(--text); border:1px solid rgba(255,255,255,.12); padding:6px 10px; border-radius:8px; cursor:pointer; }

/* ------------ Hero ------------ */
.hero{ position: relative; overflow:hidden; }
.hero-inner{ display:grid; grid-template-columns: 160px 1fr; gap: 28px; padding: 64px 0 48px; align-items:center; }
.avatar{ width:160px; height:160px; border-radius:50%; border:3px solid rgba(255,255,255,.1); box-shadow: var(--shadow); }
.hero h1{ font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem); line-height:1.2; margin-bottom: 10px; }
.hero p{ color: var(--muted); max-width: 60ch; }
.cta{ margin-top:18px; display:flex; gap:12px; flex-wrap:wrap; }
.btn{ padding:10px 16px; border-radius:10px; text-decoration:none; font-weight:600; border:1px solid transparent; }
.btn.primary{ background: linear-gradient(135deg, var(--accent), var(--accent-2)); color:#0b0e14; }
.btn.ghost{ border-color: rgba(255,255,255,.16); color: var(--text); }

/* Animated programming background */
.code-bg{
  pointer-events: none;
  position:absolute; inset:0; opacity:.28;
  background-image: url('assets/pattern.svg');
  background-size: 520px;
  animation: drift 35s linear infinite;
}
@keyframes drift{ from{background-position:0 0;} to{background-position: -1200px 1200px;} }

/* ------------ Sections ------------ */
.section{ padding: 64px 0; }
.narrow{ max-width: 800px; }
h2{ font-size: clamp(1.4rem, 0.8rem + 1.6vw, 2rem); margin-bottom: 18px; }

/* Skills */
.habilidades-enunciado{text-align: center;}
.skills{ list-style:none; display:flex; flex-wrap:wrap; gap:12px; justify-content: center; }
.badge{ display:inline-block; padding:10px 14px; border-radius:10px; background: var(--panel); box-shadow: var(--shadow); }

/* Projects */
.projetos-enunciado{text-align: center;}
.grid{ display:grid; gap:20px; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); }
.card{ background: var(--panel); border-radius:14px; overflow:hidden; box-shadow: var(--shadow); border:1px solid rgba(255,255,255,.06); }
.card img{ width:100%; height:160px; object-fit:cover; display:block; }
.card-body{ padding:14px; }
.card h3{ margin-bottom:6px; }
.card p{ color: var(--muted); min-height: 44px; }
.links{ display:flex; gap:14px; margin-top:10px; }
.links a{ color: var(--accent); text-decoration:none; }
.links a:hover{ text-decoration:underline; }

/* Contact */
.contato-enunciado{text-align: center;}
.contact-line{ margin: 10px 0 14px; text-align: center;}
.contact-line a{ color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.social{ display:flex; gap:14px; justify-content: center; }
.social a{ color: var(--muted); text-decoration:none; border:1px solid rgba(255,255,255,.14); padding:8px 12px; border-radius:10px; }
.social a:hover{ color: var(--text); }

/* Footer */
.footer{ padding: 28px 0 40px; color: var(--muted); text-align:center; }

/* Responsive */
@media (max-width: 720px){
  .hero-inner{ grid-template-columns: 1fr; text-align:center; }
  .avatar{ margin-inline:auto; }
}
/* Light theme toggle */
.light{
  --bg: #f7f8fc;
  --panel: #ffffff;
  --text: #12131a;
  --muted: #5b6476;
  --shadow: 0 10px 30px rgba(14, 23, 41, .08);
}
.light .brand span{ color:#3b82f6; }
