:root {
  --primary: #dd946f;
  --secondary: #261e5a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--secondary);
  font-family: Mulish;
  font-size: 16px;
}

.background {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: start;
  padding: 2rem;
}
.articles {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between; /* Ensures equal spacing between cards */
  max-width: 1000px; /* Adjust the max-width to your preference */
  margin: 0 auto;
}

.articles article {
  width: calc(
    33.33% - 1rem
  ); /* Set width to 1/3 of the container with some spacing */
  margin-bottom: 1rem; /* Add bottom margin for spacing between rows */
  cursor: pointer;
  position: relative;
  display: block;
  transition: all 0.1s ease-in-out;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Add a subtle box shadow for depth */
}

.articles article:hover img {
  transform: scale(1.1); /* Scale up the image on hover */
}

.articles article h2 {
  margin: 0;
  font-size: 1.6rem;
  color: aliceblue;
  transition: color 0.1s ease-out;
}

.articles article img {
  max-width: 100%;
  height: auto; /* Allow images to scale appropriately */
  transition: transform 0.4s ease-in-out;
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {
  .articles article {
    width: calc(
      50% - 1rem
    ); /* Set width to 1/2 of the container with some spacing */
  }
}

/* Media query for even smaller screens */
@media screen and (max-width: 480px) {
  .articles article {
    width: calc(
      100% - 1rem
    ); /* Set width to full width of the container with some spacing */
  }
}

.article-preview {
  height: 300px; /* Set a fixed height for all cards */
  padding: 1.5rem;
  background: rgb(53, 50, 50);
}

.articles figure {
  width: 100%;
  height: 200px; /* Set a fixed height for the figure container */
  overflow: hidden;
  position: relative;
}

.articles figure img {
  width: 100%; /* Ensure the image fills the width of the figure container */
  height: 100%; /* Ensure the image fills the height of the figure container */
  object-fit: cover; /* Maintain aspect ratio and cover the entire container */
  object-position: center; /* Center the image within the container */
}

.articles article:hover img {
  transform: scale(1.5);
}

 a {
  text-decoration: none;
}

#project a:hover {
  text-decoration: underline;
  color: aqua;
}

@keyframes zoom {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.badge {
  margin-left: 17px;
  font-family: cursive;
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: 75%;
  font-weight: 700;
  line-height: 2;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
  animation: zoom 2s infinite alternate;
}

/* Styles for the badge color - customize as needed */
.badge-primary {
  color: #ffffff;
  background-color: #ff0051;
}
.article-preview h2 .badge-primary {
  margin-left: 17px;
  color: #ffffff;
  background-color: #2600ff;
}
