/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.3.6,
* Autoprefixer: v10.3.1
* Browsers: last 4 version
*/

/* Base CSS styles */
* {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

h1 {
    font-size: 48px;
}

h2 {
    font-size: 39px;
}

h3 {
    font-size: 31px;
}

h4 {
    font-size: 25px;
}

p {
    line-height: 1.3;
}

a {
    color: #135171;
}

a:visited {
    color: #135171;
}

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

a:active {
    color: #646464;
}

button {
    border: none;
    display: inline-block;
    font-family: inherit;
    background-color: #1a6e9a;
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 3px;
    border-bottom: 2px solid rgba(0,0,0, 0.3);
    -webkit-transition: 0.2s opacity;
    -o-transition: 0.2s opacity;
    transition: 0.2s opacity;
}

.button {
    border: none;
    display: inline-block;
    font-family: inherit;
    background-color: #1a6e9a;
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 3px;
    border-bottom: 2px solid rgba(0,0,0, 0.3);
    -webkit-transition: 0.2s opacity;
    -o-transition: 0.2s opacity;
    transition: 0.2s opacity;
}

.button__secondary {
    background-color: #646464;
    color: #eef4fc;
}

button:hover, 
button:focus, 
.button:hover,
.button:focus {
    cursor: pointer;
    opacity: 0.8;
}
/* End base styles */


/* Navigation */
.navigation-list {
    list-style-type: none;
    padding: 0;
}

.navigation-list li {
    display: inline-block;
    margin-left: 15px;
}

.navigation-list__item {
    display: inline-block;
    padding: 0px 3px;
    -webkit-transition: 0.2s all;
    -o-transition: 0.2s all;
    transition: 0.2s all;
}

.navigation-list__item:hover {
    -webkit-transform: scale(1.1);
        -ms-transform: scale(1.1);
            transform: scale(1.1);
    background-color: #135171;
    color: #eef4fc;
}

.navigation-list__item:focus {
    -webkit-transform: scale(1.1);
        -ms-transform: scale(1.1);
            transform: scale(1.1);
    background-color: #135171;
    color: #eef4fc;
}

.navigation-list__item--active {
    text-decoration: none;
}

/* Header */
.page-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.page-header__item {
    -webkit-box-flex: 0;
        -ms-flex: 0 1 200px;
            flex: 0 1 200px;
}

.page-header__item:last-child {
    -webkit-box-flex: 1;
        -ms-flex-positive: 1;
            flex-grow: 1;
    text-align: right;
}


.logo-image {
    width: 200px;
    -webkit-transition: 0.2s -webkit-transform;
    transition: 0.2s -webkit-transform;
    -o-transition: 0.2s transform;
    transition: 0.2s transform;
    transition: 0.2s transform, 0.2s -webkit-transform;
}

/* Object fit not supported in IE */
@supports ((-o-object-fit: cover) or (object-fit: cover)) {
    /* Aligns the logo verticaly with the nav */
    .logo-image {
        height: 80px;
        -o-object-fit: cover;
           object-fit: cover;
    }
}

.logo-image:hover {
    -webkit-transform: rotate(-10deg);
        -ms-transform: rotate(-10deg);
            transform: rotate(-10deg);
}

/* Home page profile section */
.profile {
    max-width: 700px;
    margin: 0 auto;
}

.profile__portrait {
    float: left;
    width: 250px;
    margin-right: 40px;
    border-radius: 50%;
}

/* About page */
.about-section {
    text-align: center;
}

.about-section__list {
    list-style-type: none;
    padding: 0;
}

.about-section__list li {
    margin-bottom: 10px;
}

.about-section a {
    margin-top: 20px;
}

.about-svg {
    width: 100%;
    height: 400px;
    /* The svg had a lot of empty space above the image so 
    this was my solution to move it up closer to the download button */
    position: relative;
    bottom: 50px;
    /* Svg was in front of the button preventing it being clicked */
    pointer-events: none;
}

.sun {
    -webkit-animation: 4s color-change infinite alternate linear;
            animation: 4s color-change infinite alternate linear;
}

.cloud-mid {
    -webkit-animation: 10s cloud-move infinite alternate linear;
            animation: 10s cloud-move infinite alternate linear;
}

.cloud-right {
    -webkit-animation: 35s cloud-move-reverse infinite alternate linear;
            animation: 35s cloud-move-reverse infinite alternate linear;
}

/* Contact page */

.contact-section {
    max-width: 300px;
    text-align: center;
    margin: 0 auto;
}

.contact-section__form {
    margin-bottom: 15px;
}

.standard-label {
    display: block;
}

.contact-section input  {
    border: 1px solid #c2cbce;
    width: 100%;
}

#message  {
    border: 1px solid #c2cbce;
    width: 100%;
}

.contact-section input,
.standard-label,
#message {
    border-radius: 5px;
    padding: 4px 10px;
    margin-bottom: 10px;
}


/* Work page */
.work-section {
    width: 95%;
    margin: 0 auto;
}

/* Start grid fallback */
.grid__item {
    display: inline-block;
    width: 33%;
}
/* End grid fallback */

/* Work examples layout */
@supports (display: grid) {
    .grid {
        display: -ms-grid;
        display: grid;
        -ms-grid-columns: 1fr 20px 1fr 20px 1fr;
        grid-template-columns: 1fr 1fr 1fr;
        grid-gap: 20px;
    }
    
    .grid__item {
        background-color: #c2cbce;
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0  20px 20px 20px;
    }
    
    .grid__item:last-child {
        -ms-grid-column: 3;
        grid-column: 3 / 3;
        -ms-grid-row: 1;
        -ms-grid-row-span: 2;
        grid-row: 1 / 3;
    }

    .grid__item a {
        color: #135171;
    }
}

/* Footer */
.social-links {
    margin-bottom: 20px;
}

.social-links__item {
    text-decoration: none;
}

.page-footer {
    clear: both;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    text-align: center;
}

/* Animations */

@-webkit-keyframes color-change {
    0% {
      fill: #edc655;
    }
    50% {
      fill: #fcffad;
    }
    100% {
      fill: #f76414;
    }
  }

@keyframes color-change {
    0% {
      fill: #edc655;
    }
    50% {
      fill: #fcffad;
    }
    100% {
      fill: #f76414;
    }
  }

@-webkit-keyframes cloud-move {
    from {
        -webkit-transform: translate(0, 50px);
                transform: translate(0, 50px);
    }
    to {
        -webkit-transform: translate(200px, 50px);
                transform: translate(200px, 50px);
    }
}

@keyframes cloud-move {
    from {
        -webkit-transform: translate(0, 50px);
                transform: translate(0, 50px);
    }
    to {
        -webkit-transform: translate(200px, 50px);
                transform: translate(200px, 50px);
    }
}

@-webkit-keyframes cloud-move-reverse {
    from {
        -webkit-transform: translate(446px, 48px);
                transform: translate(446px, 48px);
    }
    to {
        -webkit-transform: translate(100px, 48px);
                transform: translate(100px, 48px);
    }
}

@keyframes cloud-move-reverse {
    from {
        -webkit-transform: translate(446px, 48px);
                transform: translate(446px, 48px);
    }
    to {
        -webkit-transform: translate(100px, 48px);
                transform: translate(100px, 48px);
    }
}

/* Media queries */

@media all and (max-width: 500px) {
    /* Header */
    .page-header {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        width: 100%;
    }
    .page-header__item {
        -ms-flex-preferred-size: 100%;
            flex-basis: 100%;
    }
    .logo-image {
        width: 150px;
    }
    /* Navigation */
    .navigation-list li {
        margin: 0;
    }
    .navigation-list li:not(:first-child) {
        margin-left: 15px;
    }
     /* Work page */
    .grid {
        -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    }
    /* Home page */
    .profile {
        width: 95%;
        text-align: center;
    }
    .profile__portrait {
        float: none;
        width: 60%;
        display: block;
        margin: 0 auto;
    }
    /* About page */
    .about-section {
        width: 90%;
        margin: 0 auto;
    }
}

@media all and (min-width: 500px) and (max-width: 750px) {
    /* Work page */
    .grid {
        -ms-grid-columns: 1fr 20px 1fr;
        grid-template-columns: 1fr 1fr;
    }
}

@media all and (max-width: 750px) {
    /* Work page */
    .grid {
        grid-gap: 10px;
        margin: 0 auto;
    }
    .grid__item:last-child {
        grid-column: auto / auto;
        grid-row: auto / auto;
    }
    /* General */
    h1 {
        font-size: 26px;
    }
    h2 {
        font-size: 22px;
    }
}