/* ============================================================
   PORTFOLIO PAGE STYLES — Nahnan Naseer
   Standard high-end video showcase & cinematic lightbox
   ============================================================ */

.portfolio-page {
  background-color: #090a12;
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(160, 19, 30, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(130, 5, 21, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 70% 50% at 20% 90%, rgba(90, 15, 19, 0.16) 0%, transparent 70%);
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
  color: #ffffff;
  overflow-x: hidden;
  user-select: auto;
}

/* Ensure global navbar is styled cleanly for standalone subpage */
.site-header.subpage-nav {
  background: rgba(9, 10, 18, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   MAIN CONTAINER & HERO HEADER
   ============================================================ */
.portfolio-main {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 130px clamp(1.25rem, 4.5vw, 3.5rem) 90px;
}

.portfolio-hero {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 3.5rem;
  position: relative;
}

.portfolio-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(189, 30, 40, 0.15);
  border: 1px solid rgba(189, 30, 40, 0.4);
  color: #ff6b76;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.portfolio-badge-dot {
  width: 7px;
  height: 7px;
  background-color: #ff3344;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff3344;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.portfolio-title {
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.2rem;
  color: #ffffff;
}

.portfolio-title-accent {
  color: var(--bg-center);
  position: relative;
}

.portfolio-subtitle {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  font-weight: 400;
  max-width: 680px;
  margin: 0 auto;
}

/* ============================================================
   CONTROLS BAR (FILTERS + SEARCH)
   ============================================================ */
.portfolio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-tab {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-family);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.22s ease;
}

.filter-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.filter-tab.active {
  background: var(--bg-center);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(189, 30, 40, 0.38);
}

.filter-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.filter-tab.active .filter-count {
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
}

/* Search box */
.search-wrapper {
  position: relative;
  min-width: 250px;
  flex-grow: 1;
  max-width: 320px;
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.55rem 2.2rem 0.55rem 2.4rem;
  font-family: var(--font-family);
  font-size: 0.86rem;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.search-input:focus {
  border-color: var(--bg-center);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(189, 30, 40, 0.2);
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 0.8rem;
  line-height: 1;
  display: none;
}

.search-clear-btn:hover {
  color: #fff;
}

/* Status header */
.portfolio-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.results-count {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 680px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Card */
.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.35s ease;
  position: relative;
  will-change: transform;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(189, 30, 40, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(189, 30, 40, 0.25);
}

/* Card Media Container */
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #05060b;
  overflow: hidden;
}

.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  background-color: #05060b;
}

.project-card:hover .card-video {
  transform: scale(1.04);
}

/* Card category badge */
.card-category-tag {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 2;
  background: rgba(10, 12, 22, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  pointer-events: none;
}

/* Play Badge Overlay */
.card-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(189, 30, 40, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(189, 30, 40, 0.5);
  transition: transform 0.3s cubic-bezier(0.25, 1.25, 0.5, 1.2), background 0.3s ease;
}

.play-circle svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
  fill: currentColor;
}

.project-card:hover .play-circle {
  transform: scale(1.15);
  background: #ff2233;
}

/* When preview is actively playing on hover */
.project-card.is-previewing .card-play-overlay {
  opacity: 0;
}

/* Card Body / Info */
.card-info {
  padding: 1.25rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.card-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card:hover .card-title {
  color: #ff6677;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.02em;
}

.card-watch-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--bg-center);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-watch-arrow {
  transition: transform 0.2s ease;
}

.project-card:hover .card-watch-arrow {
  transform: translateX(4px);
}

/* ============================================================
   LOAD MORE / PAGINATION
   ============================================================ */
.load-more-container {
  text-align: center;
  margin-top: 3.5rem;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.95rem 2.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.load-more-btn:hover {
  background: var(--bg-center);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(189, 30, 40, 0.4);
}

.load-more-btn.hidden {
  display: none;
}

/* Empty search state */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  grid-column: 1 / -1;
  display: none;
}

.empty-state.visible {
  display: block;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 1.2rem;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-state-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   BOTTOM CTA SECTION
   ============================================================ */
.portfolio-cta-section {
  margin-top: 6rem;
  background: linear-gradient(135deg, rgba(160, 19, 30, 0.22) 0%, rgba(13, 15, 28, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-tag {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: #ff6b76;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
  display: block;
}

.cta-heading {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.cta-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: #ffffff;
  color: var(--brand-red);
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 2.4rem;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 255, 255, 0.3);
}

/* ============================================================
   CINEMATIC LIGHTBOX MODAL
   ============================================================ */
.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 5, 10, 0.92);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.portfolio-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 1160px;
  background: #0b0d18;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(189, 30, 40, 0.25);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.portfolio-modal.active .modal-content {
  transform: scale(1);
}

/* Modal Header */
.modal-header {
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-category-badge {
  background: rgba(189, 30, 40, 0.25);
  border: 1px solid rgba(189, 30, 40, 0.5);
  color: #ff6b76;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-counter {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
  line-height: 1;
}

.modal-close-btn:hover {
  background: var(--bg-center);
  border-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Modal Player */
.modal-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 72vh;
}

.modal-video-player {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  background: #000;
}

/* Prev/Next arrows in modal */
.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 12, 22, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.modal-nav-btn:hover {
  background: var(--bg-center);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn.prev-btn {
  left: 1rem;
}

.modal-nav-btn.next-btn {
  right: 1rem;
}

/* Footer of modal */
.modal-footer {
  padding: 0.85rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.modal-shortcuts {
  display: flex;
  gap: 1rem;
}

.shortcut-item kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .portfolio-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .search-wrapper {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  /* Category Filter Pills on Mobile:
     All categories stay 100% inside the box, wrapping cleanly without breaking button text */
  .filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .filter-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.48rem 0.82rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.2;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    box-sizing: border-box;
  }

  .filter-count {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.14rem 0.44rem;
    border-radius: 999px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .modal-nav-btn {
    display: none; /* Mobile users swipe or use modal counter */
  }
  .modal-shortcuts {
    display: none;
  }
}

@media (max-width: 480px) {
  .portfolio-controls {
    padding: 0.8rem 0.85rem;
    gap: 0.85rem;
  }

  .filter-tabs {
    gap: 0.4rem;
  }

  .filter-tab {
    font-size: 0.78rem;
    padding: 0.44rem 0.72rem;
    gap: 0.35rem;
  }

  .filter-count {
    font-size: 0.66rem;
    padding: 0.12rem 0.38rem;
  }
}


