/* Fonts */
@import url("https://fonts.googleapis.com/css?family=Outfit:100,200,300,regular,500,600,700,800,900");

/* Reset */
*{
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    line-height: 1;
}

a, button, input, img, span{
    -webkit-user-select: none;
    user-select: none;
}

/* General */
html, body{
    min-height: calc(100vh + 1px);
    scroll-behavior: smooth;
}
body{
    background-color: rgb(20, 20, 20);
    color: rgb(220, 220, 220);
}
::-webkit-scrollbar{
    width: 14px;
}
::-webkit-scrollbar-thumb{
    border-radius: 20px;
    border: 3px solid rgb(20, 20, 20);
    background-color: rgb(40, 40, 40);
}

/* Application */
main{
    width: 87%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
main > h1{
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    font-weight: 200;
    margin-top: 40px;
    font-size: 1.15rem;
}
main > h1 i{
    font-size: 1.4rem;
}

/* Loading */
.loading{
    top: -30px;
    position: relative;
    display: block;
    opacity: 0;
    visibility: hidden;
    width: 25px;
    height: 25px;
    border: 1px solid white;
    border-radius: 50%;
    transition: .12s ease;
}
.loading.active{
    opacity: 1;
    visibility: visible;
    animation: rotate 1s linear infinite;
}
.loading::after{
    border-radius: 50%;
    background-color: #141414;
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 17px;
    height: 10px;
    content: '';
}
@keyframes rotate {
    from{ transform: rotate(0deg) }
    to { transform: rotate(360deg) }
}

/* Form */
form{
    width: 100%;
    max-width: 350px;
    margin: 30px auto 10px;

    display: flex;
    justify-content: space-between;
    gap: 10px;
}
form input{
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgb(50, 50, 50);
    background-color: transparent;
    color: rgb(235, 235, 235);
    font-weight: 200;
    font-size: .93rem;
}
form input::placeholder{
    color: rgb(150, 150, 150);
}
form button{
    border: 1px solid rgb(50, 50, 50);
    border-radius: 8px;
    background-color: transparent;
    display: flex;
    min-width: 45px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background-color .2s ease;
}
form button:hover{
    background-color: rgb(30, 30, 30);
}
main > fieldset{
    gap: 10px;
    width: 100%;
    max-width: 350px;
    border: none;
    display: flex;
    justify-content: space-between;
    margin-bottom: 42px;
}
main > fieldset button{
    display: flex;
    align-items: center;
    user-select: none;
    outline: none;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: rgb(20, 20, 20);
    border: 1px solid rgb(50, 50, 50);
    color: rgb(235, 235, 235);
    font-weight: 200;
    font-size: .93rem;
    gap: 10px;
    transition: background-color .2s ease;
}
main > fieldset button.active, main > fieldset > fieldset span.active{
    background-color: rgb(30, 30, 30);
}
main > fieldset > fieldset{
    border: none;
    display: flex;
    width: 100%;
    justify-content: stretch;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-5px);
    z-index: -1;
    transition: .2s ease;
}
main > fieldset > fieldset.active{
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 1;
}
main > fieldset > fieldset span{
    display: flex;
    gap: 10px;
    white-space: nowrap;
    outline: none;
    width: 100%;
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: rgb(20, 20, 20);
    border: 1px solid rgb(50, 50, 50);
    color: rgb(150, 150, 150);
    font-weight: 200;
    font-size: .93rem;
    outline: none;
    transition: background-color .2s ease;
}

@media (max-width: 400px) {
    main > fieldset{
        flex-direction: column;
    }
    main > fieldset > fieldset{
        transform: translateY(-5px);
    }
    main > fieldset > fieldset.active{
        transform: translateY(0);
    }
}

/* General info */
.general_info{
    display: none;
    align-items: center;
    flex-direction: column;
    width: 100%;
    max-width: 1110px;
    margin: 0 auto 30px;
    border: 1px solid rgb(40, 40, 40);
    padding: 24px 22px;
    border-radius: 8px;
    text-align: center;
}
.general_info.active{
    display: flex;
}
.general_info img{
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
}
.general_info > p{
    font-weight: 300;
    line-height: 1.5;
}
.general_info > p:first-of-type{
    font-weight: 500;
}
.general_info .social{
    margin: 15px 0 23px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
}
.general_info .social > div{
    border-radius: 8px;
    border: 1px solid rgb(40, 40, 40);
    padding: 9px 13px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.general_info .social > div i{
    font-size: .95rem;
}
.general_info .links{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}
.general_info .links a{
    display: inline-block;
    text-align: center;
    margin-top: 25px;
    padding: 12px 20px;
    font-weight: 400;
    font-size: .95rem;
    border-radius: 9px;
    background-color: transparent;
    color: #d1d1d1;
}

.general_info .links a:first-of-type{
    background-color: #ffffff;
    color: #181818;
}

/* Repository */
.repositories{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1110px;
    margin-bottom: 100px;
}
.repo{
    width: 100%;
    border: 1px solid rgb(40, 40, 40);
    border-radius: 8px;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.repo_title{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.repo_title img{
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 50%;
}
.repo_title .text h2{
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.repo_title .text p{
    font-size: .95rem;
    color: rgb(200, 200, 200);
    font-weight: 200;
}

.repo_desc{
    font-weight: 200;
    color: rgb(200, 200, 200);
    line-height: 1.1;
    font-size: .95rem;
}

.repo_tags{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.repo_tags > span{
    color: rgb(200, 200, 200);
    border: 1px solid rgb(50, 50, 50);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: .9rem;
    font-weight: 300;
}

.repo_link{
    display: inline-block;
    text-align: center;
    margin-top: 25px;
    padding: 12px 20px;
    font-weight: 300;
    font-weight: 400;
    font-size: .95rem;
    border-radius: 9px;
    background-color: #ffffff;
    color: #000000;
}

.error{
    position: fixed;
    bottom: 20px;
    right: 20px;
    border-radius: 16px 16px 16px 0;
    overflow: hidden;
    padding: 18px 24px;
    opacity: 0;
    visibility: hidden;
    width: 100%;
    transform: translateY(20px);
    max-width: 300px;
    background-color: rgb(50, 50, 50);
    transition: .2s ease;
}
.error p{
    margin-top: 10px;
    font-weight: 300;
}
.error.active{
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}
.error::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    height: 4px;
    width: 100%;
    background-color: #dd524b;
}
.error.active::after{
    animation: timeout 2s linear;
    opacity: 1;
}
@keyframes timeout {
    from{
        width: 100%;
    }
    to{
        width: 0%;
    }
}
.error h1{
    font-size: 1.1rem;
    font-weight: 400;
}

@media (max-width: 450px) {
    .repositories {
        grid-template-columns: 1fr;
    }
}