/* css/portfolio.css */

/* ==========================================================================
   PORTFOLIO HERO SECTION
   ========================================================================== */
.portfolio-hero {
    position: relative;
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #071b49 0%, #0d2f75 50%, #114ea3 100%);
    color: #fff;
    text-align: center;
    overflow: hidden;
    z-index: 1;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(38, 133, 190, 0.4) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.portfolio-hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 50px 50px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    z-index: -1;
    pointer-events: none;
}

.portfolio-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.badge-portfolio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(38, 133, 190, 0.2);
    border: 1px solid rgba(38, 133, 190, 0.4);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #a3def5;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portfolio-hero h1 {
    font-size: clamp(2.5rem, 4.5vw, 3.8rem);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 20px;
}

.portfolio-hero h1 span {
    color: #a3def5;
}

.portfolio-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 36px;
    line-height: 1.6;
}

.portfolio-hero-features {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-feat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.portfolio-feat-item i {
    color: #a3def5;
}

.portfolio-feat-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

/* ==========================================================================
   TRANSITION / DIVIDERS
   ========================================================================== */
.shape-fill-hero {
    fill: #114ea3; /* Matches the end color of the hero gradient */
}

/* Ensure filter buttons stick below header (header is 76px on scroll) */
.filters {
    top: 86px;
}

/* Adjust portfolio section top padding to make room for transition shape */
#portfolio {
    padding-top: 150px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* ==========================================================================
   RESPONSIVE DESIGN ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    .portfolio-hero {
        padding: 130px 0 80px;
    }
    
    .portfolio-hero-features {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .portfolio-feat-item {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* ==========================================================================
   VIDEO MODAL STYLE (PREMIUM GLASSMORPHISM)
   ========================================================================== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.video-modal.is-open {
  display: flex;
  background: rgba(4, 10, 25, 0.92);
  pointer-events: all;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.video-modal__container {
  width: 90vw;
  max-width: 1000px;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(38, 133, 190, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal.is-open .video-modal__container {
  opacity: 1;
  transform: scale(1);
}

.video-modal__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.video-modal__iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-modal__close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10001;
}

.video-modal__close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1) rotate(90deg);
}

/* Cursor pointer for video previews */
.work-item[data-video],
.work-item[data-video] * {
  cursor: pointer;
}
