
@import url('https://fonts.googleapis.com/css2?family=Geo&display=swap');

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

body {
    font-family: "Geo", sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    overflow-x: hidden;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 24px 32px;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

h1 {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.gallery {
    margin-top: 80px;
    padding: 0 8px 40px;
    min-height: 100vh;
}

.row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}

.photo-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: #e0e0e0;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

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

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: #f5f5f5;
}

.photo-item img.loaded {
    opacity: 1;
}

.photo-item.inactive img {
    filter: grayscale(100%) brightness(0.9);
    opacity: 0.4;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.photo-item.inactive:hover img {
    filter: grayscale(50%) brightness(1);
    opacity: 0.6;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

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

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.loader {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
    min-height: 50px;
}

.loader.hidden {
    display: none;
}

@media (max-width: 768px) {
    header {
        padding: 16px 20px;
    }

    h1 {
        font-size: 20px;
    }

    .gallery {
        padding: 0 4px 20px;
        margin-top: 60px;
    }

    .row {
        gap: 4px;
        margin-bottom: 4px;
    }
}