/* ─── Blog Listing Page ──────────────────────────────────────────────────── */

.blog-listing-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
  min-height: 80vh;
}

.blog-header {
  margin-bottom: 4rem;
}

.blog-header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.blog-subtitle {
  font-size: 1rem;
  color: rgba(250, 254, 249, 0.55);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  display: block;
  text-decoration: none;
}

.post-card__link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  padding: 1.75rem 2rem;
  border: 1.5px solid rgba(250, 254, 249, 0.08);
  border-radius: 14px;
  background: rgba(250, 254, 249, 0.02);
  text-decoration: none;
  color: var(--color-white);
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}

.post-card__link:hover {
  border-color: rgba(74, 243, 173, 0.35);
  background: rgba(74, 243, 173, 0.05);
  transform: translateX(4px);
}

.post-card__tag {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-secondary);
  font-weight: 600;
  white-space: nowrap;
  min-width: 100px;
}

.post-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-white);
  flex: 1;
}

.post-card__date {
  font-size: 0.8rem;
  color: rgba(250, 254, 249, 0.4);
  white-space: nowrap;
}

/* ─── Individual Post Page ───────────────────────────────────────────────── */

.post-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 7rem 2rem 6rem;
}

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

.post-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.post-meta {
  font-size: 0.85rem;
  color: rgba(250, 254, 249, 0.45);
}

/* ─── Post body content ──────────────────────────────────────────────────── */

.post-body {
  font-size: clamp(1rem, 1.1vw, 1.05rem);
  line-height: 1.85;
}

.post-body h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  color: var(--color-main);
  margin: 2.75rem 0 1rem;
}

.post-body h3 {
  font-size: 1.2rem;
  color: var(--color-white);
  margin: 2rem 0 0.75rem;
}

.post-body p {
  margin-bottom: 1.35rem;
  color: rgba(250, 254, 249, 0.88);
}

.post-body a {
  color: var(--color-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover {
  color: var(--color-white);
}

.post-body ul, .post-body ol {
  margin: 0 0 1.35rem 1.5rem;
  color: rgba(250, 254, 249, 0.88);
}

.post-body li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.post-body blockquote {
  border-left: 3px solid var(--color-main);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 1.5rem 0;
  color: rgba(250, 254, 249, 0.7);
  font-style: italic;
}

.post-body code {
  background: rgba(74, 243, 173, 0.1);
  color: var(--color-main);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.post-body pre {
  background: rgba(3, 31, 34, 0.8);
  border: 1px solid rgba(74, 243, 173, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-body pre code {
  background: none;
  padding: 0;
  font-size: 0.9rem;
  color: var(--color-white);
}

/* ─── YouTube embed ──────────────────────────────────────────────────────── */

.youtube-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin: 2.5rem 0;
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ─── Visualization container ────────────────────────────────────────────── */

.vis-container {
  margin: 2.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(74, 243, 173, 0.04);
  border: 1px solid rgba(74, 243, 173, 0.15);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Back link ──────────────────────────────────────────────────────────── */

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: rgba(250, 254, 249, 0.5);
  text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color 0.2s;
  min-height: 44px;
}

.post-back:hover {
  color: var(--color-main);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .post-card__link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .post-card__date {
    margin-top: 0.25rem;
  }
}
