/*
 * Wornsteps journal: pasted headlines, cut photographs and a margin column.
 * Load after style.css. This file intentionally leaves the homepage untouched.
 */

body:is(.blog, .archive, .search):not(.post-type-archive-wornsteps_album) .page-intro {
	position: relative;
	padding: 58px 0 54px 2%;
}

body:is(.blog, .archive, .search):not(.post-type-archive-wornsteps_album) .page-intro > .eyebrow {
	display: table;
	margin: 0 0 14px 4px;
	padding: 2px 5px;
	background: var(--paper);
	font-size: 13px;
	transform: rotate(.6deg);
}

body:is(.blog, .archive, .search):not(.post-type-archive-wornsteps_album) .page-title {
	display: table;
	max-width: 96%;
	margin: 0;
	padding: .025em .13em .08em .08em;
	background: var(--ink);
	color: var(--paper);
	font-family: 'Wornsteps Display', Impact, sans-serif;
	font-size: clamp(72px, 12.8vw, 184px);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -.035em;
	text-transform: uppercase;
	transform: rotate(-1.5deg);
	transform-origin: 20% 60%;
}

body:is(.archive, .search):not(.post-type-archive-wornsteps_album) .page-intro > .archive-description,
.search .page-intro > .search-summary {
	margin-top: 27px;
	font-family: var(--font-mono);
	font-size: 15px;
	line-height: 1.65;
}

.blog-layout {
	grid-template-columns: minmax(0, 1fr) minmax(210px, 24%);
	column-gap: clamp(30px, 4vw, 70px);
	align-items: start;
}

.blog-layout > .post-feed {
	min-width: 0;
	padding: 0 2% 0 .5%;
}

/* Separate clippings, with no card border or repeated enclosing panel. */
.post-feed > .post-card {
	position: relative;
	margin: 0 0 78px;
	padding: 0 0 10px;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.post-feed > .post-card:nth-of-type(even)::after {
	content: '';
	position: absolute;
	left: 8%;
	bottom: -28px;
	width: 68px;
	height: 9px;
	background: url('../images/ink-scuff.svg') center / contain no-repeat;
	opacity: .36;
	pointer-events: none;
}

.post-feed .post-card-image {
	position: relative;
	z-index: 0;
	width: 96%;
	max-width: 96%;
	margin: 0 0 0 1.5%;
	padding: 0;
	overflow: visible;
	background: transparent;
	transform: rotate(-1.1deg);
	transform-origin: 50% 70%;
}

.post-feed .post-card-image img {
	width: 100%;
	max-height: 620px;
	aspect-ratio: 1.6;
	object-fit: cover;
	filter: grayscale(1) contrast(1.18);
	clip-path: polygon(.25% .5%, 17% 0, 39% .25%, 62% 0, 83% .4%, 99.8% .1%, 100% 30%, 99.7% 58%, 100% 99.7%, 77% 100%, 54% 99.6%, 30% 100%, .1% 99.65%, .4% 65%, 0 32%);
}

.post-feed .post-card-image:hover img {
	filter: grayscale(1) contrast(1.27);
}

.post-feed > .post-card:nth-of-type(even) .post-card-image {
	width: 91%;
	max-width: 91%;
	margin-left: 7%;
	transform: rotate(.85deg);
}

.post-feed > .post-card:nth-of-type(even) .post-card-image img {
	aspect-ratio: 1.35;
}

.post-feed .post-card-body {
	position: relative;
	z-index: 1;
	margin: -24px 1% 0 5%;
	padding-top: 12px;
}

.post-feed > .post-card:nth-of-type(even) .post-card-body {
	margin-left: 1%;
}

.post-feed .post-card > .post-card-body:first-child {
	margin-top: 0;
	padding-top: 0;
}

.post-feed .post-meta {
	display: flex;
	width: fit-content;
	max-width: 100%;
	gap: 5px 17px;
	margin: 0 0 13px;
	padding: 5px 8px;
	background: var(--paper);
	color: var(--red);
	font-family: var(--font-mono);
	font-size: 13px;
	line-height: 1.5;
	transform: rotate(.45deg);
}

.post-feed .post-card .post-title {
	margin: 0 0 18px;
	font-family: 'Wornsteps Display', Impact, sans-serif;
	font-size: clamp(35px, 4.5vw, 67px);
	font-weight: 400;
	line-height: 1.13;
	letter-spacing: -.025em;
	transform: rotate(-.45deg);
	transform-origin: left center;
}

.post-feed .post-title a {
	display: inline;
	padding: .015em .12em .06em .04em;
	background: var(--paper);
	color: var(--ink);
	text-decoration: none;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.post-feed .post-title a:hover {
	color: var(--red);
}

.post-feed .post-card .post-excerpt {
	max-width: 53ch;
	margin: 19px 0 14px 4px;
	font-size: 17px;
	line-height: 1.65;
}

.post-feed .post-card .text-link {
	display: inline-block;
	margin: 0 0 0 4px;
	padding: 10px 13px;
	background: var(--red);
	color: var(--paper);
	font-family: var(--font-mono);
	font-size: 14px;
	line-height: 1.5;
	text-decoration: none;
	transform: rotate(.7deg);
}

.post-feed .post-card .text-link:hover {
	background: var(--ink);
}

/* The sidebar reads like a marginal list of clippings, not another card stack. */
.blog-layout > .sidebar {
	position: relative;
	margin-top: 19px;
	padding: 22px 0 0 10px;
	border: 0;
}

.blog-layout > .sidebar::before {
	content: '';
	position: absolute;
	top: 0;
	left: 12px;
	width: 60px;
	height: 7px;
	background: url('../images/ink-scuff.svg') center / contain no-repeat;
	opacity: .4;
	pointer-events: none;
}

.blog-layout .sidebar .widget {
	margin-bottom: 35px;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.blog-layout .sidebar .widget-title,
.blog-layout .sidebar .wp-block-heading {
	display: table;
	margin: 0 0 16px;
	padding: 5px 9px;
	border: 0;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--font-mono);
	font-size: 14px;
	font-weight: bold;
	line-height: 1.5;
	letter-spacing: .015em;
	text-transform: uppercase;
	transform: rotate(-.8deg);
}

.blog-layout .sidebar .widget:nth-child(even) .widget-title,
.blog-layout .sidebar .widget:nth-child(even) .wp-block-heading {
	transform: rotate(.6deg);
}

.blog-layout .sidebar .widget li {
	margin: 0;
	padding: 9px 0;
	border: 0;
	font-size: 16px;
	line-height: 1.5;
}

.blog-layout .sidebar .sidebar-date {
	margin-top: 5px;
	font-size: 12px;
	line-height: 1.5;
}

.blog-layout .sidebar .category-count {
	font-size: 12px;
}

.blog-layout .sidebar .widget_search .search-fields {
	flex-wrap: nowrap;
}

.blog-layout .sidebar .widget_search .search-submit {
	flex: 0 0 auto;
	width: auto;
	min-height: 44px;
	padding: 10px 11px;
	border-left: 0;
	font-size: 13px;
}

/* Headline and photograph form one printed composition; prose stays level. */
.single-post .blog-layout {
	padding-top: 28px;
}

.journal-entry .entry-header {
	position: relative;
	z-index: 2;
	padding: 22px 0 0;
}

.journal-entry .entry-header > .eyebrow {
	display: table;
	padding: 2px 5px;
	font-size: 13px;
	background: var(--paper);
}

.journal-entry .entry-header .post-meta {
	margin-top: 19px;
	font-size: 13px;
}

.journal-entry .entry-title {
	display: table;
	max-width: 96%;
	margin: 22px 0 -18px;
	padding: .08em .15em .12em .1em;
	background: var(--ink);
	color: var(--paper);
	font-family: 'Wornsteps Display', Impact, sans-serif;
	font-size: clamp(45px, 6.4vw, 94px);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -.025em;
	transform: rotate(-.9deg);
	transform-origin: 20% 60%;
}

.journal-entry .entry-image {
	position: relative;
	z-index: 0;
	width: 98%;
	margin: 18px 0 43px 1%;
	transform: rotate(.65deg);
}

.journal-entry .entry-image img {
	filter: grayscale(1) contrast(1.17);
	clip-path: polygon(.15% .2%, 21% 0, 44% .3%, 68% 0, 99.75% .15%, 100% 38%, 99.8% 70%, 100% 99.75%, 71% 100%, 46% 99.7%, .15% 100%, .4% 58%, 0 24%);
}

.journal-entry .entry-content {
	max-width: 70ch;
	margin: 0 auto;
	font-size: 18px;
	line-height: 1.8;
}

.journal-entry .entry-header + .entry-content {
	margin-top: 48px;
}

.journal-entry .entry-content > .wp-block-image {
	max-width: calc(100% - 12px);
	margin: 32px auto;
	padding: 0;
	transform: rotate(-.5deg);
}

.journal-entry .entry-content > .wp-block-image:nth-of-type(even) {
	transform: rotate(.5deg);
}

.journal-entry .entry-content > h2,
.journal-entry .entry-content > h3 {
	font-family: 'Wornsteps Display', Impact, sans-serif;
	font-weight: 400;
	letter-spacing: -.02em;
}

.single-post .post-navigation {
	border-top-width: 1px;
}

.single-post .post-navigation .nav-title {
	font-size: 30px;
}

@media (max-width: 900px) {
	.blog-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}
	.blog-layout > .post-feed {
		padding-right: 0;
	}
	.blog-layout > .sidebar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 25px 32px;
		margin-top: 0;
		padding: 26px 5px 0;
	}
	.blog-layout .sidebar .widget {
		margin: 0 0 10px;
	}
	.blog-layout .sidebar .widget:first-child {
		grid-column: 1 / -1;
	}
	.blog-layout .sidebar .widget_search .search-fields {
		max-width: 480px;
	}
	.post-feed .post-card .post-title {
		font-size: clamp(38px, 6.4vw, 61px);
	}
	.journal-entry .entry-title {
		font-size: clamp(48px, 8vw, 76px);
	}
}

@media (max-width: 560px) {
	body:is(.blog, .archive, .search):not(.post-type-archive-wornsteps_album) .page-intro {
		padding: 42px 0 40px 1%;
	}
	body:is(.blog, .archive, .search):not(.post-type-archive-wornsteps_album) .page-title {
		max-width: 97%;
		font-size: clamp(54px, 18vw, 95px);
		transform: rotate(-1deg);
	}
	body:is(.blog, .archive, .search):not(.post-type-archive-wornsteps_album) .page-intro > .eyebrow {
		font-size: 12px;
	}
	.post-feed > .post-card {
		margin-bottom: 56px;
	}
	.post-feed .post-card-image,
	.post-feed > .post-card:nth-of-type(even) .post-card-image {
		width: 96%;
		max-width: 96%;
		margin-left: 2%;
		transform: rotate(-.65deg);
	}
	.post-feed > .post-card:nth-of-type(even) .post-card-image {
		transform: rotate(.65deg);
	}
	.post-feed .post-card-image img {
		aspect-ratio: 1.3;
	}
	.post-feed > .post-card:nth-of-type(even) .post-card-image img {
		aspect-ratio: 1.5;
	}
	.post-feed .post-card-body,
	.post-feed > .post-card:nth-of-type(even) .post-card-body {
		margin: -14px 1% 0 2%;
		padding-top: 8px;
	}
	.post-feed .post-meta {
		gap: 4px 13px;
		margin-bottom: 11px;
		font-size: 12px;
	}
	.post-feed .post-card .post-title {
		font-size: clamp(34px, 9.8vw, 48px);
		line-height: 1.14;
	}
	.post-feed .post-card .post-excerpt {
		margin-left: 2px;
		font-size: 16px;
	}
	.post-feed .post-card .text-link {
		margin-left: 2px;
		min-height: 44px;
	}
	.blog-layout > .sidebar {
		display: block;
		padding-left: 3px;
	}
	.blog-layout .sidebar .widget {
		margin-bottom: 30px;
	}
	.single-post .blog-layout {
		padding-top: 10px;
	}
	.journal-entry .entry-title {
		max-width: 98%;
		font-size: clamp(38px, 10.6vw, 57px);
		margin-bottom: -11px;
		transform: rotate(-.65deg);
	}
	.journal-entry .entry-image {
		margin-top: 13px;
		margin-bottom: 32px;
	}
	.journal-entry .entry-content {
		font-size: 17px;
		line-height: 1.75;
	}
	.journal-entry .entry-header .post-meta {
		font-size: 12px;
	}
	.single-post .post-navigation .nav-title {
		font-size: 26px;
	}
}

@media print {
	body:is(.blog, .archive, .search):not(.post-type-archive-wornsteps_album) .page-title,
	.journal-entry .entry-title {
		background: transparent;
		color: #000;
	}
	.post-feed .post-card-image,
	.post-feed .post-card-body,
	.post-feed .post-card .post-title,
	.post-feed .post-meta,
	.journal-entry .entry-title,
	.journal-entry .entry-image,
	.journal-entry .entry-content > .wp-block-image,
	body:is(.blog, .archive, .search):not(.post-type-archive-wornsteps_album) .page-title {
		transform: none;
	}
	.post-feed > .post-card::after {
		display: none;
	}
	.post-feed .post-card .text-link {
		background: transparent;
		color: #000;
		padding-left: 0;
	}
}
