/* styles.css */

/* ================================
   VARIÁVEIS DE TEMA (:root)
   ================================ */
:root {
  --bg-dark: #1c1c1c;          /* Preto fosco conforme imagem */
  --bg-light: #ffffff;
  --text-dark: #1c1c1c;
  --text-light: #f5f5f5;
  --accent: #f25c00;
  --card-bg-dark: #2a2a2a;     /* Leve contraste com o fundo fosco */
  --card-bg-light: #f9f9f9;
  --container-max: 1200px;
  scroll-behavior: smooth;
}

/* ============================
   RESET E BOX-SIZING
   ============================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ================================
   ESTILOS GLOBAIS DO BODY E TEMA
   ================================ */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  transition: background-color 0.3s, color 0.3s;
}

body.light {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* ============================
   HEADER FIXO
   ============================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-dark);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

body.light header {
  background-color: var(--bg-light);
}

/* ================================
   CONTAINER DE NAVEGAÇÃO (NAV-CONTAINER)
   ================================ */
.nav-container {
  max-width: var(--container-max);
  margin: auto;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 20px;
  position: relative;
  justify-content: space-between;
}

/* ============================
   LOGO E BOTÃO DE TEMA (THEME-BTN)
   ============================ */
.logo {
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--accent); /* Aplica laranja em ambos os temas */
}

body.light .logo {
  color: var(--accent);
}

.theme-btn {
  background: var(--accent);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: opacity 0.2s;
}

.theme-btn:hover {
  opacity: 0.8;
}

/* ================================
   MENU DE NAVEGAÇÃO (NAV UL E NAV A)
   ================================ */
nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
}

nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

/* ============================
   HAMBURGER (MENU TOGGLE)
   ============================ */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ================================
   MAIN E CONTAINER
   ================================ */
main {
  padding-top: 80px;
}

.container {
  max-width: var(--container-max);
  margin: auto;
  padding: 80px 20px;
}

/* ================================
   HERO (SEÇÃO #INICIO)
   ================================ */
#inicio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

#inicio .text {
  flex: 1;
  min-width: 300px;
}

#inicio h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

#inicio h1 span {
  color: var(--accent);
}

#inicio p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  max-width: 600px;
  margin-bottom: 1.5rem;
}

/* ============================
   BOTÕES (CLASS .BTN)
   ============================ */
.btn {
  display: inline-block;
  width: 240px;
  height: 48px;
  line-height: 48px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  border-radius: 4px;
  transition: opacity 0.2s;
  margin-right: 16px;
  margin-bottom: 12px;
}

.btn:hover {
  opacity: 0.8;
}

/* ================================
   IMAGEM DO HERO (#INICIO IMG)
   ================================ */
#inicio img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent);
}

/* ============================
   TÍTULOS DE SEÇÃO (H2)
   ============================ */
h2 {
  font-size: 2rem;
  position: relative;
  margin-bottom: 40px;
}

h2::after {
  content: '';
  width: 60px;
  height: 4px;
  background: var(--accent);
  position: absolute;
  left: 0;
  bottom: -10px;
  border-radius: 2px;
}

/* ================================
   ESTILOS DA SEÇÃO DE CONTATO (#CONTATO)
   ================================ */
#contato .contact-intro {
  font-size: 1rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

.contact-flex {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.contact-info {
  flex: 1;
  min-width: 280px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
}

.info-item i {
  font-size: 1.2rem;
  color: var(--accent);
  margin-right: 12px;
  margin-top: 4px;
}

.info-item h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.info-item a {
  display: block;
  font-size: 0.95rem;
  color: inherit;
  text-decoration: none;
}

.contact-form {
  flex: 1;
  min-width: 300px;
}

.form-card {
  background: var(--card-bg-dark);
  padding: 24px;
  border-radius: 8px;
}

body.light .form-card {
  background: var(--card-bg-light);
}

.form-card form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-card form input,
.form-card form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #333;
  border-radius: 4px;
  background: var(--bg-dark);
  color: var(--text-light);
  transition: background 0.3s, color 0.3s;
}

body.light .form-card form input,
body.light .form-card form textarea {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid #ccc;
}

.form-card form button {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.form-card form small {
  display: block;
  margin-top: 12px;
  font-size: 0.8rem;
  color: #aaa;
}

/* ============================
   MEDIA QUERY: DESKTOP (>=769px)
   ============================ */
@media (min-width: 769px) {
  .nav-container {
    max-width: var(--container-max);
    margin: 0 auto;               /* centraliza o conjunto na página */
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  nav {
    flex: 1;
    display: flex;
    justify-content: center;      /* centraliza itens internos do <nav> */
  }

  .logo,
  .theme-selector {
    position: static;             /* remove posicionamentos absolutos */
  }
}

/* ============================
   MEDIA QUERY: MOBILE & TABLET (<=768px)
   ============================ */
@media (max-width: 768px) {
  nav {
    display: none;                /* esconde menu padrão */
  }

  .theme-selector {
    display: flex;                /* mantém theme-switcher visível */
    order: 3;                     /* depois do menu-toggle e da logo */
  }

  .nav-container {
    justify-content: space-between;
    align-items: center;
  }

  .menu-toggle {
    display: flex;
    order: 1;
  }

  .logo {
    order: 2;
    margin-left: 0;               /* remove auto para que siga fluxo */
  }

  nav.open {
    display: block;
    width: auto;
  }

  nav.open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    background: var(--accent);
    padding: 12px 24px;
    gap: 12px;
    border-radius: 4px;
    white-space: nowrap;
  }

  nav.open ul a {
    color: #fff;
    font-size: 1rem;
  }

  /* Hero em coluna + foto primeiro */
  #inicio {
    flex-direction: column;
    text-align: center;
  }

  #inicio img {
    order: -1;
    margin-bottom: 20px;
  }

  #inicio .text,
  #inicio img {
    width: 100%;
    max-width: 300px;
    margin: auto;
  }

  /* Contato empilhado */
  .contact-flex {
    flex-direction: column;
    gap: 20px;
  }

  /* Ajuste de padding do container */
  .container {
    padding: 40px 10px;
  }
}

/* ================================
   GRID DE CARDS NA SEÇÃO “SOBRE MIM” (INFO-CARDS)
   ================================ */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: var(--container-max);
  margin: 24px auto 0; /* Espaço equilibrado abaixo do texto */
}

.info-cards .card {
  background: var(--card-bg-dark);
  padding: 20px;
  border-radius: 8px;
  transition: background 0.3s;
}

body.light .info-cards .card {
  background: var(--card-bg-light);
}

.info-cards .card h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
  color: var(--text-light);
}

body.light .info-cards .card h3 {
  color: var(--text-dark);
}

.info-cards .card p {
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--text-light);
}

body.light .info-cards .card p {
  color: var(--text-dark);
}

/* ============================
   JUSTIFICAÇÃO DE PARÁGRAFOS
   ============================ */
.justificado {
  text-align: justify;
}

/* ================================
   AJUSTE DE ROLAGEM PARA ANCORAS (SCROLL-MARGIN)
   ================================ */
section {
  scroll-margin-top: 60px;
}

/* ============================
   AJUSTES NA SEÇÃO “SOBRE” (#SOBRE)
   ============================ */
#sobre {
  margin-bottom: 10px; /* Reduz espaço abaixo do texto */
  padding-bottom: 0;
}

#sobre p:last-child {
  margin-bottom: 0;    /* Remove margem extra no último parágrafo */
}

/* ================================
   THEME SWITCHER
   ================================ */
.theme-selector {
  position: relative;
  display: inline-block;
  margin-left: 16px;
}

.theme-options {
  position: absolute;
  top: 110%;
  right: 0;
  background: var(--card-bg-light);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 50;
  min-width: 140px;
  transition: opacity 0.2s;
}

body:not(.light) .theme-options {
  background: var(--card-bg-dark);
}

.theme-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 12px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
}

body:not(.light) .theme-option {
  color: var(--text-light);
}

.theme-option i {
  margin-right: 8px;
}

.theme-option:hover,
.theme-option:focus {
  background: rgba(0, 0, 0, 0.05);
}

body:not(.light) .theme-option:hover,
body:not(.light) .theme-option:focus {
  background: rgba(255, 255, 255, 0.1);
}

.hidden {
  display: none;
}

/* ================================
   ESTILOS PARA CARDS DE HABILIDADES (#HABILIDADES .CARDS)
   ================================ */
#habilidades .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

#habilidades .cards .card {
  background: var(--card-bg-dark);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;

  /* transições para background, movimento e sombra */
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

body.light #habilidades .cards .card {
  background: var(--card-bg-light);
}

#habilidades .cards .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

#habilidades .cards .card i {
  font-size: 1.8rem;
  color: var(--accent);
}

#habilidades .cards .card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-light);
}

body.light #habilidades .cards .card h3 {
  color: var(--text-dark);
}

#habilidades .cards .card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-light);
}

body.light #habilidades .cards .card p {
  color: var(--text-dark);
}


/* ================================
   ESTILOS DA SEÇÃO EXPERIÊNCIAS (TIMELINE)
   ================================ */
#experiencias {
  padding: 60px 20px;
}

#experiencias h2 {
  font-size: 36px;
  margin-bottom: 40px;
  border-bottom: none; /* sem risco laranja */
}

.timeline {
  position: relative;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-dot {
  position: absolute;
  left: -10px;
  top: 0;
  width: 16px;
  height: 16px;
  background-color: var(--accent);
  border-radius: 50%;
}

.timeline-content {
  margin-left: 20px;
}

.timeline-content h3 {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
}

.timeline-content p {
  margin: 5px 0;
  line-height: 1.5;
}

/* Nome da empresa e período sempre em laranja */
.timeline-content .empresa {
  color: var(--accent) !important;
  font-weight: 500;
}

/* ================================
   AJUSTES DE TEMA PARA TIMELINE
   ================================ */
body:not(.light) .timeline-content h3,
body:not(.light) .timeline-content p {
  color: var(--text-light) !important;  /* Título e texto brancos no tema escuro */
}

body.light .timeline-content h3,
body.light .timeline-content p {
  color: var(--text-dark) !important;   /* Título e texto pretos no tema claro */
}

/* Empresa/período sempre laranja e negrito */
body:not(.light) .timeline-content .empresa,
body.light .timeline-content .empresa {
  color: var(--accent) !important;
  font-weight: bold !important;
}

/* ================================
   ESTILOS DA SEÇÃO PROJETOS
   ================================ */
#projetos {
  padding: 80px 20px;            /* Já existe .container, mas garantimos espaçamento vertical */
  scroll-margin-top: 60px;       /* Para âncoras não ficarem sob o header fixo */
}

#projetos h2 {
  color: var(--text-light);
  margin-bottom: 40px;
  /* O ::after já vem do seu h2 genérico */
}

/* Grid de cards específicos de Projetos */
#projetos .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Cada card de projeto */
#projetos .card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

#projetos .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Topo do card: ícone sobre fundo claro */
#projetos .card-top {
  background-color: var(--card-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
}

#projetos .card-top i {
  font-size: 2.5rem;
  color: var(--accent);
}

/* Corpo do card: fundo escuro / claro conforme tema */
#projetos .card-bottom {
  background-color: var(--card-bg-dark);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

body.light #projetos .card-bottom {
  background-color: var(--card-bg-light);
}

/* Título do projeto */
#projetos .card-bottom h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

body.light #projetos .card-bottom h3 {
  color: var(--text-dark);
}

/* Descrição do projeto */
#projetos .card-bottom p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  flex-grow: 1;
  line-height: 1.4;
}

body.light #projetos .card-bottom p {
  color: var(--text-dark);
}

body.light #projetos h2 {
  color: var(--text-dark);
}

/* Tags (pílulas) do projeto */
#projetos .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#projetos .tags span {
  display: inline-block;
  background-color: var(--card-bg-light);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
}

body.light #projetos .tags span {
  background-color: var(--card-bg-dark);
  /* mantém o texto laranja em ambos os temas */
}

/* ============================
   RESPONSIVIDADE - PROJETOS
   ============================ */
@media (max-width: 768px) {
  #projetos {
    padding: 60px 10px;
  }

  #projetos h2 {
    font-size: 1.75rem;
    margin-bottom: 30px;
  }

  #projetos .card-top {
    height: 100px;
  }

  #projetos .card-top i {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  #projetos .cards {
    grid-template-columns: 1fr;
  }

  #projetos h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
}

/* ================================
   ESTILOS DA SEÇÃO CERTIFICAÇÕES
   ================================ */
#certificacoes {
  padding: 80px 20px;            /* Espaçamento vertical */
  scroll-margin-top: 60px;       /* Ajuste para âncora abaixo do header fixo */
}

#certificacoes h2 {
  /* O estilo de h2 (underline laranja etc.) já está definido globalmente */
  margin-bottom: 40px;
}

/* Grid de cards de certificações */
#certificacoes .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Cada card de certificação */
#certificacoes .card {
  background: var(--card-bg-dark);
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

body.light #certificacoes .card {
  background: var(--card-bg-light);
}

#certificacoes .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Ícone no canto superior-left do card de certificação */
#certificacoes .card-icon i {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* Título da certificação */
#certificacoes .card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: var(--text-light);
}

body.light #certificacoes .card h3 {
  color: var(--text-dark);
}

/* Nome do emissor */
#certificacoes .card .issuer {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-light);
}

body.light #certificacoes .card .issuer {
  color: var(--text-dark);
}

/* Ano da certificação */
#certificacoes .card .year {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

/* ============================
   RESPONSIVIDADE - CERTIFICAÇÕES
   ============================ */
@media (max-width: 768px) {
  #certificacoes {
    padding: 60px 10px;
  }

  #certificacoes h2 {
    font-size: 1.75rem;
    margin-bottom: 30px;
  }

  #certificacoes .card-icon i {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  #certificacoes .cards {
    grid-template-columns: 1fr;
  }

  #certificacoes h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
}

/* ==============================
   STYLE DO RODAPÉ
   ============================== */
.site-footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 40px 20px 20px; /* espaçamento interno */
  font-family: 'Segoe UI', sans-serif;
}

body.light .site-footer {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* Container principal: alinha itens horizontalmente */
.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* === LADO ESQUERDO: nome e cargo === */
.footer-info h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--accent); /* mantêm o nome em laranja */
}

body.light .footer-info h4 {
  color: var(--accent);
}

.footer-info span {
  display: block;
  font-size: 0.95rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* === LADO DIREITO: ícones sociais === */
.footer-socials a {
  margin-left: 16px;
  font-size: 1.4rem;
  color: var(--text-light);
  transition: color 0.2s;
}

.footer-socials a:first-child {
  margin-left: 0; /* remove margem do primeiro ícone */
}

.footer-socials a:hover {
  color: var(--accent);
}

body.light .footer-socials a {
  color: var(--text-dark);
}

body.light .footer-socials a:hover {
  color: var(--accent);
}

/* === COPYRIGHT ABAIXO === */
.footer-copy {
  text-align: center;
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}

.footer-copy small {
  font-size: 0.85rem;
  color: var(--text-light);
}

body.light .footer-copy small {
  color: var(--text-dark);
}

/* === RESPONSIVIDADE MÍNIMA === */
@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-socials a {
    margin-left: 12px;
    margin-right: 12px;
  }
}

/* ===== ÍCONES SOCIAIS NO RODAPÉ ===== */
/* Cor padrão (laranja) e sem sublinhado */
.footer-socials a {
  margin-left: 16px;
  font-size: 1.4rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

/* Remove margem do primeiro ícone */
.footer-socials a:first-child {
  margin-left: 0;
}

/* Hover no tema escuro: ícone fica branco */
.footer-socials a:hover {
  color: var(--text-light);
}

/* No tema claro, mantém laranja por padrão */
body.light .footer-socials a {
  color: var(--accent);
}

/* Hover no tema claro: ícone fica preto */
body.light .footer-socials a:hover {
  color: var(--text-dark);
}

/* ================================
   LINKS DENTRO DA CARD (FORMAÇÃO)
   ================================ */

/* 1) Deixa todo link sublinhado para ficar evidente que é clicável */
.card p a {
  text-decoration: underline;
  cursor: pointer;
}

/* 2) No tema escuro (quando NÃO há a classe .light no <body>), força o link em branco */
body:not(.light) .card p a {
  color: var(--text-light) !important;  /* var(--text-light) já é #f5f5f5 por padrão */
}

/* 3) No tema claro (quando existe a classe .light no <body>), força o link em preto */
body.light .card p a {
  color: var(--text-dark) !important;   /* var(--text-dark) já é #1c1c1c por padrão */
}
