/* ==========================================================================
   CEnA Modern — main stylesheet
   ========================================================================== */

:root {
	--bg: #f6f7fb;
	--surface: #ffffff;
	--surface-2: #eef0f7;
	--ink: #141826;
	--ink-2: #3d4459;
	--muted: #6b7289;
	--line: #e3e6ef;
	--brand: #5b5bf0;
	--brand-2: #8b5cf6;
	--brand-ink: #ffffff;
	--accent: #22d3ee;
	--night: #0d1020;
	--night-2: #161a2e;
	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(16, 20, 40, .04), 0 8px 24px rgba(16, 20, 40, .06);
	--shadow-lg: 0 2px 4px rgba(16, 20, 40, .05), 0 18px 40px rgba(16, 20, 40, .12);
	--shell: 1180px;
	--header-h: 68px;
	--font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
	--mono: "JetBrains Mono", "D2Coding", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink-2);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.75;
	word-break: keep-all;
	overflow-wrap: anywhere;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); line-height: 1.3; letter-spacing: -0.02em; margin: 1.6em 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + .8vw, 1.9rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p, ul, ol, dl, table, pre, blockquote, figure { margin: 0 0 1.25em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
::selection { background: rgba(91, 91, 240, .18); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000;
	top: 12px; left: 12px; padding: 10px 16px; background: var(--surface);
	border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
:focus-visible { outline: 3px solid rgba(91, 91, 240, .45); outline-offset: 2px; border-radius: 6px; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 24px; }

/* neutralise legacy Responsive grid */
.grid, .grid-right { float: none !important; margin: 0 !important; width: auto !important; }
.clearfix::after, .cf::after { content: ""; display: table; clear: both; }

/* ---------- buttons ---------- */
.btn, .read-more a, input[type="submit"], button, .button {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	padding: .8em 1.35em; border-radius: 999px; border: 1px solid transparent;
	font: 600 .95rem/1 var(--font); cursor: pointer; text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-primary, input[type="submit"], button, .button {
	background: linear-gradient(135deg, var(--brand), var(--brand-2));
	color: var(--brand-ink);
	box-shadow: 0 8px 20px rgba(91, 91, 240, .28);
}
.btn-primary:hover, input[type="submit"]:hover, button:hover, .button:hover {
	color: var(--brand-ink); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(91, 91, 240, .36);
}
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* ---------- header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .82);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid rgba(20, 24, 38, .06);
}
.site-header.is-overlay {
	position: absolute; left: 0; right: 0;
	background: linear-gradient(to bottom, rgba(8, 10, 22, .55), rgba(8, 10, 22, 0));
	border-bottom-color: transparent;
	backdrop-filter: none; -webkit-backdrop-filter: none;
}
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
	background: linear-gradient(135deg, var(--brand), var(--brand-2) 60%, var(--accent));
	color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.04em;
	box-shadow: 0 6px 16px rgba(91, 91, 240, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-text small { font-size: .75rem; color: var(--muted); font-weight: 500; }
.is-overlay .brand, .is-overlay .brand:hover { color: #fff; }
.is-overlay .brand-text small { color: rgba(255, 255, 255, .7); }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.main-nav .menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav .menu li { position: relative; }
.main-nav .menu a {
	display: block; padding: 8px 14px; border-radius: 999px;
	color: var(--ink-2); font-weight: 600; font-size: .95rem;
}
.main-nav .menu a:hover,
.main-nav .menu .current-menu-item > a,
.main-nav .menu .current-menu-parent > a,
.main-nav .menu .current_page_item > a { background: var(--surface-2); color: var(--ink); }
.is-overlay .main-nav .menu a { color: rgba(255, 255, 255, .88); }
.is-overlay .main-nav .menu a:hover,
.is-overlay .main-nav .menu .current-menu-item > a { background: rgba(255, 255, 255, .14); color: #fff; }
.main-nav .menu .sub-menu, .main-nav .menu .children {
	position: absolute; top: 100%; left: 0; min-width: 200px; padding: 8px; margin: 6px 0 0; list-style: none;
	background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s ease;
}
.main-nav .menu li:hover > .sub-menu, .main-nav .menu li:focus-within > .sub-menu,
.main-nav .menu li:hover > .children, .main-nav .menu li:focus-within > .children { opacity: 1; visibility: visible; transform: none; }
.main-nav .menu .sub-menu a, .main-nav .menu .children a { color: var(--ink-2); border-radius: 8px; }

/* search */
.main-nav #searchform, .main-nav .search-form { margin: 0; }
#searchform, .search-form { display: flex; gap: 8px; }
#searchform input[type="text"], #searchform #s, .search-form .search-field {
	width: 180px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
	background: var(--surface); font: inherit; font-size: .9rem; color: var(--ink);
	transition: width .2s ease, border-color .15s ease;
}
#searchform #s:focus { width: 230px; border-color: var(--brand); outline: none; }
.main-nav #searchform #searchsubmit, .main-nav .search-submit { display: none; }
.is-overlay #searchform #s { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.is-overlay #searchform #s::placeholder { color: rgba(255, 255, 255, .7); }

/* mobile nav toggle */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-btn { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 12px; cursor: pointer; position: relative; }
.nav-toggle-btn span, .nav-toggle-btn span::before, .nav-toggle-btn span::after {
	position: absolute; left: 11px; width: 20px; height: 2px; border-radius: 2px; background: currentColor; content: ""; transition: .2s ease;
}
.nav-toggle-btn span { top: 20px; }
.nav-toggle-btn span::before { left: 0; top: -6px; }
.nav-toggle-btn span::after { left: 0; top: 6px; }
.nav-toggle:checked + .nav-toggle-btn span { background: transparent; }
.nav-toggle:checked + .nav-toggle-btn span::before { top: 0; transform: rotate(45deg); }
.nav-toggle:checked + .nav-toggle-btn span::after { top: 0; transform: rotate(-45deg); }
.nav-toggle:focus-visible + .nav-toggle-btn { outline: 3px solid rgba(91, 91, 240, .45); }
.is-overlay .nav-toggle-btn { color: #fff; }

/* ---------- hero ---------- */
.hero {
	position: relative; isolation: isolate; overflow: hidden;
	min-height: min(88vh, 760px); display: flex; align-items: center;
	padding: calc(var(--header-h) + 64px) 0 96px;
	background: var(--night) var(--hero-image) center / cover no-repeat;
	color: #fff;
}
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(60% 80% at 85% 20%, rgba(139, 92, 246, .45), transparent 60%),
		radial-gradient(50% 60% at 10% 90%, rgba(34, 211, 238, .28), transparent 60%),
		linear-gradient(100deg, rgba(10, 12, 28, .92) 0%, rgba(10, 12, 28, .72) 45%, rgba(10, 12, 28, .35) 100%);
}
.hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 120px; z-index: -1;
	background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero-inner { max-width: var(--shell); }
.eyebrow {
	display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px;
	font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.hero-title {
	margin: 0; max-width: 14ch; color: #fff; font-weight: 800;
	font-size: clamp(2.6rem, 1.6rem + 4.2vw, 5rem); line-height: 1.04; letter-spacing: -0.035em;
}
.hero-sub { margin: 22px 0 0; max-width: 40ch; font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); color: rgba(255, 255, 255, .78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- sections & cards ---------- */
.section { padding-block: 72px; }
.front-content > .section:first-child { padding-top: 24px; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.more-link { font-weight: 600; white-space: nowrap; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card {
	display: flex; flex-direction: column; background: var(--surface);
	border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(91, 91, 240, .25); }
.card-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 24px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.card-title { margin: 0; font-size: 1.12rem; line-height: 1.45; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--brand); }
.card-excerpt { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.65;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badge {
	display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
	background: rgba(91, 91, 240, .1); color: var(--brand);
}
.badge:hover { background: var(--brand); color: #fff; }

.home-widgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.home-widgets .widget-wrapper { background: transparent; border: 0; box-shadow: none; padding: 0; }

/* ---------- main layout (single / archive / page) ---------- */
.wrapper-main {
	display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start;
	padding-top: 48px; padding-bottom: 80px;
}
.wrapper-main > #content-full, .wrapper-main > .col-940, .wrapper-main > #content-sitemap { grid-column: 1 / -1; }
.wrapper-main > #widgets, .wrapper-main > .widget-area { position: sticky; top: calc(var(--header-h) + 24px); }
.wrapper-main > #widgets:only-child { grid-column: 1 / -1; }

#content, #content-archive, #content-full, #content-search, #content-blog, #content-sitemap, #content-images {
	min-width: 0;
}
#content > .post, #content > .page, #content > .hentry,
#content-full > .hentry, #content-images > .hentry {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow);
}

/* archive lists → cards */
#content-archive, #content-search, #content-blog { display: flex; flex-direction: column; gap: 18px; }
#content-archive > .hentry, #content-search > .hentry, #content-blog > .hentry {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 26px 28px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
#content-archive > .hentry:hover, #content-search > .hentry:hover, #content-blog > .hentry:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
#content-archive .post-title, #content-search .post-title, #content-blog .post-title { margin: 0 0 6px; font-size: 1.3rem; }
#content-archive .post-title a, #content-search .post-title a, #content-blog .post-title a { color: var(--ink); }
#content-archive .post-title a:hover, #content-search .post-title a:hover, #content-blog .post-title a:hover { color: var(--brand); }
#content-archive .post-entry p, #content-search .post-entry p, #content-blog .post-entry p { color: var(--muted); margin-bottom: .8em; }
#content-archive .post-entry p:empty, .post-entry p:empty { display: none; }
.title-archive, #content-archive > h6, #content-search > h6 {
	margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

/* breadcrumb */
.breadcrumb-list { font-size: .85rem; color: var(--muted); margin: 0 0 18px; }
.breadcrumb-list a { color: var(--muted); }
.breadcrumb-list a:hover { color: var(--brand); }
.breadcrumb-list .chevron { margin: 0 6px; opacity: .6; }

/* post header */
.post-title, .entry-title { margin-top: 0; }
#content .post-title { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); line-height: 1.25; letter-spacing: -0.03em; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .86rem; color: var(--muted); margin: 0 0 28px; }
.post-meta a { color: var(--ink-2); font-weight: 600; }
.post-meta .mdash { display: none; }
.post-meta .comments-link::before { content: "·"; margin-right: 8px; }
#content .post-meta { padding-bottom: 22px; border-bottom: 1px solid var(--line); }

/* post body typography */
.post-entry { font-size: 1.04rem; color: var(--ink-2); }
.post-entry > *:first-child { margin-top: 0; }
.post-entry p.gap { height: .6em; margin: 0; }
.post-entry [style*="FONT-SIZE: 24px"], .post-entry [style*="font-size: 24px"] { font-size: 1.45rem !important; color: var(--ink); }
.post-entry a { text-decoration: underline; text-decoration-color: rgba(91, 91, 240, .35); text-underline-offset: 3px; }
.post-entry a:hover { text-decoration-color: currentColor; }
.post-entry img { border-radius: var(--radius-sm); }
.post-entry ul, .post-entry ol { padding-left: 1.4em; }
.post-entry li { margin: .3em 0; }
blockquote {
	margin-left: 0; padding: 16px 22px; border-left: 4px solid var(--brand);
	background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2);
}
blockquote p:last-child { margin-bottom: 0; }
code, kbd, samp { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { padding: .15em .4em; border-radius: 6px; background: var(--surface-2); color: #b4235a; }
pre {
	position: relative; overflow: auto; padding: 20px 22px; border-radius: var(--radius-sm);
	background: var(--night); color: #e6e8f2; font-family: var(--mono); font-size: .88rem; line-height: 1.65;
	white-space: pre; word-break: normal; overflow-wrap: normal; tab-size: 4;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
pre[class*="brush"]::before {
	content: attr(class); position: absolute; top: 8px; right: 12px; font-size: .7rem;
	color: rgba(255, 255, 255, .35); text-transform: uppercase; letter-spacing: .08em;
}
table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
th, td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-2); color: var(--ink); font-weight: 700; }
.wp-caption, figure { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 6px; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }

/* read more */
.read-more { margin: 4px 0 0; }
.read-more a { padding: .55em 1.1em; font-size: .85rem; background: var(--surface-2); color: var(--ink); box-shadow: none; }
.read-more a:hover { background: var(--brand); color: #fff; }
.post-entry .read-more a { text-decoration: none; }

/* post footer */
.post-data { margin-top: 28px; font-size: .86rem; color: var(--muted); }
.post-data a { display: inline-block; padding: 3px 10px; margin: 0 4px 4px 0; border-radius: 999px; background: rgba(91, 91, 240, .1); color: var(--brand); font-weight: 600; }
#content-archive .post-data { margin-top: 10px; }
.post-edit:empty { display: none; }

.navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 36px 0 0; }
.navigation .previous, .navigation .next { min-width: 0; }
.navigation .previous a, .navigation .next a {
	display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm);
	background: var(--surface); color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.45;
}
.navigation .previous a::before { content: "← 이전 글"; display: block; font-size: .75rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.navigation .next { text-align: right; grid-column: 2; }
.navigation .next a::before { content: "다음 글 →"; display: block; font-size: .75rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.navigation .previous a:hover, .navigation .next a:hover { border-color: var(--brand); color: var(--brand); }
.navigation { font-size: 0; } /* hide stray ‹ › characters */
.navigation a { font-size: .95rem; }
#content-archive .navigation .previous a::before { content: "← 이전 페이지"; }
#content-archive .navigation .next a::before { content: "다음 페이지 →"; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.page-numbers { padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* comments */
#comments, .comment-respond {
	margin-top: 28px; padding: clamp(24px, 4vw, 40px); background: var(--surface);
	border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.comment-reply-title, #comments h3 { margin-top: 0; font-size: 1.2rem; }
.commentlist, .comment-list { list-style: none; padding: 0; }
.comment-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.comment-form > p { margin: 0; grid-column: 1 / -1; }
.comment-form .comment-form-author, .comment-form .comment-form-email, .comment-form .comment-form-url { grid-column: auto; }
.comment-form label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.comment-notes { font-size: .85rem; color: var(--muted); }
.required { color: #e0446a; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea, select {
	width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
	background: var(--bg); font: inherit; font-size: .95rem; color: var(--ink);
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px rgba(91, 91, 240, .12); }
textarea { min-height: 150px; resize: vertical; }

/* ---------- widgets ---------- */
.widget-wrapper {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px 22px 18px; margin: 0 0 18px; box-shadow: var(--shadow); font-size: .93rem;
}
.widget-title h3, .widget-title-home h3, .widget-title {
	margin: 0 0 12px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.widget-title-home h3 { font-size: .82rem; color: var(--brand); }
.widget-wrapper ul { list-style: none; margin: 0; padding: 0; }
.widget-wrapper li { padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.5; }
.widget-wrapper li:first-child { border-top: 0; padding-top: 0; }
.widget-wrapper li a { color: var(--ink-2); font-weight: 500; }
.widget-wrapper li a:hover { color: var(--brand); }
.widget_recent_entries li a, .widget_recent_comments li {
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.widget_recent_entries .post-date { display: block; font-size: .78rem; color: var(--muted); }
.widget_search #searchform #s, .widget_search .search-field { width: 100%; }
.widget_search #searchsubmit { flex-shrink: 0; padding-inline: 1em; }
.tagcloud, .wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tagcloud a, .wp-block-tag-cloud a {
	font-size: .82rem !important; padding: 4px 11px; border-radius: 999px;
	background: var(--surface-2); color: var(--ink-2); font-weight: 600;
}
.tagcloud a:hover { background: var(--brand); color: #fff; }
.widget_categories li, .widget_archive li { display: flex; justify-content: space-between; gap: 8px; }
.widget_archive ul { max-height: 280px; overflow-y: auto; scrollbar-width: thin; }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: rgba(255, 255, 255, .65); padding: 56px 0 28px; font-size: .92rem; }
.site-footer a { color: rgba(255, 255, 255, .8); }
.site-footer a:hover { color: #fff; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-bottom: 40px; }
.footer-widgets .widget-wrapper { background: transparent; border: 0; box-shadow: none; padding: 0; color: rgba(255, 255, 255, .7); }
.footer-widgets .widget-wrapper li { border-color: rgba(255, 255, 255, .08); }
.footer-widgets .widget-wrapper li a { color: rgba(255, 255, 255, .8); }
.footer-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.footer-brand strong { color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.footer-menu, .social-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social-links a {
	display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16);
	font-size: .85rem; font-weight: 600;
}
.social-links a:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; font-size: .82rem; color: rgba(255, 255, 255, .45); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wrapper-main { grid-template-columns: minmax(0, 1fr); }
	.wrapper-main > #widgets, .wrapper-main > .widget-area {
		position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px;
	}
	.wrapper-main > #widgets .widget-wrapper { margin: 0; }
}

@media (max-width: 860px) {
	.nav-toggle-btn { display: block; }
	.main-nav {
		position: absolute; top: 100%; left: 0; right: 0; margin: 0;
		flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 24px 24px;
		background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
		opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .2s ease;
	}
	.nav-toggle:checked ~ .main-nav { opacity: 1; visibility: visible; transform: none; }
	.main-nav .menu { flex-direction: column; }
	.main-nav .menu a, .is-overlay .main-nav .menu a { color: var(--ink-2); padding: 12px 14px; border-radius: 10px; }
	.is-overlay .main-nav .menu a:hover, .is-overlay .main-nav .menu .current-menu-item > a { background: var(--surface-2); color: var(--ink); }
	.main-nav .menu .sub-menu, .main-nav .menu .children { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 14px; }
	#searchform #s, #searchform #s:focus, .is-overlay #searchform #s { width: 100%; background: var(--bg); border-color: var(--line); color: var(--ink); }
	.is-overlay #searchform #s::placeholder { color: var(--muted); }
	.home-widgets { grid-template-columns: minmax(0, 1fr); }
	.comment-form { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
	.shell { padding-inline: 16px; }
	.card-grid { grid-template-columns: minmax(0, 1fr); }
	.hero { min-height: 78vh; padding-bottom: 72px; }
	.section { padding-block: 52px; }
	.wrapper-main { padding-top: 28px; gap: 28px; }
	.navigation { grid-template-columns: minmax(0, 1fr); }
	.navigation .next { grid-column: 1; }
	#content-archive > .hentry, #content-search > .hentry { padding: 22px 20px; }
	.admin-bar .site-header { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.site-header, .site-footer, #widgets, .comment-respond, .navigation { display: none !important; }
	.wrapper-main { display: block; }
	body { background: #fff; }
}
