/* ── Portfolio Layout d712c97e v2 ── */

.pfl-d712c97e-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ── Tabs ── */
.pfl-d712c97e-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.pfl-d712c97e-tab-btn {
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    background-color: #f1f5f9;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    letter-spacing: 0.02em;
}

.pfl-d712c97e-tab-btn:hover {
    background-color: #e2e8f0;
    color: #334155;
    transform: translateY(-1px);
}

.pfl-d712c97e-tab-btn.pfl-d712c97e-active {
    background-color: #6366f1;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* ── Grid ── */
.pfl-d712c97e-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ── Card ── */
.pfl-d712c97e-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scale(1);
}

.pfl-d712c97e-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.pfl-d712c97e-card.pfl-d712c97e-hidden {
    display: none;
}

/* ── Card Image ── */
.pfl-d712c97e-card-image-wrap {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.pfl-d712c97e-card-image {
    height: 280px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pfl-d712c97e-card-image-wrap:hover .pfl-d712c97e-card-image {
    transform: scale(1.08);
}

/* ── Overlay ── */
.pfl-d712c97e-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pfl-d712c97e-card-image-wrap:hover .pfl-d712c97e-card-overlay {
    opacity: 1;
}

.pfl-d712c97e-overlay-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    padding: 0 20px;
    transform: translateY(12px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pfl-d712c97e-card-image-wrap:hover .pfl-d712c97e-overlay-title {
    transform: translateY(0);
}

.pfl-d712c97e-overlay-btn {
    background: #ffffff;
    color: #6366f1;
    border: none;
    padding: 10px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(12px);
    letter-spacing: 0.02em;
}

.pfl-d712c97e-card-image-wrap:hover .pfl-d712c97e-overlay-btn {
    transform: translateY(0);
}

.pfl-d712c97e-overlay-btn:hover {
    background: #1e293b;
    color: #ffffff;
}

/* ── Card Body ── */
.pfl-d712c97e-card-body {
    padding: 20px;
}

.pfl-d712c97e-card-cat {
    display: inline-block;
    background: #eef2ff;
    color: #6366f1;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.pfl-d712c97e-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.pfl-d712c97e-card-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
}

/* ── Masonry Gallery ── */
.pfl-d712c97e-masonry-section {
    animation: pflFadeIn_d712c97e 0.4s ease;
}

@keyframes pflFadeIn_d712c97e {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pfl-d712c97e-masonry {
    column-count: 4;
    column-gap: 12px;
}

.pfl-d712c97e-masonry-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: inline-block;
    width: 100%;
}

.pfl-d712c97e-masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pfl-d712c97e-masonry-item:hover img {
    transform: scale(1.06);
}

.pfl-d712c97e-masonry-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.pfl-d712c97e-masonry-item:hover .pfl-d712c97e-masonry-overlay {
    opacity: 1;
}

.pfl-d712c97e-masonry-overlay svg {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.pfl-d712c97e-masonry-item:hover .pfl-d712c97e-masonry-overlay svg {
    transform: scale(1);
}

/* ── Modal ── */
.pfl-d712c97e-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.pfl-d712c97e-modal-backdrop.pfl-d712c97e-modal-visible {
    opacity: 1;
}

.pfl-d712c97e-modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pfl-d712c97e-modal-backdrop.pfl-d712c97e-modal-visible .pfl-d712c97e-modal-content {
    transform: translateY(0) scale(1);
}

.pfl-d712c97e-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.pfl-d712c97e-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: rotate(90deg);
}

.pfl-d712c97e-modal-inner {
    display: flex;
    flex-direction: column;
}

.pfl-d712c97e-modal-gallery {
    width: 100%;
}

.pfl-d712c97e-modal-main-img {
    width: 100%;
    height: 360px;
    background-size: cover;
    background-position: center;
    border-radius: 20px 20px 0 0;
}

.pfl-d712c97e-modal-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px 24px 0;
    overflow-x: auto;
}

.pfl-d712c97e-modal-thumb {
    width: 70px;
    height: 50px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    flex-shrink: 0;
    opacity: 0.7;
}

.pfl-d712c97e-modal-thumb:hover,
.pfl-d712c97e-modal-thumb.pfl-d712c97e-thumb-active {
    border-color: #6366f1;
    opacity: 1;
}

.pfl-d712c97e-modal-details {
    padding: 28px 32px 32px;
}

.pfl-d712c97e-modal-cat {
    display: inline-block;
    background: #eef2ff;
    color: #6366f1;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.pfl-d712c97e-modal-title {
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.pfl-d712c97e-modal-desc {
    font-size: 15px;
    color: #475569;
    line-height: 1.75;
    margin-bottom: 24px;
}

.pfl-d712c97e-modal-desc p {
    margin: 0 0 12px 0;
}

.pfl-d712c97e-modal-techs {
    margin-bottom: 28px;
}

.pfl-d712c97e-modal-techs-heading {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pfl-d712c97e-modal-techs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pfl-d712c97e-modal-tech-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 50px;
    transition: all 0.25s ease;
}

.pfl-d712c97e-modal-tech-tag:hover {
    background: #6366f1;
    color: #ffffff;
}

.pfl-d712c97e-modal-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #6366f1;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 36px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
}

.pfl-d712c97e-modal-cta:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: #ffffff;
}

.pfl-d712c97e-modal-cta::after {
    content: '\2192';
    font-size: 18px;
    transition: transform 0.3s ease;
}

.pfl-d712c97e-modal-cta:hover::after {
    transform: translateX(4px);
}

/* ── Lightbox ── */
.pfl-d712c97e-lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(6px);
}

.pfl-d712c97e-lightbox-backdrop.pfl-d712c97e-lb-visible {
    opacity: 1;
}

.pfl-d712c97e-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    object-fit: contain;
    transition: transform 0.35s ease, opacity 0.35s ease;
    transform: scale(0.92);
    opacity: 0;
}

.pfl-d712c97e-lightbox-backdrop.pfl-d712c97e-lb-visible .pfl-d712c97e-lightbox-img {
    transform: scale(1);
    opacity: 1;
}

.pfl-d712c97e-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.15);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 30px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
}

.pfl-d712c97e-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.pfl-d712c97e-lightbox-prev,
.pfl-d712c97e-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 28px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
}

.pfl-d712c97e-lightbox-prev { left: 20px; }
.pfl-d712c97e-lightbox-next { right: 20px; }

.pfl-d712c97e-lightbox-prev:hover,
.pfl-d712c97e-lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

.pfl-d712c97e-lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 600;
    background: rgba(0,0,0,0.4);
    padding: 6px 18px;
    border-radius: 50px;
    z-index: 10;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .pfl-d712c97e-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pfl-d712c97e-masonry {
        column-count: 3;
    }
    .pfl-d712c97e-modal-main-img {
        height: 280px;
    }
}

@media (max-width: 767px) {
    .pfl-d712c97e-grid {
        grid-template-columns: 1fr;
    }
    .pfl-d712c97e-masonry {
        column-count: 2;
    }
    .pfl-d712c97e-tabs {
        gap: 6px;
    }
    .pfl-d712c97e-tab-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    .pfl-d712c97e-modal-content {
        max-height: 95vh;
        border-radius: 16px;
    }
    .pfl-d712c97e-modal-main-img {
        height: 220px;
        border-radius: 16px 16px 0 0;
    }
    .pfl-d712c97e-modal-details {
        padding: 20px;
    }
    .pfl-d712c97e-modal-title {
        font-size: 20px;
    }
    .pfl-d712c97e-modal-backdrop {
        padding: 10px;
    }
    .pfl-d712c97e-lightbox-prev,
    .pfl-d712c97e-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    .pfl-d712c97e-lightbox-prev { left: 10px; }
    .pfl-d712c97e-lightbox-next { right: 10px; }
}

/* ── Scrollbar ── */
.pfl-d712c97e-modal-content::-webkit-scrollbar {
    width: 6px;
}
.pfl-d712c97e-modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.pfl-d712c97e-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.pfl-d712c97e-modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
