/* ==========================================================================
   WHITEVISION — 공용 스타일
   실제 배포 시 static/css/style.css 로 그대로 사용한다.

   근거 수치 (참고 사이트 실측):
   - 폰트: bzcf.io 본문과 동일한 "Times New Roman", "Nanum Myeongjo", serif
   - 본문 폭 680px: bzcf.io 본문 실측값
   - line-height 1.8: bzcf.io 1.75 / klarciel.net 2.0 사이, elizabethtai.com의
     넉넉한 문단 간격을 문단 margin(1.25em)으로 반영
   - DeepBlue #0c0a8e: klarciel.net 포인트 컬러와 동일
   ========================================================================== */

:root {
  --bg: #ffffff;
  --text: #000000;
  --accent: #0c0a8e;   /* DeepBlue — 링크, 강조, 제목 밑줄 */
  --mark: #ffe94d;     /* <mark><em><strong> 노란 하이라이트 */
  --gray: #767676;
  --rule: #e6e6e6;
  --code-bg: #f6f6f6;
}

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Times New Roman", "Nanum Myeongjo", serif;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--accent); color: #fff; }

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   상단 헤더 (모든 페이지 공통)
   -------------------------------------------------------------------------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 44px 0 8px;
}

.site-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.site-title a { color: var(--text); }
.site-title a:hover { color: var(--accent); text-decoration: none; }

.site-nav { font-size: .92rem; }
.site-nav a { color: var(--gray); margin-left: 14px; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* --------------------------------------------------------------------------
   메인 페이지: 검색창 + 최근 글 목록 (게시판형)
   -------------------------------------------------------------------------- */

.search { margin: 22px 0 36px; }

.search input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: .95rem;
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

.search input:focus { outline: none; border-color: var(--accent); }
.search input::placeholder { color: #b3b3b3; }

.post-list { list-style: none; margin: 0; padding: 0; }

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 13px 2px;
  border-bottom: 1px solid #f1f1f1;
}

.post-list li:first-child { border-top: 1px solid var(--rule); }

.post-list a { color: var(--text); }
.post-list a:hover { color: var(--accent); text-decoration: none; }

.post-list time {
  color: var(--gray);
  font-size: .88rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   글 본문
   -------------------------------------------------------------------------- */

.post-header { margin: 36px 0 40px; }

.post-header h1 {
  margin: 0 0 12px;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.45;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--accent);
}

.post-meta {
  display: flex;
  gap: 16px;
  color: var(--gray);
  font-size: .9rem;
}

.post-meta .tags a { color: var(--gray); }
.post-meta .tags a:hover { color: var(--accent); }

.post-content p { margin: 0 0 1.25em; }

.post-content h2 {
  margin: 2.3em 0 .9em;
  font-size: 1.3rem;
  line-height: 1.5;
}

.post-content h3 {
  margin: 2em 0 .8em;
  font-size: 1.12rem;
}

/* 강조 규칙:
   **굵게**            → 검은색 볼드
   ***강조***          → DeepBlue 볼드 (em > strong)
   <mark><em><strong>  → 노란 배경 하이라이트                       */

strong { font-weight: 700; }

em > strong {
  font-style: normal;   /* 한글 이탤릭 회피 */
  color: var(--accent);
}

mark {
  background: var(--mark);
  color: var(--text);
  padding: 1px 3px;
}

mark em { font-style: normal; }
mark em > strong { color: var(--text); }

.post-content blockquote {
  margin: 1.6em 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--accent);
  color: #444;
}

.post-content blockquote p { margin: .4em 0; }

code, pre, kbd { font-family: Consolas, "Courier New", Courier, monospace; }

code {
  background: var(--code-bg);
  font-size: .86em;
  padding: 2px 5px;
  border-radius: 3px;
}

pre {
  background: var(--code-bg);
  border: 1px solid #ececec;
  border-radius: 4px;
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.65;
  margin: 1.6em 0;
}

pre code { background: none; padding: 0; font-size: .84rem; }

/* 이미지: 관리자가 <img width="..."> 로 크기 지정, 모바일에서는 자동 축소 */

.post-content figure { margin: 2.2em 0; text-align: center; }
.post-content img { max-width: 100%; height: auto; }

.post-content figcaption {
  margin-top: 10px;
  font-size: .85rem;
  color: var(--gray);
}

.post-content ul,
.post-content ol { margin: 0 0 1.25em; padding-left: 1.5em; }
.post-content li { margin: .35em 0; }

.post-content hr { border: 0; border-top: 1px solid var(--rule); margin: 3em auto; }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: .92rem;
}

.post-content th,
.post-content td {
  border: 1px solid var(--rule);
  padding: 8px 12px;
  text-align: left;
  line-height: 1.6;
}

.post-content th { background: #fafafa; }

.post-footer { margin-top: 56px; font-size: .92rem; }

/* --------------------------------------------------------------------------
   태그 목록 (/tags/)
   -------------------------------------------------------------------------- */

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.tag-list a { color: var(--text); }
.tag-list a:hover { color: var(--accent); text-decoration: none; }
.tag-list .count { color: var(--gray); font-size: .85rem; }

/* --------------------------------------------------------------------------
   하단 Contacts (모든 페이지 공통)
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: .92rem;
  color: var(--gray);
}

.site-footer .contacts a { margin-left: 16px; }

/* --------------------------------------------------------------------------
   모바일
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  html { font-size: 16px; }

  .site-header {
    flex-direction: column;
    gap: 2px;
    padding-top: 32px;
  }

  .site-nav a { margin-left: 0; margin-right: 14px; }
  .post-list li { gap: 14px; }
  .post-header h1 { font-size: 1.45rem; }
}
