/* ===== Blog styles — extends styles.css (shares :root variables) ===== */

.blog-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
}

/* ---- Post list ---- */
.post-list { max-width: 780px; }

.post-list-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

.post-empty { color: var(--text-secondary); font-family: var(--font-mono); }

.post-index {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.post-index-item a {
  display: block;
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}

.post-index-item a:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}

/* Thumbnail banner */
.post-thumb {
  width: 100%;
  aspect-ratio: 640 / 300;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.post-index-item a:hover .post-thumb img { transform: scale(1.04); }

.post-card-body { padding: 1.5rem 1.8rem; }

.post-index-item time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-green);
}

.post-index-item h2 {
  font-size: 1.3rem;
  margin: 0.4rem 0 0.6rem;
  color: var(--text-primary);
}

.post-index-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

/* ---- Tags ---- */
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}

/* ---- Single post ---- */
.post { max-width: 760px; }

.post-back {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 2rem;
  transition: opacity 0.2s;
}
.post-back:hover { opacity: 0.7; }

.post-banner {
  width: 100%;
  aspect-ratio: 640 / 300;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid rgba(0, 240, 255, 0.1);
}

.post-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ---- Post body (markdown output) ---- */
.post-body { color: var(--text-primary); font-size: 1.05rem; line-height: 1.8; }

.post-body h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.post-body h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.8rem;
  color: var(--accent);
}

.post-body p { margin-bottom: 1.3rem; color: var(--text-secondary); }
.post-body strong { color: var(--text-primary); }

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

.post-body ul, .post-body ol {
  margin: 0 0 1.3rem 1.5rem;
  color: var(--text-secondary);
}
.post-body li { margin-bottom: 0.5rem; }

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1.2rem;
  margin: 1.5rem 0;
  background: rgba(0, 240, 255, 0.04);
  color: var(--text-secondary);
  font-style: italic;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(0, 240, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  color: var(--accent);
}

.post-body pre {
  background: var(--bg-secondary);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.post-body img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid rgba(0, 240, 255, 0.1);
  margin: 2.5rem 0;
}

@media (max-width: 768px) {
  .blog-main { padding: 6.5rem 1.5rem 3rem; }
}
