/* Reset */

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

* {
    margin: 0;
    padding: 0;
}

img,
iframe {
    display: block;
    max-width: 100%;
    height: auto;
}

html {
    scrollbar-gutter: stable;
}

body {
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.1;
    overflow-wrap: break-word;
    text-wrap: balance;
}

p {
    overflow-wrap: break-word;
    text-wrap: pretty;
}

button {
    background: none;
    border: none;
}

input,
button,
textarea,
select {
    font: inherit;
}

button,
[role='button'],
label,
summary,
select {
    cursor: pointer;
}

/* Global Styling */

body {
    font-family: nunito, Arial, Helvetica, sans-serif;
    background-color: #eee7e7;
    color: #02040f;
}

h1,
h2,
h3,
h4 {
    font-family: 'open sans', Verdana, Geneva, Tahoma, sans-serif;
    color: #002642;
}

a {
    color: #002642;
}

a:hover,
.lang:hover {
    color: #003c66;
    text-decoration: none;
}

a:visited {
    color: #8f0037;
}

.attribution {
    background-color: #f7f3f3b5;
    text-align: end;
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem 0 0 0;
    font-size: small;
}

/* Header */

.hero {
    height: 70vh;
    position: relative;
    background: url('../assets/images/dw-headshot.webp') center / cover
        no-repeat;
}

.nav-mobile {
    background-color: #f7f3f3;
    box-shadow: 0 0.5rem 0.5rem grey;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.05rem solid #02040f;
}

nav h2 {
    color: #8f0037;
    padding: 2rem;
}

.hamburger {
    height: 100%;
    color: #002642;
    font-size: 250%;
    padding: 1rem 2rem;
}

.hamburger:hover,
.page-link:hover {
    background-color: #e59500;
}

.page-link:visited {
    color: #002642;
}

nav > ul {
    flex-direction: column;
    list-style: none;
    box-shadow: 0 0.5rem 0.5rem grey;
    display: none;
}

.dropdown {
    display: none;
    border: 0.05rem solid #02040f;
}
nav li {
    width: 100%;
    background-color: #f7f3f3;
    text-align: center;
}

nav .active,
nav .dropbtn,
nav a {
    width: 100%;
    padding: 0.75rem;
}

nav .active {
    background-color: #e59500;
}
nav a {
    display: block;
    text-decoration: none;
    color: #002642;
}

.lang {
    display: inline;
    padding: 0;
    margin-left: 0.25rem;
    text-decoration: underline;
}

.dropbtn {
    font-size: 100%;
    width: 100%;
    padding: 0.75rem 0;
    color: #002642;
}

nav > ul > li:last-child {
    padding: 1rem;
    white-space: nowrap;
}
/* Cards */

.card-gallery {
    background-color: #e5dada;
    padding: 1rem;
}

.card-gallery h2 {
    text-align: center;
}

.card {
    background-color: #f7f3f3;
    margin: 1rem 0;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0.5rem 0.5rem 0.5rem grey;
}

.card h3 {
    text-align: center;
}
.card figure {
    position: relative;
}
.card img {
    border-radius: 1rem;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.card p {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

.card ul {
    text-align: left;
    padding-top: 1rem;
}

form button {
    background-color: #eee7e7;
    border-radius: 0.5rem;
    border: 0.02rem solid #000719;
    padding: 0.5rem;
}

form button:hover {
    background-color: #e59500;
}

/* Article */

article {
    max-width: 65ch;
    margin-inline: auto;
    padding: 2rem 1.5rem;
}

article h1 {
    text-align: center;
    padding-bottom: 1rem;
}

article h2,
article h4,
article p {
    padding-bottom: 1rem;
}

article h4 {
    padding-top: 1rem;
}

article ul {
    padding-left: 1rem;
}
figure {
    margin: 1rem;
}

.card-gallery-bg {
    background-color: #e5dada;
    text-align: center;
    padding-top: 1rem;
}

.article-sect-alt {
    background-color: #e5dada;
    width: 100%;
}

.article-sect-alt h2 {
    text-align: end;
}
ol {
    padding-left: 1rem;
}

ol h3 {
    padding-bottom: 0.5rem;
}

ol ol {
    list-style: lower-alpha;
}

ol ul {
    list-style: disc;
    padding-bottom: 1rem;
}

.bio-article {
    padding: 0;
}

.bio-article figure {
    margin: 0;
}

.bio-article h2,
.bio-article p {
    padding: 1rem;
}

form p,
form input,
form select,
form textarea {
    width: 100%;
}

/* Aside */

aside {
    background-color: #e59500;
    padding: 2rem;
    margin: 1rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0.5rem 0.5rem 0.5rem grey;
}

aside h3 {
    padding-bottom: 1rem;
}
aside ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    list-style: none;
}

figure {
    position: relative;
}

blockquote {
    font-family: 'open sans', Verdana, Geneva, Tahoma, sans-serif;
    font-style: italic;
    padding-bottom: 1rem;
}

/* Footer */
footer {
    text-align: center;
    border-top: 0.02rem solid #02040f;
    padding: 2rem;
    background-color: #f7f3f3;
}

footer ul {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    list-style: none;
    padding: 2rem;
}

footer li {
    color: #02040f;
}

@media screen and (width > 768px) {
    .hamburger {
        display: none;
    }

    .nav-mobile {
        box-shadow: none;
        border-bottom: none;
    }

    nav {
        display: flex;
        justify-content: space-between;
        background-color: #f7f3f3;
        box-shadow: 0 0.5rem 0.5rem grey;
        padding: 0 2rem;
        min-height: 4.5rem;
    }

    nav h2 {
        padding: 0;
    }

    nav > ul {
        display: flex !important;
        flex-direction: row;
        box-shadow: none;
    }

    nav li {
        width: auto;
    }

    nav > ul > li.active,
    nav .dropbtn,
    nav > ul > li > a,
    nav > ul > li > p {
        display: flex;
        align-items: center;
        height: 100%;
        padding: 0 1.5rem;
        white-space: nowrap;
    }

    nav a.lang {
        display: inline;
        width: auto;
        height: auto;
        padding: 0;
        text-decoration: underline;
    }

    nav > ul > li:last-child {
        padding: 0 1.5rem;
        white-space: nowrap;
    }

    .dropdown-container {
        position: relative;
    }

    .dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 10rem;
        list-style: none;
        border: none;
        box-shadow: 0 0.5rem 0.5rem grey;
        z-index: 10;
    }

    .dropdown li,
    .dropdown li a,
    .dropdown li.active {
        width: 100%;
        display: flex;
        align-items: center;
        height: 2.75rem;
        padding: 0;
        text-align: left;
        white-space: nowrap;
    }

    .dropdown li a,
    .dropdown li.active {
        padding-left: 1rem;
    }

    .hero {
        background: #000719 url('../assets/images/dw-headshot.webp') center /
            contain no-repeat;
    }

    .card-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
        max-width: 65rem;
        margin-inline: auto;
    }

    .cols {
        max-width: 130ch;
    }

    .cols h1 {
        text-align: center;
    }
    .grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}
