@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");

:root {
    --green: hsl(75, 94%, 57%);
    --white: white;
    --grey: hsl(0, 0%, 20%);
    --dark-grey: hsl(0, 0%, 12%);
    --off-black: hsl(0, 0%, 8%);
    font-family: "Inter", sans-serif;
}

*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

p,
q,
a {
    font-size: 14px;
}

body {
    align-items: center;
    background-color: var(--off-black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3em;
    min-height: 100vh;
}

.main-container {
    background-color: var(--dark-grey);
    border-radius: 0.5em;
    padding: 1.5em;
    max-width: 350px;
    width: 90%;
}

.profile-basic-info-container {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;

    & img {
        border-radius: 50%;
        margin-bottom: 1.25em;
        width: 80px;
    }

    & h1 {
        color: var(--white);
        font-size: 23px;
        font-weight: 600;
        margin-bottom: 0.25em;
        position: relative;
        transition: all 400ms ease-out;

        &::before {
            content: "";
            position: absolute;
            background-color: var(--green);
            margin-top: 4px;
            width: 0%;
            height: 3px;
            bottom: 0;
            left: 0;
            right: 0;
            transition: all 400ms ease-out;
        }
    }

    .profile-location {
        color: var(--green);
        font-weight: 600;
        margin-bottom: 1.5em;
    }

    & q {
        color: var(--white);
    }

    & img:hover ~ .profile-name::before {
        width: 100%;
    }

    & img:hover ~ .profile-name {
        font-size: 28px;
    }
}

.profile-links-container {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    margin-top: 1.5em;

    & > a {
        background-color: var(--grey);
        border-radius: 0.5em;
        color: var(--white);
        font-weight: 600;
        padding: 1em;
        text-align: center;
        text-decoration: none;
        transition: all 400ms ease;

        &:hover,
        &:focus {
            background-color: var(--green);
            color: var(--off-black);
        }
    }
}

@keyframes scale-top-left {
    0% {
        transform: scale(0);
        transform-origin: top left;
    }
    100% {
        transform: scale(1);
        transform-origin: top left;
    }
}

.main-container {
    animation: scale-top-left 0.5s ease-out backwards;
}

@keyframes show {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.profile-basic-info-container *,
.profile-links-container * {
    animation: show 2s ease backwards;
}

.profile-basic-info-container {
    .profile-img {
        animation-delay: 0.5s;
    }

    .profile-name {
        animation-delay: 1s;
    }

    .profile-location {
        animation-delay: 1.2s;
    }

    .profile-description {
        animation-delay: 1.5s;
    }
}

.profile-links-container * {
    animation-delay: 2s;
    animation-fill-mode: backwards;
}
