@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&display=swap');

:root {
    --background: #fafafa;
    --text: #202020;
    --muted: #666;
    --border: #e5e5e5;
    --card: #ffffff;
    --hover: #c8c8c8;
}


/* =========================
   Base
========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;

    background: var(--background);
    color: var(--text);

    font-family: "Fraunces", Georgia, serif;
    line-height: 1.6;
}


article {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 2rem;
}


/* =========================
   Typography
========================= */

h1,
h2 {
    font-weight: 500;
}

h1 {
    margin-top: 0;
}

p {
    margin-top: 0.25rem;
}


/* =========================
   Links
========================= */

a,
a:visited {
    color: inherit;
}

article a:not(.home-tile) {
    text-decoration: underline;
    text-decoration-color: #d4d4d4;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

article a:not(.home-tile):hover {
    text-decoration-color: var(--text);
}


/* =========================
   Lists
========================= */

ul,
dl {
    padding-left: 1.25rem;
}

dt {
    margin-top: 1.5rem;
    font-weight: 600;
}

dd {
    margin-left: 1rem;
}


/* =========================
   Homepage grid
========================= */

.home-links {
    display: grid;

    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;

    max-width: 850px;
    margin: 5rem auto;
}


/* =========================
   Name tile
========================= */

.home-title-tile {
    display: flex;

    align-items: center;
    justify-content: center;

    padding: 1rem;

    text-align: center;
}


.home-title-tile h1 {
    margin: 0;

    font-size: 1.3rem;
    font-weight: 500;
}


/* =========================
   Homepage cards
========================= */

.home-tile {
    position: relative;

    display: block;

    padding: 1rem;
    padding-right: 2.5rem;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 10px;

    text-decoration: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.home-tile:hover {
    border-color: var(--hover);

    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.06);
}


.home-tile h2 {
    margin: 0 0 0.3rem;

    font-size: 1.1rem;
}


.home-tile p {
    margin: 0;

    color: var(--muted);
    font-size: 0.9rem;
}


/* =========================
   External link indicator
========================= */

.home-tile[href^="http"]::after {
    content: "↗";

    position: absolute;

    right: 1rem;
    top: 1rem;

    font-size: 1rem;
    color: var(--muted);

    transition: transform 0.15s ease;
}


.home-tile[href^="http"]:hover::after {
    transform: translate(2px, -2px);
}


/* =========================
   Footer
========================= */

footer {
    max-width: 1000px;

    margin: 4rem auto 0;
    padding: 2rem;

    border-top: 1px solid #eee;

    text-align: center;

    color: #888;
    font-size: 0.85rem;
}


/* =========================
   Mobile
========================= */

@media (max-width: 768px) {

    article {
        margin: 2rem auto;
        padding: 0 1.25rem;
    }


    .home-links {
        display: flex;

        flex-direction: column;

        margin: 2rem auto;
    }


    .home-title-tile {
        padding: 1rem;
    }


    .home-title-tile h1 {
        font-size: 1.5rem;
    }


    .home-tile {
        width: 100%;
    }
}