/*
Theme Name: Relatively Digital
Theme URI: https://relativelydigital.com/
Description: Standalone dark theme for Relatively Digital, built to match lexbz.me: Inter, black background, orange accent, a connected lexbz.me bar, full-width card grid with a key image per post, and a footer reorganised into columns. No parent theme and no third-party requests (Inter is bundled).
Author: Lex Bradshaw-Zanger
Version: 2.1.0
Requires at least: 6.3
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: relatively-digital
*/

/* ==========================================================================
   1. Fonts: self-hosted Inter variable (SIL OFL 1.1)
   ========================================================================== */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   2. Tokens (from lexbz.me's dark sections)
   ========================================================================== */
:root {
	color-scheme: dark;

	--rd-bg: #111111;        /* page background */
	--rd-bg-deep: #0f0f10;   /* footer */
	--rd-card: #1c1c1e;
	--rd-card-alt: #2c2c2e;
	--rd-line: rgba(255, 255, 255, 0.08);
	--rd-head: #ffffff;
	--rd-text: #a1a1a6;
	--rd-muted: #8e8e93;
	--rd-accent: #ff4a11;
	--rd-accent-soft: #ff6b3d;  /* hover on dark, lighter for contrast */
	--rd-accent-press: #e03d09;
	--rd-bar-height: 3.6rem;
	--rd-max: 1680px;
	--rd-gutter: clamp(1.25rem, 4vw, 4rem);
	--rd-read: 760px;
	--rd-wide: 1180px;
	--rd-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   3. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding-top: var(--rd-bar-height);
	background: var(--rd-bg);
	color: var(--rd-text);
	font-family: var(--rd-font);
	font-size: 1.0625rem;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	color: var(--rd-head);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

p { margin: 0 0 1.5rem; }

a {
	color: var(--rd-accent);
	text-decoration: none;
	transition: color 0.25s ease;
}
a:hover, a:focus { color: var(--rd-accent-soft); }

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

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

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed !important;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1.25rem;
	clip: auto;
	clip-path: none;
	background: var(--rd-accent);
	color: #fff;
	font-weight: 600;
	border-radius: 4px;
}

/* Full-width container: uses the screen, with a generous cap on very wide monitors */
.rd-container {
	width: 100%;
	max-width: var(--rd-max);
	margin-inline: auto;
	padding-inline: var(--rd-gutter);
}
.rd-section { padding-block: 3rem 5rem; }

/* ==========================================================================
   4. lexbz.me bar (fixed, mirrors #nav-wrap there)
   ========================================================================== */
.rd-bar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	min-height: var(--rd-bar-height);
	z-index: 1000;
	padding: 1.2rem 2rem;
	background-color: rgba(17, 17, 17, 0.95);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	font-family: var(--rd-font);
}
.admin-bar .rd-bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .rd-bar { top: 46px; } }

.rd-bar__list {
	display: flex;
	justify-content: center;
	gap: 2.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.rd-bar__list li { margin: 0; }
.rd-bar__list a {
	display: inline-block;
	position: relative;
	padding-bottom: 8px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.15em;
	line-height: 1.2;
	text-transform: uppercase;
	transition: color 0.2s ease;
}
.rd-bar__list a:hover,
.rd-bar__list a:focus,
.rd-bar__list a[aria-current="page"] { color: #ffffff; }
.rd-bar__list a[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background-color: var(--rd-accent);
}

/* Chevron so the button reads as a menu */
.rd-bar__toggle::after {
	content: "";
	display: inline-block;
	width: 0.45em;
	height: 0.45em;
	margin-left: 0.6em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-0.15em) rotate(45deg);
	transition: transform 0.2s ease;
}
.rd-bar__toggle[aria-expanded="true"]::after { transform: translateY(0.1em) rotate(225deg); }

.rd-bar__toggle {
	display: none;
	margin: 0 auto;
	padding: 0.5rem 1rem;
	border: 0;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	font: 600 0.9rem/1 var(--rd-font);
	cursor: pointer;
}

@media (max-width: 768px) {
	.rd-bar { padding: 0.75rem 1rem; }
	.rd-bar__toggle { display: block; }
	.rd-bar__list {
		display: none;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		padding: 1.5rem;
		gap: 1.5rem;
		text-align: center;
		background: rgba(17, 17, 17, 0.98);
	}
	.rd-bar__list.is-open { display: flex; }
	.rd-bar__list a[aria-current="page"]::after { display: none; }
}

/* ==========================================================================
   5. Header: logo, tagline, primary menu (all on black, so the logo reads as designed)
   ========================================================================== */
.site-header { border-bottom: 1px solid var(--rd-line); }
.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 3rem;
	padding-block: 1.75rem;
}
.site-branding {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 2rem;
}
.custom-logo-link { display: inline-block; line-height: 0; }
.custom-logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 220px;
	max-height: 76px;
}
.site-description {
	margin: 0;
	max-width: 28rem;
	color: var(--rd-muted);
	font-size: 0.95rem;
	line-height: 1.5;
}

.primary-menu,
.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.primary-menu a {
	display: inline-block;
	padding-block: 0.4rem;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}
.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a { color: #ffffff; }
.primary-menu .current-menu-item > a { box-shadow: 0 2px 0 var(--rd-accent); }

/* ==========================================================================
   6. Card grid (modelled on .portfolio-grid / .portfolio-card at lexbz.me)
   ========================================================================== */
.rd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 2rem;
}

.rd-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background-color: var(--rd-card);
	border-radius: 8px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rd-card:hover,
.rd-card:focus-within {
	transform: translateY(-5px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.rd-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	background-color: var(--rd-card-alt);
	overflow: hidden;
}
.rd-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.rd-card__placeholder {
	display: block;
	width: 55%;
	max-width: 240px;
	height: auto;
	opacity: 0.9;
}

.rd-card__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 1.75rem;
}
.rd-card__tags {
	margin: 0 0 0.6rem;
	color: var(--rd-accent);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	line-height: 1.5;
	text-transform: uppercase;
}
.rd-card__title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.rd-card__title a { color: var(--rd-head); }
.rd-card__title a:hover,
.rd-card__title a:focus { color: var(--rd-accent); }

.rd-card__excerpt {
	color: var(--rd-text);
	font-size: 0.9rem;
	line-height: 1.6;
}
.rd-card__excerpt p {
	margin: 0 0 1.25rem;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.rd-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-top: auto;
}
.rd-card__date { color: var(--rd-muted); font-size: 0.8rem; }
.rd-card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 600;
}
.rd-card__link:hover,
.rd-card__link:focus { color: var(--rd-accent); }

/* Archive and search headings */
.page-header { margin-bottom: 2.5rem; }
.page-title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3.25rem);
	font-weight: 800;
	letter-spacing: -0.03em;
}
.archive-description { margin-top: 0.75rem; max-width: 40rem; color: var(--rd-muted); }
.rd-empty { max-width: 32rem; }

/* Pagination */
.pagination { margin-top: 3.5rem; }
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}
.pagination .page-numbers {
	display: inline-block;
	min-width: 2.75rem;
	padding: 0.5rem 1rem;
	border: 1px solid var(--rd-card-alt);
	border-radius: 4px;
	color: var(--rd-text);
	font-size: 0.9rem;
	font-weight: 500;
	text-align: center;
}
.pagination a.page-numbers:hover,
.pagination a.page-numbers:focus { border-color: var(--rd-accent); color: #ffffff; }
.pagination .page-numbers.current {
	background: var(--rd-accent);
	border-color: var(--rd-accent);
	color: #ffffff;
}
.pagination .page-numbers.dots { border-color: transparent; }

/* ==========================================================================
   7. Single posts and pages
   ========================================================================== */
.rd-single .entry-header,
.rd-single .entry-footer,
.rd-single .post-navigation,
.rd-single .comments-area {
	max-width: var(--rd-read);
	margin-inline: auto;
}
.rd-single .entry-header { margin-bottom: 2.5rem; }
.entry-title {
	margin: 0 0 1rem;
	font-size: clamp(2.1rem, 4.5vw, 3.5rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: var(--rd-head);
}
.entry-meta { margin: 0; color: var(--rd-muted); font-size: 0.9rem; }

.entry-image {
	max-width: var(--rd-wide);
	margin: 0 auto 3rem;
}
.entry-image img {
	display: block;
	width: 100%;
	max-height: 70vh;
	object-fit: cover;
	border-radius: 8px;
}

.entry-content > * {
	max-width: var(--rd-read);
	margin-inline: auto;
}
.entry-content > .alignwide { max-width: var(--rd-wide); }
.entry-content > .alignfull { max-width: none; }
.entry-content > .alignleft { float: left; margin: 0.25rem 2rem 1rem 0; }
.entry-content > .alignright { float: right; margin: 0.25rem 0 1rem 2rem; }
.entry-content::after { content: ""; display: block; clear: both; }

.entry-content h2 { margin-top: 2.5rem; font-size: 1.9rem; }
.entry-content h3 { margin-top: 2rem; font-size: 1.45rem; }
.entry-content h4 { margin-top: 1.75rem; font-size: 1.15rem; }
.entry-content strong, .entry-content b { color: #d1d1d6; font-weight: 600; }
.entry-content a { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content img { border-radius: 4px; }
.entry-content figure { margin-block: 2rem; }
.entry-content figcaption,
.wp-caption-text { margin-top: 0.6rem; color: var(--rd-muted); font-size: 0.85rem; text-align: center; }
.entry-content hr,
.wp-block-separator { border: 0; border-top: 1px solid var(--rd-card-alt); margin-block: 2.5rem; }

.entry-content blockquote,
.wp-block-quote {
	margin-block: 2rem;
	padding: 0.25rem 0 0.25rem 1.5rem;
	border-left: 3px solid var(--rd-accent);
	color: #d1d1d6;
	font-size: 1.15rem;
	font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content cite, .wp-block-quote cite { color: var(--rd-muted); font-size: 0.9rem; font-style: normal; }

.entry-content code, .entry-content kbd {
	padding: 0.15em 0.4em;
	background: var(--rd-card);
	border-radius: 4px;
	font-size: 0.9em;
}
.entry-content pre {
	max-width: var(--rd-wide);
	padding: 1.25rem;
	overflow-x: auto;
	background: var(--rd-card);
	border-radius: 8px;
	font-size: 0.9rem;
	line-height: 1.6;
}
.entry-content pre code { padding: 0; background: none; }

.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.entry-content th, .entry-content td { padding: 0.65rem 0.85rem; border: 1px solid var(--rd-card-alt); text-align: left; }
.entry-content th { color: var(--rd-head); background: var(--rd-card); }

.entry-content .wp-block-embed,
.entry-content .wp-block-video,
.entry-content iframe { max-width: 100%; }

.entry-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rd-line); font-size: 0.9rem; }
.entry-footer p { margin: 0 0 0.5rem; }
.entry-footer__label { color: var(--rd-muted); }
.page-links { display: flex; gap: 0.75rem; margin-top: 1.5rem; }

.post-navigation { margin-top: 3rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation .nav-previous { grid-column: 1; }
.post-navigation a { display: block; padding: 1.25rem 1.5rem; background: var(--rd-card); border-radius: 8px; color: #ffffff; }
.post-navigation a:hover, .post-navigation a:focus { color: var(--rd-accent); }
.post-navigation .nav-subtitle { display: block; margin-bottom: 0.25rem; color: var(--rd-muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.post-navigation .nav-title { font-weight: 600; line-height: 1.4; }
@media (max-width: 640px) {
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next, .post-navigation .nav-previous { grid-column: 1; text-align: left; }
}

/* ==========================================================================
   8. Comments and forms
   ========================================================================== */
.comments-area { margin-top: 4rem; }
.comments-title, .comment-reply-title { font-size: 1.4rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; border-left: 1px solid var(--rd-card-alt); }
.comment-body { padding: 1.25rem 0; border-bottom: 1px solid var(--rd-line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--rd-muted); }
.comment-author .avatar { border-radius: 50%; margin-right: 0.5rem; vertical-align: middle; }
.comment-author .fn { color: var(--rd-head); font-style: normal; font-weight: 600; }
.comment-metadata a { color: var(--rd-muted); }
.reply a { font-size: 0.85rem; font-weight: 600; }

label { color: var(--rd-head); font-size: 0.85rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="password"], textarea, select {
	width: 100%;
	padding: 0.9rem 1rem;
	background: var(--rd-card);
	border: 1px solid var(--rd-card-alt);
	border-radius: 4px;
	color: var(--rd-head);
	font: inherit;
	font-size: 1rem;
}
input:focus, textarea:focus, select:focus { border-color: var(--rd-accent); outline: none; }
.comment-form p { margin-bottom: 1.25rem; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: baseline; gap: 0.6rem; }
.comment-form .comment-form-cookies-consent input { width: auto; }

button, input[type="submit"], input[type="button"], .wp-block-button__link, .search-submit {
	display: inline-block;
	padding: 0.9rem 2rem;
	background-color: var(--rd-accent);
	border: 0;
	border-radius: 4px;
	color: #ffffff;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.25s ease;
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover,
.wp-block-button__link:hover, .search-submit:hover { background-color: var(--rd-accent-press); color: #ffffff; }
.rd-bar__toggle { padding: 0.5rem 1rem; background: rgba(255, 255, 255, 0.1); }
.rd-bar__toggle:hover { background: rgba(255, 255, 255, 0.18); }

.search-form { display: flex; gap: 0.75rem; max-width: 32rem; }
.search-form .search-field { flex: 1; }

/* ==========================================================================
   9. Footer: widgets arranged in columns
   ========================================================================== */
.widget-area {
	margin-top: 2rem;
	padding-block: 4rem;
	background: var(--rd-bg-deep);
	border-top: 1px solid var(--rd-line);
	color: var(--rd-text);
	font-size: 0.95rem;
}
.widget-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	grid-auto-flow: dense;
	gap: 3rem 4rem;
	align-items: start;
}
.widget { min-width: 0; max-width: 100%; }
.widget-title,
.widget .wp-block-heading {
	margin: 0 0 1.25rem;
	color: var(--rd-head);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget a { color: var(--rd-text); }
.widget a:hover, .widget a:focus { color: var(--rd-accent); }

/* Categories: two columns, counts muted, wider than the others */
@media (min-width: 700px) {
	.widget_categories,
	.widget:has(.wp-block-categories-list),
	.widget:has(.wp-block-categories) { grid-column: span 2; }
}
.widget_categories ul,
.wp-block-categories-list {
	columns: 12rem 2;
	column-gap: 2rem;
	line-height: 1.5;
}
.widget_categories li,
.wp-block-categories-list li { margin-bottom: 0.55rem; break-inside: avoid; color: var(--rd-muted); }

/* Archives (by year): compact chips instead of a long list */
.widget_archive ul,
.wp-block-archives-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.widget_archive li,
.wp-block-archives-list li { color: var(--rd-muted); font-size: 0.8rem; }
.widget_archive li a,
.wp-block-archives-list li a {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	border: 1px solid var(--rd-card-alt);
	border-radius: 999px;
	color: var(--rd-text);
	font-size: 0.85rem;
}
.widget_archive li a:hover,
.wp-block-archives-list li a:hover { border-color: var(--rd-accent); color: #ffffff; }
/* If the live widget still lists months, keep it tidy instead of letting it run on */
.widget_archive ul,
.wp-block-archives-list { max-height: 16rem; overflow-y: auto; padding-right: 0.5rem; }

/* Tags: chips */
.tagcloud,
.wp-block-tag-cloud,
.widget_tag_cloud ul,
ul.wp-tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; line-height: 1.4; }
.tagcloud a,
.wp-block-tag-cloud a,
.widget_tag_cloud li a,
ul.wp-tag-cloud li a {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	border: 1px solid var(--rd-card-alt);
	border-radius: 999px;
	font-size: 0.8rem !important; /* core sets an inline size per tag */
	color: var(--rd-text);
}
.tagcloud a:hover, .wp-block-tag-cloud a:hover,
.widget_tag_cloud li a:hover, ul.wp-tag-cloud li a:hover { border-color: var(--rd-accent); color: #ffffff; }

/* Follow Me: inline links */
.widget_nav_menu ul,
.widget:has(.wp-block-social-links) .wp-block-social-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

/* Notices and embeds */
.widget_text, .widget_custom_html, .widget_block p { font-size: 0.85rem; color: var(--rd-muted); }
.widget iframe, .widget .twitter-timeline { max-width: 100%; }

.site-footer {
	padding-block: 2.5rem;
	background: var(--rd-bg-deep);
	border-top: 1px solid var(--rd-line);
	color: var(--rd-muted);
	font-size: 0.85rem;
}
.widget-area + .site-footer { border-top: 0; padding-top: 0; }
.footer-navigation { margin-bottom: 1.5rem; }
.footer-menu a { color: #c7c7cc; }
.footer-menu a:hover, .footer-menu a:focus { color: #ffffff; }
.site-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 2rem;
}
.site-info .site-name, .site-info .site-name a { color: #ffffff; font-weight: 600; }
.site-info a { color: #c7c7cc; }
.site-info a:hover, .site-info a:focus { color: #ffffff; }
.site-info .powered-by { margin-left: auto; }
@media (max-width: 640px) { .site-info .powered-by { margin-left: 0; } }

/* ==========================================================================
   10. WordPress core classes, print, motion
   ========================================================================== */
.alignleft { float: left; margin: 0.25rem 2rem 1rem 0; }
.alignright { float: right; margin: 0.25rem 0 1rem 2rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
.gallery-item { margin: 0; }
.bypostauthor > .comment-body .fn { color: var(--rd-accent); }

@media print {
	.rd-bar, .widget-area, .site-footer, .pagination { display: none; }
	body { padding-top: 0; background: #fff; color: #000; }
	h1, h2, h3, .entry-title { color: #000; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.rd-card, .rd-card:hover, .rd-card:focus-within { transition: none; transform: none; }
	a, .rd-bar__list a { transition: none; }
}
@media (max-width: 640px) {
	.site-header__inner { padding-block: 1.25rem; }
	.rd-section { padding-block: 2rem 3rem; }
	.rd-card__body { padding: 1.4rem; }
}

/* Phones: shorter footer, categories always in two columns */
@media (max-width: 640px) {
	.widget-area { padding-block: 2.5rem; }
	.widget-grid { gap: 2rem 1.25rem; }
	.widget_categories ul,
	.wp-block-categories-list { columns: 2; column-gap: 1.25rem; }
	.widget_categories li,
	.wp-block-categories-list li { margin-bottom: 0.4rem; font-size: 0.9rem; }
	.widget-title,
	.widget .wp-block-heading { margin-bottom: 0.9rem; }
}

/* ==========================================================================
   Author box (after each post)
   ========================================================================== */
.rd-author {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	max-width: var(--rd-read);
	margin: 3rem auto 0;
	padding: 1.75rem;
	background: var(--rd-card);
	border-radius: 8px;
}
.rd-author__photo {
	flex: 0 0 auto;
	width: 96px;
	height: 96px;
	border: 3px solid rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	object-fit: cover;
}
.rd-author__title { margin: 0 0 0.5rem; font-size: 1.1rem; }
.rd-author__bio { margin: 0 0 1rem; font-size: 0.95rem; line-height: 1.65; }
.rd-author__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin: 0; font-size: 0.9rem; font-weight: 600; }
.rd-author__links a { color: #ffffff; }
.rd-author__links a:hover, .rd-author__links a:focus { color: var(--rd-accent); }
@media (max-width: 560px) {
	.rd-author { flex-direction: column; align-items: center; text-align: center; }
	.rd-author__links { justify-content: center; }
}

/* ==========================================================================
   Photo pages (gallery images)
   ========================================================================== */
.rd-attachment .entry-header,
.rd-attachment .rd-back-wrap,
.rd-attachment .rd-attachment__nav { max-width: var(--rd-wide); margin-inline: auto; }
.rd-attachment .entry-header { margin-bottom: 1.5rem; }
.rd-attachment .entry-title { font-size: clamp(1.6rem, 3vw, 2.4rem); }

.rd-back-wrap { margin: 0 auto 1.5rem; }
.rd-back-wrap--bottom { margin: 2rem auto 0; }
.rd-back {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.1rem;
	background: var(--rd-card);
	border: 1px solid var(--rd-card-alt);
	border-radius: 4px;
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 600;
}
.rd-back:hover, .rd-back:focus { border-color: var(--rd-accent); color: #ffffff; }

.rd-attachment__figure { max-width: var(--rd-wide); margin: 0 auto 1.5rem; text-align: center; }
.rd-attachment__figure img {
	display: inline-block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 80vh;
	object-fit: contain;
	background: var(--rd-card);
	border-radius: 8px;
}
.rd-attachment__figure figcaption { margin-top: 0.75rem; color: var(--rd-muted); font-size: 0.9rem; }

.rd-attachment__nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
}
.rd-attachment__count { margin: 0; color: var(--rd-muted); font-size: 0.9rem; text-align: center; }
.rd-attachment__next { text-align: right; }
.rd-attachment__prev a, .rd-attachment__next a {
	display: inline-block;
	padding: 0.6rem 1.1rem;
	border: 1px solid var(--rd-card-alt);
	border-radius: 4px;
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 600;
}
.rd-attachment__prev a:hover, .rd-attachment__next a:hover,
.rd-attachment__prev a:focus, .rd-attachment__next a:focus { border-color: var(--rd-accent); color: #ffffff; }
@media (max-width: 560px) {
	.rd-attachment__nav { grid-template-columns: 1fr 1fr; }
	.rd-attachment__count { grid-column: 1 / -1; order: -1; }
}
