/* === GLASSMORPHISM + NEON GLOW CARD === */
#portfolio {
  background: linear-gradient(180deg, #f6fbff, #e9f5fa);
}

/* Card */
.portfolio-card {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.35);

  height: 100%;
  display: flex;
  flex-direction: column;

  box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.10),
      0 4px 10px rgba(0, 0, 0, 0.05);

  transition: all 0.55s cubic-bezier(0.23, 1, 0.32, 1);
  animation: fadeUp 0.85s ease forwards;
  opacity: 0;
}

/* Hover Glow */
.portfolio-card:hover {
  transform: translateY(-12px) scale(1.03);
  backdrop-filter: blur(18px);
  box-shadow:
      0 28px 60px rgba(22, 110, 151, 0.35),
      0 8px 20px rgba(0,0,0,0.10);
  border-color: rgba(22, 110, 151, 0.45);
}

/* Card Image Container - FIXED */
.img-container {
  overflow: hidden;
  position: relative;
  border-radius: 22px 22px 0 0; 
  aspect-ratio: 16/9;   /* Perfect proportion */
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top; /* Best for website screenshots */
  transition: transform 0.7s ease;
  border-radius: 22px 22px 0 0;
}
.portfolio-card:hover img {
  transform: scale(1.08);
  opacity: 1;
}

/* Overlay */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  backdrop-filter: blur(6px);
  transition: opacity 0.4s ease;
}
.portfolio-card:hover .overlay {
  opacity: 1;
}

/* Visit Button */
.overlay .btn.visit-btn {
  padding: 10px 28px;
  border-radius: 25px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  color: #fff;

  font-size: 0.92rem;
  letter-spacing: 0.4px;

  box-shadow: 0 0 18px rgba(22, 110, 151, 0.65);

  transform: translateY(12px);
  opacity: 0;
  transition: all 0.45s ease;
}
.portfolio-card:hover .overlay .btn.visit-btn {
  transform: translateY(0);
  opacity: 1;
}

/* Arrow Smooth Movement */
.visit-btn .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.visit-btn:hover .arrow {
  transform: translateX(5px);
}

/* Caption */
.caption {
  padding: 2rem 1.4rem 2.2rem;
  text-align: center;
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(10px);
}

/* Title */
.caption h5 {
  font-size: 1.26rem;
  font-weight: 700;
  background: linear-gradient(90deg, #166E97, #4dbcd8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.35px;
  margin-bottom: 0.75rem;
}

/* Description */
.caption p {
  max-width: 88%;
  margin: 0 auto;
  color: rgba(0,0,0,0.75);
  line-height: 1.72;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  opacity: 0.92;
  transition: opacity 0.3s ease;
}
.portfolio-card:hover .caption p {
  opacity: 1;
}

/* Animations */
@keyframes fadeUp {
  0% { transform: translateY(25px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Grid spacing */
#portfolio .col-lg-4,
#portfolio .col-md-6 {
  margin-bottom: 38px;
}

/* Heading */
#portfolio h2 {
  font-size: 2.48rem;
  font-weight: 800;
  background: linear-gradient(90deg, #166E97, #4dbcd8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  opacity: 0;
  transform: translateY(18px);
  animation: fadeSlideDown 1s ease forwards;
  animation-delay: 0.2s;
}

/* Heading underline */
#portfolio h2::after {
  content: "";
  display: block;
  width: 160px;
  height: 4px;
  margin: 10px auto 0;
  background: linear-gradient(90deg, #166E97, #4dbcd8);
  border-radius: 4px;
  opacity: 0;

  animation: glowReveal 1.2s ease forwards;
  animation-delay: 0.4s;
}

@keyframes fadeSlideDown {
  0% { opacity: 0; transform: translateY(-18px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes glowReveal {
  0% { opacity: 0; width: 0; }
  100% { opacity: 1; width: 160px; }
}

