/* ================================
   INDIVIDUAL BLOG POST STYLES
   ================================ */

.blog-post {
  max-width: 900px;
  margin: 140px auto 80px;
  padding: 60px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Blog Title */
.blog-post h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
  line-height: 1.2;
  text-align: center;
  animation: slideInDown 0.8s ease-out 0.2s backwards;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Blog Meta */
.blog-meta {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  animation: fadeIn 0.8s ease-out 0.4s backwards;
}

.blog-author,
.blog-date {
  font-size: 1rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-author {
  font-style: italic;
  font-weight: 500;
}

.blog-author::before {
  content: '✍️';
  font-style: normal;
}

.blog-date {
  font-weight: 600;
  color: var(--color-primary-light);
}

.blog-date::before {
  content: '📅';
}

/* Blog Image */
.blog-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0 auto 40px;
  display: block;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeIn 0.8s ease-out 0.6s backwards;
}

.blog-image:hover {
  transform: scale(1.01);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(99, 102, 241, 0.08);
}

/* Blog Content */
.blog-content {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  white-space: pre-wrap;
  text-align: left;
  margin-bottom: 50px;
  animation: fadeIn 0.8s ease-out 0.8s backwards;
}

.blog-content p {
  margin-bottom: 20px;
}

.blog-content strong {
  color: var(--color-primary-light);
  font-weight: 700;
}

.blog-content em {
  color: var(--color-secondary-light);
  font-style: italic;
}

.blog-content a {
  color: var(--color-primary-light);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.blog-content a:hover {
  color: var(--color-secondary-light);
}

/* Back Link Button */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.8s ease-out 1s backwards;
}

.back-link::before {
  content: '←';
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.back-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}

.back-link:hover::after {
  left: 100%;
}

.back-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
}

.back-link:hover::before {
  transform: translateX(-3px);
}

/* Loading State */
.blog-post.loading {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-post.loading::before {
  content: 'Loading...';
  font-size: 1.4rem;
  color: var(--color-primary-light);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
  .blog-post {
    margin: 120px 20px 60px;
    padding: 40px 30px;
  }

  .blog-post h1 {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .blog-meta {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
  }

  .blog-author,
  .blog-date {
    justify-content: center;
    font-size: 0.9rem;
  }

  .blog-image {
    margin-bottom: 30px;
    border-radius: var(--radius-md);
  }

  .blog-content {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 40px;
  }

  .back-link {
    width: 100%;
    justify-content: center;
    padding: 14px 28px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .blog-post {
    padding: 30px 20px;
    margin: 100px 15px 40px;
  }

  .blog-post h1 {
    font-size: 1.75rem;
  }

  .blog-content {
    font-size: 1rem;
  }
}