/*
Theme Name: Gorman
Theme URI: https://paulgormanis.com
Author: Ryan Lavender
Description: A clean, fast replacement theme for paulgormanis.com. Built for long posts with pictures and embeds, the classic and block editors, menus, widgets and comments. Fonts are self-hosted, so no calls to Google.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
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: gorman
Tags: blog, one-column, custom-menu, custom-logo, featured-images, threaded-comments, wide-blocks, editor-style
*/

/* Fonts ----------------------------------------------------------------- */

@font-face {
	font-family: "Gorman Display";
	src: url("assets/fonts/texgyreadventor-regular.otf") format("opentype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Gorman Display";
	src: url("assets/fonts/texgyreadventor-bold.otf") format("opentype");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Gorman Text";
	src: url("assets/fonts/lora.woff") format("woff");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Gorman Text";
	src: url("assets/fonts/lora-italic.woff") format("woff");
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
}

/* Tokens ---------------------------------------------------------------- */

:root {
	--ink: #16192e;
	--paper: #fbfbf9;
	--spot: #d1006b;
	--muted: #5c5f6e;
	--rule: #dcdde3;
	--tint: #fbe4ef;

	--display: "Gorman Display", "Century Gothic", "Avant Garde", "URW Gothic", sans-serif;
	--text: "Gorman Text", Georgia, "Times New Roman", serif;

	--gutter: clamp(1.25rem, 5vw, 3rem);
	--meta-col: 10rem;
	--col-gap: 3rem;
	--measure: 42rem;
}

/* Base ------------------------------------------------------------------ */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--text);
	font-size: 1.1875rem;
	line-height: 1.65;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
}

::selection {
	background: var(--tint);
	color: var(--ink);
}

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

iframe,
embed,
object {
	max-width: 100%;
}

a {
	color: var(--ink);
	text-decoration-color: var(--spot);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--spot);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--display);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.012em;
	margin: 2em 0 0.6em;
	text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
h5,
h6 { font-size: 1rem; }

p,
ul,
ol,
dl,
figure,
blockquote,
pre,
table {
	margin: 0 0 1.25em;
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: 2.5em 0;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	top: 1rem;
	left: 1rem;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--display);
	text-decoration: none;
}

.wrap {
	max-width: calc(var(--meta-col) + var(--col-gap) + var(--measure) + 10rem + var(--gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* Header ---------------------------------------------------------------- */

.site-header {
	padding: clamp(2rem, 6vw, 4.5rem) 0 0;
	border-bottom: 4px solid var(--spot);
}

.site-title {
	margin: 0;
	font-family: var(--display);
	font-weight: 700;
	font-size: clamp(3.1rem, 11.5vw, 8.75rem);
	line-height: 0.88;
	letter-spacing: -0.045em;
}

.wordmark {
	color: var(--ink);
	text-decoration: none;
}

.wordmark:hover {
	color: var(--spot);
}

.custom-logo-link {
	display: inline-block;
}

.custom-logo {
	display: block;
	max-height: 8rem;
	width: auto;
}

.site-description {
	margin: 0.9rem 0 0;
	font-family: var(--display);
	font-size: 1.05rem;
	color: var(--muted);
}

.site-nav {
	margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.site-nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	column-gap: 1.75rem;
	row-gap: 0.25rem;
}

.site-nav li {
	position: relative;
}

.site-nav a {
	display: block;
	padding: 0.6rem 0 0.85rem;
	font-family: var(--display);
	font-size: 1.02rem;
	color: var(--ink);
	text-decoration: none;
	box-shadow: inset 0 -3px 0 transparent;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a {
	color: var(--ink);
	box-shadow: inset 0 -3px 0 var(--spot);
}

.site-nav .sub-menu,
.site-nav .children {
	display: none;
	position: absolute;
	top: 100%;
	left: -1rem;
	z-index: 20;
	min-width: 14rem;
	list-style: none;
	margin: 0;
	padding: 0.5rem 1rem;
	background: var(--paper);
	border: 1px solid var(--rule);
}

.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu,
.site-nav li:hover > .children,
.site-nav li:focus-within > .children {
	display: block;
}

.site-nav .sub-menu a {
	padding: 0.4rem 0;
	box-shadow: none;
}

.site-nav .sub-menu a:hover {
	color: var(--spot);
	box-shadow: none;
}

/* Layout: meta column + reading column ---------------------------------- */

.site-main {
	padding-bottom: 4rem;
}

.site-main:focus {
	outline: none;
}

.entry {
	display: grid;
	grid-template-columns: var(--meta-col) minmax(0, var(--measure));
	column-gap: var(--col-gap);
	padding: clamp(2.5rem, 6vw, 4rem) 0;
	border-bottom: 1px solid var(--rule);
}

.entry:last-of-type {
	border-bottom: 0;
}

.entry-meta {
	padding-top: 0.55rem;
	font-family: var(--display);
	font-size: 0.92rem;
	line-height: 1.4;
	color: var(--muted);
}

.entry-meta a {
	color: var(--muted);
	text-decoration: none;
}

.entry-meta a:hover {
	color: var(--spot);
}

.entry-meta > * {
	display: block;
}

.entry-cats {
	margin-top: 0.5rem;
}

.sticky-note {
	margin-top: 0.5rem;
	color: var(--spot);
}

.entry-title {
	margin: 0 0 1.25rem;
}

.entry-listed .entry-title {
	font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.entry-title a {
	color: var(--ink);
	text-decoration: none;
}

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

.entry-thumb {
	display: block;
	margin: 0 0 1.75rem;
}

.entry-thumb img {
	display: block;
	width: 100%;
}

.page-header {
	padding: clamp(2.5rem, 6vw, 4rem) 0 0;
	margin-left: calc(var(--meta-col) + var(--col-gap));
	max-width: var(--measure);
}

.page-title {
	margin: 0;
}

.search-term {
	color: var(--spot);
}

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

/* Post content ---------------------------------------------------------- */

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

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

.entry-content h2 { font-size: 1.75rem; }
.entry-content h3 { font-size: 1.35rem; }

.entry-content ul,
.entry-content ol {
	padding-left: 1.3em;
}

.entry-content li + li {
	margin-top: 0.3em;
}

.entry-content img {
	display: inline-block;
}

.entry-content iframe[src*="youtube"],
.entry-content iframe[src*="vimeo"] {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.more-link {
	display: inline-block;
	margin-top: 0.25rem;
	font-family: var(--display);
	font-weight: 700;
	font-size: 1rem;
}

blockquote,
.wp-block-quote {
	margin: 1.75em 0;
	padding: 0 0 0 1.4rem;
	border-left: 3px solid var(--spot);
	font-style: italic;
}

blockquote cite,
.wp-block-quote cite {
	display: block;
	margin-top: 0.6rem;
	font-family: var(--display);
	font-style: normal;
	font-size: 0.9rem;
	color: var(--muted);
}

.wp-block-pullquote {
	border-top: 4px solid var(--spot);
	border-bottom: 1px solid var(--rule);
	padding: 2rem 0;
	text-align: left;
}

.wp-block-pullquote blockquote {
	border: 0;
	padding: 0;
	margin: 0;
}

.wp-block-pullquote p {
	font-family: var(--display);
	font-weight: 700;
	font-style: normal;
	font-size: 1.6rem;
	line-height: 1.25;
}

pre,
code,
kbd {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 0.85em;
}

pre {
	padding: 1rem;
	overflow-x: auto;
	background: #f0f0f3;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

th,
td {
	padding: 0.5rem 0.75rem 0.5rem 0;
	border-bottom: 1px solid var(--rule);
	text-align: left;
	vertical-align: top;
}

th {
	font-family: var(--display);
}

/* Captions, galleries, alignment (classic and block) -------------------- */

figure {
	max-width: 100%;
}

figcaption,
.wp-caption-text,
.wp-element-caption,
.gallery-caption {
	margin-top: 0.55rem;
	font-family: var(--display);
	font-size: 0.86rem;
	line-height: 1.45;
	color: var(--muted);
	text-align: left;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.5em;
}

.wp-caption img {
	display: block;
}

.alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
	max-width: 50%;
}

.alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
	max-width: 50%;
}

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

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
	gap: 1rem;
	margin-bottom: 1.5em;
}

.gallery-columns-1 { --cols: 1; }
.gallery-columns-2 { --cols: 2; }
.gallery-columns-4 { --cols: 4; }
.gallery-columns-5 { --cols: 5; }
.gallery-columns-6 { --cols: 6; }

.gallery-item {
	margin: 0;
}

.gallery-item img {
	display: block;
	width: 100%;
}

.wp-block-image,
.wp-block-embed,
.wp-block-video,
.wp-block-gallery {
	margin-top: 1.75em;
	margin-bottom: 1.75em;
}

.wp-block-button__link {
	background: var(--ink);
	color: var(--paper);
	border-radius: 0;
	font-family: var(--display);
	font-weight: 700;
	font-size: 1rem;
	padding: 0.8rem 1.3rem;
	text-decoration: none;
}

.wp-block-button__link:hover {
	background: var(--spot);
	color: #fff;
}

.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--rule);
}

/* Wide and full blocks reach left over the date column on big screens. */
@media (min-width: 56rem) {
	.entry-content > .alignwide,
	.entry-content > .alignfull {
		margin-left: calc(-1 * (var(--meta-col) + var(--col-gap)));
		width: calc(100% + var(--meta-col) + var(--col-gap));
		max-width: none;
	}
}

/* Post footer, navigation, pagination ----------------------------------- */

.entry-tags {
	margin-top: 2.5rem;
	font-family: var(--display);
	font-size: 0.92rem;
	color: var(--muted);
}

.post-navigation {
	margin-top: 3rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--rule);
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

.post-navigation .nav-next {
	grid-column: 2;
	text-align: right;
}

.post-navigation a {
	text-decoration: none;
}

.nav-label {
	display: block;
	font-family: var(--display);
	font-size: 0.86rem;
	color: var(--muted);
}

.nav-title {
	display: block;
	margin-top: 0.3rem;
	font-family: var(--display);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
}

.post-navigation a:hover .nav-title {
	color: var(--spot);
}

.pagination {
	padding: 2.5rem 0 0;
	margin-left: calc(var(--meta-col) + var(--col-gap));
	max-width: var(--measure);
	border-top: 1px solid var(--rule);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 1.1rem;
	font-family: var(--display);
}

.page-numbers {
	text-decoration: none;
	color: var(--ink);
	padding: 0.25rem 0.1rem;
}

.page-numbers.current {
	color: var(--paper);
	background: var(--ink);
	padding: 0.25rem 0.6rem;
}

.page-numbers.dots {
	color: var(--muted);
}

.page-numbers.prev,
.page-numbers.next {
	font-weight: 700;
}

.page-numbers.next {
	margin-left: auto;
}

a.page-numbers:hover {
	color: var(--spot);
}

.page-links {
	margin-top: 2rem;
	font-family: var(--display);
}

.page-links a,
.page-links > span {
	margin-left: 0.6rem;
}

/* Forms ----------------------------------------------------------------- */

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

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="password"],
textarea,
select {
	width: 100%;
	padding: 0.65rem 0.75rem;
	background: #fff;
	border: 1px solid #9a9caa;
	border-radius: 0;
	font-family: var(--text);
	font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
	outline: 3px solid var(--spot);
	outline-offset: 0;
	border-color: var(--ink);
}

button,
input[type="submit"],
input[type="button"],
.wp-block-search__button {
	padding: 0.7rem 1.2rem;
	background: var(--ink);
	color: var(--paper);
	border: 0;
	border-radius: 0;
	font-family: var(--display);
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
}

button:hover,
input[type="submit"]:hover,
.wp-block-search__button:hover {
	background: var(--spot);
	color: #fff;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	margin: 1.5rem 0 0;
	max-width: 30rem;
}

.search-form label {
	flex: 1;
}

/* Comments -------------------------------------------------------------- */

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

.comments-title,
.comment-reply-title {
	font-size: 1.4rem;
	margin-top: 0;
}

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

.comment-list .children {
	margin-left: 1.5rem;
}

.comment-body {
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--rule);
	font-size: 1.05rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--display);
	font-weight: 700;
}

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

.comment-author .says {
	display: none;
}

.comment-metadata,
.reply {
	font-family: var(--display);
	font-size: 0.86rem;
}

.comment-metadata a {
	color: var(--muted);
	text-decoration: none;
}

.comment-form label {
	display: block;
	font-family: var(--display);
	font-size: 0.92rem;
	margin-bottom: 0.3rem;
}

.comment-form-cookies-consent label {
	display: inline;
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
	padding: 3rem 0 3.5rem;
	border-top: 1px solid var(--rule);
	font-family: var(--display);
	font-size: 0.95rem;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 2rem 3rem;
	padding-bottom: 2.5rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--rule);
}

.widget {
	font-family: var(--text);
	font-size: 1rem;
}

.widget-title {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
}

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

.widget li + li {
	margin-top: 0.4rem;
}

.footer-base {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 1rem 2.5rem;
}

.footer-name {
	margin: 0;
	font-weight: 700;
	font-size: 1.35rem;
	letter-spacing: -0.03em;
}

.footer-name a {
	color: var(--ink);
	text-decoration: none;
}

.footer-nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.5rem;
}

.footer-nav a {
	text-decoration: none;
}

.copyright {
	margin: 0 0 0 auto;
	color: var(--muted);
}

/* Small screens ---------------------------------------------------------- */

@media (max-width: 55.99rem) {
	.entry {
		grid-template-columns: minmax(0, 1fr);
	}

	.entry-meta {
		padding-top: 0;
		margin-bottom: 0.6rem;
	}

	.entry-meta > * {
		display: inline;
	}

	.entry-cats {
		margin: 0 0 0 0.75rem;
	}

	.entry-page .entry-meta {
		display: none;
	}

	.page-header,
	.pagination {
		margin-left: 0;
	}
}

@media (max-width: 36rem) {
	body {
		font-size: 1.0625rem;
	}

	.site-nav .menu {
		column-gap: 1.25rem;
		row-gap: 0;
	}

	.site-nav a {
		padding: 0.4rem 0 0.55rem;
	}

	.site-nav .sub-menu,
	.site-nav .children {
		left: 0;
	}

	.alignleft,
	.alignright {
		float: none;
		margin: 0 0 1.25em;
		max-width: 100%;
	}

	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.post-navigation .nav-next {
		grid-column: 1;
		text-align: left;
	}

	.copyright {
		margin-left: 0;
	}
}

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

@media print {
	.site-nav,
	.post-navigation,
	.comments-area,
	.pagination,
	.site-footer {
		display: none;
	}

	.site-header {
		border: 0;
	}
}
