/*
Theme Name: Taihyoung
Author: 최태형
Description: 최태형의 개인 사이트
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taihyoung
*/

/* =====================
   Reset & Base
   ===================== */

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	font-size: 16px;
}

body {
	margin: 0;
	padding: 0;
	background: #fff;
	color: #1a1a1a;
	font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
	font-size: 1rem;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

p {
	margin: 0 0 1.2em;
}

h1, h2, h3 {
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
}

/* =====================
   Layout
   ===================== */

.site-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 48px;
}

/* =====================
   Header
   ===================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
	border-bottom: 1px solid #ebebeb;
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 48px;
	position: relative;
}

.site-logo a,
.site-logo .custom-logo-link {
	display: block;
	width: 32px;
	height: 32px;
}

.site-logo svg,
.site-logo .custom-logo {
	width: 32px;
	height: 32px;
	object-fit: contain;
}

.site-title-header {
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	margin: 0;
	white-space: nowrap;
}

.site-title-header a {
	color: inherit;
}

/* 햄버거/X 토글 버튼 */
.nav-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
}

.icon-hamburger {
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 22px;
}

.icon-hamburger span {
	display: block;
	width: 100%;
	height: 1.5px;
	background: #1a1a1a;
}

.icon-close {
	display: none;
	font-size: 1.4rem;
	line-height: 1;
	color: #1a1a1a;
}

/* 메뉴 열렸을 때: 햄버거 숨기고 X 표시 */
.nav-toggle.is-active .icon-hamburger {
	display: none;
}

.nav-toggle.is-active .icon-close {
	display: block;
}

/* 네비게이션 패널 */
.site-nav-overlay {
	display: none;
	position: fixed;
	width: 220px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.1);
	z-index: 200;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
}

@media (max-width: 600px) {
	.site-nav-overlay {
		width: 200px;
	}
}

.site-nav-overlay.is-open {
	display: flex;
}

.nav-panel-header {
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f0;
}

.nav-panel-title {
	font-size: 0.85rem;
	font-weight: 600;
	color: #1a1a1a;
}

.site-nav-overlay a {
	font-size: 1rem;
	font-weight: 500;
	color: #1a1a1a;
	padding: 14px 20px;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
}

.site-nav-overlay a:last-child {
	border-bottom: none;
}

.site-nav-overlay a:hover {
	background: #fafafa;
	opacity: 1;
}

@media (max-width: 600px) {
	.site-nav-overlay {
		right: 16px;
		top: 56px;
		width: calc(100vw - 32px);
	}
}

/* =====================
   Home — Profile Card
   ===================== */

.home-section {
	max-width: 1200px;
	margin: 0 auto;
	padding: 64px 48px 64px;
}

.profile-card {
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	padding: 28px 32px;
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 700px;
	margin: 0 auto 0;
}

.profile-card-photo {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #f0f0f0;
}

.profile-card-name {
	font-size: 1.15rem;
	font-weight: 600;
	margin-bottom: 2px;
}

.profile-card-bio {
	font-size: 0.9rem;
	color: #555;
	line-height: 1.4;
	margin: 0;
}

/* =====================
   Home — 글 헤더
   ===================== */

.home-posts-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 0 32px;
}

.home-posts-label {
	font-size: 0.85rem;
	color: #888;
}

.home-posts-more {
	font-size: 0.85rem;
	padding: 6px 16px;
	border: 1px solid #1a1a1a;
	border-radius: 20px;
	color: #1a1a1a;
	transition: background 0.15s, color 0.15s;
}

.home-posts-more:hover {
	background: #1a1a1a;
	color: #fff;
}

/* =====================
   Archive / Home — 글 목록
   (세 가지 레이아웃 공통)
   ===================== */

.archive-header {
	padding: 56px 0 48px;
	border-bottom: 1px solid #ebebeb;
}

.archive-header h1 {
	font-size: 1.1rem;
	font-weight: 600;
}

.filter-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 20px;
}

.filter-nav a {
	font-size: 0.8rem;
	color: #888;
	padding: 4px 12px;
	border: 1px solid #ddd;
	border-radius: 20px;
}

.filter-nav a:hover,
.filter-nav a.current {
	color: #1a1a1a;
	border-color: #1a1a1a;
}

.posts-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid #ebebeb;
}

/* ─── 공통 메타 행 (제목+날짜 좌 / 발췌 우) ─── */
.post-meta-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: start;
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 48px;
}

.post-meta-title {
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 6px;
}

.post-meta-title a:hover {
	opacity: 0.6;
}

.post-meta-bottom {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-top: 6px;
	margin-bottom: 0;
}

.post-meta-cat {
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #aaa;
	line-height: 1;
}

.post-meta-date {
	font-size: 0.8rem;
	color: #aaa;
	line-height: 1;
	margin: 0;
}

.post-meta-excerpt {
	font-size: 0.9rem;
	color: #555;
	line-height: 1.75;
	margin: 0;
	padding-top: 4px;
}

/* ─── Layout 1: full (풀블리드 이미지) ─── */
.post-item-full {
	border-bottom: 1px solid #ebebeb;
	padding: 48px 0;
}

.post-item-full .full-thumb-link {
	display: block;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 48px;
}

.post-item-full .full-thumb {
	width: 100%;
	max-height: 480px;
	object-fit: cover;
	display: block;
	border-radius: 8px;
}

/* ─── Layout 2: text (텍스트만) ─── */
.post-item-text {
	border-bottom: 1px solid #ebebeb;
}

/* ─── Layout 3: split (좌이미지 / 우텍스트) ─── */
.post-item-split {
	border-bottom: 1px solid #ebebeb;
	padding: 48px 0;
}

.post-item-split .split-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 48px;
}

.post-item-split .split-thumb-link {
	display: block;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 1 / 1;
}

.post-item-split .split-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.post-item-split .split-content {
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	color: inherit;
}

.post-item-split .post-meta-title {
	font-size: 1.2rem;
	margin-bottom: 8px;
}

.post-item-split .post-meta-date {
	margin-bottom: 16px;
}

/* =====================
   Responsive
   ===================== */

/* =====================
   Single Post
   ===================== */

.single-wrap {
	max-width: 680px;
	margin: 0 auto;
	padding: 64px 0 100px;
}

.single-header {
	margin-bottom: 48px;
}

.single-category {
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #aaa;
	display: inline-block;
	margin-bottom: 6px;
}

.single-title {
	font-size: 1.7rem;
	line-height: 1.4;
	margin-bottom: 6px;
}

.single-date {
	font-size: 0.8rem;
	color: #aaa;
}

.single-thumb {
	width: calc(100vw - 96px);
	max-width: 1104px;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	border-radius: 8px;
	margin-bottom: 48px;
}

.post-content {
	font-size: 1rem;
	line-height: 1.95;
}

.post-content h2 {
	font-size: 1.15rem;
	margin-top: 2.5em;
	margin-bottom: 0.5em;
}

.post-content h3 {
	font-size: 1rem;
	margin-top: 2em;
	margin-bottom: 0.5em;
}

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

.post-content blockquote {
	margin: 2em 0;
	padding-left: 20px;
	border-left: 3px solid #e0e0e0;
	color: #555;
	font-style: italic;
}

.post-content hr {
	border: none;
	border-top: 1px solid #e8e8e8;
	margin: 3em 0;
}

.post-content img {
	margin: 2em 0;
	border-radius: 6px;
}

.post-footer {
	margin-top: 64px;
	padding-top: 32px;
	border-top: 1px solid #e8e8e8;
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 40px;
}

.post-tags a {
	font-size: 0.8rem;
	color: #888;
	padding: 3px 12px;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
}

.post-tags a:hover {
	color: #1a1a1a;
	border-color: #1a1a1a;
}

.post-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	font-size: 0.85rem;
	color: #aaa;
}

.post-nav a {
	color: #888;
}

.post-nav a:hover {
	color: #1a1a1a;
}

.post-nav-list {
	font-size: 0.8rem;
	color: #aaa;
	padding: 5px 14px;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	white-space: nowrap;
}

.post-nav-list:hover {
	color: #1a1a1a;
	border-color: #1a1a1a;
}

/* =====================
   About / Contact
   ===================== */

.page-wrap {
	max-width: 680px;
	margin: 0 auto;
	padding: 64px 0 100px;
}

.page-wrap h1 {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 40px;
	padding-bottom: 20px;
	border-bottom: 1px solid #ebebeb;
}

.page-content {
	font-size: 1rem;
	line-height: 1.95;
}

.contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.contact-list li {
	display: flex;
	align-items: center;
	gap: 16px;
}

.contact-label {
	font-size: 0.8rem;
	color: #aaa;
	width: 56px;
	flex-shrink: 0;
}

.contact-list a:hover {
	opacity: 0.6;
}

/* =====================
   Footer
   ===================== */

.site-footer {
	border-top: 1px solid #ebebeb;
	padding: 40px 0;
}

.site-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 48px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.site-footer-links {
	display: flex;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer-links a {
	font-size: 0.85rem;
	color: #aaa;
}

.site-footer-links a:hover {
	color: #1a1a1a;
}

.site-footer-copy {
	font-size: 0.8rem;
	color: #ccc;
}

/* =====================
   Responsive
   ===================== */

@media (max-width: 900px) {
	.site-inner,
	.site-header-inner,
	.site-footer-inner {
		padding: 0 24px;
	}

	.home-post-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.archive-item,
	.archive-item.no-thumb {
		grid-template-columns: 1fr;
	}

	.archive-item-body {
		padding: 28px 0;
	}

	.archive-item.no-thumb .archive-item-body {
		padding: 28px 0;
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.profile-card {
		padding: 28px 24px;
	}

	.single-wrap,
	.page-wrap {
		padding: 40px 0 80px;
	}

	.single-title {
		font-size: 1.4rem;
	}

	.single-thumb {
		width: calc(100vw - 48px);
		max-width: none;
	}

	.post-item-full .full-thumb-link {
		padding: 0 24px;
	}

	.post-item-split {
		padding: 0;
	}

	.post-item-split .split-inner {
		grid-template-columns: 1fr 1fr;
		gap: 24px;
		padding: 24px 24px;
	}

	.post-item-split .split-thumb-link {
		aspect-ratio: 1 / 1;
	}

	.post-item-split .split-content {
		padding: 0;
	}

	.post-item-split .post-meta-title {
		font-size: 1.1rem;
		margin-bottom: 6px;
	}

	.post-item-split .post-meta-excerpt {
		font-size: 0.9rem;
	}

	.post-meta-row {
		padding: 24px 24px;
	}

	.home-section {
		padding: 48px 24px 48px;
	}
}

@media (max-width: 600px) {
	.profile-card {
		flex-direction: column;
		text-align: center;
		gap: 16px;
	}

	.nav-close {
		right: 24px;
	}

	.site-footer-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
}

/* =====================
   Infinite Scroll Fade-in
   ===================== */

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(40px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.post-item-fadein {
	opacity: 0;
	animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
