
:root {
    --background: #f5f5f5; /* Softer background color */
    --foreground: #171717;
    --border: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
}


.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.search-container input {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    width: 300px;
    background: white;
}

.search-container input:focus {
    box-shadow: -7px 7px 0 var(--border);
}

.title {
    text-align: center;
    font-size: 2rem;
    margin: 0.5rem 0;
    font-weight: 500;
}

.sub-title {
    text-align: center;
    font-size: 0.8rem;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--border);
    color: white;
    box-shadow: -7px 7px 0 gray;
}

/* HIGHLIGHT 버튼만 별도 색상 */
.filter-btn[data-filter="highlight"] {
    background-color: lavender;
    color: black;
}

/* HIGHLIGHT 버튼 활성화 시 */
.filter-btn[data-filter="highlight"].active {
    background-color: lavender; /* 활성화 색상 */
    color: black;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.project-card {
    background: white;
    border: 1px solid var(--border);
    padding: 1rem;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

/* .hover for mobile touch */
.project-card:hover,
.project-card.hover {
    box-shadow: -7px 7px 0 var(--border);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    margin-bottom: 0.5rem;
    color: #666;
}

.project-card.highlight {
    border: 1px solid var(--border);
    box-shadow: 7px -7px 0 lavender;
}

/* .hover for mobile touch */
.project-card.highlight:hover,
.project-card.highlight.hover {
    border: 1px solid var(--border);
    box-shadow: -7px 7px 0 mediumpurple; /* Updated color */
}

.project-meta {
    display: flex;
    justify-content: space-between; /* 좌측: 날짜, 우측: 버튼 */
    align-items: center;
    margin-top: auto; 
}

.project-meta .date {
    margin: 0; 
}

.project-meta .view-project-btn {
    margin: 0; 
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.skill {
    background: #f0f0f0;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
}

.date {
    font-size: 0.875rem;
    color: #999;
}

.project-card a {
    color: var(--border);
    text-decoration: none;
    font-weight: 500;
}

.view-project-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: silver;
    cursor: pointer;
    transition: all 0.2s;
}

.view-project-btn:hover {
    background: var(--border);
    color: white;
}

.footer {
    background: #e9e9e9; /* Footer color slightly darker */
    color: black;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Hide scrollbar */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Optional: show subtle feedback when loading more */
body.loading {
    cursor: wait;
}

@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem; /* 좌우 여백 조정 */
    }

    .header .container {
        flex-direction: column;
        align-items: center;
        gap: 1rem; /* 로고와 연락처 사이 간격 추가 */
    }

    .logo {
        font-size: 1.8rem; /* 로고 크기 살짝 조정 */
        text-align: center;
        width: 100%;
    }

    .contact {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .title {
        font-size: 1.8rem; /* 제목 크기 조정 */
    }

    .search-container input {
        width: 100%;
    }

    .filters {
        flex-wrap: wrap;
        gap: 0.75rem; /* 버튼 간격 조정 */
    }

    .project-grid {
        grid-template-columns: 1fr; /* 1열 그리드로 변경 */
        gap: 1.5rem; /* 카드 사이 간격 조정 */
    }

    .project-card {
        padding: 1.25rem; /* 카드 내부 여백 추가 */
    }

    .project-card img {
        height: 180px; /* 이미지 높이 조정 */
    }

    .project-card h3 {
        font-size: 1.15rem;
    }

    .project-card p {
        font-size: 0.9rem;
    }

    .skills {
        gap: 0.4rem;
    }

    .project-meta {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .view-project-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}
