/* ─── POST LAYOUT ─── */
.post-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

/* ─── ARTICLE ─── */
.post-header { margin-bottom: 2rem; }

.post-big-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  letter-spacing: -.02em;
  line-height: 1.25;
  margin: .75rem 0;
}

.post-lead {
  font-size: clamp(.82rem, 2vw, .9rem);
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: .5rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  font-size: clamp(.62rem, 1.8vw, .72rem);
}

.post-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tag-pill {
  padding: .2rem .6rem;
  background: rgba(120,80,255,.1);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: clamp(.58rem, 1.5vw, .65rem);
  color: var(--purple-light);
}

.post-thumbnail { border-radius: 12px; overflow: hidden; margin-bottom: 2rem; border: 1px solid var(--border); }
.post-thumbnail img { width: 100%; max-height: 420px; object-fit: cover; }

/* ─── CONTENT TYPOGRAPHY ─── */
.post-content {
  font-size: clamp(.84rem, 2vw, .88rem);
  line-height: 1.9;
  color: var(--text-muted);
  word-break: break-word;
  overflow-wrap: break-word;
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 .75rem;
}
.post-content h2 { font-size: clamp(1.05rem, 3vw, 1.3rem); }
.post-content h3 { font-size: clamp(.95rem, 2.5vw, 1.1rem); }
.post-content p  { margin-bottom: 1.25rem; }
.post-content a  { color: var(--purple-light); text-decoration: underline; text-underline-offset: 3px; }

/* Inline code */
.post-content code {
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent);
  font-size: clamp(.75rem, 1.8vw, .83rem);
  border: 1px solid var(--border);
  word-break: break-all;
}

/* Code block */
.post-content pre {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 1.1rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
  max-width: 100%;
}
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: clamp(.72rem, 1.8vw, .8rem);
  word-break: normal;
  white-space: pre;
}

.post-content blockquote {
  border-left: 3px solid var(--purple);
  margin: 1.5rem 0;
  padding: .75rem 1.1rem;
  background: rgba(120,80,255,.05);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: clamp(.8rem, 2vw, .88rem);
}

.post-content ul,
.post-content ol { margin: 1rem 0 1rem 1.5rem; }
.post-content li { margin-bottom: .4rem; font-size: clamp(.82rem, 2vw, .88rem); }

.post-content img {
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  max-width: 100%;
  height: auto;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: clamp(.72rem, 1.8vw, .82rem);
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.post-content th,
.post-content td { padding: .65rem 1rem; border: 1px solid var(--border); text-align: left; white-space: nowrap; }
.post-content th  { background: var(--surface2); color: var(--accent); }
.post-content hr  { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ─── SHARE ─── */
.post-share {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.share-label { font-size: .7rem; color: var(--text-dim); letter-spacing: .1em; text-transform: uppercase; }
.share-btn {
  padding: .38rem .9rem;
  background: rgba(120,80,255,.1);
  border: 1px solid var(--border2);
  border-radius: 5px;
  font-size: .72rem;
  color: var(--purple-light);
  transition: all .2s;
}
.share-btn:hover { background: var(--purple); color: #fff; }
.btn-back {
  display: inline-flex;
  padding: .6rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 6px;
  font-size: .75rem;
  color: var(--text-muted);
  transition: all .25s;
}
.btn-back:hover { border-color: var(--purple); color: var(--accent); }

/* ─── SIDEBAR ─── */
.post-sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.sidebar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.related-item {
  display: flex;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  transition: opacity .2s;
  text-decoration: none;
  color: inherit;
}
.related-item:last-child { border-bottom: none; }
.related-item:hover { opacity: .75; }
.related-img { width: 54px; height: 42px; object-fit: cover; border-radius: 5px; flex-shrink: 0; border: 1px solid var(--border); }
.related-img-ph { display: flex; align-items: center; justify-content: center; background: var(--surface2); font-size: 1.1rem; }
.related-title { font-size: .75rem; color: var(--text); line-height: 1.3; margin-bottom: .2rem; }
.related-date  { font-size: .63rem; color: var(--text-dim); }
.author-box    { text-align: center; }
.author-avatar { font-size: 2.5rem; margin-bottom: .5rem; }
.author-name   { font-family: 'Syne', sans-serif; font-weight: 700; font-size: .9rem; margin-bottom: .3rem; }
.author-bio    { font-size: .72rem; color: var(--text-muted); line-height: 1.6; margin-bottom: .75rem; }
.author-link   { font-size: .7rem; color: var(--purple-light); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .post-layout {
    grid-template-columns: 1fr !important;
    padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem !important;
    gap: 2rem !important;
  }
  .post-sidebar { position: static !important; }
}

@media (max-width: 600px) {
  .post-layout {
    padding: calc(var(--nav-h) + 1rem) 1rem 3rem !important;
  }
  .post-thumbnail img { max-height: 200px; }
  .sidebar-card { padding: 1rem; }
  .blog-footer {
    flex-direction: column !important;
    text-align: center !important;
    padding: 1.25rem 1rem !important;
  }
}

/* Fix konten dari TinyMCE */
.post-content * { max-width: 100%; }
.post-content pre {
  overflow-x: auto !important;
  white-space: pre !important;
  word-break: normal !important;
  -webkit-overflow-scrolling: touch;
}
.post-content pre code {
  white-space: pre !important;
  word-break: normal !important;
  display: block;
}
.post-content img {
  height: auto !important;
}
.post-content table {
  display: block !important;
  overflow-x: auto !important;
}