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


/* =========================
   BASIC
========================= */

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    background-color: #f3f0e8;
    color: #111111;

    background-image:
        radial-gradient(
            rgba(0, 0, 0, 0.035) 0.7px,
            transparent 0.7px
        );

    background-size: 4px 4px;
}


/* =========================
   HEADER
========================= */

.header {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    padding: 24px 30px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    z-index: 100;
}

.logo {
    color: #111111;
    text-decoration: none;

    font-size: 18px;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 24px;
}

.nav a {
    color: #111111;
    text-decoration: none;

    font-size: 14px;
}


/* =========================
   HERO
========================= */

.hero {
    width: 100%;
    min-height: 100vh;

    padding:
        100px
        7%
        80px;

    display: grid;

    /*
       왼쪽 사진 영역을 가장 크게,
       오른쪽은 ABOUT + 영상 영역
    */
    grid-template-columns:
        minmax(320px, 38%)
        minmax(0, 1fr);

    column-gap: 9%;

    align-items: start;

    background-color: #f3f0e8;

background-image:
    radial-gradient(
        rgba(0, 0, 0, 0.035) 0.7px,
        transparent 0.7px
    );

background-size: 4px 4px;

scroll-snap-align: start;
scroll-snap-stop: always;

}


/* =========================
   HERO LEFT
========================= */

.hero-left {
    width: 100%;

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

    transition:
        opacity 0.15s linear,
        transform 0.15s linear;
}


/* 프로필 영역 */

.hero-profile {
    width: 100%;

    /*
       사진은 가장 크게
    */
    max-width: 400px;
}


/* 프로필 사진 */

.profile-image {
    display: block;

    width: 100%;
    height: auto;

    object-fit: cover;
}


/* 이름 */

.hero-text {
    margin-top: 12px;
}


.hero-text p {
    font-size: 12px;

    letter-spacing: -0.02em;
}


/* =========================
   HERO RIGHT
========================= */

.hero-right {
    width: 100%;

    /*
       ABOUT 위
       VIDEO 아래
    */
    display: grid;

    grid-template-rows:
        1fr
        1fr;

    row-gap: 25px;

    align-items: stretch;

    transition:
        opacity 0.15s linear,
        transform 0.15s linear;

    margin-top: -80px;
}


/* =========================
   HERO ABOUT
========================= */

.hero-about {
    width: 100%;
    max-width: 600px;

    display: flex;
    flex-direction: column;

    justify-content: center;
}


/* ABOUT 작은 제목 */

.hero-about-label {
    margin-bottom: 18px;

    font-size: 10px;

    letter-spacing: 0.04em;
}


/* 영상을 만드는 이시훈입니다. */

.hero-about-title {
    margin-bottom: 16px;

    font-size: 23px;
    font-weight: 500;

    line-height: 1.35;

    letter-spacing: -0.04em;
}


/* 소개 문장 */

.hero-about-description {
    font-size: 14px;

    line-height: 1.8;

    letter-spacing: -0.025em;
}


/* =========================
   HERO VIDEO
========================= */

.hero-video {
    width: 100%;
    max-width: 540px;

    align-self: end;

    transform: translateY(-60px);

    overflow: hidden;
}


/* 대표 영상 */

.hero-video video {
    display: block;

    width: 100%;
    height: auto;

    aspect-ratio: 16 / 9;

    object-fit: cover;
}
/* =========================
   HERO → WORK TRANSITION
========================= */

.section-transition {
    width: 100%;
    height: 220px;

    scroll-snap-align: none;

    background-color: #f3f0e8;

    background-image:
        radial-gradient(
            rgba(0, 0, 0, 0.035) 0.7px,
            transparent 0.7px
        ),
        linear-gradient(
            to bottom,
            #f3f0e8 0%,
            #ebe9e3 30%,
            #d9d8d4 60%,
            #c9cac7 82%,
            #bfc0be 100%
        );

    background-size:
        4px 4px,
        100% 100%;

    background-repeat:
        repeat,
        no-repeat;
}
/* =========================
   WORK
========================= */

.work {
    position: relative;

    width: 100%;
    min-height: 125vh;
    height: 125vh;

    padding: 0;

    background-color: #bfc0be;

    background-image:
        radial-gradient(
            rgba(0, 0, 0, 0.04) 0.7px,
            transparent 0.7px
        );

    background-size: 4px 4px;

    scroll-snap-align: start;
    scroll-snap-stop: always;
}


/* =========================
   WORK ITEM
========================= */

.work-item {
    position: absolute;

    display: block;

    color: #111111;
    text-decoration: none;

    cursor: pointer;

    z-index: 1;

    transition:
        opacity 0.35s ease,
        filter 0.35s ease;
}


/* =========================
   WORK MEDIA
========================= */

.work-media {
    position: relative;

    width: 100%;

    overflow: hidden;

    transform-origin: center center;

    transition:
        transform 0.4s ease;
}


/* =========================
   VIDEO
========================= */

.work-media video {
    display: block;

    width: 100%;
    height: auto;

    object-fit: cover;

    transition:
        filter 0.4s ease;
}


/* =========================
   HOVER SYSTEM
========================= */

.work:has(.work-item:hover) .work-item {
    opacity: 0.28;

    filter:
        grayscale(0.25)
        contrast(0.9)
        brightness(1.08);
}


.work:has(.work-item:hover) .work-item:hover {
    opacity: 1;

    filter: none;

    z-index: 30;
}


/* 선택된 영상 박스 확대 */

.work-item:hover .work-media {
    transform: scale(1.07);
}


/* 선택된 영상은 설명을 위해 살짝 어둡게 */

.work-item:hover .work-media video {
    filter: brightness(0.62);
}


/* =========================
   HOVER OVERLAY
========================= */

.work-overlay {
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;

    padding: 18px;

    color: #ffffff;

    opacity: 0;

    transform: translateY(10px);

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;

    pointer-events: none;
}


.work-item:hover .work-overlay {
    opacity: 1;

    transform: translateY(0);
}


.overlay-title {
    margin-bottom: 5px;

    font-size: 13px;
    font-weight: 700;
}


.overlay-description {
    max-width: 280px;

    font-size: 11px;
    line-height: 1.4;
}


/* =========================
   PROJECT INFO
========================= */

.work-info {
    display: flex;
    align-items: center;

    gap: 7px;

    margin-top: 7px;

    font-size: 11px;

    white-space: nowrap;
}

.work-title {
    font-weight: 400;
}

.work-role {
    font-weight: 700;
}

.work-year {
    font-size: 10px;
}


/* =========================
   PROJECT 01 ~ 06
   OVERLAPPING STAIRCASE
========================= */

/* 모든 프로젝트 썸네일 프레임 통일 */
.work-item {
    width: 27%;
}

.work-item .work-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.work-item .work-media video,
.work-5 .work-media video,
.work-6 .work-media video {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* 왼쪽 위 → 오른쪽 아래로 겹치는 계단형 */
.work-1 { left: 7%;  top: 15%; width: 27%; z-index: 6; }
.work-2 { left: 20%; top: 24%; width: 27%; z-index: 5; }
.work-3 { left: 33%; top: 33%; width: 27%; z-index: 4; }
.work-4 { left: 46%; top: 42%; width: 27%; z-index: 3; }
.work-5 { left: 59%; top: 51%; width: 27%; right: auto; z-index: 2; }
.work-6 { left: 72%; top: 60%; width: 27%; right: auto; bottom: auto; z-index: 1; }

/* =====================
       VIDEO MODAL
    ===================== */

    /* =========================
   VIDEO MODAL
========================= */

.video-modal {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    /*
       뒤쪽 WORK 화면만 어둡게
       별도의 흰색 팝업창은 만들지 않음
    */
    background-color: rgba(10, 10, 10, 0.78);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;

    z-index: 1000;
}


/* 모달 열림 */

.video-modal.active {
    opacity: 1;
    visibility: visible;
}


/* =========================
   MODAL INNER
========================= */

.video-modal-inner {
    position: relative;

    /*
       화면 전체의 약 80% 정도 사용
       기존 72vw보다 약간 크게
    */
    width: 82vw;
    max-width: 1380px;

    max-height: 84vh;

    display: grid;

    /*
       왼쪽 영상을 크게,
       오른쪽 설명은 상대적으로 작게
    */
    grid-template-columns:
        minmax(0, 3.2fr)
        minmax(220px, 0.8fr);

    gap: 52px;

    align-items: center;

    /*
       기존 흰색 박스 제거
    */
    padding: 0;

    background: transparent;
    background-image: none;

    overflow: visible;

    /*
       전체 콘텐츠를 약간 왼쪽으로
    */
    transform:
        translateX(-3%)
        scale(0.94);

    transition:
        transform 0.4s ease;
}


/* 열릴 때 자연스럽게 확대 */

.video-modal.active .video-modal-inner {
    transform:
        translateX(-3%)
        scale(1);
}


/* =========================
   MODAL PLAYER
========================= */

.video-modal-player {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    /*
       검은색 박스가 영상보다
       크게 보이지 않도록
    */
    overflow: hidden;

    background: transparent;
}


/* 실제 영상 */

.video-modal-player video {
    display: block;

    width: 100%;
    height: auto;

    /*
       기존 70vh보다 약 10% 정도 확대
    */
    max-height: 77vh;

    object-fit: contain;

    /*
       영상 자체에만 검은 배경
       레터박스가 있는 영상 대응
    */
    background-color: #000000;
}


/* =========================
   MODAL INFO
========================= */

.video-modal-info {
    width: 100%;

    align-self: center;

    padding: 0;

    /*
       팝업 배경이 사라졌으므로
       텍스트는 흰색
    */
    color: #ffffff;
}


/* 제목 */

.video-modal-title {
    margin-bottom: 20px;

    font-size: 28px;
    font-weight: 500;

    line-height: 1.2;

    letter-spacing: -0.035em;
}


/* 설명 */

.video-modal-description {
    max-width: 300px;

    font-size: 14px;

    line-height: 1.75;

    letter-spacing: -0.02em;

    opacity: 0.82;
}


/* =========================
   CLOSE BUTTON
========================= */

.video-modal-close {
    position: absolute;

    /*
       전체 콘텐츠 오른쪽 위에 표시
    */
    top: -48px;
    right: 0;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    color: #ffffff;
    background: transparent;

    font-family: inherit;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    z-index: 20;

    transition:
        opacity 0.2s ease;
}


.video-modal-close:hover {
    opacity: 0.5;
}


/* =========================
   VERTICAL VIDEO
   PROJECT 05
========================= */

.video-modal.vertical .video-modal-inner {
    /*
       세로 영상은 가로 영상과
       같은 폭을 사용하면 너무 커지므로
       별도 크기로 제한
    */

    width: 64vw;
    max-width: 1000px;

    grid-template-columns:
        minmax(300px, 1fr)
        minmax(220px, 0.55fr);

    gap: 55px;

    transform:
        translateX(-2%)
        scale(0.94);
}


.video-modal.vertical.active .video-modal-inner {
    transform:
        translateX(-2%)
        scale(1);
}


.video-modal.vertical .video-modal-player {
    background: transparent;
}


.video-modal.vertical .video-modal-player video {
    width: auto;
    max-width: 100%;

    height: 78vh;
    max-height: 78vh;

    object-fit: contain;

    margin: 0 auto;
}

/* =========================
   CONTACT
========================= */

.contact {
    position: relative;

    width: 100%;
    min-height: 100vh;

    padding: 120px 5%;

    background-color: #bfc0be;

    background-image:
        radial-gradient(
            rgba(0, 0, 0, 0.04) 0.7px,
            transparent 0.7px
        );

    background-size: 4px 4px;

    scroll-snap-align: start;
    scroll-snap-stop: always;
}


.section-label {
    font-size: 14px;

    margin-bottom: 30px;
}


.contact-links {
    display: flex;

    gap: 20px;

    margin-bottom: 80px;
}


.contact-links a {
    color: #111111;

    text-decoration: none;
}

.email-button {
    padding: 0;
    background: none;
    border: none;

    color: #111111;

    font: inherit;
    font-size: inherit;

    cursor: pointer;
}

.copyright {
    font-size: 12px;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    html {
        scroll-snap-type: none;
    }


    /* HEADER */

    .header {
        padding: 18px;
    }

    .logo {
        font-size: 15px;
    }

    .nav {
        gap: 14px;
    }

    .nav a {
        font-size: 12px;
    }


    /* =====================
       HERO
    ===================== */

    .hero {
        min-height: auto;

        padding:
            110px
            20px
            80px;

        display: block;

        scroll-snap-align: none;
    }


    .hero-left {
        display: block;
    }


    .hero-profile {
        width: 100%;
        max-width: none;

        margin-bottom: 55px;
    }


    .profile-image {
        width: 100%;
        height: auto;
    }


    .hero-right {
        width: 100%;

        display: block;
    }


    .hero-video {
        width: 100%;
        max-width: none;

        margin-bottom: 45px;
    }


    .hero-video video {
        width: 100%;
        height: auto;

        aspect-ratio: 16 / 9;
    }


    .hero-about {
        width: 100%;
        max-width: none;
    }


    .hero-about-title {
        font-size: 24px;
    }


    .hero-about-description {
        font-size: 15px;

        line-height: 1.7;
    }


    /* =====================
       WORK
    ===================== */

    .work {
        height: auto;
        min-height: auto;

        padding: 60px 20px;

        scroll-snap-align: none;
    }


    .work-item,
    .work-1,
    .work-2,
    .work-3,
    .work-4,
    .work-5,
    .work-6 {
        position: relative;

        left: auto;
        right: auto;
        top: auto;

        width: 100%;

        margin-bottom: 60px;
    }


    .work:has(.work-item:hover) .work-item {
        opacity: 1;

        filter: none;
    }


    .work-media video {
        width: 100%;
        height: auto;
    }


    .work-item:hover .work-media {
        transform: none;
    }


    .work-item:hover .work-media video {
        filter: none;
    }


    .work-overlay {
        display: none;
    }


    .work-item .work-media {
        aspect-ratio: 16 / 9;
    }

    .work-item .work-media video,
    .work-5 .work-media video,
    .work-6 .work-media video {
        width: 100%;
        height: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }



    /* =====================
       CONTACT
    ===================== */

    .contact {
        min-height: auto;

        padding: 80px 20px;

        scroll-snap-align: none;
    }
}