* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
  scroll-behavior: smooth;
}


body {
  height: 200vh;
  background: #0f172a;
  background: var(--bg); color: var(--text);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);

  z-index: 1000;
  background: var(--nav);
}

/* Logo */
.logo {
  color: white;
  font-size: 22px;
  font-weight: bold;
}

/* Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: #ccc;
  position: relative;
  font-size: 16px;
  transition: 0.3s;
}

.nav-links a:hover {
  color: white;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: #38bdf8;
  transition: 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hide checkbox */
#menu-toggle {
  display: none;
}

/* Hamburger */
.hamburger {
  cursor: pointer;
  display: none;
}

.hamburger svg {
  height: 3em;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line {
  fill: none;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  transition: 0.6s;
}

.line-top-bottom {
  stroke-dasharray: 12 63;
}

/* Animation when checked */
#menu-toggle:checked + .hamburger svg {
  transform: rotate(-45deg);
}

#menu-toggle:checked + .hamburger .line-top-bottom {
  stroke-dasharray: 20 300;
  stroke-dashoffset: -32.42;
}

/* Mobile */
@media (max-width: 768px) {

  .hamburger {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: #0f172a;
    width: 200px;
    padding: 20px;
    transition: 0.3s;
  }

  /* أهم سطر */
  #menu-toggle:checked ~ .nav-links {
    right: 0;
  }

  .switch {
    margin-left: 20px;
  }
}
.home {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  gap: 50px;
}

/* Text */
.hero-text {
  color: white;
  max-width: 600px;
}

.hero-text h1 {
  font-size: 48px;
  margin-bottom: 10px;
  
}

.hero-text h1 span {
  color: #38bdf8;
}

.hero-text h3 {
  font-size: 24px;
  color: #aaa;
  margin-bottom: 15px;
}

.hero-text p {
  color: #bbb;
  line-height: 1.6;
  margin-bottom: 25px;
}

/* Buttons */
.buttons {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.primary {
  background: #38bdf8;
  color: black;
}

.primary:hover {
  background: #0ea5e9;
}

.secondary {
  border: 1px solid #38bdf8;
  color: #38bdf8;
}

.secondary:hover {
  background: #38bdf8;
  color: black;
}

/* Image */
.hero-img img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 3px solid #38bdf8;
  box-shadow: 0 0 30px rgba(56,189,248,0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    justify-content: center;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .buttons {
    justify-content: center;
  }
}
/* From Uiverse.io by satyamchaudharydev */ 
/* The switch - the box around the slider */
.switch {
  display: block;
  --width-of-switch: 3.5em;
  --height-of-switch: 2em;
  /* size of sliding icon -- sun and moon */
  --size-of-icon: 1.4em;
  /* it is like a inline-padding of switch */
  --slider-offset: 0.3em;
  position: relative;
  width: var(--width-of-switch);
  height: var(--height-of-switch);
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1a2847;
  transition: .4s;
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: var(--size-of-icon,1.4em);
  width: var(--size-of-icon,1.4em);
  border-radius: 50%;
  left: var(--slider-offset,0.3em);
  top: 50%;
  transform: translateY(-50%);
  background: #1a2847;

  /* moon effect */
  box-shadow: inset -3px -2px 5px -2px #8983f7,
              inset -10px -4px 0 0 #a3dafb;

  transition: .4s;
}

input:checked + .slider {
  background-color: #f4f4f5;
}

input:checked + .slider:before {
  left: calc(100% - (var(--size-of-icon,1.4em) + var(--slider-offset,0.3em)));

  background: linear-gradient(40deg,#ff0080,#ff8c00 70%);

  /* remove moon shadow */
  box-shadow: none;
}

.about {
  padding: 80px 8%;
  max-width: 800px;

  text-align: left;
}
.about h2 {
  font-size: 32px;
  margin-bottom: 20px;
}
.about p {
  font-size: 18px;
  line-height: 1.6;
  color: #ccc;
}
.about img {
  width: 100%;
  margin-top: 30px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(56,189,248,0.3);
  object-fit: cover;
  height: 280px;
  border: 3px solid #38bdf8;
  

}

body {
  background: #0f172a;
  font-family: sans-serif;
  color: white;
}

.projects-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  padding: 40px;
}

.project-card {
  background: #1e293b;
  padding: 15px;
  border-radius: 15px;
}

.project-slider {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.project-slide {
  width: 100%;
  display: none;
}

.project-slide.active {
  display: block;
}

/* buttons */
.project-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  font-size: 18px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 50%;
}

.project-prev {
  left: 10px;
}

.project-next {
  right: 10px;
}

.project-btn:hover {
  background: #38bdf8;
  color: black;
}

.project-title {
  margin-top: 10px;
  text-align: center;
}

.project-name {
  font-size: 18px;
  font-weight: bold;
  color: white;
  text-decoration: none;
}
.project-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.projects-section h2 {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 20px;
  font-size: 32px ;
}
.contact-section h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 32px;
  grid-column: 1 / -1;

}
.contact-section {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 50px;
  flex-wrap: wrap;
  flex-direction: column; /* 👈 ده المهم */
}

.contact-card {
  background: #1e293b;
  padding: 20px 30px;
  border-radius: 15px;
  text-align: center;
  text-decoration: none;
  color: white;
  transition: 0.3s;
  width: 120px;
}

.contact-icon {
  width: 40px;
  margin-bottom: 10px;
}

/* hover effect */
.contact-card:hover {
  transform: translateY(-10px) scale(1.05);
  background: #38bdf8;
  color: black;
}

/* optional glow */
.contact-card:hover .contact-icon {
  filter: brightness(0);
}
.contact-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer {
  text-align: center;
  padding: 20px;
  background: #1e293b;
  color: #ccc;
}

@media (max-width: 768px) {

  .home {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 100px;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-img img {
    width: 200px;
    height: 200px;
  }

  .buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {

  .about {
    text-align: center;
  }

  .about img {
    height: 200px;
  }
}

@media (max-width: 768px) {

  .about {
    text-align: center;
  }

  .about img {
    height: 200px;
  }
}

.projects-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

/* موبايل */
@media (max-width: 500px) {
  .projects-section {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

.contact-section {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 40px;
}

.contact-card {
  width: 120px;
  text-align: center;
}