/*
Theme Name:  ChiapettaDev
Theme URI:   https://chiapettadev.site
Author:      Iago Filgueiras Chiapetta
Author URI:  https://chiapettadev.site
Description: Tema dark portfolio para desenvolvedor full-stack com Customizer completo
Version:     1.6.2
License:     GPL-2.0-or-later
Text Domain: chiapettadev
*/

/* =========================================================
   ChiapettaDev Theme v1.6.2 – style.css
   ---------------------------------------------------------
   • Suporte completo à barra administrativa WordPress
   • Links da navbar totalmente funcionais
   • Navbar responsiva otimizada para smartphones
   • Single post com imagem destacada melhor ajustada
   • Mantém design escuro profissional
   ========================================================= */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: #f4f4f4;
  background: #0d0d0d;
  line-height: 1.6;
  /* padding-top é definido dinamicamente no functions.php */
}

/* ---------- Paleta de Cores ---------- */
:root {
  --primary: #2bdcb5;
  --secondary: #9b2dff;
  --bg-dark: #0d0d0d;
  --bg-mid: #151515;
  --bg-light: #1d1d1d;
  --text-main: #efefef;
  --text-muted: #a6a6a6;
}

/* ---------- Utilidades ---------- */
.container {
  width: 92%;
  max-width: 1200px;
  margin-inline: auto;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-size: clamp(1.8rem, 1.5vw + 1.4rem, 2.4rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  width: 80px;
  height: 3px;
  background: var(--primary);
  display: block;
  margin: 0.75rem auto 0;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary);
  color: var(--bg-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn-outline:hover {
  background: var(--secondary);
  color: var(--bg-dark);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ---------- SKIP LINK (Acessibilidade) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 6px;
  z-index: 999999;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--bg-dark);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 6px;
}

/* ---------- HERO ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, #1e1e1e 0%, #0d0d0d 100%);
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  /* altura e margens definidas dinamicamente no functions.php */
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw + 1rem, 4.2rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero h1 span {
  color: var(--primary);
}

.hero h2 {
  font-size: clamp(1.2rem, 2vw + 0.5rem, 1.8rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 2rem;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero__social {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  color: var(--primary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.hero__social a:hover {
  background: var(--primary);
  color: var(--bg-dark);
  transform: translateY(-2px);
}

/* ---------- SOBRE ---------- */
.about {
  background: var(--bg-mid);
}

.about__wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
  gap: 3rem;
}

.about__img {
  text-align: center;
}

.about__img img {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  border: 3px solid var(--primary);
  transition: transform 0.3s ease;
}

.about__img img:hover {
  transform: scale(1.05);
}

.placeholder-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  border: 2px dashed var(--primary);
  border-radius: 8px;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

.placeholder-image i {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.about__content h3 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.about__content > p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.about__details {
  display: grid;
  gap: 2rem;
}

.detail-item h4 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-item h4 i {
  font-size: 1rem;
}

.detail-item p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- HABILIDADES ---------- */
.skills {
  background: var(--bg-light);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.skill-card {
  background: #121212;
  border: 2px solid transparent;
  padding: 1.5rem 1rem 2rem;
  width: 100%;
  text-align: center;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.skill-card:hover::before {
  transform: scaleX(1);
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--secondary);
  box-shadow: 0 10px 25px rgba(155, 45, 255, 0.1);
}

.skill-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.skill-card h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: #2b2b2b;
  overflow: hidden;
  position: relative;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 1.5s ease;
  border-radius: 3px;
}

/* ---------- PROJETOS ---------- */
.projects {
  background: var(--bg-mid);
}

.projects__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.project-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  background: #121212;
}

.project-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.project-card img {
  width: 100%;
  display: block;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-info {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 13, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 2rem;
  text-align: center;
}

.project-card:hover .project-info {
  opacity: 1;
}

.project-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

.project-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-tech {
  margin-bottom: 1.5rem;
}

.project-tech small {
  color: var(--secondary);
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Placeholder para projetos não configurados */
.project-card.placeholder {
  border: 2px dashed var(--primary);
  background: transparent;
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 220px;
  color: var(--text-muted);
  text-align: center;
}

.placeholder-content i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.placeholder-content h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* ---------- BLOG ---------- */
.blog {
  background: var(--bg-light);
}

.blog__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.post-card {
  background: #121212;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #1b1b1b;
  transition: all 0.3s ease;
}

.post-card:hover {
  border-color: var(--secondary);
  transform: translateY(-3px);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-card .post-content {
  padding: 1.5rem;
}

.post-content h4 a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.post-content h4 a:hover {
  color: var(--primary);
}

.post-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 1rem 0;
  line-height: 1.6;
}

.no-posts {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 0;
  grid-column: 1 / -1;
}

.no-posts a {
  color: var(--primary);
  text-decoration: none;
}

.no-posts a:hover {
  text-decoration: underline;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: #080808;
  padding: 3rem 0 2rem;
  border-top: 1px solid #1a1a1a;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: center;
  align-items: start;
}

.footer-social {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  color: var(--primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--bg-dark);
}

.footer-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-contact p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-contact a {
  color: var(--primary);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-contact i {
  color: var(--primary);
  width: 16px;
}

/* ---------- RESPONSIVIDADE PARA SMARTPHONES ---------- */
@media (max-width: 768px) {
  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .about__wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .skills__grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ---------- RESPONSIVIDADE EXTRA PARA SMARTPHONES PEQUENOS ---------- */
@media (max-width: 480px) {
  .container {
    width: 95%;
  }

  .section {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .hero h2 {
    font-size: clamp(1rem, 4vw, 1.4rem);
  }

  .hero__social a {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .skill-card {
    padding: 1rem 0.8rem 1.5rem;
  }

  .skill-card i {
    font-size: 2rem;
  }
}

@media (min-width: 768px) {
  .about { 
    padding: 5rem 0; 
  }

  .section-title { 
    font-size: 2.2rem; 
  }
}

@media (min-width: 1024px) {
  .about__wrapper { 
    grid-template-columns: 1fr 1.5fr;
    text-align: left;
  }

  .about__img {
    text-align: center;
  }
}

/* ---------- ANIMAÇÕES ---------- */
.animate-in {
  animation: slideInUp 0.6s ease forwards;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- SCROLLBAR PERSONALIZADA ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* ---------- ACESSIBILIDADE ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states para acessibilidade */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- PRINT STYLES ---------- */
@media print {
  .site-header,
  .hero__social,
  .mobile-menu-toggle,
  .site-footer {
    display: none !important;
  }

  body {
    padding-top: 0;
    background: white;
    color: black;
  }

  .section {
    page-break-inside: avoid;
  }
}