/* Reset some default margins/padding */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5; 
  color: #333;
  height: 100%;
}
/* Ensure the outer container just stacks sections, not a grid */
#projects-container {
  display: block;    /* override any .grid-container rules inherited */
}


/* ---------- HEADER WITH ABSTRACT ANIMATION ---------- */
header {
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, #2980b9, #8e44ad, #16a085, #2980b9);
  background-size: 400% 400%;
  animation: gradientFlow 10s ease infinite;
  z-index: 0;
  opacity: 0.25;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

header .header-inner {
  position: relative;
  z-index: 1;
}

header h1 {
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

header p {
  font-size: 1rem;
  opacity: 0.8;
}

/* ---------- FLOATING ABSTRACT DOTS BACKGROUND ---------- */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.3) 6px, transparent 8px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.3) 5px, transparent 8px),
    radial-gradient(circle at 50% 90%, rgba(255,255,255,0.3) 7px, transparent 8px);
  background-size: auto;
  z-index: 0;
  pointer-events: none;
  animation: floatDots 30s linear infinite;
}

@keyframes floatDots {
  0% { transform: translate(0, 0); }
  50% { transform: translate(10px, -10px); }
  100% { transform: translate(0, -20px); }
}



/* ---------- LAYOUT CONTAINER ---------- */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

footer {
  text-align: center;
  padding: 1.5rem 0;
  background-color: #ecf0f1;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #7f8c8d;
  position: relative;
  z-index: 1;
}

/* ---------- GRID FOR CARDS ---------- */
/* .grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
} */

.grid-container {
  display: grid;
  /* Each column will be at least 280px wide but never grow beyond 300px */
  grid-template-columns: repeat(auto-fit, minmax(280px, 300px));
  gap: 1.5rem;
  justify-content: left; /* center the grid when there’s extra space */
}


/* ---------- INDIVIDUAL PROJECT CARD ---------- */
.card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.6s ease both;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card img {
  width: 100%;
  object-fit: cover;
  height: 160px;
}

/* ---------- CARD CONTENT ---------- */
.card-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.card-description {
  font-size: 0.95rem;
  line-height: 1.4;
  flex: 1;
  margin-bottom: 1rem;
  color: #555;
}

.card-link {
  display: inline-block;
  margin-top: auto;
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background-color: #2980b9;
  color: #fff;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.card-link:hover {
  background-color: #1c5980;
}

/* ---------- CARD ANIMATION ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}





.section-heading {
  font-size: 1.6rem;
  margin: 2rem 0 1rem; /* top 2rem, bottom 1rem */
  color: #2c3e50;
  border-bottom: 2px solid #2980b9;
  padding-bottom: 0.3rem;
}
