/* styling */

.padder {
    padding-top: 30px;
}

.index-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: justify;
}

.index-heading {
    font-size: 1.5rem;
    text-align: right;
    padding-bottom: 5px;
    border-bottom: 1px solid rgb(200, 200, 200);
}

/* article display */

/* Keep both cards the same size; let the descriptions use the remaining space. */
.article-preview {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    gap: 36px;
    margin-top: 35px;
}
@media screen and (max-width: 760px) {
    .article-preview {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        max-width: 400px;
        margin-inline: auto;
    }
    .article-descr h3 {
        display: none;
    }
    .article-descr p {
        margin: 0;
    }
}

.article-descr a {
    text-decoration: none;
}
.article-descr a:hover {
    text-decoration: underline;
}

/* under the hood columns */

.hood-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    padding-top: 30px;
}

#hood-image {
    width: 100%;
    height: auto;
    padding-left: 40px;
}

#hood-text ul {
    padding-inline: 35px 30px;
}

@media screen and (max-width: 600px) {
    .hood-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    #hood-image {
        display: none;
    }
    #hood-text ul {
        padding-inline: 15px 0;
    }
}

/* background */

.background {
    margin-top: 67px;
    padding-top: clamp(38px, calc(12vw - 70px), 76px);
    padding-left: clamp(45px, calc(20vw - 120px), 120px);
    min-height: clamp(330px, 34vw, 400px);
    background-image: url(../images/index-banner.webp);
    background-repeat: no-repeat;
    background-position: right clamp(20px, calc(35vw - 315px), 117px) center;
    background-size: min(550px, 52%);
}
.background > p {
    padding-bottom: 5px;
}
.background > h1 {
    width: fit-content;
    font-size: 3.6rem;
}
/* A light, hand-drawn flourish in the site's accent color. */
.background > h1::after {
    content: "";
    display: block;
    width: min(85%, 290px);
    height: 19px;
    margin-left: 0.12em;
    background: url(../images/index-title-flourish.svg) center / contain no-repeat;
}

@media screen and (max-width: 900px) {
    .background {
        padding-top: clamp(18px, calc(8vw - 34px), 38px);
        min-height: 330px;
        background-image: linear-gradient(90deg, var(--dark), rgba(32, 32, 32, 0.84) 30%, rgba(32, 32, 32, 0.3) 75%, transparent), url(../images/index-banner.webp);
        background-position: center, right center;
        background-size: 100% 100%, min(550px, 78%);
        text-shadow: 1px 1px 2px rgb(12, 12, 12);
    }
    .background > p {
        padding-bottom: 0;
    }
}

@media screen and (max-width: 650px) {
    .background {
        padding-inline: clamp(20px, 6vw, 40px);
        min-height: clamp(265px, 60vw, 330px);
        background-image: linear-gradient(180deg, var(--dark), rgba(32, 32, 32, 0.72) 45%, transparent), url(../images/index-banner.webp);
        background-position: center, center bottom;
        background-size: 100% 100%, min(550px, 100%);
    }
    .background > h1 {
        font-size: clamp(2.2rem, 8vw, 3.6rem);
    }
    .background > h1::after {
        display: none;
    }
}

/* Article tiles share typography and framing. */
.article-tile {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 155px;
    padding: 24px;
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    color: var(--light-bright);
    background: rgb(44, 42, 40);
    font-family: 'Ubuntu Sans', sans-serif;
    text-align: left;
    text-decoration: none;
}
.article-tile-security {
    --article-badge: url(../images/onlinesecurity-badge.webp);
}
.article-tile-void {
    /* Mark from the official Void Linux site. */
    --article-badge: url(../images/void-linux-badge.webp);
}
.article-tile::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 auto auto;
    width: 200%;
    height: 125%;
    transform: translate(50%, -50%);
    background: var(--article-badge) center / auto 100% no-repeat;
    opacity: 0.15;
    filter: saturate(0.6);
    pointer-events: none;
}
.article-tile span {
    font-size: 0.8rem;
}
.article-tile span:first-child {
    color: var(--accent-bright);
    letter-spacing: 0.12em;
}
.article-tile strong {
    margin: 10px 0;
    font-size: 1.65rem;
    font-weight: 200;
    line-height: 1.2;
}
.article-tile:hover {
    background: rgb(48, 46, 44);
}
.article-tile:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}
