/* ====== Base layout for single posts ====== */
.single-post .entry-content,
.single-post .post-content,
.single-post .post-inner,
.single-post .site-main article {
  max-width: 720px;         /* comfortable reading width */
  margin: 0 auto 4rem auto; /* center + bottom space */
  padding: 0 1.5rem;        /* side padding on small screens */
  font-size: 1.05rem;
  line-height: 1.8;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Noto Sans KR", sans-serif;
  color: #222;
}

/* Body background and contrast */
body.single-post {
  background: #f5f5f7;
}

.single-post .site-main article {
  background: #fff;
  border-radius: 12px;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

/* ====== Headings hierarchy ====== */
.single-post .entry-content h1,
.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4,
.single-post .entry-content h5,
.single-post .entry-content h6 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Noto Sans KR", sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.single-post .entry-content h1 { font-size: 2rem; }
.single-post .entry-content h2 { font-size: 1.6rem; }
.single-post .entry-content h3 { font-size: 1.3rem; }
.single-post .entry-content h4 { font-size: 1.15rem; }

/* Tighten spacing when heading comes right after another element */
.single-post .entry-content h2:first-child,
.single-post .entry-content h3:first-child {
  margin-top: 0;
}

/* ====== Paragraphs & links ====== */
.single-post .entry-content p {
  margin: 0 0 1.2em;
}

.single-post .entry-content a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
  transition: color 0.16s ease, border-color 0.16s ease;
}

.single-post .entry-content a:hover {
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.7);
}

/* ====== Lists ====== */
.single-post .entry-content ul,
.single-post .entry-content ol {
  margin: 0 0 1.5em 1.3em;
  padding-left: 1.1em;
}

.single-post .entry-content li {
  margin: 0.25em 0;
}

/* ====== Images & figures ====== */
.single-post .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 1.5rem auto;
}

.single-post .entry-content figure {
  margin: 1.5rem 0;
  text-align: center;
}

.single-post .entry-content figcaption {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

/* ====== Blockquotes ====== */
.single-post .entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid #3b82f6;
  background: #f1f5f9;
  border-radius: 8px;
  font-style: italic;
  color: #111827;
}

.single-post .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

/* ====== Code blocks ====== */
.single-post .entry-content pre,
.single-post .entry-content code {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
               "Courier New", monospace;
  font-size: 0.9rem;
}

.single-post .entry-content pre {
  background: #020617;
  color: #e5e7eb;
  padding: 1.1rem 1.3rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.single-post .entry-content code {
  background: #e5e7eb;
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

/* ====== Tables ====== */
.single-post .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.single-post .entry-content th,
.single-post .entry-content td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem 0.9rem;
}

.single-post .entry-content th {
  background: #f3f4f6;
  font-weight: 600;
}

/* ====== Meta (title, date, categories) ====== */
.single-post .entry-title {
  max-width: 720px;
  margin: 0.5rem auto 0.75rem auto;
  padding: 0 1.5rem;
  font-size: 2.1rem;
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
}

.single-post .entry-meta {
  max-width: 720px;
  margin: 0  auto 1.5rem auto;
  padding: 0 1.5rem;
  font-size: 0.9rem;
  color: #6b7280;
}

/* ====== Mobile tweaks ====== */
@media (max-width: 768px) {
  .single-post .entry-content,
  .single-post .post-content,
  .single-post .post-inner,
  .single-post .site-main article,
  .single-post .entry-title,
  .single-post .entry-meta {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .single-post .entry-title {
    font-size: 1.7rem;
  }

  .single-post .entry-content {
    font-size: 1rem;
    line-height: 1.75;
  }
}

.post-tags {
  overflow: hidden;
  flex-wrap: wrap;
  word-break: break-word;
}

.post-tags .tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
