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

html, body {
    background: #121212;
    color: #eee;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

body {
    padding: 16px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* HEADER */
header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px 0;
}

header h1 {
    font-size: 30px;
    margin-bottom: 16px;
    background: #DE5E60;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 400;
    letter-spacing: -0.01em;
}

header p {
    color: #ccc;
    font-size: 14px;
    margin: 0;
}

/* MASONRY GALLERY */
.gallery {
    column-count: 5;
    column-gap: 16px;
    margin-bottom: 32px;
}

.photo-card {
    break-inside: avoid;
    margin-bottom: 16px;
    background: #fffffe;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #5e5240;
    position: relative;
}

.photo-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02), 0 12px 24px rgba(33, 128, 141, 0.25);
    border-color: #218085;
}

.photo-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-card:hover .photo-image {
    opacity: 0.9;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    opacity: 0;
    transition: opacity 250ms;
    overflow-y: auto;
    padding: 24px;
}

.modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #212121;
    border-radius: 12px;
    border: 1px solid #5e5240;
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #999;
    color: #444;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 1001;
    transition: all 150ms;
}

.modal-close:hover {
    background: #888;
    transform: scale(1.1);
}

.modal-close:focus-visible {
    outline: 2px solid #218085;
    box-shadow: 0 0 0 3px rgba(33, 128, 141, 0.4);
}

.modal-figure {
    width: 100%;
    text-align: center;
    padding: 24px;
    background: 2#12121;
}

.modal-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 500vh;
}

.modal-info {
    padding: 24px;background:#212121;
}

.modal-caption {
    font-size: 18px;
    font-weight: 550;
    margin-bottom: 16px;
    line-height: 1.5;
    color: #999;
}

.modal-date {
    color: #eee;
    font-size: 12px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #343434;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-icon {
    width: 16px;
    height: 16px;
    fill: #888;
}

.modal-exif {
    margin-top: 24px;
}

.modal-exif h3 {
    font-size: 12px;
    color: #218085;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 550;
}

.exif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.exif-item {
    background: rgba(33, 128, 141, 0.08);
    border-left: 3px solid #218085;
    padding: 16px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.exif-label {
    color: #626c71;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.exif-value {
    color: #218085;
    font-weight: 550;
    word-break: break-word;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid #5e5240;
    color: #626c71;
    font-size: 12px;
}

footer a {
    color: #218085;
    text-decoration: none;
    transition: opacity 150ms;
}

footer a:hover {
    opacity: 0.8;
}

footer a:focus-visible {
    outline: 2px solid #218085;
}

.empty-state {
    text-align: center;
    padding: 32px;
    color: #626c71;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 16px;
}

.empty-state a {
    color: #218085;
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 1400px) {
    .gallery {
        column-count: 4;
    }
    header h1 {
        font-size: 24px;
    }
}

@media (max-width: 1024px) {
    .gallery {
        column-count: 3;
    }
    header h1 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .gallery {
        column-count: 2;
        column-gap: 16px;
    }
    .photo-card {
        margin-bottom: 16px;
    }
    header h1 {
        font-size: 18px;
    }
    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }
    .modal-figure {
        padding: 16px;
    }
    .modal-info {
        padding: 16px;
    }
    .modal-caption {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .container {
        padding-left: 0;
        padding-right: 0;
    }

    .gallery {
        column-count: 1;
        column-gap: 12px;
    }

    .photo-card {
        margin-bottom: 12px;
    }

    header {
        padding: 16px 0;
        margin-bottom: 24px;
    }

    header h1 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    header p {
        font-size: 12px;
    }

    .modal {
        padding: 16px;
    }

    .modal-content {
        max-width: 100%;
        border-radius: 8px;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 14px;
        top: 12px;
        right: 12px;
    }

    .modal-figure {
        padding: 12px;
    }

    .modal-figure img {
        border-radius: 6px;
        max-height: 50vh;
    }

    .modal-info {
        padding: 16px;
    }

    .modal-caption {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .modal-date {
        font-size: 11px;
        margin-bottom: 16px;
        padding-bottom: 16px;
        gap: 6px;
    }

    .calendar-icon {
        width: 12px;
        height: 12px;
    }

    .modal-exif {
        margin-top: 16px;
    }

    .modal-exif h3 {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .exif-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .exif-item {
        padding: 12px;
        font-size: 11px;
    }

    .exif-label {
        font-size: 10px;
        margin-bottom: 2px;
    }

    footer {
        padding: 16px 0;
        font-size: 11px;
    }

    .empty-state {
        padding: 24px;
    }

    .empty-state p {
        font-size: 14px;
        margin-bottom: 12px;
    }
}
