:root {
  --primary-color: #3dcfd3;
  --dark-bg: #161616f0;
  --white: #fff;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  --primary-light: #5ee6eb;
  --secondary-color: #2c9396;
  --light-bg: #f8f9fa;
  --white: #ffffff;
  --black: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--light-bg);
  color: var(--black);
  line-height: 1.6;
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  src: url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.projects-header {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url(background11.jpg) no-repeat center center;
  background-size: cover;
  color: var(--white);
  padding: 7rem 0 5rem;
  text-align: center;

  position: relative;
  overflow: hidden;
}

.projects-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIvPjwvc3ZnPg==");
  opacity: 0.3;
}

/* back button  */
.back-button {
  position: absolute;
  left: 30px;
  top: 30px;
  color: var(--white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  transition: var(--transition);
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 15px;
  border-radius: 30px;
  backdrop-filter: blur(5px);
}

.back-button i {
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.back-button:hover {
  color: var(--primary-light);
  background: rgba(255, 255, 255, 0.2);
}

.back-button:hover i {
  transform: translateX(-5px);
}

.projects-header h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
  animation: fadeInDown 0.8s ease;
}

.projects-header h1 span {
  color: var(--primary-light);
  position: relative;
}

.projects-header h1 span::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 10px;
  background: rgba(67, 97, 238, 0.3);
  z-index: -1;
  border-radius: 3px;
}

.projects-header p {
  font-size: 1.3rem;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* Projects Filter */
.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 3rem 0;
  animation: fadeIn 0.8s ease 0.4s both;
}

.filter-btn {
  padding: 0.8rem 1.8rem;
  background: transparent;
  color: var(--black);
  border: 2px solid var(--primary-color);
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(67, 97, 238, 0.1),
    transparent
  );
  transition: all 0.6s ease;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 1px 2px var(--black);
}

/* Projects Grid */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  padding: 2rem 0;
}

.project-item {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-item:hover {

  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.project-preview {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.project-preview img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.96, 0.34, 1);
}


.project-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 3px 10px rgba(67, 97, 238, 0.3);
}

.project-info {
  padding: 1.8rem;
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100% - 290px); /* Subtract the preview height */
}

.project-icon {
  width: 60px;
  height: 60px;
  background: var(--dark-bg);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.2rem;
  position: absolute;
  top: -0px;
  left: 1.8rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  filter: hue-rotate(0deg) saturate(1) brightness(1);
  transition: var(--transition);
}

.project-item:hover .project-icon img {
  filter: hue-rotate(10deg) saturate(1.2) brightness(0.9);
}

.project-info h3 {
  font-size: 1.5rem;
  color: var(--black);
  margin-bottom: 0.1rem;
  margin-top: 2.0rem;
}

.project-info p {
  color: var(--gray);
  line-height: 1.7;
  flex-grow: 0.3;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.project-tech span {
  background:#161616dd ;
  color: var(--primary-color);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}

.project-item:hover .project-tech span {
  background: var(--black);
}

.project-cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  background: #9ffcff67;
  border: #3dcfd3 solid 1px;
  margin-top: auto; /* This pushes the button to the bottom */
  align-self: center; /* Center horizontally */
  margin-bottom: 0.5rem;
}

.project-cta i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.project-cta:hover {
  color: var(--white);
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 2px 5px var(--dark-bg);
}

.project-cta:hover i {
  transform: translateX(5px);
}

/* Footer */
.projects-footer {
  background: var(--dark-bg);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 3rem 0;
  margin-top: 4rem;
  position: relative;
}

.projects-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-light)
  );
}

.back-to-top {
  position: absolute;
  right: 30px;
  top: -20px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  background: var(--primary-color);
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  box-shadow: 0 5px 20px rgba(67, 97, 238, 0.4);
  transition: var(--transition);
}

.back-to-top i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.back-to-top:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

.back-to-top:hover i {
  transform: translateY(-3px);
}

.footer-content {
  max-width: 700px;
  margin: 0 auto;
}

.footer-content p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .projects-container {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .projects-header {
    padding: 6rem 0 4rem;
  }

  .projects-header h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .projects-header {
    padding: 5rem 0 3rem;
  }

  .projects-header h1 {
    font-size: 2.5rem;
  }

  .projects-header p {
    font-size: 1.1rem;
  }

  .back-button {
    left: 20px;
    top: 20px;
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  .filter-btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .project-info h3 {
    font-size: 1.3rem;
  }

  .back-to-top {
    right: 20px;
    padding: 0.7rem 1.3rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .projects-header {
    padding: 4rem 0 2.5rem;
  }

  .projects-header h1 {
    font-size: 2rem;
  }

  .back-button {
    position: static;
    margin-bottom: 1.5rem;
    display: inline-flex;
  }

  .projects-container {
    grid-template-columns: 1fr;
  }

  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }

  .project-cta {
    width: 100%;
    justify-content: center;
    padding: 0.6rem;
    border-radius: 30px;
  }

  .back-to-top {
    position: static;
    margin: 1.5rem auto 0;
    display: inline-flex;
  }
}
