/* ===== Portfolio (prefix: .portfolio*) ===== */
:root {
    --pf-brand: #24316C;
    --pf-text: #2c3e50;
    --pf-gray: #6c757d;
    --pf-border: #dee2e6;
    --pf-soft: #f1f3f5;
    --pill-bg: #f6f6f7;      /* 바탕색 */
    --pill-on: #ff8a00;      /* 활성(주황) */
    --pill-off: #9aa0a6;     /* 비활성 글자색 */
    --pill-h: 60px;          /* 높이 */
    --pill-r: 999px;         /* 둥글기 */
    --pill-gap: 4px;         /* 안쪽 여백(슬라이더와 가장자리 간격) */
}

.pill-tabs{
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2개 탭 */
    align-items: center;
    width: 50%;
    height: var(--pill-h);
    padding: var(--pill-gap);
    background: var(--pill-bg);
    border-radius: var(--pill-r);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
    user-select: none;
}

/* 라디오 숨김 */
.pill-tabs input{
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* 레이블(탭) */
.pill-tabs label{
    position: relative;
    z-index: 2;               /* 슬라이더 위에 */
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    line-height: calc(var(--pill-h) - var(--pill-gap)*2);
    color: var(--pill-off);
    cursor: pointer;
    border-radius: var(--pill-r);
}

/* 움직이는 슬라이더 */
.pill-tabs .pill-slider{
    position: absolute;
    z-index: 1;
    top: var(--pill-gap);
    left: var(--pill-gap);
    width: calc(50% - var(--pill-gap));  /* 2개 탭이라 50% */
    height: calc(var(--pill-h) - var(--pill-gap)*2);
    background: var(--pill-on);
    border-radius: var(--pill-r);
    transition: transform .25s ease;
    box-shadow: 0 2px 6px rgba(255,138,0,.35);
}

/* 선택 상태에 따른 글자색 & 슬라이더 이동 */
#tab-event:checked ~ label[for="tab-event"] { color: #fff; }
#tab-news:checked  ~ label[for="tab-news"]  { color: #fff; }

#tab-news:checked ~ .pill-slider{
    transform: translateX(100%);
}

/* 포커스 접근성 */
.pill-tabs label:focus-visible{
    outline: 2px solid #333;
    outline-offset: 2px;
}
.event-title{

    font-weight: 1000;

}

.event-header{
    width: 100vw;
    height: 400px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

.portfolio {
    padding-top: 24px;
    padding-bottom: 24px;
}

.portfolio-heading {
    font-size: 22px;
    font-weight: 800;
    color: var(--pf-text);
    margin: 0 0 16px;
    letter-spacing: .5px;
}

/* Filter */
.portfolio-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.portfolio-input, .portfolio-select {
    height: 38px;
    padding: 6px 12px;
    border: 1px solid #cfd6dc;
    background: #fff;
    color: var(--pf-text);
    font-size: 14px;
    outline: none;
    border-radius: 0;
    min-width: 220px;
}

.portfolio-input::placeholder {
    color: #adb5bd;
}

.portfolio-input:focus, .portfolio-select:focus {
    border-color: #b8c0c7;
    box-shadow: 0 0 0 3px rgba(36, 49, 108, .08);
}

/* Grid: 고정 4열 레이아웃 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 데스크톱: 4열 고정 */
    gap: 18px;
    justify-content: center;
    max-width: 1200px; /* 최대 너비 제한 */
    margin: 0 auto; /* 중앙 정렬 */
}

.portfolio-grid.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}

.portfolio-grid.is-empty .portfolio-empty {
    margin: 0;
    text-align: center;
}

/* 태블릿: 3열 */
@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 작은 태블릿: 2열 */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 모바일: 1열 */
@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Card (gradient border + shadow + zoom) */
.portfolio-card {
    height: 100%;
    position: relative;
    border: 1px solid var(--pf-border);
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(10px) scale(0.995);
    opacity: 0;
    transition: box-shadow .18s ease,
    transform .28s ease,
    opacity .28s ease,
    border-color .18s ease;
    /* 그라디언트 보더 느낌 */
    border: 1px solid #e9ecef;
    /* 스태거(지연)은 JS가 --delay를 주입) */
    transition-delay: var(--delay, 0ms);
}

.portfolio-appear {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.portfolio-card:hover {
    box-shadow: 0 10px 22px rgba(0, 0, 0, .10);
    border-color: #d3d9df;
}

/* Thumb wrapper: 16:9 + skeleton + shine */
.portfolio-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: #f4f6f8;
    display: block;
}

.portfolio-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.06);
}

/* 광택(shine) 효과 */
.portfolio-thumb::before {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .35) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left .6s ease;
    pointer-events: none;
}

.portfolio-card:hover .portfolio-thumb::before {
    left: 130%;
}

/* 이미지 없는 경우 플레이스홀더 */
.portfolio-thumb.is-empty {
    background: #f4f6f8 linear-gradient(90deg, #f4f6f8 0%, #f0f2f4 50%, #f4f6f8 100%);
    background-size: 200% 100%;
    animation: portfolio-skeleton 1.4s ease-in-out infinite;
}

.portfolio-thumb.is-empty::after {
    content: "NO IMAGE";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 12px;
    letter-spacing: .5px;
}

@keyframes portfolio-skeleton {
    0% {
        background-position: 200% 0
    }
    100% {
        background-position: -200% 0
    }
}

.portfolio-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 800;
    color: var(--pf-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.portfolio-meta {
    display: flex;
    gap: 10px;
    color: var(--pf-gray);
    font-size: 12px;
    margin-bottom: 8px;
}

.portfolio-summary {
    color: #495057;
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0 0 12px;
    min-height: 42px;
}

/* Tags (컬러 변형) */
.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.portfolio-tag {
    font-size: 11px;
    padding: 3px 7px;
    border: 1px solid #d9dde2;
    background: #f8fafc;
    color: #2c3e50;
}

.portfolio-tag[data-tech*="Java"] {
    background: #fff4e6;
    border-color: #ffe8cc;
}

.portfolio-tag[data-tech*="Spring"] {
    background: #e6fffa;
    border-color: #c3fae8;
}

.portfolio-tag[data-tech*="MyBatis"] {
    background: #f3f0ff;
    border-color: #e5dbff;
}

.portfolio-tag[data-tech*="Redis"] {
    background: #fff5f5;
    border-color: #ffe3e3;
}

.portfolio-tag[data-tech*="Bootstrap"] {
    background: #edf2ff;
    border-color: #dbe4ff;
}

.portfolio-tag[data-tech*="JSP"] {
    background: #f8f9fa;
}

/* Overlay actions */
.portfolio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, .0);
    opacity: 0;
    transition: opacity .25s ease, background .25s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, .25);
}

.portfolio-cta {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #ffffff;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-decoration: none;
    backdrop-filter: blur(2px);
}

.portfolio-cta:hover {
    background: #fff;
    color: #000;
}

/* Ribbon (신규/추천 표시 옵션) */
.portfolio-ribbon {
    position: absolute;
    top: 10px;
    left: -8px;
    background: var(--pf-brand);
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    transform: skewX(-12deg);
}

/* Mobile tweaks */
@media (max-width: 480px) {

    .portfolio-title {
        font-size: 16px;
    }
}

.portfolio-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}

.portfolio-card-link:hover {
    color: inherit;
    text-decoration: none;
}
