:root {
    --bg-color: #fdfbf7;
    --text-color: #333;
    --accent-color: #666;
}

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: #1a1a1a;
    letter-spacing: 0.05em;
}

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

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

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

.photo-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.photo-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 2rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

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

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

.photo-info p {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    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: 95%;
    max-height: 95vh;
    position: relative;
    text-align: center;
    color: white;
}

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

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

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

.modal-info p {
    color: #ccc;
    margin-top: 0.5rem;
}

.close-btn {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
}

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

    .photo-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}