@media screen and (max-width: 736px) {
    #wrapper>.bg {
        background-image: url("../../images/overlay.png"), linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url("../../images/bg_mobile_blur.webp");
    }
}

.container {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.photo-grid {
    order: 1;
}

.profile-info {
    order: 2;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    grid-auto-rows: min-content;
    margin-bottom: 1em;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: block;
    margin: 0;
}

.photo-grid img:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.profile-info {
    padding: 20px;
}

.profile-info h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    color: #222;
}

.profile-info h2 {
    font-size: 1.2rem;
    color: #666;
    margin: 0 0 2rem 0;
    font-weight: normal;
}

.info-group {
    margin: 1rem 0;
}

.info-group .label {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.info-group .value {
    color: #222;
    font-size: 1.1rem;
    font-weight: 500;
}


/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0;
    padding: 0;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 90%;
    max-height: 90vh;
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show .modal-content img {
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.modal-close:hover {
    opacity: 1;
}

/* Navigation arrows */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.modal.show .modal-nav {
    opacity: 0.7;
}

.modal-nav:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        order: 2;
    }

    .profile-info {
        order: 1;
    }
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-nav {
        padding: 15px;
        font-size: 30px;
    }
}