.social {
    display: flex;
    gap: 0.3em;
    grid-template-columns: auto auto;

    padding: 0.3em 0.6em;
    border-radius: 0.2em;

    align-items: center;
}

.projects {
    align-self: center;
    justify-self: center;
    gap: 1em;

    @media (width <=700px) {
        & {
            display: flex;
            flex-direction: column;
        }
    }

    @media (width > 700px) {
        & {
            width: max(40em, 60vw);
            max-width: 70em;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

            &.small {
                width: 100%;
                max-width: 100%;
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            }
        }
    }
}

.project {
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    display: block;
    padding: 1em;

    h3 {
        margin-top: 0;
        margin-bottom: 0.5em;
        font-size: 4mm;
    }

    a {
        all: unset;
        cursor: pointer;
    }
}

.github-user {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    vertical-align: middle;

    &:not(.large) {
        span {
            margin-bottom: 0.18em;
        }
    }

    &.large {
        padding: 0.3em;
        font-size: unset;
        margin-right: 1em;

        box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
        padding: 0 0.3em;
        border-radius: 0.3em;
        color: #212529;

        font-size: unset;
    }

    &:last-child {
        margin-right: 0;
    }

    & img.gh-avatar {
        display: inline-block;
        height: 1em;
        border-radius: 1em;
        margin-right: 0.3em;
    }

    &.large img.gh-avatar {
        height: 1.3em;
    }
}

.tag {
    padding: 0.125em 0.5em;
    border-radius: 0.3em;
    border: 1.5px solid;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: normal;
    font-family: "Fira Sans";
    font-size: unset;
    text-decoration: none;

    color: #9c3574;

    &.wide {
        padding: 0.125em 0em;
        width: 100%;
    }
}

.crate {
    display: inline-flex;
    align-items: center;

    color: white;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;

    padding: 0 0.3em;
    border-radius: 0.3em;
    text-decoration: none;

    font-size: 4mm;
    vertical-align: middle;

    background: #264323;

    &.large {
        padding: 0.3em;
        /* font-size: unset; */
        margin-right: 1em;

        width: 100%;
        box-sizing: border-box;
    }

    &:last-child {
        margin-right: 0;
    }

    img.logo {
        display: inline-block;
        height: 1em;
        border-radius: 1em;
        margin-right: 0.3em;
    }

    &.large img.logo {
        height: 1.3em;
    }
}

.cratesio-sorted-table {
    button {
        border: 1px solid black;
        border-radius: 0.2em;
        background: transparent;
        margin-left: 0.4em;

        i,
        i * {
            height: 0.8em;
            width: 0.8em;
            color: black;
        }
    }

    .sort {
        cursor: pointer;
    }

    &.fullwidth table {
        width: 95%;
        border-spacing: 0;
        table-layout: fixed;
        border-collapse: collapse;
        display: block;
        overflow-x: scroll;

        tbody tr:nth-child(odd) td {
            background-color: #ccc;
        }

        tbody tr:nth-child(even) td {
            background: #f5f5f5;
        }

        th {
            background: #f5f5f5;
        }

        th,
        td {
            min-width: fit-content;
            white-space: nowrap;
            padding: 0.5em 0.2em;
            border-left: 0.5px solid #ddd;
        }

        /* @media (width > 449px) { */
        tr td:first-child,
        th:first-child {
            position: sticky;
            left: 0;
            z-index: 2;
        }

        /* } */

        /* @media (width < 450px) { */
        /*     tr th:first-child { */
        /*         overflow: hidden; */
        /*     } */
        /**/
        /*     tr td:first-child, */
        /*     th:first-child { */
        /*         width: 0px !important; */
        /*         max-width: 0px !important; */
        /*         min-width: unset; */
        /*         padding: 0; */
        /*         border-left: 0; */
        /*     } */
        /**/
        /*     tr td { */
        /*         padding-top: 1.8em; */
        /*     } */
        /**/
        /*     tr td:first-child .crate, */
        /*     th:first-child .crate { */
        /*         position: sticky; */
        /*         left: 0; */
        /*         z-index: 2; */
        /*         display: block; */
        /*         width: fit-content; */
        /*         padding-top: 0; */
        /*         padding-bottom: 0; */
        /*         transform: translate(0em, -1em); */
        /*     } */
        /* } */
    }

    @media (width > 900px) {
        &.fullwidth {
            width: 100%;
        }

        &.fullwidth table {
            position: relative;
            left: calc(max(-100vw, -130em) + (min(100vw, 130em) * 0.5 + 22em));
            /* hack that interacts with grid's sizing to make tables
             * as wide as they can possibly be when the screen supports it
             * The times 0.5 is to allow for the auto layout on *both sides*
            */
            width: calc(100vw - 6em);
        }
    }
}

.pr,
.issue {
    display: inline-flex;
    align-items: center;

    text-decoration: none;
    vertical-align: middle;

    &.large {
        font-size: unset;
        margin-right: 1em;
    }

    svg {
        display: inline-block;
        height: 1em;
        border-radius: 1em;
        margin-right: 0.3em;
    }
}

.previews {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-top: 1em;

    .urls {
        box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
        display: block;
        padding: 1em;

        .buttons {
            display: flex;
            flex-direction: row;
            gap: 0.5em;
            margin-top: 1em;
        }
    }
}

.preview {
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    display: block;
    padding: 1em;

    &.draft {
        background: repeating-linear-gradient(135deg,
                color-mix(in hsl, #f5f5f5, white 0%),
                color-mix(in hsl, #f5f5f5, white 0%) 20px,
                color-mix(in hsl, #ffadb0, white 30%) 20px,
                color-mix(in hsl, #ffadb0, white 30%) 40px);
    }

    .click-area {
        display: contents;
        color: black;
        text-decoration: none;
    }

    .author-area {
        display: flex;
        flex-direction: row;
        gap: 1em;
        align-items: center;
    }

    .first-paragraph {
        margin-top: 1em;
        line-height: 4.5mm;
    }

    .tags {
        margin-top: 0.5em;
        display: flex;
        flex-direction: row;
        gap: 0.5em;
    }

    div.authors {
        font-size: 4mm;
    }

    a {
        font-family: "Fira Sans";
        font-size: unset;
        font-weight: normal;
    }

}
