/* --- 1. FONTS & RESET --- */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

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

:root {
    --bg-color: #0a0a0a;
    --text-main: #f0f0f0;
    --accent-red: #e20f0f;
    --gray-mute: #888;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Courier Prime', monospace;
    /* 타자기 폰트 */
    overflow-x: hidden;
}

/* --- 2. NOISE TEXTURE (Grungy Feel) --- */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.07;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
}

/* --- 3. HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    font-family: 'Anton', sans-serif;
    width: 100px;
    letter-spacing: 2px;
}

nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    text-decoration: none;
    color: var(--bg-color);
    background: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-btn:hover {
    background: var(--accent-red);
    color: var(--text-main);
    transform: scale(1.05) rotate(-2deg);
}

.nav-btn.contact {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-main);
}

.nav-btn.contact:hover {
    background: var(--text-main);
    color: var(--bg-color);
}

/* --- 4. HERO SECTION --- */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    filter: contrast(1.2) grayscale(100%);
    z-index: -1;
}

.hero-title {
    font-family: 'Anton', sans-serif;
    font-size: 5vw;
    line-height: 1;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.highlight {
    font-family: 'Anton', sans-serif;
    font-size: 5vw;
    line-height: 1;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    color: var(--accent-red);
}

.hero-subtitle {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--gray-mute);
    letter-spacing: 3px;
}

/* --- UPDATED: About Section (Image 1 Style) --- */

.immersive-section {
    position: relative;
    width: 100%;
    height: 90vh;
    /* 화면을 거의 가득 채우는 높이 */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* 텍스트를 바닥쪽으로 내림 */
    padding-bottom: 8rem;
    /* 바닥에서 띄움 */
    overflow: hidden;
    border-top: 1px solid #333;
}

.immersive-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.immersive-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.3) brightness(0.6);
    /* 어둡고 거친 흑백 처리 */
    transition: transform 1s ease;
}

/* 마우스 호버 시 배경이 살짝 줌인되는 효과 */
.immersive-section:hover .immersive-bg {
    transform: scale(1.02);
}

/* 텍스트 그룹 스타일 */
.immersive-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    /* [이미지 1] 처럼 중앙 정렬 */
}

.immersive-content h2 {
    font-size: 4rem;
    /* 헤드라인을 더 크게 */
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    /* 가독성을 위한 그림자 */
    line-height: 0.9;
}

.immersive-content p {
    font-size: 1.1rem;
    color: #ddd;
    max-width: 600px;
    margin: 0 auto;
    /* 가운데 정렬 */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    font-weight: bold;
}

/* --- BIO SECTION (Resume Style Layout) --- */
.bio-section {
    background-color: #0f0f0f;
    /* 배경색 미세하게 분리 */
    padding: 0;
    /* 전체 너비를 쓰기 위해 패딩 제거 */
}

.bio-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

/* --- Left Sidebar (Black Box) --- */
.bio-sidebar {
    flex: 1;
    /* 너비 비율 1 */
    background-color: #000;
    /* 완전 검정 */
    padding: 4rem 2rem;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.bio-photo-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 50%;
    /* 원형 프로필 */
    border: 2px solid var(--accent-red);
    margin-bottom: 1rem;
    /* filter: grayscale(100%); */
    /* 흑백 처리 */
    transition: filter 0.3s;
}

.bio-photo-frame:hover {
    /* filter: grayscale(0%); */
    /* 호버시 컬러 */
}

.bio-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bio-info-group h3 {
    font-family: 'Anton', sans-serif;
    color: var(--accent-red);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.bio-info-group ul {
    list-style: none;
}

.bio-info-group li {
    color: #888;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    background: #222;
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 4px;
    border: 1px solid #444;
}

/* --- Right Main Content (Timeline) --- */
.bio-main {
    flex: 2;
    /* 너비 비율 2 (더 넓게) */
    padding: 4rem 3rem;
    background-color: #0f0f0f;
}

.bio-title {
    font-family: 'Anton', sans-serif;
    font-size: 3rem;
    color: #fff;
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--accent-red);
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Timeline Structure */
.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

/* 타임라인 세로선 (왼쪽 점선 라인) */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 85px;
    /* 연도와 내용 사이 */
    top: 0;
    bottom: -3rem;
    width: 1px;
    background: #333;
}

.timeline-item:last-child::before {
    display: none;
}

/* 타임라인 점 (Dot) */
.timeline-item::after {
    content: '';
    position: absolute;
    left: 81px;
    /* 선 위치 조정 */
    top: 5px;
    width: 9px;
    height: 9px;
    background: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-red);
}

.year {
    font-family: 'Anton', sans-serif;
    font-size: 1.5rem;
    color: #666;
    min-width: 60px;
    text-align: right;
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.career-list {
    list-style: none;
    padding-left: 0;
}

.career-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.6rem;
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1.5;
}

.career-list li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--accent-red);
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(12px, 9999px, 32px, 0);
    }

    20% {
        clip: rect(64px, 9999px, 12px, 0);
    }

    40% {
        clip: rect(30px, 9999px, 86px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 44px, 0);
    }

    80% {
        clip: rect(78px, 9999px, 2px, 0);
    }

    100% {
        clip: rect(55px, 9999px, 66px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(62px, 9999px, 12px, 0);
    }

    20% {
        clip: rect(24px, 9999px, 52px, 0);
    }

    40% {
        clip: rect(80px, 9999px, 16px, 0);
    }

    60% {
        clip: rect(40px, 9999px, 64px, 0);
    }

    80% {
        clip: rect(18px, 9999px, 92px, 0);
    }

    100% {
        clip: rect(35px, 9999px, 46px, 0);
    }
}

/* --- 5. CONTENT SECTIONS --- */
.section {
    padding: 6rem 2rem;
    border-top: 1px solid #333;
}

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

h2 {
    font-family: 'Anton', sans-serif;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--accent-red);
}

p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #ccc;
}

.embed-placeholder {
    background: #222;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #555;
    color: #555;
}

/* --- 6. FOOTER --- */
footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 4px solid var(--accent-red);
    background: #000;
}

footer h2 {
    font-size: 2rem;
}

.footer-link {
    color: var(--text-main);
    font-size: 1.5rem;
    text-decoration: underline;
}

.copyright {
    margin-top: 2rem;
    font-size: 0.8rem;
    color: #555;
}

/* --- 7. MOBILE --- */
@media (max-width: 768px) {
    header {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    nav {
        display: none;
    }

    .immersive-section {
        height: 70vh;
        padding-bottom: 4rem;
    }

    .immersive-content h2 {
        font-size: 2.5rem;
    }

    /* 모바일 메뉴는 필요시 JS로 구현 필요 */
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .bio-container {
        flex-direction: column;
    }

    .bio-sidebar {
        padding: 3rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid #333;
        flex-direction: row;
        /* 모바일에서 가로 배치 시도 */
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .bio-photo-frame {
        width: 150px;
        margin: 0 auto 2rem;
    }

    .bio-main {
        padding: 3rem 1.5rem;
    }

    .timeline-item {
        gap: 1rem;
    }

    .timeline-item::before,
    .timeline-item::after {
        left: 0;
        /* 모바일에서는 선 위치 변경 혹은 숨김 */
        display: none;
        /* 심플하게 선 제거 */
    }

    .year {
        text-align: left;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        display: block;
    }

    .timeline-item {
        flex-direction: column;
    }
}

/* --- GALLERY SECTION (Shattered/Collage Look) --- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 4열 그리드 */
    grid-auto-rows: 250px;
    gap: 10px;
    padding: 1rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: grayscale(80%);
    /* 기본적으로 채도를 낮춰 Raw한 느낌 */
    border: 1px solid #333;
}

.gallery-item:hover {
    transform: scale(1.02);
    filter: grayscale(0%);
    /* 호버 시 컬러 */
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* --- Shattered Layout (Polygon Shapes) --- */
/* 각 아이템을 불규칙한 조각처럼 자르기 */

.item-lg {
    grid-column: span 2;
    grid-row: span 2;

}

.item-md {
    grid-column: span 2;
}

.item-sm {
    grid-column: span 1;
}

/* --- Overlay Hover Effect --- */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 51, 51, 0.2);
    /* 붉은색 틴트 */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.overlay .icon {
    color: #fff;
    font-size: 2rem;
    font-family: 'Courier Prime', monospace;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 50%;
}

/* --- Lightbox Modal --- */
.lightbox {
    display: none;
    /* 기본 숨김 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    /* 아주 어두운 배경 */
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80%;
    border: 2px solid var(--accent-red);
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.3);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--accent-red);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .gallery-item img {
        width: 100%;
        height: auto;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .item-lg,
    .item-md,
    .item-sm {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* --- VIDEO SECTION --- */

/* Filter Buttons */
.video-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.filter-btn {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 0.5rem 1.5rem;
    font-family: 'Courier Prime', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(255, 51, 51, 0.1);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.video-card {
    background: #0f0f0f;
    border: 1px solid #222;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-red);
}

.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-card:hover .video-thumb img {
    opacity: 0.4;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 3rem;
    color: var(--accent-red);
    text-shadow: 0 0 10px var(--accent-red);
}

/* Video Info */
.video-info {
    padding: 1rem;
}

.video-info .tag {
    font-size: 0.7rem;
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    padding: 2px 6px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.video-info h3 {
    font-size: 1rem;
    color: #fff;
    margin: 0;
    font-weight: normal;
}

/* --- Video Modal --- */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.video-modal.active {
    display: flex;
}

.video-wrapper {
    position: relative;
    width: 80%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--accent-red);
}

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

.close-video {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 2001;
}

.close-video:hover {
    color: var(--accent-red);
}

@media (max-width: 768px) {
    .video-wrapper {
        width: 95%;
    }
}