@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@200..900&display=swap');

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

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

/* || VARIABLES */
:root {
    /* FONT */
    --FF: "Inconsolata", monospace;
    --FS: clamp(1.5rem, 3vh, 3rem);
    --FS-L: clamp(2rem, 4vh, 5rem);

    /* COLOR */
    --BGCOLOR: #0d1117;
    --ALT-BGCOLOR: #161b22;
    --RADIAL-COLOR: #e6edf3;
    --FONT-COLOR: #010409;
    --LIGHT-COLOR: #e6edf3;
    --GRAY-COLOR: #30363d;
    --DARK-COLOR: #010409;

    /* GENERAL */
    --PADDING: 0.5rem;
    --SHADOWS: -5px 2px 10px 1px var(--DARK-COLOR);
    --BORDERS: 2px solid var(--GRAY-COLOR);

    /* CARDS */
    --CARD-BGCOLOR: radial-gradient(#e6edf3, #6e7681);
    --CARD-SIZE: min(100%, 350px);
}

@media (prefers-color-scheme: dark) {
    :root {
        --BGCOLOR: #30363d;
        --ALT-BGCOLOR: #0d1117;
        --RADIAL-COLOR: #0d1117;
        --GRAY-COLOR: #161b22;
        --FONT-COLOR: #e6edf3;
        --BORDERS: 3px solid var(--DARK-COLOR);
        --CARD-BGCOLOR: radial-gradient(#30363d, #010409);
    }
}

/* || UTILITY CLASSES */
.offscreen {
    position: absolute;
    left: -10000px;
}

.nowrap {
    white-space: nowrap;
}

/* || GENERAL STYLES */
html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--FF);
    font-size: var(--FS);
    background-color: var(--BGCOLOR);
    background-image: radial-gradient(var(--RADIAL-COLOR), var(--BGCOLOR));
}

header,
footer {
    position: sticky;
    z-index: 1;
    text-align: center;
    color: var(--LIGHT-COLOR);
    background-color: var(--ALT-BGCOLOR);
}

header {
    top: 0;
}

h1 {
    padding: var(--PADDING);
}

nav {
    display: flex;
    justify-content: space-evenly;
    padding: var(--PADDING);
    border-bottom: var(--BORDERS);
    font-weight: bolder;
    background-color: var(--GRAY-COLOR);
    box-shadow: var(--SHADOWS);
}

nav a:any-link {
    color: #79c0ff;
}

nav :is(a:hover, a:focus) {
    color: #56d364;
}

nav a:active {
    color: #ff7b72;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    flex-grow: 1;
    padding: 2rem;
}

p q {
    display: inline-block;
    text-align: center;
}

footer {
    bottom: 0;
    padding: var(--PADDING);
}

/* || PROFILE CARD */
.card {
    scroll-margin-top: 9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--CARD-SIZE);
    padding: 1rem;
    border: var(--BORDERS);
    border-radius: 4px;
    color: var(--FONT-COLOR);
    background-image: var(--CARD-BGCOLOR);
    transition: all 0.3s ease-in-out;
}

.card:hover {
    border: var(--BORDERS);
    box-shadow: var(--SHADOWS);
    transform: scale(1.02);
}

.card:target {
    border: var(--BORDERS);
    box-shadow: var(--SHADOWS);
}

.card figure {
    display: flex;
    flex-flow: column nowrap;
}

.card img {
    border: 5px double #30363d;
    border-radius: 50%;
}

.card figcaption {
    margin: 1rem;
    font-weight: bolder;
    font-size: var(--FS-L);
    text-align: center;
}

/* || SMALL */
@media screen and (min-width: 576px) {
    main {
        justify-content: center;
        flex-flow: row wrap;
        padding: 1rem;
    }

    .card {
        width: min(100%, 365px);
    }

    .card:last-child {
        order: -1;
    }
}

/* || MEDIUM */
@media screen and (min-width: 768px) {
    nav {
        display: none;
    }

    .card {
        width: min(100%, 350px);
    }

    .card:target {
        border: 0;
        box-shadow: none;
    }

    .card figure {
        flex-flow: column-reverse;
    }

    .card p {
        margin-top: 1rem;
    }
}

/* || LARGE */
@media screen and (min-width: 992px) {
    .card {
        width: min(100%, 350px);
    }

    .card:nth-child(2) {
        order: -1;
    }
}

/* || XL */
@media screen and (min-width: 1200px) {
    main {
        gap: 8rem;
    }

    .card {
        width: min(33% - 1rem, 375px);
    }
}

/* || MOBILE DEVICE LANDSCAPE */
@media screen and (max-height: 425px) and (min-aspect-ratio: 7/4) {
    h1 {
        font-size: 1.5rem;
    }

    nav {
        display: none;
    }

    main {
        flex-flow: row nowrap;
        justify-content: space-evenly;
        align-items: stretch;
    }

    .card {
        width: min(33% - 0.25rem, 200px);
    }

    .card figcaption,
    .card p {
        font-size: 1.25rem;
    }
}