
:root {
  --primary: #8B5CF6;
  --secondary: #3B82F6;
  --bg: #0f172a;
  --text: #f8fafc;
  --card-bg: rgba(30, 41, 59, 0.8);
  --shadow: rgba(0, 0, 0, 0.2);
  --border: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] {
  --primary: #8B5CF6;
  --secondary: #3B82F6;
  --bg: #0f172a;
  --text: #f8fafc;
  --card-bg: rgba(30, 41, 59, 0.8);
  --shadow: rgba(0, 0, 0, 0.2);
  --border: rgba(255, 255, 255, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.5s ease, color 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.animated-background svg {
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.blob {
  animation: blob-animation 25s infinite;
  fill: var(--primary);
  opacity: 0.1;
}

.blob2 {
  animation: blob-animation 30s infinite reverse;
  fill: var(--secondary);
  opacity: 0.1;
}

@keyframes blob-animation {
  0% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(10%, 10%) scale(1.1);
  }
  50% {
    transform: translate(0, 20%) scale(0.9);
  }
  75% {
    transform: translate(-10%, 10%) scale(1.1);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

.header {
  animation: float 6s ease-in-out infinite;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  padding: 4rem 2rem;
  position: relative;
  backdrop-filter: var(--glass-effect);
  justify-items: center;
}

.header::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.2), transparent 70%),
              radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.2), transparent 70%);
  z-index: 1;
}

.header h1 {
  position: relative;
  z-index: 2;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

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

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-effect);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 6px var(--shadow);
  transition: transform 0.3s ease;
  animation: slideIn 0.6s ease-out;
  animation-fill-mode: both;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card h3 {
  color: var(--secondary);
  margin-bottom: 1rem;
}

.project-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.skills-section, .portfolio-section, .about-section {
  margin-top: 3rem;
}

.skill-item {
  background: var(--card-bg);
  backdrop-filter: var(--glass-effect);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: left;
  box-shadow: 0 2px 4px var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.skill-item .skill-icon {
  width: 64px;
  height: 64px;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.skill-item:hover .skill-icon {
  transform: scale(1.1);
}

.skill-item h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  text-align: center;
}

.skill-item .skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  width: 100%;
}

.skill-item .skill-list li {
  padding: 0.5rem;
  margin: 0.5rem 0;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.skill-item .skill-list li:hover {
  background: rgba(124, 58, 237, 0.2);
  transform: translateX(5px);
}

.portfolio-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--secondary);
  padding-bottom: 1rem;
}

.tab-button {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.tab-button:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.tab-button.active {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
}


.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  height: 650px;
  box-sizing: content-box;
  height: auto; /* Permite crescimento */
  overflow: visible; /* Garante que o conteúdo seja exibido */
}

.portfolio-item {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  backdrop-filter: var(--glass-effect);
  box-shadow: 0 4px 6px var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px var(--shadow);
}

.portfolio-item-content {
  display: flex; /* Define layout flexbox */
  flex-wrap: wrap; /* Permite quebra de linha para os itens */
  gap: 1rem; /* Espaçamento entre os itens */
  justify-content: flex-start; /* Alinha itens à esquerda */
  align-items: flex-start; /* Garante que os itens fiquem alinhados ao topo */
  padding-left: 25px; /* Espaçamento interno do contêiner */
  padding-right: 25px; /* Espaçamento interno do contêiner */
  padding-bottom: 35px;
  box-sizing: border-box; /* Inclui padding no cálculo do tamanho */
  
}

.portfolio-item img, .portfolio-item video {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.about-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  background: var(--card-bg);
  backdrop-filter: var(--glass-effect);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 4px 6px var(--shadow);
}

.about-photo {
  width: 100%;
  aspect-ratio: 1;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.photo-placeholder:hover {
  background: #e0e0e0;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;

}

.photo-icon {
  width: 64px;
  height: 64px;
  color: #666;
  margin-bottom: 1rem;
}

.about-content {
  padding: 1rem 0;
}

.about-text {
  margin: 1rem 0;
  line-height: 1.8;
  color: #ffffff;
}

.about-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.detail-item {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .portfolio-tabs {
    flex-wrap: wrap;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .about-photo {
    max-width: 300px;
    margin: 0 auto;
  }
}


.contents-portfolio-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  position: fixed;
  top: 1rem;
  width: 350px;
  height: 320px;
  background: var(--card-bg);
  backdrop-filter: var(--glass-effect);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 4px 6px var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  padding: 1rem;
  box-sizing: border-box;
  
}

.contents-portfolio-item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px var(--shadow);
}

.portfolio-item h3 {
  color: var(--secondary);
  position: relative;
  animation: wave 2s infinite;
}


.video-portfolio-item {
    position: relative; /* Garante que elementos posicionados dentro do div sejam relativos ao container */
     /* Cria um espaçamento para manter a proporção de 16:9 (altura é 56.25% da largura) */
    overflow: clip; /* Garante que o conteúdo dentro do container não ultrapasse suas bordas */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px; /* Define a altura do vídeo para 16:9 */
    position: relative;
  }

  .video-portfolio-item iframe {
    top: 0; /* Alinha o topo do iframe ao topo do container */
    left: 0; /* Alinha o lado esquerdo do iframe ao lado esquerdo do container */
    width: 100%; /* O iframe ocupa 100% da largura do container pai */
    height: 100%; /* O iframe ocupa 100% da altura do container pai */
    border: none; /* Remove bordas indesejadas do iframe */
  }

  .footer {
    background: var(--card-bg);
    backdrop-filter: var(--glass-effect);
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text); /* Cor do texto */
    padding: 20px 0; /* Espaçamento superior e inferior */
    text-align: center; /* Alinha o conteúdo ao centro */
    position: relative;
    bottom: 0;
    width: 100%;
  }

  .footer-content {
    max-width: 1200px; /* Largura máxima do conteúdo */
    margin: 0 auto; /* Centraliza o conteúdo dentro do footer */
  }

  .footer p {
    margin: 10px 0; /* Espaçamento entre as linhas */
    font-size: 14px; /* Tamanho da fonte */
  }

  .footer a {
    color: #1abc9c; /* Cor do link */
    text-decoration: none; /* Remove o sublinhado */
  }

  .footer a:hover {
    text-decoration: underline; /* Sublinha o link ao passar o mouse */
  }
