/*
Theme Name: Nghiêm Xuân Huy Journal
Theme URI: https://nxhuy.net/
Description: Giao diện tối giản, thiên về nhật ký cá nhân cho blog nxhuy.net. Theme con của Twenty Twenty-Five.
Author: Nghiêm Xuân Huy
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: nxhuy-journal
*/

/* ---------- Shared pieces ---------- */
.nxhuy-label {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.nxhuy-label a { color: inherit; text-decoration: none; }
.nxhuy-date,
.nxhuy-date a {
	font-size: 12.5px;
	color: var(--wp--preset--color--muted);
	font-variant-numeric: tabular-nums;
}
.nxhuy-section {
	margin-top: 44px !important;
	padding-top: 26px;
	border-top: 1px solid var(--wp--preset--color--line);
}
.nxhuy-section-label { margin-bottom: 6px !important; }
.nxhuy-more { margin-top: 14px !important; font-size: 13px; font-weight: 500; }
.nxhuy-more a { color: var(--wp--preset--color--accent); }

/* ---------- Header ---------- */
.nxhuy-header .wp-block-site-title a { text-decoration: none; }
.nxhuy-header .wp-block-navigation a:hover { text-decoration: none; color: var(--wp--preset--color--accent); }

/* ---------- Homepage ---------- */
.nxhuy-featured { align-items: center; }
.nxhuy-featured .wp-block-post-title a { text-decoration: none; }
.nxhuy-featured .wp-block-post-excerpt__excerpt { margin: 0; }

.nxhuy-list .wp-block-post-template { gap: 0; }
.nxhuy-list .wp-block-post {
	padding: 12px 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.nxhuy-list .wp-block-post > * { margin-block: 0; }
.nxhuy-list .wp-block-post-title { font-size: 17px; line-height: 1.4; margin-bottom: 4px !important; }
.nxhuy-list .wp-block-post-title a { text-decoration: none; }
.nxhuy-poem-line {
	margin: 4px 0 0;
	font-family: var(--wp--preset--font-family--lora);
	font-style: italic;
	font-size: 14.5px;
	color: #4b453e;
}

.nxhuy-q-photos .wp-block-post-template { gap: 14px; }
.nxhuy-photo-title { font-size: 14px !important; margin-top: 8px !important; font-weight: 500 !important; }
.nxhuy-photo-title a { text-decoration: none; }

@media (max-width: 781px) {
	.nxhuy-two { gap: 0 !important; }
	.nxhuy-two > .wp-block-column + .wp-block-column {
		margin-top: 34px;
		padding-top: 22px;
		border-top: 1px solid var(--wp--preset--color--line);
	}
}
@media (max-width: 600px) {
	/* Photos become a horizontal swipe strip. */
	.nxhuy-q-photos .wp-block-post-template {
		display: flex !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 6px;
	}
	.nxhuy-q-photos .wp-block-post { flex: 0 0 78%; scroll-snap-align: start; }
	.nxhuy-featured .wp-block-post-title { font-size: 24px !important; }
}

.nxhuy-header .wp-block-search__button {
	background: transparent;
	color: var(--wp--preset--color--ink);
	padding: 6px;
	border: 0;
}
.nxhuy-header .wp-block-search__button svg { width: 22px; height: 22px; }

/* ---------- Single post ---------- */
.nxhuy-meta { font-size: 13px; color: var(--wp--preset--color--muted); }
.nxhuy-meta > * { margin: 0 !important; font-size: 13px !important; }
.nxhuy-meta > * + *::before { content: "·"; margin-right: 8px; color: var(--wp--preset--color--line); }
.nxhuy-meta .wp-block-post-author-name { color: var(--wp--preset--color--ink); font-weight: 500; }
.nxhuy-reader-tools { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.nxhuy-tool {
	font: 500 12px/1 var(--wp--preset--font-family--be-vietnam-pro);
	color: var(--wp--preset--color--muted);
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 6px 12px;
	cursor: pointer;
}
.nxhuy-tool:hover, .nxhuy-tool:focus-visible { color: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--muted); }
.nxhuy-tool-status { font-size: 12px; color: var(--wp--preset--color--accent); }
.nxhuy-article { font-size: calc(17.5px * var(--nxhuy-article-scale, 1)) !important; }
.nxhuy-article p { margin-block: 0 1.05em; }
.nxhuy-article img { border-radius: 3px; }
.nxhuy-article blockquote:not(.wp-block-quote) {
	margin: 1.4em 0;
	padding-left: 18px;
	border-left: 2px solid var(--wp--preset--color--accent);
	font-style: italic;
}
.nxhuy-post-nav a { text-decoration: none; }
.nxhuy-post-nav .post-navigation-link__label { display: block; font-size: 12.5px; color: var(--wp--preset--color--muted); }
.nxhuy-post-nav .post-navigation-link__title { font-family: var(--wp--preset--font-family--lora); font-weight: 600; font-size: 15px; }
.nxhuy-related .wp-block-post-title a { text-decoration: none; }

/* ---------- Poem layout ---------- */
.nxhuy-poem .nxhuy-article-head { text-align: center; }
.nxhuy-poem .nxhuy-meta, .nxhuy-poem .nxhuy-reader-tools { justify-content: center; }
.nxhuy-poem .nxhuy-meta-author { display: none; }
.nxhuy-poem .nxhuy-meta .nxhuy-reading-time { display: none; }
.nxhuy-poem .wp-block-post-content {
	text-align: center;
	line-height: 1.9;
	font-size: calc(18.5px * var(--nxhuy-article-scale, 1)) !important;
}
.nxhuy-poem .wp-block-post-content p { margin-block: 0 1.4em; }
.nxhuy-poem .wp-block-post-content > p:last-child:has(> em:only-child),
.nxhuy-poem .wp-block-post-content > p:last-child:has(> i:only-child) {
	text-align: right;
	color: var(--wp--preset--color--muted);
}

/* ---------- Archives ---------- */
.nxhuy-archive-list .wp-block-post { padding: 18px 0; }
.nxhuy-archive-list .wp-block-post-title { font-size: 20px !important; margin: 6px 0 !important; }
.nxhuy-archive-list .wp-block-post-excerpt__excerpt { margin: 0; }
.nxhuy-poem .nxhuy-meta > *::before { content: none; }

/* Featured: 55/45 on desktop, stacked on small screens. */
.nxhuy-featured.is-layout-grid { grid-template-columns: 1.2fr 1fr !important; }
@media (max-width: 781px) {
	.nxhuy-featured.is-layout-grid { grid-template-columns: 1fr !important; }
}
/* Featured post without an image: text takes the whole row. */
.nxhuy-featured:not(:has(.wp-block-post-featured-image)).is-layout-grid { grid-template-columns: 1fr !important; }

/* ---------- Comments (Jetpack Comments form, rendered in-page) ---------- */
.nxhuy-comments .comment-reply-title {
	font-size: 19px;
	margin-bottom: 14px;
}
.jetpack-comments__box {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 6px;
	background: #fff;
	transition: border-color 0.15s ease;
}
.jetpack-comments__box:focus-within {
	border-color: var(--wp--preset--color--muted) !important;
}
.jetpack-comments__textarea {
	font-family: var(--wp--preset--font-family--lora);
	font-size: 15px;
	line-height: 1.7;
	min-height: 90px !important;
	padding: 14px 16px !important;
	color: var(--wp--preset--color--ink);
	outline: none;
}
.jetpack-comments__textarea::placeholder {
	color: var(--wp--preset--color--muted);
	font-style: italic;
}
.jetpack-comments__actions {
	padding: 0 14px 12px !important;
	font-size: 13px !important;
	align-items: center;
}
.jetpack-comments__identity,
.jetpack-comments__profile,
.jetpack-comments__name,
.jetpack-comments__link {
	font-size: 13px !important;
	color: var(--wp--preset--color--muted);
}
.jetpack-comments__avatar {
	width: 28px !important;
	height: 28px !important;
	border-radius: 50%;
}
.jetpack-comments__submit .wp-block-button__link {
	font-size: 13px;
	height: 34px;
	padding: 0 16px !important;
	border-radius: 999px;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}
.jetpack-comments__submit .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent);
}
.nxhuy-comments .comment-form + p,
.nxhuy-comments .akismet_comment_form_privacy_notice {
	font-size: 12px;
	color: var(--wp--preset--color--muted);
}

/* ---------- Album grid (category Nhiếp ảnh) ---------- */
.nxhuy-album-intro { margin-top: 0 !important; margin-bottom: 28px !important; font-size: 13.5px; color: var(--wp--preset--color--muted); }
.nxhuy-albums .wp-block-post-template.is-layout-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 30px 20px;
}
.nxhuy-albums .wp-block-post { position: relative; }
.nxhuy-albums .wp-block-post > * { margin-block: 0; }
.nxhuy-albums .nxhuy-album-cover { overflow: hidden; border-radius: 4px; }
.nxhuy-albums .nxhuy-album-cover img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.35s ease, filter 0.35s ease;
}
.nxhuy-albums .wp-block-post:hover .nxhuy-album-cover img { transform: scale(1.025); filter: brightness(1.05); }
.nxhuy-album-placeholder {
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 4px;
	background: #efe9de;
	font-family: var(--wp--preset--font-family--lora);
	font-style: italic;
	color: var(--wp--preset--color--muted);
	text-align: center;
}
.nxhuy-albums .nxhuy-album-title { font-size: 17px !important; line-height: 1.35; margin-top: 12px !important; }
.nxhuy-albums .nxhuy-album-title a { text-decoration: none; }
/* The title link covers the whole tile: one link per album. */
.nxhuy-albums .nxhuy-album-title a::after { content: ""; position: absolute; inset: 0; }
.nxhuy-albums .nxhuy-album-title a:focus-visible { outline: none; }
.nxhuy-albums .wp-block-post:focus-within { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 4px; border-radius: 4px; }
.nxhuy-album-meta { margin-top: 3px !important; font-size: 12.5px; color: var(--wp--preset--color--muted); font-variant-numeric: tabular-nums; }
.nxhuy-album-meta > * { margin: 0 !important; font-size: 12.5px !important; color: inherit; }
@media (max-width: 1023px) {
	.nxhuy-albums .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 599px) {
	.nxhuy-albums .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr !important; gap: 28px; }
}
