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

/* 이미지 다운로드 방지 */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* 클릭 가능한 이미지는 부모 요소로 클릭 처리 */
.slide-item,
.square-item,
.related-item,
.category-item,
.grid-item,
.logo,
.main-image,
.profile-image {
    pointer-events: auto;
    cursor: pointer;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

/* Header */
header {
    background: #fafafa;
    padding: 50px 40px 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header-content {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.about-link {
    position: absolute;
    right: 40px;
    bottom: 20px;
}

.about-link {
    font-size: 0.75rem;
    color: #888;
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.about-link span {
    position: relative;
}

.about-link span::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: #222;
    transition: width 0.3s ease;
}

.about-link:hover {
    color: #222;
}

.about-link:hover span::after {
    width: 100%;
}

.logo {
    display: block;
    height: 80px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
    opacity: 0.8;
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #222;
    border-bottom-color: #222;
}

/* Menu Section */
.menu-section {
    margin-bottom: 60px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.menu-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.menu-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu-title {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #222;
    transition: all 0.3s ease;
}

/* 스타일: 텍스트만 (About용) */
.style-text {
    background: transparent;
}
.style-text .menu-title {
    position: relative;
}
.style-text .menu-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #222;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.style-text:hover .menu-title::after {
    width: 100%;
}

/* 스타일: 밑줄 (나머지용) */
.style-underline {
    background: transparent;
    border-bottom: 2px solid #ddd;
}
.style-underline:hover {
    border-bottom-color: #222;
}

/* Square Grid */
.square-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.square-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1;
    background: #fff;
    transition: transform 0.3s ease;
}

.square-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

.square-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.square-item:hover img {
    opacity: 0.9;
}

/* Main */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Section Titles */
.section-title {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Gallery Section */
.gallery-section {
    margin-bottom: 60px;
}

/* Slider Container */
.slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-wrapper {
    flex: 1;
    overflow: hidden;
}

.slider-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

/* Slide Items */
.slide-item {
    flex: 0 0 calc((100% - 40px) / 3);
    cursor: pointer;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.slide-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.slide-item img {
    width: 100%;
    aspect-ratio: 8 / 5;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.slide-item:hover img {
    transform: scale(1.05);
}

.slide-item.vertical img {
    aspect-ratio: 5 / 7;
}

.slide-info {
    padding: 15px;
    background: #fff;
}

.slide-info h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #222;
}

.slide-info p {
    font-size: 0.8rem;
    color: #888;
}

/* Slider Buttons - 화살표 이동 애니메이션 */
.slider-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.slider-btn:hover {
    color: #222;
}

.slider-btn.prev-btn:hover {
    transform: translateX(-5px);
}

.slider-btn.next-btn:hover {
    transform: translateX(5px);
}

.slider-btn:disabled {
    color: #ddd;
    cursor: not-allowed;
}

.slider-btn:disabled:hover {
    transform: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    color: #aaa;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

/* Detail Page Styles */
.detail-page {
    padding-top: 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #222;
}

.detail-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.main-image {
    background: #fff;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.artwork-info {
    padding-top: 20px;
}

.artwork-info h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #222;
}

.artwork-info .meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 30px;
    line-height: 1.8;
}

.artwork-info .description {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
}

/* Dynamic Background (Instagram Stories Style) */
.detail-body,
.main-body {
    position: relative;
    min-height: 100vh;
}

.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.detail-body header,
.main-body header {
    background: transparent;
}

.detail-body .main-image {
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

.detail-body .artwork-info h2,
.detail-body .artwork-info .meta,
.detail-body .artwork-info .description {
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.detail-body footer,
.main-body footer {
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(10px);
}

/* Related Works */
.related-section {
    margin-top: 80px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: scale(1.03);
}

.related-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.related-slider {
    overflow: hidden;
}

.related-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.related-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.related-btn:hover {
    color: #222;
}

#relatedPrev:hover {
    transform: translateX(-5px);
}

#relatedNext:hover {
    transform: translateX(5px);
}

.related-btn:disabled {
    color: #ddd;
    cursor: not-allowed;
}

.related-btn:disabled:hover {
    transform: none;
}

.related-page {
    font-size: 0.9rem;
    color: #666;
    min-width: 50px;
    text-align: center;
}

/* Category Page */
.category-page {
    padding-top: 20px;
}

.page-title {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #222;
    margin-bottom: 10px;
}

.page-desc {
    font-size: 1rem;
    color: #888;
    margin-bottom: 40px;
}

.year-section {
    margin-bottom: 60px;
}

.year-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #222;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #222;
    display: inline-block;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.category-item {
    cursor: pointer;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.category-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.category-item:hover img {
    transform: scale(1.05);
}

.category-info {
    padding: 15px;
}

.category-info h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #222;
}

.category-info p {
    font-size: 0.8rem;
    color: #888;
}

/* About Page */
.about-page {
    padding-top: 20px;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-section {
    position: sticky;
    top: 120px;
    align-self: start;
}

.profile-image {
    background: #fff;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

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

.bio-section h2 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #222;
}

.bio-section .subtitle {
    font-size: 1rem;
    color: #888;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
}

.bio-content {
    margin-bottom: 40px;
}

.bio-content h3 {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #222;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.bio-content p {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

.bio-content ul {
    list-style: none;
}

.bio-content li {
    font-size: 0.95rem;
    color: #555;
    line-height: 2;
    padding-left: 15px;
    position: relative;
}

.bio-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background: #222;
    border-radius: 50%;
}

.bio-content a {
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #222;
    transition: opacity 0.3s ease;
}

.bio-content a:hover {
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 1200px) {
    .slide-item {
        flex: 0 0 calc((100% - 20px) / 2);
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .square-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .detail-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .profile-section {
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    header {
        padding: 20px 15px;
        justify-content: center;
    }

    .logo {
        height: 50px;
    }

    .nav-menu {
        gap: 15px;
    }

    .nav-menu a {
        font-size: 0.8rem;
    }

    main {
        padding: 0 15px;
    }

    .menu-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .menu-box {
        padding: 15px 10px;
    }

    .menu-title {
        font-size: 0.85rem;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .slide-item {
        flex: 0 0 100%;
    }

    .square-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bio-section h2 {
        font-size: 2rem;
    }
}
