:root {
    --bg-color: #fdfbf7;
    --text-color: #4a4a4a;
    --accent-color: #8e8e8e;
    --card-bg: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Gowun Batang', serif;
    min-height: 100vh;
}

.sunlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    z-index: -1;
}

.gallery-header {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-nav {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.home-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.home-link:hover {
    border-color: var(--text-color);
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin: 0;
    color: #2c3e50;
    letter-spacing: 0.05em;
}

.gallery-subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-top: 1rem;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    padding-bottom: 4rem;
}

.art-item {
    background: var(--card-bg);
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.art-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.art-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.art-info {
    padding: 1.5rem 0.5rem 0.5rem;
    text-align: center;
}

.art-info h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: normal;
}

.art-info p {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(253, 251, 247, 0.95);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 70vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.modal-info {
    margin-top: 2rem;
}

.modal-info h2 {
    font-family: 'Playfair Display', serif;
    margin: 0;
    font-size: 2rem;
}

.modal-info p {
    color: var(--accent-color);
    margin-top: 0.5rem;
}

.close-btn {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .gallery-title {
        font-size: 2.5rem;
    }

    .art-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}