/*   General  */

html {
    scroll-behavior: smooth;
}

body, button {
    font-family: 'Open Sans', sans-serif;
    color: white;
}

body {
    background-color: #060F1F;
    width: 85%;
    margin: 5.5em auto;

    background-image: url("../media/bg-top.png"), url("../media/bg-bottom.png");
    background-position: left top, right bottom;
    background-repeat: no-repeat;
    background-size: 55%;
}

div:not(#portfolio) {
    margin-bottom: 8em;
}

::-webkit-scrollbar {
    width: 12px;

}

::-webkit-scrollbar-thumb {
    background: linear-gradient(142deg, rgba(247,15,255,0) 0%, rgba(0,206,255,0.20211834733893552) 100%);
    border-radius: 6px;
}

/* home */

@media only screen and (max-width: 1100px) {
    #home article:first-child h2 {
        font-size: 6em;
    }

    #home article:first-child h1 {
        font-size: 2em;
    }

    #home article:first-child p {
        font-size: 3em;
    }

    #home article:first-child button {
        font-size: 1em;
    }
    img[alt="software"] {
        width: 40em;
    }

}

#home, #info {
    display: flex;
    flex-flow: wrap;
    justify-content: space-between;
}

#home h1, #home h2, #info h1 {
    color: #B9EEFF;
}

#home h1 {
    font-size: 1.8em;
    margin-bottom: 0.3em;
}

#home h2, #info h1 {
    font-size: 3.6em;
    margin-bottom: 0.8em;
}

#home p {
    font-size: 2.6em;
    margin-bottom: 0.8em;
}

#home a {
    text-decoration: none;
}

#home button {
    padding: 1.4em;
    border-radius: 1em;
    border: none;
    margin-bottom: 4em;
    display: block;

    background: #09bbfe; /* Old browsers */
    background: -moz-linear-gradient(left,  #09bbfe 0%, #5a42ec 100%, #5a42ec 100%, #2989d8 100%, #207cca 100%, #5a42ec 100%, #5a42ec 100%); /* FF3.6-15 */
    background: -webkit-linear-gradient(left,  #09bbfe 0%,#5a42ec 100%,#5a42ec 100%,#2989d8 100%,#207cca 100%,#5a42ec 100%,#5a42ec 100%); /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(to right,  #09bbfe 0%,#5a42ec 100%,#5a42ec 100%,#2989d8 100%,#207cca 100%,#5a42ec 100%,#5a42ec 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#09bbfe', endColorstr='#5a42ec',GradientType=1 ); /* IE6-9 */

}

#home button:hover {
    cursor: pointer;
    animation: zoom 1s forwards;
}

@keyframes zoom {
    from {
        transform: scale(1);
        box-shadow: 0px 0px 30px 0px rgba(13,180,222,0);
    }
    to {
        transform: scale(1.05);
        box-shadow: 0px 0px 30px 0px rgba(13,180,222,0.3);
    }
}


#home article:first-child {
    margin-top: 13em;
    margin-bottom: 5em;
    width: 30%;
}

#home article:last-child img:not(:last-child) {
    display: block;
    margin-bottom: 4.5em;
}

img {
    width: 100%;
}

#home article:first-child img {
    width: 23em;
}

/* info */

#info article:first-child {
    width: 40%;
}

#info p {
    font-size: 1.8em;
}

#info img {
    width: 30em;
    float: right;
    border-radius: 5.2em;
    margin-top: 2em;
}

#info img:hover{
    box-shadow: 0px 0px 30px 0px rgba(13,180,222,0.2);
}

/* portfolio */

#portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(23em, 1fr));
    grid-gap: 1rem;

    margin-top: 1.5em;
}

@media only screen and (max-width: 800px) {
    #portfolio div {
        margin-bottom: 1.5em;
    }
}

.img-gradient:after, .img-gradient, .img-gradient img {
    object-fit: cover;
    width: 23em;
    height: 23em;
    border-radius: 6em;
}

.img-gradient {
    position:relative;
    display:inline-block;
    margin-left: auto;
    margin-right: auto;
}

.img-gradient:hover {
    cursor: pointer;
}

.img-gradient:after {
    content:'';
    position:absolute;
    left:0; top:0;
    width:100%; height:100%;
    display:inline-block;
    background: linear-gradient(142deg, rgba(18,214,223,0.20211834733893552) 0%, rgba(247,15,255,0.2329306722689075) 100%);
}

.img-gradient img {
    display:block;
}

/* Modal - image viewer */

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4);
}

.modal img:not(.close) {
    width: 30%;
    display: block;
    margin: auto;
    padding-top: 2%;
}

@media only screen and (max-width: 1300px) {
    .modal img:not(.close) {
        width: 80%;
    }

    #info article:first-child, #home article:first-child {
        width: 100%;
    }

    #info img {
        margin-left: auto;
        margin-right: auto;
    }
}

.close {
    position: absolute;
    top: 0;
    right: 0;
    width: 2em;
    margin: 2% 2%;
}

.close:hover {
    cursor: pointer;
    animation: zoom 1s forwards;
}

.img-gradient.remove::after {
    background: none;
}

.img-gradient.add::after {
    background: linear-gradient(142deg, rgba(18,214,223,0.20211834733893552) 0%, rgba(247,15,255,0.2329306722689075) 100%);
}

.modal p {
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-align: center;
    margin-top: 1.5em;
    text-shadow:1px 1px 10px rgba(255,255,255, 0.3);
    font-size: 1.1em;
    padding-bottom: 1em;
}

/* footer */

footer {
    display: flex;
    justify-content: space-between;
}

footer p {
    font-family: Arial, sans-serif;
    opacity: 0.7;
}