/* =============================================================
   Obsidian Publish — Baseline 테마 설정 복제 (publish.css)
   -------------------------------------------------------------
   출처 볼트 : deanjung
   원본 테마 : Baseline v3.2.11 (by Alexis C)
   복제 기준 : .obsidian/plugins/obsidian-style-settings/data.json
   폰트      : LXGW WenKai KR  (https://github.com/lxgw/LxgwWenkaiKR)

   ※ Publish 사이트는 앱 테마(theme.css)를 쓰지 않으므로, Baseline
     Style Settings 값을 Obsidian 코어 CSS 변수로 옮겨 담았습니다.
     강조색·기본 글자 굵기 등 사용자가 변경하지 않은 값은 코어 기본값
     (= Publish 기본값)과 동일하여 별도 지정하지 않았습니다.
   ============================================================= */


/* =============================================================
   1. 폰트 — LXGW WenKai KR (전체 적용)
   -------------------------------------------------------------
   저장소에 TTF만 제공되어 jsDelivr로 직접 불러옵니다.
   사용 가능한 굵기: Light(300) / Regular(400) / Medium(500)  — Bold 없음
   본문=Regular(400), 제목=Medium(500), 굵게=600(Medium 기반 합성)
   ============================================================= */

@font-face {
  font-family: "LXGW WenKai KR";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/lxgw/LxgwWenkaiKR@0.901/fonts/TTF/LXGWWenKaiKR-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "LXGW WenKai KR";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/lxgw/LxgwWenkaiKR@0.901/fonts/TTF/LXGWWenKaiKR-Medium.ttf") format("truetype");
}

/* 가는 굵기(300)가 필요하면 아래 주석을 해제하세요. (추가 ~14MB 다운로드)
@font-face {
  font-family: "LXGW WenKai KR";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/gh/lxgw/LxgwWenkaiKR@0.901/fonts/TTF/LXGWWenKaiKR-Light.ttf") format("truetype");
}
*/

/* 본문·인터페이스 글꼴을 LXGW WenKai KR로 지정 (코드 블록은 모노스페이스 유지) */
body,
.theme-light,
.theme-dark {
  --font-text:
    "LXGW WenKai KR", "Apple SD Gothic Neo", "Noto Sans KR",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-interface:
    "LXGW WenKai KR", "Apple SD Gothic Neo", "Noto Sans KR",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Baseline 내부 변수도 함께 지정(이중 안전망) */
  --font-text-theme: var(--font-text);
  --font-interface-theme: var(--font-interface);
}

/* 변수 미적용 환경 대비 — 본문 컨테이너에 직접 폰트 지정 */
.published-container,
.markdown-preview-view,
.markdown-rendered {
  font-family: var(--font-text);
}


/* =============================================================
   2. 공통 — 타이포 / 글자 굵기 / 모서리 / 표 / 간격
   (라이트·다크 공용 값)
   ============================================================= */
body {
  /* ---- 제목 크기 & 굵기 (Style Settings: h1~h6) ---- */
  --h1-size: 1.5em;     --h1-weight: 500;
  --h2-size: 1.125rem;  --h2-weight: 500;
  --h3-size: 1em;       --h3-weight: 500;
  --h4-size: .875rem;   --h4-weight: 500;
  --h5-size: .75rem;    --h5-weight: 500;
  --h6-size: .75rem;    --h6-weight: 500;

  /* ---- 굵게(bold) = 기본 400 + bold-modifier 200 = 600 ---- */
  --font-weight: 400;
  --bold-weight: 600;

  /* ---- 모서리 반경 (Style Settings: tag-radius / checkbox-radius) ---- */
  --tag-radius: 16px;
  --checkbox-radius: 100px;

  /* ---- 표 교차행 배경 끄기 (Style Settings: row-alt) ---- */
  --table-row-alt-background: var(--background-primary);
  --table-row-alt-background-hover: var(--background-primary);

  /* ---- readable-spacing: 제목 여백을 본문 간격에 맞춰 촘촘하게 ---- */
  --heading-spacing: var(--p-spacing);
}

/* readable-spacing: 제목 줄간격을 보통(normal)으로 */
.markdown-preview-view :is(h1, h2, h3, h4, h5, h6),
.markdown-rendered :is(h1, h2, h3, h4, h5, h6) {
  line-height: var(--line-height-normal);
}


/* =============================================================
   3. 라이트 모드 색상 (Style Settings @@light)
   ============================================================= */
.theme-light {
  --background-primary:          #FCFCFC;
  --background-secondary:        #FFFFFF;
  --background-modifier-hover:   #F0F0F0;
  --background-modifier-border:  #E8E8E8;

  --icon-color:  #646464;

  --text-normal: #444444;
  --text-muted:  #838383;
  --text-faint:  #BBBBBB;

  /* 제목 색상 (h1~h4 + 인라인 제목). h5/h6는 본문색을 따름 = 원본과 동일 */
  --inline-title-color: #202020;
  --h1-color: #202020;
  --h2-color: #202020;
  --h3-color: #202020;
  --h4-color: #202020;
}


/* =============================================================
   4. 다크 모드 색상 (Style Settings @@dark)
   ============================================================= */
.theme-dark {
  --background-primary:          #0B0B0B;
  --background-primary-alt:      #161616;
  --background-secondary:        #0F0F0F;
  --background-modifier-hover:   #222222;
  --background-modifier-border:  #222222;

  --icon-color:  #B5B5B5;

  --text-normal: #C8C8C8;
  --text-muted:  #7B7B7B;
  --text-faint:  #606060;

  /* 제목 색상 (h1~h4 + 인라인 제목). h5/h6는 본문색을 따름 = 원본과 동일 */
  --inline-title-color: #EEEEEE;
  --h1-color: #EEEEEE;
  --h2-color: #EEEEEE;
  --h3-color: #EEEEEE;
  --h4-color: #EEEEEE;
}


/* =============================================================
   5. 변수 미반영 대비 직접 규칙 (안전망)
   Publish 코어가 해당 변수를 쓰지 않을 경우를 대비해 직접 지정
   ============================================================= */
.tag {
  border-radius: var(--tag-radius);
}

input[type="checkbox"],
.task-list-item-checkbox {
  border-radius: var(--checkbox-radius);
}
