/* Portfolio-specific styles */
.portfolio-hero {
    position: relative;
  overflow: hidden;
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    background-image: url("../images/portfolio-wallpaper.jpg");
     background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  color: white;
  padding: 4rem 0;
  margin-bottom: 3rem;
}

.portfolio-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(13, 110, 253, 0.35),  /* biru */
    rgba(255, 255, 255, 0.12), /* putih */
    rgba(13, 110, 253, 0.35)   /* biru */
  );
  background-size: 400% 400%;
  animation: waveFlow 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes waveTest {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 100% 50%;
  }
}

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

.portfolio-hero h1,
.portfolio-hero p {
  position: relative;
  z-index: 2;
}

.portfolio-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(
      circle at 100% 60%,
      rgba(255, 255, 255, 0.08),
      transparent 70%
    );
  animation: waveMoveReverse 12s linear infinite;
  pointer-events: none;
}

@keyframes waveMoveReverse {
  0% {
    background-position: 200% 60%;
  }
  100% {
    background-position: 0% 60%;
  }
}

.portfolio-hero > * {
  position: relative;
  z-index: 2;
}

.portolio-subtext {
    color: #ffffff;
  font-family: 'Poppins', 'Inter', 'Segoe UI', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 6px 12px rgba(0, 0, 0, 0.25);
}


        
/* Container Spacing */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* Main Card Styling */
.portfolio-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Hover States - Lift & Shadow */
.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(13, 110, 253, 0.2); /* Soft Primary Glow */
}

/* Image Container Restyling */
.portfolio-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f8f9fa;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.08);
}

/* Refined Badge Styling */
.portfolio-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(13, 110, 253, 0.9);
    backdrop-filter: blur(4px);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Content Area */
.portfolio-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-content h3.portfolio-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.portfolio-item:hover .portfolio-content h3.portfolio-title {
    color: #0d6efd;
}

.portfolio-date {
    font-size: 0.85rem;
    color: #0d6efd;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.portfolio-date::before {
    content: "";
    width: 8px;
    height: 2px;
    background: currentColor;
    margin-right: 8px;
}

.portfolio-description {
    font-size: 0.925rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Clips description to 3 lines for uniformity */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* View Link Styling */
.portfolio-link {
    margin-top: auto;
    font-weight: 600;
    font-size: 0.9rem;
    color: #0d6efd;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
}

.portfolio-link:hover {
    gap: 10px;
    color: #0a58ca;
    text-decoration: underline;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

    .portfolio-item:hover {
        transform: translateY(-4px); /* Smaller lift on mobile */
    }
}

/* --- Modal General Styling --- */
.portfolio-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.portfolio-modal .modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.5rem 2rem;
}

.portfolio-modal .modal-title {
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* --- Screenshot Gallery --- */
.portfolio-screenshots {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
}

.portfolio-screenshot {
    flex: 0 0 80%; /* Shows partial next slide to hint at scrolling */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.portfolio-screenshot img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.portfolio-screenshot img:hover {
    transform: scale(1.02);
}

/* --- Detail View Typography --- */
.portfolioDetailView h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0d6efd;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* --- Tech Tags --- */
.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: #eef4ff;
    color: #0d6efd;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(13, 110, 253, 0.1);
}

/* --- Case Study Professional View --- */
.caseStudyView {
    padding: 2rem;
    background: #fff;
    max-height: 80vh;
    overflow-y: auto;
}

.case-study-content h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #111;
}

.case-study-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    color: #333;
    border-left: 4px solid #0d6efd;
    padding-left: 15px;
}

.case-study-content p, .case-study-content li {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
}

/* --- Floating Navigation --- */
.floating-back-btn {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.floating-back-btn:hover {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* Desktop gallery adjustment */
@media (min-width: 992px) {
    .portfolio-screenshot {
        flex: 0 0 48%;
    }
}