article.post {
	color: var(--bs-body-color);
	line-height: 1.5;

}

article.post .content {
	font-size: 1.25rem;
}

article.post .content h2 {
	border-top: 2px solid var(--bs-primary-text-emphasis);
	font-size: 1.75rem;
	color: var(--bs-primary-text-emphasis);
  padding-top: 0.75rem;
	margin-bottom: 0.75rem;
}

article.post .content h3 {
	font-size: 1.25rem;
	margin-top: 1rem;
}

article.post .content h3::before {
	content: "";
	vertical-align: top;
	margin-right: 0.5rem;
	display: inline-block;
	width: 0.5rem;
	height: 1.5rem;
	background-color: var(--bs-primary-text-emphasis);
}


article.post .content p {
	margin-bottom: 0.25rem;
}

/* 제목 스타일 */
.post header .date {
	color: rgb(var(--gray));
}

/* 섹션 스타일 */
.post .section {
	margin-bottom: 3rem;
}




article.post img{
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 0.5rem;
}
.post-index {
	line-height: 1.5;
}
.post-index h5 {
	border-top: 1px solid var(--bs-gray-300);
	border-bottom: 1px solid var(--bs-gray-300);
	padding: 0.5rem 0 ;
	margin-bottom: .25rem;

}
.post-index a.nav-link {
	padding: .25rem;
	border-left: 3px solid transparent;
	transition: border-color 0.15s ease-in-out;
}

.post-index a.nav-link:hover {
	border-left-color: var(--bs-primary-border-subtle);
}

.post-index a.nav-link.active {
	border-left-color: var(--bs-primary);
	color: var(--bs-primary);
	font-weight: 500;
}

/* 코드 블록 스타일 */
/* 인라인 코드 */
.post code:not(pre code) {
	background-color: rgba(0, 0, 0, 0.05);
	padding: 0.2em 0.4em;
	border-radius: 0.25rem;
	font-size: 0.9em;
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	color: #e83e8c;
}

/* 코드 블록 래퍼 */
.post .code-block-wrapper {
	position: relative;
	margin: 1.5rem 0;
	border-radius: 0.5rem;
	overflow: hidden;
}

/* 코드 블록 타이틀 (언어 표시) */
.post .code-block-title {
	background-color: #2d2d2d;
	color: #d4d4d4;
	padding: 0.5rem 1rem;
	font-size: 0.75rem;
	font-weight: 600;
	border-bottom: 1px solid #404040;
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.post .code-block-title-text {
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Astro 기본 코드 블록 스타일 (rehype-pretty-code가 적용되지 않은 경우) */
.post pre.astro-code,
.post pre {
	background-color: #1e1e1e;
	color: #d4d4d4;
	padding: 1rem;
		margin: 0;
	border-radius: 0;
	overflow-x: auto;
	line-height: 1;
	font-size: 0.875rem;
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	position: relative;
}

.post pre.astro-code code,
.post pre code {
	background: transparent;
	padding: 0;
	font-size: inherit;
	font-family: inherit;
	color: inherit;
	display: block;
}

/* 줄번호 스타일 */
.post pre.astro-code .line,
.post pre .line {
	padding: 0 1rem;
	padding-left: 3.5rem;
	display: block;
	border-left: 3px solid transparent;
	position: relative;
}

.post pre.astro-code .line::before,
.post pre .line::before {
	content: attr(data-line-number);
	position: absolute;
	left: 0;
	width: 2.5rem;
	padding-right: 1rem;
	text-align: right;
	color: rgba(255, 255, 255, 0.4);
	font-size: 0.875rem;
	user-select: none;
	pointer-events: none;
}

/* 복사 버튼 스타일 */
.post .code-copy-button {
	padding: 0.25rem 0.5rem;
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 0.25rem;
	color: #d4d4d4;
	font-size: 0.7rem;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
	opacity: 1;
}

.post .code-copy-button:hover {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.3);
}

.post .code-copy-button:active {
	background-color: rgba(255, 255, 255, 0.2);
}

.post .code-copy-button[data-copied] {
	background-color: rgba(76, 201, 176, 0.3);
	border-color: #4ec9b0;
	color: #4ec9b0;
	opacity: 1;
}

/* 다크 모드에서 코드 블록 스타일 */
@media (prefers-color-scheme: light) {
	.post pre.astro-code,
	.post pre {
		background-color: #f6f8fa;
		color: #24292f;
	}

	.post .code-block-title {
		background-color: #f6f8fa;
		color: #24292f;
		border-bottom-color: #d0d7de;
	}

	.post pre.astro-code .line::before,
	.post pre .line::before {
		color: rgba(0, 0, 0, 0.4);
	}

	.post .code-copy-button {
		background-color: transparent;
		border-color: rgba(0, 0, 0, 0.2);
		color: #24292f;
	}

	.post .code-copy-button:hover {
		background-color: rgba(0, 0, 0, 0.05);
		border-color: rgba(0, 0, 0, 0.3);
	}

	.post .code-copy-button:active {
		background-color: rgba(0, 0, 0, 0.1);
	}

	.post .code-copy-button[data-copied] {
		background-color: rgba(9, 105, 218, 0.1);
		border-color: #0969da;
		color: #0969da;
	}
}

/* 코드 블록 컨테이너 */
.post [data-rehype-pretty-code-fragment] {
	margin: 1.5rem 0;
	border-radius: 0.5rem;
	overflow: hidden;
}

/* 코드 블록 제목 */
.post [data-rehype-pretty-code-title] {
	background-color: #2d2d2d;
	color: #d4d4d4;
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	border-bottom: 1px solid #404040;
}

/* 코드 블록 pre */
.post [data-rehype-pretty-code-fragment] pre {
	background-color: #1e1e1e;
	color: #d4d4d4;
	padding: 1rem;
	padding-left: 0; /* 줄 번호가 왼쪽에 있으므로 */
	margin: 0;
	border-radius: 0;
	overflow-x: auto;
	line-height: 1.6;
	font-size: 0.875rem;
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	position: relative;
}

.post [data-rehype-pretty-code-fragment] pre code {
	background: transparent;
	padding: 0;
	font-size: inherit;
	font-family: inherit;
	color: inherit;
	display: grid;
	min-width: 100%;
	width: max-content;
}

/* 코드 블록 줄 */
.post [data-rehype-pretty-code-fragment] [data-line] {
	padding: 0 1rem;
	padding-left: 3.5rem; /* 줄 번호 공간 확보 */
	display: block;
	border-left: 3px solid transparent;
	position: relative;
}

/* 줄 번호 표시 */
.post [data-rehype-pretty-code-fragment] [data-line]::before {
	content: attr(data-line-number);
	position: absolute;
	left: 0;
	width: 2.5rem;
	padding-right: 1rem;
	text-align: right;
	color: rgba(255, 255, 255, 0.4);
	font-size: 0.875rem;
	user-select: none;
	pointer-events: none;
}

/* 하이라이트된 줄 */
.post [data-rehype-pretty-code-fragment] [data-line].line--highlighted {
	background-color: rgba(255, 255, 255, 0.1);
	border-left-color: #4ec9b0;
}

/* 하이라이트된 단어 */
.post [data-rehype-pretty-code-fragment] [data-highlighted-chars] {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 0.2rem;
	padding: 0.1em 0.2em;
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: light) {
	.post [data-rehype-pretty-code-fragment] pre {
		background-color: #f6f8fa;
		color: #24292f;
	}

	.post [data-rehype-pretty-code-title] {
		background-color: #f6f8fa;
		color: #24292f;
		border-bottom-color: #d0d7de;
	}

	.post [data-rehype-pretty-code-fragment] [data-line].line--highlighted {
		background-color: rgba(0, 0, 0, 0.05);
		border-left-color: #0969da;
	}

	.post [data-rehype-pretty-code-fragment] [data-highlighted-chars] {
		background-color: rgba(0, 0, 0, 0.1);
	}
}

/* 코드 블록 스크롤바 스타일 */
.post [data-rehype-pretty-code-fragment] pre::-webkit-scrollbar {
	height: 0.5rem;
}

.post [data-rehype-pretty-code-fragment] pre::-webkit-scrollbar-track {
	background-color: rgba(255, 255, 255, 0.05);
}

.post [data-rehype-pretty-code-fragment] pre::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 0.25rem;
}

.post [data-rehype-pretty-code-fragment] pre::-webkit-scrollbar-thumb:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

/* 복사 버튼 스타일 */
.post [data-rehype-pretty-code-fragment] {
	position: relative;
}

.post [data-rehype-pretty-code-fragment] button[data-copy] {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 10;
	padding: 0.375rem 0.75rem;
	background-color: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 0.375rem;
	color: #d4d4d4;
	font-size: 0.75rem;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease, background-color 0.2s ease;
	backdrop-filter: blur(4px);
}

.post [data-rehype-pretty-code-fragment]:hover button[data-copy] {
	opacity: 1;
}

.post [data-rehype-pretty-code-fragment] button[data-copy]:hover {
	background-color: rgba(0, 0, 0, 0.7);
	border-color: rgba(255, 255, 255, 0.3);
}

.post [data-rehype-pretty-code-fragment] button[data-copy]:active {
	background-color: rgba(0, 0, 0, 0.9);
}

.post [data-rehype-pretty-code-fragment] button[data-copy][data-copied] {
	background-color: rgba(76, 201, 176, 0.3);
	border-color: #4ec9b0;
	color: #4ec9b0;
}

/* 다크 모드에서 복사 버튼 스타일 */
@media (prefers-color-scheme: light) {
	.post [data-rehype-pretty-code-fragment] [data-line]::before {
		color: rgba(0, 0, 0, 0.4);
	}

	.post [data-rehype-pretty-code-fragment] button[data-copy] {
		background-color: rgba(255, 255, 255, 0.8);
		border-color: rgba(0, 0, 0, 0.1);
		color: #24292f;
	}

	.post [data-rehype-pretty-code-fragment] button[data-copy]:hover {
		background-color: rgba(255, 255, 255, 0.95);
		border-color: rgba(0, 0, 0, 0.2);
	}

	.post [data-rehype-pretty-code-fragment] button[data-copy]:active {
		background-color: rgba(255, 255, 255, 1);
	}

	.post [data-rehype-pretty-code-fragment] button[data-copy][data-copied] {
		background-color: rgba(9, 105, 218, 0.1);
		border-color: #0969da;
		color: #0969da;
	}
}