:root {
    --color-text: #333;
    --color-background: #eee;
}

body {
    margin: 0;
    padding: 0;

    font-family: sans-serif;
    color: var(--color-text);
    background: var(--color-background);

    overflow-x: hidden;
}

.site-content {
    width: 80em;
    max-width: 90vw;
    margin: 2rem auto;
}

h2 {
    margin-top: 4em;
}

.demo-list {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: start;
    align-items: center;
    flex-direction: row;
    gap: 1em;

    list-style: none;
    padding-left: 0;
    margin-bottom: 3em;
}

.demo-list li {
    /* regarding the parent */
    
    width: calc(33% - 1em);
    aspect-ratio: 1 / 1;

    position: relative;
    overflow: hidden;

    background-color: #fff;
    background-image: var(--demo-screenshot);
    background-size: 0 0;
}

.demo-list li::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-image: inherit;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transition: transform 1s;
}

.demo-list li:hover::after {
    transform: scale(1.1);
}

.demo-list li a {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;

    position: relative;
    z-index: 2;

    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 40% 0.5em 0.5em 0.5em;

    text-decoration: none;
}

.demo-list li a .title,
.demo-list li a .description {
    padding: 0.8em;
    color: var(--color-text);
    background-color: rgba(255, 255, 255, 0.9);
}

.demo-list li a .title {
    font-size: 1.6em;
    margin-bottom: 0.8em;
    max-width: 80%;
}

.demo-list li a .description {
    width: 80%;
}

canvas:focus {
    outline: 0;
}
