@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  font-family: "Poppins", sans-serif;
}

:root {
  --main-color: #033a80;
  --bg-color: #fff;
  --text-color: #0f0c27;
  --hover: hsl(260, 100%, 51%);
  --big-font: 3.2rem;
  --medium-font: 1.8rem;
  --p-font: 0.941rem;
}

section {
  padding: 50px 10%;
}

body.active {
  --text-color: #fff;
  --bg-color: #0f0c27;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

*::selection {
  color: var(--bg-color);
  background: var(--main-color);
}

.heading {
  text-align: center;
}

.heading h2 {
  font-size: 30px;
}

.heading span {
  font-size: var(--p-font);
  color: rgb(2, 166, 70);
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-color);
  padding: 13px 10%;
  transition: 0.2s;
  box-shadow: -3px -3px 7px #ffffff73,
    2px 2px 5px rgba(94, 104, 121, 0.288);
}

header.shadow {
  box-shadow: 0 0 4px rgb(14 55 54 / 15%);
}

.logo {
  font-size: 1.61rem;
  font-weight: 600;
  color: var(--text-color);
}

.logo span {
  font-size: 1.61rem;
  font-weight: 600;
  color: crimson;
}

.navbar {
  display: flex;
}

.navbar a {
  font-size: 1rem;
  padding: 10px 20px;
  color: var(--text-color);
  font-weight: 500;
}

.navbar a:hover {
  color: var(--hover);
}

#menu-icon {
  font-size: 24px;
  cursor: pointer;
  z-index: 10001;
  display: none;
}

#darkmode {
  font-size: 22px;
  cursor: pointer;
}

.home {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.2fr 1fr 1fr;
  align-items: center;
  gap: 1rem;
}

.home-img {
  order: 3;
}

.home-img img {
  width: 100%;
}

.home-text span {
  font-size: var(--medium-font);
  font-weight: 500;
}

.home-text h1 {
  font-size: var(--big-font);
}
.home-text h1 span{
  color: crimson;
}

.home-text h2 {
  font-size: 1.1rem;
  font-weight: 400;
}

.home-text p {
  font-size: var(--p-font);
  font-weight: 400;
  margin: 0.7rem 0 1rem;
}

.social {
  display: flex;
  flex-direction: column;
}

.social a {
  margin-bottom: 1rem;
  font-size: 22px;
  color: var(--text-color);
}

.social a:hover {
  color: var(--hover);
}

.btn {
  display: inline-block;
  background: var(--main-color);
  color: #fff;
  padding: 0.7rem 1.3rem;
  border-radius: 0.5rem;
}

.btn:hover {
  background: var(--hover);
}

/* --------------ABOUT--------------- */

#about{
  padding: 80px 0;
  color: var(--text-color);
  background: var(--bg-color);
}
.sub-title{
  text-align: center;
}
.row{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.about-col-1{
  max-width: fit-content;
  padding-top: 20%;
  flex-basis: 35%;
}
.about-col-1 img{
  width: 100%;
  border-radius: 15px;
}
.about-col-2{
  flex-basis: 60%;
}

.sub-title{
  font-size: 60px;
  font-weight: 600;
  color: var(--text-color);
}

.tab-titles{
  display: flex;
  margin: 20px 0 40px;
  color: var(--hover);
}

.tab-links{
   margin-right: 50px;
   font-size: 18px;
   font-weight: 500;
   cursor: pointer;
   position: relative;
}

.tab-links::after{
  content: '';
  width: 0;
  height: 3px;
  background: #ff004f;
  position: relative;
  left: 0;
  bottom: -8px;
  transition: 0.10s;
}

.tab-links .active-link::after{
  width: 50%;
  color: #ff004f;
}

.tab-contents ul li{
  list-style: none;
  margin: 10px 0;
}
.tab-contents ul li span{
  color: #ff004f;
  font-size: 14px;
}

.tab-contents{
  display: none;
}
.tab-contents.active-tab{
  display: block;
}
.bars-box {
  width: 50%;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
}

.bars-box h3,
span {
  font-size: 1.1rem;
  font-weight: 500;
}

.light-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.5rem;
  background: hsla(260, 100%, 44%, 0.4);
  border-radius: 0.5rem;
}

.percent-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 0.5rem;
  background: var(--main-color);
  border-radius: 0.5rem;
}

.html-bar {
  width: 94%;
}

.css-bar {
  width: 84%;
}

.js-bar {
  width: 74%;
}

.react-bar {
  width: 80%;
}

/* --------------Skills--------------- */

.skills-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
}

.skills-img img {
  width: 80%;
  padding-left: 4rem;
  object-position: center;
}

.bars-box {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
}

.bars-box h3,
span {
  font-size: 1.1rem;
  font-weight: 500;
}

.light-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.5rem;
  background: hsla(260, 100%, 44%, 0.4);
  border-radius: 0.5rem;
}

.percent-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 0.5rem;
  background: var(--main-color);
  border-radius: 0.5rem;
}

.html-bar {
  width: 94%;
}

.css-bar {
  width: 84%;
}

.js-bar {
  width: 74%;
}

.react-bar {
  width: 80%;
}

/* --------------Service--------------- */

.services-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, auto));
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.services-box {
  padding: 20px;
  width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 0.5rem;
  border-bottom: 2px solid var(--main-color);
  box-shadow: 0 2px 7px rgb(14 55 54 / 15%);
}

.services-box:hover {
  background-color: #02225a;
}

.services-box h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.7rem 0 0.4rem;
}

.services-box:hover h3 {
  color: #fff;
}

.services-box .bx {
  padding-top: 2rem;
  font-size: 54px;
  color: var(--main-color);
}

.services-box:hover .bx {
  color: #22cf91;
}

.services-box a {
  color: var(--main-color);
  font-size: var(--p-font);
  font-weight: 500;
}

.services-box:hover a {
  color: #8b8a8f;
}

/*----------- WORK ------------*/

#portfolio{
  padding: 50px 0;
  background-color: var(--bg-color);
}
.sub-title{
  text-align: center;
}
.work-list{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 40px;
  margin-top: 50px;
}
.work{
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.work img{
  width: 100%;
  border-radius: 10px;
  display: block;
  transition: transform 0.5s;
}
.work video{
  
  width: 100%;
  border-radius: 10px;
  transition: transform 0.5s;
  display: block;
}
.layer{
  width: 100%;
  height: 0;
  background: linear-gradient(rgba(0,0,0,0.6), #ff004f);
  border-radius: 10px;
  position: absolute;
  left: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  text-align: center;
  font-size: 14px;
  transition: height 0.5s;
}
.layer h3{
  font-weight: 500;
  margin-bottom: 20px;
}
.layer a{
  margin-top: 20px;
  color: #ff004f;
  text-decoration: none;
  font-size: 5px;
  line-height: -190px;
  background: #fff;
  width: 60px;
  height: 40px;
  border-radius: 50%;
  text-align: center;
}
.work:hover img{
  transform: scale(1.1);
}
.work:hover .layer{
  height: 100%;
}
.work:hover video{
  transform: scale(1.1);
}
.work:hover .layer{
  height: 100%;
}
.btn{
  display: block;
  margin: 50px auto;
  width: fit-content;
  border: 1px solid #ff004f;
  padding: 14px 50px;
  border-radius: 6px;
  text-decoration: none;
  color: black;
  transition: background 0.5s;
}
.btn:hover{
  background: #ff004f;
}

/*------------CONTACT-------*/
.container{
  background-color: var(--bg-color);
}
.contact-left{
  flex-basis: 35%;
}
.sub-title{
  color: #ff004f;
}
.contact-right{
  flex-basis: 60%;
}
.contact-left p{
  margin-top: 30px;
}
.contact-left .logo{
  width: 140px;
}
.contact-left p i{
  color: #ff004f;
  margin-right: 15px;
  font-size: 25px;
}
.social-icons{
  margin-top: 30px;
}
.social-icons a{
  text-decoration: none;
  font-size: 30px;
  margin-right: 15px;
  color: #ababab;
  display: inline-block;
}
.btn.btn2{
  display: inline-block;
  background: crimson;
}
.contact-right form{
  width: 100%;
}
.contact-right form input, form textarea{
  width: 100%;
  border: 0;
  outline: none;
  background: var(--bg-color);
  padding: 15px;
  margin: 15px 0;
  color: #ff004f;
  font-size: 18px;
  border-radius: 6px;
}
form btn2{
  padding: 14px 60px;
  font-size: 18px;
  margin-top: 20px;
  cursor: pointer;
}
#msg{
  color: orangered;
  margin-top: -40px;
  display: block;
}

/* --------------footer--------------- */

.footer {
  display: grid;
  place-items: center;
  padding: 20px;
  color: #000;
}

.footer h2 {
  font-size: 1.5rem;
  margin-bottom: 1.6rem;
  color: var(--text-color)
}

.footer-social a i {
  color: rgb(10, 26, 208);
  font-size: 25px;
  margin-left: 10px;
  text-align: center;
  line-height: 40px;
  background-color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.copyright {
  padding: 20px;
  background: var(--main-color);
  text-align: center;
  color: #fff;
}

.copyright a {
  color: #22cf91;
}

/* For Mobile */
@media (max-width: 991px) {
  header {
    padding: 18px 4%;
  }

  section {
    padding: 50px 4%;
  }
}

/* --------------media 881--------------- */

@media (max-width: 881px) {
  :root {
    --big-font: 2.7rem;
    --medium-font: 1.4rem;
  }
}

/* --------------media 768--------------- */

@media (max-width: 768px) {
  :root {
    --big-font: 2.4rem;
    --medium-font: 1.2rem;
  }

  header {
    padding: 11px 4%;
  }

  #menu-icon {
    display: initial;
    color: var(--text-color);
  }

  header .navbar {
    position: absolute;
    top: -500px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    box-shadow: 0 4px 4px rgb(0 0 0 / 10%);
    transition: 0.2s ease;
    text-align: center;
  }

  .navbar.active {
    top: 100%;
  }

  .navbar a {
    padding: 1.5rem;
    display: block;
    background: var(--bg-color);
  }

  #darkmode {
    position: absolute;
    top: 1.4rem;
    right: 2rem;
  }

  .scroll-down {
    display: none;
  }

  .home {
    grid-template-columns: 0.5fr 3fr;
  }

  .home-text {
    grid-column: 1/3;
    padding-left: 1.4rem;
  }

  .home-img {
    order: initial;
  }

  .about-container {
    grid-template-columns: 1fr;
  }

  .about-img {
    display: flex;
    justify-content: center;
  }

  .skills-container {
    grid-template-columns: 1fr;
  }

  .skills-img img {
    padding-left: 0;
  }

  .skills-img {
    padding-top: 2rem;
    display: flex;
    justify-content: center;
  }

}

/* --------------media 340--------------- */

@media (max-width: 340px) {
  :root {
    --big-font: 1.7rem;
    --medium-font: 1.1rem;
  }

  .home-text span {
    font-size: 1rem;
  }

  .home-text h2 {
    font-size: 0.9rem;
    font-weight: 500;
  }

  .information .info-box span {
    font-size: 1rem;
  }

}

/*-----hammad portfolio media querry ---*/
@media only screen and (max-width: 600px){
  #header{
      background-image: url(Images/Hammad_s_Pic-removebg-preview.png);
      display: inline-block
  }
  .header-text{
      margin-top: 100%;
      font-size: 16px;
  }
  .header-text h1{
      font-size: 30px;
  }
  nav .fas{
      display: block;
      font-size: 25px;
  }
  nav ul{
      background: #ff004f;
      position: fixed;
      top: 0;
      right: -200px;
      width: 200px;
      height: 100vh;
      padding-top: 50px;
      z-index: 2;
      transition: right 0.5s;
  }
  nav ul li{
      display: block;
      margin: 25px;
  }
  nav ul .fas{
      position: absolute;
      top: 25px;
      left: 25px;
      cursor: pointer;
  }
  .sub-title{
      font-size: 40px;
  }
  .about-col-1, .about-col-2{
      flex-basis: 100%;
  }
  .about-col-1{
      margin-bottom: 30px;
  }
  .about-col-2{
      font-size: 14px;
  }
  .tab-links{
      font-size: 16px;
      margin-right: 20px;
  }
  .contact-left,  .contact-right{
      flex-basis: 100%;
  }
  .copyright{
      font-size: 14px;
  }
  #msg{
      color: #61b752;
      margin-top: -40px;
      display: block;
  }
}
