/* 
  Source: https://type-scale.com/ 
  Base size: 16px (100%)
  Scale: 1.250 - Major Third
*/

html {
  font-size: 100%;
}

html body {
  font-weight: 400;
  line-height: 1.75;
}

body p {
  margin-bottom: 1rem;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 3rem 0 1.38rem;
  font-weight: 400;
  line-height: 1.3;
}

h1 {
  margin-top: 0;
  font-size: 3.052rem;
}

h2 {
  font-size: 2.441rem;
}

h3 {
  font-size: 1.953rem;
}

h4 {
  font-size: 1.563rem;
}

h5 {
  font-size: 1.25rem;
}

/* Own styles */
/* Common styles start */
html {
  scroll-behavior: smooth
}

body {
  font-family: 'Merriweather', serif;
  color: rgba(17, 17, 17, 0.9);
}

a {
  text-decoration: none;
  color: unset;
}

h1,
h2,
h3 {
  font-family: 'Lato', sans-serif;
}

body>header {
  height: 10vh;
  padding: 0 10vw;
  position: sticky;
  top: 0;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  color: #102542;
  z-index: 1;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

body>header a.logo {
  display: flex;
}

nav {
  width: 20vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

footer p {
  color: #102542;
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: .5rem;
  text-align: center;
}

footer div {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

footer div a {
  margin: 0 1rem 1rem 1rem;
}

/* Common styles end */
/* Home page styles start */

.intro {
  min-height: 12vh;
  /* width: 80vw; */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 5vh 10vw;
}

.avatar {
  width: 25rem;
  height: 25rem;
  background: url("./images/bighead.svg") no-repeat;
  display: inline-block;
  transition: all 1s;
  margin-top: -5vh;
  filter: drop-shadow(2px 4px 8px #585858);
}

/* Source for avatar flip on hover:
   https://www.tutorialrepublic.com/faq/how-to-change-image-on-hover-with-css.php */

div.avatar:hover {
  background: url("./images/bighead_no_mask.svg") no-repeat;
}

h1.tagLine {
  color: #102542;
}

.portfolio {
  margin: 10vh auto 4vh auto;
  width: 80vw;
  display: flex;
  flex-direction: column;
}

.portfolio>div {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  padding: 2rem;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
  background-color: rgba(183, 211, 242, 0.4);
}

.portfolio>div:nth-child(even) {
  flex-direction: row-reverse;
  background-color: rgba(44, 246, 179, 0.2);
}

.portfolio a {
  padding: 1rem 2rem;
  border-radius: 1rem;
}

.portfolio a:hover {
  transform: scale(1.05);
  transition: all .2s;
}

.portfolio a.demoBtn {
  color: #102542;
  background-color: #2CF6B3;
  margin: 1rem 0;
  width: 10rem;
  text-align: center;
}

.portfolio a.demoBtn:hover {
  filter: brightness(105%);
  transform: scale(1.1);
}

.portfolio a.repoBtn {
  background-color: #CE2D4F;
  color: whitesmoke;
  width: 10rem;
  text-align: center;
}

.portfolio a.repoBtn:hover {
  filter: brightness(105%);
  transform: scale(1.1);
}

.portfolio>div>div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portfolio img {
  width: 45rem;
  height: auto;
  border-radius: .5rem;
}

.portfolio img:hover {
  filter: brightness(.8) contrast(1.2);
}

.portfolio h3+h5 {
  margin-top: 0;
}

.contact {
  width: 100%;
  background-color: rgba(183, 211, 242, 0.4);
  padding: 2rem;
}

.contact input {
  font-family: 'Merriweather', serif;
}

.getInTouch {
  width: 80%;
  margin: 2rem auto;
}

.sendMsg {
  width: 80%;
  margin: 2rem auto;
}

.hidden {
  display: none;
}

label span {
  color: #767676ca
}

.contact textarea {
  height: 15rem;
  width: 45vw;
  font-family: 'Merriweather', serif;
  padding: .5rem 1rem;
}

.basicInfo {
  display: flex;
  justify-content: space-between;
  width: 45vw;
  margin-bottom: 2rem;
}

.basicInfo>p {
  display: flex;
  flex-direction: column;
}

.basicInfo input {
  padding: .5rem 1rem;
  width: 15vw;
}

.basicInfo input[type=email] {
  width: 25vw;
}

.contact button {
  background-color: #102542;
  color: whitesmoke;
  border: none;
  padding: 1rem 2rem;
  margin-top: 1rem;
}

.contact button:hover {
  filter: brightness(105%);
  transform: scale(1.05);
  transition: all .2s;
  cursor: pointer;
}

/* Home page styles end */
/* Blog home page styles start */
nav a.currentSection {
  font-size: 1.25rem;
  font-weight: bold;
}

.blogIntro {
  width: 80%;
  margin: 10vh auto;
  height: 20vh;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}

.mobileOnly {
  display: none;
}

.blogList {
  padding: 5vh 20vw;
  display: flex;
  flex-direction: column;
  background-color: rgba(183, 211, 242, 0.4);
}

.blogList>h2 {
  margin-top: 0;
}

.blogList>div {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 1.5rem 0;
  padding: 2rem;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
}

.blogList>div:nth-child(even) {
  flex-direction: row-reverse;
}

.blogList>div img {
  width: 25vw;
}

.blogList>div>a {
  margin: 0 1.5rem;
}

.blogList>div:nth-child(even)>a {
  margin-left: 0;
}

.blogList a:hover {
  color: hsla(212, 69%, 43%, 0.9);
  ;
  text-decoration: underline;
}

.blogList a:nth-child(1):hover {
  transform: scale(1.05);
  transition: all .2s;
}

/* Blog home page styles end */
/* Blog posts styles start */
article {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 70vh;
  padding: 5rem 30vw;
  background-color: rgba(183, 211, 242, 0.4);
}

article header {
  width: 70ch;
  color: #102542;
}

article header time {
  color: rgba(17, 17, 17, 0.9);
}

article>section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 70ch;
}

article>section a {
  color: hsl(203deg 89% 33%);
}

article>section p {
  font-size: 1.25rem;
  line-height: 2;
}

/* Blog posts styles end */

/* Media queries start */
/* Lower resolution computer & laptop monitors */
@media (min-width:900px) and (max-width:1600px) {
  body>header {
    height: 14vh;
  }

  .blogList {
    padding: 10vh 15vw;
  }

  article {
    min-height: 70vh;
    padding: 3rem 25vw;
  }
}

/* iPad and iPad Pro */
@media (max-width:850px) {
  nav {
    width: 33vw;
  }

  .intro {
    padding: 8vh 5vw 5vh;
  }

  .blogIntro {
    align-items: flex-start;
  }

  .blogList>div,
  .blogList>div:nth-child(even) {
    flex-direction: column;
  }

  .blogList>div img {
    width: 100%;
  }

  article {
    padding: 2rem 20vw;
  }

  article header,
  article section {
    width: 60vw;
  }
}

/* Mobile */
@media (max-width:500px) {
  body>header {
    height: 15vh;
    padding: 0 5vw;
  }

  nav {
    width: 65vw;
    justify-content: space-evenly;
  }

  .intro {
    padding: 8vh 5vw 5vh;
  }

  .avatar {
    margin-top: -10vh;
    width: 100vw;
  }

  .portfolio {
    width: 90vw;
    margin-bottom: 2vh;
  }

  .portfolio a {
    padding: 1rem;
  }

  .portfolio>div,
  .portfolio>div:nth-child(even) {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .5rem 0;
  }

  div.itemDetails {
    padding-left: 10vw;
    padding-bottom: 4vh;
  }

  .contact {
    padding: 1rem;
  }

  .getInTouch,
  .sendMsg,
  .basicInfo {
    width: 90%;
  }

  .basicInfo {
    flex-direction: column;
    margin-bottom: 0;
  }

  .basicInfo>p {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
  }

  .basicInfo input[type=email],
  .basicInfo input[type=text] {
    width: 80vw;
  }

  .contact textarea {
    height: 10rem;
    width: 80vw;
  }

  /* Blog home start*/
  .blogIntro {
    width: 85%;
    height: 50vh;
    align-items: flex-start;
  }

  .mobileOnly {
    display: unset;
  }

  .blogList {
    padding: 5vh 10vw;
  }

  .blogList>div,
  .blogList>div:nth-child(even) {
    flex-direction: column;
  }

  .blogList>div img {
    width: 100%;
  }

  /* Blog home end*/
  /* Blog posts start*/
  article {
    padding: 2rem 10vw;
  }

  article header,
  article section {
    width: 80vw;
  }

  article header h1 {
    font-size: 1.953rem;
  }

  article>section p {
    font-size: 1rem;
    line-height: 1.75;
  }

  /* Blog posts end*/
}

@media (max-width:400px) {
  .blogIntro {
    width: 92%;
  }
}