/* ==========================================================================
   Petr Kinzel Personal Minimal
   Front-end and editor styles. Everything is scoped to this theme; the design
   tokens themselves live in theme.json.
   ========================================================================== */

html {
	scroll-behavior: smooth;
}

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

:target,
[id] {
	scroll-margin-top: var(--wp--preset--spacing--30);
}

::selection {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
figcaption,
p {
	text-wrap: pretty;
}

/* --- Stick the footer to the bottom of short pages --- */

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group:not(footer) {
	flex-grow: 1;
}

.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* --- Tabular numbers for everything set in Geist Mono --- */

.has-geist-mono-font-family,
.is-style-label {
	font-variant-numeric: tabular-nums;
}

/* --- Header --- */

.pk-header .wp-block-navigation__responsive-container-open {
	padding: 0;
}

/* --- The full-viewport navigation overlay --- */

.wp-block-navigation__responsive-container.is-menu-open .pk-overlay {
	min-height: 100dvh;
}

/* --- Rows of hairlines (services, process) --- */

.pk-rows > * + * {
	margin-block-start: 0;
}

/* --- Post lists: no list spacing, hairlines do the separating --- */

.pk-post-list .wp-block-post-template {
	gap: 0;
}

.pk-post-list .wp-block-post-template > li {
	margin-block-start: 0;
}

/* --- Images inside links --- */

a:has(> img) {
	text-decoration: none;
}

/* --- Quote citation --- */

.wp-block-quote cite {
	font-size: var(--wp--preset--font-size--tiny);
}

/* ==========================================================================
   Block styles
   ========================================================================== */

/* Small mono label used above headings and for metadata. */
.is-style-label {
	color: var(--wp--preset--color--secondary);
	font-family: var(--wp--preset--font-family--geist-mono);
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: 400;
	letter-spacing: 0.06em;
	line-height: 1.5;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
}

/* Tag chips. */
.is-style-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.is-style-tags .wp-block-post-terms__separator {
	display: none;
}

.is-style-tags a {
	display: inline-block;
	padding: 0.4rem 0.95rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--preset--border-radius--pill);
	font-family: var(--wp--preset--font-family--geist);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	color: var(--wp--preset--color--primary);
}

.is-style-tags a:hover {
	border-color: var(--wp--preset--color--primary);
}

/* ==========================================================================
   Portfolio
   ========================================================================== */

/* Grid cards sit flush; spacing comes from the grid gap. */
.pk-grid .wp-block-post-template > li,
.pk-teaser .wp-block-post-template > li {
	margin-block-start: 0;
}

/* Images */
.pkp-figure,
.wp-block-post-featured-image {
	margin-block: 0;
}

.wp-block-post-featured-image a,
.pk-grid a:has(> img),
.pk-figure a {
	display: block;
	text-decoration: none;
}

.pk-grid a img,
.pk-teaser a img,
.pkp-figure img {
	transition: opacity 0.25s ease;
}

.pk-grid a:hover img,
.pk-teaser a:hover img {
	opacity: 0.82;
}

/* The live-site button is printed by the pkp/portfolio-link block. */
.pkp-live-actions {
	margin-block-start: var(--wp--preset--spacing--30);
}

.pkp-live-link {
	display: inline-block;
}

/* Homepage "Selected work" cards use body type for the project title, matching
   the editorial style of the rest of the page. */
.pk-teaser .wp-block-post-title {
	font-size: var(--wp--preset--font-size--normal);
	font-weight: 400;
	letter-spacing: -0.005em;
	line-height: 1.6;
	margin: 0;
}
