  /*
* ayushsplaining index V1.0
* Copyright 2022, Ayush Mukherjee
* Free to use under the MIT license.
* 11/22/2022
*/


/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Variables
- Typography
- Components
- Layout
- Utilities
- Media Queries
*/


/* Variables
–––––––––––––––––––––––––––––––––––––––––––––––––– */
:root{
    --color-accent-muted: hsl(from var(--color-accent) h s l / 12%);
}


/* Typography
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.content-card>h2 {
    font-family: var(--ff-heading);
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: var(--ff-bolder);
    filter: drop-shadow(0 0 1rem var(--color-accent))
        drop-shadow(0 0 2rem var(--color-accent));
}

.content-card>p {
    font-family: var(--ff-text);
    font-size: 0.6rem;
    color: var(--color-primary-light);
}

.content-card a {
    color: inherit;
    text-decoration: none;
}


/* Components
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@keyframes fadeIn {to {visibility: visible; opacity: 0.6;}}
.background-img {
    object-fit: cover;
    visibility: hidden;
    opacity: 0;
    animation: fadeIn var(--transition-delay-short) ease-in-out alternate infinite;
}

.squiggle {
    fill: var(--color-bg-light);
    fill-opacity: 0.22;
    stroke: var(--color-primary);
    stroke-opacity: 0.42;
}

.content {
    display: grid;
    grid-template-columns: repeat(3, min(25%, 300px));
    gap: 1rem;
    align-items: start;
    justify-content: center;
}

.content-card {
    border-radius: 10px;
    height: 200px;
    box-shadow: 0 0 1px 1px var(--color-accent-muted);
    padding-inline: 2ch;
}

.content-card:focus {
    filter: drop-shadow(0 0 1rem var(--color-accent))
        drop-shadow(0 0 2rem var(--color-accent));
}


/* Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.background {
    position: relative;
    width: 100%;
    height: 100%;
}

.background-img,
.background>svg {
    position: fixed;
    top: 50dvh;
    left: 50dvw;
    translate: -50% -50%;
    width: 100%;
    max-width: var(--max-viewport-width);
    z-index: -10;
}

.content {
    max-width: var(--max-viewport-width);
    margin-inline: auto;
    margin-top: 40dvh;
}


/* Utilities
–––––––––––––––––––––––––––––––––––––––––––––––––– */


/* Media Queries
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media(min-width: 900px) {
    .content {
        margin-top: clamp(5%, 20vh, 15%);
    }

    .content-card>h2{
        font-size: 1.2rem;
    }

    .content-card>p{
        font-size: 0.8rem;
    }

    .content-card:hover > h2,
    .content-card:focus-within > h2 {
        filter: drop-shadow(0 0 1rem var(--color-accent))
            drop-shadow(0 0 2rem var(--color-accent))
            drop-shadow(0 0 3rem var(--color-accent))
            drop-shadow(0 0 4rem var(--color-accent));
    }
}
