/* 폰트 임포트 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=Josefin+Sans:wght@400;600;700&display=swap');

:root {
    --bg: #171717;
    --card-white: #fff;
    --transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    --border-radius: 25px;
}

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

body {
    background-color: var(--bg);
    font-family: 'Inter', sans-serif;
    color: #fff;
    overflow-x: hidden;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Josefin Sans", sans-serif;
    line-height: 1.2em;
}

h3 {
    font-size: 1.5rem;
}

p {
    line-height: 1.5em;
}

/* 히어로 섹션 */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 20px;
}

.top-meta {
    position: absolute;
    top: 40px;
    right: 40px;
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #888;
}

.main-logo {
    font-size: 12vw;
    font-weight: 900;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
    cursor: pointer;
}

/* 그리드 레이아웃 */
.grid-row {
    display: flex;
    gap: 20px;
    padding: 0 20px; /* 하단 패딩 150px 제거 */
    max-width: 1600px;
    margin: 0 auto 20px auto; /* 행 사이의 간격 20px 부여 */
    align-items: stretch; 
    /* 꿀렁임 방지: 각 행의 최소 높이 설정 */
    min-height: 500px; 
}

/* 마지막 행만 하단 여백 부여 */
.grid-row:last-of-type {
    margin-bottom: 150px;
}



/* 컬럼 설정 (50:50) */
.left-col, .right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bento-box {
    background: var(--card-white);
    border-radius: var(--border-radius);
    padding: 25px;
    color: #000;
    position: relative;
    overflow: hidden;
    height: 100%; /* 부모 row 높이에 꽉 차게 설정 */
    display: flex;
    flex-direction: column;
}



/* label  */
.label {
    /* 1. 글자 수에 맞춰 패딩 유지 (고정 width 제거) */
    font-size: 0.9rem;
    padding: 10px 16px;
    background-color: rgba(23, 23, 23, 0.05); /* 배경 투명도 조절 */
    border-radius: 500px;
    
    /* 2. 중앙 정렬을 위한 설정 */
    display: inline-flex; /* 콘텐츠 크기만큼만 박스 형성 */
    align-self: center;   /* 부모가 flex-direction: column일 때 가로 중앙 배치 */
    margin: 0 auto 20px auto; /* 상단 중앙 배치 및 하단 여백 */
    
    /* 3. 기타 스타일 */
    text-align: center;
    font-weight: 600;
    color: #000;
    letter-spacing: 0.05em;
}

/* 왼쪽 내부 50:50 배분 */
.intro-box, .sub-grid {
    flex: 1;
}

.sub-grid {
    display: flex;
    gap: 20px;
}

.skills-box, .social-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 기존 소셜 박스 캔버스 스타일 업데이트 */
#social-container canvas {
    filter: grayscale(100%) brightness(0); /* 아이콘을 완전한 검정색으로 */
    cursor: pointer;
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* 꿀렁임 방지: 소셜 컨테이너의 크기를 명확히 고정 */
.social-box {
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 250px; /* 아이콘들이 쌓일 수 있는 최소 높이 */
}

/* 프로젝트 카드 (높이 자동 조절) */
.project-card {
    flex: 1;
    padding: 0;
    background: #000000;
    cursor: pointer;
    min-height: 500px; /* 모바일 대비 최소 높이 */
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

/* .project-info {
    position: absolute;
    top: calc(75% + 20px);
    left: 20px;
    color: #fff;
    transition: var(--transition);
        opacity: 0;

} */
 /* 프로젝트 카드 호버 시 다른 박스에 영향을 주지 않도록 절대 위치 기반 정보창 수정 */
.project-info {
    position: absolute;
    top: calc(75% + 20px); 
    left: 20px;
    color: #fff;
    transition: var(--transition);
    opacity: 0;
    pointer-events: none; /* 마우스 간섭 방지 */
}

.project-card:hover .project-img {
    /* transform: scale(0.92) translateY(-30px); */
    height: 75%;
    padding: 15px;
}

.project-card:hover .project-info {
    opacity: 1;
}


/* 플로팅 네비게이션 */
.floating-nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 8px;
    border-radius: 40px;
    display: flex;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
    padding: 12px 25px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    transition: 0.3s;
    border-radius: 30px;
}

.nav-item.active, .nav-item:hover {
    background: #fff;
    color: #000;
}

/* ---------------------------------
   반응형 레이아웃 (1024px 이하)
--------------------------------- */
@media (max-width: 1024px) {
.grid-row {
        flex-direction: column;
        min-height: auto;
    }

    .left-col, .right-col {
        width: 100%;
    }

    .hero {
        height: 60vh; /* 모바일에서 히어로 높이 축소 */
    }

    .main-logo {
        font-size: 15vw;
    }

    .sub-grid {
        flex-direction: column; /* 스킬/소셜도 세로로 */
    }
    
    .project-card {
        height: 500px; /* 고정 높이 부여 */
    }
}