@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@500;700&family=Noto+Serif+KR:wght@400;500;700&display=swap');

/* parksehee.blog 가독성 개선 (theme: retrospect) */

/* 1. 한글 웹폰트 — 라틴 Literata + 한글 본명조 */
.entry-content,
.wp-block-post-title,
.wp-block-post-excerpt {
  font-family: Literata, "Noto Serif KR", serif;
}

/* 2. 본문 — 굵기 300→400, 행간 1.65→1.8 */
.entry-content p,
.entry-content li {
  font-weight: 400;
  line-height: 1.8;
}

/* 3. 제목 위계 복원 — 글 제목 > H2 > H3 > 본문 */
.wp-block-post-title {
  font-size: 2rem !important;
  line-height: 1.35;
}
.entry-content h1.wp-block-heading,
.entry-content h2.wp-block-heading {
  font-size: 1.5rem !important;
  font-weight: 700;
  line-height: 1.45;
  margin: 3.25rem 0 0.75rem !important;
}
.entry-content h3.wp-block-heading {
  font-size: 1.2rem !important;
  font-weight: 700;
  line-height: 1.5;
  margin: 2.25rem 0 0.5rem !important;
}

/* 4. 링크 — 공유 버튼 제외하고 색 부여 */
.entry-content a:not(.sd-button):not(.sd-link-color):not(.wp-block-button__link) {
  color: #1a5490;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.entry-content a:hover:not(.sd-button):not(.sd-link-color):not(.wp-block-button__link) {
  color: #0f3a66;
}

/* 5. 인용문 */
.entry-content blockquote.wp-block-quote {
  border-left: 3px solid #d4d4d4;
  padding-left: 1.15rem;
  margin: 2rem 0 2rem 0.25rem !important;
  color: #555;
}
.entry-content blockquote.wp-block-quote p { color: #555; }

/* 6. 목록 항목 간격 (공유 버튼 목록은 원상 유지) */
.entry-content li { margin-bottom: 0.45em; }
.entry-content .sharedaddy li { margin-bottom: 0; }

/* 7. 구분선 */
.entry-content hr { margin: 3rem 0 !important; }

/* 8. 메타 텍스트 대비 4.23:1 → 5.3:1 */
.wp-block-post-date, .wp-block-post-date a,
.wp-block-post-terms, .wp-block-post-terms a { color: #6b6b6b !important; }

/* 9. 단 너비 상한 720px → 660px */
.entry-content { max-width: 660px !important; }

/* 10. 사이트 제목 — 글 페이지에서는 <p>로 렌더되므로 행간 고정 */
.wp-block-site-title,
.wp-block-site-title a { font-family: Inter, sans-serif; line-height: 1; margin: 0; }

/* ===== 2026-09-06 한글 조판 보정 ===== */

/* 1. 한글 줄바꿈을 어절 단위로 (break-word 는 음절 중간을 끊음) */
body, h1, h2, h3, h4, h5, h6, p, li, a, figcaption,
.wp-block-post-title, .wp-block-post-excerpt__excerpt,
.wp-block-latest-posts__list a, .wp-block-post-terms, .wp-block-heading {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 2. 소제목 한글 폴백 — 고딕 유지, OS별 편차 제거 */
.entry-content h1.wp-block-heading,
.entry-content h2.wp-block-heading,
.entry-content h3.wp-block-heading,
.entry-content h4.wp-block-heading,
.entry-content h5.wp-block-heading,
.entry-content h6.wp-block-heading {
  font-family: Inter, 'Pretendard Variable', Pretendard, 'Noto Sans KR', sans-serif;
}

/* 3. h4 가 h3 보다 크던 위계 역전 교정 (h2 24 > h3 19.2 > h4 17) */
.entry-content h4.wp-block-heading {
  font-size: 17px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 8px;
}

/* 4. 대표 이미지가 첫 화면을 통째로 덮지 않도록 */
.wp-block-post-featured-image img {
  max-height: 320px;
  width: 100%;
  object-fit: cover;
}

/* 5. 홈 화면 발췌문 — weight 300 은 한글 명조에 얇음 */
.wp-block-post-excerpt__excerpt {
  font-weight: 400;
  line-height: 1.75;
}

/* 6. 사이드바 최근 글 행간 */
.wp-block-latest-posts__list a { line-height: 1.6; }

/* 7. 사이드바 밀도 — sticky 블록이 화면 안에 들어오도록 */
.wp-block-columns.alignwide > .wp-block-column:first-child header.wp-block-template-part > .wp-block-group.alignfull {
  padding-top: 32px !important;
  padding-bottom: 32px !important;
}
.wp-block-columns.alignwide > .wp-block-column:first-child div.wp-block-template-part > .wp-block-group > * + * {
  margin-block-start: 28px;
}

/* 8. 모바일 — 사이드바를 본문 아래로, 사이트명·메뉴는 위에 유지 */
@media (max-width: 781px) {
  .wp-block-columns.alignwide { display: flex; flex-direction: column; }
  .wp-block-columns.alignwide > .wp-block-column:first-child,
  .wp-block-columns.alignwide > .wp-block-column:first-child > .wp-block-group,
  .wp-block-columns.alignwide div.wp-block-template-part,
  .wp-block-columns.alignwide div.wp-block-template-part > .wp-block-group { display: contents; }
  .wp-block-columns.alignwide header.wp-block-template-part { order: 1; }
  .wp-block-columns.alignwide nav.wp-block-navigation { order: 2; }
  .wp-block-columns.alignwide > .wp-block-column:last-child { order: 3; }
  .wp-block-columns.alignwide div.wp-block-template-part > .wp-block-group > .wp-block-group { order: 4; margin-top: 40px; }
  .wp-block-columns.alignwide ul.wp-block-social-links { order: 5; margin-top: 28px; }
}

/* 8-1. 모바일 — 푸터 크레딧이 사이드바보다 뒤에 오도록 */
@media (max-width: 781px) {
  .wp-block-columns.alignwide > .wp-block-column:last-child { display: contents; }
  .wp-block-columns.alignwide > .wp-block-column:last-child > main { order: 3; }
  .wp-block-columns.alignwide footer.wp-block-template-part { order: 6; margin-top: 40px; }
}

/* 9. 글 메타(날짜·태그)와 본문 사이 여백 */
.single .entry-content.wp-block-post-content { margin-top: 2.5rem; }
@media (max-width: 781px) {
  .single .entry-content.wp-block-post-content { margin-top: 2rem; }
}
