/*
===============
Fonts
===============
*/
@font-face {
  font-family: "Vazir";
  src: url("../fonts/vazir/Vazir-FD-WOL.eot");
  src: url("../fonts/vazir/Vazir-FD-WOL.woff") format("woff"),
    url("../fonts/vazir/Vazir-FD-WOL.woff2") format("woff2"),
    url("../fonts/vazir/Vazir-FD-WOL.ttf") format("truetype");
  font-style: normal;
  font-weight: normal;
}

/*
===============
Global Settings
===============
*/
:root {
  --clr-primary-1: #2f3e46;
  --clr-primary-2: #354f52;
  --clr-primary-3: #52796f;
  --clr-primary-4: #84a98c;
  --clr-primary-5: #cad2c5;
  --clr-grey-1: #102a42;
  --clr-grey-2: #617d98;
  --clr-grey-3: rgb(241, 245, 248);
  --clr-white: #fff;
  --ff-primary: "Vazir", sans-serif;
  --transition: all 0.3s linear;
  --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;
}

*,
::after,
::before {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--ff-primary);
  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 {
  width: 100%;
  display: block;
}

h1,
h2,
h3,
h4 {
  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.5rem;
  color: var(--clr-grey-2);
}

/*
===============
Global Classes
===============
*/
.btn {
  background: var(--clr-primary-2);
  color: var(--clr-white);
  padding: 0.375rem 0.75rem;
  display: inline-block;
  transition: var(--transition);
  font-size: 0.875rem;
  font-family: var(--ff-primary);
  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-3);
}

.section-center {
  width: 90vw;
  margin: 0 auto;
  max-width: var(--max-width);
}

.underline {
  width: 5rem;
  height: 0.25rem;
  background-color: var(--clr-primary-2);
  margin-bottom: 1.25rem;
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: 5rem 0;
}

.bg-grey {
  background-color: var(--clr-grey-3);
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

/*
===============
Media Queries
===============
*/
@media screen and (min-width: 992px) {
  .section-center {
    width: 95vw;
  }
}

@media screen and (min-width: 800px) {
  h1 {
    font-size: 4rem;
  }
  h2 {
    font-size: 2.5rem;
  }
  h3 {
    font-size: 1.75rem;
  }
  h4 {
    font-size: 1rem;
  }
  h1,
  h2,
  h3,
  h4 {
    line-height: 1;
  }
  body {
    font-size: 1rem;
  }
}

/*
===============
Navbar
===============
*/
.nav {
  display: flex;
  align-items: center;
  height: 4.5rem;
  background-color: var(--clr-primary-5);
  padding: 1rem;
  z-index: 3;
}

.nav-links {
  display: none;
}

.nav-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-content: space-between;
}

.nav-header h3 {
  margin-bottom: 0;
  font-size: 1.75rem;
  color: var(--clr-primary-1);
}

.nav-toggle {
  justify-self: end;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--clr-primary-1);
  font-size: 2rem;
  transition: var(--transition);
}

.nav-center {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .nav-center {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .nav-toggle {
    display: none;
  }
  .nav-links {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-items: center;
    justify-self: end;
    -moz-column-gap: 2rem;
         column-gap: 2rem;
  }
  .nav-item a {
    position: relative;
    color: var(--clr-grey-1);
    transition: var(--transition);
  }
  .nav-item a:hover {
    color: var(--clr-primary-4);
  }
  .nav-item a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.758rem;
    width: 0;
    height: 0.1rem;
    transform: translateX(-50%);
    background-color: var(--clr-primary-3);
    transition: all 0.3s linear;
  }
  .nav-item a:hover::after {
    width: 100%;
  }
}

.navbar-scrolled {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  box-shadow: var(--light-shadow);
  background-color: var(--clr-white);
}

/*
===============
Sidebar
===============
*/
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background-color: var(--clr-grey-3);
  z-index: 999;
  display: grid;
  /* justify-content: center;
  align-items: center; */
  place-content: center;
  transform: translateX(100%);
  transition: var(--transition);
}

.show-sidebar {
  transform: translateX(0);
}

.close-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  border: none;
  background-color: transparent;
  font-size: 3rem;
  color: #bb2525;
  cursor: pointer;
  transition: var(--transition);
}

.close-btn:hover {
  color: #e66b6b;
}

.sidebar-links {
  display: grid;
  justify-items: center;
  align-items: center;
  row-gap: 1rem;
  margin-bottom: 3rem;
  font-size: 1.5rem;
}

.sidebar-links a {
  color: var(--clr-grey-2);
  transition: var(--transition);
  cursor: pointer;
}
.sidebar-links a:hover {
  color: var(--clr-primary-4);
}

.social-icons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  justify-items: center;
  font-size: 1.75rem;
  -moz-column-gap: 2rem;
       column-gap: 2rem;
}

.social-icons a {
  color: var(--clr-grey-1);
  transition: var(--transition);
}
.social-icons li:hover a {
  color: var(--clr-primary-4);
}

/*
===============
Hero
===============
*/
.hero {
  background-color: var(--clr-primary-5);
}

.hero-center {
  height: calc(100vh - 4.5rem);
  display: grid;
  place-items: center;
}

.hero .underline {
  margin-right: 0;
  margin-bottom: 1rem;
}

.hero-img {
  display: none;
}

.hero-info h4 {
  color: var(--clr-grey-2);
  margin-top: 2rem;
}

.btn-hero {
  margin-top: 1.25rem;
}

.hero-icons {
  margin-top: 3rem;
}

@media screen and (min-width: 992px) {
  .hero-img {
    display: block;
    position: relative;
  }
  .hero-center {
    grid-template-columns: 1fr 1fr;
  }
  .hero-photo {
    position: relative;
    max-width: 25rem;
    max-height: 30rem;
    -o-object-fit: cover;
       object-fit: cover;
    border-radius: var(--radius);
  }
  .hero-img::before,
  .about-img::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    top: 2rem;
    right: -2rem;
    border: 0.25rem solid var(--clr-primary-1);
    border-radius: var(--radius);
  }
}

/*
===============
About
===============
*/
.about-photo {
  position: relative;
  max-width: 25rem;
  max-height: 30rem;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: var(--radius);
}

.about {
  display: grid;
  gap: 3rem;
}

.about-img {
  justify-self: center;
}

.about-title .underline {
  margin-right: 0;
}

.about-title {
  margin-bottom: 2rem;
}

@media screen and (min-width: 992px) {
  .about {
    grid-template-columns: 1fr 1fr;
  }
  .about-img {
    position: relative;
  }
  .about-info {
    align-self: center;
  }
}

/*
===============
Services
===============
*/
.services {
  display: grid;
  gap: 3rem 2rem;
}

.service {
  background-color: var(--clr-white);
  padding: 3rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  transition: var(--transition);
}

.service .underline {
  height: 0.12rem;
  width: 3rem;
  transition: var(--transition);
}

.service:hover {
  background-color: var(--clr-primary-2);
}

.service p,
.service h4 {
  transition: var(--transition);
}

.service:hover p,
.service:hover h4 {
  color: var(--clr-white);
}

.service:hover .underline {
  background-color: var(--clr-white);
}

@media screen and (min-width: 676px) {
  .services {
    grid-template-columns: 1fr 1fr;
  }
}
@media screen and (min-width: 992px) {
  .services {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/*
===============
Projects
===============
*/
.project-center {
  display: grid;
  gap: 3rem 2rem;
}
.project-text {
  margin: 0 auto;
  width: 85vw;
  max-width: 35rem;
}

.project-card {
  background-color: var(--clr-primary-2);
  border-radius: var(--radius);
  position: relative;
}

.projcet-info {
  color: var(--clr-white);
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition);
  opacity: 0;
}

.project-card p {
  color: var(--clr-white);
  text-align: center;
}

.project-img {
  height: 15rem;
  border-radius: var(--radius);
  -o-object-fit: cover;
     object-fit: cover;
  transition: var(--transition);
}

.project-card::after {
  content: "";
  position: absolute;
  border: 0.2rem solid var(--clr-white);
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  transition: var(--transition);
  opacity: 0;
}

.project-card:hover .projcet-info {
  opacity: 1;
}
.project-card:hover .project-img {
  opacity: 0.2;
}

.project-card:hover::after {
  transform: scale(0.8);
  opacity: 1;
}

@media screen and (min-width: 676px) {
  .project-center {
    grid-template-columns: 1fr 1fr;
  }
}
@media screen and (min-width: 992px) {
  .project-center {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media screen and (min-width: 1170px) {
  .card1 {
    grid-area: card1;
  }
  .card2 {
    grid-area: card2;
  }
  .card3 {
    grid-area: card3;
  }
  .card4 {
    grid-area: card4;
  }

  .project-card {
    height: 100%;
  }
  .project-img {
    height: 100%;
  }
  .project-center {
    grid-template-rows: repeat(2, 200px);
    grid-template-areas:
      "card1 card2 card2"
      "card1 card3 card4";
    gap: 1rem;
  }
}

/*
===============
Connect
===============
*/
.connect {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10rem 0 5rem 0;
  margin: 5rem 0;
  min-height: 40rem;
  -webkit-clip-path: polygon(
    50% 0%,
    100% 10%,
    100% 90%,
    50% 100%,
    0 90%,
    0 10%
  );
  clip-path: polygon(50% 0%, 100% 10%, 100% 90%, 50% 100%, 0 90%, 0 10%);
}

.connect::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--clr-white);
  opacity: 0.7;
  z-index: -1;
}

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  z-index: -2;
}

.video-banner {
  background-color: var(--clr-primary-5);
  text-align: center;
  padding: 3rem 5rem 12rem 5rem;
  -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%);
}

.video-text {
  max-width: 30rem;
}

/*
===============
Skills
===============
*/
.skills {
  background-color: var(--clr-primary-4);
}

.skills h3 {
  margin: 1.5rem 0;
  color: var(--clr-primary-1);
  
}

.skill > p{
  margin-bottom: 0.75rem;
}
.skill p{
  color: var(--clr-grey-1);
}


.skill-container {
  height: 1rem;
  position: relative;
  background-color: var(--clr-white);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.skill-value {
  background-color: var(--clr-primary-2);
  border-radius: var(--radius);
  position: absolute;
  top: 0;
  left: 0;
  height: 1rem;
}

.skill-text {
  position: absolute;
  top: 0;
  color: var(--clr-white) !important;
  font-size: 0.75rem;
  /* animation: moveskilltext 1s forwards; */
}

.value-50 {
  width: 50%;
}
.value-70 {
  width: 70%;
}
.value-80 {
  width: 80%;
}

.text-50{
  left: 50%;
  transform: translateX(-120%);
}
.text-70{
  left: 70%;
  transform: translateX(-120%);
}
.text-80{
  left: 80%;
  transform: translateX(-120%);
}

@media screen and (min-width: 768px) {
  .skills-center {
    display: grid;
    grid-template-columns: 1fr 1fr;
    -moz-column-gap: 3rem;
         column-gap: 3rem;
  }
}

/* @keyframes fillskillvalue {
  0% {
    width: 0%;
  }
  100% {
    width: 50%;
  }
}

.animateskillvalue {
  animation: fillskillvalue 1s forwards;
} */


/*
===============
Timeline
===============
*/
.timeline-center {
  width: 80vw;
  max-width: 40rem;
}

.timeline-item {
  position: relative;
  border-top: 2px dashed var(--clr-primary-2);
  padding: 4rem 2rem;
  margin: 0;
}

.timeline-item p{
  margin-bottom: 0;
}

.timeline-item:nth-child(even) {
  border-left: 2px dashed var(--clr-primary-2);
  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-2);
  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 {
  display: grid;
  place-items: center;
  position: absolute;
  font-size: 1.2rem;
  background-color: var(--clr-primary-2);
  color: var(--clr-white);
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
}

.timeline-item:nth-child(odd) .number {
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
}
.timeline-item:nth-child(even) .number {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
}


/*
===============
Blog
===============
*/
.blog {
  background-color: var(--clr-grey-3);
}

.blog-center {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 3rem 1rem;
}

.card {
  height: 27rem;
  perspective: 1500px;
  position: relative;
}

.card-side {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  transition: all 1s linear;
  border-radius: var(--radius);
}

.card-front {
  background-color: var(--clr-white);
}

.card-back {
  display: grid;
  place-content: center;
  background-color: var(--clr-primary-5);
  transform: rotateY(-180deg);
}

.card:hover .card-front {
  transform: rotateY(180deg);
  
}

.card:hover .card-back {
  transform: rotateY(0);
}

.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 img{
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
}

.card-info {
  padding: 1rem 1.5rem;
}

.card-footer {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: space-between;
}

.card-footer p {
  margin-bottom: 0;
  color: var(--clr-primary-2);
  font-size: 0.85rem;
}


/*
===============
Footer
===============
*/
.footer {
  padding: 2rem;
  background-color: #222;
  display: grid;
 place-items: center;
}

.footer .social-icons {
  margin-bottom: 1.5rem;
}

.footer a {
  color: var(--clr-primary-2);
}
.footer a:hover {
  color: var(--clr-primary-5);
}

.footer p {
  font-size: 1.25rem;
}