/* =========================
   BASE / TOKENS
========================= */
:root{
  --bg: #0b0f17;
  --bg2: #0f172a;
  --card: #121a2e;
  --text: #e6e8ee;
  --muted: #a7b0c0;
  --line: rgba(255,255,255,.10);
  --accent: #7c5cff;
  --accent2: #22c55e;

  --radius: 18px;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --max: 1120px;

  --header-height: 90px;
  --footer-height: 110px;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(1000px 600px at 100% 10%, rgba(34,197,94,.12), transparent 55%),
    var(--bg);
  padding-bottom: var(--footer-height);
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

.container{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* âncoras com offset do header */
#inicio,
#tecnologias,
#resumo,
#projetos,
#contato{
  scroll-margin-top: calc(var(--header-height) + 24px);
}

/* =========================
   SKIP LINK
========================= */
.skip-link{
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 12px;
}
.skip-link:focus{
  left: 16px;
  z-index: 9999;
}

/* =========================
   HEADER / NAV
========================= */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,15,23,.65);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 0 6px rgba(124,92,255,.12);
}

.brand__text{
  font-weight: 700;
  letter-spacing: .2px;
}

.nav{
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__link{
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 999px;
  transition: transform .15s ease, color .15s ease, background .15s ease;
}

.nav__link:hover{
  color: var(--text);
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

.nav-toggle{
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.nav-toggle__bar{
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
}

/* =========================
   SECTIONS
========================= */
.section{
  padding: var(--space-6) 0;
}

.section--alt{
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 25%, rgba(255,255,255,.02));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__header{
  margin-bottom: var(--space-4);
}

.section__title{
  margin: 0 0 var(--space-1) 0;
  font-size: 30px;
  letter-spacing: .2px;
}

.section__subtitle{
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

/* =========================
   HERO
========================= */
.hero--center{ text-align: center; }

.hero__center{
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

#inicio.hero{
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
}

.avatar{
  width: 190px;
  height: 190px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(124,92,255,.45);
  box-shadow: 0 0 0 8px rgba(124,92,255,.12);
  margin-bottom: var(--space-1);
}

.avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.title{
  margin: 0;
  font-size: 42px;
  line-height: 1.05;
}

.role{
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}

.role span{
  color: var(--accent);
  font-weight: 600;
}

.subtitle{
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
  line-height: 1.55;
}

.hero__cta{
  margin-top: var(--space-2);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== Tecnologias: centralizado e ícones padronizados ===== */

.skills{
  display: grid;
  gap: 18px;
}

.skill{
  max-width: 1100px;   
  margin: 0 auto;      
}

.skill__category{
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.skill__category .sep{
  margin: 0 6px;
  opacity: .6;
}


.tech-grid{
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(96px, max-content));
  justify-content: center;
  margin: 12px auto 0;
  width: 100%;
}
.tech{
  width: 96px;
  max-width: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}

.tech__icon{
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}
.tech__icon img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Texto */
.tech span{
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
}

/* Seção Tecnologias ocupa 1 tela */
#tecnologias{
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  display: flex;
  align-items: center;
}

/* Centraliza o título e o hint dentro do card de Tecnologias */
#tecnologias .card{
  display: flex;
  flex-direction: column;
}

#tecnologias .card__title{
  text-align: center;
}

/* “Bloco” do topo centralizado verticalmente */
#tecnologias .card__title{
  margin-top: 0;
}

#tecnologias .card__title{
  align-self: center;
}

#tecnologias .card{
  gap: 0;
}

#tecnologias .card__title{
  padding-top: 12px;
}

/* Centraliza conteúdo verticalmente */
#tecnologias .hero__tech{
  width: 100%;
}

/* Evita overflow feio */
.skills{
  max-height: calc(100vh - var(--header-height) - var(--footer-height) - 160px);
  overflow: auto;
  padding-right: 6px;
}

/* Scroll bonito (opcional) */
.skills::-webkit-scrollbar{ width: 8px; }
.skills::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.15);
  border-radius: 999px;
}

/* ===== Resumo Profissional em tela cheia ===== */
#resumo{
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center; /* centraliza verticalmente */
}

#resumo .container{
  width: 100%;
}

#resumo.section{
  padding-top: 72px;
  padding-bottom: 72px;
}

#resumo .container{
  max-width: 1100px;
}


.resume-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.resume-card{
  background: rgba(18,26,46,.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.resume-card h3{
  margin: 0 0 10px 0;
  font-size: 16px;
}

.resume-card p{
  margin: 0 0 12px 0;
  color: var(--muted);
  line-height: 1.6;
}

.resume-list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.resume-list li{
  margin: 8px 0;
}

.resume-approach{
  margin-top: 18px;
  background: rgba(18,26,46,.55);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.resume-approach__title{
  margin: 0 0 10px 0;
  font-size: 16px;
}

.resume-approach p{
  margin: 0 0 10px 0;
  color: var(--muted);
  line-height: 1.6;
}

.skill__category{
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .3px;
}

.badges{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge{
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(124,92,255,.14);
  color: var(--text);
  transition: transform .15s ease, background .15s ease;
}

.badge:hover{
  transform: translateY(-2px);
  background: rgba(124,92,255,.28);
}


.pill{
  display:inline-flex; align-items:center; gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(124,92,255,.10);
  font-size: 12px;
  color: var(--text);
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(124,92,255,.35);
  background: rgba(124,92,255,.18);
  color: var(--text);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ transform: translateY(-1px); background: rgba(124,92,255,.24); border-color: rgba(124,92,255,.55); }
.btn--ghost{
  border-color: var(--line);
  background: rgba(255,255,255,.04);
}
.btn--ghost:hover{ background: rgba(255,255,255,.07); }
.btn--small{ padding: 9px 12px; font-size: 14px; }

/* Projects */
.projects-group{
  margin-top: var(--space-5);
}

.projects-group__title{
  margin: 0 0 var(--space-3) 0;
  font-size: 18px;
}

.projects-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}

.project-card{
  display: flex;
  flex-direction: column;
  background: rgba(18,26,46,.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .15s ease;
}

.project-card:hover{
  transform: translateY(-3px);
}

.project-image{
  height: 160px;
  background: rgba(255,255,255,.05);
}

.project-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content{
  padding: var(--space-3);
}

.project-content h4{
  margin: 0 0 6px 0;
  font-size: 16px;
}

.project-content p{
  margin: 0 0 10px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.project-stack{
  display: block;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
}

.project-links{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-links a{
  font-size: 13px;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
}

.project-links a:hover{
  background: rgba(124,92,255,.18);
}


/* Footer */
.footer{
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 50;
  background: rgba(10,14,24,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}

.footer__content{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 14px 0;
}

.footer__info h3{
  margin: 0 0 4px 0;
  font-size: 16px;
}

.footer__info p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer__contacts{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer__contact{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-size: 14px;
  transition: transform .15s ease, background .15s ease;
}

.footer__contact:hover{
  transform: translateY(-2px);
  background: rgba(124,92,255,.18);
}

.footer__icon{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  font-weight: 700;
  font-size: 12px;
}

/* Mobile */
@media (max-width: 720px){
  .footer__content{
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__contacts{
    justify-content: center;
  }

  .footer__bottom{
    justify-content: center;
  }
  .footer__content{
    padding: 16px 0;
  }

  .footer__contacts{
    gap: 10px;
  }
}


/* Scroll indicator */
.hero__scroll{ margin-top: 18px; display:flex; justify-content:center; }
.scroll-indicator{
  display:flex; align-items:center; gap:10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255,255,255,.03);
}
.scroll-indicator__dot{
  width:8px; height:8px; border-radius:999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(124,92,255,.10);
}

/* Reveal animation */
.reveal{
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

/* Em telas grandes, fica ainda mais compacto (mais colunas) */
@media (min-width: 1100px){
  #tecnologias .tech-grid{
    grid-template-columns: repeat(10, 1fr);
  }
}

@media (max-width: 980px){
  .hero__grid{ grid-template-columns: 1fr; }
  .card--sticky{ position: relative; top: 0; }
  .hero__left{ grid-template-columns: 1fr; }
  .contact{ grid-template-columns: 1fr; }
  .project__grid{ grid-template-columns: 1fr; }
}

@media (max-width: 780px){
  .nav-toggle{ display:inline-block; }
  .nav{
    position:absolute;
    right: 20px;
    top: 64px;
    display:none;
    flex-direction:column;
    width: min(320px, calc(100% - 40px));
    background: rgba(18,26,46,.92);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    box-shadow: var(--shadow);
  }
  .nav.is-open{ display:flex; }
  .nav__link{ width:100%; }
  .grid-2{ grid-template-columns: 1fr; }
}

@media (max-height: 720px) {
  #inicio.hero {
    min-height: auto;
  }
  :root{
    --footer-height: 150px;
  }
  .footer{
    position: static;
  }
  body{
    padding-bottom: 0;
  }
  .footer__content{
    padding: 16px 0;
  }

  .footer__contacts{
    gap: 10px;
  }
}

/* Em mobile, mantém legível */
@media (max-width: 520px){
  #tecnologias .tech-grid{
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
  }
  #tecnologias .tech{
    max-width: none;
  }
}
