/* ============================================================
   PORTFOLIO SECTION
   Portfolio section styles with SwiperJS carousel
   ============================================================ */

/* Section */
.projects-section {
    padding: var(--spacing-4xl) 0;
    background: radial-gradient(circle at center, var(--page-bg-secondary), var(--page-bg-primary));
    text-align: center;
}

/* Header */
.projects-header {
    margin-bottom: var(--spacing-3xl);
}

.projects-section .swiper-slide {
    display: flex;
    justify-content: center;
}
 
/* Portfolio Badge */
.portfolio-badge {
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    padding: 6px 10px;
    margin: 0 auto var(--spacing-lg) auto;
    width: fit-content;
    background: var(--accent-soft);
    border-radius: var(--radius-lg);
    font-family: var(--font-family-secondary);
    font-style: normal;
    font-size: var(--text-sm);
    color: var(--accent);
}

.projects-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

/* Filter */
.projects-filter {
    display: inline-flex;
    background: #000000;
    border-radius: var(--radius-full);
    padding: 4px;
    gap: 4px;
}

.filter-btn {
    padding: 8px 22px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-btn.active {
    background: linear-gradient(
        90deg,
        var(--accent),
        #8f95ff
    );
    color: var(--text-primary);
}

/* Carousel base */
.projects-carousel {
    position: relative;
}

/* Card */
.project-card {
    width: 340px;
    height: 100%;
    min-height: 520px;
    max-height: 520px;
    padding: 28px 24px;
    background: linear-gradient(180deg, #10163a, var(--page-bg-secondary));
    border-radius: var(--radius-xl);
    border: 1px solid rgba(120, 110, 255, 0.35);
    box-shadow:
        0 0 0 1px rgba(107, 92, 255, 0.2),
        0 0 40px rgba(107, 92, 255, 0.15);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.swiper-slide-active .project-card {
    border-color: var(--accent);
    box-shadow:
        0 0 0 1px rgba(107, 92, 255, 0.4),
        0 0 60px rgba(107, 92, 255, 0.35);
}

/* Image */
.project-image {
    width: var(--img-5xl);
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto var(--spacing-xl);
    flex-shrink: 0;
    background-color: rgba(255,255,255, 0.02);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
    padding: var(--spacing-sm);
}

/* Text */
.project-title {
    font-size: var(--text-xl);
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
    flex-shrink: 0;
}

.project-description {
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 14px;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.project-stack {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    flex-shrink: 0;
}

/* Actions */
.project-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
    margin-top: auto;
}

.btn-outline {
    padding: 8px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.btn-primary {
    padding: 8px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    color: var(--text-primary);
    font-size: var(--text-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--text-primary);
}

/* Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    width: 50px;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: transparent;
    border: 1px solid var(--accent);
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-fast);
}

.carousel-nav img {
    width: 30px;
    height: 20px;
    display: block;
    margin: 0 auto;
    filter: brightness(0) saturate(100%) invert(28%) sepia(100%) saturate(3999%) hue-rotate(226deg) brightness(96%) contrast(91%);
}

.carousel-nav:hover {
    background: var(--accent-soft);
}

.carousel-nav.prev {
    left: 40px;
}

.carousel-nav.next {
    right: 40px;
}

/* Swiper pagination */
.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    background: var(--text-muted);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--accent);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .projects-title {
        font-size: var(--text-2xl);
    }

    .project-card {
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }

    .carousel-nav {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .carousel-nav.prev {
        left: 20px;
    }

    .carousel-nav.next {
        right: 20px;
    }
}
