:root {
    --text-color-body: rgba(255,255,255, 0.9);
    --text-color-light: rgba(255,255,255, 0.75);
    --text-size: 1rem;
    --text-size-sm: 0.875rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: monospace;
    font-size: var(--text-size);
    line-height: 1.3;
    color: var(--text-color-body);
    padding: 1.25rem;
    margin: 0;
    background-color: midnightblue;
    background-image: linear-gradient(12deg, #0D345C 50%, #0D5C5C 80%, #0D5C35);
    background-attachment: fixed;
}

@media screen and (min-width: 768px) {
    body {
        padding: 2.5rem;
    }
}

h1, h2, h3 {
    color: #fff;
}

h1 {
    margin-top: 0;
    margin: 0 0 1rem 0;
}

h2 {
    margin: 0 0 1.5rem 0;
}

h3 {
    margin: 1.5rem 0 0.75rem 0;
}

p, ul {
    margin: 0.75rem 0 1.5rem 0;
}

i {
    font-size: var(--text-size-sm);
    color: var(--text-color-light);
}

a, a:link, a:visited {
    color: white;
    text-decoration: underline;
}

a:hover, a:focus {
    color: skyblue;
    text-decoration: none;
}

a:focus {
    outline: 2px solid skyblue;
    outline-offset: 1px;
}

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

button:not([disabled]) {
    cursor: pointer;
}

/* LAYOUT */

header,
article,
footer {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

/* Header */

header,
article:not(:last-of-type) {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

header h1 {
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.75);
}

.intro {
    font-size: 1rem;
    margin: 1.25rem 0 0 0;
}

/* Content */

section:not(:last-of-type) {
    position: relative;
    padding-bottom: 1.5rem;
}

section:not(:last-of-type)::after {
    content: '';
    position: absolute;
    width: 2rem;
    bottom: 0;
    border: 1px dashed rgba(255,255,255, 0.33);
}

section h4 {
    margin: 0.75rem 0 0.25rem 0;
}

section .bullet {
    list-style-type: "- ";
}

section p, section ul {
    margin-bottom: 0;
}

/* Portfolio */

.thumbnails {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: row;
    grid-gap: 0.75rem;
    padding: 0;
    margin-bottom: 1.5rem;
}

@media screen and (min-width: 600px) {
    .thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
}

.thumbnails li,
.thumbnails button {
    line-height: 0;
}

.thumbnails li {
    text-align: center;
}

.thumbnails button {
    padding: 0;
    background: none;
    border: 0;
}

.thumbnails button:hover img,
.thumbnails button:focus img {
    outline: 2px solid skyblue;
}

.thumbnails img {
    display: block;
    object-fit: cover;
    height: 120px;
    border-radius: 0.25rem;
}

.thumbnails img.active {
    outline: 2px solid limegreen;
}

.featured {
    margin: 0;
}

.featured img {
    display: block;
    object-fit: contain;
    min-height: 12rem;
    max-height: 66vh;
    width: 100%;
    margin: 0 auto;
    background-color: black;
    border-radius: 0.5rem;
}

@media screen and (min-width: 996px) {
    .featured img {
        margin-left: -10%;
        width: 120%;
        max-width: 120%;
    }
}

@media screen and (min-width: 1200px) {
    .featured img {
        margin-left: -25%;
        width: 150%;
        max-width: 150%;
    }
}

.featured figcaption {
    font-size: 0.875rem;
    font-style: italic;
    margin-top: 0.75rem;
}

/* Footer */

footer, footer a:link, footer a:visited {
    color: var(--text-color-light);
}

footer {
    font-size: var(--text-size-sm);
    padding-top: 1.5rem;
}