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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  color: #222;
  background: #f5f5f5;
  transition: background-color 0.5s ease, color 0.5s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------------- Smoke Effect ---------------- */
#smoke-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------------- Header & Nav ---------------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffffdd;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 999;
}

nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.brand-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-weight: 500;
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #520101;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ---------------- Social Bar ---------------- */
.social-bar {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background: #121212;
  padding: 0.75rem 0.5rem;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 998;
}

.social-bar a {
  font-size: 1.25rem;
  color: #eeecec;
  transition: color 0.2s ease;
}

.social-bar a:hover {
  color: #520101;
}

/* ---------------- Sections ---------------- */
section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 1rem 64px;
  text-align: center;
  gap: 1.5rem;
}

/* ---------- Hero ---------- */
#home {
  background-size: 60px 60px;
}

#home h1 {
  font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
  font-weight: 800;
}

#home p {
  max-width: 600px;
  font-size: 1.1rem;
  line-height: 1.55;
}

.btn-primary {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border-radius: 6px;
  background: #520101;
  color: #eeecec;
  font-weight: 600;
  transition: transform 0.2s;
}

.btn-primary:hover {
  transform: translateY(-3px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap; 
  padding: 0.85rem 2.5rem;
  border-radius: 6px;
  background: #520101;
  color: #eeecec;
  font-weight: 600;
  transition: transform 0.2s;
}

.btn-secondary:hover {
  transform: translateY(-3px);
}

#smoke-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Sobre / Seções ---------- */
#sobre h2,
#projetos h2,
#tecnologias h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#sobre p {
  max-width: 700px;
  line-height: 1.6;
}

/* ---------- Projetos ---------- */
.projects-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
}

.project-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card h3 {
  font-size: 1.25rem;
  padding-bottom: 5px;
  padding-top: 10px;
}

.project-card a {
  color: #eeecec;
}

.project-card p {
  padding-bottom: 15px;
}

.project-card p:has(.btn-secondary) { 
  display: flex; 
  justify-content: center;
  gap: 15px; 
  flex-wrap: wrap; 
  margin-top: auto
}

.project-photo {
  border-radius: 10px;
}

.project-logo {
  width: 24px; 
  height: auto; 
}

/* ---------- Tecnologias ---------- */
.tech-item {
  display: flex;
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  text-align: center; 
  font-weight: 600;
  background: #ffffff;
  border: 2px solid #e0e0e0;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  padding: 1rem; 
  border-radius: 8px;
  gap: 0.5rem; 
  min-width: 120px; 
  min-height: 120px; 
  margin-right: 20px;
  flex-shrink: 0; 
  flex-grow: 0;
}

.tech-list-container {
  width: 100%; 
  max-width: 1000px; 
  overflow: hidden; 
  white-space: nowrap; 
  padding: 20px 0;
  margin: 0 auto;
}

.tech-item img {
  width: 48px; 
  height: 48px;
  object-fit: contain;
}

.tech-list-inner {
  display: flex; 
  animation: scrollTechnologies 50s linear infinite; 
  width: 2535px;
}

.tech-list-inner:hover {
  animation-play-state: paused;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 1.5rem 0;
  background: #fff;
  font-size: 0.9rem;
}

/* ---------- MUSIC PLAYER ---------- */
#music-player {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  z-index: 1000;
}

#music-player button {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

#music-player input[type="range"] {
  width: 90px;
}

/* ---------- Botao do idioma ---------- */
#translate-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: #1e1e1e;
  color: #eeecec;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#translate-button:hover {
  background-color: #520101;
  transform: scale(1.05);
}

/* ---------- Botão de tema ---------- */
#theme-toggle {
  position: fixed;
  left: 0;
  top: calc(49% - 120px);
  background: #121212;
  color: #eeecec;
  border-radius: 0 8px 8px 0;
  border: none;
  padding: 0.75rem;
  font-size: 1.2rem;
  z-index: 998;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
  width: 37px;
  height: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#theme-toggle:hover {
  background-color: #520101;
}

/* ---------- Tema Escuro ---------- */
body.dark {
  background: #121212;
  color: #eeecec;
}

body.dark header,
body.dark footer {
  background: #1e1e1e;
  color: #eeecec;
}

body.dark .project-card,
body.dark .tech-item {
  background: #1c1c1c;
  border-color: #333;
}

body.dark .btn-primary {
  background: #520101;
}

body.dark .nav-links a {
  color: #eeecec;
}

body.dark .nav-links a::after {
  background: #520101;
}

body.dark .social-bar {
  background: #eeecec;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.493);
}

body.dark .social-bar a {
  color: #1e1e1e;
}

body.dark .social-bar a:hover {
  color: #520101;
}

body.dark .tech-item {
  background: #1c1c1c;
}

body.dark #translate-button {
  background-color: #eeecec;
  color: #1e1e1e;
}

body.dark #translate-button:hover {
  background-color: #520101;
  color: #eeecec;
  border: 2px solid #1e1e1e;
  box-shadow: none;
}

body.dark #theme-toggle {
  background: #eeecec;
  color: #1e1e1e;
}

body.dark #theme-toggle:hover {
  background: #520101;
  color: #fff;
}

/* ---------- Animação de rolagem contínua ---------- */
@keyframes scrollTechnologies {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
  }
  .social-bar {
    display: none;
  }
}