.portfolio-wrapper {
  min-height: 100vh;
  width: 100%;
  background: radial-gradient(125% 125% at 50% 100%, #000000 40%, #010133 100%);
  color: white;
  padding-bottom: 50px;
}

.portfolio-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 0;
}

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

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a1a1aa;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.3s;
}

.back-link:hover {
  color: white;
}

.portfolio-logo img {
  height: 40px;
  width: auto;
}

.btn-cta-small {
  background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 75, 142, 0.4);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  transition:
    transform 0.2s,
    background 0.2s;
}

.btn-cta-small:hover {
  transform: translateY(-2px);
}

.portfolio-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portfolio-intro {
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
}

.portfolio-title {
  font-size: 3rem;
  margin-bottom: 15px;
  line-height: 1.1;
}

.portfolio-desc {
  color: #a1a1aa;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.portfolio-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.p-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  color: #71717a;
}

.p-stat strong {
  font-size: 1.2rem;
  color: white;
}

.stat-sep {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #a1a1aa;
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn .count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.filter-btn.active,
.filter-btn:hover {
  background: #004b8e;
  border-color: #004b8e;
  color: white;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
}

@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-title {
    font-size: 1.8rem;
  }

  .portfolio-stats-row {
    flex-wrap: wrap;
  }

  .portfolio-logo img {
    height: 30px;
  }

  .btn-cta-small {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .back-link span {
    display: none;
  }
}

/* Light Mode Overrides */
body.light-mode .portfolio-wrapper {
  background: #ffffff;
  color: #010528;
}

body.light-mode .portfolio-header {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .back-link {
  color: #555560;
}

body.light-mode .back-link:hover {
  color: #004b8e;
}

body.light-mode .p-stat strong {
  color: #010528;
}

body.light-mode .stat-sep {
  background: rgba(0, 0, 0, 0.1);
}

body.light-mode .filter-btn {
  border-color: rgba(0, 0, 0, 0.1);
  color: #555560;
}

body.light-mode .filter-btn .count {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .filter-btn.active,
body.light-mode .filter-btn:hover {
  background: #004b8e;
  border-color: #004b8e;
  color: white;
}

/* =========================================
   ANIMAÇÕES DE ENTRADA (FADE IN UP)
   ========================================= */


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

.animate-up {
    opacity: 0; 
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}