.page-hero {
    padding: 140px 0 100px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.1) 0%, transparent 40%);
}

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

.hero-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--primary-light);
    margin-bottom: 16px;
    padding: 8px 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.page-desc {
    font-size: 1.125rem;
    color: var(--gray-light);
    max-width: 500px;
    margin: 0 auto 40px;
}

.portfolio-count {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 32px 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    max-width: fit-content;
    margin: 0 auto;
}

.count-item {
    text-align: center;
}

.count-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.count-num::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-light);
}

.count-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 8px;
}

.count-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
}

.portfolio-showcase {
    padding: 80px 0 100px;
    background: var(--bg-light);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 20px;
}

.portfolio-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--white);
    border: 2px solid transparent;
    border-radius: 50px;
    color: var(--gray);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
}

.filter-icon {
    font-size: 1rem;
}

.filter-count {
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50px;
    font-size: 0.75rem;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
}

.portfolio-sort select {
    padding: 12px 40px 12px 16px;
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: 50px;
    font-size: 0.9375rem;
    color: var(--dark);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

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

.masonry-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.masonry-item:nth-child(1) { animation-delay: 0.1s; }
.masonry-item:nth-child(2) { animation-delay: 0.15s; }
.masonry-item:nth-child(3) { animation-delay: 0.2s; }
.masonry-item:nth-child(4) { animation-delay: 0.25s; }
.masonry-item:nth-child(5) { animation-delay: 0.3s; }
.masonry-item:nth-child(6) { animation-delay: 0.35s; }
.masonry-item:nth-child(7) { animation-delay: 0.4s; }
.masonry-item:nth-child(8) { animation-delay: 0.45s; }
.masonry-item:nth-child(9) { animation-delay: 0.5s; }
.masonry-item:nth-child(10) { animation-delay: 0.55s; }
.masonry-item:nth-child(11) { animation-delay: 0.6s; }
.masonry-item:nth-child(12) { animation-delay: 0.65s; }

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

.masonry-item.hidden {
    display: none;
}

.work-card-large {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    grid-row: span 2;
}

.work-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.work-card:hover,
.work-card-large:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.work-image-wrapper {
    position: relative;
    overflow: hidden;
}

.work-card-large .work-image-wrapper {
    height: 100%;
    min-height: 400px;
}

.work-card .work-image-wrapper {
    height: 200px;
}

.work-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-card:hover .work-image-wrapper img,
.work-card-large:hover .work-image-wrapper img {
    transform: scale(1.08);
}

.work-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    z-index: 2;
}

.work-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.7) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.work-card:hover .work-gradient,
.work-card-large:hover .work-gradient {
    opacity: 1;
}

.work-content {
    padding: 24px;
}

.work-card-large .work-content {
    padding: 28px;
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.work-category {
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 50px;
}

.work-category.video {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.work-category.photo {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.work-category.brand {
    background: rgba(236, 72, 153, 0.1);
    color: var(--secondary);
}

.work-year {
    font-size: 0.8125rem;
    color: var(--gray);
}

.work-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.work-card-large .work-title {
    font-size: 1.5rem;
}

.work-desc {
    font-size: 0.9375rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.work-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.work-views,
.work-likes {
    font-size: 0.8125rem;
    color: var(--gray);
}

.work-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.work-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.work-btn svg {
    transition: transform 0.3s ease;
}

.work-btn:hover svg {
    transform: translateX(4px);
}

.load-more-section {
    text-align: center;
    margin-top: 60px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--white);
    border: 2px solid var(--dark);
    border-radius: 50px;
    color: var(--dark);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-load-more:hover {
    background: var(--dark);
    color: var(--white);
}

.loading-indicator {
    display: none;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.loading-indicator.active {
    display: flex;
}

.loading-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.achievement-section {
    padding: 100px 0;
    background: var(--white);
}

.achievement-header {
    text-align: center;
    margin-bottom: 60px;
}

.achievement-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.achievement-desc {
    font-size: 1.125rem;
    color: var(--gray);
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px;
    background: var(--bg-light);
    border-radius: 16px;
    transition: var(--transition);
}

.achievement-card:hover {
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.achievement-icon {
    font-size: 2.5rem;
}

.achievement-content {
    display: flex;
    flex-direction: column;
}

.achievement-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.achievement-label {
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 4px;
}

.cta-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.cta-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 48px 60px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.cta-desc {
    font-size: 1rem;
    color: var(--gray-light);
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    padding: 40px;
    max-height: 80vh;
    overflow-y: auto;
}

@media (max-width: 1200px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .achievement-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .portfolio-count {
        flex-direction: column;
        gap: 24px;
        padding: 24px 32px;
    }

    .count-divider {
        width: 60px;
        height: 1px;
    }

    .portfolio-header {
        flex-direction: column;
        align-items: stretch;
    }

    .portfolio-filters {
        justify-content: center;
    }

    .portfolio-sort {
        display: flex;
        justify-content: center;
    }

    .masonry-grid {
        grid-template-columns: 1fr;
    }

    .work-card-large {
        grid-row: span 1;
    }

    .work-card-large .work-image-wrapper {
        min-height: 250px;
    }

    .achievement-grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        flex-direction: column;
        text-align: center;
        padding: 40px 24px;
        gap: 24px;
    }

    .cta-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    .filter-count {
        display: none;
    }
}
