
/* HTML */

html {

  /* Color variables */
  --bright: #FAFAFA;
  --header: #EAEAEA;
  --medium: #4C7089;
  --featured: #FFA213;
  --dark: #191919;

  /* Font family variables */
  --heading: 'Montserrat', Verdana, sans-serif;
  --main-text: 'Roboto', Verdana, sans-serif;
  --course: 'Raleway', Verdana, sans-serif;
  --quote: 'El Messiri', sans-serif;

  /* Container variable */
  --container: 1280px;

  color: var(--dark);
  font-family: var(--main-text);
  font-size: 16px;
}

/* ELEMENTS */

a {
  text-decoration: none;
}

aside { /* Information and Thesis sections */
  margin: 0 1.5rem;
  width: 30rem;
}

aside picture { /* Information and Thesis sections */
  max-width: 35%;
  min-width: 35%;
  padding-right: 1.5rem;
}

blockquote {
  font-family: var(--quote);
  font-size: 1.4rem;
  line-height: 1.5em;
  font-style: italic;
}

body {
  background-color: var(--dark);
}

h1 {
  font-size: 2rem;
}

a h1 {
  color: var(--dark);
}

h2,
h3 {
  font-weight: bold;
}

h2 {
  font-family: var(--heading);
  font-size: 3rem;
  letter-spacing: 0.15rem;
  line-height: 1.3em;
}

h3 {
  font-size: 2rem;
  line-height: 1.2em;
}

button:hover,
li:hover {
  cursor: pointer;
}

button:focus,
li:focus {
  outline: 0;
}

aside li {
transition: background-color 600ms ease 200ms,
            color 600ms ease 200ms;
}

aside li:hover,
aside li:focus {
  background-color: var(--medium);
  color: var(--bright);
  outline: 0;
}

#information li,
#thesis li { /* Information Boxes */
  padding: 1rem 0 1rem 1rem;
}

nav {
  font-weight: bold;
}

header a,
footer a {
  transition: color 400ms ease 100ms;
}

p {
  font-size: 1.2rem;
  line-height: 1.5em;
}

figure {
  align-items: center;
}

footer .desktop a,
header nav a {
  color: inherit;
  margin-left: 1rem;
}

li,
header,
header div,
figure a,
figure,
footer div,
#jumbotron,
#information,
#course ul,
#thesis > div {
  display: flex;
}


header,
header div,
figure a,
header .mobile,
footer div {
  align-items: center;
  justify-content: space-between;
}

img,
video /* Thesis section */ {
  max-width: 100%;
}

@media only screen and (max-width: 1024px) {
  aside { /* Information and Thesis sections */
    margin-right: 0;
  }
}

@media only screen and (min-width: 901px) {

  aside { /* Information and Thesis sections */
    min-width: 30rem;
  }
}

@media only screen and (max-width: 400px) {

  h2 {
    font-size: 2rem;
    line-height: 1.3em;
  }

  h3 {
    font-size: 1.2rem;
    line-height: 1.2em;
  }
}


/* CLASSES */

.aside-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.desktop a:hover,
.desktop a:focus {
  color: var(--featured);
}

.mobile { /* display only in widths bellow 900px */
  display: none;
}

@media only screen and (max-width: 900px) {

  .desktop {
    display: none;
  }

  .mobile {
    display: flex;
  }
}


/* HEADER */

header {
  background-color: var(--header);
  font-size: 1.4rem;
  height: 4rem;
  position: fixed;
  z-index: 5;
  width: 100%;
}

header div {
  margin: 0 auto;
  max-width: var(--container);
  width: var(--container);
}

span { /* Title color change */
  color: var(--featured);
}

header a {
  font-size: 1.2rem;
}

header .mobile{
  width: 100%;
}

header img,
header svg {
  height: 3rem;
  width: 2.5rem;
}

svg:hover .logo,
svg:focus .logo {
  fill: var(--featured);
  transition: fill 400ms ease 100ms;
}

@media only screen and (max-width: 1328px) { /* 1280 + 1.5 x 16 x 2 */

  header figure,
  header nav {
    padding: 0 1.5rem;
  }
}

@media only screen and (max-width: 900px) {

  header a {
    align-items: center;
    border-radius: 5px;
    display: flex;
    margin: 0;
    transition: background-color 300ms ease 150ms;
  }

  header a:first-child {
    margin-left: 0;
  }

  header a:hover,
  header a:focus {
    background-color: var(--featured);
  }
}


/* MAIN */

footer,
main {
  background-color: var(--bright);
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  top: 4rem;
}

main section:nth-child(odd) { /* Color switch between sections */
  background-color: var(--medium);
}


/* Jumbotron */

#jumbotron {
  color: var(--bright);
  padding: 2rem 0;
}

#jumbotron picture { /* Banner */
  padding-left: 1.5rem;
  width: 60%;
}

hgroup { /* Jumbotron text */
  padding-left: 2.5rem;
  padding-right: 1.5rem;
  width: 29rem;
}

#jumbotron h3 {
  margin-top: 3rem;
}

button {
  background-color:  var(--dark);
  border: none;
  color: var(--bright);
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 3rem;
  padding: 1rem;
  transition: background-color 400ms ease 200ms,
              color 400ms ease 200ms;
}

button:hover,
button:focus {
  background-color: var(--bright);
  color: var(--featured);
}

@media only screen and (max-width: 900px) {

  #jumbotron {
    flex-direction: column;
    padding: 0;
  }

  #jumbotron picture { /* Banner */
    height: 15rem;
    overflow: hidden;
    padding: 0;
  }

  #jumbotron picture,
  hgroup {
    width: 100%;
  }

  hgroup { /* Jumbotron text */
    padding: 2rem 0;
  }

  h2,
  h3,
  button {
    margin-left: 1rem;
    margin-right: 1rem;
    max-width: 100%;
  }

  #jumbotron h3 {
    margin-top: 2rem;
  }
}

@media only screen and (max-width: 400px) {

  #jumbotron{
    padding-bottom: 0;
  }
}


/* Information */

#information > div { /* Main Information */
  margin-top: 2rem;
  padding-left: 1.5rem;
}

#information .quote {
  padding-top: 2rem;
}

#information .quote p {
  margin: 2.5rem 0;
}

#information blockquote { /* Quote */
  margin-top: 1.5rem;
}

#information > div p { /* Quote Author */
  font-size: 1.2rem;
  font-weight: bold;
}

#information aside { /* Aside Information */
  margin-top: 2rem;
}

#information .aside-text div {
  margin-bottom: 1.5rem;
  padding-right: 1.5rem;
}

#information a {
  color: var(--featured);
  transition: font-weight 200ms;
}

#information a:hover,
#information a:focus {
  font-weight: bold;
}

@media only screen and (max-width: 900px) {

  #information {
    background-color: var(--bright);
    padding: 0;
  }

  #information aside { /* Becomes the main content of the section */
    margin-top: 0;
    padding-top: 0;
    width: 100%;
  }

  aside,
  #information h3 {
    margin: 0;
  }

  aside,
  #information li {
    border: none;
    flex-direction: column;
  }

  #information li {
    justify-content: center;
    padding: 2rem 1rem;
  }

  #information .aside-text div {
    padding: 0;
    margin: 1rem 0;
  }

  #information img,
  #information picture {
    padding: 0;
    max-width: none;
    width: 100%;
  }

  #information a,
  #information li p {
    font-size: 1.4rem;
  }

  button {
    font-size: 2rem;
  }
}

@media only screen and (max-width: 400px) {

  #information li {
    padding: 1rem 1rem;
  }

  #information a,
  #information li p {
    font-size: 1rem;
  }
}


/* Courses */

#course {
  padding: 2rem 0;
}

#course h2 {
  color: var(--bright);
  margin-bottom: 1rem;
  text-align: center;
}

#course ul {
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 1rem;
}

#course li { /* Courses boxes */
  background-color: var(--bright);
  display: block;
  margin: 1rem;
  max-width: 30rem;
  width: 20rem;
  transition: background-color 400ms ease 200ms,
              color 400ms ease 200ms;
  width: 30%;
}

#course li:hover,
#course li:focus { /* Courses boxes */
  background-color: var(--dark);
  color: var(--bright);
}

#course li > div { /* Courses box text */
  padding: 1rem;
}

#course p { /* Text explaining the courses */
  font-family: var(--course);
  margin: 0.5rem 0;
}

@media only screen and (max-width: 900px) {

  #course li {
    background-color: var(--bright);
    margin: 0.5rem auto;
    max-width: none;
    width: 100%;
  }
}

@media only screen and (max-width: 400px) {

  #course {
    padding-bottom: 0;
  }
}


/* Thesis */

#thesis h2 {
  padding: 2rem;
  text-align: center;
}

#thesis > div { /* Main 'thesis' (Everithing besides the h2) */
  padding: 0 0 2rem 1.5rem;
}

#thesis .quote {
  padding-top: 1.5rem;
}

#thesis blockquote { /* Quote */
  margin-top: 1rem;
}

@media only screen and (max-width: 900px) {

  #thesis > div {
    padding: 0;
  }
}


/* FOOTER */

footer {
  background-color: var(--bright);
  padding: 0 0 2.5rem 0;
}

footer div { /* Container */
  border-top: 1px solid var(--header);
  margin: 0 1%;
  padding: 1rem 1.5rem;
}

@media only screen and (max-width: 900px) {

  footer {
    padding: 1.5rem 0 0 0;
  }

  footer div {
    border-top: none;
    margin: 0;
  }
}
