/* ==========================================================================
   Patrick.dev — Tistory skin
   컨셉: "GitHub Dark / Terminal". 개발자 취향의 다크 테마.
   - 배경 #0d1117, 카드 #161b22, 시안블루 포인트 #2f81f7 + 그린 #3fb950
   - 본문 Pretendard, 메타·코드·브랜드 JetBrains Mono
   - 레이아웃/클래스는 라이트 버전과 동일 (색·질감만 교체)
   ========================================================================== */

:root {
  /* Palette — GitHub Dark 계열 */
  --bg:          #0d1117;
  --surface:     #161b22;
  --surface-2:   #1c222b;
  --ink:         #e6edf3;
  --ink-2:       #adbac7;
  --muted:       #7d8590;
  --line:        #2b323c;
  --line-soft:   #21262d;

  --accent:      #2f81f7;   /* 시안 블루 (기본 포인트, point-color 로 덮어씀) */
  --accent-2:    #1f6feb;
  --accent-tint: rgba(47, 129, 247, .12);
  --glow:        rgba(47, 129, 247, .28);

  /* 코드 컬러 (일상/꿀팁/개발) — 옐로/그린/블루 */
  --c-daily: #d29922;  /* 일상  — 옐로 */
  --c-tip:   #3fb950;  /* 꿀팁  — 그린 */
  --c-dev:   #2f81f7;  /* 개발  — 블루 */

  /* Type */
  --serif: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
           "Apple SD Gothic Neo", system-ui, sans-serif;   /* 다크 테마: 헤딩도 산세리프 */
  --sans:  "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
           "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --mono:  "JetBrains Mono", "SFMono-Regular", Consolas, "D2Coding", monospace;

  /* Rhythm */
  --wrap: 1200px;
  --gap: 40px;
  --radius: 12px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(1, 4, 9, .5), 0 12px 32px rgba(1, 4, 9, .4);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* --- reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 은은한 그리드 배경 (개발자 감성, 가독성 방해 없이 아주 옅게) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(47, 129, 247, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(63, 185, 80, .06), transparent 55%),
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 48px 100%;
  opacity: .5;
  mask-image: linear-gradient(180deg, #000 0, transparent 620px);
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 620px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input { font: inherit; }
hr { display: none; }
::selection { background: var(--accent); color: #fff; }

/* scrollbar (dark) */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: #3d4753; }

.screen_out { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

#acc-nav a { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 10px 16px;
  background: var(--accent); color: #fff; }
#acc-nav a:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.inner { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ==========================================================================
   Header — 터미널 스타일 마스트헤드
   ========================================================================== */
#header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 17, 23, .78);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
#header .inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { max-height: 34px; width: auto; }
.brand-name {
  font-family: var(--mono); font-weight: 600; font-size: 21px;
  letter-spacing: -.01em; color: var(--ink);
}
/* 브랜드에 터미널 프롬프트 & 커서 */
.brand-name::before { content: "~/"; color: var(--muted); margin-right: 1px; font-weight: 500; }
.brand-name::after {
  content: "_"; color: var(--accent); margin-left: 2px;
  animation: caret 1.15s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* GNB */
#gnb { flex: 1 1 auto; min-width: 0; }
#gnb ul { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
#gnb a {
  display: inline-block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-size: 15px; font-weight: 500;
  transition: color .18s var(--ease), background .18s var(--ease);
}
#gnb a:hover { color: var(--ink); background: var(--surface-2); }
#gnb .c_selected > a, #gnb .selected > a { color: var(--accent); }
#gnb ul ul { display: none; }   /* 서브메뉴는 접어 둠 */

.util { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* search */
.search { position: relative; }
.search input {
  width: 190px; height: 38px; padding: 0 38px 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  transition: width .2s var(--ease), border-color .18s, box-shadow .18s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { width: 230px; border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px var(--accent-tint); }
.search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
}
.search button::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 13px; height: 13px; border: 2px solid var(--muted); border-radius: 50%;
}
.search button::after {
  content: ""; position: absolute; right: 7px; bottom: 7px;
  width: 7px; height: 2px; background: var(--muted); transform: rotate(45deg);
}

/* profile */
.profile { position: relative; }
.profile-toggle { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; padding: 0;
  border: 1px solid var(--line); }
.profile-toggle img { width: 100%; height: 100%; object-fit: cover; }
.profile nav {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 150px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: all .16s var(--ease);
}
.profile.open nav { opacity: 1; visibility: visible; transform: translateY(0); }
.profile nav a { display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink-2); }
.profile nav a:hover { background: var(--surface-2); color: var(--ink); }

/* hamburger (mobile only) */
.menu { display: none; width: 40px; height: 40px; position: relative; }
.menu span { position: absolute; }
.menu::before, .menu::after, .menu > span::after {
  content: ""; position: absolute; left: 9px; right: 9px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: transform .2s var(--ease), opacity .2s;
}
.menu::before { top: 14px; }
.menu > span::after { top: 19px; }
.menu::after { top: 24px; }
body.nav-open .menu::before { transform: translateY(5px) rotate(45deg); }
body.nav-open .menu::after { transform: translateY(-5px) rotate(-45deg); }
body.nav-open .menu > span::after { opacity: 0; }

/* ==========================================================================
   Main slider (promotion)
   ========================================================================== */
.main-slider { max-width: var(--wrap); margin: 28px auto 0; padding: 0 24px; }
.main-slider ul { position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line); }
.main-slider li {
  display: none; position: relative; min-height: 340px;
  background-size: cover; background-position: center;
}
.main-slider li.active, .main-slider ul li:first-child { display: block; }
.main-slider li::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(1,4,9,.75), rgba(1,4,9,.25) 60%, transparent); }
.main-slider .inner, .main-slider a { display: block; height: 100%; position: relative; z-index: 2; }
.main-slider .box { position: absolute; left: 44px; bottom: 44px; right: 44px; color: #fff; }
.main-slider .text {
  display: block; font-family: var(--sans); font-weight: 700; font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.25; text-shadow: 0 2px 20px rgba(0,0,0,.55); max-width: 640px;
}
.main-slider .btn {
  display: inline-block; margin-top: 18px; padding: 11px 22px;
  background: var(--accent); color: #fff; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: transform .18s var(--ease), box-shadow .18s;
}
.main-slider .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--glow); }
.slider-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.slider-dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--line);
  transition: background .18s, width .18s; }
.slider-dots button.active { width: 22px; border-radius: 4px; background: var(--accent); }

/* ==========================================================================
   Editor hero — "latest.md" 배너 (최신 글 피처링, JS로 채움)
   ========================================================================== */
.editor-hero { max-width: var(--wrap); margin: 28px auto 0; padding: 0 24px; }
.editor-hero[hidden] { display: none; }
.editor {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, var(--shadow);
}
.editor-tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px; }
.editor-tabs .tab { display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  color: var(--ink); background: var(--surface-2); box-shadow: inset 0 2px 0 var(--accent);
  border-right: 1px solid var(--line-soft); }
.editor-tabs .tab .d { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.editor-body { display: grid; grid-template-columns: 56px 1fr; }
.editor .gutter { padding: 30px 0; text-align: right; color: var(--muted); font-family: var(--mono);
  font-size: 13px; line-height: 2.05; user-select: none; border-right: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, .12); }
.editor .gutter span { display: block; padding-right: 14px; }
.hero-main { padding: 30px 40px 34px; }
.hero-kicker { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0; }
.hero-kicker b { color: var(--c-tip); font-weight: 500; }
.hero-link { display: block; }
.hero-cat { display: inline-block; font-family: var(--mono); font-size: 13px; color: var(--accent);
  margin: 18px 0 10px; }
.hero-cat::before { content: "// "; color: var(--muted); }
.hero-title { font-family: var(--sans); font-size: clamp(26px, 4vw, 42px); line-height: 1.22;
  font-weight: 800; letter-spacing: -.02em; color: var(--ink); min-height: 1.22em; }
.hero-link:hover .hero-title { color: var(--accent); }
.hero-title .cur { color: var(--accent); font-weight: 400; animation: caret 1.1s steps(1) infinite; }
.hero-excerpt { margin: 16px 0 0; max-width: 60ch; color: var(--ink-2); font-size: 16.5px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { display: flex; align-items: center; gap: 12px; margin-top: 20px;
  font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hero-read { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  padding: 11px 20px; border: 1px solid var(--accent); color: var(--accent); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 14px; font-weight: 500; transition: all .18s var(--ease); }
.hero-read:hover { background: var(--accent); color: #fff; box-shadow: 0 8px 24px var(--glow); transform: translateY(-1px); }
.statusbar { display: flex; align-items: center; background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 12px; font-weight: 500; }
.statusbar span { padding: 6px 12px; border-right: 1px solid rgba(255, 255, 255, .22); }
.statusbar .sb-branch { font-weight: 700; }
.statusbar .grow { flex: 1; border: 0; padding: 0; }

/* ==========================================================================
   Layout — content + sidebar
   ========================================================================== */
.content-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gap);
  max-width: var(--wrap); margin: 0 auto; padding: 40px 24px 72px;
  align-items: start;
}
body.aside-none .content-wrap { grid-template-columns: minmax(0, 1fr); }
body.aside-left .content-wrap { direction: rtl; }
body.aside-left .content-wrap > * { direction: ltr; }

#content { min-width: 0; }
.sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 26px; }

/* ==========================================================================
   Section head (공용) — 터미널 프롬프트 스타일
   ========================================================================== */
.cover-head, .post-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.cover-head h2, .post-header h1 {
  font-family: var(--sans); font-weight: 700; font-size: 21px; color: var(--ink);
  position: relative; padding-left: 22px;
}
.cover-head h2::before, .post-header h1::before {
  content: ">"; position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-weight: 700; color: var(--accent);
}
.post-header h1 { font-size: 23px; display: flex; align-items: baseline; gap: 10px; }
.post-header h1 span { color: var(--muted); font-weight: 500; }
.post-header h1 em { font-style: normal; font-family: var(--mono); font-size: 15px;
  color: var(--accent); font-weight: 500; }
.cover-head .more { font-size: 13px; color: var(--muted); font-weight: 500; font-family: var(--mono); }
.cover-head .more:hover { color: var(--accent); }

.cover { margin-bottom: 44px; }

/* ==========================================================================
   Cover: thumbnail grids
   ========================================================================== */
.cover-thumbnail-1 ul, .cover-thumbnail-3 ul, .cover-thumbnail-4 ul { display: grid; gap: 22px; }
.cover-thumbnail-1 ul { grid-template-columns: repeat(4, 1fr); }
.cover-thumbnail-3 ul { grid-template-columns: repeat(5, 1fr); }
.cover-thumbnail-4 ul { grid-template-columns: repeat(2, 1fr); }

.cover figure { margin: 0 0 12px; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2); aspect-ratio: 3/4; border: 1px solid var(--line); }
.cover-thumbnail-4 figure { aspect-ratio: 16/10; }
.cover figure img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s var(--ease); }
.cover li a:hover figure img { transform: scale(1.04); }
.cover .title { display: block; font-weight: 600; font-size: 15px; line-height: 1.45;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover li a:hover .title { color: var(--accent); }
.cover .excerpt { display: block; margin-top: 5px; font-size: 13px; color: var(--muted);
  line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover .date, .cover .comment { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.cover .meta { display: flex; gap: 12px; margin-top: 6px; }

/* cover-thumbnail-2 : 좌측 썸네일 + 우측 텍스트 리스트 */
.cover-thumbnail-2 ul { display: grid; gap: 18px; }
.cover-thumbnail-2 li a { display: grid; grid-template-columns: 96px 1fr; gap: 16px;
  align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); transition: border-color .18s, box-shadow .18s, transform .18s var(--ease); }
.cover-thumbnail-2 li a:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 26px var(--glow); transform: translateY(-2px); }
.cover-thumbnail-2 figure { width: 96px; margin: 0; aspect-ratio: 1; border-radius: var(--radius-sm); }

/* cover-list */
.cover-list ul { display: grid; gap: 4px; }
.cover-list li a { display: block; padding: 16px; border-radius: var(--radius);
  border-bottom: 1px solid var(--line-soft); transition: background .18s; }
.cover-list li a:hover { background: var(--surface); }
.cover-list .title { font-size: 16px; -webkit-line-clamp: 1; }

/* cover-event */
.cover-event ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cover-event li a { display: flex; align-items: flex-end; min-height: 130px; padding: 18px;
  border-radius: var(--radius); background: var(--accent-tint) center/cover; color: var(--ink);
  position: relative; overflow: hidden; border: 1px solid var(--line); }
.cover-event li a[style*="background-image"] { color: #fff; border-color: transparent; }
.cover-event li a[style*="background-image"]::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent, rgba(1,4,9,.8)); }
.cover-event .title, .cover-event .more { position: relative; z-index: 1; }
.cover-event .title { display: block; font-weight: 600; }
.cover-event .more { font-size: 12px; opacity: .8; font-family: var(--mono); }

/* ==========================================================================
   Post list (index / search / category)
   ========================================================================== */
.post-list-body { display: grid; gap: 18px; }
body.list-type-webzine .post-list-body,
body.list-type-gallery .post-list-body { grid-template-columns: repeat(3, 1fr); gap: 24px; }

.post-item a {
  display: grid; grid-template-columns: 170px 1fr; gap: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; overflow: hidden;
  transition: border-color .18s, box-shadow .2s var(--ease), transform .2s var(--ease);
}
.post-item a:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 30px var(--glow); transform: translateY(-2px); }
.post-item .thum { border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2);
  aspect-ratio: 4/3; }
.post-item .thum:empty { display: none; }
.post-item a:not(:has(.thum img)) { grid-template-columns: 1fr; }
.post-item .thum img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.post-item a:hover .thum img { transform: scale(1.05); }
.post-item .body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.post-item .category {
  align-self: flex-start; font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .02em; color: var(--accent); margin-bottom: 8px;
}
.post-item .category::before { content: "// "; color: var(--muted); }
.post-item .title {
  font-family: var(--sans); font-size: 20px; font-weight: 700; line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-item a:hover .title { color: var(--accent); }
.post-item .excerpt {
  margin-top: 8px; color: var(--ink-2); font-size: 14.5px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-item .meta { margin-top: 12px; font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.post-item.protected .thum { display: grid; place-items: center; }
.post-item.protected .thum::before { content: "🔒"; font-size: 22px; }

/* Webzine/gallery = 세로형 카드 */
body.list-type-webzine .post-item a,
body.list-type-gallery .post-item a { grid-template-columns: 1fr; padding: 0; }
body.list-type-webzine .post-item .thum,
body.list-type-gallery .post-item .thum { aspect-ratio: 16/10; border-radius: 0; }
body.list-type-webzine .post-item .body,
body.list-type-gallery .post-item .body { padding: 18px 20px 22px; }

/* ==========================================================================
   Permalink — post cover (hero) + body
   ========================================================================== */
.post-cover {
  position: relative; background: var(--surface); border-radius: var(--radius);
  padding: 56px 48px; margin-bottom: 32px; overflow: hidden;
  border: 1px solid var(--line);
}
.post-cover[style*="background-image"] { background-size: cover; background-position: center;
  border: 0; min-height: 340px; display: flex; align-items: flex-end; }
.post-cover[style*="background-image"]::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent 30%, rgba(1,4,9,.9)); }
.post-cover .inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 0;
  width: 100%; }
.post-cover[style*="background-image"] .inner { color: #fff; }
.post-cover .category {
  display: inline-block; font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--accent); margin-bottom: 14px; letter-spacing: .01em;
}
.post-cover .category::before { content: "// "; color: var(--muted); }
.post-cover[style*="background-image"] .category { color: #fff; background: rgba(255,255,255,.16);
  padding: 4px 12px; border-radius: 999px; backdrop-filter: blur(4px); }
.post-cover[style*="background-image"] .category::before { content: none; }
.post-cover h1 {
  font-family: var(--sans); font-weight: 800; font-size: clamp(28px, 4vw, 42px);
  line-height: 1.28; color: var(--ink); letter-spacing: -.02em;
}
.post-cover[style*="background-image"] h1 { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.post-cover .meta {
  display: flex; align-items: center; gap: 16px; margin-top: 20px;
  font-size: 14px; color: var(--muted); font-family: var(--mono);
}
.post-cover[style*="background-image"] .meta { color: rgba(255,255,255,.85); }
.post-cover .meta .author { font-weight: 500; color: var(--ink-2); }
.post-cover[style*="background-image"] .meta .author { color: #fff; }
.post-cover.notice .category { color: var(--c-tip); }

/* ==========================================================================
   Entry content — 실제 본문 (가독성 최우선)
   ========================================================================== */
.entry-content {
  max-width: 760px; margin: 0 auto; padding: 8px 0 20px;
  font-size: 17px; line-height: 1.85; color: var(--ink-2); word-break: keep-all;
}
.entry-content > * + * { margin-top: 1.4em; }
.entry-content p { margin: 0 0 1.4em; }
.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--sans); color: var(--ink); line-height: 1.4; margin: 2.2em 0 .7em; scroll-margin-top: 90px;
}
.entry-content h2 { font-size: 26px; padding-bottom: .35em; border-bottom: 1px solid var(--line); }
.entry-content h3 { font-size: 21px; }
.entry-content h4 { font-size: 18px; }
.entry-content a { color: var(--accent); text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px; transition: text-decoration-color .18s; }
.entry-content a:hover { text-decoration-color: var(--accent); }
.entry-content strong { font-weight: 700; color: var(--ink); }
.entry-content img { border-radius: var(--radius-sm); margin-left: auto; margin-right: auto;
  border: 1px solid var(--line); }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 8px; }

.entry-content blockquote {
  margin: 1.8em 0; padding: 14px 20px; border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2);
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 1.4em 0; }
.entry-content li { margin: .4em 0; }
.entry-content ul > li { list-style: disc; }
.entry-content ol > li { list-style: decimal; }
.entry-content li::marker { color: var(--accent); }

/* code — 개발 글용 (GitHub Dark) */
.entry-content code {
  font-family: var(--mono); font-size: .88em; background: rgba(110,118,129,.18);
  padding: .15em .4em; border-radius: 5px; border: 1px solid var(--line-soft);
  color: #79c0ff;
}
.entry-content pre {
  font-family: var(--mono); background: #0b0f16; color: #e6edf3;
  padding: 20px 22px; border-radius: var(--radius); overflow-x: auto; font-size: 14.5px;
  line-height: 1.7; margin: 1.8em 0; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
}
.entry-content pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 1em; }

.entry-content table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 15px;
  display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--surface-2); font-weight: 600; color: var(--ink); }
.entry-content tr:nth-child(even) td { background: rgba(110,118,129,.05); }
.entry-content hr { display: block; border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }

/* tags */
.tags { max-width: 760px; margin: 8px auto 0; padding: 24px 0; }
.tags h2 { font-family: var(--mono); font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.tags a, .tags .cloud a {
  display: inline-block; margin: 0 8px 8px 0; padding: 6px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: 13px; color: var(--ink-2); transition: all .16s var(--ease);
}
.tags a::before { content: "#"; color: var(--muted); margin-right: 2px; }
.tags a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.cover .tags a::before { content: none; }

/* related */
.related-articles { max-width: 760px; margin: 32px auto 0; padding-top: 32px;
  border-top: 1px solid var(--line); }
.related-articles h2 { font-family: var(--sans); font-size: 20px; margin-bottom: 18px; }
.related-articles ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.related-articles figure { margin: 0 0 10px; aspect-ratio: 16/10; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.related-articles figure img { width: 100%; height: 100%; object-fit: cover; }
.related-articles .title { font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-articles li a:hover .title { color: var(--accent); }

/* comments / guestbook */
.comments, .tt-comments-wrap { max-width: 760px; margin: 40px auto 0; }
.comments { padding-top: 36px; border-top: 1px solid var(--line); }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px;
  margin-top: 48px; }
.pagination a {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: var(--radius-sm); font-size: 14.5px; color: var(--ink-2);
  font-family: var(--mono); transition: all .16s var(--ease); border: 1px solid transparent;
}
.pagination a:hover { background: var(--surface); border-color: var(--line); }
.pagination a.selected, .pagination a[class*="selected"] { background: var(--accent); color: #fff; }
.pagination .prev, .pagination .next { color: var(--muted); }
.pagination .no_more_prev, .pagination .no_more_next { opacity: .35; pointer-events: none; }

/* not-found / protected */
.not-found { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; color: var(--ink-2); }
.not-found ul { display: none; }
.not-found ul:first-child { display: block; }
.not-found li { position: relative; padding-left: 18px; margin: 8px 0; }
.not-found li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); }
.protected_form { max-width: 420px; margin: 40px auto; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 32px; }
.protected_form h2 { font-family: var(--sans); font-size: 22px; margin-bottom: 8px; }
.protected_form p { color: var(--muted); margin: 0 0 20px; }
.protected_form input { width: 100%; height: 44px; padding: 0 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--surface-2); color: var(--ink); }
.protected_form input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-tint); }
.protected_form .btn, .btn { display: inline-block; width: 100%; height: 44px; background: var(--accent);
  color: #fff; border-radius: var(--radius-sm); font-weight: 600; transition: background .16s, box-shadow .18s; }
.protected_form .btn:hover { background: var(--accent-2); box-shadow: 0 6px 20px var(--glow); }

/* ==========================================================================
   Sidebar widgets
   ========================================================================== */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; }
.widget h2 { font-family: var(--sans); font-size: 16px; margin-bottom: 16px; color: var(--ink); }

/* category */
.widget.category { padding: 18px 14px; }
.widget.category .category_list, .widget.category ul { display: flex; flex-direction: column; }
.widget.category a { display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14.5px;
  transition: background .16s, color .16s; }
.widget.category a:hover { background: var(--surface-2); color: var(--ink); }
.widget.category .c_cnt, .widget.category .cnt { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.widget.category ul ul { margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); }
.widget.category ul ul a { font-size: 13.5px; color: var(--muted); }

/* recent notice */
.widget.notice ul { display: flex; flex-direction: column; gap: 2px; }
.widget.notice a { display: block; padding: 7px 0; font-size: 14px; color: var(--ink-2);
  position: relative; padding-left: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget.notice a::before { content: ""; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--c-tip); }
.widget.notice a:hover { color: var(--accent); }

/* tab-ui (recent/popular, social) */
.tab-head { display: flex; gap: 4px; margin-bottom: 16px; background: var(--surface-2);
  padding: 4px; border-radius: 999px; }
.tab-btn { flex: 1; padding: 8px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); transition: all .16s var(--ease); }
.tab-btn.active { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.tab-list { display: none; }
.tab-list.active { display: block; }
.tab-list h2 { margin-bottom: 12px; }

.post-list.tab-ui li a, .recent-comment li a { display: block; }
.post-list.tab-ui li a {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft);
}
.post-list.tab-ui li:last-child a { border-bottom: 0; }
.post-list.tab-ui img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm);
  background: var(--surface-2); }
.post-list.tab-ui .title { font-size: 13.5px; line-height: 1.45; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-list.tab-ui li a:hover .title { color: var(--accent); }
.post-list.tab-ui .date { display: block; font-size: 11.5px; color: var(--muted);
  font-family: var(--mono); margin-top: 3px; }

/* recent comment */
.recent-comment li { border-bottom: 1px solid var(--line-soft); }
.recent-comment li:last-child { border-bottom: 0; }
.recent-comment a { padding: 10px 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-comment a:hover { color: var(--accent); }

/* visitor count */
.widget.count .total { font-family: var(--mono); font-size: 30px; font-weight: 500; color: var(--accent);
  margin: 0 0 4px; letter-spacing: -.02em; }
.widget.count .count-row { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.widget.count .count-row b { font-family: var(--mono); color: var(--ink-2); font-weight: 500; }

/* social channels */
.social-channel ul { display: flex; gap: 10px; flex-wrap: wrap; }
.social-channel a { width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; color: var(--ink-2); font-weight: 700; font-size: 13px;
  transition: all .16s var(--ease); }
.social-channel a:hover { background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 6px 18px var(--glow); }
.social-channel .facebook a::before { content: "f"; }
.social-channel .instagram a::before { content: "◎"; }
.social-channel .twitter a::before { content: "X"; }
.social-channel .youtube a::before { content: "▶"; }

/* ==========================================================================
   Footer
   ========================================================================== */
#footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
#footer .inner { position: relative; padding-top: 40px; padding-bottom: 48px; text-align: center; }
.order-menu { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 4px; margin-bottom: 16px; }
.order-menu a { padding: 6px 14px; font-size: 14px; color: var(--ink-2); font-weight: 500; border-radius: 6px; }
.order-menu a:hover { color: var(--accent); background: var(--surface-2); }
#footer .meta { font-size: 13.5px; color: var(--ink-2); margin: 4px 0; }
#footer .copyright { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; font-family: var(--mono); }
.page-top { position: absolute; right: 24px; top: 34px; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); transition: all .18s var(--ease); }
.page-top::before { content: ""; width: 10px; height: 10px; border-top: 2px solid var(--ink-2);
  border-right: 2px solid var(--ink-2); transform: rotate(-45deg); margin-top: 3px; }
.page-top:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-3px);
  box-shadow: 0 8px 22px var(--glow); }
.page-top:hover::before { border-color: #fff; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --gap: 28px; }
  .content-wrap { grid-template-columns: minmax(0, 1fr) 260px; }
  .cover-thumbnail-1 ul { grid-template-columns: repeat(3, 1fr); }
  .cover-thumbnail-3 ul { grid-template-columns: repeat(4, 1fr); }
  .related-articles ul { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  #header .inner { gap: 14px; }
  .menu { display: block; }
  .search { display: none; }
  /* mobile GNB drawer */
  #gnb {
    position: fixed; inset: 68px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .2s var(--ease);
    max-height: calc(100vh - 68px); overflow-y: auto;
  }
  body.nav-open #gnb { transform: translateY(0); opacity: 1; visibility: visible; }
  #gnb ul { flex-direction: column; align-items: stretch; gap: 2px; }
  #gnb a { padding: 12px 10px; font-size: 16px; border-radius: var(--radius-sm); }

  .content-wrap { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar > div { flex: 1 1 100%; }
  .sidebar-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .sidebar-2 .widget { margin: 0; }

  body.list-type-webzine .post-list-body,
  body.list-type-gallery .post-list-body { grid-template-columns: repeat(2, 1fr); }
  .cover-event ul { grid-template-columns: repeat(2, 1fr); }
  .post-cover { padding: 40px 28px; }
  .editor-body { grid-template-columns: 40px 1fr; }
  .editor .gutter { padding: 26px 0; }
  .hero-main { padding: 26px 22px 30px; }
}

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .inner, .main-slider, .content-wrap { padding-left: 18px; padding-right: 18px; }
  .brand-name { font-size: 19px; }
  .main-slider li { min-height: 240px; }
  .main-slider .box { left: 22px; right: 22px; bottom: 24px; }

  .cover-thumbnail-1 ul, .cover-thumbnail-3 ul { grid-template-columns: repeat(2, 1fr); }
  .cover-thumbnail-4 ul, .cover-event ul { grid-template-columns: 1fr; }

  .post-item a { grid-template-columns: 108px 1fr; gap: 14px; padding: 14px; }
  .post-item .title { font-size: 17px; }
  .post-item .excerpt { display: none; }

  body.list-type-webzine .post-list-body,
  body.list-type-gallery .post-list-body { grid-template-columns: 1fr; }

  .post-cover { padding: 32px 20px; }
  .entry-content { font-size: 16.5px; }
  .related-articles ul { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sidebar-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .brand-name::after { animation: none; }
}
