/* ============================================================
   post.css — Dark Design System v2
   ============================================================ */

.post-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 32px 16px 64px;
  overflow-x: hidden;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
.post-main {
  min-width: 0;
  overflow: hidden;
}

/* ---- Article Card ---- */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.post-card__header {
  padding: 32px 32px 0;
}
.post-title {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 14px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.post-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.post-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(244,114,182,.1);
  color: var(--accent);
  border: 1px solid rgba(244,114,182,.2);
}
.post-banner {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  margin-bottom: 0;
}
.post-body {
  padding: 28px 32px;
}

/* ---- Content Typography ---- */
.post-content {
  font-size: 15px;
  line-height: 1.8;
  color: #475569;
  overflow: hidden;
  word-break: break-word;
}
.post-content h1, .post-content h2, .post-content h3 {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 12px;
  line-height: 1.3;
}
.post-content h1 { font-size: 24px; }
.post-content h2 { font-size: 20px; }
.post-content h3 { font-size: 17px; }
.post-content p { margin-bottom: 14px; }
.post-content ul, .post-content ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.post-content li { margin-bottom: 6px; }
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--primary-dark); }
.post-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 18px 0;
  padding: 12px 20px;
  background: rgba(251,146,60,.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #475569;
  font-style: italic;
}
.post-content code {
  background: rgba(249,115,22,.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--primary);
}
.post-content pre {
  background: #0F172A;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  overflow-x: auto;
  margin-bottom: 14px;
}
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #475569;
}
.post-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 14px 0;
}
.post-content strong { color: var(--text); font-weight: 600; }
.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ---- Related Articles ---- */
.post-related {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.post-related__title {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-related__title::before {
  content: '';
  display: block;
  width: 3px;
  height: 17px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 2px;
}
.post-related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.post-related__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
}
.post-related__item:hover {
  border-color: var(--border-bright);
  background: var(--bg-hover);
}
.post-related__img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card2);
}
.post-related__info { flex: 1; min-width: 0; }
.post-related__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-related__date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---- Sidebar ---- */
.post-sidebar { position: sticky; top: calc(var(--header-h) + 20px); }
.post-sidebar__box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.post-sidebar__title {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-sidebar__title::before {
  content: '';
  display: block;
  width: 3px;
  height: 15px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 2px;
}
.post-sidebar__list { display: flex; flex-direction: column; gap: 2px; }
.post-sidebar__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition);
}
.post-sidebar__item:hover { background: var(--bg-hover); }
.post-sidebar__img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card2);
}
.post-sidebar__info { flex: 1; min-width: 0; }
.post-sidebar__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-sidebar__date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
}
@media (max-width: 600px) {
  .post-container { padding: 20px 12px 48px; }
  .post-card__header { padding: 22px 18px 0; }
  .post-body { padding: 20px 18px; }
  .post-title { font-size: 22px; }
  .post-related__grid { grid-template-columns: 1fr; }
  .post-related { padding: 20px; }
}
