/* ===== PORTFOLIO SPECIFIC STYLES ===== */

.portfolio-hero {
  padding: 150px 0 60px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.portfolio-hero .container {
  position: relative;
  z-index: 1;
}

.portfolio-hero .section-title {
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-hero .section-sub {
  max-width: 600px;
  margin: 0 auto 32px;
}

/* ===== FILTER TABS ===== */
.filter-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.filter-tab {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

.filter-tab.active {
  background: var(--teal);
  color: #000;
  border-color: var(--teal);
  box-shadow: 0 6px 16px rgba(0, 194, 199, 0.25);
}

/* ===== SUB FILTER TABS ===== */
.sub-filter-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-top: -28px;
  margin-bottom: 56px;
  padding: 4px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
  animation: fadeInDown 0.3s ease;
}

[data-theme="light"] .sub-filter-container {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.sub-filter-tab {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 0;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
}

.sub-filter-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-filter-tab:hover {
  color: var(--text);
}

.sub-filter-tab.active {
  color: var(--teal);
  font-weight: 600;
}

.sub-filter-tab.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== PORTFOLIO GRID ===== */
.portfolio-grid-section {
  padding-bottom: 120px;
  position: relative;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  transition: all 0.4s ease;
}

/* Base Card Styling */
.portfolio-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 4px 20px var(--shadow);
  cursor: pointer;
  position: relative;
}

.portfolio-card:hover {
  border-color: rgba(0, 194, 199, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 194, 199, 0.12);
}

/* Card Media */
.card-media {
  position: relative;
  overflow: hidden;
  background: #000000;
  width: 100%;
}

.portfolio-card.horizontal .card-media {
  aspect-ratio: 16/9;
}

.portfolio-card.vertical .card-media {
  aspect-ratio: 9/16;
}

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

.portfolio-card:hover .card-media img {
  transform: scale(1.04);
}

/* Overlays */
.media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(10, 10, 10, 0.85));
  opacity: 0.6;
  transition: opacity var(--transition);
  z-index: 1;
}

.portfolio-card:hover .media-overlay {
  opacity: 0.8;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  opacity: 0.85;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0, 194, 199, 0.4);
}

.play-btn svg {
  margin-left: 2px;
  transition: transform var(--transition);
}

.portfolio-card:hover .play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 0 30px var(--teal);
}

.portfolio-card:hover .play-btn svg {
  transform: scale(1.1);
}

/* Card Info */
.card-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.card-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Stats */
.card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
}

.stat-badge {
  background: rgba(0, 194, 199, 0.07);
  border: 1px solid rgba(0, 194, 199, 0.15);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-badge svg {
  flex-shrink: 0;
}

/* Animations for filter filtering */
.portfolio-card.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.9);
}

.portfolio-card.show {
  display: flex;
  animation: cardFadeIn 0.4s ease forwards;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== LIGHTBOX MODAL ===== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 1010;
}

.lightbox-close:hover {
  background: var(--teal);
  color: #000;
  border-color: var(--teal);
  transform: rotate(90deg);
}

.lightbox-content {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16/9;
  background: #000000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  transform: scale(0.94);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.15);
  position: relative;
}

/* Vertical Lightbox content */
.lightbox-content.vertical {
  max-width: 400px;
  aspect-ratio: 9/16;
  max-height: 80vh;
}

.lightbox-content iframe,
.lightbox-content video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

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

/* ===== RESPONSIVE PORTFOLIO ===== */
@media (max-width: 900px) {
  .portfolio-hero {
    padding: 120px 0 40px;
  }
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  .filter-container {
    margin-bottom: 40px;
  }
}

@media (max-width: 600px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }
  .lightbox-content.vertical {
    max-width: 100%;
    max-height: 70vh;
  }
}
