/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */
:root {
  /* Cores Principais */
  --cor-fundo-principal: #101014; /* Preto Escuro/Quase Preto */
  --cor-fundo-secundario: #1b1b21; /* Cinza Escuro para cards */
  --cor-destaque: #0035ff;        /* LARANJA DOURADO QUEIMADO (Destaque) */
  --cor-texto-claro: #a42ae1;     /* Branco Suave */
  --cor-texto-secundario: #ffffff;   /* Cinza Claro para textos menores */

  /* Espaçamentos e Fontes */
  --espacamento-secao: 80px;
  --sombra-card: 0 4px 6px rgba(0, 0, 0, 0.4);
}

html, body {
  background-color: var(--cor-fundo-principal);
  color: var(--cor-texto-claro);
  font-family: 'Arial', sans-serif;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

/* 2. Ajuste de Estilos de Links e Seleções */
a {
  color: var(--cor-destaque);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--cor-texto-claro);
}

/* Sobreescrevendo o reset do Boilerplate para o modo Dark */
::-moz-selection {
  background: var(--cor-destaque);
  color: var(--cor-fundo-principal);
  text-shadow: none;
}

::selection {
  background: var(--cor-destaque);
  color: var(--cor-fundo-principal);
  text-shadow: none;
}

/* ==========================================================================
   Estilos do Layout
   ========================================================================== */

/*Estilo do Cabeçalho e Navegação*/
.header {
  background-color: var(--cor-fundo-principal);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

.container-nav{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo{
  font-size: 1.5rem;
  color: var(--cor-texto-claro);
}

.menu a{
  margin-left: 30px;
  font-size: 1.0rem;
  color: var(--cor-texto-claro);
  opacity: 0.8;
}

.menu a:hover{
  color: var(--cor-destaque);
  opacity: 1;
}

/* Estilo da Seção Home */
.home-section {
  display: flex;
  justify-content: space-around;
  align-items: center;
  min-height: 100vh;
  padding-top: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.home-content {
  max-width: 50%;
  margin-right: 50px;
}

.greeting {
  font-size: 1.2rem;
  color: var(--cor-texto-secundario);
  margin-bottom: 5px;
}

.name {
  font-size: 3rem;
  color: var(--cor-destaque);
  font-weight: bold;
  margin: 0 0 10px 0;
}

.role {
  font-size: 1.5rem;
  color: var(--cor-texto-claro);
  margin-top: 0;
}

/* Estilo da Imagem e Círculo */
.home-image {
  position: relative;
  width: 330px;
  height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.yellow-circle {
  position: absolute;
  width: 450px;
  height: 450px;
  background-color: var(--cor-destaque);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(253, 219, 0, 0.4);
}

.home-image img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* ==========================================================================
   Estilos da Seção PERFIL PROFISSIONAL (Sobre Mim)
   ========================================================================== */
.perfil-content {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 50px; /* Espaço entre imagem e texto */
  margin-top: 20px;
}

.perfil-image {
  flex-shrink: 0;
  max-width: 50%;
}

.perfil-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.perfil-text {
  max-width: 60%;
}

.perfil-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--cor-texto-claro);
  margin-bottom: 20px;
}

.perfil-roles {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.role-badge {
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--cor-fundo-principal);
  background-color: var(--cor-texto-secundario);
  transition: background-color 0.3s;
}

.role-badge.active {
  background-color: var(--cor-destaque);
  color: var(--cor-fundo-principal);
}


/* ==========================================================================
   Estilos de Seções (Global)
   ========================================================================== */
.section-padding {
  padding: var(--espacamento-secao) 20px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  color: var(--cor-destaque);
  margin-top: 0;
  margin-bottom: 5px;
  padding-bottom: 10px;
  position: relative;
  display: inline-block;
}

/* Efeito de Sublinhado */
.section-title::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 4px;
  background-color: var(--cor-destaque);
  left: 20%;
  bottom: 0;
  transition: width 0.5s ease;
}

/* ==========================================================================
   Estilos para o Efeito Máquina de Escrever (CORRIGIDO E FINALIZADO)
   ========================================================================== */
.animated-cursor {
  display: inline-block;
  vertical-align: bottom;
  /* CORREÇÃO: Remove a margem de separação para colar no texto */
  margin-left: 0;
  background-color: var(--cor-destaque);

  height: 3px;

  transform-origin: left;
  transition: width 0.1s;

  /* MANTÉM: O movimento de 2px para baixo (Y) e 5px para a esquerda (X) */
  transform: translateY(2px) translateX(-5px);

  animation: growAndShrink 4s infinite ease-in-out;
}

@keyframes growAndShrink {
  0% {
    transform: scaleX(0); /* Começa invisível */
  }
  50% {
    transform: scaleX(1); /* Cresce completamente */
  }
  100% {
    transform: scaleX(0); /* Volta a encolher */
  }
}

.animated-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--cor-destaque);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.4);
    opacity: 1;
  }
}
/* ==========================================================================
   Estilos da Seção CONHECIMENTOS - FINAL E COLADO (ORDEM INVERTIDA)
   ========================================================================== */

/* 1. Contêiner de Botões (knowledge-tabs-container) */
.knowledge-tabs-container {
  display: flex;
  justify-content: center;

  margin-top: 40px;
  margin-bottom: 20px;
}

/* 2. Estilizando os Botões de Troca de Abas */
.tab-button {
  background-color: var(--cor-fundo-principal);
  border: none;
  color: var(--cor-texto-claro);
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  border-radius: 8px; /* Arredonda o botão */
}

.tab-button:hover {
  background-color: #2c2c36;
}

.tab-button.active {
  background-color: var(--cor-destaque);
  color: var(--cor-fundo-principal);
  font-weight: bold;
}

/* 3. Estilizando os Ícones (Contêiner) */
.knowledge-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 30px;
  padding: 20px;
  margin-top: 5px;
  margin-bottom: 30px;

  background-color: var(--cor-fundo-secundario);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);

  justify-items: center;
  align-items: center;

  /* PROPRIEDADES DE TRANSIÇÃO (FADE/SLIDE) */
  opacity: 1;
  max-height: 500px;
  visibility: visible;
  transition: opacity 0.4s ease-in-out,
  max-height 0.4s ease-in-out,
  visibility 0.4s;
}

/* CLASSE PARA O EFEITO DE FADE OUT/COLAPSO */
.knowledge-icons.hidden-tab {
  opacity: 0;
  max-height: 0;
  visibility: hidden;
  overflow: hidden;

  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
}

/* EFEITO STAGGERED (SLIDE-UP) NOS ÍCONES */
.knowledge-icons img,
.knowledge-icons svg {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transform: translateY(0);
  opacity: 1;

  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

/* EFEITO HOVER */
.knowledge-icons img:hover,
.knowledge-icons svg:hover {
  transform: scale(1.15);
  cursor: pointer;
  filter: drop-shadow(0 0 5px rgba(253, 219, 0, 0.6));
}

/* EFEITO STAGGERED PARA ÍCONES ESCONDIDOS */
.knowledge-icons.hidden-tab img {
  transform: translateY(25px);
  opacity: 0;

  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}


/* ==========================================================================
   Estilos da Seção PROJETOS
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.project-card {
  background-color: var(--cor-fundo-secundario);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);

  /* Efeito Hover de Elevação (Lift Effect) */
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
}

.project-card img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.project-card h3 {
  color: var(--cor-destaque);
  margin: 10px 0 5px 0;
  font-size: 1.4rem;
}

.project-card p {
  color: var(--cor-texto-secundario);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Estilo dos Botões de Ação */
.card-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn {
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--cor-destaque);
  color: var(--cor-fundo-principal);
}

.btn-primary:hover {
  background-color: #ffc400;
}

.btn-secondary {
  background-color: var(--cor-fundo-secundario);
  color: var(--cor-texto-claro);
  border: 1px solid var(--cor-texto-secundario);
}

.btn-secondary:hover {
  background-color: var(--cor-texto-claro);
  color: var(--cor-fundo-principal);
}


/* ==========================================================================
   Estilos da Seção SERVIÇOS
   ========================================================================== */
.services-grid {
  display: grid;
  /* FORÇA O LAYOUT 2X2: Duas colunas com tamanhos iguais */
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: var(--cor-fundo-secundario);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--sombra-card);

  /* Efeito Hover Sutil */
  transition: background-color 0.3s ease-in-out;
}

.service-card:hover {
  background-color: #2c2c36;
}

.service-card h3 {
  color: var(--cor-destaque);
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 5px;
}

.service-card p {
  color: var(--cor-texto-secundario);
  font-size: 0.9rem;
  margin: 0;
  max-width: 80%;
  text-align: left;
}

.price-icon {
  font-size: 2rem;
  font-weight: bold;
  color: var(--cor-fundo-principal);
  background-color: var(--cor-destaque);
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}


/* ==========================================================================
   Estilos da Seção CONTATO
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.contact-card {
  background-color: var(--cor-destaque);
  color: var(--cor-fundo-principal);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  min-height: 180px;

  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.6);
}

.contact-card img {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
}

.contact-card span {
  color: var(--cor-fundo-principal);
  font-size: 1.2rem;
}


/* ==========================================================================
   Estilos do RODAPÉ (FOOTER)
   ========================================================================== */
.footer {
  background-color: #050508;
  color: var(--cor-texto-claro);
  padding: 40px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-container, .footer-social {
  display: flex;
  flex-direction: column;
}

.footer-container {
  gap: 50px;
  flex-direction: row;
}

.footer-info h3 {
  color: var(--cor-destaque);
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 5px;
}

.footer-info p {
  font-size: 0.9rem;
  color: var(--cor-texto-secundario);
  margin: 0;
}

.footer-links h4, .footer-social h4 {
  font-size: 1.1rem;
  color: var(--cor-texto-claro);
  margin-top: 0;
  margin-bottom: 15px;
}

.footer-links a, .footer-social a {
  color: var(--cor-texto-secundario);
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.footer-links a:hover, .footer-social a:hover {
  color: var(--cor-destaque);
}


/* ==========================================================================
   Estilos de Resets e Helper Classes (limpeza)
   ========================================================================== */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

.hidden,
[hidden] {
  display: none !important;
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

.invisible {
  visibility: hidden;
}

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (MAX-WIDTH: 768px)
   ========================================================================== */
@media only screen and (max-width: 768px) {

  /* 1. SEÇÕES GERAIS E HOME */
  .section-padding {
    padding: 40px 15px; /* Reduz o padding vertical e horizontal */
  }

  .container-nav {
    padding: 0 15px;
  }

  /* Oculta o menu de navegação do cabeçalho em telas pequenas */
  .menu {
    display: none;
  }

  /* 2. HOME: Empilhar Conteúdo (Texto em cima, Foto embaixo) */
  .home-section {
    flex-direction: column; /* Altera para empilhar verticalmente */
    min-height: auto;
    padding-top: 100px;
  }

  .home-content {
    max-width: 100%; /* Ocupa a largura total */
    margin-right: 0; /* Remove a margem que separava da foto */
    text-align: center;
    margin-bottom: 40px;
  }

  /* Centraliza e reduz o tamanho da imagem na Home */
  .home-image {
    width: 300px;
    height: 300px;
    margin-bottom: 40px;
  }

  .yellow-circle {
    width: 300px;
    height: 300px;
  }

  .name {
    font-size: 2.5rem; /* Reduz o tamanho do nome */
  }

  .role {
    font-size: 1.2rem; /* Reduz o tamanho do cargo */
  }

  /* 3. PERFIL PROFISSIONAL (SOBRE MIM) */
  .perfil-content {
    flex-direction: column; /* Empilha a imagem e o texto */
    gap: 20px;
    margin-top: 20px;
    text-align: center;
  }

  .perfil-image,
  .perfil-text {
    max-width: 100%;
    text-align: center;
  }

  .perfil-roles {
    justify-content: center; /* Centraliza os botões de destaque */
  }

  /* 4. SEÇÕES COM GRID (CONHECIMENTOS, PROJETOS, SERVIÇOS, CONTATO) */

  /* Conhecimentos: Ícones em 4 colunas (máximo 6 para evitar quebra) */
  .knowledge-icons {
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 15px;
  }

  /* Projetos e Contato: Layout de 1 coluna */
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Serviços: Layout de 1 coluna */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* 5. RODAPÉ (FOOTER) */
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
  }

  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
}
