﻿:root {
    --social-icon: 32px;
    --social-gap: 6px;
    --social-label-max: 2.4em;
}

.social-row {
    margin: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 28px;
}

.social-icon {
    width: var(--social-icon);
    height: var(--social-icon);
    filter: grayscale(1);
    transition: filter .2s ease, transform .2s ease;
}

.name-wrap {
    height: var(--social-label-max);
    width: 300%;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: var(--social-gap);
}

.social-name {
    margin-top: 0;
    color: #ddd;
    margin-top: .25rem;
    opacity: 0;
    height: 1.5em;
    font-size: small;
    line-height: 1.1;
    max-height: 0;
    text-align: center;
    overflow: hidden;
    transition: opacity .2s ease, max-height .2s ease, transform .2s ease;
    transform: translateY(-4px);
    width: 300%;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.inline-social-name {
    margin-top: .25rem;
    color: #ffd700;
    text-align: center;
    overflow: hidden;
    transition: opacity .2s ease, max-height .2s ease, transform .2s ease;
    transform: translateY(-4px);
    font-weight: 500;
    font-size: large;
    transition: color .2s ease;
    background-repeat: no-repeat;
    background-image: linear-gradient(currentColor 0 0), linear-gradient(currentColor 0 0), linear-gradient(currentColor 0 0);
    background-position: 100% 100%, 100% 0, 0 0;
    background-size: 2px 0, 0 2px, 2px 0;
}

    .inline-social-name::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -2px;
        height: 2px;
        width: 0;
        background: #ffd700;
        transition: width .25s ease;
    }

    .inline-social-name:hover::after {
        width: 100%;
    }

    .social-link:hover .social-icon,
    .social-link:focus-visible .social-icon {
        filter: grayscale(0);
        transform: translateY(-4px);
    }

.social-link:hover .social-name,
.social-link:focus-visible .social-name {
    opacity: 1;
    max-height: 2.4em;
    transform: translateY(0);
}