/* =====================================================================
   Serva — Portfolio (Our Work) page
   Full-width showcase of web design projects with category filters,
   skeleton loader, load-more pagination, and CTA.
   ===================================================================== */

.portfolio-page-wrap {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(0, 180, 255, 0.06), transparent 40%),
        radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.05), transparent 50%),
        #030816;
}

.portfolio-page-shell {
    max-width: none;
    margin: 0;
    padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem;
}

/* --- Hero ----------------------------------------------------------------- */

.portfolio-page-hero {
    border: 1px solid rgba(0, 180, 255, 0.16);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.16), transparent 34%),
        radial-gradient(circle at top right, rgba(0, 180, 255, 0.14), transparent 32%),
        linear-gradient(140deg, rgba(6, 14, 32, 0.96), rgba(4, 8, 20, 0.98));
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
    padding: 2rem;
    margin-bottom: 1.25rem;
}

.portfolio-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.14);
    border: 1px solid rgba(168, 85, 247, 0.32);
    color: #c7a3ff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.portfolio-page-hero h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(1.85rem, 4.6vw, 3rem);
    line-height: 1.08;
}

.portfolio-page-hero p {
    margin: 0;
    max-width: 720px;
    color: var(--text-secondary);
    line-height: 1.85;
}

.portfolio-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.35rem;
}

.portfolio-hero-actions .btn-primary,
.portfolio-hero-actions .btn-secondary {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Toolbar (category filters) ----------------------------------------- */

.portfolio-toolbar {
    margin-bottom: 1.25rem;
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: rgba(6, 12, 24, 0.6);
    backdrop-filter: blur(8px);
}

.portfolio-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.portfolio-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
    white-space: nowrap;
}

.portfolio-filter-btn:hover {
    border-color: rgba(168, 85, 247, 0.4);
    color: #d6bfff;
    background: rgba(168, 85, 247, 0.06);
}

.portfolio-filter-btn.active {
    border-color: rgba(168, 85, 247, 0.55);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(123, 47, 255, 0.18));
    color: #fff;
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.25) inset;
}

.portfolio-filter-btn i { font-size: 0.85em; }

/* --- Skeleton loaders --------------------------------------------------- */

.portfolio-skeleton {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.portfolio-card-skeleton {
    height: 320px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background:
        linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 100%);
    background-size: 200% 100%;
    animation: portfolioShimmer 1.5s infinite linear;
}

@keyframes portfolioShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Empty state -------------------------------------------------------- */

.portfolio-empty {
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 3rem 1.5rem;
    text-align: center;
    background: rgba(6, 12, 24, 0.45);
    margin-bottom: 1.5rem;
}

.portfolio-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 85, 247, 0.12);
    color: #c7a3ff;
    font-size: 1.6rem;
}

.portfolio-empty h4 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.portfolio-empty p {
    margin: 0 0 1.2rem;
    color: var(--text-secondary);
}

.portfolio-empty-actions {
    display: inline-flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.portfolio-empty-actions .btn-primary,
.portfolio-empty-actions .btn-secondary {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

/* --- Grid + project cards ----------------------------------------------- */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.portfolio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: linear-gradient(150deg, rgba(8, 16, 36, 0.96), rgba(4, 8, 20, 0.94));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 20px 50px rgba(168, 85, 247, 0.18);
}

.portfolio-card-featured-badge {
    position: absolute;
    top: 0.85rem;
    inset-inline-end: 0.85rem;
    z-index: 2;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd166, #f5be4f);
    color: #1a1207;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 8px 20px rgba(245, 190, 79, 0.35);
}

.portfolio-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background:
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.15), transparent 50%),
        linear-gradient(135deg, rgba(0, 180, 255, 0.08), rgba(168, 85, 247, 0.08));
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

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

.portfolio-card-media-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(199, 163, 255, 0.5);
    font-size: 3rem;
}

.portfolio-card-content {
    flex: 1;
    padding: 1.1rem 1.15rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.portfolio-card-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(168, 85, 247, 0.32);
    background: rgba(168, 85, 247, 0.1);
    color: #c7a3ff;
    font-size: 0.72rem;
    font-weight: 800;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.portfolio-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
}

.portfolio-card-desc {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portfolio-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.15rem;
}

.portfolio-card-tech-chip {
    padding: 0.18rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
}

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

.portfolio-card-visit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(123, 47, 255, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    transition: 0.18s ease;
}

.portfolio-card-visit:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(123, 47, 255, 0.35));
    transform: translateX(-3px);
}

.portfolio-card-date {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
}

/* --- Load more button --------------------------------------------------- */

.portfolio-load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 1rem 0 2rem;
}

.portfolio-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
}

.portfolio-load-more-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- CTA section -------------------------------------------------------- */

.portfolio-cta {
    margin-top: 1.5rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 28px;
    padding: 2.5rem 2rem;
    background:
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 45%),
        radial-gradient(circle at bottom left, rgba(0, 180, 255, 0.12), transparent 45%),
        linear-gradient(140deg, rgba(8, 16, 36, 0.96), rgba(4, 8, 20, 0.98));
    text-align: center;
    box-shadow: 0 20px 54px rgba(168, 85, 247, 0.12);
}

.portfolio-cta-content {
    max-width: 640px;
    margin: 0 auto;
}

.portfolio-cta-content h2 {
    margin: 0 0 0.6rem;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    line-height: 1.2;
}

.portfolio-cta-content p {
    margin: 0 0 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.portfolio-cta-actions {
    display: inline-flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: center;
}

.portfolio-cta-actions .btn-primary,
.portfolio-cta-actions .btn-secondary {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1100px) {
    .portfolio-grid,
    .portfolio-skeleton {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .portfolio-page-shell {
        padding: 1.5rem clamp(0.85rem, 4vw, 1.5rem) 3rem;
    }
    .portfolio-page-hero {
        padding: 1.5rem;
        border-radius: 22px;
    }
    .portfolio-cta {
        padding: 1.75rem 1.25rem;
    }
}

@media (max-width: 560px) {
    .portfolio-grid,
    .portfolio-skeleton {
        grid-template-columns: 1fr;
    }
    .portfolio-card-skeleton {
        height: 280px;
    }
    .portfolio-filter-btn {
        font-size: 0.82rem;
        padding: 0.5rem 0.8rem;
    }
}

@media (max-width: 420px) {
    .portfolio-filter-btn i { display: none; }
}
