@layer reset {
    html {
        box-sizing: border-box;
        margin: 0;
    }

    *,
    *::before,
    *::after {
        box-sizing: inherit;
    }

    body {
        margin: 0;
        -webkit-hyphens: auto;
        hyphens: auto;
        -webkit-font-smoothing: antialiased;
    }

    code, var, kbd, samp, tt, dir,
    abbr, acronym, code, h1, h2, h3 {
        -webkit-hyphens: none;
        hyphens: none;
    }

    h1, h2, h3, h4 {
        text-rendering: optimizeLegibility;
        text-wrap: balance;
    }

    p {
        text-wrap: pretty;
    }
}

@layer fonts {
    @font-face {
        font-family: Exo2;
        src: url("/assets/fonts/Exo_2/Exo2-var-subset.woff2") format("woff2-variations");
        font-weight: 100 900;
        font-style: normal;
        font-display: swap;
    }

    @font-face {
        font-family: Exo2;
        src: url("/assets/fonts/Exo_2/Exo2-var-italic-subset.woff2") format("woff2-variations");
        font-weight: 100 900;
        font-style: italic;
        font-display: swap;
    }
}

:root {
    --content-width: 48rem;
}

body {
    display: grid;
    grid-template-rows: [header-start] max(14vw, 12rem) [header-end content-start] auto [content-end footer-start] auto [footer-end];
    grid-template-columns: [left-start] 1fr [left-end content-start] min(100%, var(--content-width)) [content-end right-start] 1fr [right-end];
    font-family: Exo2, sans-serif;
    font-weight: 400;
    background: rgb(40, 40, 40) linear-gradient(white, white);
    min-height: 100vh;
}

h2 {
    font-size: 1.7rem;
    font-weight: 600;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

blockquote {
    background-color: #e3eaf2;
    border-left: 9px solid purple;
    margin: 0;
    padding: 1rem 2rem;
    font-style: italic;
}

::selection {
    background-color: #ffed00;
    color: black;
}

header {
    display: grid;
    grid-area: header / span 3;
    grid-template-columns: subgrid;
    background: top/cover no-repeat url(/assets/pix/cityscape.webp), linear-gradient(to right, #1D72AA, #F0667D, #FED968, #6A2455);
    text-shadow: rgba(0, 0, 0, 0.2) 5px 5px 10px;
    box-shadow: rgba(0, 0, 0, 0.1) 5px 5px 10px;
}

.header-side {
    background-color: rgba(255, 255, 255, 0.3);
}

.header-content {
    display: flex;
    padding: 0 20px;
    flex-flow: column nowrap;
    justify-content: space-between;
    color: white;
    background-color: rgba(0, 0, 0, 0.1);

}

@keyframes shift-background {
    from {
        background-position-y: 8px;
    }
    to {
        background-position-y: 0;
    }
}

.title {
    margin: 0;
    font-size: min(5rem, 15vw);
    font-weight: 600;
}

.title a {
    color: currentColor;
    text-decoration: none;
    transition: color 250ms ease;

    &:hover {
        color: transparent;
        background: repeating-linear-gradient(0deg, #00a2a2, #00a2a2 2px, blue 2px, blue 4px);
        background-clip: text;
        animation: shift-background 1s infinite linear;
        text-decoration: none;
    }
}

.date {
    display: block;
    color: #999;
    margin-top: 0;
    text-align: right;
}

.subtitle {
    align-self: end;
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 300;
}

main {
    grid-area: content / content;
    padding-bottom: 3rem;
}

main h2 {
    margin: 2rem 0 0;
}

.about {
    grid-area: content / left;
}

.recent {
    grid-area: content / right;
}

.aside {
    opacity: 0.7;
    transition: all 250ms ease;

    &:hover {
        opacity: 1;
    }
}

.aside h3 {
    font-weight: 600;
    font-size: 1.2rem;
    margin: 1rem 0 7px;
}

.aside p {
    margin: 4px 0;
}

table {
    table-layout: fixed;
    border-collapse: collapse;
}

td {
    padding: 2px 6px;
    border: 1px solid #ccc;
    vertical-align: top;
}

.images {
    display: flex;
    flex-flow: row wrap;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

img.single-image {
    display: block;
    width: var(--content-width, 50rem);
    height: calc(var(--height) * 100vw / var(--content-width, 50rem));
    margin: 1rem 0;
}

.aside {
    padding: 1rem 3rem 0;
}

.about img {
    width: 100%;
}

.links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.links li {
    padding: 4px 0;
}

.links a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.links a, .links-plain a {
    color: black;
    text-decoration: none;
}

p.links-bottom {
    margin-top: 1rem;
}

a {
    &:hover {
        color: blue;
        text-decoration: underline;
    }

    &:active {
        color: orange;
    }
}

li[aria-current="page"] {
    font-weight: bold;
}

.icon {
    width: 24px;
    height: 24px;
    background: currentColor;
    mask-image: var(--icon);
    mask-size: 24px 24px;
}

.about a img {
    filter: grayscale(1) brightness(1.2);
    transition: all 250ms ease;
}

.about a:hover img {
    filter: grayscale(0);
}

.home-article {
    padding-bottom: 2rem;

}

.home-date {
    padding-top: 8px;
    float: right;
}

.intro {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.giant {
    font-size: clamp(20px, 20vw, 350px);
    margin: 0;
    text-align: center;
}

.comments {
    margin-top: 4rem;
    border-top: 1px solid #ccc;
    padding-top: 2rem;
}

@media screen and (max-width: 84rem) {
    .recent {
        display: none;
    }

    .about {
        display: grid;
        grid-template-columns: subgrid;
        grid-area: footer/span 3;
        color: white;
        background-color: rgb(40, 40, 40);
    }

    .footer-content {
        display: grid;
        grid-area: content;
        grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
        gap: 0 3rem;
        padding-bottom: 2rem;

    }

    .aside {
        padding: 0 0 1rem 0;
        opacity: 1;
    }

    .about a {
        color: lightgrey;

        &:hover {
            color: lightblue;
        }
    }
}

@media screen and (max-width: 50rem) {
    main {
        padding: 0 20px;
    }

    .footer-content {
        padding: 1rem;
        gap: 0 2rem;
    }

    img.single-image {
        margin-left: -20px;
        width: calc(100% + 40px);
        height: calc(var(--height) * 100vw / 800);
    }
}
