/** {
    border: 1px solid red;
}*/

html, body {
    /* Prevent the webpage from scrolling horizontally, */
    max-width: 100%;
    overflow-x: hidden;
    /* Remove white border around edges of body. */
    margin: 0;
        /* Set the min-height to the size of the screen to force the body below the header to take up all remaining space. */
        /* Thus removing white border at the bottom of the screen after the body is finished. */
        /* Setting height instead of min-height prevents vertical scrolling, because the body is only as tall as the screen, even if some content is pushed outside of the screen. */
    min-height: 100vh;
    display: flex;
}

main {
    /* Prevent the main body from overlapping with the header. */
    margin-top: 60px;
    font-family: sans-serif;
    color: #EEE;
    flex: 1;

    display: flex;
    align-items: center;
}

.bg {
  /* The image used */
  background-image: url("images/about-bg.png");

  /* Center and scale the image nicely */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: #414253;
    opacity: 0.95;
    /* add the shadow to the header. */
	-webkit-box-shadow: 0 8px 9px -6px black;
	   -moz-box-shadow: 0 8px 9px -6px black;
	        box-shadow: 0 8px 9px -6px black;
}

#header2 {
    font-family: sans-serif;
    text-shadow: 1px 1px 3px black;
    font-size: 1rem;
    color: #EEE;
    /* 10px from the top and bottom, 20px from the sides; */
    margin: 20px;
    /* So that things can sit next to the ENcode text in the header. */
    display: inline-block;
    float: right;
}

#encode {
    font-family: 'courier-prime', monospace;
    text-shadow: 1px 1px 3px black;
    color: #EEE;
    /* 10px from the top and bottom, 20px from the sides; */
    margin: 10px 20px;
    /* So that things can sit next to the ENcode text in the header. */
    display: inline-block;
    /* Below is for the grow effect. */
    position: relative;
    -webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.encode-text {
    font-family: 'courier-prime', monospace;
    font-size: 1.2rem;
}

#encode::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    -webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#encode:hover {
    -webkit-transform: scale(1.05, 1.05);
    transform: scale(1.05, 1.05);
}

#encode:hover::after {
    opacity: 1;
}
/* Above code until the next comment above is for the grow effect. */

img {
    width: 200px;
}

div {
    flex: 1;
    text-align: center;
    padding: 100px;
}

#about-text {
    margin-bottom: 70px;
}

#mail {
    font-size: min(1.1rem, 4.5vw);
    white-space: nowrap;
    text-decoration: none;
    color: #EEE;
}

@media (max-width: 1000px) {
    main {
        flex-direction: column-reverse;
    }

    #header2 {
        font-size: min(1rem, 4.5vw);
        white-space: nowrap;
    }

    div {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0 100px;
    }
}

@media (max-width: 550px) {
    header {
        height: 120px;
    }

    main {
        margin-top: 120px;
    }

    #header2 {
        display: block;
        float: none;
        text-align: center;
    }

    div {
        padding: 0 25px;
    }

    #photo {
        margin-top: 70px;
    }
}
