/*
Theme Name: Clear
Theme URI: https://example.com/clear-theme
Author: Alex Aitken
Author URI: https://alexaitken.nz/
Description: A minimalist editorial WordPress theme for text-first publishing with refined typography, calm spacing, and elegant archives.
Version: 1.0.4
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clear-theme
Tags: blog, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, rtl-language-support, editor-style
*/

:root {
	--clrthm-bg: #ffffff;
	--clrthm-surface: #ffffff;
	--clrthm-text: #181818;
	--clrthm-muted: #6c6c6c;
	--clrthm-excerpt: #242424;
	--clrthm-hover-bg: #f7f7f7;
	--clrthm-border: #dfdfdf;
	--clrthm-focus: #0a66d1;
	--clrthm-accent: #0a66d1;
	--clrthm-content: 72rem;
	--clrthm-space: clamp(1rem, 2vw, 1.75rem);
}

* {
	box-sizing: border-box;
}

html {
	font-size: 100%;
}

body {
	margin: 0;
	background: var(--clrthm-bg);
	color: var(--clrthm-text);
	font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizelegibility;
}

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

a {
	color: var(--clrthm-accent);
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

.site-title a,
.post-card__title a {
	color: inherit;
}

a:hover,
a:focus-visible {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--clrthm-focus);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	background: #000;
	color: #fff;
	padding: 0.75rem 1rem;
	z-index: 99;
}

.skip-link:focus {
	top: 1rem;
}

.site-header,
.site-main,
.site-footer {
	width: min(100% - 2rem, var(--clrthm-content));
	margin-inline: auto;
}

.site-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1rem;
	padding: 2rem 0;
	border-bottom: 0;
}

.site-header--centered {
	justify-content: center;
	text-align: center;
}

.site-header--centered .site-header__navs {
	align-items: center;
}

.site-header__navs {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.main-navigation ul,
.util-navigation ul,
.footer-navigation ul {
	display: flex;
	gap: 0.9rem;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.util-navigation {
	font-size: 0.88rem;
	color: var(--clrthm-muted);
}

.site-title {
	margin: 0;
	font-size: clamp(1.3rem, 2.6vw, 2rem);
	line-height: 1.1;
}

.site-main {
	padding: 2rem 0 4rem;
}

.editorial-intro,
.page-header {
	margin-bottom: 1.5rem;
}

.editorial-intro p {
	color: var(--clrthm-muted);
	max-width: 55ch;
}

.entry-list {
	display: grid;
	gap: 1.25rem;
}

.post-card {
	display: grid;
	gap: 1rem;
	background: var(--clrthm-surface);
	border: 1px solid var(--clrthm-border);
	padding: clamp(1rem, 2vw, 1.5rem);
	height: 100%;
	overflow: hidden;
}

.post-card__media {
	display: block;
}

.post-card__media img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: 0.35rem;
	aspect-ratio: 4 / 3;
}

.post-card--feature .post-card__media img {
	aspect-ratio: 16 / 9;
}

.post-card__media--placeholder {
	background: linear-gradient(135deg, #efefef, #f8f8f8);
	border-radius: 0.35rem;
	aspect-ratio: 4 / 3;
}

.post-card--feature .post-card__media--placeholder {
	aspect-ratio: 16 / 9;
}

.post-card__title {
	margin: 0;
	line-height: 1.2;
}

.post-card__excerpt p {
	margin: 0.6rem 0 0;
}

.post-card__tax,
.post-card__meta {
	margin: 0;
	color: var(--clrthm-muted);
	font-size: 0.92rem;
}

.post-card__tax a {
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.post-card__tax a:hover,
.post-card__tax a:focus-visible {
	border-bottom-color: currentcolor;
}

.archive-read-more {
	margin-top: 2rem;
}

.home-author-strip {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	background: var(--clrthm-surface);
	border: 1px solid var(--clrthm-border);
	color: var(--clrthm-muted);
}

.home-author-strip p {
	margin: 0;
}

.empty-state {
	background: var(--clrthm-surface);
	border: 1px solid var(--clrthm-border);
	padding: 1rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.site-footer {
	border-top: 1px solid var(--clrthm-border);
	padding: 2rem 0;
}

@media (min-width: 48rem) {
	.post-card--left,
	.post-card--right {
		grid-template-columns: minmax(0, 1fr) minmax(16rem, 42%);
		align-items: center;
	}

	.post-card--right .post-card__content {
		order: 1;
	}

	.post-card--right .post-card__media {
		order: 2;
	}

	.post-card--feature,
	.post-card--compact {
		grid-template-columns: 1fr;
	}
}

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

.single-entry {
	display: grid;
	gap: 2rem;
}

.single-hero {
	display: grid;
	gap: 1.25rem;
	background: var(--clrthm-surface);
	border: 0;
	padding: clamp(1rem, 2.4vw, 2rem);
}

.single-layout--left-image .single-hero,
.single-layout--right-image .single-hero {
	align-items: center;
}

.single-layout--right-image .single-hero__media {
	order: 2;
}

.single-layout--right-image .single-hero__content {
	order: 1;
}

.single-hero__tax,
.single-hero__meta {
	margin: 0;
	color: var(--clrthm-muted);
	font-size: 0.95rem;
}

.single-hero__excerpt {
	max-width: 58ch;
	margin-inline: auto;
}

.single-hero__content {
	text-align: center;
}

.single-hero__excerpt p {
	margin-bottom: 0;
}

.single-hero__media {
	aspect-ratio: 495 / 323;
	max-height: 646px;
	overflow: hidden;
	border-radius: 0.4rem;
}

.single-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: 0;
}


.single-entry .entry-title {
	font-family: ui-sans-serif, -apple-system, blinkmacsystemfont, 'Segoe UI', sans-serif;
	font-size: clamp(2.3rem, 6vw, 4.8rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.06;
	margin: 0;
}

.single-entry .single-hero__excerpt {
	font-family: ui-sans-serif, -apple-system, blinkmacsystemfont, 'Segoe UI', sans-serif;
	font-size: clamp(1.15rem, 1.8vw, 1.95rem);
	line-height: 1.45;
	color: var(--clrthm-excerpt);
}

.single-entry .entry-content {
	background: var(--clrthm-surface);
	border: 0;
	padding: clamp(0.5rem, 1vw, 1rem) 0 0;
	font-size: 1.125em;
	line-height: 1.6;
}

.single-entry .entry-content p {
	margin: 0 0 1.3em;
}

.single-share {
	border-top: 0;
	padding-top: 1.25rem;
}

.single-share a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
	border: 1px solid var(--clrthm-border);
	color: var(--clrthm-text);
	text-decoration: none;
	font-family: ui-sans-serif, -apple-system, blinkmacsystemfont, 'Segoe UI', sans-serif;
	font-weight: 600;
}

.single-share a:hover,
.single-share a:focus-visible {
	background: var(--clrthm-hover-bg);
}

.single-entry__inner,
.author-box,
.related-posts,
.comments-area,
.post-navigation {
	width: min(100%, 720px);
	margin-inline: auto;
}

.single-share ul {
	display: flex;
	gap: 0.8rem;
	list-style: none;
	padding: 0;
	margin: 0 0 1.2rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.entry-content {
	background: var(--clrthm-surface);
	border: 1px solid var(--clrthm-border);
	padding: clamp(1rem, 2.4vw, 2rem);
}

.single-layout--full-width-image .entry-content {
	background: var(--clrthm-surface);
	border: 0;
}

.entry-content blockquote,
.entry-content .wp-block-pullquote {
	border-left: 4px solid var(--clrthm-text);
	margin: 1.5rem 0;
	padding: 0.2rem 0 0.2rem 1rem;
}

.entry-content pre,
.entry-content code,
.entry-content table {
	max-width: 100%;
}

.entry-content table {
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--clrthm-border);
	padding: 0.5rem;
}

.author-box,
.related-posts {
	margin-top: 2rem;
}

.author-box__inner {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.author-box__avatar {
	border-radius: 50%;
}


.screen-reader-text {
	position: absolute;
	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 {
	position: static;
	width: auto;
	height: auto;
	overflow: visible;
	clip: auto;
	white-space: normal;
}

@media (min-width: 62rem) {
	.single-layout--left-image .single-hero,
	.single-layout--right-image .single-hero {
		grid-template-columns: minmax(0, 1fr) minmax(18rem, 48%);
	}
}

.site-header {
	align-items: center;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.site-logo img {
	max-height: 3rem;
	width: auto;
}

.site-header__navs {
	flex-direction: row;
	align-items: center;
	gap: 1.25rem;
}

.featured-grid {
	display: grid;
	gap: 1.25rem;
	margin-bottom: 1.5rem;
}

.home-author-strip p {
	margin-bottom: 0.6rem;
}

.home-author-strip__list {
	display: flex;
	gap: 0.75rem;
	list-style: none;
	padding: 0;
	margin: 0;
	flex-wrap: wrap;
}

.home-author-strip__item a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-thickness: 1px;
	color: inherit;
}


.home-author-strip__item a:hover,
.home-author-strip__item a:focus-visible {
	text-decoration-thickness: 2px;
}

.post-card__author {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin-top: 0.75rem;
}

.post-card__avatar,
.home-author-strip__item .post-card__avatar-image {
	line-height: 0;
}

.post-card__avatar-image {
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
}

@media (min-width: 64rem) {
	.featured-grid {
		grid-template-columns: 2fr 1fr;
	}

	.featured-grid .post-card:first-child {
		grid-row: span 3;
	}

	.featured-grid .post-card:first-child .post-card__media img,
	.featured-grid .post-card:first-child .post-card__media--placeholder {
		aspect-ratio: 16 / 10;
	}
}

/* Hide WordPress.com/Jetpack social and like widgets on single posts. */
.single-entry .sharedaddy,
.single-entry .sd-block,
.single-entry .jp-sharing-input-touch,
.single-entry .jp-relatedposts,
.single-entry .post-likes-widget,
.single-entry .wpl-button {
	display: none !important;
}
