/*
 * Original styles for KK Simple Theme.
 * note-inspired blog layout.
 */

:root {
	--note-green: #2cb696;
	--note-green-dark: #149174;
	--note-bg: #f7f9f8;
	--note-surface: #ffffff;
	--note-text: #222222;
	--note-muted: #6f7777;
	--note-border: #e6e9e8;
	--note-border-strong: #d8dddd;
	--note-radius: 14px;
	--note-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--note-bg);
	color: var(--note-text);
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
	line-height: 1.75;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

a:hover {
	color: var(--note-green-dark);
}

img {
	max-width: 100%;
	height: auto;
	object-fit: cover;
}

.note-container {
	max-width: 1120px;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 1030;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--note-border);
	backdrop-filter: blur(14px);
}

.site-header-inner {
	display: grid;
	grid-template-columns: auto minmax(180px, 360px) 1fr auto auto;
	gap: 18px;
	align-items: center;
	min-height: 64px;
}

.site-brand strong {
	color: var(--note-green);
	font-size: 1.7rem;
	font-weight: 900;
	letter-spacing: 0;
}

.header-search input {
	width: 100%;
	height: 42px;
	border: 1px solid var(--note-border);
	border-radius: 999px;
	background: #f4f6f5;
	color: var(--note-text);
	font-size: 0.92rem;
	outline: none;
	padding: 0 16px;
}

.header-search input:focus {
	background: var(--note-surface);
	border-color: var(--note-green);
	box-shadow: 0 0 0 4px rgba(44, 182, 150, 0.12);
}

.global-nav {
	min-width: 0;
}

.note-nav {
	align-items: center;
	gap: 18px;
	justify-content: flex-end;
}

.note-nav .menu-item a {
	color: var(--note-muted);
	font-size: 0.92rem;
	font-weight: 700;
}

.note-nav .menu-item a:hover,
.note-nav .current-menu-item a {
	color: var(--note-green-dark);
}

.header-actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

.header-login,
.header-post {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 800;
}

.header-login {
	color: var(--note-muted);
	padding: 0 6px;
}

.header-post {
	background: var(--note-green);
	color: #ffffff;
	padding: 0 18px;
}

.header-post:hover {
	background: var(--note-green-dark);
	color: #ffffff;
}

.navbar-toggler {
	border: 0;
	padding: 6px;
}

.navbar-toggler-icon {
	background-image: linear-gradient(var(--note-text), var(--note-text)), linear-gradient(var(--note-text), var(--note-text)), linear-gradient(var(--note-text), var(--note-text));
	background-position: center 30%, center, center 70%;
	background-repeat: no-repeat;
	background-size: 22px 2px;
}

.note-hero {
	padding: 56px 0 28px;
	background:
		radial-gradient(circle at 16% 18%, rgba(44, 182, 150, 0.12), transparent 28%),
		linear-gradient(180deg, #ffffff, var(--note-bg));
}

.note-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 28px;
	align-items: stretch;
}

.note-kicker {
	margin-bottom: 12px;
	color: var(--note-green);
	font-weight: 900;
}

.note-hero h1 {
	max-width: 720px;
	margin-bottom: 16px;
	font-size: clamp(2.1rem, 5vw, 4.4rem);
	font-weight: 900;
	line-height: 1.18;
	letter-spacing: 0;
}

.note-hero p:not(.note-kicker) {
	max-width: 660px;
	color: var(--note-muted);
	font-size: 1.05rem;
	font-weight: 600;
}

.note-hero-card {
	display: grid;
	align-content: end;
	gap: 10px;
	min-height: 260px;
	border: 1px solid var(--note-border);
	border-radius: 24px;
	background:
		radial-gradient(circle at 80% 20%, rgba(44, 182, 150, 0.28), transparent 24%),
		linear-gradient(135deg, #ffffff, #effaf7);
	box-shadow: var(--note-shadow);
	padding: 24px;
}

.note-hero-card span {
	color: var(--note-green);
	font-size: 0.88rem;
	font-weight: 900;
}

.note-hero-card strong {
	font-size: 1.45rem;
	font-weight: 900;
	line-height: 1.35;
}

.note-hero-card small {
	color: var(--note-muted);
	font-weight: 700;
}

.trend-section {
	padding: 10px 0 30px;
}

.trend-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	padding: 14px;
	border: 1px solid var(--note-border);
	border-radius: var(--note-radius);
	background: var(--note-surface);
}

.trend-row strong {
	color: var(--note-green);
	margin-right: 4px;
}

.trend-row a,
.category-pills a,
.note-category {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	border-radius: 999px;
	background: #f2f5f4;
	color: var(--note-muted);
	font-size: 0.84rem;
	font-weight: 800;
	padding: 4px 12px;
}

.trend-row a:hover,
.category-pills a:hover {
	background: rgba(44, 182, 150, 0.12);
	color: var(--note-green-dark);
}

.featured-section,
.latest-section {
	padding: 34px 0;
}

.section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.section-title h2 {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 900;
}

.section-title a {
	color: var(--note-green);
	font-size: 0.9rem;
	font-weight: 800;
}

.featured-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.note-card,
.article-row,
.sidebar-panel {
	border: 1px solid var(--note-border);
	border-radius: var(--note-radius);
	background: var(--note-surface);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.note-card a {
	display: grid;
	height: 100%;
}

.note-card-image {
	display: block;
	overflow: hidden;
	border-radius: var(--note-radius) var(--note-radius) 0 0;
	background: #eef2f1;
}

.note-card-image img,
.note-placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.note-placeholder {
	background:
		radial-gradient(circle at 70% 24%, rgba(44, 182, 150, 0.26), transparent 22%),
		linear-gradient(135deg, #ffffff, #e9f7f4);
}

.note-card-body {
	display: grid;
	gap: 10px;
	padding: 16px;
}

.note-card-body strong,
.article-main strong {
	display: -webkit-box;
	overflow: hidden;
	font-size: 1.05rem;
	font-weight: 900;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.note-excerpt {
	display: -webkit-box;
	overflow: hidden;
	color: var(--note-muted);
	font-size: 0.9rem;
	line-height: 1.7;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.note-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	align-items: center;
	color: var(--note-muted);
	font-size: 0.82rem;
	font-weight: 700;
}

.note-meta img {
	width: 26px;
	height: 26px;
	border-radius: 999px;
}

.note-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 28px;
	align-items: start;
}

.article-list {
	display: grid;
	gap: 12px;
}

.article-row a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 178px;
	gap: 18px;
	padding: 18px;
}

.article-main {
	display: grid;
	gap: 9px;
	min-width: 0;
}

.article-thumb {
	display: block;
	overflow: hidden;
	border-radius: 10px;
	background: #eef2f1;
}

.article-thumb img,
.article-thumb .note-placeholder {
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 10;
}

.note-sidebar {
	position: sticky;
	top: 86px;
	display: grid;
	gap: 16px;
}

.sidebar-panel {
	padding: 18px;
}

.sidebar-panel h2 {
	margin-bottom: 14px;
	font-size: 1rem;
	font-weight: 900;
}

.category-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.creator-panel p {
	color: var(--note-muted);
	font-size: 0.92rem;
}

.creator-panel > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	border-radius: 999px;
	background: var(--note-green);
	color: #ffffff;
	font-weight: 900;
	padding: 0 18px;
}

.creator-panel > a:hover {
	background: var(--note-green-dark);
	color: #ffffff;
}

.empty-text {
	color: var(--note-muted);
}

.content-area {
	max-width: 760px;
	margin: 36px auto 0;
	padding: 28px;
	border: 1px solid var(--note-border);
	border-radius: var(--note-radius);
	background: var(--note-surface);
}

.post-card {
	border: 1px solid var(--note-border);
	border-radius: var(--note-radius);
	background: var(--note-surface);
}

.post-card-image img,
.featured-image img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.entry-content p {
	margin: 1rem 0;
}

.site-footer {
	margin-top: 46px;
	padding: 34px 0;
	border-top: 1px solid var(--note-border);
	background: var(--note-surface);
	color: var(--note-muted);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 18px;
	align-items: start;
}

.footer-brand strong {
	color: var(--note-green);
	font-size: 1.4rem;
	font-weight: 900;
}

.footer-brand p {
	margin: 4px 0 0;
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-menu .menu-item {
	margin: 0;
}

.footer-copy {
	grid-column: 1 / -1;
	font-size: 0.84rem;
}

.pagination-wrapper .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pagination-wrapper .page-numbers {
	display: inline-grid;
	min-width: 38px;
	min-height: 38px;
	place-items: center;
	border: 1px solid var(--note-border);
	border-radius: 999px;
	background: var(--note-surface);
	color: var(--note-text);
	text-decoration: none;
}

.pagination-wrapper .page-numbers.current {
	background: var(--note-green);
	color: #ffffff;
}

@media (max-width: 991.98px) {
	.site-header-inner {
		grid-template-columns: auto 1fr auto;
		min-height: auto;
		padding: 12px 0;
	}

	.header-search {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.global-nav {
		grid-column: 1 / -1;
		grid-row: 3;
	}

	.note-nav {
		align-items: flex-start;
		gap: 10px;
		padding-top: 10px;
	}

	.header-actions {
		justify-self: end;
	}

	.note-hero-grid,
	.note-layout {
		grid-template-columns: 1fr;
	}

	.note-sidebar {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.featured-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767.98px) {
	.note-hero {
		padding-top: 34px;
	}

	.note-hero-card {
		min-height: 190px;
	}

	.featured-grid,
	.note-sidebar {
		grid-template-columns: 1fr;
	}

	.article-row a {
		grid-template-columns: 1fr 112px;
		gap: 12px;
		padding: 14px;
	}

	.article-main strong {
		font-size: 0.98rem;
	}

	.note-excerpt {
		-webkit-line-clamp: 2;
	}

	.footer-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.header-actions {
		display: none;
	}

	.site-header-inner {
		grid-template-columns: auto auto;
	}

	.note-hero h1 {
		font-size: 2.15rem;
	}

	.article-row a {
		grid-template-columns: 1fr;
	}
}
