@font-face {
    font-family: "ITC Avant Garde Gothic Std Bold";
    src: url("fonts/ITC\ Avant\ Garde\ Gothic\ Std\ Bold.otf") format("opentype")
}

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

body {
    margin: 40px;
    font-family: Helvetica, Arial, sans-serif;
    background-color: #fff;
    color: #444;
}

h1,
p {
    margin: 0 0 0.25em 0;
}

.wrapper {
    max-width: 80vw;
    display: grid;
    grid-gap: 10px;
}

.wrapper>* {
    padding: 1em;
    font-size: 150%;
    /* Required for the floated layout. */
    margin-bottom: 10px;
}

/* Remove extra padding on mobile layouts. */
.wrapper header {
    padding-bottom: 0;
}

/* We need to set the widths used on floated items back to auto, and remove the
   bottom margin as when we have grid we have gaps. */
@supports (display: grid) {
    .wrapper>* {
        width: auto;
        margin: 0;
    }
}

html {
    font-size: 12px;
}

/* Cool link hover effects. */
a {
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

a:focus,
a:hover {
    color: black;
}

a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 0.2em;
    bottom: 0;
    left: 0;
    background-color: black;
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

a.text-black::after {
    background-color: black;
}

header {
    border-bottom: 4px solid #444;
}

header a {
    display: inline-block;
    width: 40%;
    padding-bottom: 0.25em;
    margin: 0 0.5em 0.5em 0;
}

#header-links {
    margin-bottom: 0.5em;
}

#sidebar {
    border-bottom: 2px solid #ccc;
    border-right: 0;
    text-align: end;
}

#sidebar a {
    display: inline-block;
    font-size: 1.25em;
    font-weight: bold;
    margin: 0.5em;
}

#sidebar .sidebar-link {
    text-align: center;
}

footer {
    color: #888;
    border-top: 2px solid #ccc;
}

.title {
    font-family: 'ITC Avant Garde Gothic Std Bold', sans-serif;
    font-weight: bolder;
}

#home-page-link {
    font-size: 6rem;
    display: inline-block;
    margin-bottom: 0.1em;
    padding-bottom: 0em;
}

#home-page-link::after {
    height: 0.1em;
}

#footer-links {
    float: right;
}

#footer-links a {
    margin: 0 0.1em;
}

/* Disable link hover effects for footer. */
#footer-links a::after {
    height: 0;
}

/* Cat API modal. */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.modal-close {
    display: flex;
    justify-content: end;
    color: #444;
    font-size: 28px;
    font-weight: bold;
}

.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
}

#cat-img {
    display: flex;
    justify-content: center;
    margin: 4em 2em;
}

#cat-img img {
    border: 8px solid #444;
}

#cat-msg {
    text-align: center;
    font-size: 2rem;
    font-style: italic;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Page content. */
.content+.content {
    margin-top: 0.5em;
    border-top: 2px solid #444;
    padding-top: 0.5em;
}

.content-title {
    font-size: 3em;
    font-weight: bold;
}

.content-subtitle {
    margin-bottom: 0.5em;
    font-size: 1.5em;
    font-style: italic;
}

.content-link {
    margin-bottom: 0.5em;
}

.content img.img-border {
    margin-bottom: 1em;
    border: 8px solid #ccc;
}

.content a {
    padding-bottom: 4px;
}

#home-content {
    font-size: 2em;
}


/* Desktop design. */
@media screen and (min-width: 600px) {
    #sidebar {
        float: left;
        border-bottom: 0px;
        border-right: 2px solid #ccc;
    }


    #sidebar .sidebar-link {
        text-align: center;
    }

    #content {
        float: right;
    }

    .wrapper {
        margin: 0 auto;
        grid-template-columns: 1fr 3fr;
    }

    .wrapper header {
        padding-bottom: 1em;
    }

    header,
    footer {
        grid-column: 1 / -1;
        /* needed for the floated layout */
        clear: both;
    }

    header a {
        width: inherit;
        padding-bottom: 0.25em;
        margin: 0 0.5em 0 0;
    }

    #header-links {
        margin-bottom: 0;
    }

    /* Upsize title for desktop. */
    #home-page-link {
        font-size: 8rem;
    }

    #home-content {
        max-width: 75%;
    }
}