/* ============================================
   PORTFOLIO PAGE — Premium Cinematic Dark Design
   ============================================ */

/* ---------- PORTFOLIO HERO ---------- */
.portfolio-hero {
    padding: 140px 0 60px;
    position: relative;
    overflow: hidden;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(139, 92, 246, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 60%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.portfolio-hero__content {
    position: relative;
    max-width: 720px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    margin-bottom: 24px;
    transition: color 0.3s, transform 0.3s;
}

.back-link:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(-4px);
}

.back-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

.portfolio-hero__title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 40%, rgba(139, 92, 246, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-hero__desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 560px;
}


/* ---------- FILTER BAR ---------- */
.portfolio-filters {
    position: sticky;
    top: 64px;
    z-index: 90;
    padding: 0;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-bar {
    display: flex;
    gap: 6px;
    padding: 14px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    padding: 9px 20px;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.12);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.15));
    border-color: rgba(139, 92, 246, 0.35);
    color: #fff;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.12);
}


/* ---------- VIDEO GRID ---------- */
.portfolio-grid-section {
    padding: 48px 0 80px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}


/* ---------- PORTFOLIO CARDS ---------- */
.portfolio-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0) 0%,
            rgba(139, 92, 246, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.4s;
    z-index: 2;
}

.portfolio-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.15);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(139, 92, 246, 0.06);
}

.portfolio-card:hover::before {
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.3) 0%,
            rgba(59, 130, 246, 0.2) 100%);
}


/* ---------- VIDEO IFRAME WRAPPER ---------- */
.portfolio-card__video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    background: #111;
}

.portfolio-card__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}




/* ---------- CARD INFO ---------- */
.portfolio-card__info {
    padding: 18px 20px 20px;
    position: relative;
}

.portfolio-card__info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    line-height: 1.3;
    transition: color 0.3s;
}

.portfolio-card:hover .portfolio-card__info h3 {
    color: #fff;
}

.portfolio-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(139, 92, 246, 0.8);
    background: rgba(139, 92, 246, 0.08);
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid rgba(139, 92, 246, 0.12);
}


/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-card.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.portfolio-card.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.portfolio-card.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}


/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .portfolio-hero {
        padding: 120px 0 48px;
    }
}

@media (max-width: 640px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portfolio-hero {
        padding: 100px 0 36px;
    }

    .filter-bar {
        padding: 12px 0;
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
    }

    .portfolio-card__info {
        padding: 14px 16px 16px;
    }

    .portfolio-card__info h3 {
        font-size: 0.92rem;
    }
}


/* ============================================
   HOMEPAGE — FEATURED PORTFOLIO STYLES
   (kept for backward compat but no longer used on homepage)
   ============================================ */
.featured-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.featured-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(139, 92, 246, 0.06);
}

.featured-card__video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #111;
}

.featured-card__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}



.featured-card__label {
    padding: 16px 18px;
}

.featured-card__label h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.featured-card__label span {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(139, 92, 246, 0.8);
}

.view-all-wrapper {
    text-align: center;
    padding-top: 40px;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 12px 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    transition: all 0.35s;
}

.view-all-link:hover {
    color: #fff;
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.08);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.1);
}

.view-all-link svg {
    transition: transform 0.3s;
}

.view-all-link:hover svg {
    transform: translateX(4px);
}