/* ============================================================
   POST — single blog post page specific styles
   Requires: style.css (base)
   ============================================================ */

/* --- Giscus comments widget --- */

.comments {
  margin-bottom: 2rem;
}

.comments h2 {
  margin-bottom: 1.25rem;
}

.giscus,
.giscus-frame {
  width: 100%;
  border: none;
  color-scheme: dark;
}

/* --- Article wrapper --- */

.post-article {
  max-width: 870px;
  margin: 0 auto;
  width: 100%;
  padding: 3rem 1.5rem 2rem;
}

/* --- Post header --- */

.post-header {
  margin-bottom: 1.8rem;
}

.post-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.6rem;
}

.post-meta {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.post-meta a {
  color: var(--color-primary);
  margin-left: 0.4rem;
  text-decoration: none;
}

/* --- Hero image --- */

.post-hero img {
  width: 100%;
  border-radius: 12px;
  margin: 0.75rem 0 2rem;
  display: block;
}

/* --- Post content --- */

.post-content {
  padding: 0;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1.2rem;
}

.post-content h2 {
  margin-top: 2rem;
}

.post-content code {
  font-family: var(--font-code);
  background: rgba(0, 255, 234, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.92em;
}

.post-content pre {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.2rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.2rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.9rem;
}

/* --- Share bar --- */

.post-share {
  margin: 2rem 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.post-share a {
  color: var(--color-primary);
  text-decoration: none;
}

/* --- Related posts --- */

.related-posts {
  margin-bottom: 2rem;
}

.related-posts h2 {
  margin-bottom: 1rem;
}

.related-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scrollbar-width: thin;
}

.related-carousel .card {
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.9rem;
  flex-shrink: 0;
}

.related-carousel .card-img {
  height: 130px;
  background: linear-gradient(135deg, #334, #112);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  width: 100%;
  object-fit: cover;
  display: block;
}

.related-carousel .card p {
  margin: 0;
  font-size: 0.95rem;
}

/* --- Comments --- */

.comments {
  margin-bottom: 2rem;
}

.comments h2 {
  margin-bottom: 1rem;
}

.comments form {
  display: grid;
  gap: 1rem;
}

.comments label {
  font-size: 0.95rem;
  color: var(--color-muted);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.comments input,
.comments textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #e8e8e8;
  font-family: var(--font-body);
  font-size: 1rem;
}

.comments input:focus,
.comments textarea:focus {
  outline: 2px solid var(--color-primary);
  border-color: transparent;
}

.comments button {
  justify-self: start;
}
