/* ============================================================
   Portfoliopbi.com — Premium Static Portfolio (HTML/CSS/JS)
   Author placeholders: [[SEU NOME]] | Replace content safely.
   ============================================================ */

/* ---- CSS reset (lightweight) ---- */
/* Optional webfont (falls back offline) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

/* ---- Tokens ---- */
:root{
  --bg: #0b0f1a;
  --bg2:#0f172a;
  --surface: rgba(255,255,255,0.06);
  --surface2: rgba(255,255,255,0.10);
  --stroke: rgba(255,255,255,0.14);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --muted2: rgba(255,255,255,0.52);
  --accent: #7c3aed;          /* discreet highlight */
  --accent2:#22d3ee;          /* secondary glow */
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
  --shadow2: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 18px;
  --radius2: 24px;
  --max: 1120px;
  --pad: 24px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="light"]{
  --bg: #f7f8fb;
  --bg2:#ffffff;
  --surface: rgba(2,6,23,0.05);
  --surface2: rgba(2,6,23,0.08);
  --stroke: rgba(2,6,23,0.10);
  --text: rgba(2,6,23,0.92);
  --muted: rgba(2,6,23,0.70);
  --muted2: rgba(2,6,23,0.55);
  --shadow: 0 18px 50px rgba(2,6,23,0.12);
  --shadow2: 0 12px 30px rgba(2,6,23,0.10);
}

/* ---- Global layout ---- */
body{
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1100px 520px at 22% -12%, rgba(124,58,237,0.16), transparent 58%),
              radial-gradient(980px 560px at 88% 8%, rgba(34,211,238,0.12), transparent 60%),
              linear-gradient(180deg, var(--bg), var(--bg2));
  min-height: 100vh;
}

.container{ width: min(var(--max), calc(100% - (var(--pad)*2))); margin: 0 auto; }
.section{ padding: 84px 0; }
.section.tight{ padding: 56px 0; }
.hr{ height:1px; background: var(--stroke); opacity: .9; }

/* ---- Micro interactions ---- */
@media (prefers-reduced-motion: no-preference){
  .reveal{ opacity:0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
  .reveal.is-visible{ opacity:1; transform: translateY(0); }
  .hover-lift{ transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s cubic-bezier(.2,.8,.2,1), border-color .35s; }
  .hover-lift:hover{ transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(124,58,237,0.35); }
}

.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--muted);
  font-size: 13px;
}
.kbd{ font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 999px; border:1px solid var(--stroke); background: var(--surface); color: var(--muted); }

/* ---- Header / Nav ---- */
.header{
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--stroke) 85%, transparent);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 0;
}
.brand{
  display:flex; align-items:center; gap:12px;
  letter-spacing: -0.02em;
  font-weight: 720;
}
.brand .logo{
  width: 34px; height: 34px; border-radius: 12px;
  background:
    url("../img/favicon.svg");
  box-shadow: 0 14px 30px rgba(124,58,237,0.25);
}
.brand .sub{ font-weight: 600; color: var(--muted); font-size: 12px; display:block; letter-spacing: .02em; }

.nav-links{
  display:flex; align-items:center; gap: 16px;
}
.nav-links a{
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background .25s, border-color .25s, color .25s;
}
.nav-links a:hover{ color: var(--text); background: var(--surface); border-color: var(--stroke); }
.nav-links a.active{ color: var(--text); background: var(--surface2); border-color: rgba(124,58,237,0.35); }

.nav-actions{ display:flex; align-items:center; gap: 10px; }
.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width: 42px; height: 42px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform .25s, background .25s, border-color .25s;
}
.icon-btn:hover{ transform: translateY(-1px); background: var(--surface2); border-color: rgba(124,58,237,0.35); }
.icon{
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.menu-btn{ display:none; }

/* ---- Mobile nav ---- */
@media (max-width: 920px){
  .nav-links{ display:none; }
  .menu-btn{ display:inline-flex; }
  .mobile-drawer{
    display:none;
    border-top:1px solid var(--stroke);
    padding: 10px 0 16px 0;
  }
  .mobile-drawer.open{ display:block; }
  .mobile-drawer a{
    display:flex; padding: 12px 10px;
    color: var(--muted);
    border-radius: 12px;
  }
  .mobile-drawer a:hover{ background: var(--surface); color: var(--text); }
}

/* ---- Hero ---- */
.hero{
  padding: 78px 0 36px 0;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 920px){
  .hero-grid{ grid-template-columns: 1fr; }
}
.h1{
  font-size: clamp(30px, 4.2vw, 35px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 14px 0;
}
.lead{
  font-size: 16px;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 22px 0;
}
.cta-row{ display:flex; gap: 12px; flex-wrap: wrap; }
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  cursor:pointer;
  transition: transform .25s, box-shadow .25s, background .25s, border-color .25s;
  font-weight: 650;
}
.btn:hover{ transform: translateY(-2px); box-shadow: var(--shadow2); border-color: rgba(124,58,237,0.35); background: var(--surface2); }
.btn.primary{
  background: linear-gradient(135deg, rgba(124,58,237,0.95), rgba(34,211,238,0.85));
  border-color: rgba(255,255,255,0.18);
}
.btn.primary:hover{ border-color: rgba(255,255,255,0.30); }
.btn .small{ font-weight: 700; font-size: 12px; opacity: .9; }

.hero-card{
  border-radius: var(--radius2);
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow2);
  overflow:hidden;
}
.hero-card .inner{ padding: 18px; }
.stat{
  display:flex; align-items:baseline; justify-content:space-between;
  padding: 14px 0;
  border-bottom:1px solid var(--stroke);
}
.stat:last-child{ border-bottom:0; padding-bottom: 6px; }
.stat .k{ color: var(--muted); font-size: 13px; }
.stat .v{ font-weight: 760; letter-spacing:-0.02em; }
.hero-art{
  height: 190px;
  background:
    url("../img/hero-powerbi-dark.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

[data-theme="light"] .hero-art{
  height: 190px;
  background:
    url("../img/hero-powerbi-light.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---- Section headers ---- */
.h2{
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0 0 10px 0;
}
.p{ color: var(--muted); margin: 0; max-width: 74ch; }
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:18px;
  margin-bottom: 22px;
}
.section-head .meta{ color: var(--muted2); font-size: 13px; }

/* ---- Cards / grids ---- */
.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 920px){
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
}
.card{
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  padding: 16px;
}
.card.soft{ padding: 18px; }
.card .title{ font-weight: 760; letter-spacing: -0.01em; margin: 0 0 6px 0; }
.card .desc{ margin: 0; color: var(--muted); font-size: 14px; }
.card .row{ display:flex; align-items:center; justify-content:space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tags{ display:flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag{
  font-size: 12px; color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
}

/* ---- Project cards ---- */
.project-card{
  overflow:hidden;
  padding:0;
}
.project-card .cover{
  height: 170px;
  border-bottom:1px solid var(--stroke);
  background: center / cover no-repeat;
}
.project-card .body{ padding: 16px; }
.project-card .meta{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  color: var(--muted2);
  font-size: 13px;
}
.project-card .meta .dot{ width:4px; height:4px; border-radius:50%; background: var(--muted2); opacity:.8; }

/* ---- Lists ---- */
.bullets{ margin: 12px 0 0 0; padding-left: 18px; color: var(--muted); }
.bullets li{ margin: 6px 0; }
.kpi{
  display:flex; gap: 10px; align-items:flex-start;
}
.kpi .n{
  font-weight: 840;
  font-size: 22px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, rgba(124,58,237,1), rgba(34,211,238,1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kpi .t{ color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---- Filters ---- */
.filterbar{
  display:flex; align-items:center; justify-content:space-between; flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 18px 0;
}
.filterbar .chips{ display:flex; gap: 8px; flex-wrap: wrap; }
.chip{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--muted);
  cursor:pointer;
  transition: transform .18s, background .25s, border-color .25s, color .25s;
  font-size: 13px;
  user-select:none;
}
.chip:hover{ transform: translateY(-1px); background: var(--surface2); border-color: rgba(124,58,237,0.30); color: var(--text); }
.chip.active{ background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-color: rgba(124,58,237,0.45); color: var(--text); }
.search{
  display:flex; align-items:center; gap: 10px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
}
.search input{
  border: 0; background: transparent; color: var(--text);
  min-width: 220px; outline: none;
}
.search .icon{ width: 18px; height: 18px; color: var(--muted); }

/* ---- Project detail ---- */
.breadcrumbs{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  color: var(--muted2); font-size: 13px;
}
.breadcrumbs a{ color: var(--muted); }
.breadcrumbs a:hover{ color: var(--text); }
.detail-head{
  display:grid; grid-template-columns: 1.1fr .9fr; gap: 14px; align-items: start;
}
@media (max-width: 920px){ .detail-head{ grid-template-columns: 1fr; } }
.figure{
  border-radius: var(--radius2);
  border: 1px solid var(--stroke);
  overflow:hidden;
  background: var(--surface);
}
.figure .cap{ padding: 12px 14px; border-top: 1px solid var(--stroke); color: var(--muted); font-size: 13px; }
.iframe-wrap{
  border-radius: var(--radius2);
  border: 1px solid var(--stroke);
  overflow:hidden;
  background: #000;
}
.iframe-wrap iframe{ width:100%; height: 520px; border: 0; display:block; background: #000; }
@media (max-width: 920px){
  .iframe-wrap iframe{ height: 420px; }
}
.codebox{
  font-family: var(--mono);
  font-size: 12.5px;
  color: color-mix(in srgb, var(--text) 90%, transparent);
  background: color-mix(in srgb, var(--surface2) 80%, transparent);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 14px;
  overflow:auto;
  white-space: pre;
}

/* ---- Forms ---- */
.form{
  display:grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.form .full{ grid-column: 1 / -1; }
.field{
  display:flex; flex-direction:column; gap: 6px;
}
label{ font-size: 13px; color: var(--muted); }
input, textarea{
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  padding: 12px 12px;
  color: var(--text);
  outline: none;
}
textarea{ resize: vertical; min-height: 120px; }
.hint{ font-size: 12px; color: var(--muted2); }
.err{ font-size: 12px; color: #fca5a5; display:none; }
.field.invalid .err{ display:block; }
.field.invalid input, .field.invalid textarea{ border-color: rgba(239,68,68,0.55); }

/* ---- Footer ---- */
.footer{
  padding: 42px 0;
  border-top: 1px solid var(--stroke);
}
.footer-grid{
  display:flex; align-items:flex-start; justify-content:space-between; gap: 16px; flex-wrap: wrap;
}
.footer .links{ display:flex; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.footer .links a:hover{ color: var(--text); }
.small{ color: var(--muted2); font-size: 13px; }
