/* Portfolio page legacy-inspired styling */
body.portfolio-page .portfolio-hero {
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
}

body.portfolio-page .portfolio-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(45, 156, 219, 0.15), transparent 60%);
  pointer-events: none;
}

body.portfolio-page .portfolio-hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

body.portfolio-page .portfolio-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2rem;
}

body.portfolio-page .portfolio-hero-title .title-line {
  display: block;
}

body.portfolio-page .portfolio-hero-description {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
  margin: 0 auto 3rem;
  max-width: 680px;
}

body.portfolio-page .portfolio-hero-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

body.portfolio-page .portfolio-stat-card {
  min-width: 160px;
  padding: 1.75rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

body.portfolio-page .portfolio-stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

body.portfolio-page .portfolio-stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Partners showcase */
body.portfolio-page .partners-showcase {
  padding: 6rem 0;
}

body.portfolio-page .partners-intro {
  text-align: center;
  margin-bottom: 3rem;
}

body.portfolio-page .partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

body.portfolio-page .partner-project {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 25px 60px rgba(5, 11, 24, 0.35);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

body.portfolio-page .partner-project::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

body.portfolio-page .partner-project:hover {
  transform: translateY(-12px);
  box-shadow: 0 35px 80px rgba(5, 11, 24, 0.45);
}

body.portfolio-page .partner-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.portfolio-page .partner-logo-wrapper {
  display: flex;
  justify-content: center;
}

body.portfolio-page .partner-logo {
  width: 110px;
  height: 110px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: hidden;
  position: relative;
}

body.portfolio-page .partner-logo img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

body.portfolio-page .partner-logo-bg {
  position: absolute;
  inset: 10%;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.12);
  z-index: 0;
}

body.portfolio-page .partner-meta {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.portfolio-page .partner-category {
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.65);
}

body.portfolio-page .partner-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
}

body.portfolio-page .partner-description {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

body.portfolio-page .partner-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

body.portfolio-page .tech-badge {
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

body.portfolio-page .partner-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

body.portfolio-page .feature-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

body.portfolio-page .feature-item i {
  color: var(--primary-color);
}

/* Technologies section */
body.portfolio-page .technologies-section {
  padding: 6rem 0;
}

body.portfolio-page .technologies-header {
  text-align: center;
  margin-bottom: 3rem;
}

body.portfolio-page .technologies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
}

body.portfolio-page .tech-category {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1.75rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body.portfolio-page .tech-category-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 1.2rem;
}

body.portfolio-page .tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

body.portfolio-page .tech-item {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
}

/* CTA section */
body.portfolio-page .portfolio-cta {
  padding: 5rem 0 6rem;
}

body.portfolio-page .portfolio-cta .container {
  max-width: 100%;
  padding: 0;
}

body.portfolio-page .portfolio-cta-content {
  text-align: left;
  width: 100%;
  margin: 0;
  background: linear-gradient(130deg, rgba(4, 115, 218, 0.35), rgba(246, 104, 182, 0.35));
  background-size: 250% 250%;
  animation: ctaGradientFlow 12s ease-in-out infinite alternate;
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(35px);
  backdrop-filter: blur(35px);
  border-radius: 0;
  padding: 3rem;
  box-shadow: 0 35px 70px rgba(5, 11, 24, 0.2);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 2.5rem;
  position: relative;
  overflow: hidden;
}

@keyframes ctaGradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


body.portfolio-page .portfolio-cta-illustration {
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 30px;
  position: relative;
}

body.portfolio-page .portfolio-cta-illustration img {
  max-width: 620px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

body.portfolio-page .portfolio-cta-body {
  padding-top: 70px;
  text-align: center;
}

body.portfolio-page .portfolio-cta-title {
  font-size: clamp(3.2rem, 4vw, 4.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: #ffffff;
  letter-spacing: -0.01em;
}

body.portfolio-page .portfolio-cta-description {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  line-height: 1.7;
}

body.portfolio-page .portfolio-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  body.portfolio-page .partner-project {
    transition: none;
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  body.portfolio-page .partner-project {
    padding: 2rem;
  }

  body.portfolio-page .partner-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.portfolio-page .portfolio-hero {
    padding: 6rem 0 4rem;
  }

  body.portfolio-page .portfolio-hero-description {
    font-size: 1.05rem;
    padding: 0 1rem;
  }

  body.portfolio-page .partners-grid {
    grid-template-columns: 1fr;
  }

  body.portfolio-page .portfolio-cta-content {
    padding: 2.5rem 1.75rem;
    grid-template-columns: 1fr;
  }

  body.portfolio-page .portfolio-cta-body {
    order: 1;
    padding-top: 70px;
    text-align: center;
  }

  body.portfolio-page .portfolio-cta-actions {
    justify-content: center;
  }

  body.portfolio-page .portfolio-cta-illustration {
    order: 2;
  }
}

@media (max-width: 480px) {
  body.portfolio-page .portfolio-hero-title {
    font-size: clamp(2.2rem, 7vw, 3rem);
  }

  body.portfolio-page .portfolio-stat-card {
    width: 100%;
  }

  body.portfolio-page .partner-logo {
    width: 90px;
    height: 90px;
  }

  body.portfolio-page .portfolio-cta-title {
    font-size: 2rem;
  }
}

