/* Crew */

#crewmateys {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
}

#crewmateys > * {
    flex: 0 1 750px;
}

.crewmate {
    margin: 2rem 2rem;
    display: grid;
    grid-template-columns: auto 3rem;
    grid-template-rows: auto auto;
}

.crewmate:nth-child(2n) {
    margin-left: 6rem;
}

/* Name and avatar */
.crewmate > header {
    display: flex;
    align-items: center;
}
/* Social media icons */
.crewmate > nav {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    display: block;
    height: 100%;
    width: 100%;
}
.crewmate > nav > ul {
    display: flex;
    flex-flow: column nowrap;
    height: 100%;
    margin: 0;
    padding: 0;
    /*
     * Needed to add the required clear space around the YouTube icon. From the official documentation:
     *
     * The clear space around the logo icon must be equal to or greater than the size of the triangle within the icon.
     *
     * https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors
     */
}
/* Make social media icons take up an equal amount of space */
.crewmate > nav > ul > li {
    /* Prevent giant images from overriding base size so that the flexbox columns can have equal widths */
    /* "Yup, setting flex: 1 sets the flex-basis to 0%" */
    /* https://css-tricks.com/equal-columns-with-flexbox-its-more-complicated-than-you-might-think/ */
    flex-basis: 0;
    flex-grow: 1;
    list-style-type: none;
    /*
     * Needed to add the required clear space around the YouTube icon. From the official documentation:
     *
     * The clear space around the logo icon must be equal to or greater than the size of the triangle within the icon.
     *
     * https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors
     *
     * Also makes the other icons look good by giving them just as much clear space.
     */
    padding: 5px;
}
.crewmate > nav > ul > li > a {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.crewmate > nav img {
    max-width: 100%;
    max-height: 100%;
}

/* Why? I developed this website on a Steam Deck. */

@media only screen and (min-width: 1700px) {
    .crewmate:nth-child(2n) {
        margin-left: 2rem;
    }
}

@media only screen and (max-width: 900px) and (min-width: 501px) {
    .crewmate {
        margin: 2rem 3rem 2rem 1rem;
        max-width: 90%;
    }
    .crewmate:nth-child(2n) {
        margin-left: 3rem;
        margin-right: 1rem;
    }
}
@media only screen and (max-width: 650px) {
    .crewmate {
        grid-template-columns: 100%;
        grid-template-rows: 1fr auto 3rem;
        font-size: .75rem;
    }
    .crewmate > nav {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }
    .crewmate > nav > ul {
        flex-flow: row nowrap;
    }
    .crewmate > nav > ul > li:has(> a > img[src^="./assets/logos/yt"]) {
        /* Account for the YouTube icon width */
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

@media only screen and (max-width: 500px) {
    /* The side-to-side effect doesn't look
     * too good on <=500px-wide screens. */
    .crewmate {
        margin: 1.5rem 1rem;
        max-width: 90%;
    }
    .crewmate:nth-child(2n) {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media only screen and (max-width: 360px) {
    .crewmate > header > img:first-child {
        max-width: 2rem;
    }
    .crewmate > header {
        font-size: .5rem;
    }
}

/* Quote from the streamer */
.streamer-quote {
    position: relative;
    color: black;
    background-color: #ccc;
    margin: .5rem 1.5rem;
    padding: 0.5rem 1.5rem 0.5rem 0.5rem;
}
.streamer-quote > :first-child {
    margin-top: 0;
}
.streamer-quote > :last-child {
    margin-bottom: 0;
}
.streamer-quote::before {
    content: "\201D";
    color: #555;
    position: absolute;
    top: 0;
    right: .5rem;
    font-size: 2rem;
}

#crew {
    background-image: linear-gradient(
        to bottom,
        #0cf 0%, #0cf 14%,
        #05a 14%, #05a 29%,
        #115 29%, #115 43%,
        black 43%, black 57%,
        #401 57%, #401 71%,
        #a05 71%, #a05 86%,
        #ff0080 86%, #ff0080 100%
    );
}
