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

body {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #555;
    background: #f7f6f4;
    padding: 20px;
    max-width: 1000px;
    margin: auto;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
}

a {
    color: #3c5fa8;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #1e3a5f;
    text-decoration: underline;
}

a:visited {
    color: #5e478b;
}

p {
    font-size: 1.125rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

ul, li {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    font-family: 'Merriweather', serif;
    color: #35404a;
    margin-top: 0;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 1.75rem;
    line-height: 1.3;
    font-family: 'Merriweather', serif;
    color: #35404a;
    margin-top: 0;
    margin-bottom: 0.5em;
    color: #555;
}

h3 {
    font-size: 1.3rem;
    line-height: 1.4;
    font-family: 'Merriweather', serif;
    color: #35404a;
    margin-top: 0;
    margin-bottom: 0.5em;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.media-box h2, 
.media-box h3 {
    margin-top: 0;
}

.media-box {
    padding: 20px;
    margin: 40px 0;
    background: #fff;
    border: 1px solid #ccd4dc;
    border-radius: 8px;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.05);
}

#header {
    margin-top: 20px;
}

#header h1 {
    margin: 0;
}

#header h2 {
    margin: 0.5em 0;
    color: #777;
}

.introduction {
    font-family: 'Arial', sans-serif;
    color: #555;
}

@media (min-width: 768px) {
    #profile {
        flex-direction: row;
    }
}

#profile_photo {
    max-width: 100%;
    width: 100%;
    padding-right: 0px;
    margin: 0 0 20px 0;
}

@media (min-width: 768px) {
    #profile_photo {
        width: 360px;
        padding-right: 20px;
        margin: 0 0 20px 40px;
    }
}

#profile_text {
    margin: 0;
    max-width: 70ch;
}

#button_panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: center;
}

#button_panel a:hover {
    background: #1e3a5f;
}

#button_panel a {
    background: #3c5fa8;
    flex-grow: 1;
    line-height: 2.5;
    min-width: 200px;
    margin: 10px;
    padding: 10px 15px;
    border: 1px solid #1e3a5f;
    border-radius: 15px;
    color: #fff;
    text-decoration: none;
}

#selected_works_panel {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: top;
}

.selected_works_panel_row {
    display: flex;
    flex-wrap: wrap;
    text-align: center;
    justify-content: space-evenly;
    flex-grow: 1;
}

.selected_works_panel_unit {
    flex-grow: 1;
    min-width: 200px;
    max-width: 30%;
    margin-bottom: 12px;
}

.selected_works_panel_unit img {
    max-width: 100%;
    margin: 10px;
}

.caption, footer {
    font-size: 1.125rem;
    margin: 0;
}

.clearfix {
    overflow: auto;
}

.description {
    max-width: 70ch;
}

.left {
    float: left;
}

.right {
    float: right;
}

#book_cover {
    width: 40%;
    min-width: 300px;
    max-width: 450px;
    padding: 0 0 20px 20px;
}

.nomargin {
    margin: 0;
}

.section h2 {
    border-bottom: 1px solid #ccd4dc;
    padding-bottom: 10px;
}

.section {
    width: 100%;
    text-align: left;
    padding: 60px 0 30px;
}

.talks_and_pubs_image {
    width: 100%;
    max-width: 560px;
}

.kitplanes-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    padding-bottom: 20px;
}

.youtube {
    width: 100%;
    max-width: 560px;
    height: 315px;
}

p.block {
    display: block;
    padding: 0;
}

form {
    display: block;
}

#input-name,
#input-email,
#input-textarea {
    width: 100%;
    padding: 12px;
    resize: vertical;
    margin-top: 6px;
    font-size: 18px;
    border: 1px solid #ccd4dc;
    border-radius: 8px;
}

#input-textarea {
    height: 200px;
}

#submit-button:hover {
    background: #1e3a5f;
}

#submit-button {
    background: #3c5fa8;
    color: #fff;
    padding: 16px 36px;
    border: 1px solid #1e3a5f;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
}

