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

:root {
    --sandy-beige: #F5E6D3;
    --ocean-blue: #4A90E2;
    --coral-pink: #FF6B6B;
    --charcoal-gray: #333333;
    --off-white: #FAFAFA;
    --overlay-black: rgba(0, 0, 0, 0.8);
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--off-white);
    color: var(--charcoal-gray);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, var(--sandy-beige) 0%, #f8f1e8 100%);
    text-align: center;
    padding: 3rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    color: var(--charcoal-gray);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    color: var(--ocean-blue);
    font-weight: 300;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.photo-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    aspect-ratio: 1;
}

.photo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    border-radius: 8px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-black);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.8); }
    to { transform: translate(-50%, -50%) scale(1); }
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.close:hover,
.close:focus {
    color: var(--coral-pink);
}

footer {
    position: relative;
    height: 100px;
    background: linear-gradient(180deg, transparent 0%, var(--sandy-beige) 100%);
    margin-top: 3rem;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%234A90E2' fill-opacity='0.3' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,112C1248,107,1344,117,1392,122.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .thumbnail {
        height: 150px;
    }
    
    .caption-input {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .caption-display {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}