/*
Theme Name: IT Stack Papa
Theme URI: https://itstackpapa.com
Description: GeneratePress child theme for IT Stack Papa. Tuned for Korean
             long-form technical writing: wide CLI output, dense tables,
             and callout boxes for the lab-environment disclosure.
Author: mate
Template: generatepress
Version: 0.2.0
*/

/* =========================================================================
   1. TYPE SCALE & KOREAN TYPOGRAPHY
   Korean text needs more line-height than English. Web fonts are avoided
   on purpose: ad scripts already cost enough, so the font stack is local.
   ========================================================================= */

:root {
	--isp-text:        #24292f;
	--isp-text-muted:  #57606a;
	--isp-border:      #d8dee4;
	--isp-bg-subtle:   #f6f8fa;
	--isp-accent:      #0969da;
	--isp-warn-bg:     #fff8e5;
	--isp-warn-border: #d4a72c;
	--isp-code-bg:     #1f2328;
	--isp-code-text:   #e6edf3;

	--isp-font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
	            "Pretendard", "Malgun Gothic", "맑은 고딕",
	            "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
	--isp-mono: ui-monospace, SFMono-Regular, "SF Mono", "D2Coding",
	            "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

body {
	font-family: var(--isp-font);
	color: var(--isp-text);
	font-size: 17px;
	line-height: 1.8;              /* Korean needs more air than English */
	letter-spacing: -0.003em;
	word-break: keep-all;          /* do not break inside Korean words */
	overflow-wrap: break-word;
}

.entry-content p { margin-bottom: 1.5em; }

/* Headings: clear hierarchy, generous space above so sections breathe */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
	line-height: 1.4;
	letter-spacing: -0.02em;
	font-weight: 700;
}
.entry-content h2 {
	font-size: 1.65em;
	margin: 2.6em 0 0.9em;
	padding-bottom: 0.35em;
	border-bottom: 2px solid var(--isp-border);
}
.entry-content h3 { font-size: 1.3em;  margin: 2.1em 0 0.7em; }
.entry-content h4 { font-size: 1.1em;  margin: 1.8em 0 0.6em; }

.entry-title { letter-spacing: -0.025em; line-height: 1.35; }

/* Comfortable measure. Long CLI output still escapes via its own scroller. */
.entry-content > * { max-width: 46rem; }
.entry-content > .isp-wide,
.entry-content > pre,
.entry-content > .wp-block-table,
.entry-content > figure { max-width: 100%; }

/* =========================================================================
   2. CODE — the single most important element on this site
   ONTAP / shell output is wide. Never wrap it: wrapping makes aligned
   column output unreadable. Scroll horizontally inside the block instead.
   ========================================================================= */

.entry-content pre,
.entry-content pre.wp-block-code,
.entry-content .wp-block-preformatted {
	background: var(--isp-code-bg);
	color: var(--isp-code-text);
	font-family: var(--isp-mono);
	font-size: 13.5px;
	line-height: 1.65;
	padding: 1.1em 1.25em;
	border-radius: 6px;
	overflow-x: auto;              /* the block scrolls, never the page */
	tab-size: 4;
	margin: 1.6em 0;
	-webkit-overflow-scrolling: touch;
}

/* WordPress core ships `white-space: pre-wrap` on .wp-block-code, which
   re-wraps aligned CLI output and destroys the columns. Override it on both
   the <pre> and the inner <code>, and undo body-level keep-all/break rules
   that would otherwise still fold long lines. */
.entry-content pre,
.entry-content pre.wp-block-code,
.entry-content pre.wp-block-code code,
.entry-content .wp-block-preformatted,
.entry-content pre code {
	white-space: pre !important;
	word-break: normal !important;
	overflow-wrap: normal !important;
	word-wrap: normal !important;
}
.entry-content pre code {
	background: none;
	color: inherit;
	padding: 0;
	font-size: inherit;
	display: block;
	min-width: max-content;        /* let short lines share the scroll width */
}

/* Inline code: never split an identifier mid-token. Wrapping happens at
   spaces only, so `vserver cifs show` breaks between words, not inside them. */
.entry-content :not(pre) > code {
	background: var(--isp-bg-subtle);
	color: #0550ae;
	font-family: var(--isp-mono);
	font-size: 0.88em;
	padding: 0.15em 0.4em;
	border-radius: 4px;
	border: 1px solid var(--isp-border);
	word-break: keep-all;
	overflow-wrap: break-word;     /* only if a single token exceeds the line */
}

/* Visible scrollbar so readers notice the block is scrollable */
.entry-content pre::-webkit-scrollbar { height: 10px; }
.entry-content pre::-webkit-scrollbar-track { background: #2d333b; border-radius: 0 0 6px 6px; }
.entry-content pre::-webkit-scrollbar-thumb { background: #57606a; border-radius: 5px; }
.entry-content pre::-webkit-scrollbar-thumb:hover { background: #768390; }

/* =========================================================================
   3. TABLES — this series uses a lot of them
   ========================================================================= */

.entry-content .wp-block-table,
.entry-content figure.wp-block-table {
	overflow-x: auto;              /* narrow screens scroll the table only */
	margin: 1.8em 0;
	-webkit-overflow-scrolling: touch;
}
.entry-content table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.94em;
	line-height: 1.65;
}
.entry-content th,
.entry-content td {
	border: 1px solid var(--isp-border);
	padding: 0.6em 0.85em;
	text-align: left;
	vertical-align: top;
}
.entry-content th {
	background: var(--isp-bg-subtle);
	font-weight: 700;
	white-space: nowrap;           /* headers stay on one line */
}
.entry-content tbody tr:nth-child(even) { background: #fbfcfd; }
.entry-content td code { white-space: nowrap; }

/* =========================================================================
   4. CALLOUTS
   Every article carries a lab-environment disclosure. Give it a home.
   Usage: blockquote, or a paragraph/div with .isp-note / .isp-warn
   ========================================================================= */

.entry-content blockquote {
	border-left: 4px solid var(--isp-accent);
	background: var(--isp-bg-subtle);
	margin: 1.8em 0;
	padding: 1em 1.25em;
	color: var(--isp-text-muted);
	font-style: normal;            /* italic Korean is hard to read */
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.isp-warn {
	border-left: 4px solid var(--isp-warn-border);
	background: var(--isp-warn-bg);
	padding: 1em 1.25em;
	margin: 1.8em 0;
	border-radius: 0 6px 6px 0;
}
.isp-note {
	border-left: 4px solid var(--isp-accent);
	background: #f0f6ff;
	padding: 1em 1.25em;
	margin: 1.8em 0;
	border-radius: 0 6px 6px 0;
}
.isp-warn > :last-child,
.isp-note > :last-child { margin-bottom: 0; }

/* =========================================================================
   5. LISTS / LINKS / IMAGES
   ========================================================================= */

.entry-content ul,
.entry-content ol { padding-left: 1.4em; margin-bottom: 1.5em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content li > ul,
.entry-content li > ol { margin-top: 0.5em; margin-bottom: 0.5em; }

.entry-content a {
	color: var(--isp-accent);
	text-decoration: underline;
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}
.entry-content a:hover { text-decoration-thickness: 2px; }

.entry-content img { border-radius: 6px; height: auto; }
.entry-content figcaption {
	font-size: 0.85em;
	color: var(--isp-text-muted);
	text-align: center;
	margin-top: 0.6em;
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--isp-border);
	margin: 2.6em 0;
}

/* =========================================================================
   6. SITE CHROME
   ========================================================================= */

.site-header { border-bottom: 1px solid var(--isp-border); }
.main-title { letter-spacing: -0.02em; }
.site-description { color: var(--isp-text-muted); letter-spacing: -0.01em; }

.entry-meta { color: var(--isp-text-muted); font-size: 0.88em; }

.site-info {
	border-top: 1px solid var(--isp-border);
	color: var(--isp-text-muted);
	font-size: 0.9em;
}

/* =========================================================================
   7. MOBILE
   ========================================================================= */

@media (max-width: 768px) {
	body { font-size: 16px; line-height: 1.75; }
	.entry-content h2 { font-size: 1.4em;  margin-top: 2.1em; }
	.entry-content h3 { font-size: 1.18em; }
	.entry-content pre { font-size: 12.5px; padding: 0.9em 1em; }
	.entry-content table { font-size: 0.88em; }
	.entry-content th, .entry-content td { padding: 0.5em 0.6em; }
}

/* Inline code: other stylesheets set word-break:break-all, which splits
   identifiers mid-token ("vser|ver cifs show"). Force keep-all so a break
   can only happen at a space. */
.entry-content :not(pre) > code,
.entry-content p code,
.entry-content li code,
.entry-content td code,
.entry-content th code {
	word-break: keep-all !important;
	overflow-wrap: normal !important;
	white-space: nowrap;
}
/* On narrow screens allow a long single token to wrap rather than overflow. */
@media (max-width: 480px) {
	.entry-content :not(pre) > code {
		white-space: normal;
		overflow-wrap: break-word !important;
	}
}

/* --- Footer ------------------------------------------------------------- */
.isp-footer-nav { margin-bottom: 0.6em; }
.isp-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1.4em;
	justify-content: center;
}
.isp-footer-links a {
	color: var(--isp-text-muted);
	text-decoration: none;
	font-size: 0.92em;
}
.isp-footer-links a:hover { color: var(--isp-accent); text-decoration: underline; }
.isp-copyright { color: var(--isp-text-muted); font-size: 0.88em; text-align: center; }


/* --- Category archive: child/sibling category chips ---------------------- */
/* Printed by generate_after_archive_title so they sit between the archive
   title/description and the post list. */
.isp-subcats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 1.2em 0 0.4em;
}

.isp-subcat {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	padding: 0.38em 0.85em;
	border: 1px solid var(--isp-border, #d8dde3);
	border-radius: 999px;
	font-size: 0.9em;
	line-height: 1.4;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.isp-subcat:hover {
	border-color: var(--isp-accent, #b45309);
	background: rgba(180, 83, 9, 0.06);
	text-decoration: none;
}

/* The category you are already on - flat, not a link-looking chip. */
.isp-subcat.is-current {
	background: var(--isp-accent, #b45309);
	border-color: var(--isp-accent, #b45309);
	color: #fff;
	font-weight: 600;
}

/* "인프라 전체" - reads as a way back up, so keep it quieter. */
.isp-subcat--all {
	border-style: dashed;
}

.isp-subcat-count {
	font-size: 0.82em;
	opacity: 0.65;
	font-variant-numeric: tabular-nums;
}

/* An empty category is deliberately still listed: it tells the reader what is
   coming. Dim it so it does not compete with categories that have posts. */
.isp-subcat.is-empty:not(.is-current) {
	opacity: 0.55;
	border-style: dashed;
}
.isp-subcat.is-empty:not(.is-current):hover { opacity: 1; }

@media (max-width: 480px) {
	.isp-subcat { font-size: 0.85em; padding: 0.32em 0.7em; }
}


/* --- Empty category archive ---------------------------------------------- */
/* Shown by no-results.php on a category that exists but has no posts yet.
   Reads as "coming soon", not as a broken page. */
.isp-empty-cat .inside-article {
	padding: 2.2em 1.6em;
	border: 1px dashed var(--isp-border, #d8dde3);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.015);
	text-align: center;
}

.isp-empty-cat__lead {
	font-size: 1.05em;
	margin: 0 0 0.5em;
}

.isp-empty-cat__sub {
	color: var(--isp-text-muted, #6b7280);
	font-size: 0.95em;
	margin: 0 0 1.4em;
}

.isp-empty-cat__cta {
	display: inline-block;
	padding: 0.5em 1.2em;
	border: 1px solid var(--isp-accent, #b45309);
	border-radius: 999px;
	color: var(--isp-accent, #b45309);
	text-decoration: none;
	font-size: 0.93em;
}

.isp-empty-cat__cta:hover {
	background: var(--isp-accent, #b45309);
	color: #fff;
	text-decoration: none;
}
/* =========================================================================
   8. V2 — 레이아웃 균형 · 카드 · 글 하단 (2026-08-28)

   문제 진단 (실측):
   - 본문 measure(46rem)가 컨테이너 안에서 왼쪽에 붙어 우측에 죽은 공간 ~240px
   - 글 목록이 카드가 아니라 텍스트 덩어리. 썸네일 140x74가 정사각으로 찌그러짐
   - 목록 링크가 워드프레스 기본 파란 밑줄 → 브랜드와 따로 논다
   - 헤더가 과하게 높고 히어로 아래 빈 공간이 크다
   - 글이 본문 끝에서 그냥 끊긴다 (다음 행동이 없다)
   ========================================================================= */

:root {
	--isp-card-bg: #fff;
	--isp-card-border: #e3e7ec;
	--isp-card-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	--isp-card-shadow-hover: 0 6px 18px rgba(16, 24, 40, 0.08);
	--isp-radius: 10px;
	--isp-ink: #111827;
}

/* --- 8.1 본문 measure 가운데 정렬 --------------------------------------- */
/* max-width 만 걸려 있어 왼쪽으로 쏠렸다. 가운데로 보내면 카드 안 좌우가
   맞고, 넓게 쓰는 요소(표·코드·이미지)는 그대로 100% 를 유지한다. */
.entry-content > * {
	margin-left: auto;
	margin-right: auto;
}

/* --- 8.2 헤더 ------------------------------------------------------------ */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(180%) blur(8px);
	-webkit-backdrop-filter: saturate(180%) blur(8px);
}
.site-header .inside-header {
	padding-top: 0.9em;
	padding-bottom: 0.9em;
}
.site-logo img,
.header-image { max-height: 46px; width: auto; }

/* 메뉴: 기본 파란 링크가 아니라 본문 잉크색, hover 에서만 브랜드색 */
.main-navigation .main-nav ul li a {
	color: var(--isp-ink);
	font-weight: 500;
}
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a {
	color: var(--isp-accent);
}

/* 관리자 바가 있을 때 sticky 가 가려지지 않도록 */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* --- 8.3 홈 히어로 ------------------------------------------------------- */
.home .entry-content > .wp-block-group:first-child {
	padding-top: 1.6rem !important;
	padding-bottom: 1.6rem !important;
}
.home .entry-content h1 {
	letter-spacing: -0.03em;
	margin-bottom: 0.6rem;
}
/* 구분선이 섹션마다 두꺼운 공백을 만들고 있었다 */
.home .entry-content .wp-block-separator {
	margin: 2.4rem auto;
	border-top: 1px solid var(--isp-border);
	opacity: 1;
}

/* --- 8.4 가치 제안 3단을 카드로 ------------------------------------------ */
.home .entry-content .wp-block-columns { counter-reset: isp-vp; }
.home .entry-content .wp-block-column {
	counter-increment: isp-vp;
	background: var(--isp-card-bg);
	border: 1px solid var(--isp-card-border);
	border-radius: var(--isp-radius);
	padding: 1.3rem 1.25rem 1.15rem;
	box-shadow: var(--isp-card-shadow);
}
.home .entry-content .wp-block-column > h3:first-child::before {
	content: counter(isp-vp);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.55em;
	height: 1.55em;
	margin-right: 0.5em;
	border-radius: 50%;
	background: var(--isp-accent);
	color: #fff;
	font-size: 0.78em;
	font-weight: 700;
	vertical-align: 0.12em;
}
.home .entry-content .wp-block-column > h3:first-child { margin-top: 0; }
.home .entry-content .wp-block-column > p:last-child { margin-bottom: 0; }

/* --- 8.5 시리즈 표 ------------------------------------------------------- */
/* 표 안의 글 링크가 기본 파란 밑줄이라 제일 허접해 보이는 자리였다. */
.home .entry-content table a {
	color: var(--isp-ink);
	text-decoration: none;
	font-weight: 600;
	border-bottom: 2px solid rgba(180, 83, 9, 0.28);
	padding-bottom: 1px;
}
.home .entry-content table a:hover {
	color: var(--isp-accent);
	border-bottom-color: var(--isp-accent);
}
.home .entry-content table td:last-child {
	color: var(--isp-text-muted);
	font-size: 0.94em;
}

/* --- 8.6 글 목록 카드 (홈 최신 글 + 아카이브 공통) ----------------------- */
.wp-block-latest-posts__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.1rem;
	max-width: 100% !important;
}
.wp-block-latest-posts__list > li {
	margin: 0;
	background: var(--isp-card-bg);
	border: 1px solid var(--isp-card-border);
	border-radius: var(--isp-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.wp-block-latest-posts__list > li:hover {
	box-shadow: var(--isp-card-shadow-hover);
	border-color: #cfd6de;
	transform: translateY(-2px);
}

/* 썸네일: 140x74 지정이 정사각으로 찌그러져 보였다. 16:9 로 고정하고 잘라낸다. */
.wp-block-latest-posts__featured-image {
	margin: 0 !important;
	float: none !important;
	width: 100%;
}
.wp-block-latest-posts__featured-image a { display: block; }
.wp-block-latest-posts__featured-image img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
	border-radius: 0 !important;
	max-width: none !important;
}

.wp-block-latest-posts__post-title {
	display: block;
	margin: 0;
	padding: 0.95rem 1rem 0;
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.45;
	letter-spacing: -0.015em;
	color: var(--isp-ink);
	text-decoration: none !important;
}
.wp-block-latest-posts__list > li:hover .wp-block-latest-posts__post-title {
	color: var(--isp-accent);
}
.wp-block-latest-posts__post-date {
	display: block;
	padding: 0.4rem 1rem 0;
	font-size: 0.82rem;
	color: var(--isp-text-muted);
	font-variant-numeric: tabular-nums;
}
.wp-block-latest-posts__post-excerpt {
	padding: 0.55rem 1rem 1.1rem;
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.7;
	color: #4b5563;
}

/* --- 8.7 아카이브(카테고리·전체 글) 목록도 같은 카드로 ------------------- */
.blog .site-main,
.archive .site-main,
.search .site-main {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.2rem;
	align-items: start;
}
/* 아카이브 제목/칩/페이지네이션은 그리드 한 줄을 통째로 쓴다 */
.blog .site-main > .page-header,
.archive .site-main > .page-header,
.search .site-main > .page-header,
.blog .site-main > .paging-navigation,
.archive .site-main > .paging-navigation,
.search .site-main > .paging-navigation,
.blog .site-main > .isp-empty-cat,
.archive .site-main > .isp-empty-cat {
	grid-column: 1 / -1;
}

.blog .site-main > article,
.archive .site-main > article,
.search .site-main > article {
	margin: 0 !important;
	border: 1px solid var(--isp-card-border);
	border-radius: var(--isp-radius);
	overflow: hidden;
	background: var(--isp-card-bg);
	box-shadow: var(--isp-card-shadow);
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.blog .site-main > article:hover,
.archive .site-main > article:hover,
.search .site-main > article:hover {
	box-shadow: var(--isp-card-shadow-hover);
	transform: translateY(-2px);
}
.blog .site-main > article .inside-article,
.archive .site-main > article .inside-article,
.search .site-main > article .inside-article {
	padding: 0 0 1.1rem;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.blog .post-image,
.archive .post-image,
.search .post-image { margin: 0 !important; }
.blog .post-image img,
.archive .post-image img,
.search .post-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
	border-radius: 0;
}
.blog .site-main .entry-header,
.archive .site-main .entry-header,
.search .site-main .entry-header { padding: 1rem 1.1rem 0; }
.blog .site-main .entry-title,
.archive .site-main .entry-title,
.search .site-main .entry-title {
	font-size: 1.08rem;
	line-height: 1.45;
	letter-spacing: -0.015em;
	margin: 0;
}
.blog .site-main .entry-title a,
.archive .site-main .entry-title a,
.search .site-main .entry-title a {
	color: var(--isp-ink);
	text-decoration: none;
}
.blog .site-main article:hover .entry-title a,
.archive .site-main article:hover .entry-title a { color: var(--isp-accent); }
.blog .site-main .entry-summary,
.archive .site-main .entry-summary,
.search .site-main .entry-summary {
	padding: 0.6rem 1.1rem 0;
	font-size: 0.9rem;
	line-height: 1.7;
	color: #4b5563;
	margin: 0;
}
.blog .site-main .entry-meta,
.archive .site-main .entry-meta,
.search .site-main .entry-meta { padding: 0.7rem 1.1rem 0; }

/* --- 8.8 단일 글: 메타 · 읽기 시간 --------------------------------------- */
.single .entry-header .entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 0.9em;
	padding-bottom: 1.1em;
	border-bottom: 1px solid var(--isp-border);
	margin-bottom: 1.6em;
}
.isp-readtime {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	color: var(--isp-text-muted);
}
.isp-cat-badge {
	display: inline-block;
	padding: 0.2em 0.7em;
	border-radius: 999px;
	background: rgba(180, 83, 9, 0.09);
	color: var(--isp-accent);
	font-size: 0.86em;
	font-weight: 600;
	text-decoration: none;
}
.isp-cat-badge:hover { background: var(--isp-accent); color: #fff; }

/* --- 8.9 목차 ------------------------------------------------------------ */
/* 1만자가 넘는 글이 많다. 목차가 없으면 독자가 어디까지 있는지 모른다. */
.isp-toc {
	max-width: 46rem;
	margin: 2em auto 2.4em;
	padding: 1.15rem 1.3rem;
	border: 1px solid var(--isp-card-border);
	border-left: 3px solid var(--isp-accent);
	border-radius: 8px;
	background: #fbfcfd;
}
.isp-toc__title {
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--isp-accent);
	margin: 0 0 0.7em;
	text-transform: uppercase;
}
.isp-toc ol {
	list-style: none;
	counter-reset: isp-toc;
	margin: 0;
	padding: 0;
}
.isp-toc li {
	counter-increment: isp-toc;
	margin: 0 0 0.42em;
	line-height: 1.55;
}
.isp-toc li:last-child { margin-bottom: 0; }
.isp-toc li::before {
	content: counter(isp-toc);
	display: inline-block;
	width: 1.6em;
	color: var(--isp-text-muted);
	font-size: 0.86em;
	font-variant-numeric: tabular-nums;
}
.isp-toc a {
	color: var(--isp-ink);
	text-decoration: none;
	font-size: 0.95rem;
}
.isp-toc a:hover { color: var(--isp-accent); text-decoration: underline; }

/* 앵커로 점프할 때 sticky 헤더에 제목이 가리지 않도록 */
.entry-content h2[id] { scroll-margin-top: 88px; }

/* --- 8.10 글 하단: 이전/다음 · 관련 글 ----------------------------------- */
.isp-postend { max-width: 46rem; margin: 2.8em auto 0; }

.isp-adjacent {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.9rem;
	margin-bottom: 2.4em;
}
.isp-adjacent__item {
	display: block;
	padding: 0.95rem 1.1rem;
	border: 1px solid var(--isp-card-border);
	border-radius: var(--isp-radius);
	text-decoration: none;
	background: var(--isp-card-bg);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.isp-adjacent__item:hover {
	border-color: var(--isp-accent);
	box-shadow: var(--isp-card-shadow);
}
.isp-adjacent__label {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--isp-text-muted);
	margin-bottom: 0.35em;
}
.isp-adjacent__title {
	display: block;
	color: var(--isp-ink);
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.5;
}
.isp-adjacent__item--next { text-align: right; }

.isp-related__title {
	font-size: 1.15rem;
	margin: 0 0 1rem;
	letter-spacing: -0.02em;
}
.isp-related__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.isp-related__grid li { margin: 0; }
.isp-related__card {
	display: block;
	border: 1px solid var(--isp-card-border);
	border-radius: var(--isp-radius);
	overflow: hidden;
	text-decoration: none;
	background: var(--isp-card-bg);
	height: 100%;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.isp-related__card:hover {
	box-shadow: var(--isp-card-shadow-hover);
	transform: translateY(-2px);
}
.isp-related__card img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
	border-radius: 0;
}
.isp-related__name {
	display: block;
	padding: 0.8rem 0.9rem 0.95rem;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.5;
	color: var(--isp-ink);
	letter-spacing: -0.01em;
}
.isp-related__card:hover .isp-related__name { color: var(--isp-accent); }

/* --- 8.11 모바일 --------------------------------------------------------- */
@media (max-width: 768px) {
	.site-header { position: static; }
	.home .entry-content .wp-block-column { padding: 1.1rem 1rem; }
	.isp-adjacent { grid-template-columns: 1fr; }
	.isp-adjacent__item--next { text-align: left; }
	.isp-related__grid { grid-template-columns: 1fr 1fr; }
	.wp-block-latest-posts__list { grid-template-columns: 1fr; }
	.blog .site-main,
	.archive .site-main,
	.search .site-main { grid-template-columns: 1fr; }
	.entry-content h2[id] { scroll-margin-top: 16px; }
}
@media (max-width: 420px) {
	.isp-related__grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   9. V2 디테일 — 코드블록 · 표 · 푸터
   ========================================================================= */

/* --- 9.1 코드블록 헤더 + 복사 버튼 --------------------------------------- */
/* 이 블로그는 명령과 출력이 핵심이다. 복사가 한 번에 되어야 한다. */
.isp-code {
	position: relative;
	max-width: 100%;
	margin: 1.6em auto;
}
.isp-code pre.wp-block-code {
	margin: 0;
	border-radius: 0 0 8px 8px;
}
.isp-code__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 0.45em 0.9em;
	background: #2d333b;
	border-radius: 8px 8px 0 0;
	border-bottom: 1px solid #444c56;
}
.isp-code__lang {
	font-family: Consolas, "Courier New", monospace;
	font-size: 0.76rem;
	letter-spacing: 0.06em;
	color: #9aa4b0;
	text-transform: uppercase;
}
.isp-code__copy {
	appearance: none;
	border: 1px solid #444c56;
	background: transparent;
	color: #adbac7;
	font-size: 0.76rem;
	font-family: inherit;
	padding: 0.24em 0.7em;
	border-radius: 5px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.isp-code__copy:hover { background: #3a424c; color: #fff; border-color: #57606a; }
.isp-code__copy.is-done { color: #6ee7b7; border-color: #2f6f57; }

/* --- 9.2 표 --------------------------------------------------------------- */
.entry-content .wp-block-table { box-shadow: var(--isp-card-shadow); border-radius: 8px; }
.entry-content table {
	border-radius: 8px;
	overflow: hidden;
	border-collapse: separate;
	border-spacing: 0;
}
.entry-content th {
	background: #f4f6f8;
	font-size: 0.9em;
	letter-spacing: -0.01em;
	border-bottom: 1px solid var(--isp-border);
}
.entry-content tbody tr:last-child td { border-bottom: 0; }
.entry-content tbody tr:hover { background: #f8fafc; }

/* --- 9.3 인용 ------------------------------------------------------------- */
.entry-content blockquote {
	background: #fbfcfd;
	border-radius: 0 8px 8px 0;
}

/* --- 9.4 이미지 캡션 ------------------------------------------------------ */
.entry-content figure.wp-block-image { margin-top: 1.8em; margin-bottom: 1.8em; }
.entry-content figure.wp-block-image img {
	box-shadow: var(--isp-card-shadow);
	border: 1px solid var(--isp-card-border);
}

/* --- 9.5 푸터 ------------------------------------------------------------- */
.site-info { padding-top: 1.6em; padding-bottom: 1.6em; }

/* =========================================================================
   10. V2 보정 — 첫 배포 후 화면을 보고 고친 것들
   ========================================================================= */

/* --- 10.1 로고가 너무 작아졌다 ------------------------------------------- */
.site-logo img,
.header-image { max-height: 58px; }

/* --- 10.2 히어로 아래 빈 공간 -------------------------------------------- */
/* 그룹 패딩만 줄여서는 부족했다. 마지막 문단의 margin 이 그대로 남아 있었다. */
.home .entry-content > .wp-block-group:first-child > :last-child { margin-bottom: 0; }
.home .entry-content .wp-block-separator { margin: 2rem auto; }

/* --- 10.3 목차 번호 중복 ------------------------------------------------- */
/* 본문 H2 가 이미 "1. 2. 3." 을 달고 있어 목차 번호가 겹쳐 읽혔다. */
.isp-toc ol { counter-reset: none; }
.isp-toc li { counter-increment: none; padding-left: 0.9em; position: relative; }
.isp-toc li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #c7ced6;
}

/* --- 10.4 목록 카드: 썸네일을 맨 위로 ------------------------------------ */
/* GeneratePress 기본 순서는 제목 → 썸네일 → 발췌라 카드로 보면 어색하다. */
.blog .site-main .post-image,
.archive .site-main .post-image,
.search .site-main .post-image { order: -1; }

/* --- 10.5 목록 카드 메타 정리 -------------------------------------------- */
/* 카드마다 태그 대여섯 개 + 댓글 링크가 파란 밑줄로 깔려 지저분했다.
   목록에서 필요한 것은 "언제 쓴 무슨 분야 글인가" 뿐이다. */
.blog .site-main .entry-meta .tags-links,
.archive .site-main .entry-meta .tags-links,
.search .site-main .entry-meta .tags-links,
.blog .site-main .entry-meta .comments-link,
.archive .site-main .entry-meta .comments-link,
.search .site-main .entry-meta .comments-link,
.blog .site-main .byline,
.archive .site-main .byline,
.search .site-main .byline { display: none; }

.blog .site-main .entry-header .entry-meta,
.archive .site-main .entry-header .entry-meta,
.search .site-main .entry-header .entry-meta {
	text-align: left;
	padding: 0.45rem 1.1rem 0;
	font-size: 0.82rem;
	color: var(--isp-text-muted);
}
.blog .site-main footer.entry-meta,
.archive .site-main footer.entry-meta,
.search .site-main footer.entry-meta {
	margin-top: auto;
	padding: 0.85rem 1.1rem 0;
	font-size: 0.82rem;
}
.blog .site-main footer.entry-meta a,
.archive .site-main footer.entry-meta a,
.search .site-main footer.entry-meta a {
	color: var(--isp-accent);
	text-decoration: none;
	font-weight: 600;
}
.blog .site-main footer.entry-meta a:hover,
.archive .site-main footer.entry-meta a:hover { text-decoration: underline; }

/* --- 10.6 목록 링크 색이 아직 기본 파랑이던 자리 ------------------------- */
a.wp-block-latest-posts__post-title,
a.wp-block-latest-posts__post-title:visited {
	color: var(--isp-ink) !important;
	text-decoration: none !important;
}
.wp-block-latest-posts__list > li:hover a.wp-block-latest-posts__post-title {
	color: var(--isp-accent) !important;
}
.wp-block-latest-posts__post-excerpt a {
	color: var(--isp-accent);
	text-decoration: none;
	font-weight: 600;
}

/* --- 10.7 히어로 여백 (재시도) ------------------------------------------- */
/* 그룹 바로 아래가 문단이 아니라 .wp-block-group__inner-container 였다.
   실제 마지막 문단은 그 안에 있어서 margin 이 그대로 남아 있었다. */
.home .entry-content > .wp-block-group:first-child .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

/* --- 10.8 카드 높이 맞추기 ----------------------------------------------- */
/* 발췌 길이가 제각각이라 카드 아래가 들쭉날쭉했다. 3줄로 잘라 맞춘다. */
.blog .site-main,
.archive .site-main,
.search .site-main { align-items: stretch; }

.wp-block-latest-posts__post-excerpt,
.blog .site-main .entry-summary,
.archive .site-main .entry-summary,
.search .site-main .entry-summary {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.blog .site-main .entry-summary p,
.archive .site-main .entry-summary p,
.search .site-main .entry-summary p { margin: 0; }

/* "더 읽기"도 기본 파랑이었다 */
.entry-summary .read-more,
.entry-summary a { color: var(--isp-accent); text-decoration: none; font-weight: 600; }

/* --- 9.6 접근성 ----------------------------------------------------------- */
a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--isp-accent);
	outline-offset: 2px;
	border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
	.wp-block-latest-posts__list > li:hover,
	.blog .site-main > article:hover,
	.archive .site-main > article:hover,
	.isp-related__card:hover { transform: none; }
}
