/**
 * Portfolio-specific CSS
 * Additional styles for portfolio page
 */

/* ============================================ */
/* FILTER BUTTON STYLES                         */
/* ============================================ */
.filter-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1A1A1A;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.filter-btn:hover {
    color: #00D9FF;
}

.filter-btn.active {
    color: #00D9FF;
    border-bottom-color: #00D9FF;
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: #00D9FF;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
        opacity: 0;
    }

    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* ============================================ */
/* PROJECT CARD STYLES                          */
/* ============================================ */
.project-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Filter Animation */
.project-card.filtered-out {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    position: absolute;
}

.project-card.filtering {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Line Clamp (for description truncation) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================ */
/* LOADING SKELETON                             */
/* ============================================ */
.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 0%,
            #e0e0e0 50%,
            #f0f0f0 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================ */
/* RESPONSIVE MASONRY (Fallback)                */
/* ============================================ */
@supports (grid-template-rows: masonry) {
    #portfolio-grid {
        grid-template-rows: masonry;
    }
}

/* ============================================ */
/* MOBILE FILTER DROPDOWN                       */
/* ============================================ */
#mobile-filter {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%231A2332' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ============================================ */
/* SCROLL ANIMATIONS                            */
/* ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .project-card {
        animation: fadeInUp 0.6s ease-out;
    }

    .project-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .project-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .project-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .project-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .project-card:nth-child(5) {
        animation-delay: 0.5s;
    }

    .project-card:nth-child(6) {
        animation-delay: 0.6s;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ============================================ */
/* STICKY FILTER SHADOW (on scroll)             */
/* ============================================ */
#filter-nav.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ============================================ */
/* STATUS BADGES                                */
/* ============================================ */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-completed {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-live {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.status-internal {
    background-color: #EDE9FE;
    color: #5B21B6;
}

/* ============================================ */
/* CATEGORY BADGE COLORS                        */
/* ============================================ */
.badge-web-app {
    background: #00D9FF !important;
    color: #0A1628 !important;
}

.badge-mobile-app {
    background: #7B2CBF !important;
    color: white !important;
}

.badge-corporate {
    background: #1A1A1A !important;
    color: white !important;
}

/* ============================================ */
/* EMPTY STATE                                  */
/* ============================================ */
#empty-state {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ============================================ */
/* RESPONSIVE ADJUSTMENTS                       */
/* ============================================ */
@media (max-width: 768px) {
    .filter-btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .project-card {
        animation-delay: 0s !important;
    }
}