/* ==========================================
   디자인 토큰 및 기본 설정 (CSS Variables)
   - 포인트 컬러를 변경하고 싶다면 --color-accent 값을 수정하세요.
   ========================================== */
:root {
    --color-bg: #FAFAFA;
    --color-surface: #FFFFFF;
    --color-text: #111111;
    --color-text-muted: #666666;
    --color-text-light: #999999;
    --color-border: #E6E6E6;
    --color-placeholder: #E4E4E7;
    
    /* 포인트 컬러: 감각적인 버밀리온 오렌지 */
    --color-accent: #FF4D00;
    --color-accent-soft: rgba(255, 77, 0, 0.08);

    /* 폰트 설정 */
    --font-sans: "Pretendard Variable", Pretendard, "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

    /* 레이아웃 및 트랜지션 */
    --container-max: 1280px;
    --header-height: 80px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   Reset & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* ==========================================
   공통 유틸리티 클래스
   ========================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 40px;
}

.section-padding {
    padding: 140px 0;
}

.accent-text {
    color: var(--color-accent);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 72px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--color-border);
    gap: 32px;
}

.section-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.section-desc {
    max-width: 420px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ==========================================
   스크롤 등장 애니메이션 (Reveal on Scroll)
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

/* ==========================================
   상단 고정 헤더 (Header)
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background-color: rgba(250, 250, 250, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--color-border);
}

.header-inner {
    max-width: var(--container-max);
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo .dot {
    color: var(--color-accent);
}

.nav-list {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-muted);
    position: relative;
    padding: 6px 0;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s var(--ease-out-expo);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    z-index: 110;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: transform 0.3s ease;
}

/* ==========================================
   1. 히어로 섹션 (Hero)
   ========================================== */
.hero-section {
    min-height: 100vh;
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.hero-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - var(--header-height));
    padding-top: 80px;
    padding-bottom: 56px;
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}

.badge {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--color-accent);
}

.year {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.hero-title {
    font-size: clamp(3.5rem, 9.5vw, 8.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.98;
    margin: 48px 0 32px;
}

.hero-kor-name {
    display: inline-block;
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text-muted);
    margin-top: 12px;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.4vw, 1.85rem);
    font-weight: 500;
    max-width: 720px;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1.45;
}

.hero-bottom {
    margin-top: 64px;
    display: flex;
    justify-content: flex-start;
}

.scroll-indicator {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    group: scroll;
}

.scroll-text {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--color-text-muted);
    transition: color 0.25s ease;
}

.scroll-indicator:hover .scroll-text {
    color: var(--color-accent);
}

.scroll-line {
    width: 64px;
    height: 1px;
    background-color: var(--color-border);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 100%;
    background-color: var(--color-accent);
    animation: scrollSlide 2s infinite var(--ease-out-expo);
}

@keyframes scrollSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(280%); }
}

/* ==========================================
   2. 작업물 섹션 (Works)
   ========================================== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 36px;
}

.work-card {
    cursor: pointer;
}

.work-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--color-placeholder);
    border: 1px solid var(--color-border);
}

/* 실제 이미지 교체 시 적용되는 스타일 */
.work-img,
.work-img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.75s var(--ease-out-expo);
}

/* 회색 Placeholder 기본 디자인 */
.work-img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EAEAEA 0%, #DCDCE0 100%);
    color: #888888;
    gap: 6px;
    user-select: none;
}

.work-img-placeholder span {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.work-img-placeholder small {
    font-size: 0.75rem;
    color: #9E9EA4;
}

/* 마우스 호버 시 확대 효과 */
.work-card:hover .work-img,
.work-card:hover .work-img-placeholder {
    transform: scale(1.06);
}

/* 마우스 호버 시 프로젝트명 오버레이 */
.work-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.78);
    color: #FFFFFF;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out-expo);
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.overlay-category {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: translateY(12px);
    transition: transform 0.45s var(--ease-out-expo);
}

.overlay-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 8px 0 18px;
    letter-spacing: -0.02em;
    transform: translateY(12px);
    transition: transform 0.45s var(--ease-out-expo) 0.04s;
}

.overlay-btn {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #FFFFFF;
    border-bottom: 1px solid var(--color-accent);
    align-self: flex-start;
    padding-bottom: 2px;
    transform: translateY(12px);
    transition: transform 0.45s var(--ease-out-expo) 0.08s;
}

.work-card:hover .overlay-category,
.work-card:hover .overlay-title,
.work-card:hover .overlay-btn {
    transform: translateY(0);
}

/* 모바일/태블릿에서도 제목이 잘 보이도록 하단 보조 캡션 제공 */
.work-info-mobile {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 16px;
}

.work-info-mobile h3 {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color 0.25s ease;
}

.work-card:hover .work-info-mobile h3 {
    color: var(--color-accent);
}

.work-info-mobile span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ==========================================
   3. 소개 섹션 (About)
   ========================================== */
.about-section {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.about-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 72px;
    align-items: start;
}

.profile-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    background-color: var(--color-placeholder);
    border: 1px solid var(--color-border);
    overflow: hidden;
    position: relative;
}

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

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ECECEE 0%, #DDDDE2 100%);
    color: #888888;
    gap: 8px;
}

.profile-placeholder span {
    font-weight: 700;
    letter-spacing: 0.12em;
}

.profile-placeholder small {
    font-size: 0.75rem;
    color: #9E9EA4;
}

.about-headline {
    font-size: clamp(1.6rem, 2.8vw, 2.35rem);
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
}

.highlight {
    box-shadow: inset 0 -0.45em 0 var(--color-accent-soft);
    color: var(--color-accent);
}

.about-bio {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 48px;
}

.about-bio strong {
    color: var(--color-text);
}

.sub-heading {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--color-text);
    margin-bottom: 24px;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 32px;
    margin-bottom: 32px;
}

.skill-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.925rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.skill-level {
    color: var(--color-accent);
}

.skill-bar {
    width: 100%;
    height: 4px;
    background-color: var(--color-border);
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background-color: var(--color-text);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    border-radius: 999px;
    transition: border-color 0.25s ease, color 0.25s ease;
}

.tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ==========================================
   4. 연락처 섹션 (Contact)
   ========================================== */
.contact-box {
    max-width: 880px;
}

.contact-title {
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.18;
    margin: 12px 0 20px;
}

.contact-desc {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 56px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--color-text);
}

.contact-item {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    align-items: center;
    padding: 28px 12px;
    border-bottom: 1px solid var(--color-border);
    transition: padding-left 0.35s var(--ease-out-expo), background-color 0.25s ease;
}

.contact-item:hover {
    padding-left: 24px;
    background-color: var(--color-surface);
}

.contact-type {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
}

.contact-value {
    font-size: clamp(1.15rem, 2.2vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color 0.25s ease;
}

.contact-item:hover .contact-value,
.contact-item:hover .contact-arrow {
    color: var(--color-accent);
}

.contact-arrow {
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s var(--ease-out-expo), color 0.25s ease;
}

.contact-item:hover .contact-arrow {
    transform: translate(4px, -4px);
}

/* ==========================================
   푸터 (Footer)
   ========================================== */
.footer {
    border-top: 1px solid var(--color-border);
    padding: 36px 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-to-top {
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: color 0.25s ease;
}

.back-to-top:hover {
    color: var(--color-accent);
}

/* ==========================================
   작업물 상세 모달 (Modal)
   ========================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(17, 17, 17, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: var(--color-surface);
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--color-border);
    transform: translateY(24px) scale(0.98);
    transition: transform 0.4s var(--ease-out-expo);
}

.modal-backdrop.open .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: sticky;
    top: 20px;
    float: right;
    margin: 20px 20px 0 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-text);
    color: #FFFFFF;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.modal-close:hover {
    background-color: var(--color-accent);
    transform: rotate(90deg);
}

.modal-body {
    clear: both;
    padding: 0 48px 48px;
}

.modal-media {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: var(--color-placeholder);
    margin-bottom: 36px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-category {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.modal-title {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.modal-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 28px;
}

.meta-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-text-light);
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}

.modal-desc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

/* ==========================================
   반응형 미디어 쿼리 (Tablet & Mobile)
   ========================================== */
@media (max-width: 1024px) {
    .container,
    .header-inner {
        padding: 0 28px;
    }

    .section-padding {
        padding: 100px 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 48px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .profile-frame {
        max-width: 440px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 68px;
    }

    .container,
    .header-inner {
        padding: 0 20px;
    }

    /* 모바일 내비게이션 드로어 */
    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        transform: translateY(-4px) rotate(-45deg);
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-bg);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: right 0.4s var(--ease-out-expo);
    }

    .nav.open {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .nav-link {
        font-size: 1.75rem;
        font-weight: 800;
    }

    /* 그리드 1열 전환 */
    .works-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .skills-list {
        grid-template-columns: 1fr;
    }

    .contact-item {
        grid-template-columns: 1fr auto;
        gap: 6px;
        padding: 22px 8px;
    }

    .contact-type {
        grid-column: 1 / -1;
    }

    .modal-body {
        padding: 0 24px 32px;
    }

    .modal-meta {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

