@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap");
body {
  margin: 20px 0;
  font-family: "Raleway";
  font-size: 14px;
  font-weight: 500;
  background-color: #000;
  -webkit-font-smoothing: antialiased;
}

.title {
  font-family: "Raleway";
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

p {
  line-height: 1.5em;
}

h1 + p, p + p {
  margin-top: 10px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.card-link {
  display: block;
  margin: 10px;
  text-decoration: none;
  color: inherit;
}

.card-link .card-wrap {
  margin: 0;
}

.card-wrap {
  margin: 10px;
  transform: perspective(1200px);
  transform-style: preserve-3d;
  cursor: pointer;
}
.card-wrap:hover .card-info {
  transform: translateY(0);
}
.card-wrap:hover .card-info p {
  opacity: 1;
}
.card-wrap:hover .card-info, .card-wrap:hover .card-info p {
  transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-wrap:hover .card-info:after {
  transition: 3s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 1;
  transform: translateY(0);
}
.card-wrap:hover .card-bg {
  transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 4s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0.8;
}
.card-wrap:hover .card {
  transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: none;
}

.card {
  position: relative;
  width: 320px;
  height: 320px;
  background-color: #000;
  overflow: hidden;
  box-shadow: rgba(0, 0, 0, 0.66) 0 30px 60px 0, inset #333 0 0 0 5px, inset rgba(255, 255, 255, 0.4) 0 0 0 6px;
  transition: 0.8s cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.card-bg {
  opacity: 0.5;
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100%;
  height: 100%;
  padding: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transition: 0.8s cubic-bezier(0.445, 0.05, 0.55, 0.95), opacity 4s 0.8s cubic-bezier(0.445, 0.05, 0.55, 0.95);
  pointer-events: none;
}

.card-info {
  padding: 20px;
  position: absolute;
  bottom: 0;
  color: #fff;
  transform: translateY(40%);
  transition: 0.6s 1.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.card-info p {
  opacity: 0;
  text-shadow: black 0 2px 3px;
  transition: 0.6s 1.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.card-info * {
  position: relative;
  z-index: 1;
}
.card-info:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
  background-blend-mode: overlay;
  opacity: 0;
  transform: translateY(100%);
  transition: 5s 1s cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

.card-info h1 {
  font-family: "Raleway", sans-serif;
  font-size: 36px;
  font-weight: 700;
  text-shadow: rgba(0, 0, 0, 0.5) 0 10px 10px;
}

/*  sm btn styles  */
.twitter-btn {
  position: fixed;
  margin: auto;
  bottom: 0;
  background-color: #1da1f2;
  border: 0.15em solid #1da1f2;
  border-left: none;
  border-bottom: none;
  border-radius: 0% 100% 0% 0%/0% 100% 0% 93%;
  height: 50px;
  width: 50px;
  cursor: pointer;
}

.in-btn {
  position: fixed;
  margin: auto;
  bottom: 0;
  right: 0;
  border: 0.15em solid #0072b1;
  border-right: none;
  border-bottom: none;
  border-radius: 100% 0% 0% 0%/100% 0% 0% 0%;
  background-color: #0072b1;
  height: 50px;
  width: 50px;
  cursor: pointer;
}

.fa-twitter {
  position: absolute;
  left: 0em;
  right: 0.4em;
  top: 0.5em;
  bottom: 0;
  color: #fff;
  font-size: 1.8em;
}

.fa-linkedin-in {
  position: absolute;
  left: 0.4em;
  right: 0em;
  top: 0.55em;
  bottom: 0;
  color: #fff;
  font-size: 1.8em;
}

.in-btn:hover {
  background-color: #000;
}

.twitter-btn:hover {
  background-color: #000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    padding: 20px 10px;
  }
  
  .card {
    width: 280px; /* Slightly smaller for tablets to fit better */
    height: 280px;
  }

  .card-info h1 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px 5px;
  }

  .card-link {
    width: 100%; /* Single column on mobile for better visibility */
    margin: 10px 0;
    display: flex;
    justify-content: center;
  }

  .card {
    width: 90vw; /* Fill most of the screen width */
    max-width: 360px;
    height: 90vw;
    max-height: 360px;
  }

  .card-info h1 {
    font-size: 24px;
  }
  
  .card-info p {
    font-size: 13px;
  }
}