/*
=============== 
Fonts
===============
*/
@import url("https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,700&display=swap");

/*
=============== 
Variables
===============
*/

:root {
  /* dark shades of primary color*/
  --clr-primary-1: hsl(43, 86%, 17%);
  --clr-primary-2: hsl(43, 77%, 27%);
  --clr-primary-3: hsl(43, 72%, 37%);
  --clr-primary-4: hsl(42, 63%, 48%);

  /* primary/main color */
  --clr-primary-5: hsl(42, 78%, 60%);

  /* lighter shades of primary color */
  --clr-primary-6: hsl(43, 89%, 70%);
  --clr-primary-7: hsl(43, 90%, 76%);
  --clr-primary-8: hsl(45, 86%, 81%);
  --clr-primary-9: hsl(45, 90%, 88%);
  --clr-primary-10: hsl(45, 100%, 96%);

  /* darkest grey - used for headings */
  --clr-grey-1: hsl(209, 61%, 16%);
  --clr-grey-2: hsl(211, 39%, 23%);
  --clr-grey-3: hsl(209, 34%, 30%);
  --clr-grey-4: hsl(209, 28%, 39%);
  /* grey used for paragraphs */
  --clr-grey-5: hsl(210, 22%, 49%);
  --clr-grey-6: hsl(209, 23%, 60%);
  --clr-grey-7: hsl(211, 27%, 70%);
  --clr-grey-8: hsl(210, 31%, 80%);
  --clr-grey-9: hsl(212, 33%, 89%);
  --clr-grey-10: hsl(210, 36%, 96%);
  --clr-white: #fff;
  --ff-primary: "Roboto", sans-serif;
  --ff-secondary: "Open Sans", sans-serif;
  --transition: all 0.3s linear;
  --spacing: 0.25rem;
  --radius: 0.5rem;
  --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  --max-width: 1170px;
}
/*
=============== 
Global Styles
===============
*/

*,
::after,
::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--ff-secondary);
  background: var(--clr-white);
  color: var(--clr-grey-1);
  line-height: 1.5;
  font-size: 0.875rem;
}
ul {
  list-style-type: none;
}
a {
  text-decoration: none;
}
img:not(.nav-logo) {
  width: 100%;
  display: block;
}
.nav-logo {
  width: 4rem;
  height: 4rem;
}

h1,
h2,
h3,
h4 {
  letter-spacing: var(--spacing);
  text-transform: capitalize;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  font-family: var(--ff-primary);
}
h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 0.875rem;
}
p {
  margin-bottom: 1.25rem;
  color: var(--clr-grey-5);
}
@media screen and (min-width: 800px) {
  h1 {
    font-size: 4rem;
  }
  h2 {
    font-size: 2.5rem;
  }
  h3 {
    font-size: 1.75rem;
  }
  h4 {
    font-size: 1rem;
  }
  body {
    font-size: 1rem;
  }
  h1,
  h2,
  h3,
  h4 {
    line-height: 1;
  }
}
/*  global classes */

.btn {
  text-transform: uppercase;
  background: var(--clr-primary-5);
  color: var(--clr-primary-1);
  padding: 0.375rem 0.75rem;
  letter-spacing: var(--spacing);
  display: inline-block;
  font-weight: 700;
  transition: var(--transition);
  font-size: 0.875rem;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
}
.btn:hover {
  color: var(--clr-primary-1);
  background: var(--clr-primary-7);
}
/* section */
.section {
  padding: 5rem 0;
}

.section-center {
  width: 90vw;
  margin: 0 auto;
  max-width: 1170px;
}
@media screen and (min-width: 992px) {
  .section-center {
    width: 95vw;
  }
}
/* added during recording */
.underline {
  width: 5rem;
  height: .25rem;
  margin-bottom: 1.25rem;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--clr-primary-5);
}
.section-title {
  margin-bottom: 2rem;
  text-align: center;
}

.bg-grey {
  background: var(--clr-grey-10);
}
/*
=============== 
Navbar
===============
*/
.nav-links {
  display: none;
}
.nav {
  height: 5rem;
  padding: 1rem;
  display: grid;
  align-items: center;
  transition: var(--transition);
}
.nav-center {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}
.nav-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.nav-btn {
  background: transparent;
  border-color: transparent;
  color: var(--clr-primary-5);
  font-size: 2rem;
  cursor: pointer;
  justify-self: end;
  /* justify-content: space-between; */
}
@media screen and (min-width: 768px) {
  .nav {
    background: var(--clr-primary-10);
  }
  .nav-btn {
    display: none;
  }
  .nav-center {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    
  }
  .nav-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
    -moz-column-gap: 2rem;
         column-gap: 2rem;
    justify-self: end;
    
  }
  .nav-links a {
    color: var(--clr-grey-1);
    transition: var(--transition);
    text-transform: capitalize;
    font-weight: bold;
    letter-spacing: var(--spacing);
  }
  .nav-links a:hover {
    color: var(--clr-primary-5);
  }
}
.navbar-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(-white);
  z-index: 2;
  box-shadow: var(--light-shadow);
}
/*
=============== 
Sidebar
===============
*/
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--clr-grey-10);
  z-index: 6;
  display: grid;
  /* justify-content: center;
  align-items: center; */
  place-items: center;
  transition: var(--transition);
  /* add later */
  transform: translateX(-100%); /* hidden sidebar*/
}
.show-sidebar {
  transform: translateX(0); /* show sidebar*/
}
.sidebar-links {
  text-align: center;
}
.sidebar-links a {
  font-size: 2rem;
  text-transform: capitalize;
  transition: var(--transition);
  color: var(--clr-grey-5);
  letter-spacing: var(--spacing);
  display: inline-block;
  margin-bottom: 1.5rem;
}
.sidebar-links a:hover {
  color: var(--clr-primary-5);
}
.social-icons {
  display: grid;
  margin-top: 5rem;
  width: 20rem;
  grid-template-columns: repeat(5, 1fr);
  justify-items: center;
}
.social-icon {
  font-size: 1.5rem;
  color: var(--clr-grey-1);
  transition: var(--transition);
}
.social-icon:hover {
  color: var(--clr-primary-5);
}
.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 3rem;
  background: transparent;
  border-color: transparent;
  transition: var(--transition);
  color: #bb2525;
  cursor: pointer;
}
.close-btn:hover {
  color: #e66b6b;
}
/*
=============== 
Hero
===============
*/
/* underline added to globals */
.hero-info .underline {
  margin-bottom: .5rem;
  margin-left: 0;
}
#myName {
  color: var(--clr-primary-5);
  font-weight: bold;
  text-transform: capitalize;
}

.hero-img {
  display: none;
}

.hero {
  background: var(--clr-primary-10);
}
.hero-center {
  min-height: calc(100vh - 5rem);
  display: grid;
  place-items: center;
}
.hero-info h4 {
  color: var(--clr-grey-5);
}
.hero-icons {
  justify-items: start;
}

.hero-btn {
  margin-top: 1.25rem;
}

@media screen and (min-width: 992px) {
  .hero-img,
  .about-img {
    display: block;
    position: relative;
  }
  .hero-img::before,
  .about-img::before {
    content: "";
    width: 100%;
    height: 100%;
    border: 0.25rem solid var(--clr-primary-5);
    border-radius: var(--radius);
    position: absolute;
    top: 2rem;
    left: 2rem;
  }
  .hero-center {
    grid-template-columns: 1fr 1fr;
  } 
}

.hero-photo {
  width: 1000px;
  height: 1500px;
  max-width: 25rem;
  max-height: 30rem;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: var(--radius);
  position: relative; /* to make the image and the img::before get back to the normal flow*/
}

/*
=============== 
About
===============
*/
/* section title added to globals */
.about-title {
  text-align: left;
  margin-bottom: 2rem;
}
.about-title .underline {
  margin-left: 0;
}
.about-center {
  display: grid;
  gap: 3rem 2rem;
}
.about-img {
  justify-self: center;
}

@media screen and (min-width: 992px) {
  .about-center {
    grid-template-columns: 1fr 1fr;
  }
  .about-info {
    align-self: center;
  }
  .about-img::before {
    left: -2rem;
  }
}


/*
=============== 
Services
===============
*/
/* bg-grey in globals */
/* small screen layout setup */
.service {
  background: var(--clr-white);
  text-align: center;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  transition: var(--transition);
}
.service p { 
  transition: var(--transition);
}
.service:hover {
  background: var(--clr-primary-5);
  color: var(--clr-white);
}
.service:hover p {
  color: var(--clr-white);
}
.service:hover .underline {
  background-color: var(--clr-white);
}
.service-icon {
  margin-bottom: 1.5rem;
  font-size: 2rem;
}
.service .underline {
  width: 3rem;
  height: .12rem;
  transition: var(--transition);
}

@media screen and (min-width: 676px) {
  .services-center {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    -moz-column-gap: 2rem;
         column-gap: 2rem;
  }
}
@media screen and (min-width: 992px) {
  .services-center {
    grid-template-columns: repeat(3, 1fr);
  }
}


/*
=============== 
Projects
===============
*/
.projects-text {
  width: 85%;
  max-width: 30rem;
  margin: 0 auto;
}
.project {
  position: relative;
  background: var(--clr-primary-5);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.project-info {
  text-align: center;
  color: var(--clr-white);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition);
  opacity: 0;
}

.project-info p {
  text-transform: capitalize;
  color: var(--clr-white);
}
.project:hover .project-info {
  opacity: 1;
}
.project-img {
  transition: var(--transition);
  border-radius: var(--radius);
  height: 15rem;
  -o-object-fit: cover;
     object-fit: cover;
}
.project:hover .project-img {
  opacity: .1;
}
.project::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: .25rem solid var(--clr-white);
  border-radius: var(--radius);
  transition: var(--transition);
  opacity: 0;
  
}
.project:hover::after {
  opacity: 1;
  transform: scale(.8);
}
@media screen and (min-width: 676px) {
  .projects-center {
    display: grid;
    grid-template-columns: 1fr 1fr;
    -moz-column-gap: 2rem;
         column-gap: 2rem;
  }
}
@media screen and (min-width: 992px) {
  .projects-center {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media screen and (min-width: 1170px) {
  .projects-center {
    grid-template-rows: 200px 200px;
    gap: 1rem;
    grid-template-areas:
      "a b b"
      "a c d";
  }
  .project-img {
    height: 100%;
  }
  .project {
    height: 100%;
    /* we have to set this property bz project-   is a link, and it is the parents of all the items inside, so we have to set the article with the class of project spread 100% of the project- */
  }
  .project-1 {
    grid-area: c;
  }
  .project-2 {
    grid-area: b;
  }
  .project-3 {
    grid-area: a;
  }
  .project-4 {
    grid-area: d;
  }
}
/*
=============== 
Connect
===============
*/
.connect {
  min-height: 40vh;
  position: relative;
  padding: 10rem 0 5rem 0;
  margin: 5rem 0;
  -webkit-clip-path: polygon(0 11%, 50% 0, 100% 14%, 100% 90%, 50% 100%, 0 90%);
  clip-path: polygon(0 11%, 50% 0, 100% 14%, 100% 90%, 50% 100%, 0 90%);
}

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  z-index: -2;
}
/* with z-index: -2 it will take the bottom on the stack */

.connect::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--clr-white);
  opacity: .7;
  /* background: rgba(0, 0, 0, 0.7); */
  z-index: -1;
}
/* in the middle */
.connect {
  display: grid;
  place-items: center;
}
.video-banner .section-title {
  margin-bottom: 2rem;
}
.video-text {
  max-width: 40rem;
}
.video-banner {
  background: var(--clr-primary-10);
  padding: 3rem 5rem 12rem 5rem;
  text-align: center;
  -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%);
  clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%);
}
/* on the top of the stack so you can see the content of this div */
/*
=============== 
Skills
===============
*/
@media screen and (min-width: 768px) {
  .skills-center {
    display: grid;
    grid-template-columns: 1fr 1fr;
    -moz-column-gap: 2rem;
         column-gap: 2rem;
  }
}
.skills {
  background: var(--clr-primary-9);
}

.skills h3 {
  margin: 1.5rem 0;
  color: var(--clr-primary-1);
}
.skill {
  margin-bottom: 1.25rem;
}
.skill p {
  margin-bottom: .5rem;
  text-transform: capitalize;
  color: var(--clr-primary-1);
}
.skill-container {
  width: 100%;
  height: 1rem;
  background: var(--clr-white);
  border-radius: var(--radius);
  position: relative;
}
.skill-value {
  position: absolute;
  width: 50%;
  height: 100%;
  background: var(--clr-primary-5);
  top: 0;
  left: 0;
  border-radius: var(--radius);
}
.value-70 {
  width: 70%;
}
.value-80 {
  width: 80%;
}
.value-100 {
  width: 100%;
}
.skill-text {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
}
.skill-text-70 {
  left: 70%;
}
.skill-text-80 {
  left: 80%;
}
.skill-text-100 {
  left: 97%;
}
/*
=============== 
Timeline
===============
*/
.timeline-center {
  width: 80vw;
  max-width: 40rem;
}
.timeline-item {
  border-top: 2px dashed var(--clr-primary-5);
  margin: 0;
  padding: 4rem 2rem;
  position: relative;
}
.timeline p {
  margin-bottom: 0;
}
.timeline-item:nth-child(even) {
  border-left: 2px dashed var(--clr-primary-5);
  border-top-left-radius: 2rem;
  border-bottom-left-radius: 2rem;
  margin-right: 2rem;
  padding-right: 0;
}
.timeline-item:nth-child(odd) {
  border-right: 2px dashed var(--clr-primary-5);
  border-top-right-radius: 2rem;
  border-bottom-right-radius: 2rem;
  margin-left: 2rem;
  padding-left: 0;
}
.timeline-item:first-child {
  border-top: none;
  border-top-right-radius: 0;
}
.timeline-item:last-child {
  border-bottom-left-radius: 0;
}
.number {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  margin-bottom: 0;
  background: var(--clr-primary-5);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--clr-grey-1);
  font-weight: bold;
}
.timeline-item:nth-child(even) .number {
  left: 0;
}
.timeline-item:nth-child(odd) .number {
  left: 100%;
}
/*
=============== 
Blog
===============
*/
.blog {
  background: var(--clr-grey-10);
}
.card {
  height: 27rem;
  position: relative;
  /* talk later */
  perspective: 1500px;
 
}
.card-side {
  transition: all 1s linear;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  position: absolute;
  top:0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  -webkit-transform: translate3d(0,0,0);
  visibility: visible;
}
.card-front {
  background: var(--clr-white);
  
}
.card-back {
  background: green;
  transform: rotateY(180deg);
  background: var(--clr-primary-10);
  display: grid;
  place-items: center;
}
.card:hover .card-front {
  transform: rotateY(-180deg);
}
.card:hover .card-back {
  transform: rotateY(0);
}
/* rest of the styles */
.card-info {
  padding: 1rem 1.5rem;
}
.card-front img{
  height: 13rem;
  -o-object-fit: cover;
     object-fit: cover;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.card-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}
.card-footer img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}
.card-footer p {
  margin-bottom: 0;
  text-transform: uppercase;
  justify-self: end;
  color: var(--clr-primary-5);
  font-size: .85rem;
}
.blog-center {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 3rem 1rem;
}

/*
=============== 
Footer
===============
*/
.footer {
  padding-bottom: 2rem;
  background: #222;
  display: grid;
  place-items: center;
}
.footer .social-icons {
  margin-bottom: 2rem;
  
}
.footer .social-icon {
  color: var(--clr-primary-5);
  transition: var(--transition);
}
.footer .social-icon:hover {
  color: var(--clr-primary-10);
}
.footer p {
  font-size: 1.25rem;
  text-transform: capitalize;
}
/*
=============== 
Single Page
===============
*/
.single-page {
  background: var(--clr-primary-10);
  min-width: calc(100vh - 5rem - 198px);
}
.page-info {
  max-width: 700px;

}
.page-info a {
  text-transform: uppercase;
  color: var(--clr-primary-5);
  transition: var(--transition);
  
}
.page-info a:hover {
  color: var(--clr-primary-1);
}
/*
=============== 
Products Page
===============
*/
.projects-hero {
  height: 40vh;
  background: var(--clr-primary-10);
  display: grid;
  place-items: center;
}

.projects-hero .section-title {
  margin-bottom: 0;
}

.single-project {
  background: var(--clr-grey-10);
  border-radius: var(--radius);
}
.project-container img {
  border-top-right-radius: var(--radius);
  border-top-left-radius: var(--radius);
}
.project-container {
  position: relative;
}
.project-icon {
  position: absolute;
  font-size: 1.75rem;
  color: var(--clr-primary-1);
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  background: var(--clr-primary-5);
  border-radius: 50%;
  border: .375rem solid var(--clr-grey-10);
}
.project-details {
  padding: 2rem 1.5rem;
}
.project-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: var(--clr-primary-5);
  
}

.project-details a {
  color: var(--clr-primary-5);
  text-transform: uppercase;
  transition: var(--transition);
  justify-self: end;
} 
.project-details a:hover {
  color: var(--clr-primary-1);
}

.projects-page-center {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 3rem 1rem;
}
