/*
Theme Name: Ulrik Christensen
Theme URI: https://ulrikchristensen.com
Description: A quiet, technical blog theme for GeneratePress. Single-column reading layout, self-hosted Inter and JetBrains Mono, ink-and-electric-blue palette. Built as a child theme so GeneratePress can update freely.
Author: Ulrik Christensen
Author URI: https://ulrikchristensen.com
Template: generatepress
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: uc-theme
Tags: blog, one-column, custom-menu, featured-images, translation-ready, editor-style
*/

/* ==========================================================================
   1. Tokens
   GeneratePress emits --contrast, --contrast-2, --contrast-3, --base,
   --base-2, --base-3 and --accent from the global colours set in
   inc/gp-defaults.php. Everything below builds on those.
   ========================================================================== */

:root {
	--uc-font-sans: "InterVariable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--uc-font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	--uc-accent-hover: #1D4ED8;
	--uc-accent-soft: #EFF4FF;
	--uc-selection: #DBE7FF;

	/* Reading measure — the single most important number in the theme. */
	--uc-measure: 44rem;
	--uc-measure-wide: 62rem;

	/* Vertical rhythm */
	--uc-space-3xs: 0.25rem;
	--uc-space-2xs: 0.5rem;
	--uc-space-xs: 0.75rem;
	--uc-space-s: 1rem;
	--uc-space-m: 1.5rem;
	--uc-space-l: 2.5rem;
	--uc-space-xl: 4rem;
	--uc-space-2xl: 6rem;

	--uc-radius: 6px;
	--uc-radius-lg: 10px;

	--uc-border: 1px solid var(--base);
	--uc-transition: 150ms ease;
}

::selection {
	background: var(--uc-selection);
	color: var(--contrast);
}

/* ==========================================================================
   2. Base
   ========================================================================== */

html {
	scroll-behavior: smooth;
}

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

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

body {
	font-family: var(--uc-font-sans);
	font-feature-settings: "cv05" 1, "cv11" 1, "ss01" 1;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	color: var(--contrast);
	background-color: var(--base-3);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--uc-font-sans);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	text-wrap: balance;
	color: var(--contrast);
}

a {
	color: var(--accent);
	text-decoration: none;
	transition: color var(--uc-transition), border-color var(--uc-transition);
}

a:hover {
	color: var(--uc-accent-hover);
}

/* A visible, consistent focus ring everywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 2px;
}

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

hr,
.wp-block-separator {
	border: 0;
	border-top: var(--uc-border);
	margin-block: var(--uc-space-l);
}

/* ==========================================================================
   3. Layout — one contained column, no sidebar
   ========================================================================== */

.uc-theme .site-content {
	padding-block: var(--uc-space-xl);
}

.uc-theme .site-main > *,
.uc-theme .uc-page-intro,
.uc-theme .page-header {
	margin-inline: auto;
	max-width: var(--uc-measure);
}

/*
 * With a sidebar the content column is already narrow, so the reading measure
 * stops applying — otherwise the text would be centred inside its own column
 * with odd margins on both sides.
 */
.uc-theme.uc-has-sidebar .site-main > *,
.uc-theme.uc-has-sidebar .uc-page-intro,
.uc-theme.uc-has-sidebar .page-header,
.uc-theme.uc-has-sidebar .comments-area,
.uc-theme.uc-has-sidebar .uc-single-post .post-image {
	max-width: none;
	margin-inline: 0;
}

/* Wide elements inside post content can break out of the measure. */
.uc-theme .entry-content > .alignwide,
.uc-theme .entry-content > .wp-block-image.alignwide,
.uc-theme .entry-content > .gb-container.alignwide {
	max-width: var(--uc-measure-wide);
	margin-inline: auto;
	width: 100%;
}

.uc-theme .entry-content > .alignfull {
	max-width: none;
	width: auto;
	margin-inline: calc(50% - 50vw);
}

/* ==========================================================================
   4. Site header and navigation
   ========================================================================== */

.uc-header.site-header {
	border-bottom: var(--uc-border);
	background-color: var(--base-3);
}

.uc-header .inside-header {
	align-items: center;
	gap: var(--uc-space-m);
	padding-block: var(--uc-space-s);
}

.uc-theme .site-branding {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.uc-theme .main-title {
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0;
}

.uc-theme .main-title a {
	color: var(--contrast);
}

.uc-theme .main-title a:hover {
	color: var(--accent);
}

.uc-theme .site-description {
	font-family: var(--uc-font-mono);
	font-size: 0.72rem;
	font-weight: 400;
	letter-spacing: 0.02em;
	color: var(--contrast-3);
	margin: 0;
	text-transform: uppercase;
}

/* Primary navigation */
.uc-theme .main-navigation {
	background-color: transparent;
}

.uc-theme .main-navigation .main-nav > ul > li > a {
	font-size: 0.94rem;
	font-weight: 500;
	color: var(--contrast-2);
	line-height: 1;
	padding-block: var(--uc-space-2xs);
}

.uc-theme .main-navigation .main-nav > ul > li > a:hover,
.uc-theme .main-navigation .main-nav > ul > li.current-menu-item > a {
	color: var(--contrast);
}

/* A thin accent rule under the current page. */
.uc-theme .main-navigation .main-nav > ul > li > a {
	position: relative;
}

.uc-theme .main-navigation .main-nav > ul > li.current-menu-item > a::after {
	content: "";
	position: absolute;
	left: var(--uc-space-2xs);
	right: var(--uc-space-2xs);
	bottom: -2px;
	height: 2px;
	background: var(--accent);
	border-radius: 2px;
}

/* Sub menus */
.uc-theme .main-navigation ul ul {
	border: var(--uc-border);
	border-radius: var(--uc-radius);
	box-shadow: 0 8px 24px rgba(17, 20, 24, 0.08);
	padding-block: var(--uc-space-3xs);
	overflow: hidden;
}

.uc-theme .main-navigation .main-nav ul ul li a {
	font-size: 0.9rem;
	padding-block: var(--uc-space-2xs);
}

/* Mobile toggle */
.uc-theme .main-navigation .menu-toggle {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--contrast);
}

.uc-theme .main-navigation .menu-toggle:hover {
	color: var(--accent);
}

/* ==========================================================================
   5. Page intro (blog home) and archive headers
   ========================================================================== */

.uc-page-intro {
	margin-bottom: var(--uc-space-xl);
	padding-bottom: var(--uc-space-m);
	border-bottom: var(--uc-border);
}

.uc-page-intro__title {
	font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
	letter-spacing: -0.03em;
	margin: 0 0 var(--uc-space-2xs);
}

.uc-page-intro__text {
	color: var(--contrast-2);
	font-size: 1.05rem;
	margin: 0;
	max-width: 36rem;
}

.uc-theme .page-header {
	margin-bottom: var(--uc-space-xl);
	padding-bottom: var(--uc-space-m);
	border-bottom: var(--uc-border);
}

.uc-theme .page-header .page-title {
	font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
	margin: 0 0 var(--uc-space-2xs);
}

.uc-theme .page-header .taxonomy-description,
.uc-theme .page-header .author-info {
	color: var(--contrast-2);
	font-size: 0.98rem;
}

.uc-theme .page-header .taxonomy-description p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   6. Post list
   ========================================================================== */

.uc-list .site-main > article {
	border-bottom: var(--uc-border);
	padding-bottom: var(--uc-space-l);
	margin-bottom: var(--uc-space-l);
}

.uc-list .site-main > article:last-of-type {
	border-bottom: 0;
	margin-bottom: 0;
}

.uc-theme .inside-article {
	padding: 0;
}

.uc-list .entry-header {
	margin-bottom: var(--uc-space-xs);
}

.uc-list .entry-title {
	font-size: 1.45rem;
	letter-spacing: -0.02em;
	line-height: 1.3;
	margin: 0 0 var(--uc-space-2xs);
}

.uc-list .entry-title a {
	color: var(--contrast);
}

.uc-list .entry-title a:hover {
	color: var(--accent);
}

.uc-list .post-image {
	margin-bottom: var(--uc-space-m);
}

.uc-list .post-image img {
	border-radius: var(--uc-radius-lg);
	display: block;
	width: 100%;
}

.uc-list .entry-summary p:last-child,
.uc-list .entry-content p:last-child {
	margin-bottom: 0;
}

.uc-list .entry-summary {
	color: var(--contrast-2);
}

.uc-read-more {
	margin-top: var(--uc-space-s);
	margin-bottom: 0;
}

.uc-read-more a {
	font-family: var(--uc-font-mono);
	font-size: 0.82rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

.uc-read-more a span[aria-hidden] {
	transition: transform var(--uc-transition);
}

.uc-read-more a:hover span[aria-hidden] {
	transform: translateX(3px);
}

/* ==========================================================================
   7. Post meta
   ========================================================================== */

.uc-theme .entry-meta {
	font-family: var(--uc-font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.01em;
	color: var(--contrast-3);
	line-height: 1.6;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 0.9em;
}

.uc-theme .entry-meta a {
	color: var(--contrast-2);
	border-bottom: 1px solid transparent;
}

.uc-theme .entry-meta a:hover {
	color: var(--accent);
	border-bottom-color: currentColor;
}

/* Separator dots between meta items. */
.uc-theme .entry-meta > span + span::before {
	content: "·";
	color: var(--base);
	margin-right: 0.9em;
}

.uc-theme .entry-meta .byline .author-name {
	color: var(--contrast-2);
}

.uc-theme .entry-meta svg {
	display: none;
}

.uc-reading-time {
	color: var(--contrast-3);
}

/* Footer meta on single posts: categories and tags. */
.uc-single-post .entry-meta.cat-tags-links,
.uc-single-post footer.entry-meta {
	margin-top: var(--uc-space-l);
	padding-top: var(--uc-space-m);
	border-top: var(--uc-border);
}

.uc-theme .tags-links a,
.uc-theme .cat-links a {
	display: inline-block;
	font-size: 0.76rem;
	padding: 0.2em 0.6em;
	margin-right: 0.3em;
	border: var(--uc-border);
	border-radius: 100px;
	color: var(--contrast-2);
	background: var(--base-3);
}

.uc-theme .tags-links a:hover,
.uc-theme .cat-links a:hover {
	color: var(--accent);
	border-color: var(--accent);
	background: var(--uc-accent-soft);
}

/* ==========================================================================
   8. Single post
   ========================================================================== */

.uc-single-post .entry-header {
	margin-bottom: var(--uc-space-m);
}

.uc-single-post .entry-title {
	font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
	letter-spacing: -0.03em;
	line-height: 1.12;
	margin: 0 0 var(--uc-space-s);
}

.uc-single-post .post-image {
	margin-block: var(--uc-space-l);
	max-width: var(--uc-measure-wide);
	margin-inline: auto;
}

.uc-single-post .post-image img {
	border-radius: var(--uc-radius-lg);
	display: block;
	width: 100%;
}

.uc-theme .entry-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--contrast);
}

.uc-theme .entry-content > * + * {
	margin-top: var(--uc-space-m);
}

.uc-theme .entry-content h2 {
	font-size: 1.6rem;
	margin-top: var(--uc-space-xl);
	margin-bottom: var(--uc-space-xs);
	letter-spacing: -0.025em;
}

.uc-theme .entry-content h3 {
	font-size: 1.28rem;
	margin-top: var(--uc-space-l);
	margin-bottom: var(--uc-space-xs);
}

.uc-theme .entry-content h4 {
	font-size: 1.1rem;
	margin-top: var(--uc-space-m);
	margin-bottom: var(--uc-space-2xs);
}

/* Content links get an underline; navigation links do not. */
.uc-theme .entry-content a:not(.wp-block-button__link):not(.gb-button) {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	text-decoration-color: rgba(37, 99, 235, 0.35);
}

.uc-theme .entry-content a:not(.wp-block-button__link):not(.gb-button):hover {
	text-decoration-color: currentColor;
}

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

.uc-theme .entry-content li + li {
	margin-top: var(--uc-space-2xs);
}

.uc-theme .entry-content li::marker {
	color: var(--contrast-3);
}

/* Blockquote */
.uc-theme .entry-content blockquote,
.uc-theme .wp-block-quote {
	border-left: 2px solid var(--accent);
	padding: 0 0 0 var(--uc-space-m);
	margin-inline: 0;
	font-size: 1.1rem;
	color: var(--contrast-2);
	font-style: normal;
}

.uc-theme .wp-block-quote cite,
.uc-theme blockquote cite {
	display: block;
	font-family: var(--uc-font-mono);
	font-size: 0.8rem;
	font-style: normal;
	color: var(--contrast-3);
	margin-top: var(--uc-space-2xs);
}

.uc-theme .wp-block-pullquote {
	border-top: var(--uc-border);
	border-bottom: var(--uc-border);
	padding-block: var(--uc-space-m);
	text-align: left;
}

/* Code */
.uc-theme code,
.uc-theme kbd,
.uc-theme samp {
	font-family: var(--uc-font-mono);
	font-size: 0.87em;
	background: var(--base-2);
	border: var(--uc-border);
	border-radius: 4px;
	padding: 0.1em 0.35em;
}

.uc-theme pre,
.uc-theme .wp-block-code {
	font-family: var(--uc-font-mono);
	font-size: 0.85rem;
	line-height: 1.65;
	background: #0F1216;
	color: #E6E9EF;
	border: 0;
	border-radius: var(--uc-radius-lg);
	padding: var(--uc-space-m);
	overflow-x: auto;
	tab-size: 2;
}

.uc-theme pre code,
.uc-theme .wp-block-code code {
	background: transparent;
	border: 0;
	padding: 0;
	font-size: inherit;
	color: inherit;
}

/* Tables */
.uc-theme table,
.uc-theme .wp-block-table table {
	border-collapse: collapse;
	font-size: 0.94rem;
	width: 100%;
}

.uc-theme th,
.uc-theme td {
	border: 0;
	border-bottom: var(--uc-border);
	padding: var(--uc-space-2xs) var(--uc-space-xs);
	text-align: left;
}

.uc-theme th {
	font-family: var(--uc-font-mono);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--contrast-2);
	border-bottom: 1px solid var(--contrast-3);
}

/* Figures and captions */
.uc-theme figure {
	margin-inline: 0;
}

.uc-theme figcaption,
.uc-theme .wp-block-image figcaption {
	font-family: var(--uc-font-mono);
	font-size: 0.76rem;
	line-height: 1.5;
	color: var(--contrast-3);
	margin-top: var(--uc-space-2xs);
	text-align: left;
}

.uc-theme .wp-block-image img {
	border-radius: var(--uc-radius);
}

/* Buttons */
.uc-theme .wp-block-button__link,
.uc-theme .gb-button,
.uc-theme button:not(.menu-toggle):not(.uc-plain),
.uc-theme input[type="submit"] {
	font-family: var(--uc-font-sans);
	font-size: 0.94rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	background: var(--contrast);
	color: var(--base-3);
	border: 1px solid var(--contrast);
	border-radius: var(--uc-radius);
	padding: 0.62em 1.15em;
	transition: background var(--uc-transition), border-color var(--uc-transition);
}

.uc-theme .wp-block-button__link:hover,
.uc-theme .gb-button:hover,
.uc-theme button:not(.menu-toggle):not(.uc-plain):hover,
.uc-theme input[type="submit"]:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--base-3);
}

.uc-theme .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--contrast);
	border-color: var(--base);
}

.uc-theme .wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--uc-accent-soft);
}

/* Forms */
.uc-theme input[type="text"],
.uc-theme input[type="email"],
.uc-theme input[type="url"],
.uc-theme input[type="search"],
.uc-theme input[type="tel"],
.uc-theme input[type="number"],
.uc-theme textarea,
.uc-theme select {
	font-family: var(--uc-font-sans);
	font-size: 0.97rem;
	color: var(--contrast);
	background: var(--base-3);
	border: var(--uc-border);
	border-radius: var(--uc-radius);
	padding: 0.6em 0.8em;
	width: 100%;
	transition: border-color var(--uc-transition), box-shadow var(--uc-transition);
}

.uc-theme input:focus,
.uc-theme textarea:focus,
.uc-theme select:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--uc-accent-soft);
	outline: none;
}

.uc-theme label {
	display: block;
	font-size: 0.86rem;
	font-weight: 500;
	color: var(--contrast-2);
	margin-bottom: var(--uc-space-3xs);
}

/* ==========================================================================
   9. Author box
   ========================================================================== */

.uc-author-box {
	display: flex;
	gap: var(--uc-space-m);
	align-items: flex-start;
	margin-top: var(--uc-space-xl);
	padding: var(--uc-space-m);
	background: var(--base-2);
	border: var(--uc-border);
	border-radius: var(--uc-radius-lg);
}

.uc-author-box__avatar img {
	border-radius: 50%;
	display: block;
	width: 56px;
	height: 56px;
}

.uc-author-box__body {
	flex: 1;
	min-width: 0;
}

.uc-author-box__eyebrow {
	font-family: var(--uc-font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--contrast-3);
	margin: 0 0 var(--uc-space-3xs);
}

.uc-author-box__name {
	font-size: 1.05rem;
	margin: 0 0 var(--uc-space-2xs);
}

.uc-author-box__bio {
	font-size: 0.94rem;
	line-height: 1.6;
	color: var(--contrast-2);
	margin: 0 0 var(--uc-space-2xs);
}

.uc-author-box__link {
	font-family: var(--uc-font-mono);
	font-size: 0.78rem;
	font-weight: 500;
}

/* ==========================================================================
   10. Related posts
   ========================================================================== */

.uc-related {
	margin-top: var(--uc-space-xl);
	padding-top: var(--uc-space-m);
	border-top: var(--uc-border);
}

.uc-related__title {
	font-family: var(--uc-font-mono);
	font-size: 0.76rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--contrast-3);
	margin: 0 0 var(--uc-space-m);
}

.uc-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--uc-space-m);
}

.uc-related__thumb {
	display: block;
	margin-bottom: var(--uc-space-2xs);
}

.uc-related__thumb img {
	border-radius: var(--uc-radius);
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.uc-related__date {
	font-family: var(--uc-font-mono);
	font-size: 0.72rem;
	color: var(--contrast-3);
	margin: 0 0 var(--uc-space-3xs);
}

.uc-related__heading {
	font-size: 0.98rem;
	line-height: 1.35;
	margin: 0;
}

.uc-related__heading a {
	color: var(--contrast);
}

.uc-related__heading a:hover {
	color: var(--accent);
}

/* ==========================================================================
   11. Post navigation and pagination
   ========================================================================== */

.uc-theme .post-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--uc-space-s);
	margin-top: var(--uc-space-xl);
	padding-top: var(--uc-space-m);
	border-top: var(--uc-border);
}

.uc-theme .post-navigation .nav-previous,
.uc-theme .post-navigation .nav-next {
	border: var(--uc-border);
	border-radius: var(--uc-radius-lg);
	padding: var(--uc-space-s);
	transition: border-color var(--uc-transition), background var(--uc-transition);
}

.uc-theme .post-navigation .nav-previous:hover,
.uc-theme .post-navigation .nav-next:hover {
	border-color: var(--contrast-3);
	background: var(--base-2);
}

.uc-theme .post-navigation .nav-next {
	text-align: right;
}

.uc-theme .post-navigation a {
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--contrast);
	display: block;
}

.uc-theme .post-navigation a:hover {
	color: var(--accent);
}

.uc-theme .paging-navigation {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	row-gap: var(--uc-space-2xs);
	gap: var(--uc-space-2xs);
	margin-top: var(--uc-space-xl);
	padding-top: var(--uc-space-m);
	border-top: var(--uc-border);
}

.uc-theme .paging-navigation .page-numbers {
	font-family: var(--uc-font-mono);
	font-size: 0.84rem;
	color: var(--contrast-2);
	border: var(--uc-border);
	border-radius: var(--uc-radius);
	padding: 0.4em 0.75em;
	min-width: 2.2em;
	text-align: center;
	display: inline-block;
}

.uc-theme .paging-navigation .page-numbers:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.uc-theme .paging-navigation .page-numbers.current {
	background: var(--contrast);
	border-color: var(--contrast);
	color: var(--base-3);
}

.uc-theme .paging-navigation .page-numbers.dots {
	border-color: transparent;
}

/* ==========================================================================
   12. Comments
   ========================================================================== */

.uc-theme .comments-area {
	margin-top: var(--uc-space-2xl);
	padding-top: var(--uc-space-m);
	border-top: var(--uc-border);
	max-width: var(--uc-measure);
	margin-inline: auto;
}

.uc-theme .comments-title,
.uc-theme .comment-reply-title {
	font-family: var(--uc-font-mono);
	font-size: 0.76rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--contrast-3);
	margin: 0 0 var(--uc-space-m);
}

.uc-theme .comment-list {
	list-style: none;
	margin: 0 0 var(--uc-space-xl);
	padding: 0;
}

.uc-theme .comment-list .comment-body {
	padding: var(--uc-space-s) 0;
	border-bottom: var(--uc-border);
}

.uc-theme .comment-list .children {
	list-style: none;
	margin-left: var(--uc-space-m);
	padding-left: var(--uc-space-s);
	border-left: var(--uc-border);
}

.uc-theme .comment-meta {
	display: flex;
	align-items: center;
	gap: var(--uc-space-2xs);
	margin-bottom: var(--uc-space-2xs);
}

.uc-theme .comment-author img {
	border-radius: 50%;
	width: 32px;
	height: 32px;
}

.uc-theme .comment-author .fn {
	font-size: 0.94rem;
	font-weight: 600;
	font-style: normal;
	color: var(--contrast);
}

.uc-theme .comment-metadata,
.uc-theme .comment-metadata a {
	font-family: var(--uc-font-mono);
	font-size: 0.74rem;
	color: var(--contrast-3);
}

.uc-theme .comment-content {
	font-size: 0.98rem;
	line-height: 1.7;
}

.uc-theme .reply a,
.uc-theme .comment-reply-link {
	font-family: var(--uc-font-mono);
	font-size: 0.76rem;
	font-weight: 500;
}

.uc-theme .comment-form p {
	margin-bottom: var(--uc-space-s);
}

.uc-theme .comment-form .comment-notes,
.uc-theme .comment-form .form-submit + .comment-notes {
	font-size: 0.85rem;
	color: var(--contrast-3);
}

/* ==========================================================================
   13. Search and 404
   ========================================================================== */

.uc-theme .search-form,
.uc-theme .wp-block-search__inside-wrapper {
	display: flex;
	gap: var(--uc-space-2xs);
}

.uc-theme .no-results,
.uc-theme .page-content {
	color: var(--contrast-2);
}

.uc-theme .error404 .entry-title,
.uc-theme .not-found .entry-title {
	font-size: clamp(1.7rem, 1.4rem + 1.4vw, 2.3rem);
	margin-bottom: var(--uc-space-s);
}

/* ==========================================================================
   13b. Sidebars and widgets

   The layout itself is GeneratePress's — set globally in Customize → Layout →
   Sidebars, or per post/page in the editor's Layout box. These rules only
   dress it so a sidebar matches the rest of the theme.
   ========================================================================== */

.uc-theme .sidebar .widget,
.uc-theme .widget-area .widget {
	background: transparent;
	border: 0;
	padding: 0;
	margin-bottom: var(--uc-space-l);
	font-size: 0.94rem;
}

.uc-theme .sidebar .widget:last-child {
	margin-bottom: 0;
}

.uc-theme .widget-title,
.uc-theme .sidebar .widget-title {
	font-family: var(--uc-font-mono);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--contrast-3);
	margin: 0 0 var(--uc-space-s);
	padding-bottom: var(--uc-space-3xs);
	border-bottom: var(--uc-border);
}

.uc-theme .sidebar .widget ul,
.uc-theme .widget-area .widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.uc-theme .sidebar .widget li,
.uc-theme .widget-area .widget li {
	margin: 0;
	padding: 0;
	line-height: 1.45;
}

.uc-theme .sidebar .widget li + li,
.uc-theme .widget-area .widget li + li {
	margin-top: var(--uc-space-2xs);
}

.uc-theme .sidebar .widget a,
.uc-theme .widget-area .widget a {
	color: var(--contrast-2);
}

.uc-theme .sidebar .widget a:hover,
.uc-theme .widget-area .widget a:hover {
	color: var(--accent);
}

/* Counts next to categories and archives. */
.uc-theme .sidebar .widget li .count,
.uc-theme .sidebar .widget_categories li,
.uc-theme .sidebar .widget_archive li {
	color: var(--contrast-3);
	font-size: 0.86rem;
}

/* Recent posts and comments read better with a little separation. */
.uc-theme .sidebar .widget_recent_entries li,
.uc-theme .sidebar .widget_recent_comments li {
	padding-bottom: var(--uc-space-2xs);
	border-bottom: var(--uc-border);
}

.uc-theme .sidebar .widget_recent_entries li:last-child,
.uc-theme .sidebar .widget_recent_comments li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.uc-theme .sidebar .widget .post-date {
	display: block;
	font-family: var(--uc-font-mono);
	font-size: 0.72rem;
	color: var(--contrast-3);
	margin-top: 2px;
}

/* Tag cloud, to match the tag pills used on posts. */
.uc-theme .sidebar .tagcloud a,
.uc-theme .widget-area .tagcloud a {
	display: inline-block;
	font-size: 0.76rem !important;
	padding: 0.2em 0.6em;
	margin: 0 0.25em 0.4em 0;
	border: var(--uc-border);
	border-radius: 100px;
	color: var(--contrast-2);
}

.uc-theme .sidebar .tagcloud a:hover,
.uc-theme .widget-area .tagcloud a:hover {
	color: var(--accent);
	border-color: var(--accent);
	background: var(--uc-accent-soft);
}

.uc-theme .sidebar .widget_search .search-form,
.uc-theme .sidebar .widget_block .wp-block-search__inside-wrapper {
	gap: var(--uc-space-3xs);
}

/* A sticky sidebar is more useful than one that scrolls away. */
@media (min-width: 769px) {
	.uc-theme .inside-right-sidebar,
	.uc-theme .inside-left-sidebar {
		position: sticky;
		top: var(--uc-space-m);
	}
}

/* Stacked under the content on small screens (GeneratePress handles the
   stacking itself; this is the separation it needs to read as its own block). */
@media (max-width: 768px) {
	.uc-theme .sidebar {
		margin-top: var(--uc-space-xl);
		padding-top: var(--uc-space-m);
		border-top: var(--uc-border);
	}

	.uc-theme .inside-right-sidebar,
	.uc-theme .inside-left-sidebar {
		position: static;
	}
}

.uc-notice--sidebar {
	padding: var(--uc-space-s);
	font-size: 0.9rem;
}

/* ==========================================================================
   14. Footer
   ========================================================================== */

.uc-theme .site-footer {
	border-top: var(--uc-border);
	background: var(--base-3);
}

.uc-theme .site-info {
	font-family: var(--uc-font-mono);
	font-size: 0.78rem;
	color: var(--contrast-3);
}

.uc-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--uc-space-s);
	width: 100%;
}

.uc-footer p {
	margin: 0;
}

.uc-footer a {
	color: var(--contrast-2);
}

.uc-footer a:hover {
	color: var(--accent);
}

.uc-footer__menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--uc-space-s);
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Back to top */
.uc-theme .generate-back-to-top {
	background: var(--contrast);
	color: var(--base-3);
	border-radius: 50%;
	box-shadow: 0 6px 20px rgba(17, 20, 24, 0.18);
}

.uc-theme .generate-back-to-top:hover {
	background: var(--accent);
	color: var(--base-3);
}

/* Sticky-ish header shadow, applied by assets/js/theme.js */
.uc-header.is-scrolled {
	box-shadow: 0 1px 12px rgba(17, 20, 24, 0.06);
}

/* Code block copy button, applied by assets/js/theme.js */
.uc-code {
	position: relative;
}

.uc-code__copy {
	position: absolute;
	top: var(--uc-space-2xs);
	right: var(--uc-space-2xs);
	font-family: var(--uc-font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.02em;
	color: #9AA3AF;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 4px;
	padding: 0.25em 0.6em;
	cursor: pointer;
	opacity: 0;
	transition: opacity var(--uc-transition), color var(--uc-transition);
}

.uc-code:hover .uc-code__copy,
.uc-code__copy:focus-visible {
	opacity: 1;
}

.uc-code__copy:hover,
.uc-code__copy.is-copied {
	color: #fff;
}

/* ==========================================================================
   15. GenerateBlocks compatibility
   ========================================================================== */

.uc-theme .gb-container h1,
.uc-theme .gb-container h2,
.uc-theme .gb-container h3 {
	letter-spacing: -0.02em;
}

.uc-theme .gb-headline {
	margin-top: 0;
}

.uc-eyebrow {
	font-family: var(--uc-font-mono);
	font-size: 0.74rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--contrast-3);
}

.uc-lead {
	font-size: 1.15rem;
	line-height: 1.6;
	color: var(--contrast-2);
}

/* ==========================================================================
   15b. Front page — hero
   ========================================================================== */

.uc-hero {
	/*
	 * GeneratePress's "one container" layout wraps the whole page in a
	 * max-width container, so the hero breaks out of it to run edge to edge.
	 * Negative inline margins rather than 100vw, which would overlap the
	 * scrollbar and cause sideways scrolling.
	 */
	margin-inline: calc(50% - 50vw);
	border-bottom: var(--uc-border);
	background:
		radial-gradient(60rem 28rem at 15% -20%, rgba(37, 99, 235, 0.07), transparent 65%),
		var(--base-3);
}

.uc-hero__inner {
	max-width: 1100px;
	margin-inline: auto;
	/* The inline padding matches GeneratePress's content padding (32px, 20px on
	   mobile) so the hero text lines up with everything below it. */
	padding: clamp(3rem, 1.5rem + 6vw, 6rem) 32px;
	position: relative;
	z-index: 1;
	width: 100%;
}

/* --- Background image ---------------------------------------------------- */

.uc-hero--has-image {
	position: relative;
	isolation: isolate;
	background: var(--contrast);
	border-bottom: 0;
}

.uc-hero__bg {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.uc-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--uc-hero-focus, center center);
	display: block;
}

/* The scrim that keeps the text readable. */
.uc-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to bottom,
			rgba(10, 12, 15, calc(var(--uc-hero-overlay, 0.55) * 1.15)) 0%,
			rgba(10, 12, 15, var(--uc-hero-overlay, 0.55)) 45%,
			rgba(10, 12, 15, calc(var(--uc-hero-overlay, 0.55) * 1.3)) 100%
		);
}

/* --- Heights ------------------------------------------------------------- */

.uc-hero--h-medium,
.uc-hero--h-tall,
.uc-hero--h-full {
	display: flex;
	align-items: center;
}

.uc-hero--h-medium {
	min-height: 60vh;
}

.uc-hero--h-tall {
	min-height: 80vh;
}

.uc-hero--h-full {
	min-height: calc(100vh - var(--uc-header-height, 72px));
}

/* --- Light text over an image -------------------------------------------- */

.uc-hero--scheme-light .uc-hero__heading {
	color: #fff;
	text-wrap: balance;
}

.uc-hero--scheme-light .uc-hero__text {
	color: rgba(255, 255, 255, 0.86);
}

.uc-hero--scheme-light .uc-hero__eyebrow {
	color: rgba(255, 255, 255, 0.72);
}

.uc-hero--scheme-light .uc-hero__cta {
	background: #fff;
	border-color: #fff;
	color: var(--contrast);
}

.uc-hero--scheme-light .uc-hero__cta:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.uc-hero--scheme-light .uc-hero__cta:focus-visible {
	outline-color: #fff;
}

.uc-hero--center .uc-hero__inner {
	text-align: center;
}

.uc-hero--center .uc-hero__text {
	margin-inline: auto;
}

.uc-hero__eyebrow {
	font-family: var(--uc-font-mono);
	font-size: 0.74rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 var(--uc-space-xs);
}

.uc-hero__heading {
	font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1.05;
	margin: 0;
	max-width: 18ch;
}

.uc-hero--center .uc-hero__heading {
	max-width: none;
}

.uc-hero__text {
	font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
	line-height: 1.55;
	color: var(--contrast-2);
	margin: var(--uc-space-s) 0 0;
	max-width: 46ch;
}

.uc-hero__actions {
	margin: var(--uc-space-m) 0 0;
}

.uc-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-size: 0.97rem;
	font-weight: 500;
	background: var(--contrast);
	color: var(--base-3);
	border: 1px solid var(--contrast);
	border-radius: var(--uc-radius);
	padding: 0.7em 1.3em;
	transition: background var(--uc-transition), border-color var(--uc-transition), transform var(--uc-transition);
}

.uc-hero__cta:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--base-3);
	transform: translateY(-1px);
}

/* Editor-only notices shown on the front page and in empty sidebars. */
.uc-notice {
	max-width: var(--uc-measure);
	margin-inline: auto;
	padding: var(--uc-space-m);
	background: var(--base-2);
	border: 1px dashed var(--contrast-3);
	border-radius: var(--uc-radius-lg);
}

.uc-notice p {
	margin: 0 0 var(--uc-space-s);
}

.uc-notice__aside {
	font-size: 0.85rem;
	color: var(--contrast-3);
	margin-bottom: 0;
}

/*
 * The Home page's content is not running prose, so it is not held to the
 * reading measure — it fills the container and blocks decide their own widths.
 * The selector needs three classes to outrank the measure rule in section 3.
 */
.uc-theme .site-main > .uc-front-content {
	max-width: none;
	margin: var(--uc-space-2xl) 0 0;
}

/* "Wide" blocks would otherwise be narrower than the container they sit in. */
.uc-front-content > .alignwide {
	max-width: none;
}

/* ==========================================================================
   16. Responsive
   ========================================================================== */


@media (max-width: 900px) {
	.uc-related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.uc-related__item:nth-child(3) {
		display: none;
	}
}

@media (max-width: 768px) {
	.uc-theme .site-content {
		padding-block: var(--uc-space-l);
	}

	.uc-header .inside-header {
		flex-direction: row;
		justify-content: space-between;
	}

	.uc-theme .post-navigation {
		grid-template-columns: 1fr;
	}

	.uc-theme .post-navigation .nav-next {
		text-align: left;
	}

	.uc-author-box {
		flex-direction: column;
		gap: var(--uc-space-s);
	}

	.uc-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--uc-space-2xs);
	}

	.uc-related__grid {
		grid-template-columns: 1fr;
	}

	.uc-related__item:nth-child(3) {
		display: block;
	}

	.uc-related__thumb {
		display: none;
	}

	/* --- Touch targets -------------------------------------------------- */

	/*
	 * Inline text links inside running prose stay as they are — enlarging
	 * those would wreck the line rhythm. These are the standalone controls
	 * people actually tap, so they get a 44px-tall hit area.
	 */
	.uc-read-more a,
	.uc-author-box__link,
	.uc-footer__menu a,
	.uc-footer__feed a,
	.uc-related__heading a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
	}

	.uc-footer__menu {
		gap: var(--uc-space-m);
	}

	.uc-theme .entry-meta {
		gap: 0 0.7em;
		line-height: 2;
	}

	.uc-theme .tags-links a,
	.uc-theme .cat-links a {
		padding: 0.45em 0.85em;
		margin-bottom: 0.3em;
	}

	.uc-theme .paging-navigation .page-numbers {
		min-width: 44px;
		padding: 0.6em 0.8em;
	}

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

	/* Keep the site title on one line rather than letting it stack into a
	   narrow column next to the menu toggle. */
	.uc-theme .site-branding {
		min-width: 0;
		flex: 1;
	}

	.uc-theme .main-title {
		font-size: 1rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.uc-theme .site-description {
		font-size: 0.66rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	/* --- Content -------------------------------------------------------- */

	/* Wide tables scroll on their own instead of stretching the page. */
	.uc-theme .entry-content table {
		display: block;
		width: 100%;
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.uc-theme pre,
	.uc-theme .wp-block-code {
		padding: var(--uc-space-s);
		font-size: 0.8rem;
		border-radius: var(--uc-radius);
	}

	/* The copy button needs to be visible without a hover state. */
	.uc-code__copy {
		opacity: 1;
	}

	.uc-theme .comment-list .children {
		margin-left: var(--uc-space-2xs);
		padding-left: var(--uc-space-2xs);
	}

	.uc-theme .entry-content blockquote,
	.uc-theme .wp-block-quote {
		padding-left: var(--uc-space-s);
		font-size: 1.05rem;
	}

	.uc-hero__inner {
		padding-inline: 20px;
	}

	/* Tall heroes are less welcome on a phone. */
	.uc-hero--h-medium {
		min-height: 50vh;
	}

	.uc-hero--h-tall {
		min-height: 62vh;
	}

	.uc-hero--h-full {
		min-height: 78vh;
	}
}

/* ==========================================================================
   17. Print
   ========================================================================== */

@media print {
	.uc-theme .site-header,
	.uc-theme .site-footer,
	.uc-theme .comments-area,
	.uc-theme .uc-related,
	.uc-theme .uc-author-box,
	.uc-theme .post-navigation,
	.uc-theme .generate-back-to-top {
		display: none !important;
	}

	.uc-theme .entry-content {
		font-size: 11pt;
	}

	.uc-theme a {
		color: #000;
		text-decoration: underline;
	}
}
