@import url('https://cdn-uicons.flaticon.com/2.6.0/uicons-solid-rounded/css/uicons-solid-rounded.css');

html, body{
    overflow: auto !important;
}

body {
  max-width: 100vw;
  overflow-x: hidden;
}

.desktop,
.mobile{
    position: absolute !important;
}

main{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 175px;
    overflow-x: hidden;
}

.info{
    width: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.info h1{
    font-size: 5em;
    filter: drop-shadow(5px 5px 5px hsl(0, 0%, 0%, 75%));
    margin-bottom: 20px;
}

.info p{
    margin-bottom: 70px;
    font-size: 1.1em;
    width: 75%;
}

.portfolio{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 2em;  /* use padding instead if you want breathing space */
    max-width: 90%;
    padding-bottom: 50px;
}

.portfolio-item{
    width: 400px;
    height: 250px;
    border-radius: 5px;
    background: var(--purple);
    position: relative;
    padding: 10px;
    overflow: hidden;
}

.overlay{
    opacity: 0%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: 0.3s ease-in-out;
}

.portfolio-item:hover .overlay{
    opacity: 100%;
}

.overlay img{
    width: 75px;
    height: 75px;
    filter: drop-shadow(5px 5px 5px hsl(0, 0%, 0%, 75%));
}

.preview-img-web img{
    width: 100%;
    box-shadow: 2px 2px 5px hsl(0, 0%, 0%, 75%);
}

.portfolio-item-title{
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--beige);
    background: var(--purple);
    padding: 10px;
}

.gallery{
    column-count: 5;
    column-gap: 16px;
    margin: 0 2em;
    overflow: hidden;
    margin-bottom: 50px;
    max-width: 80%;
}

.gallery-item{
    break-inside: avoid;
    margin-bottom: 16px;
    background: var(--purple);
    color: var(--beige);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    position: relative;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    text-align: center;
}

.blur-img{
    background: linear-gradient(135deg, rgba(200, 200, 200, 0.3) 25%, rgba(220, 220, 220, 0.6) 50%, rgba(200, 200, 200, 0.3) 75%);
    background-size: 300% 100%;
    animation: loadingShimmer 8s infinite ease-in-out;
    height: fit-content;
    position: relative;
    overflow: hidden;
    height: 200px;
}

@keyframes loadingShimmer {
  0% {
    background-position: 300% 300%;
  }
  100% {
    background-position: -300% -300%;
  }
}


.blur-img.imgLoaded img {
    opacity: 1;
}

.blur-img > img{
    opacity: 0;
    transition: opacity 200ms ease-in-out;
}


.gallery-item-title{
    padding: 10px 0;
}



.gallery-item:hover .back-img{
    opacity: 100%;
}

.gallery-item:focus .back-img{
    opacity: 100%;
}

.gallery-item img{
    width: 100%;
    height: auto;
    display: block;
}

.front-img{
    transition: 0.2s ease-in-out;
}

.back-img{
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: 0.3s ease-in-out;
}

.rotate{
    position: absolute;
    max-width: 50px;
    max-height: 50px;
    right: 10px;
    top: 10px;
    filter: drop-shadow(2px 2px 2px hsla(0, 0%, 0%, 0.4));
    z-index: 10;
}

@media (max-width: 1024px){
    .gallery {
    column-count: 3;
    }
}

@media (max-width: 768px){
    .gallery {
    column-count: 2;
    }
}

@media (max-width: 480px){
    .gallery {
    column-count: 1;
    }

    .portfolio{
        max-width: 100%;
        padding: 0 10px;
    }

    .info{
        width: 100%;
    }
}
