/* =====================================================
   PORTFOLIO PAGE — porfolio.css
   Extends style.css. Black / White / Purple palette.
   ===================================================== */


/* ===== PORTFOLIO HERO ===== */
.port-hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #070707;
    padding: 130px 20px 80px;
    text-align: center;
}

.port-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(122,0,224,0.11), transparent 70%);
    pointer-events: none;
}

.port-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.04);
    pointer-events: none;
}

.port-ring-1 {
    width: 560px;
    height: 560px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.port-ring-2 {
    width: 860px;
    height: 860px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.port-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    max-width: 800px;
    width: 100%;
}

.port-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 7px 18px;
    border-radius: 99px;
    background: rgba(255,255,255,0.03);
    font-family: 'Inter', sans-serif;
}

.port-hero-label i {
    color: #7a00e0;
    font-size: 0.8rem;
}

.port-hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -4px;
    color: #ffffff;
    margin: 0;
}

.port-hero-stroke {
    -webkit-text-stroke: 2px rgba(255,255,255,0.9);
    color: transparent;
}

.port-hero-sub {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}

.port-count-strip {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    padding: 12px 28px;
    border-radius: 99px;
    flex-wrap: wrap;
    justify-content: center;
}

.port-count-strip strong {
    color: #ffffff;
    font-weight: 700;
}

.port-strip-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}


/* ===== PORTFOLIO GRID SECTION ===== */
.port-grid-section {
    background-color: #070707;
    padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}


/* ===== FILTER BAR ===== */
.port-filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.port-filter-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 9px 20px;
    border-radius: 99px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.port-filter-btn:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.port-filter-btn.active {
    background: #7a00e0;
    color: #fff;
    border-color: #7a00e0;
}


/* ===== GRID LAYOUT ===== */
.port-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.port-item--tall .port-item-img {
    aspect-ratio: 3/4;
}

.port-item--wide {
    grid-column: span 2;
}

.port-item--wide .port-item-img {
    aspect-ratio: 16/7;
}


/* ===== INDIVIDUAL ITEM ===== */
.port-item {
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.port-item-img {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #111;
}

.port-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    filter: grayscale(15%);
}

.port-item:hover .port-item-img img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.port-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7,7,7,0.82);
    display: flex;
    align-items: flex-end;
    padding: 28px;
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: 16px;
}

.port-item:hover .port-item-overlay {
    opacity: 1;
}

.port-item-overlay-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(12px);
    transition: transform 0.35s ease;
}

.port-item:hover .port-item-overlay-content {
    transform: translateY(0);
}

.port-item-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #7a00e0;
    display: block;
}

.port-item-overlay-content h3 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
}

.port-item-overlay-content p {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin: 0;
}

.port-item-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin-top: 4px;
    transition: gap 0.3s ease, color 0.3s ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.port-item-cta:hover {
    color: #7a00e0;
    gap: 12px;
}

.port-item-cta i {
    font-size: 0.75rem;
}

.port-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.port-item-meta h4 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 3px;
}

.port-item-meta span {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    display: block;
}

.port-item-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.port-item:hover .port-item-arrow {
    background: #7a00e0;
    color: #fff;
    border-color: #7a00e0;
    transform: rotate(45deg);
}


/* ===== CTA ROW ===== */
.port-cta-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.06);
    width: 100%;
    justify-content: space-between;
}

.port-cta-row p {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.5px;
}

.port-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #7a00e0;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    transition: filter 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 24px rgba(122,0,224,0.3);
    white-space: nowrap;
}

.port-cta-btn i { transition: transform 0.3s ease; }

.port-cta-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(122,0,224,0.45);
}

.port-cta-btn:hover i { transform: translateX(4px); }


/* ===== GRID RESPONSIVE ===== */
@media (max-width: 900px) {
    .port-grid { grid-template-columns: repeat(2, 1fr); }
    .port-item--wide { grid-column: span 2; }
    .port-hero-title { letter-spacing: -3px; }
}

@media (max-width: 600px) {
    .port-grid { grid-template-columns: 1fr; }

    .port-item--wide,
    .port-item--tall { grid-column: span 1; }

    .port-item--wide .port-item-img,
    .port-item--tall .port-item-img { aspect-ratio: 4/3; }

    .port-hero-title {
        font-size: clamp(3.2rem, 16vw, 5rem);
        letter-spacing: -2px;
    }

    .port-hero-stroke { -webkit-text-stroke: 1.5px rgba(255,255,255,0.9); }

    .port-count-strip {
        flex-direction: column;
        gap: 8px;
        border-radius: 14px;
        padding: 16px 20px;
    }

    .port-strip-dot { display: none; }

    .port-cta-row { flex-direction: column; align-items: flex-start; gap: 16px; }

    .port-cta-btn { width: 100%; justify-content: center; }
}


/* =====================================================
   CATALOGUE LIGHTBOX
===================================================== */

.port-catalogue-arrow {
    background: rgba(122,0,224,0.12) !important;
    border-color: rgba(122,0,224,0.3) !important;
    color: #7a00e0 !important;
}

.port-item--catalogue { cursor: pointer; }

/* Backdrop */
.catalogue-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    backdrop-filter: blur(6px);
}

.catalogue-backdrop.open {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.catalogue-modal {
    background: #111111;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 24px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(16px);
    transition: transform 0.35s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(122,0,224,0.4) transparent;
}

.catalogue-backdrop.open .catalogue-modal {
    transform: scale(1) translateY(0);
}

/* Header */
.catalogue-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 32px 32px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.catalogue-header-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.catalogue-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #7a00e0;
}

.catalogue-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.5px;
}

.catalogue-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    max-width: 540px;
    margin: 4px 0 0;
}

.catalogue-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.catalogue-close:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
}

/* Main viewer */
.catalogue-viewer {
    display: flex;
    align-items: center;
    padding: 24px 16px;
}

.catalogue-main-img-wrap {
    flex: 1;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0a0a0a;
    aspect-ratio: 16/10;
}

.catalogue-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.catalogue-img-counter {
    position: absolute;
    bottom: 12px;
    right: 14px;
    background: rgba(0,0,0,0.65);
    color: rgba(255,255,255,0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 99px;
    backdrop-filter: blur(4px);
}

/* Nav buttons */
.catalogue-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    z-index: 2;
}

.catalogue-nav:hover {
    background: #7a00e0;
    border-color: #7a00e0;
    color: #fff;
    transform: scale(1.08);
}

.catalogue-prev { margin-right: 12px; }
.catalogue-next { margin-left: 12px; }

/* Thumbnails */
.catalogue-thumbs {
    display: flex;
    gap: 10px;
    padding: 0 32px 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.catalogue-thumbs::-webkit-scrollbar { display: none; }

.catalogue-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 54px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #0a0a0a;
    cursor: pointer;
    padding: 0;
    opacity: 0.5;
    transition: border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.catalogue-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.catalogue-thumb:hover { opacity: 0.8; transform: scale(1.04); }
.catalogue-thumb.active { border-color: #7a00e0; opacity: 1; }

/* Footer */
.catalogue-footer {
    padding: 20px 32px 28px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: flex-end;
}

.catalogue-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #7a00e0;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    transition: filter 0.3s ease, transform 0.3s ease;
    box-shadow: 0 6px 20px rgba(122,0,224,0.3);
}

.catalogue-cta i { transition: transform 0.3s ease; }
.catalogue-cta:hover { filter: brightness(1.15); transform: translateY(-2px); }
.catalogue-cta:hover i { transform: translateX(4px); }


/* ===== CATALOGUE MOBILE ===== */
@media (max-width: 768px) {
    /* Slide up from bottom instead of centre-floating */
    .catalogue-backdrop {
        padding: 0;
        align-items: flex-end;
    }

    .catalogue-modal {
        border-radius: 22px 22px 0 0;
        max-width: 100%;
        max-height: 94vh;
        width: 100%;
        /* Entry animation: slide up */
        transform: translateY(100%);
    }

    .catalogue-backdrop.open .catalogue-modal {
        transform: translateY(0);
    }

    /* Drag handle hint */
    .catalogue-modal::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(255,255,255,0.18);
        border-radius: 99px;
        margin: 14px auto 0;
        flex-shrink: 0;
    }

    /* Header */
    .catalogue-header {
        padding: 16px 20px 14px;
        gap: 12px;
    }

    .catalogue-title {
        font-size: 1.25rem;
        letter-spacing: -0.3px;
    }

    .catalogue-desc {
        font-size: 0.8rem;
        /* cap at 2 lines so header stays compact */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .catalogue-close {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Main image — square-ish and big */
    .catalogue-viewer {
        padding: 14px 10px;
    }

    .catalogue-main-img-wrap {
        /* 4:3 gives a big, comfortable image on phone */
        aspect-ratio: 4/3;
        border-radius: 14px;
    }

    /* Larger nav buttons — easy to tap */
    .catalogue-nav {
        width: 46px;
        height: 46px;
        font-size: 1rem;
    }

    .catalogue-prev { margin-right: 8px; }
    .catalogue-next { margin-left: 8px; }

    /* Thumbnail strip — easier to tap */
    .catalogue-thumbs {
        padding: 0 16px 16px;
        gap: 10px;
    }

    .catalogue-thumb {
        width: 76px;
        height: 58px;
        border-radius: 10px;
        opacity: 0.55;
    }

    .catalogue-thumb.active {
        opacity: 1;
        border-width: 2px;
    }

    /* Footer */
    .catalogue-footer {
        padding: 14px 16px 24px;
    }

    .catalogue-cta {
        width: 100%;
        justify-content: center;
        padding: 15px 20px;
        font-size: 1rem;
        border-radius: 12px;
    }
}

@media (max-width: 380px) {
    .catalogue-main-img-wrap {
        aspect-ratio: 1/1;
    }

    .catalogue-nav {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .catalogue-thumb {
        width: 60px;
        height: 46px;
    }
}
