/* =========================
   THEME TOKENS
   ========================= */

/* Dark (default) */
:root,
html[data-theme="dark"]{
  --bg: #0b0f19;
  --bg-soft: rgba(255,255,255,.03);
  --text: #e9eefc;
  --muted:#b7c2e2;
  --line: rgba(255,255,255,.10);

  --card: rgba(255,255,255,.04);
  --card-hover: rgba(255,255,255,.055);

  --brand:#7c5cff;
  --brand2:#22d3ee;

  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius: 18px;

  --header-bg: rgba(11,15,25,.72);
  --hero-grad-1: rgba(124,92,255,.22);
  --hero-grad-2: rgba(34,211,238,.12);

  color-scheme: dark;
}

/* Light */
html[data-theme="light"]{
  --bg: #f7f8fc;
  --bg-soft: rgba(0,0,0,.03);
  --text:#0d1324;
  --muted:#4b587a;
  --line: rgba(0,0,0,.10);

  --card: rgba(255,255,255,.78);
  --card-hover: rgba(255,255,255,.92);

  --brand:#5b3dff;
  --brand2:#06b6d4;

  --shadow: 0 18px 60px rgba(13,19,36,.10);
  --radius: 18px;

  --header-bg: rgba(247,248,252,.72);
  --hero-grad-1: rgba(91,61,255,.14);
  --hero-grad-2: rgba(6,182,212,.10);

  color-scheme: light;
}

/* =========================
   BASE
   ========================= */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 15% 10%, var(--hero-grad-1), transparent 60%),
    radial-gradient(1000px 600px at 85% 30%, var(--hero-grad-2), transparent 55%),
    var(--bg);
  transition: background .25s ease, color .25s ease;
}

a{ color:inherit; text-decoration:none; }
p{ line-height:1.7; color:var(--muted); margin:0 0 14px; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

.container{
  width:min(1080px, calc(100% - 40px));
  margin:0 auto;
}

/* =========================
   HEADER
   ========================= */
.header{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  transition: background .25s ease, border-color .25s ease;
}

.header__wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:14px;
  position:relative;
}

.header__actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.2px;
}

.brand__dot{
  width:12px;height:12px;border-radius:999px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}

.brand__name{ opacity:.95; }

.nav{ display:flex; gap:18px; align-items:center; }

.nav__link{
  color:var(--muted);
  font-weight:600;
  font-size:14px;
  padding:10px 10px;
  border-radius:12px;
  transition: .2s ease;
  outline:none;
}

.nav__link:hover{ color:var(--text); background:var(--bg-soft); }

.nav__link.is-active{
  color:var(--text);
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent);
}

.nav__toggle{
  display:none;
  width:44px;height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background: var(--bg-soft);
  cursor:pointer;
}

.nav__toggle span{
  display:block;
  height:2px;
  width:18px;
  margin:4px auto;
  background: var(--text);
  opacity:.9;
  border-radius:2px;
}

/* Theme button */
.theme-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 800;
  cursor:pointer;
  transition: .2s ease;
  white-space:nowrap;
}

.theme-btn:hover{ transform: translateY(-1px); }

.theme-btn__icon{
  width: 18px;
  display:inline-flex;
  justify-content:center;
}

.theme-btn__text{
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

/* =========================
   HERO
   ========================= */
.hero{ padding:54px 0 18px; }

.hero__grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  align-items:center;
  gap:32px;
}

.hero__eyebrow{
  margin:0 0 8px;
  color: color-mix(in srgb, var(--text) 82%, transparent);
  font-weight:800;
  letter-spacing:.5px;
}

.hero__title{
  margin:0 0 14px;
  font-size: clamp(34px, 4vw, 52px);
  line-height:1.05;
  font-weight: 800;
}

.hero__subtitle{
  margin:0 0 22px;
  font-size: 16px;
  max-width: 60ch;
}

.hero__cta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:18px 0 16px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius: 14px;
  font-weight: 700;
  border:1px solid var(--line);
  transition: .2s ease;
  gap:10px;
  background: var(--bg-soft);
}

.btn--primary{
  background: linear-gradient(
    135deg,
    var(--brand),
    color-mix(in srgb, var(--brand2) 28%, #5b8cff)
  );
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
  box-shadow: 0 18px 60px color-mix(in srgb, var(--brand) 16%, transparent);
  color: #fff;
}

.btn--primary:hover{ transform: translateY(-1px); }

.btn--ghost:hover{
  background: color-mix(in srgb, var(--bg-soft) 60%, transparent);
  transform: translateY(-1px);
}

.social{ display:flex; flex-wrap:wrap; gap:10px; }

.social__link{
  font-size: 13px;
  color: var(--muted);
  padding:8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.social__link:hover{
  color:var(--text);
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
}

.hero__note{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

.pill{
  font-size: 12px;
  color: color-mix(in srgb, var(--text) 92%, transparent);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 999px;
}

.hero__media{
  border-radius: var(--radius);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--card) 55%, transparent),
    color-mix(in srgb, var(--bg-soft) 35%, transparent)
  );
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
  min-height: 320px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

/* FOTO DO HERO (diminuída + circular + borda + sombra) */
.hero__media img{
  width: 100%;
  max-width: 300px;        /* 👈 tamanho no desktop */
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--brand) 40%, transparent);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--brand) 35%, transparent);
  display:block;
}

/* Placeholder (caso imagem não carregue) */
.media__placeholder{
  width:100%;
  border-radius: 16px;
  border: 1px dashed color-mix(in srgb, var(--line) 90%, transparent);
  background: var(--bg-soft);
  padding: 18px;
  color: color-mix(in srgb, var(--text) 75%, transparent);
  font-size: 13px;
  line-height:1.5;
}

.media__placeholder strong{ color: var(--text); }

/* =========================
   HERO FALLBACK (se a imagem falhar)
   ========================= */
#heroFallback{
  display:none;                 /* começa escondido (JS controla) */
  max-width: 360px;
  text-align: center;
}

#heroFallback code{
  display:inline-block;
  margin-top:10px;
  padding:8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 75%, transparent);
  color: color-mix(in srgb, var(--text) 88%, transparent);
  font-size: 12px;
  word-break: break-all;
}

/* =========================
   SECTIONS
   ========================= */
.section{ padding:54px 0; }

.section--alt{
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--bg-soft) 70%, transparent),
    transparent
  );
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .25s ease, border-color .25s ease;
}

.section__title{
  margin:0 0 16px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing:.2px;
}

.card{
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}

.badge{
  font-size: 12px;
  color: color-mix(in srgb, var(--text) 90%, transparent);
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

/* Cards de soluções */
.grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}

.tile{
  padding:16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: .2s ease, background .25s ease, border-color .25s ease;
}

.tile:hover{
  transform: translateY(-2px);
  background: var(--card-hover);
}

.tile__title{
  margin:0 0 8px;
  font-size: 15px;
  font-weight: 800;
}

.tile__text{
  margin:0;
  font-size: 13px;
}

/* =========================
   TECH SKILLS (LOGOS + HOVER)
   ========================= */

/* Se você ainda estiver usando os chips antigos, isso mantém compatível */
.skills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding-top: 6px;
}

.chip{
  font-size: 13px;
  color: color-mix(in srgb, var(--text) 92%, transparent);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
}

/* Nova versão com logos (recomendado) */
.skills--logos{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin-top: 20px;
  padding-top: 0;
}

.skill{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding:18px 12px;
  border-radius:16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);

  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  cursor: default;
}

.skill img{
  width: 40px;
  height: 40px;
  object-fit: contain;

  /* começa “mais neutro” e fica colorido no hover */
  filter: grayscale(100%) opacity(.85);
  transition: transform .25s ease, filter .25s ease;
}

.skill span{
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: color .25s ease;
}

.skill:hover{
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--brand) 25%, transparent);
  background: var(--card-hover);
}

.skill:hover img{
  filter: grayscale(0%) opacity(1);
  transform: scale(1.10);
}

.skill:hover span{
  color: var(--text);
}

/* =========================
   CONTACT
   ========================= */
.contact{ display:grid; gap:14px; }

.contact__lead{ margin:0 0 14px; }

.contact__grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}

.contact__item{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-weight: 700;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.contact__item:hover{
  color: var(--text);
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
  transform: translateY(-1px);
}

.footer{
  padding: 6px 0 0;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  font-size: 13px;
  text-align:center;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 980px){
  .hero__grid{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .contact__grid{ grid-template-columns: 1fr; }
}

@media (max-width: 768px){
  /* Foto menor no mobile */
  .hero__media img{
    max-width: 220px;
  }

  /* Skills com logos: 2 colunas no mobile */
  .skills--logos{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px){
  .nav{ display:none; }
  .nav__toggle{ display:block; }

  body.nav-open .nav{
    display:flex;
    position:absolute;
    top:64px;
    right:0;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    padding:10px;
    width:min(260px, calc(100% - 40px));
    background: var(--header-bg);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  body.nav-open .nav__link{ padding:12px 12px; }
  .grid{ grid-template-columns: 1fr; }
  .theme-btn__text{ display:none; }
}
