body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: radial-gradient(1px 1px at 25% 25%, rgba(255, 255, 255, 0.9) 50%, transparent), radial-gradient(2px 2px at 50% 50%, rgba(255, 255, 255, 0.8) 50%, transparent), radial-gradient(3px 3px at 75% 75%, rgba(255, 255, 255, 0.7) 50%, transparent);
  background-size: 200px 200px, 300px 300px, 400px 400px;
  animation: twinkle 4s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}
@keyframes twinkle {
  0% {
    opacity: 0.3;
  }
  100% {
    opacity: 0.7;
  }
}
.blog-index {
  padding: 4rem 0;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}
.blog-index h1 {
  font-family: var(--font-family);
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: 3.5rem;
  color: #fff;
  text-align: center;
  padding: 0 1rem;
  display: inline-block;
  max-width: 90%;
  line-height: 1.1;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}
.posts-grid article.post-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  max-width: 1200px;
  margin: 0 auto 4rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.posts-grid article.post-card:first-child .post-thumbnail {
  height: auto;
  padding-top: 56.25%;
}
.posts-grid article.post-card:first-child .post-content {
  padding: 2.5rem;
}
.posts-grid article.post-card:first-child .post-content h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}
.posts-grid article.post-card:first-child .post-content h2 a {
  color: #1a1a1a;
  text-decoration: none;
  text-shadow: none;
}
.posts-grid article.post-card:first-child .post-content .description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #444;
}
.posts-grid article.post-card:first-child .post-content .post-meta {
  font-size: 1rem;
  color: #555;
}
.posts-grid article.post-card:first-child .post-content .tags .tag {
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
}
@media (max-width: 1200px) {
  .posts-grid article.post-card:first-child {
    grid-template-columns: 1fr;
  }
  .posts-grid article.post-card:first-child .post-thumbnail {
    height: 300px;
    border-radius: 12px 12px 0 0;
  }
  .posts-grid article.post-card:first-child .post-thumbnail img {
    border-radius: 12px 12px 0 0;
  }
}
@media (max-width: 768px) {
  .blog-index {
    padding: 2rem 0;
  }
  .blog-index h1 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
  }
  .posts-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
    gap: 2rem;
  }
  .posts-grid article.post-card:first-child {
    margin-bottom: 2rem;
  }
  .posts-grid article.post-card:first-child .post-content {
    padding: 1.5rem;
  }
  .posts-grid article.post-card:first-child .post-content h2 {
    font-size: 1.8rem;
  }
}
.post-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.4s, box-shadow 0.4s, border 0.4s;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  height: 100%;
  display: flex;
  flex-direction: column;
  perspective: 1000px;
  backdrop-filter: blur(10px);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: #ffffff;
}
.post-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  transform-style: preserve-3d;
}
.post-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
  backface-visibility: hidden;
}
.post-card:hover .post-thumbnail img {
  transform: scale(1.75);
}
.post-thumbnail::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 1;
}
.post-card:hover .post-thumbnail::after {
  opacity: 1;
}
.post-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.post-content h2 {
  font-family: var(--font-family);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.post-content h2 a {
  color: #000;
  text-decoration: none;
}
.post-content h2 a:hover {
  color: #007a7a;
}
.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.description {
  color: #222;
  margin-bottom: 1rem;
  line-height: 1.6;
  flex-grow: 1;
}
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.tags .tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  border-radius: 0 999px 999px 0;
  transition: all 0.4s ease;
  text-decoration: none;
  width: fit-content;
  cursor: pointer;
  /* Teal */
  /* Indigo */
  /* Amber */
  /* Pink */
  /* Emerald */
  /* Purple */
  /* Red */
  /* Blue */
  /* Cyan */
  /* Orange */
}
.tags .tag:nth-child(1) {
  background: #00b3b3;
}
.tags .tag:nth-child(2) {
  background: #6366f1;
}
.tags .tag:nth-child(3) {
  background: #f59e0b;
}
.tags .tag:nth-child(4) {
  background: #ec4899;
}
.tags .tag:nth-child(5) {
  background: #10b981;
}
.tags .tag:nth-child(6) {
  background: #8b5cf6;
}
.tags .tag:nth-child(7) {
  background: #ef4444;
}
.tags .tag:nth-child(8) {
  background: #3b82f6;
}
.tags .tag:nth-child(9) {
  background: #06b6d4;
}
.tags .tag:nth-child(10) {
  background: #f97316;
}
.tags .tag:hover {
  transform: translateX(3px);
  opacity: 0.9;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}
/* Tags container for blog index */
.tags-container-index {
  position: relative;
  /* Hide tags beyond the 5th by default */
  /* Show all tags on hover */
  /* Expand hint */
}
.tags-container-index .tags {
  transition: all 0.3s ease;
}
.tags-container-index .tag-hidden {
  display: none;
}
.tags-container-index:hover .tag-hidden {
  display: inline-flex;
  animation: fadeIn 0.3s ease forwards;
}
.tags-container-index .tags-expand-hint {
  display: inline-block;
  font-size: 0.7rem;
  color: #888;
  margin-left: 0.5rem;
  font-style: italic;
  transition: opacity 0.3s ease;
}
.tags-container-index:hover .tags-expand-hint {
  opacity: 0;
  pointer-events: none;
}
article.post-card:first-child .tags .tag {
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}
.pagination a {
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.pagination a:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
article.post-card:first-child .post-content h2 a {
  color: #000;
  text-decoration: none;
  text-shadow: none;
}
article.post-card:first-child .post-content .description {
  color: #222;
}
article.post-card:first-child .post-content .post-meta {
  color: #333;
}
