@import url('/css/fonts.css');

/***************
 || General styles
****************/
html {
  box-sizing: border-box;

  font-size: 62.5%;

  /* CSS Variables */
  --heading-text: hsla(0, 0%, 13%, 1.0);
  --subheading-text: hsl(0, 3.9%, 20%);
  --text-color: hsl(0, 2.4%, 24.5%)
}

* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

article, section, nav, aside, footer, header {
  display: block;
}

body {
  font-family: 'freightsans', Arial, Helvetica, sans-serif;
  font-weight: 300;
  background-color: hsl(49.4, 100%, 96.7%);
}

.wrapper {
  display: flow-root;
  margin: 0 auto;
  max-width: 1100px;
  padding: 1rem;
}

/***************
 || Header
****************/
.header {
  text-align: center;
  font-size: 2rem;
  border-bottom: 1px solid hsla(0, 0%, 88%, 1.0);
  padding: 5rem 0;
  color: var(--heading-text);
}

h1,
h2 {
  margin-top: 2rem;
}

h1 {
  letter-spacing: -0.025em;
}

h2 {
  font-weight: normal;
  font-size: 1.4rem;
  color:var(--subheading-text);
}

/***************
 || Navigation
****************/
aside {
  position: sticky;
  top: 5rem;
  float: left;
  width: 23%;
  font-size: 1.5rem;
  margin-top: 5rem;
  color: var(--text-color);
}

aside img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
}

aside div:first-of-type {
  text-align: center;
}

aside p {
  line-height: 1.3;
  padding: 0 5%;
  margin-top: 2.2rem;
}

nav {
  letter-spacing: 0.033em;
}

nav ul {
  list-style: none;
  padding: 0 5%;
  margin-top: 2.2rem;
}

nav li::before {
  content: "→";
  padding-right: .7rem;
}

nav li {
  margin-bottom: .5rem;
}

nav a {
  text-decoration: none;
  color: inherit;
  background-image: linear-gradient(120deg, #DAF402 0%, #DAF402 100%);
  background-size: 100% .33em;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: 200ms all ease-in;
}

nav a:hover {
  background-size: 100% 100%;
}

.currentLink {
  background-size: 100% 100%;
}

/***************
 || Main
****************/
main {
  float: right;
  width: calc(100% - 23%);
  margin-top: 5rem;
}

main img {
  width: 100%;
  margin-bottom: 2rem;
}

main img:hover {
  cursor: pointer;
}

.vertical {
  width: 49%;
}

.vertical + .vertical {
  margin-left: 2%;
}

/***************
 || Modal
****************/
body.modal-open {
  height: 100vh;
  overflow-y: hidden;
  padding-right: 15px;
}

.modal {
  display: none;
  outline: 3px solid black;
  position: fixed;
  z-index: 50;
  width: 100%;
  background-color: hsla(0, 0%, 0%, 0.89);
  height: 100vh;
  text-align: center;
}

.modal--show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-header {
  position: fixed;
  top: 0;
  right: 3rem;
}

.modal-closeBtn {
  color: white;
  font-size: 5rem;
  cursor: pointer;
  transition: 300ms transform ease-in;
}

.modal-closeBtn:hover {
  color: #DAF402;
}

.modal-body {
  display: inline-block;
  width: 70%;
}

.modal-wrapper {
  display: inline-block;
  position: relative;
}

.modal-image {
  /* Prevents vertical images from growing too wide on Home*/
  max-width: 100%;
}

.modal-image--vertical {
  /* Prevents vertical images from growing too wide on Gallery */
  max-height: 100vh;
}

.watermark {
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
}

/***************
 || Utilities
****************/
.troubleshooting {
  outline: 1px solid red;
}

/*****************
 || Tablet Styles
******************/
@media only screen and (max-width: 880px) {
  .wrapper {
    padding: 2rem;
  }

  aside {
    display: flex;
    justify-content: center;
    align-items: center;
    position: initial;
    float: none;
    width: 100%;
  }

  aside img {
    width: 150px;
    height: 150px;
  }

  main {
    width: 100%;
    float: initial;
  }

  .modal-body {
    width: 100%;
  }

  .watermark {
    width: 100px;
  }
}

@media only screen and (max-width: 545px) {
  .wrapper {
    padding: 1rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  aside {
    font-size: 1.2rem;
  }

  aside img {
    width: 100px;
    height: 100px;
  }
}

@media only screen and (max-width: 350px) {
  aside {
    flex-direction: column;
  }

  aside img {
    width: 70%;
    height: auto;
  }

  .vertical {
    width: 100%;
  }

  .watermark {
    width: 50px;
  }

  .modal-closeBtn {
    font-size: 3rem;
  }
}

