/* Technical Skills Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(
    4,
    minmax(280px, 1fr)
  ); /* 4 columns with min width */
  gap: 24px;
  max-width: 1400px;
  width: 90%; /* Control grid width */
  margin: 60px auto; /* Center the grid */
  justify-content: center; /* Center grid items */
}

.card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: 100%; /* Ensure consistent height */
}

.card-header {
  display: flex;
  flex-direction: row; /* icon beside title */
  align-items: center;
  text-align: left;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lts {
  flex: 1 1 auto; /* allow text area to take remaining space */
  text-align: left;
  min-width: 0; /* allow text wrapping inside flex */
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 5px 0;
  margin-left: -17px;
  line-height: 1.3;
}

.level {
  margin-left: -17px;
}

.icon {
  width: 100px; /* keep fixed icon size */
  height: 100px;
  border-radius: 12px;
  flex: 0 0 100px; /* prevent shrinking */
  overflow: hidden; /* ensure image cannot escape container */
  padding: 0; /* remove internal spacing */
  background: transparent; /* avoid unexpected backgrounds */
}

.icon img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fill the container without distortion */
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 10px; /* match container rounding */
}
.level.D {
  background: linear-gradient(45deg, #94346f, #ca17c1);
  color: white;
}
.level.C {
  background: linear-gradient(45deg, #f5863d, #cf5b0ee1);
  color: white;
}
.level.M {
  background: linear-gradient(45deg, #5d87e2, #d12ac9);
  color: white;
}
.level.AI {
  background: linear-gradient(45deg, #677fe9ea, #2ca049);
  color: white;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.3s ease;
}

.tag:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border-color: transparent;
  transform: translateY(-1px);
}

/* Card hover effects matching the image */
.frontend:hover {
  background: linear-gradient(360deg, #dcefff, #ddeaf3);
}
.backend:hover {
  background: linear-gradient(180deg, #effefb, #d6f7da);
}
.cloud:hover {
  background: linear-gradient(180deg, #f7f2ee, #fae0bf);
}
.mobile:hover {
  background: linear-gradient(180deg, #ece8ec, #ffe8ff);
}
.design:hover {
  background: linear-gradient(180deg, #ece8ec, #ffe8ff);
}
.ai:hover {
  background: linear-gradient(360deg, #cde9ce, #e6e9ec);
}
