/*
Theme Name: KatyLee Archive
Theme URI: https://katylee.com/
Author: KatyLee.com
Description: A secure, responsive archive theme inspired by the original DarkZen layout.
Version: 1.0.1
Requires at least: 7.0
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: katylee-archive
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, accessibility-ready
*/

:root {
	--archive-ink: #313735;
	--archive-ink-deep: #202523;
	--archive-ink-soft: #454b48;
	--archive-paper: #ffffff;
	--archive-canvas: #a9ac99;
	--archive-canvas-deep: #8f927f;
	--archive-line: #d9dbd2;
	--archive-line-dark: #6f756e;
	--archive-muted: #6f756f;
	--archive-pale: #f3f4ef;
	--archive-link: #426884;
	--archive-link-hover: #273f50;
	--archive-accent: #898d72;
	--archive-focus: #f0c75e;
	--archive-shadow: 0 20px 55px rgba(33, 39, 32, 0.22);
	--archive-radius: 0.4rem;
	--archive-content: 44rem;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--archive-canvas);
	background-image:
		radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.5px),
		radial-gradient(circle at 73% 58%, rgba(42, 48, 39, 0.08) 0 1px, transparent 1.5px),
		linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 16rem),
		linear-gradient(135deg, var(--archive-canvas), var(--archive-canvas-deep));
	background-size: 21px 21px, 29px 29px, auto, auto;
	color: #424844;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
	font-size: 1rem;
	line-height: 1.68;
}

body.admin-bar .site-frame {
	margin-top: 0;
}

a {
	color: var(--archive-link);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.16em;
}

a:hover {
	color: var(--archive-link-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--archive-focus);
	outline-offset: 3px;
}

img,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

figure {
	margin-inline: 0;
}

button,
input,
select,
textarea {
	font: inherit;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	border: 1px solid var(--archive-ink-deep);
	border-radius: 0.2rem;
	background: var(--archive-ink);
	color: #fff;
	cursor: pointer;
	font-weight: 700;
	line-height: 1.2;
	padding: 0.72rem 1rem;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
	background: var(--archive-ink-deep);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
	max-width: 100%;
	border: 1px solid #858b83;
	border-radius: 0.2rem;
	background: #fff;
	color: #252a27;
	padding: 0.68rem 0.72rem;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
}

th,
td {
	border: 1px solid var(--archive-line);
	padding: 0.7rem;
	text-align: left;
	vertical-align: top;
}

th {
	background: var(--archive-pale);
}

blockquote {
	margin: 1.75rem 0;
	border-left: 4px solid var(--archive-accent);
	background: var(--archive-pale);
	color: #4b514d;
	padding: 0.75rem 1.25rem;
}

blockquote > :first-child {
	margin-top: 0;
}

blockquote > :last-child {
	margin-bottom: 0;
}

pre,
code,
kbd,
samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

pre {
	overflow-x: auto;
	background: #252a27;
	color: #f3f4ef;
	padding: 1rem;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus,
.skip-link:focus {
	position: fixed !important;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100000;
	width: auto;
	height: auto;
	clip: auto;
	background: #fff;
	color: #111;
	font-weight: 700;
	padding: 0.75rem 1rem;
	white-space: normal;
}

.site-frame {
	width: min(100% - 2rem, 70rem);
	margin: 2rem auto;
	background: var(--archive-paper);
	box-shadow: var(--archive-shadow);
}

.site-header {
	position: relative;
	overflow: hidden;
	background:
		linear-gradient(110deg, rgba(255, 255, 255, 0.04), transparent 45%),
		var(--archive-ink);
	border-top: 0.35rem solid var(--archive-ink-deep);
	color: #fff;
}

.site-header::after {
	position: absolute;
	right: -4rem;
	bottom: -5.8rem;
	width: 18rem;
	height: 12rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	box-shadow: 0 0 0 2.3rem rgba(255, 255, 255, 0.018), 0 0 0 4.7rem rgba(255, 255, 255, 0.012);
	content: "";
	pointer-events: none;
}

.site-branding {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: 9rem;
	padding: 2.25rem clamp(1.3rem, 4vw, 3.25rem);
}

.custom-logo-link {
	display: inline-flex;
	flex: 0 0 auto;
}

.custom-logo {
	width: auto;
	max-height: 5rem;
}

.site-title {
	margin: 0;
	color: #fff;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2rem, 5vw, 3.35rem);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.05;
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.site-description {
	margin: 0.55rem 0 0;
	color: #d4d7d2;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.015em;
}

.archive-kicker {
	margin: 0 0 0.35rem;
	color: #bdc2b7;
	font-size: 0.73rem;
	font-weight: 800;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

.primary-navigation {
	position: relative;
	z-index: 2;
	background: var(--archive-ink-deep);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-navigation .menu,
.primary-navigation > ul {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0;
	margin: 0;
	padding: 0 clamp(0.65rem, 3vw, 2.5rem);
	list-style: none;
}

.primary-navigation li {
	margin: 0;
}

.primary-navigation a {
	display: flex;
	align-items: center;
	min-height: 3rem;
	padding: 0.65rem 0.9rem;
	color: #d9ddd7;
	font-size: 0.88rem;
	font-weight: 750;
	text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a {
	background: var(--archive-ink-soft);
	color: #fff;
}

.site-main-wrap {
	display: grid;
	grid-template-columns: minmax(0, 2.1fr) minmax(15rem, 0.9fr);
	gap: clamp(2rem, 5vw, 4rem);
	padding: clamp(1.5rem, 4vw, 3.4rem);
}

.site-content {
	min-width: 0;
}

.page-header {
	margin: 0 0 2.2rem;
	border-bottom: 1px solid var(--archive-line);
	padding-bottom: 1rem;
}

.page-title {
	margin: 0;
	color: var(--archive-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.75rem, 4vw, 2.45rem);
	font-weight: 600;
	line-height: 1.18;
}

.archive-description {
	margin-top: 0.65rem;
	color: var(--archive-muted);
}

.archive-description > :last-child {
	margin-bottom: 0;
}

.post-card {
	margin: 0 0 2.75rem;
	border-bottom: 1px solid var(--archive-line);
	padding: 0 0 2.75rem;
}

.post-card:last-of-type {
	margin-bottom: 1.5rem;
}

.post-heading-grid {
	display: grid;
	grid-template-columns: 4.1rem minmax(0, 1fr);
	gap: 1rem;
	align-items: start;
	margin-bottom: 1.25rem;
}

.date-badge {
	display: block;
	border-right: 3px solid var(--archive-line);
	padding: 0.05rem 0.8rem 0.15rem 0;
	color: var(--archive-muted);
	font-variant-numeric: tabular-nums;
	line-height: 1;
	text-align: right;
	text-decoration: none;
}

.date-badge__day {
	display: block;
	color: var(--archive-accent);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 2rem;
	font-weight: 600;
}

.date-badge__month,
.date-badge__year {
	display: block;
	margin-top: 0.27rem;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.date-badge__year {
	color: #676d67;
	font-size: 0.62rem;
}

.entry-title {
	margin: 0;
	color: var(--archive-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.65rem, 3.5vw, 2.25rem);
	font-weight: 600;
	letter-spacing: -0.018em;
	line-height: 1.16;
	overflow-wrap: anywhere;
}

.entry-title a {
	color: inherit;
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--archive-link);
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.75rem;
	margin-top: 0.55rem;
	color: #626862;
	font-size: 0.82rem;
}

.entry-meta a {
	color: #465a4c;
}

.entry-thumbnail {
	margin: 0 0 1.35rem;
}

.entry-thumbnail img {
	display: block;
	width: 100%;
	border-radius: var(--archive-radius);
}

.entry-content,
.entry-summary {
	max-width: var(--archive-content);
	overflow-wrap: anywhere;
}

.entry-content > :first-child,
.entry-summary > :first-child {
	margin-top: 0;
}

.entry-content > :last-child,
.entry-summary > :last-child {
	margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	color: var(--archive-ink);
	font-family: Georgia, "Times New Roman", serif;
	line-height: 1.25;
	margin-top: 1.7em;
}

.entry-content a,
.entry-summary a {
	overflow-wrap: anywhere;
}

.entry-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
	margin-top: 1.4rem;
	color: var(--archive-muted);
	font-size: 0.84rem;
}

.entry-footer a {
	font-weight: 650;
}

.more-link {
	display: inline-flex;
	margin-top: 0.75rem;
	font-weight: 750;
}

.page-links {
	margin-top: 1.5rem;
	font-weight: 700;
}

.page-links .post-page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	min-height: 2rem;
	margin-inline: 0.15rem;
	border: 1px solid var(--archive-line);
	text-decoration: none;
}

.page-links .current {
	background: var(--archive-ink);
	color: #fff;
}

.post-navigation,
.posts-navigation,
.pagination {
	margin: 2.25rem 0 0;
}

.nav-links {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.nav-previous,
.nav-next {
	max-width: 48%;
}

.nav-next {
	margin-left: auto;
	text-align: right;
}

.pagination .nav-links {
	justify-content: flex-start;
	flex-wrap: wrap;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	min-height: 2.4rem;
	border: 1px solid var(--archive-line);
	padding: 0.3rem 0.7rem;
	font-weight: 700;
	text-decoration: none;
}

.page-numbers.current {
	border-color: var(--archive-ink);
	background: var(--archive-ink);
	color: #fff;
}

.sidebar {
	min-width: 0;
	border-left: 1px solid var(--archive-line);
	padding-left: clamp(1.35rem, 3vw, 2.3rem);
}

.widget,
.archive-sidebar-section {
	margin: 0 0 2.1rem;
}

.widget-title,
.archive-sidebar-section__title {
	margin: 0 0 0.75rem;
	border-bottom: 2px solid var(--archive-ink);
	color: var(--archive-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.3;
	padding-bottom: 0.55rem;
}

.widget ul,
.archive-sidebar-section ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li,
.archive-sidebar-section li {
	border-bottom: 1px solid var(--archive-line);
	padding: 0.48rem 0;
}

.widget li a,
.archive-sidebar-section li a {
	display: inline-block;
	color: #5b655e;
	font-size: 0.91rem;
	text-decoration: none;
}

.widget li a:hover,
.archive-sidebar-section li a:hover {
	color: var(--archive-link);
	text-decoration: underline;
}

.search-form {
	display: flex;
	gap: 0.45rem;
}

.search-form label {
	flex: 1 1 auto;
}

.search-field {
	width: 100%;
	min-width: 0;
}

.search-submit {
	flex: 0 0 auto;
}

.comments-area {
	margin-top: 3rem;
	border-top: 1px solid var(--archive-line);
	padding-top: 2.3rem;
}

.comments-title {
	margin: 0 0 1.5rem;
	color: var(--archive-ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.55rem;
}

.comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 1.2rem 0 0;
	padding-left: clamp(1rem, 4vw, 2.5rem);
	list-style: none;
}

.comment-body {
	margin: 0 0 1.2rem;
	border: 1px solid var(--archive-line);
	background: var(--archive-pale);
	padding: 1rem;
}

.comment-meta {
	margin-bottom: 0.7rem;
	font-size: 0.84rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-content > :last-child {
	margin-bottom: 0;
}

.comments-archive-note {
	border-left: 3px solid var(--archive-accent);
	background: var(--archive-pale);
	color: #59605b;
	padding: 0.8rem 1rem;
}

.no-results,
.error-404 {
	min-height: 20rem;
}

.not-found-help {
	margin-top: 2rem;
}

.site-footer {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	background: var(--archive-ink);
	color: #cfd3ce;
	font-size: 0.82rem;
	padding: 1.5rem clamp(1.3rem, 4vw, 3.25rem);
}

.site-footer p {
	margin: 0;
}

.site-footer a {
	color: #fff;
}

.alignleft {
	float: left;
	margin: 0.4rem 1.25rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.4rem 0 1rem 1.25rem;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.alignwide {
	max-width: 100%;
}

.wp-caption,
.gallery-caption {
	max-width: 100%;
	color: var(--archive-muted);
	font-size: 0.82rem;
}

.wp-caption-text {
	margin-top: 0.45rem;
}

.bypostauthor .comment-body {
	border-left: 4px solid var(--archive-accent);
}

.sticky {
	border-top: 4px solid var(--archive-accent);
	background: linear-gradient(180deg, rgba(169, 172, 153, 0.11), transparent 8rem);
	padding-top: 1.5rem;
}

@media (max-width: 54rem) {
	.site-frame {
		width: min(100% - 1rem, 70rem);
		margin: 0.5rem auto;
	}

	.site-main-wrap {
		grid-template-columns: 1fr;
	}

	.sidebar {
		border-top: 1px solid var(--archive-line);
		border-left: 0;
		padding-top: 2rem;
		padding-left: 0;
	}

	.sidebar-inner {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 2rem;
	}
}

@media (max-width: 38rem) {
	body {
		font-size: 0.97rem;
	}

	.site-frame {
		width: 100%;
		margin: 0;
	}

	.site-branding {
		align-items: flex-start;
		min-height: 7.5rem;
		padding-block: 1.7rem;
	}

	.primary-navigation .menu,
	.primary-navigation > ul {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 0;
	}

	.primary-navigation a {
		justify-content: center;
		border: 1px solid rgba(255, 255, 255, 0.05);
		padding-inline: 0.5rem;
		text-align: center;
	}

	.site-main-wrap {
		padding: 1.35rem 1rem 2rem;
	}

	.post-heading-grid {
		grid-template-columns: 3.4rem minmax(0, 1fr);
		gap: 0.7rem;
	}

	.date-badge {
		padding-right: 0.55rem;
	}

	.date-badge__day {
		font-size: 1.65rem;
	}

	.sidebar-inner {
		grid-template-columns: 1fr;
	}

	.nav-links,
	.site-footer {
		flex-direction: column;
	}

	.nav-previous,
	.nav-next {
		max-width: 100%;
		text-align: left;
	}

	.nav-next {
		margin-left: 0;
	}

	.search-form {
		align-items: stretch;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media print {
	body {
		background: #fff;
		color: #000;
	}

	.site-frame {
		width: 100%;
		margin: 0;
		box-shadow: none;
	}

	.primary-navigation,
	.sidebar,
	.site-footer,
	.skip-link {
		display: none;
	}

	.site-header {
		border-bottom: 1px solid #bbb;
		background: #fff;
		color: #000;
	}

	.site-title,
	.site-description,
	.archive-kicker {
		color: #000;
	}

	.site-main-wrap {
		display: block;
		padding: 0;
	}

	a {
		color: #000;
	}
}
