/* ============================================================
   portfolio.css — Portfolio 페이지 전용 스타일
   아크 갤러리 (반원형 아치 회전 뷰)
   ============================================================ */

/* 컨트롤 바 */
.pf-controls {
    position: sticky;
    top: 68px;
    z-index: 90;
    background: rgba(8, 8, 8, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 900px) {
    .pf-controls {
        top: 56px;
    }
}

.pf-ctrl-inner {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
}

.pf-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pf-filter {
    padding: 7px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    border-radius: 100px;
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-caption, 13px);
    font-weight: 400;
    letter-spacing: 0.04em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    transition: background 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.pf-filter:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.pf-filter.active {
    background: #fff;
    color: #080808;
    border-color: #fff;
    font-weight: 500;
}

.pf-count-txt {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-caption, 13px);
    color: rgba(255, 255, 255, 0.38);
    white-space: nowrap;
    letter-spacing: 0.06em;
}


/* 아크 스테이지 */
.arc-stage {
    position: relative;
    width: 100%;
    height: 90vh;
    min-height: 520px;
    background: #080808;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.arc-stage.dragging {
    cursor: grabbing;
}

.arc-track {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* 아크 아이템 */
.arc-item {
    position: absolute;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    pointer-events: auto;
    will-change: transform, opacity;
    transform-origin: center center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    transition: box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.arc-item:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.72);
}

/* 호버 스케일 래퍼 — JS transform과 분리 */
.arc-inner {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.arc-item:hover .arc-inner {
    transform: scale(1.06);
}

.arc-img {
    position: absolute;
    inset: 0;
    background: #0a0a0a;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.arc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.arc-ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.28);
    pointer-events: none;
}

.arc-hover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0) 60%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.arc-item:hover .arc-hover {
    opacity: 1;
}

.arc-hover-name {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-caption, 13px);
    font-weight: 500;
    color: #fff;
    text-align: center;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.arc-hover-cat {
    font-family: 'Pretendard', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.1em;
    margin-bottom: 5px;
}


/* 아크 중앙 컨트롤 */
.arc-center {
    position: absolute;
    bottom: 7%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 30;
    white-space: nowrap;
}

/* Our Work 제목 — 텍스트 라인 reveal */
.arc-heading-wrap {
    overflow: hidden;
    display: block;
    margin-bottom: 22px;
}

.arc-heading {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: clamp(38px, 5vw, 68px);
    font-weight: 400;
    letter-spacing: 0.14em;
    color: #fff;
    line-height: 1;
    transform: translateY(108%);
    opacity: 0;
    transition: transform 1.1s cubic-bezier(0.05, 0.7, 0.1, 1.0),
                opacity   0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.arc-heading.visible {
    transform: translateY(0);
    opacity: 1;
}

/* 네비게이션 행 */
.arc-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* 화살표 버튼 */
.arc-nav-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    transition: background 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.arc-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: scale(1.12);
}

/* 모드 버튼 묶음 */
.arc-mode-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 드래그/스크롤 토글 버튼 */
.arc-mode-btn {
    padding: 5px 13px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.42);
    font-family: 'Pretendard', sans-serif;
    font-size: 11px;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    transition: background 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.arc-mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.32);
}

.arc-mode-btn.mode-off {
    background: rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.42);
}

.arc-lbl {
    font-family: 'Jost', sans-serif;
    font-size: clamp(20px, 2.8vw, 32px);
    letter-spacing: 0.26em;
    color: rgba(255, 255, 255, 0.22);
    margin: 0 0 8px;
    text-transform: uppercase;
    pointer-events: none;
}

.arc-hint {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-caption, 13px);
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.08em;
    margin: 0;
    pointer-events: none;
}


/* 빈 상태 */
.arc-empty[hidden] {
    display: none !important;
}

.arc-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arc-empty p {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-body, 16px);
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.04em;
}


/* 아크 패널 (선택 오버레이) */
.arc-panel[hidden] {
    display: none !important;
}

.arc-panel {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.60);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.arc-panel.visible {
    opacity: 1;
    pointer-events: auto;
}

.arc-panel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 52px;
    width: 90%;
    max-width: 900px;
    cursor: default;
}

.arc-panel-img,
.arc-panel-cat,
.arc-panel-name,
.arc-panel-year,
.arc-panel-btns {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.46s cubic-bezier(0.05, 0.7, 0.1, 1.0);
}

.arc-panel-close {
    opacity: 0;
    transition: background 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.36s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0ms;
}

.arc-panel.visible .arc-panel-img   { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.arc-panel.visible .arc-panel-close { opacity: 1; transition-delay: 80ms; }
.arc-panel.visible .arc-panel-cat   { opacity: 1; transform: translateY(0); transition-delay: 130ms; }
.arc-panel.visible .arc-panel-name  { opacity: 1; transform: translateY(0); transition-delay: 200ms; }
.arc-panel.visible .arc-panel-year  { opacity: 1; transform: translateY(0); transition-delay: 260ms; }
.arc-panel.visible .arc-panel-btns  { opacity: 1; transform: translateY(0); transition-delay: 330ms; }

.arc-panel-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.arc-panel-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: scale(1.1);
}

.arc-panel-close svg {
    width: 16px;
    height: 16px;
    display: block;
}

.arc-panel-body {
    display: flex;
    align-items: center;
    gap: 52px;
    width: 100%;
}

.arc-panel-img {
    flex-shrink: 0;
    width: 320px;
    height: 320px;
    border-radius: 14px;
    overflow: hidden;
    background: #1a1a1a;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

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

.arc-panel-ph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.18);
}

.arc-panel-info {
    flex: 1;
    min-width: 0;
}

.arc-panel-cat {
    display: inline-block;
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-label, 11px);
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    margin-bottom: 14px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 100px;
}

.arc-panel-name {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-heading, clamp(32px, 4vw, 52px));
    font-weight: 300;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

.arc-panel-year {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-caption, 13px);
    color: rgba(255, 255, 255, 0.38);
    letter-spacing: 0.08em;
    margin: 0 0 36px;
}

.arc-panel-btns {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.arc-btn-visit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 32px;
    background: #fff;
    color: #080808;
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-caption, 13px);
    font-weight: 500;
    letter-spacing: 0.06em;
    border-radius: 4px;
    text-decoration: none;
    border: 1.5px solid #fff;
    transition: background 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.arc-btn-visit:hover {
    background: rgba(255, 255, 255, 0.88);
    transform: translateY(-2px);
}

.arc-btn-consult {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 32px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-caption, 13px);
    font-weight: 400;
    letter-spacing: 0.06em;
    border-radius: 4px;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.26);
    transition: border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.arc-btn-consult:hover {
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
    transform: translateY(-2px);
}


/* 반응형 */
@media (max-width: 900px) {
    .arc-stage {
        height: 80vh;
        min-height: 440px;
    }

    .arc-panel {
        align-items: flex-start;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 110px 5% 60px;
    }

    .arc-panel-wrap {
        flex-direction: column;
        gap: 28px;
        align-items: flex-start;
        width: 100%;
        max-width: none;
        max-height: none;
        overflow: visible;
        padding: 0;
    }

    .arc-panel-body {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }

    .arc-panel-img {
        width: 100%;
        height: 220px;
        border-radius: 10px;
    }

    .arc-panel-name {
        font-size: clamp(24px, 6vw, 36px);
    }

    .arc-panel-close {
        position: fixed;
        top: 55px;
        right: 20px;
        width: 38px;
        height: 38px;
    }

    .pf-ctrl-inner {
        padding: 10px 0;
        gap: 10px;
    }

    .pf-filter {
        padding: 6px 14px;
        font-size: 12px;
    }

    .arc-panel-btns {
        gap: 10px;
    }

    .arc-btn-visit,
    .arc-btn-consult {
        height: 44px;
        padding: 0 22px;
        font-size: 12px;
    }

    .arc-nav {
        gap: 8px;
    }

    .arc-nav-arrow {
        width: 32px;
        height: 32px;
    }

    .arc-mode-btn {
        padding: 4px 10px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .arc-stage {
        height: 75vh;
        min-height: 380px;
    }

    .pf-filters {
        gap: 4px;
    }

    .pf-filter {
        padding: 5px 11px;
        font-size: 11px;
    }

    .arc-panel-wrap {
        width: 95%;
    }

    .arc-center {
        bottom: 6%;
    }

    .arc-mode-btns {
        gap: 4px;
    }
}

/* 컨트롤 바 우측 묶음 */
.pf-ctrl-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* 뷰 토글 버튼 묶음 */
.pf-view-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 3px;
}

.pf-view-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pf-view-btn:hover {
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
}

.pf-view-btn.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* 추천 필터 버튼 강조 */
.pf-filter-rec {
    border-color: rgba(255, 210, 80, 0.4);
    color: rgba(255, 210, 80, 0.75);
}

.pf-filter-rec:hover {
    border-color: rgba(255, 210, 80, 0.7);
    color: rgba(255, 210, 80, 1);
}

.pf-filter-rec.active {
    background: rgba(255, 210, 80, 0.15);
    border-color: rgba(255, 210, 80, 0.6);
    color: #ffd250;
}

/* 아크 카드 추천 도트 */
.arc-rec-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffd250;
    box-shadow: 0 0 6px rgba(255, 210, 80, 0.7);
    z-index: 5;
    pointer-events: none;
}


/* 그리드 섹션 */
.pf-grid-section {
    background: #080808;
    min-height: 60vh;
    padding: 110px 0 80px;
}

/* display 전환은 JS에서 직접 처리 */

.pf-grid-inner {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* 그리드 카드 */
.pf-gc {
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.pf-gc:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.pf-gc:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

.pf-gc-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #1a1a1a;
}

.pf-gc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.pf-gc:hover .pf-gc-thumb img {
    transform: scale(1.05);
}

.pf-gc-ph {
    width: 100%;
    height: 100%;
}

/* 추천 배지 */
.pf-gc-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ffd250;
    color: #1a1200;
    font-family: 'Pretendard', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 3px 9px;
    border-radius: 100px;
    pointer-events: none;
}

.pf-gc-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pf-gc-cat {
    font-family: 'Pretendard', sans-serif;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.32);
    text-transform: uppercase;
}

.pf-gc-name {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-body, 16px);
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.pf-gc-year {
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-caption, 13px);
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 0.04em;
}

/* 그리드 빈 상태 */
.pf-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'Pretendard', sans-serif;
    font-size: var(--t-body, 16px);
    color: rgba(255, 255, 255, 0.3);
    padding: 80px 0;
    letter-spacing: 0.04em;
}


/* 그리드 카드 페이드인 */
@keyframes pfCardIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pf-gc {
    animation: pfCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* 그리드 반응형 */
@media (max-width: 1200px) {
    .pf-grid-inner {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .pf-grid-inner {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .pf-grid-section {
        padding: 90px 0 60px;
    }
}

@media (max-width: 600px) {
    .pf-grid-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pf-gc-info {
        padding: 10px 12px 12px;
    }
}


@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
