/* Global Styles */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: #121212;
  color: #ffffff;
  line-height: 1.6;
  padding-top: 100px; /* Offset fixed header */
  overflow-x: hidden; /* Prevent horizontal scroll */
  scroll-behavior: smooth; /* Smooth scrolling */
} 

/* Header */
.header {
  text-align: center;
  background-color: #ffffff;
  border-bottom: 1px solid #333;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding-bottom: 20px;
  padding-top: 20px;
  animation: slideDown 1s ease-in-out;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 5px;
  animation: fadeIn 1.5s ease-in-out;
}

.header p {
  font-size: 1rem;
  color: #bbbbbb;
  animation: fadeIn 2s ease-in-out;
}

/* Search Bar */
.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  opacity: 0;
  animation: fadeInUp 1.5s ease-in-out forwards;
}

.search-bar input {
  padding: 12px;
  width: 50%;
  border: 2px solid rgb(49, 49, 49); /* White border */
  border-radius: 10px;
  outline: none;
  background: #000000;
  color: #ffffff;
  transition: all 0.3s ease;
}

.search-bar input::placeholder {
  color: #bbbbbb;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
}

.search-bar input:focus {
  background: #333;
  box-shadow: 0 0 10px rgba(0, 26, 255, 0.7);
}

.search-bar i {
  margin-left: -30px;
  color: #bbbbbb;
  cursor: pointer;
  transition: color 0.3s ease-in-out;
}

.search-bar i:hover {
  color: #001aff;
}

/* Portfolio Container */
.portfolio-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
  padding-top: 20px; /* Extra spacing to avoid content overlap with fixed header */
}

.project-card {
  background-color: #000000;
  /* border: 1px solid #333; */
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  animation: slideUp 1s ease-in-out forwards;
  position: relative;
  overflow: hidden;
  z-index: 1; /* Ensure button remains clickable */
}

/* Glow Effect */
.project-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(17, 0, 255, 0.404) 10%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: -1; /* Move behind content */
}

.project-card:hover::before {
  opacity: 1;
}

/* Hover Effects */
.project-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.7);
}

.project-card h2 {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 10px;
}

.project-card p {
  font-size: 0.9rem;
  color: #cccccc;
  margin-bottom: 15px;
}

.project-card .btn {
  display: inline-block;
  background-color: #001aff;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background-color 0.3s ease, transform 0.2s ease-in-out;
  position: relative;
  z-index: 2; /* Ensure button stays above overlay */
}

.project-card .btn:hover {
  background-color: #1c18ff;
  transform: scale(1.1);
}

/* Scroll Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease-in-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .portfolio-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-bar input {
    width: 70%;
  }
}

@media screen and (max-width: 768px) {
  .portfolio-container {
    grid-template-columns: repeat(1, 1fr);
  }

  .search-bar input {
    width: 80%;
  }
}

/* Keyframes for Animations */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
