/********************
* FONTS
********************/

@font-face {
    font-family: "Inter";
    src: url("../assets/fonts/Inter-VariableFont_slnt,wght.ttf")
        format("truetype");
}

/********************
* RESET
********************/

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

img {
    max-width: 100%;
    display: block;
}

ul[role="list"] {
    list-style: none;
}

/********************
* VARIABLES
********************/

:root {
    /* Colours */
    --green: #c4f82a;
    --grey-700: #333;
    --grey-800: #1f1f1f;
    --grey-900: #141414;
    --white: #fff;
    /* Typography: Font sizes */
    --font-fs-md: 0.875rem; /* 14px */
    --font-fs-lg: 1.5rem; /* 24px */
    /* Typography: Font weights */
    --font-fw-400: 400;
    --font-fw-700: 700;
    /* Spacing */
    --spacing-50: 0.25rem;
    --spacing-100: 0.5rem;
    --spacing-150: 0.75rem;
    --spacing-200: 1rem;
    --spacing-300: 1.5rem;
    --spacing-500: 2.5rem;
}

/********************
* BASE
********************/

body {
    background-color: var(--grey-900);
    color: var(--white);
    font-family: "Inter", sans-serif;
    line-height: 150%;
    font-weight: var(--font-fw-400);
    letter-spacing: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main {
    margin-block: auto;
}

/********************
* CARD
********************/

.card {
    background-color: var(--grey-800);
    /* Rsponsively shift padding from 24 -> 40px */
    padding: clamp(var(--spacing-300), 6.4vw, var(--spacing-500));
    border-radius: 12px;
    /* Rsponsively shift width from 327px -> 384px */
    width: clamp(327px, 87.2vw, 384px);
    display: flex;
    flex-direction: column;
    text-align: center;
    font-size: var(--font-fs-md);
}

.card-avatar,
.card-location,
.card-about {
    margin-bottom: var(--spacing-300);
}

.card-location,
.card-about {
    font-size: var(--font-fs-md);
}

.card-avatar {
    border-radius: 50%;
    width: 88px;
    margin-inline: auto;
}

.card-name {
    font-size: var(--font-fs-lg);
    margin-bottom: var(--spacing-50);
}

.card-location {
    color: var(--green);
}

.card-about {
    font-weight: var(--font-fw-400);
}

.card-social-link:not(:last-child) {
    margin-bottom: var(--spacing-200);
}

.card-social-link a {
    display: block;
    color: currentColor;
    font-weight: var(--font-fw-700);
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--grey-700);
    transition:
        background-color 0.25s,
        color 0.25s;
}

@media (hover: hover) {
    .card-social-link a:hover {
        background-color: var(--green);
        color: var(--grey-700);
    }
}

.card-social-link a:focus {
    outline: none;
    background-color: var(--green);
    color: var(--grey-700);
}

/********************
* FOOTER
********************/

.footer-main {
    margin-bottom: 1rem;
    text-align: center;
}

.attribution {
    font-size: 0.75rem;
}

.attribution a {
    color: var(--green);
}

.attribution a:focus {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
