*{padding:0;margin:0;box-sizing:border-box}
html,body {height:100%}

body {
    font-size: 18px;
    font-family: 'Ubuntu', 'Segoe UI', Tahoma, sans-serif;
    display: grid;
    place-items: center;
    background: linear-gradient(217deg, rgba(25, 217, 158, 0.8), rgba(25, 158, 217, 0) 70%),
                linear-gradient(127deg, rgba(158, 217, 25, 0.8), rgba(158, 25, 217, 0) 70%),
                linear-gradient(336deg, rgba(217, 25, 158, 0.8), rgba(217, 158, 25, 0) 70%);
}

#main {
    position: relative;
    max-height: 97%;
    max-width: 97%;
    overflow: auto;
    display: flex;
    gap: 6rem;
    background: linear-gradient(28deg, rgba(0, 0, 0, 0.9), rgba(0,0,0,0.6));
    color: #fff;
    padding: 4rem 6rem;
    border-top-left-radius: 2px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-left-color: rgba(170, 170, 170, 0.6);
    border-bottom-color: rgba(170, 170, 170, 0.6);
    box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.3);
}

#content {
    max-width: 42ch;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

a,a:link,a:visited {
    color: #AFA;
    text-decoration: none;
}
a:hover,a:focus {
    color: #FAA;
    text-decoration: underline;
    position: relative;
    top: -1px;
}

#portfolio {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 2rem;
    position: relative;
}

#portfolio a {
    display: grid;
    place-items: center;
    max-width: 12ch;
    text-align: center;
}
#portfolio img {
    width: 100px;
    border-radius: 1em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#portfolio div:nth-of-type(odd) {
    position: relative;
    transform: translateY(3rem);
    transition: transform 0.3s ease-out;
}

.small {
    font-size: 60%;
}

#socials {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}
#socials img {
    width: 42px;
    cursor: pointer;
    filter: grayscale(0.8);
    transition: filter 0.5s ease-in-out;
}
#socials img:hover,
#socials img:active {
    filter: grayscale(0);
}

#badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 0;
}
#badge img {
    width: 6rem;
    height: 6rem;
}

@media screen and (max-width: 899px) {
    #main {
        display: grid;
    }

    #portfolio {
        grid-row: 2;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    #portfolio div {
        margin: 0 auto;
    }

    #portfolio div:nth-of-type(odd) {
        transform: translateY(0);
    }
}
