/* ================================================================
   styles.css : portfólio de Arnaldo Chebl
   Design: hero escuro + grid de cards com filtros por categoria.
   ================================================================ */

:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #101828;
  --muted: #5a6a82;
  --line: #e4e9f2;
  --accent: #4f46e5;
  --hero1: #0b1226;
  --hero2: #141c40;
  --hero3: #1d2a66;
}

/* ---- neutraliza o layout padrão do Quarto/Bootstrap ---- */
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
}
#quarto-content { display: block !important; padding: 0 !important; margin: 0 !important; }
main.content, #quarto-document-content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  grid-column: unset !important;
}
#title-block-header { display: none; }
::selection { background: #c7d6ff; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ================= HERO ================= */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--hero1) 0%, var(--hero2) 55%, var(--hero3) 100%);
  color: #fff;
  text-align: center;
  padding: 84px 0 72px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 320px at 12% 10%, rgba(14, 163, 113, .20), transparent 60%),
    radial-gradient(620px 360px at 88% 16%, rgba(124, 92, 240, .26), transparent 60%),
    radial-gradient(520px 320px at 60% 100%, rgba(224, 138, 0, .14), transparent 60%);
}
.hero .wrap { position: relative; }
.avatar {
  width: 86px;
  height: 86px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(135deg, #34d399, #7c5cf0);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .12), 0 12px 30px rgba(0, 0, 0, .35);
}
.eyebrow {
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #93c5fd;
  font-weight: 600;
  margin: 0 0 10px;
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 0 0 8px;
  color: #fff;
}
.role {
  display: inline-block;
  font-size: .92rem;
  font-weight: 700;
  color: #c4d1f7;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 5px 16px;
  margin: 0 0 20px;
}
.tagline {
  max-width: 620px;
  margin: 0 auto;
  color: #c7d2e4;
  font-size: clamp(1rem, 2vw, 1.13rem);
}
.ctas {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: .93rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn.primary { background: #fff; color: var(--hero1); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .4); color: var(--hero1); text-decoration: none; }
.btn.ghost { border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.btn.dark { background: #fff; color: var(--hero1); }
.btn.dark:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); color: var(--hero1); text-decoration: none; }
.heronote {
  margin: 30px 0 0;
  font-size: .82rem;
  color: #8fa0ba;
  letter-spacing: .02em;
}

/* ================= SEÇÃO DE PROJETOS ================= */
#projetos { padding-top: 64px; }
.sechead h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.015em;
  margin: 0 0 8px;
  color: var(--ink);
}
.sechead p { color: var(--muted); max-width: 640px; margin: 0; font-size: .98rem; }

/* filtros */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 22px; }
.chip {
  border: 1.5px solid #dfe5ee;
  background: var(--card);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  color: #46536a;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.chip span { opacity: .55; font-size: .78rem; font-weight: 700; margin-left: 3px; }
.chip:hover { border-color: #94a3b8; transform: translateY(-1px); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on span { opacity: .7; }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* grid de cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.pcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -12px rgba(16, 24, 40, .18);
  border-color: #c7d2fe;
  color: inherit;
  text-decoration: none;
}
.pcard:hover .arr { transform: translateX(3px); }
.pcard:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.ptop { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.picon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: var(--tint, #eef2f7);
  flex: none;
}
.pbadges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pcat {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.cat-ml   { background: #e3f7ef; color: #047857; }
.cat-nlp  { background: #efeafe; color: #6d28d9; }
.cat-dash { background: #e3f2fd; color: #0369a1; }
.cat-an   { background: #fdf1dc; color: #b45309; }

.ptitle { font-size: 1.13rem; font-weight: 700; line-height: 1.35; margin: 0 0 8px; color: var(--ink); }
.pdesc { font-size: .92rem; color: var(--muted); line-height: 1.6; margin: 0 0 16px; flex-grow: 1; }
.ptags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.ptags span {
  font-size: .74rem;
  font-weight: 600;
  color: #46536a;
  background: #f1f4f9;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px 9px;
}
.pfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  font-size: .86rem;
}
.plink { font-weight: 700; color: var(--accent); }
.arr { display: inline-block; transition: transform .2s ease; }
.phost {
  font-size: .73rem;
  color: #8794a8;
  background: #f6f8fc;
  border: 1px solid #edf0f6;
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* card em destaque */
.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ffffff 30%, #f7f6ff 100%);
  border-color: #ddd8fb;
}
.ribbon {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .35);
}
.fwrap {
  display: grid;
  grid-template-columns: 1.7fr .9fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 6px;
}
.featured .pbadges { justify-content: flex-start; margin-right: 90px; }
.fmetrics { display: grid; gap: 10px; }
.fm {
  background: #fff;
  border: 1px solid #e7e3fc;
  border-radius: 12px;
  padding: 11px 16px;
}
.fm b { display: block; font-size: 1.3rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.fm small { color: var(--muted); font-size: .78rem; }

/* chamada final */
.talk {
  margin-top: 56px;
  background: linear-gradient(150deg, var(--hero1), var(--hero3));
  color: #fff;
  border-radius: 20px;
  padding: 34px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.talk h2 { color: #fff; font-size: 1.4rem; font-weight: 800; margin: 0 0 6px; }
.talk p { color: #b6c2d6; margin: 0; max-width: 560px; font-size: .95rem; }

/* rodapé */
.pfooter { margin-top: 64px; border-top: 1px solid var(--line); padding: 26px 0 34px; color: #8794a8; font-size: .85rem; }
.pfooter .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ================= ANIMAÇÕES ================= */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.hide { display: none !important; }
.pop { animation: pop .35s ease; }
@keyframes pop {
  from { opacity: .25; transform: scale(.97); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pcard, .btn, .chip, .arr { transition: none; }
  .pop { animation: none; }
}

/* ================= RESPONSIVO ================= */
@media (max-width: 860px) {
  .fwrap { grid-template-columns: 1fr; gap: 18px; }
  .fmetrics { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
@media (max-width: 640px) {
  .hero { padding: 64px 0 56px; }
  .wrap { padding: 0 18px; }
  #projetos { padding-top: 48px; }
  .grid { grid-template-columns: 1fr; }
  .talk { padding: 26px 22px; }
  .pfooter .wrap { flex-direction: column; }
  .featured .pbadges { margin-right: 0; }
}
