/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* Variables for colours */
:root {
    /* colours */
    --black: #0C0D13;
    --white: #ffffff;
    --grey: #CDC8C6;
    --dark: #777271;
    --accent: #A22F38;

    /* fonts */
    --large-heading: 'Montserrat', sans-serif;
    --body-text: 'Inter', sans-serif;
}

/* Asterisk wildcard selector to override default styles added by the browser */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* General styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Generic site styles */
    color: var(--black);
    font-family: var(--body-text);
}

section {
    scroll-margin-top: 5rem;
}

/* Header */
header {
    background-color: var(--grey);
    width: 100%;
    position: fixed;
    z-index: 99;
}

.header-contents-container {
    width: 100%;
    max-width: 1500px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 0 0.5rem;
}

/* Remove underline from and change colour of links */
header a {
    text-decoration: none;
    color: inherit;
}

h1 {
    font-family: var(--large-heading);
    letter-spacing: 2px;
    font-weight: 400;
    font-size: 1.5rem;
}

h2 {
    font-weight: 300;
    font-size: 1.5rem;
    color: var(--accent);
}

h3 {
    color: var(--accent);
}

h4 {
    font-weight: 700;
}

#tagline {
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 1px;
}

#main-heading {
    padding: 0.5rem;
}

/* Navigation */

#menu {
    font-size: 110%;
    letter-spacing: 2px;
    list-style-type: none;
}

#menu>li {
    margin-bottom: .5rem;
}

/* Nav menu styles with dropdown toggle */
nav {
    position: absolute;
    background-color: var(--grey);
    padding: 0 1rem;
    width: 100%;
    left: 0;
    display: none;
    top: 100%;
}

/* Nav toggle */
#nav-toggle:checked~nav {
    display: block;
}

#nav-toggle {
    display: none;
}

.nav-toggle-label {
    font-size: 2rem;
    color: var(--black);
}

.nav-toggle-label i {
    font-size: 2rem;
}

/* Main Content */
main {
    /* Make main element take up any surplus space to push footer down */
    flex: 1 0 auto;
    /* Add margin at top to prevent content being covered by header */
    margin-top: 62px;
    /* Enable flex properties for child elements */
    display: flex;
    flex-direction: column;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}

/* About section */

/* First image */

#first-image {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

#blue-headshot {
    max-width: 100%;
    height: auto;
}

/* About paragraph */

#about-paragraph,
#showreel-video {
    margin-top: 1rem;
}

#about-me {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Showreel */

#showreel {
    margin-top: 2rem;
}

#showreel-video {
    width: 100%;
}

/* Resume Section */

#resume {
    padding: 0 1rem 0 1rem;
    margin-top: 2rem;
}

#work-container {
    margin-top: 1rem;
}

.work-div {
    margin-top: 1rem;
}

.work-div>p {
    margin-bottom: 1rem;
}

.work-div>h3 {
    margin: 2rem auto 1rem;
}

#film-2 {
    margin-top: 0;
}

#resume a {
    color: var(--accent);
}

/* Gallery */

#gallery {
    margin-top: 4rem;
    margin-bottom: 3rem;
}

#photos img {
    width: 100%;
    line-height: 1em;
}

#photos {
    line-height: 0;
    margin-top: 2rem;
}

/* Contact Form */

#contact {
    background-image: url("../images/studio-lights-tiny.webp");
    background-size: cover;
    background-position: 75%;
    padding: 1rem 10% 1rem 10%;
    flex-grow: 1;
    margin-bottom: 2rem;
}

#contact-form {
    padding: 1rem;
    color: var(--white);
    background-color: var(--dark);
    opacity: 0.6;
}

#contact-form h2 {
    margin-bottom: 1rem;
    color: var(--white);
    font-size: 150%;
}

.text-input {
    background: transparent;
    color: var(--white);
    vertical-align: top;
    width: 100%;
    height: 25px;
    margin-bottom: .5rem;
    margin-top: .25rem;
    border: 2px solid var(--grey);
    border-radius: 2px;
    padding: 0 5px;
}

/* Colour around input box when focused */

.text-input:focus {
    border: 3px solid var(--accent);
}

/* Message box */

#message-box {
    height: 5rem;
}

/* Submit button */

#contact-form .join-button-container {
    display: flex;
    justify-content: center;
}

.join-button {
    background-color: var(--white);
    color: var(--accent);
    font-weight: 700;
    border-radius: 4px;
    font-size: 150%;
    padding: 1rem 2rem;
    margin: 1rem 0;
    cursor: pointer;
}

.join-button:hover {
    background-color: var(--accent);
    color: var(--black);
}

/* Footer */

footer {
    background-color: var(--dark);
}

#social-networks {
    text-align: center;
    padding: 20px 0;
    display: flex;
    justify-content: space-evenly;
    list-style-type: none;
}

#social-networks i {
    font-size: 160%;
    padding: 5%;
    color: var(--white);
}

/* Media query: large or landscape phones (576px and up) */

@media screen and (min-width: 576px) {

    /* Header - 576px+ */

    .header-contents-container {
        padding: 0 3rem;
    }

    /* Resumé - 576px+ */

    #resume>h2 {
        padding-left: 0.5rem;
    }

    #work-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        margin-top: 0;
    }

    .work-div {
        flex-basis: 31%;
        margin-top: 0;
        padding: 0 10px 5px 5px;
    }

    #film-2 {
        margin-top: 4.5rem;
    }

    /* Gallery - 576px+ */

    #photos {
        column-count: 2;
        column-gap: 0;
    }
}

#gallery>h2 {
    padding-left: 1.5rem;
}

/* Media query: tablets and larger (768px and up) */

@media screen and (min-width: 768px) {

    /* Header - 768px+ */
    header {
        position: fixed;
    }

    .header-contents-container {
        padding: 0 5rem;
    }

    #main-heading {
        font-size: 150%;
        line-height: 2rem;
        margin-left: 0;
        margin-right: 0;
    }

    nav {
        display: block;
        position: relative;
        width: fit-content;
        top: 1.15rem;
        bottom: 0;
        left: 0;
    }

    #menu {
        display: flex;
    }

    #menu>li {
        padding-left: 0.5rem;
        align-items: baseline;
    }

    .nav-toggle-label {
        display: none;
    }

    main {
        margin-top: 5rem;
    }

    /* About section - 768px+ */

    #about {
        display: flex;
        margin-left: auto;
        margin-right: auto;
    }

    #first-image,
    #about-me {
        display: flex;
        flex-direction: column;
        margin-top: 2rem;
    }

    #first-image {
        height: 100%;
        max-width: 40%;
        padding-left: 5%;
    }

    #about-me {
        width: 42%;
        margin-right: 0;
        margin-left: 7vw;
        padding-right: 0;
        padding-left: 0;
    }

    /* Resumé section - 768px+ */

    #resume {
        padding-top: 2rem;
    }

    /* Gallery section - 768px+ */

    #gallery {
        margin-top: 0;
        padding-top: 2rem;
    }

    #photos {
        column-count: 3;
    }

    /* Contact section - 768px+ */

    #contact-form {
        max-width: 400px;
        margin: auto;
    }

}

/* Media query: landscape tablets, laptops and larger (992px and up) */

@media screen and (min-width: 992px) {

    #menu a:hover {
        color: var(--accent);
        border-bottom: 1px solid var(--accent);
    }

    /* Gallery section - 992px+ */

    #photos {
        column-count: 4;
    }

}