/* === Post list grid === */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* === Post card container === */
.post-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* === Post image === */
.post-card img {
  width: 100%;
  height: 180px;        /* keeps images a uniform height */
  object-fit: cover;    /* crops while preserving aspect ratio */
  display: block;
}

/* === Post content === */
.post-card-content {
  padding: 0.75rem 1rem;
}

/* Title */
.post-card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
  color: #222;
}

/* Summary (clamped to 3 lines) */
.post-card p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-line-clamp: 3;   /* show max 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Responsive tweaks === */
@media (max-width: 600px) {
  .post-card img {
    height: 150px; /* slightly smaller images on mobile */
  }
}

.project-content {
  padding: 1rem;
  flex-grow: 1;
}

.project-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* === Card Images with Smooth Zoom === */
.project-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* === Gradient Overlay + Title Reveal === */
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:hover::after {
  opacity: 1;
}
.project-card h3 {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  margin: 0;
  color: #fff;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:hover h3 {
  opacity: 1;
}

/* === Tag Pills === */
.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  margin: 0.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  white-space: nowrap;
}

/* === Link Underline Animation === */
a {
  position: relative;
  text-decoration: none;
  color: inherit;
}
a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: #2575fc;
  transition: width 0.3s ease;
}
a:hover::after {
  width: 100%;
}

/* === Glowing Border on Hover (optional for featured cards) === */
.project-card.featured:hover {
  border: 2px solid #6a11cb;
  box-shadow: 0 0 16px #6a11cb66;
}

/* === Projects Grid === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Optional padding for section */
.projects {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* === Single Project Page === */
.project-single {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.project-header {
  text-align: center;
  margin-bottom: 2rem;
}

.project-hero {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.project-body {
  font-size: 1.05rem;
  line-height: 1.6;
}

.project-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
}

.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.project-card-link:hover {
  transform: translateY(-6px);
}

.project-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.project-thumb img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
  border-radius: 12px;
}

.project-card-link:hover img {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.project-card-link:hover .overlay {
  opacity: 1;
}

.overlay h3 {
  margin: 0;
  font-size: 1.25rem;
  text-align: center;
}
