/* =========================
   1. Spoqa Han Sans Neo 폰트 설정
   ========================= */
@font-face {
    font-family: 'Spoqa Han Sans Neo';
    font-weight: 200;
    font-style: normal;
    src: url('/assets/fonts/SpoqaHanSansNeo-Thin.ttf') format('truetype');
}

@font-face {
    font-family: 'Spoqa Han Sans Neo';
    font-weight: 300;
    font-style: normal;
    src: url('/assets/fonts/SpoqaHanSansNeo-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Spoqa Han Sans Neo';
    font-weight: 400;
    font-style: normal;
    src: url('/assets/fonts/SpoqaHanSansNeo-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Spoqa Han Sans Neo';
    font-weight: 500;
    font-style: normal;
    src: url('/assets/fonts/SpoqaHanSansNeo-Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'Spoqa Han Sans Neo';
    font-weight: 600;
    font-style: normal;
    src: url('/assets/fonts/SpoqaHanSansNeo-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Noto Sans KR';
    src: url('/assets/fonts/NotoSansKR-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

/* =========================
   2. 기본 전역 스타일
   ========================= */
* {
    font-family: 'Spoqa Han Sans Neo', sans-serif;
    font-weight: 300;
    /* 기본 두께 (얇지 않게) */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

html {
    opacity: 1;
}

.layout {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.layout.fade-out {
    opacity: 0;
    pointer-events: none;
}

.layout.loaded {
    opacity: 1;
}


body {
    margin: 0;
    background: white;
    text-align: center;
    color: black;
    font-size: 14px;
}

body.dark-mode {
    background: #1a1a1a;
    color: #f0f0f0;
}

.dark-mode .layout,
.dark-mode .header,
.dark-mode .header-logo,
.dark-mode .header-logo a,
.dark-mode .sidebar,
.dark-mode .main-title,
.dark-mode .menu,
.dark-mode .menu-close {
    color: white;
    background-color: #1a1a1a;
}

.dark-mode .sidebar a,
.dark-mode .sidebar a[disabled],
.dark-mode .menu a,
.dark-mode .menu a[disabled] {
    color: rgb(150, 150, 150);
}

.dark-mode .sidebar a.active,
.dark-mode .menu a.active {
    color: white
}

/* =========================
   3. 메인 타이틀
   ========================= */
.layout {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
}


/* 상단 타이틀 바 */
.header {
    position: fixed;
    top: 0;

    width: 100%;
    background-color: white;
    z-index: 1000;
    
    letter-spacing: 0.15em;
    
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 8px 20px;
    box-sizing: border-box;
}

.header.hide {
    opacity: 0;
}

.header-logo a {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.2em;

    position: relative;
    text-decoration: none;
}

.header-logo a::after {
    content: "";
    position: absolute;

    left: 50%;
    bottom: 0px;

    width: 100%;
    height: 2px;

    background: black;

    transform: translateX(-50%) scaleX(0);
    transform-origin: center;

    transition: transform 0.3s ease;
}

/* hover */
.header-logo a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.header-logo a:hover {
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 50px;
}

.header-nav a {
    font-size: 12px;
    font-weight: 400;
    color: rgb(150, 150, 150);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.header-nav a:hover {
    color: black;
    text-decoration: none;
}

.header-nav a.active {
    color: black;
}


/* 본문 */
.content {
    margin: 60px 0 80px;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    /* background-color: rgba(172, 255, 47, 0.541); */
    box-sizing: border-box;
}

.text-container {
    margin: 80px auto 0;
    max-width: 800px;
    
    text-align: left;
    padding: 0px 20px;

    /* background-color: rgba(172, 255, 47, 0.541); */
    box-sizing: border-box;
}

.image-container {
    max-width: 1280px;
    margin: 0 auto 60px;
}

.image-container img {
    width: 100%;
    height: auto;
    /* 높이 자동 조절 */
    object-fit: contain;
    /* 이미지 비율 유지하면서 맞춤 */
    align-content: center;
    display: block;
    margin: 0 auto;
}

.main-title {
    text-align: center;
    font-size: 14px;
    margin-top: 10px;
}

.project-info {
    max-width: 1280px;
    padding: 20px 20px;
    margin: 0 auto;
    text-align: left;
}

.project-title {
    margin-top: 12px;
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 6px;
    text-align: left;
    text-transform: uppercase;
}

.project-title .small-text {
    font-size: 12px;
    font-weight: 500;
}

.project-details {
    font-size: 13px;
    font-weight: 300;
    /* 연도, 크기, 재료 크기 줄임 */
    color: #555;
    line-height: 1.6;
    text-align: left;
}

.project-description {
    font-size: 14px;
    color: #000;
    margin-top: 50px;
    line-height: 1.8;
    text-align: left;
}

/* details section at the bottom of each project page */
.details-section {
    max-width: 1280px;
    margin: 60px 40px 50px;
    text-align: left;
    box-sizing: border-box;
}

.details-section .details-title {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.detail-images img {
    width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
    padding-bottom: 20px;
}

.main-container {
    max-width: 1280px;
    margin: 0 20px 80px;
}

/* =========================
   4. Index slider
   ========================= */
/* wrapper holds slider, fills viewport height minus fixed header */
#main-wrapper {
    width: 100%;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden;
    position: relative;
}

/* make sure the content margin doesn't introduce scroll on the home slider */
body.home .content {
    margin: 0 0 0;
}

body.home .header {
    background: transparent;
}

body.home .layout {
    max-width: 100%;
    overflow: hidden
}

/* =========================
   5. Slider fade + overlays + nav
   ========================= */
.project-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.project-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 0;
}

.project-slide.active {
    opacity: 1;
    z-index: 1;
}

/* overlay text on image */
.project-slide .thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-slide .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-slide .overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    /* background: rgba(0, 0, 0, 0.5); */
    color: #000;
    padding: 10px;
    font-size: 14px;
    font-weight: 300;
    text-align: left;
    box-sizing: border-box;
    line-height: 200%;
    z-index: 10;
}

.project-slide .overlay a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .1rem;
    transition: color 0.4s ease;
}

.project-slide .overlay a:hover {
    color: #999999;
    text-decoration: none;
}

/* progress/navigation bars */
.progress-nav {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 2;
    cursor: pointer;
}

.progress-bar {
    width: 80px;
    height: 2px;
    background: rgba(49, 40, 40, 0.3);
    overflow: hidden;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: #fff;
    transition: width linear;
}

/* horizontal flex container for slides */
.project-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
}

/* each slide occupies the full viewport of the wrapper */
.project-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    /* padding: 20px; */
}

/* make thumbnail image cover the slide */
.project-slide .thumbnail {
    flex: 1;
    width: 100%;
    overflow: hidden;
}

.project-slide .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-slide .main-descript {
    font-size: 14px;
    color: #000;
    margin-top: 12px;
    text-align: center;
}

/* hide scrollbar if any */
.project-slider {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.project-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera*/
}

.slide-nav-layer{
    position:absolute;
    inset:0;
    display:flex;
    padding-bottom: 120px;
    z-index:5;
    pointer-events:none; /* 중요 */
}

.slide-prev,
.slide-next{
    flex:1;
    pointer-events:auto; /* 여기만 클릭 가능 */
}

.slide-prev{
    cursor:url("/assets/cursor/cursor-prev.svg") 16 16, w-resize;
}

.slide-next{
    cursor:url("/assets/cursor/cursor-next.svg") 16 16, e-resize;
}





.main-container img {
    width: 100%;
    aspect-ratio: 1280 / 768;
    /* 높이 자동 조절 */
    object-fit: cover;
    /* 이미지 비율 유지하면서 맞춤 */
    align-content: center;
    display: block;
    margin: 0 auto;
}

.thumbnail {
    overflow: hidden;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.6s ease;
}

.thumbnail:hover img {
    transform: scale(1.05);
}

.main-descript {
    font-size: 12px;
    font-weight: 300;
    color: #000;
    text-align: left !important;
}

.main-link {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    align-self: flex-start;
    margin: 0 auto;
}

/* Works 페이지 2열 그리드 (데스크탑) */
#works-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 50vw));
    column-gap: min(120px, 6vw);
    row-gap: 120px;
    justify-content: center;
    margin: 0 20px;
}

.work-container {
    /* margin: 0 20px; */
    text-align: left;
}

.work-container:nth-child(2n) {
    margin-top: 180px;
}

.work-container img {
    width: 100%;
    height: auto;
    aspect-ratio: var(--aspect-ratio, 3 / 4);
    object-fit: cover;
    /* 이미지 비율 유지하면서 맞춤 */
    display: block;
    margin: 0 auto;
}

.work-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* =========================
   4. 메뉴 & 링크
   ========================= */


/* 사이드바 (데스크탑) */
.sidebar {
    position: fixed;
    top: 80px;
    width: 220px;
    padding: 12px 0px;
    text-align: left;
    font-size: 16px;
    /* background-color: rgba(255, 192, 203, 0.568); */
}

.sidebar a {
    padding: 6px 16px;
    text-decoration: none;
    color: rgb(150, 150, 150);
    display: block;
    font-weight: 300;
}

.sidebar a[disabled] {
    pointer-events: none;
    color: rgb(170, 170, 170);
}




a {
    color: black;
    /* 링크 색상 검은색으로 변경 */
    text-decoration: none;
    font-weight: 400;
    /* Regular */
}

a:hover {
    text-decoration: underline;
}

.video-thumbnail {
    max-width: 800px;
    margin-bottom: 50px;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    /* 높이 자동 조절 */
    object-fit: contain;
    /* 이미지 비율 유지하면서 맞춤 */
    align-content: center;
    display: block;
    margin: 0 auto;
    border-radius: 15px;
}

/* 동영상 스타일 */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 비율 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.year {
    font-size: 18px;
    margin-bottom: 20px;
}

.description {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.separator {
    margin: 30px 0;
    text-align: center;
}

.credits {
    font-size: 16px;
}

.about {
    padding: 240px 20px;
    max-width: 460px;
    
    text-align: left;
}

.about-text {
    font-size: 14px;
    font-weight: 300;
    line-height: 35px;
}

.contact {
    font-weight: 400;
    font-size: 14px;
    padding: 260px 40px;
    text-align: left;
    line-height: 20px;

    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* 이메일 & 인스타 사이 여백 조정 */
.contact-instagram {
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-instagram a {
    font-weight: 400;
    font-size: 14px;
    text-transform: none;
    letter-spacing: normal;
    padding-top: 6px;
}

.cv {
    padding: 180px 20px;
    text-align: left;
}

.cv-name {
    padding: 40px 10px 60px;
    font-size: 16px;
    font-weight: 500;
}

.cv-text {
    font-size: 13px;
    font-weight: 400;
    padding-top: 6px;
}

.cv-section {
    padding: 10px;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cv-year {
    font-weight: 600;
    font-size: 13px;
    padding: 20px 10px 20px;
    text-transform: none;
    letter-spacing: 0px;
}

.cv-item {
    padding: 5px 10px 10px;
    font-weight: 500;
    font-size: 13px;
}

.cv-detail {
    font-weight: 400;
    font-size: 13px;
}

.menu-toggle {
    display: none;
}

.scroll-fade {
    opacity: 0;
    transform: translateY(20px);

    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.scroll-fade.visible {
    opacity: 1;
    transform: none;
}

/* =========================
   6. 반응형 (모바일)
   ========================= */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .layout {
        display: block;
    }

    .header-inner {
        height: 44px;
    }

    .header-logo a {
        font-size: 13px;
    }

    .header-nav {
        display: none;
    }

    .content {
        margin-top: 44px;
        display: block;
    }

    .text-container {
        margin-top: 0px;
        display: block;
        margin-left: 0;
        padding: 60px 15px;
    }

    .main-container {
        margin: 0 auto 80px;
    }

    .project-info {
        width: auto;
        padding: 20px 15px 20px;
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        display: flex;
        flex-direction: column;
        padding-left: 20px;

        opacity: 0;
        visibility: hidden;
        transition: 0.5s ease-in-out;

        z-index: 100;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .menu {
        display: flex;
        flex-direction: column;
        padding-left: 20px;
        padding-top: 124px;
        gap: 36px;
        flex: 1;
        justify-content: flex-start;
    }

    .menu a {
        color: #999999;
        font-size: 16px;
        font-weight: 400;
        text-decoration: none;
        text-align: left;
        text-transform: uppercase;
        transition: color 0.25s ease;
    }

    .menu a.active {
        color: black;
    }

    .menu a:hover {
        color: black;
        text-decoration: none;
    }

    .menu-toggle {
        color: black;
        display:contents;
        position: fixed;
        right: 12px;
        z-index: 1000;

        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
    }

    p {
        font-size: 16px;
        line-height: 1.8;
    }

    .description {
        font-size: 16px;
        line-height: 1.6;
    }

    .credits {
        font-size: 14px;
    }

    .video-thumbnail {
        padding: 0px 20px;
    }

    .about {
        padding: 224px 40px;
    }

    

    .cv {
    padding: 64px 20px;
}

    /* 모바일에서는 works를 1열로 유지 */
    #works-wrapper {
        display: block;
        margin: 0 20;
    }

    .work-container {
        max-width: 800px;
        margin: 0 auto 80px;
    }

    .work-container:nth-child(2n) {
        margin-top: 0px;
    }
}




/* =========================
   7. Contact 페이지용 폰트 굵기 클래스
   ========================= */
.bold {
    font-weight: 600;
}

.semi-bold {
    font-weight: 400;
}

/* 데스크탑에서 메뉴 숨김 */
@media (min-width: 769px) {
    #menu {
        display: none;
    }
}