* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}
:root {
  --bg-color: #080808;
  --second-bg-color: #131313;
  --white-color: #fff;
  --main-color: #00ffee;
  --box-shadow: 0 0 25px var(--main-color);
}
::selection {
  background-color: var(--main-color);
  color: black;
}
.light-mode {
  --bg-color: white;
  --second-bg-color: #e7e5e5;
  --black-color: #000;
}
#toggle {
  outline: none;
  border: none;
}
body.light-mode {
  background-color: var(--bg-color);
}
.skills.light-mode,
.projects.light-mode,
footer.light-mode {
  background-color: var(--second-bg-color);
}
body.light-mode * {
  color: var(--black-color);
}
html {
  font-size: 60%;
  overflow-x: hidden;
}
a {
  text-decoration: none !important;
  text-transform: capitalize;
}
.heading {
  color: var(--white-color);
}
.btns:hover {
  color: white;
}
body {
  background-color: var(--bg-color) !important ;
  color: var(--white-color);
  text-transform: capitalize;
}
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 6% 2rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
}
.logo {
  font-size: 3rem;
  color: var(--white-color);
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s ease;
}

.logo:hover {
  transform: scale(1.1);
  color: var(--white-color);
}
.logo span {
  text-shadow: 0 0 25px var(--main-color);
}
.nav-bar a {
  font-size: 2rem;
  color: var(--white-color);
  margin-left: 4rem;
  font-weight: bold;
  transition: 0.3s ease;
  padding-bottom: 5px;
  border-bottom: 3px solid transparent;
}
.nav-bar a:hover,
.nav-bar a.active {
  color: var(--main-color);
  border-color: var(--main-color);
}

.navbar-toggle {
  padding: 10px;
  border: none;
  cursor: pointer;
  position: absolute;
  background-color: var(--main-color);
  right: 10%;
  border-radius: 10px;
  z-index: 999;
  display: none;
  transition: 0.5s ease;
}
.navbar-toggle:hover {
  box-shadow: var(--box-shadow);
}
.navbar-toggle .bar {
  display: none;
  width: 30px;
  height: 1.5px;
  margin: 5px auto;
  background-color: black;
  transition: all 0.3s ease-in-out;
  border-radius: 20px;
}

section {
  min-height: 100vh;
  padding: 10rem 6% 10rem;
}
.home {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15rem;
  background-color: var(--bg-color) !important;
  color: var(--white-color);
}
.home-content {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  text-align: left;
  justify-content: center;
  margin-top: 3rem;
}
span {
  color: var(--main-color);
}
.home-content h3 {
  margin-bottom: 2rem;
  margin-top: 1rem;
  font-size: 3.5rem;
}
.home-content h1 {
  font-size: 6rem;
  font-weight: 700;
  margin-top: 1.5rem;
  line-height: 1;
}
.home-img {
  border-radius: 50%;
}
.home-img img {
  position: relative;
  top: 3rem;
  width: 32vw;
  border-radius: 50%;
  box-shadow: var(--box-shadow);
  cursor: pointer;
  transition: 0.4s ease-in-out;
  background-color: var(--main-color);
  filter: brightness(0.9);
}
.home-img img:hover {
  box-shadow:
    0 0 25px var(--main-color),
    0 0 50px var(--main-color),
    0 0 100px var(--main-color);
}
.home-content p {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.8;
  max-width: 1000px;
}
.social-icons {
  display: flex;
}
.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4.5rem;
  height: 4.5rem;
  background-color: transparent;
  border: 2px solid var(--main-color);
  font-size: 2.5rem;
  border-radius: 50%;
  color: var(--main-color);
  margin: 3rem 1.5rem 3rem 0;
  transition: 0.3s ease-in-out;
}
.social-icons a:hover {
  color: var(--white-color);
  transform: scale(1.3) translateY(-5px);
  box-shadow: var(--box-shadow);
  background-color: var(--main-color);
}
.btns {
  display: inline-block;
  padding: 1rem 2.8rem;
  background-color: var(--main-color);
  box-shadow: var(--box-shadow);
  border-radius: 4rem;
  font-size: 1.6rem;
  color: black;
  border: 2px solid transparent;
  letter-spacing: 0.1rem;
  font-weight: 600;
  transition: 0.3s ease-in-out;
  cursor: pointer;
  text-transform: capitalize;
}
.btns:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px var(--main-color);
}
.btn-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.btn-group a:nth-of-type(2) {
  background-color: black;
  color: var(--main-color);
  border: 2px solid var(--main-color);
  box-shadow: 0 0 25px transparent;
}
.btn-group a:nth-of-type(2):hover {
  box-shadow: var(--box-shadow);
  background-color: var(--main-color);
  color: black;
}
.text-animation {
  font-size: 34px;
  font-weight: 600;
  min-width: 280px;
}
.text-animation span {
  position: relative;
}
.text-animation span::before {
  content: "Web Developer";
  color: var(--main-color);
  animation: words 20s infinite;
}
.text-animation span::after {
  content: "";
  background-color: var(--bg-color);
  position: absolute;
  width: calc(100% + 8px);
  height: 100%;
  border-left: 3px solid var(--bg-color);
  right: -8px;
  animation:
    cursor 0.6s infinite,
    typing 20s steps(14) infinite;
}
@keyframes cursor {
  to {
    border-left: 2px solid var(--main-color);
  }
}
@keyframes words {
  0%,
  20% {
    content: "web developer";
  }
  21%,
  40% {
    content: "front-end ";
  }
  41%,
  60% {
    content: "web developer";
  }
  61%,
  80% {
    content: "front-end";
  }
  81%,
  100% {
    content: "web developer";
  }
}

@keyframes typing {
  10%,
  15%,
  30%,
  35%,
  50%,
  55%,
  70%,
  75%,
  90%,
  95% {
    width: 0;
  }

  5%,
  20%,
  25%,
  40%,
  45%,
  60%,
  65%,
  80%,
  85% {
    width: calc(100% + 8px);
  }
}
.heading {
  font-size: 8rem;
  text-align: center;
  margin: 5rem 0;
  position: relative;
  display: block;
  text-shadow: 0 0px 20px var(--main-color);
  /* border-bottom: 1px solid var(--main-color); */
  /* border-width: 10%; */
}

.skills {
  /* padding: 100px 150px; */
  background-color: var(--second-bg-color);
  padding: 12% 0;
}

.skills-items {
  overflow: hidden;
}
.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.skills .wrapper {
  display: flex;
  /* gap: 3rem; */
  width: 200%;
  animation: scroll 15s linear infinite;
  padding: 30px 0;
  margin: 0;
}

.skill-item {
  flex: 0 0 10%; /* 5 عناصر في الشاشة الكبيرة */
  min-width: 150px;
}
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
/* @media (max-width: 1024px) { .skill-item { flex: 0 0 25%; } } */
@media (max-width: 768px) {
  .skill-item {
    flex: 0 0 20%;
  }
}
@media (max-width: 480px) {
  .skill-item {
    flex: 0 0 30%;
    animation-duration: 10s;
  }
}

.skills h2 {
  margin-bottom: 5rem;
}

.skills .skills-items .skill-item .skill-content {
  background-color: rgba(181, 247, 242, 0.485);
  height: 100px;
  width: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 3px solid var(--main-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--main-color);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}
.skills .skills-items .skill-item .skill-content:hover {
  transform: scale(1.05);
  box-shadow: var(--box-shadow);
  background-color: rgba(0, 255, 238, 0.1);
}
.skills .skills-items .skill-item h3 {
  font-size: 20px;
  color: white;
  margin: 0 0 10px;
  font-weight: bold;
  text-align: center;
}
.skills .skills-items .skill-item .skill-content img {
  /* height: px; */
  width: 50%;
}
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-thumb {
  background-color: var(--main-color);
  border-radius: 6px;
  border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-track {
  background-color: var(--bg-color);
  width: 50px;
}

.services {
  background-color: var(--bg-color);
  color: black;
}
.services h2 {
  margin-bottom: 5rem;
  color: var(--white-color);
}
.services-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 2.5rem;
}

.service-box {
  background-color: var(--main-color);
  /* height: 200px; */
  border-radius: 3rem;
  border: 5px solid transparent;
  transition: 0.4s ease-in-out;
  cursor: pointer;
  /* padding: 4rem; */
    display: flex;
  flex-direction: column;
  /* text-align: left; */
  max-height: fit-content;
  gap: 3rem;
  justify-content: center;
  align-items: center;
  padding: 6rem 4rem;
}
.service-box:hover {
  background-color: var(--white-color);
  color: black;
  border: 5px solid var(--main-color);
  transform: scale(1.03) translateY(-7px);
  box-shadow: var(--box-shadow);
}

.service-box .icons {
  display: flex;
  gap: 3rem;
}
.service-box .icons i {
  font-size: 3rem;
}
.service-box h4 {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
}
.service-box p {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.7;
  /* max-height: 100px; */
  text-align: center;
  margin: auto;
}

.projects {
  background: var(--second-bg-color);
}
.projects .projects-box {
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.projects .heading {
  margin-bottom: 5rem;
}

.projects .wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.project-item {
  background-color: rgba(0, 0, 0, 0.7) !important;
  border: 3px solid rgba(238, 238, 238, 0.2);
  border-radius: 2rem !important;
  margin: 0 2rem;
  /* padding: 30px 60px; */
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  color: white;
  transition: 0.4s ease-in-out;
}

.project-item:hover {
  border: 3px solid var(--main-color);
  transform: translateY(-10px);
  box-shadow: 0 0 50px var(--main-color);
}
.project-item img {
  filter: brightness(0.5);
  transition: 0.4s ease;
  border-radius: 2rem 2rem 0 0 !important;
}
.project-item:hover img {
  filter: brightness(1);
}
.project-item .card-body {
  padding: 10px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.project-item .card-body h2 {
  font-size: 2.4rem;
}
.project-item .card-body p {
  font-size: 1.5rem;
}

.contact {
  background-color: var(--bg-color);
}
.contact h2 {
  margin-bottom: 3rem;
  color: white;
}
.contact form {
  margin-bottom: 8rem;
}
.contact form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.contact form .content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin: 5rem auto;
  text-align: center;
}
@media (max-width: 768px) {
  .contact form .content {
    flex-direction: column;
  }
}
.contact form .input-box {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
  width: 100%;
  padding: 2.5rem;
  font-size: 1.8rem;
  color: var(--white-color);
  background: var(--second-bg-color);
  border-radius: 2rem;
  border: 2px solid var(--main-color);
  margin: 1.5rem 0;
  resize: none;
}

.contact form .btn {
  margin: 2rem 0;
}
.footer {
  position: relative;
  bottom: 0;
  width: 100%;
  padding: 40px 0;
  background-color: var(--second-bg-color);
}
.footer {
  text-align: center;
  padding-bottom: 25px;
  color: var(--main-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.footer .social {
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer .social a {
  font-size: 25px;
  color: var(--main-color);
  border: 2px solid var(--main-color);
  width: 42px;
  height: 42px;
  list-style: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 50%;
  margin: 0 10px;
  transition: 0.3s ease-in-out;
}
.footer .social a:hover {
  transform: scale(1.2) translateY(-10px);
  background-color: var(--main-color);
  color: black;
  box-shadow: var(--box-shadow);
}
.footer ul {
  margin-top: 0;
  padding: 0;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 0;
  text-align: center;
}

.footer ul li a {
  color: white;
  border-bottom: 3px solid transparent;
  padding-bottom: 5px;

  transition: 0.3s ease-in-out;
}
.footer ul li a:hover {
  border-color: var(--main-color);
}
.footer ul li {
  display: inline-block;
  padding: 0 15px;
}
.footer .logo {
  font-size: 2rem;
}
.footer .copy-right {
  text-align: center;
  font-size: 2rem;
  color: white;
}
@media (max-width: 1285px) {
  html {
    font-size: 55%;
  }
  .services-container {
    padding-bottom: 7rem;
    margin: 0 5rem;
  }
}
@media (max-width: 991px) {
  header {
    padding: 2rem 3%;
  }
  section {
    padding: 10rem 3% 2rem;
  }
  .education .timeline-items::before {
    left: 7px;
  }
  .education .timeline-items .timeline-item:nth-child(odd) {
    padding-right: 0;
    text-align: left;
  }
  .education .timeline-items .timeline-item:nth-child(odd),
  .education .timeline-items .timeline-item:nth-child(even) {
    padding-left: 37px;
  }
  .education .timeline-items .timeline-item .timeline-dot {
    left: 0;
  }
  .services {
    padding-bottom: 7rem;
  }
  .projects .wrapper {
    grid-template-columns: repeat(1, 1fr);
  }
  .contact form {
    flex-direction: column;
  }
  .footer {
    padding: 2rem 3%;
  }
}

@media (max-width: 895px) {
  .nav-bar {
    position: absolute;
    top: 100%;
    right: 0;
    width: 50%;
    padding: 1rem 3%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom-left-radius: 2rem;
    border-left: 2px solid var(--main-color);
    border-bottom: 2px solid var(--main-color);
    display: none;
  }
  .nav-bar.active {
    display: block;
  }
  .navbar-toggle {
    display: block;
    z-index: 999;
  }
  .navbar-toggle .bar {
    display: block;
  }
  .navbar-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .navbar-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .navbar-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .nav-bar a {
    display: block;
    font-size: 2rem;
    margin: 3rem 0;
    color: white;
  }
  .home {
    flex-direction: column-reverse;
    margin: 5rem 4rem;
    gap: 5rem;
  }
  .home-content h3 {
    font-size: 2.6rem;
  }
  .home-content h1 {
    font-size: 8rem;
    margin-top: 3rem;
  }
  .home-content p {
    max-width: 600px;
    margin: 0 auto;
  }

  .home-img img {
    width: 56vw;
  }
  .services h2 {
    margin-bottom: 3rem;
  }
  .services-container {
    grid-template-columns: repeat(1, 1fr);
  }
}
