@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --bg:          #FAF8F4;
    --surface:     #F0EBE1;
    --border:      #E8E2D8;
    --accent:      #C4956A;
    --accent-dark: #B07D50;
    --brown-mid:   #8B5E3C;
    --brown-dark:  #5C4033;
    --text:        #5C4033;
    --text-muted:  #8B5E3C;
    --tag-shadow:  0px 4px 6px rgba(92, 64, 51, 0.12);
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    justify-content: center;
    background-color: rgba(250, 248, 244, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 0.5px solid var(--border);
}

.header-container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 4rem;
}

.logo {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.25rem;
}

.logo span {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.12em;
    color: var(--brown-dark);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-family: 'Pretendard', inherit;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

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

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 767px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4rem;
    position: relative;
    height: 100%;
    gap: 10vw;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    flex-shrink: 0;
    z-index: 10;
    width: auto;
}

.hero-title {
    font-family: 'Pretendard', sans-serif;
    font-weight: 300;
    font-size: 88px;
    line-height: 1.2;
    color: var(--brown-dark);
    margin: 0;
    letter-spacing: -0.01em;
}

.hero-badge {
    background-color: var(--surface);
    border: 1px solid var(--accent);
    border-radius: 50px;
    padding: 8.5px 20px;
}

.hero-badge span {
    font-weight: 500;
    font-size: 14px;
    color: var(--brown-mid);
    white-space: nowrap;
}

/* Hero Image & Hexagon */
.hero-image-container {
    flex: unset;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hexagon-wrapper {
    position: relative;
    width: 450px;
    height: 450px;
}

.hexagon-mask {
    position: absolute;
    inset: 0;
    mask-image: url('data:image/svg+xml,%3Csvg%20preserveAspectRatio%3D%22none%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20overflow%3D%22visible%22%20style%3D%22display%3A%20block%3B%22%20viewBox%3D%220%200%20450%20450%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20id%3D%22Component%201%22%3E%3Cpath%20id%3D%22Vector%22%20d%3D%22M225%200L450%20112.5V337.5L225%20450L0%20337.5V112.5L225%200Z%22%20fill%3D%22black%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');
    -webkit-mask-image: url('data:image/svg+xml,%3Csvg%20preserveAspectRatio%3D%22none%22%20width%3D%22100%25%22%20height%3D%22100%25%22%20overflow%3D%22visible%22%20style%3D%22display%3A%20block%3B%22%20viewBox%3D%220%200%20450%20450%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20id%3D%22Component%201%22%3E%3Cpath%20id%3D%22Vector%22%20d%3D%22M225%200L450%20112.5V337.5L225%20450L0%20337.5V112.5L225%200Z%22%20fill%3D%22black%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');
    mask-repeat: no-repeat;
    mask-position: 0% 0%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: 0% 0%;
    -webkit-mask-size: 100% 100%;
}

.hexagon-bg {
    position: absolute;
    inset: 0;
    background-color: var(--surface);
}

.profile-img {
    position: absolute;
    left: 0;
    width: 100%;
    top: 12.59%;
    height: 74.81%;
    object-fit: cover;
    object-position: 50% 25%;
}

/* Floating Tags */
.tag {
    position: absolute;
    display: flex;
    align-items: center;
    border-radius: 6px;
    padding: 8px 18px 9px;
    box-shadow: var(--tag-shadow);
}

.tag span {
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.tag-ui {
    top: 15%;
    left: 10%;
    background-color: var(--surface);
    border: 1px solid var(--accent);
    color: var(--brown-mid);
}

.tag-design {
    top: 40%;
    left: -5%;
    background-color: var(--accent);
    border: 1px solid var(--accent-dark);
    color: var(--bg);
}

.tag-business {
    top: 25%;
    right: -5%;
    background-color: var(--brown-mid);
    border: 1px solid var(--brown-dark);
    color: var(--bg);
}

.tag-ux {
    bottom: 15%;
    right: 10%;
    background-color: var(--brown-dark);
    border: 1px solid #4a3029;
    color: var(--bg);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-indicator img {
    width: 30px;
    height: 30px;
    opacity: 0.4;
}

/* Work Section */
.work-section {
    width: 100%;
    max-width: 1400px;
    padding: 4rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 4rem;
    row-gap: 4rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    cursor: pointer;
}

.project-image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 612 / 456.55;
    background-color: var(--surface);
    border: 0.5px solid var(--border);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

/* 에그앤씨드 로고 이미지 조정 */
.project-card[data-id="4"] .project-image {
    object-fit: contain;
    padding: 3rem;
    box-sizing: border-box;
}

.project-card:hover .project-image {
    transform: scale(1.03);
}

.project-title {
    font-family: 'Pretendard', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.5;
    color: var(--brown-dark);
    transition: color 0.2s;
}

.project-card:hover .project-title {
    color: var(--accent);
}

.project-card.has-modal {
    cursor: pointer;
}

/* Responsive — 태블릿 */
@media (max-width: 1100px) {
    .header-container {
        padding: 1.5rem 2rem;
    }

    .hero-container {
        gap: 6vw;
        padding: 0 2rem;
    }

    .hero-title {
        font-size: 64px;
    }

    .hexagon-wrapper {
        width: 360px;
        height: 360px;
    }

    .work-section {
        padding: 3rem 2rem;
    }

    .project-grid {
        column-gap: 2rem;
        row-gap: 2.5rem;
    }
}

/* Responsive — 모바일 */
@media (max-width: 768px) {
    .header-container {
        padding: 1.25rem 1.5rem;
    }

    .hero-section {
        height: auto;
        min-height: 100svh;
    }

    .hero-container {
        flex-direction: column;
        justify-content: center;
        height: auto;
        padding: 5rem 1.5rem 3rem;
        gap: 3rem;
    }

    .hero-text {
        width: 100%;
        align-items: center;
        text-align: center;
        order: 2;
    }

    .hero-image-container {
        order: 1;
    }

    .hero-title {
        font-size: 48px;
    }

    .hexagon-wrapper {
        width: 280px;
        height: 280px;
    }

    .work-section {
        padding: 2.5rem 1.5rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        row-gap: 2.5rem;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(92, 64, 51, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background: var(--bg);
    border-radius: 12px;
    width: 100%;
    max-width: 780px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(16px);
    transition: transform 0.25s ease;
}

.modal-overlay.is-open .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: sticky;
    top: 1.25rem;
    float: right;
    margin: 1.25rem 1.25rem 0 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0.5px solid var(--border);
    background: var(--bg);
    color: var(--brown-mid);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--surface);
}

.modal-content {
    padding: 1.5rem 2rem 2.5rem;
    clear: both;
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 0.5px solid var(--border);
}

.modal-title {
    font-family: 'Pretendard', sans-serif;
    font-weight: 500;
    font-size: 26px;
    color: var(--brown-dark);
    margin: 0 0 1rem;
}

.modal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
}

.modal-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-detail-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.modal-detail-value {
    font-size: 13px;
    color: var(--brown-mid);
}

.modal-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-project-image {
    width: 100%;
    border-radius: 6px;
    border: 0.5px solid var(--border);
    object-fit: cover;
}

.modal-description p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--brown-mid);
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
        align-items: flex-end;
    }

    .modal-container {
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
    }

    .modal-content {
        padding: 1rem 1.25rem 2rem;
    }
}