/* static/css/portfolio.css */

/* --- Variables & Reset (공통) --- */
:root {
    --primary-blue: #3182F6;
    --text-black: #191F28;
    --text-dark-gray: #333D4B;
    --text-gray: #8B95A1;
    --bg-light: #F2F4F6;
    --white: #FFFFFF;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius-l: 24px;
    --radius-m: 16px;
    --radius-s: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* [핵심 수정] body를 Flex 컨테이너로 설정하여 푸터 고정 */
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-black);
    line-height: 1.5;

    /* Sticky Footer 설정을 위한 Flex Layout */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 화면 전체 높이 확보 */
}

/* [추가] main 태그가 남은 공간을 모두 차지하도록 설정 */
main {
    flex: 1;
    width: 100%; /* 가로폭 꽉 채우기 (반응형 대비) */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* 부모(main) 안에서 너비 확보 */
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* --- Tabs --- */
.tabs-container {
    display: flex;
    gap: 12px;
    margin: 50px 0 30px;
    flex-wrap: wrap;
}

.tab-btn {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-gray);
    padding: 8px 16px;
    border-radius: var(--radius-m);
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background-color: rgba(0,0,0,0.03);
    color: var(--text-dark-gray);
}

.tab-btn.active {
    color: var(--text-black);
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* --- Grid & Card --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    padding-bottom: 80px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-l);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    display: block; /* a 태그로 바뀌었으므로 block 속성 추가 */
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft);
}

.card-thumb {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-thumb img {
    transform: scale(1.05);
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.card-desc {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-tags {
    display: flex;
    gap: 8px;
}

.tag {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-blue);
    background-color: #E8F3FF;
    padding: 6px 10px;
    border-radius: 6px;
}

