/* Ultimate Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
} /* (*) Selects all the elements in this file */

/* Main Container General Settings for CSS */

*::selection {
  background: var(--main-color);
  color: #fff;
}

html,
body {
  background-color: #fff;
  color: #373a3c;
  font-family: 'Alegreya Sans', sans-serif;
  font-size: 1em;
  line-height: 1.5;
  --main-color: #2c2cd9;
  --secondary-color: #f6f6f6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: .5rem
}

p {
  margin: 0.7rem 0;
}

.main-container h2 {
  margin-top: 1em;
}

.main-container hr {
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  margin: 1em auto;
  width: 50%;
}

/* Main Nav for CSS */

.main-nav {
  color: rgba(255,255,255,0.8);
  transition: color 0.3s;
}

.main-nav li:hover {
  color: rgba(255,255,255,1.0);
  transition: color 0.3s;
}

.main-header {
  color: #fff;
}

.main-nav {
  background-color: rgba(21,31,33,0.5);
  border-bottom: 1px solid #dedede;
  display: flex;
  font-weight: 100;
  justify-content: space-between;
  padding: 15px 25px;
  position: fixed;
  width: 100%;
  text-transform: uppercase;
  top: 0;
  z-index: 1000;
}

.main-nav img {
  height: auto;
  max-width: 100%;
}

.main-nav ul {
  background-color: rgba(21,31,33,0.5);
  display: none;
  font-size: 1.1em;
  left: 0;
  list-style: none;
  padding: 1em;
  position: absolute;
  top: 70px;
  width: 100%;
}

.main-nav i {
  cursor: pointer;
}

#my-resume-download-button {
  display: inline-block;
  margin-left: 10px;
}

/* Main Header for CSS */

.main-header {
  background: linear-gradient( rgba(0,0,0,0.4), rgba(0,0,0,0.4) ), url('../images/ciruits.jpg') center center no-repeat;
  background-size: cover;
  height: 100vh;
  min-height: 300px;
  padding: 35vh 1em 0;
  text-align: center;
}

.main-header img {
  width: 80%;
}

.main-header h1 {
  text-transform: uppercase;
}

.main-header p {
  font-size: 1.25rem;
}

.main-header i {
  margin-top: 2.5rem;
}

/* Main Containers for CSS */

.network,
.social,
.mechanical-skills-block,
.technological-skills-block,
.projects,
.reasons-to-employ-me,
.project-summary-container,
.mechanical-used-container,
.technological-used-container,
.main-footer {
  padding: 3em 1em;
  text-align: center;
}

/* Network for CSS */

.network {
  background-color: var(--secondary-color);
}

.network img {
  height: auto;
  margin-top: 2em;
  width: 100%;
}

/* Social for CSS */

.social-container {
  color: var(--main-color);
  display: flex;
  flex-direction: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.625rem;
}

.social-container i {
  border: 2px solid var(--main-color);
  border-radius: 30%;
  font-size: 1.6rem;
  height: 3.75rem;
  margin: 0.35rem;
  padding-top: 0.9375rem;
  transition: background-color 0.5s, color 0.5s ease-in-out;
  width: 3.75rem;
}

.social-container i:hover {
  background-color: var(--main-color);
  color: #fff
}

/* Mechanical Skills */

.mechanical-skills {
  background-color: var(--secondary-color);
}

.mechanical-skills-container {
  align-items: center;
  display: grid;
  grid-gap: 2px;
  grid-template-columns: repeat(4,1fr);
  grid-template-rows: repeat(2,1fr);
  justify-content: center;
}

.mechanical-skills-container p {
  background-color: var(--main-color);
  border: 1px solid var(--main-color);
  border-radius: 3px;
  color: #fff;
  font-weight: 600;
  padding: 0.5em;
  transition: background-color 0.5s, color 0.5s;
}

.mechanical-skills-container p:hover {
  background-color: #fff;
  color: var(--main-color);
  transition: background-color 0.5s, color 0.5s;
}

.mechanical-skills-container i {
  margin-left: 1em;
}

.mechanical-skills-container p:nth-child(1) {
  grid-area: 1 / 1 / 1 / 2;
}

.mechanical-skills-container p:nth-child(2) {
  grid-area: 1 / 2 / 1 / 3;
}

.mechanical-skills-container p:nth-child(3) {
  grid-area: 1 / 3 / 1 / 4;
}

.mechanical-skills-container p:nth-child(4) {
  grid-area: 1 / 4 / 1 / 5;
}

.mechanical-skills-container p:nth-child(5) {
  grid-area: 2 / 1 / 2 / 3;
}

.mechanical-skills-container p:nth-child(6) {
  grid-area: 2 / 3 / 2 / 5;
}

.mechanical-skills-container p:nth-child(7) {
  grid-area: 3 / 1 / 3 / 3;
}

.mechanical-skills-container p:nth-child(8) {
  grid-area: 3 / 3 / 3 / 5;
}

/* Technological Skills */

.technological-skills {
  background-color: #fff;
}

.technological-skills-container {
  align-items: center;
  display: grid;
  grid-gap: 2px;
  grid-template-columns: repeat(6,1fr); /* RULE is 4n+1*/
  grid-template-rows: repeat(2,1fr);
  justify-content: center;
}

.technological-skills-container p {
  background-color: var(--main-color);
  border: 1px solid var(--main-color);
  border-radius: 3px;
  color: #fff;
  font-weight: 600;
  padding: 0.5em;
  transition: background-color 0.5s, color 0.5s;
}

.technological-skills-container p:hover {
  background-color: #fff;
  color: var(--main-color);
  transition: background-color 0.5s, color 0.5s;
}

.technological-skills-container i {
  margin-left: 1em;
}

.technological-skills-container p:nth-child(1) {
  grid-area: 1 / 1 / 1 / 3;
}

.technological-skills-container p:nth-child(2) {
  grid-area: 1 / 3 / 1 / 5;
}

.technological-skills-container p:nth-child(3) {
  grid-area: 1 / 5 / 1 / 7;
}

.technological-skills-container p:nth-child(4) {
  grid-area: 2 / 1 / 2 / 3;
}

.technological-skills-container p:nth-child(5) {
  grid-area: 2 / 3 / 2 / 5;
}

.technological-skills-container p:nth-child(6) {
  grid-area: 2 / 5 / 2 / 7;
}

.technological-skills-container p:nth-child(7) {
  grid-area: 3 / 1 / 3 / 4;
}

.technological-skills-container p:nth-child(8) {
  grid-area: 3 / 4 / 3 / 7;
}

/* Projects for CSS */

.projects-content {
  text-align: left;
}

.projects h2 {
  text-transform: capitalize;
  text-align: center;
}

.projects hr {
  margin: 1em 0;
  margin-left:35%;
  margin-right:35%;
}

.projects-item {
  border-radius: 50%;
  margin: 1rem auto;
}

.project-image {
  position: relative;
}

.projects img {
  display: block;
  height: auto;
  width: 100%;
}

.project-image-overlay {
  background: rgba(0, 0, 0, 0.5) url('../images/magnifying-glass.png') center center no-repeat;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.project-image-overlay:hover {
  opacity: 1;
}

.project-description {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  border-left: 1px solid rgba(0,0,0,0.1);
  border-right: 1px solid rgba(0,0,0,0.1);
  margin-top: -2rem;
  padding: 2rem 1rem 0.5rem 1rem;
}

/* Reasons To Employ */

.reasons-to-employ-me {
  background-color: #fff;
}

.reasons-container {
  margin: 2rem 0.5rem;
}

.reasons-to-employ-me i {
  color: var(--main-color);
  margin-bottom: 0.3em;
}

/* Project Cont. for CSS */

.project-main-container hr {
  background-color: var(--main-color);
  height: 2px;
}

.project-main-container img {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  height: auto;
  margin: 1em 0 2em;
  max-width: 100%;
  transition: transform .3s;
}

.project-main-container img:hover {
  transform: scale(1.1);
  transition: transform 0.3s;
}

.project-summary i {
  margin-left: 0.5rem;
}

.project-main-container .main-button {
  border: none;
  display: inline-block;
  margin: 0 0.5rem;
  padding: 0.5rem
}

.project-summary {
  background-color: #2C3339;
  color: #fff;
}

.project-summary-image-container div {
  display: flex;
}

#hide-element {
  display: none;
}

.technological-used-content-container ul {
  margin: 0 auto;
  padding-left: 1rem;
  text-align: left;
  width: 140px;
}

.back-to-projects {
  display: inline-block;
  font-size: 1.2rem;
  margin-top: 1rem;
  transition: margin-right .3s;
}

.back-to-projects:hover {
  margin-right: 1rem;
  transition: margin-right .3s;
}

.back-to-projects i {
  margin-right: 1rem;
}

/* Main Footer for CSS */

.main-footer {
  background-color: #484848;
  color: #fff;
}

.main-footer ul {
  list-style: none;
}

.footer-about-me-content {
  margin-bottom: 1em;
}

.footer-about-me-content i {
  margin-right: 10px;
}

.footer-social-icons i {
  margin: 0 0.5em;
  transition: color 0.3s;
}

.footer-social-icons i:hover {
  color: #5bc0de;
  transition: color 0.3s;
}

.footer-contact {
  margin-top: 1em;
}

.footer-contact-container {
  align-items: center;
  display: flex;
  justify-content: center;
}

.footer-contact i {
  margin-right: 0.5em;
}

/* Links for CSS */

a:link,
a:visited {
  color: inherit;
  text-decoration: none;
}

/* Animations for CSS Style */

.fade-in-up {
  animation-name: fade-in-up;
  animation-duration: 1s;
  animation-delay: .5s;
  animation-fill-mode: forwards;
  opacity: 0;
}

.fade-in {
  animation-name: fade-in;
  animation-duration: 1s;
  animation-delay: .5s;
  animation-fill-mode: forwards;
  opacity: 0;
}

.long-fade-in {
  animation-name: long-fade-in;
  animation-duration: 4s;
}

.fade-in-left {
  animation-name: fade-in-left;
  animation-duration: 1s;
  animation-delay: .5s;
  animation-fill-mode: forwards;
  opacity: 0;
}

.fast-fade-in-left {
  animation-name: fast-fade-in-left;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  opacity: 0;
}

.delayed-fade-in-left {
  animation-name: delayed-fade-in-left;
  animation-duration: .5s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
  opacity: 0;
}

.fast-fade-in-right {
  animation-name: fast-fade-in-right;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  opacity: 0;
}

.delay-1 {
  animation-delay: 100ms;
}

.delay-2 {
  animation-delay: 200ms;
}

.delay-3 {
  animation-delay: 300ms;
}

.delay-4 {
  animation-delay: 400ms;
}

.swing {
  animation-name: swing;
  animation-duration: 1s;
  animation-delay: 1s;
  transform-origin: top center;
}

.zoom-in {
  animation-name: zoom-in;
  animation-duration: 1s;
  animation-delay: .5s;
  animation-fill-mode: forwards;
  opacity: 0;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes long-fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fade-in-left {
  0% {
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fast-fade-in-left {
  from {
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes delayed-fade-in-left {
  0% {
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
  }

    50% {
      opacity: .25;
    }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fast-fade-in-right {
  from {
    opacity: 0;
    transform: translate3d(100%, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}


@keyframes swing {
  20% {
    transform: rotate3d(0, 0, 1, 15deg);
  }

  40% {
    transform: rotate3d(0, 0, 1, -10deg);
  }

  60% {
    transform: rotate3d(0, 0, 1, 5deg);
  }

  80% {
    transform: rotate3d(0, 0, 1, -5deg);
  }

  to {
    transform: rotate3d(0, 0, 1, 0deg);
  }
}

@keyframes zoom-in {
  from {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }

  50%,
  100% {
    opacity: 1;
  }
}

/* Website inconsistent Adding features for stabilization */

.main-button {
  background-color: var(--main-color);
  border: 1px solid var(--main-color);
  border-radius: 3px;
  color: #fff;
  padding: .6rem;
  transition: background-color 0.5s, color 0.5s, border-color 0.5s;
  width: 50%;
}

.main-button:hover {
  background-color: #fff;
  color: var(--main-color);
  border-color: var(--main-color);
}

.heavy {
  font-size: 1.3rem;
  font-weight: 300;
}

.uppercase {
  text-transform: uppercase;
}

.main-header-side-content,
.hide {
  display: none;
}

/* Media Queries for CSS */ /*<<<<<<<<<<<<<<<<<* */

/* Smartphones (portrait and landscape) ----------- */
/*@media only screen 
and (min-device-width : 480px) 
and (max-device-width : 768px) {*/
@media only screen and (min-width: 768px) {
  
  .main-container hr {
    width: 30%;
  }

  /* Main Header for CSS RESTRUCTURE */

  .main-header {
    padding: 24em 2em 0;
  }

  .main-header-container {
    margin: 0 auto;
    max-width: 500px;
  }

  /* Main Nav for CSS RESTRUCTURE */

  .main-nav {
    padding: 0;
  }

  .main-nav i {
    display: none;
  }

  .main-nav img {
    padding: 13px 0 0 25px;
  }

  .main-nav ul {
    background: none;
    display: flex;
    flex-wrap: wrap;
    margin-left: auto;
    padding: 15px 25px;
    position: static;
    width: auto;
    top: 0;
  }

  .main-nav li {
    margin: 0 1em;
  }

  /* Containers for CSS RESTRUCTURE */

  .network,
  .social,
  .mechanical-skills-block,
  .technological-skills-block,
  .projects,
  .reasons-to-employ-me,
  .project-summary-container,
  .mechanical-used-container,
  .technological-used-container,
  .main-footer {
    padding: 10% 7%;
  }

  /* Network for CSS RESTRUCTURE */

  .network img {
    margin: 0;
  }

  /* Personal Projects for CSS RESTRUCTURE */

  .projects-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    grid-gap: 1em;
  }

  /* Project for CSS RESTRUCTURE */

  .project-main-container hr {
    background: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
  }

  .project-summary hr {
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }

  .project-summary-content-container,
  .mechanical-used-content-container,
  .technological-used-content-container {
    display: flex;
    justify-content: space-between;
  }

  .mechanical-content-used-container,
  .technological-content-used-container {
    flex-wrap: wrap;
  }

  .project-summary-content-container p,
  .mechanical-used-content-conatainer p,
  .mechanical-used-content-container ul,
  .technological-used-content-container p,
  .technological-used-content-container ul {
    border-left: 3px solid var(--main-color);
    flex: 1 50%;
    margin-right: 0.5rem;
    padding-left: 1rem;
    text-align: left;
  }

  .project-summary-image-container,
  .mechanical-used-content-conatainer img,
  .technological-used-content-container img {
    flex: 1 50%;
  }

  .project-main-container .main-button {
    margin: 0;
  }

  .mechanical-used-content-container,
  .technological-used-content-container {
    align-items: center;
    flex-direction: row-reverse;
  }

  .project-summary-content-container p,
  .mechanical-used-content-container p,
  .mechanical-used-content-container ul,
  .technological-used-content-container p,
  .technological-used-content-container ul {
    display: block;
    height: 3%;
  }

  .mechanical-used-content-container ul,
  .technological-used-content-container ul {
    margin: 0;
    padding-left: 2rem;
  }

  .mechanical-used-content-container img,
  .technological-used-content-container img {
    margin-right: 1rem;
    max-height: 300px;
    max-width: 100%;
  }

  /* Main Footer for CSS RESTRUCTURE */

  .main-footer-container {
    display: flex;
    flex-direction: row;
  }

  .main-footer-content,
  .main-footer-contact {
    flex: 1 50%;
    margin: 0 15px;
  }

  .footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0;
  }
}

@media only screen and (min-width: 768px) {
  /* Main for CSS RESTURCTURE */
  .main-container h2 {
    margin: 0;
  }


  /* Container for CSS RESTRUCTURE */

  .network,
  .social-content-container,
  .main-footer-container {
    text-align: left;
  }

  .network,
  .social,
  .mechanical-skills-block,
  .technological-skills-block,
  .projects,
  .reasons-to-employ-me,
  .project-summary-container,
  .mechanical-used-container,
  .technological-used-container,
  .main-footer {
    padding: 10% 9%;
  }

  .network hr,
  .social hr {
    margin: 1em 0;
    width: 50%;
  }

  /* Main for Header CSS */

  .main-header {
    padding: 19rem 2em 0;
  }

  .main-header-container {
    display: flex;
    justify-content: space-around;
    margin: 0 auto;
    max-width: 1040px;
    text-align: left;
  }

  .main-header-content,
  .main-header-side-content {
    flex: 1 50%;
  }

  .main-header img {
    max-width: 80%;
  }

  .main-header-side-content {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    display: block;
    height: 100%;
    margin-top: 0;
    padding: 1.5em;
    text-align: center;
  }

  .main-header-side-content button {
    background: none;
    border: 1px solid #5bc0de;
    border-radius: 6px;
    color: #5bc0de;
    cursor: pointer;
    font-size: 1.2em;
    margin: 1em 0;
    padding: .4rem;
    transition: background-color 0.5s, color 0.5s;
    width: 90%;
  }

  .main-header-side-content button:hover {
    background-color: #5bc0de;
    color: #fff;
    transition: background-color 0.5s, color 0.5s;
  }

  /* Network for CSS RESTRUCTURE */

  .network-block {
    display: flex;
    justify-content: space-between;
  }

  .network-container,
  .network-image-container {
    flex: 1 50%;
  }

  .network-container {
    margin-right: 1em;
  }

  .network-more-info {
    border: 5px solid var(--main-color);
    border-radius: 10px;
    height: auto;
    max-width: 90%;
  }

  /* Social for CSS RESTRUCTURE */

  .social {
    display: flex;
    justify-content: space-between;
  }

  .social-container {
    margin-top: 0;
  }

  /* Reasons To Employ Me for CSS RESTRUCTURE */

  .reasons-to-employ-me-block {
    display: flex;
  }

  .reasons-container {
    align-self: flex-end;
    flex: 1 33%;
  }

  .reasons-container h3 {
    font-size: 1.7rem;
  }

  /* Projects for CSS */

  .project-main-container .main-button {
    margin: 0 0.5rem;
  }

  .mechanical-used-content-conatiner ul,
  .technological-used-container ul {
    width: 100%;
  }

  .projects{
    background-color: var(--secondary-color);
  }

  .projects-container {
    grid-template-columns: repeat(3, 1fr);
  }

  @media only screen and (min-width: 1224px) {
    /* Container for CSS RESTRUCTURE */
    .network,
    .social,
    .mechanical-skills-block,
    .technological-skills-block,
    .projects,
    .reasons-to-employ-me,
    .project-summary-container,
    .technological-used-container,
    .main-footer {
      padding: 6% 10%;
    }

    .main-header-container {
      max-width: 1040px;
    }

    .network-block,
    .social,
    .mechanical-skills-block,
    .technological-skills-block,
    .projects-content,
    .projects-container,
    .reasons-to-employ-me-content,
    .reasons-to-employ-me-block,
    .project-summary-container,
    .technological-used-container,
    .main-footer-container {
      margin: 0 auto;
      max-width: 80%;
    }

    /* projects for CSS */
    .projects-container {
      grid-gap: 25px;
      grid-template-columns: repeat(3, 1fr);
    }

    .project-summary-image-container {
      max-width: 400px;
    }
  }

  @media only screen and (orientation: landscape) {
    .main-header {
      min-height: 500px;
      padding-top: 35vh;
    }
  }
}