/*
Theme Name: Tricky Dogs Child
Description: A modern personal site built on Twenty Twenty-Five.
Template: twentytwentyfive
Version: 0.5.0
Requires at least: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tricky-dogs-child
*/

/* Shared frontend/editor refinements. Primary design tokens live in theme.json. */
:where(.wp-site-blocks, .editor-styles-wrapper) {
	-webkit-font-smoothing: antialiased;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(h1, h2, h3) {
	text-wrap: balance;
	overflow-wrap: break-word;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(a) {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(a, button, input, textarea, select):focus-visible {
	outline: 3px solid #2458d3;
	outline-offset: 4px;
}

:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-button__link {
	transition: background-color 160ms ease, box-shadow 160ms ease;
}

/* Cover text stays readable; retain the user's photo, overlay and block colours. */
:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-cover :where(h1, h2) {
	max-width: 18ch;
}
:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-cover p {
	max-width: 54ch;
}

/*
 * Existing service cards can have borders/shadows saved inline in the page.
 * Limit the override to decorated Group blocks inside columns; never all groups.
 * The optional personal-card class supports new cards without inline styling.
 */
:where(.wp-site-blocks, .editor-styles-wrapper) :is(
	.wp-block-columns .wp-block-group[style*="box-shadow"],
	.personal-card
) {
	border: 1px solid #dce3ef !important;
	border-radius: 18px !important;
	box-shadow: 0 8px 28px rgb(23 36 59 / 7%) !important;
	padding: clamp(1.25rem, 2.5vw, 2rem);
}
:where(.wp-site-blocks, .editor-styles-wrapper) .personal-card:not(.has-background) {
	background: #fff;
}
:where(.wp-site-blocks, .editor-styles-wrapper) .personal-card :where(h3, h4) {
	font-weight: 650;
}

/* Add personal-section to a Group for consistent, responsive section spacing. */
:where(.wp-site-blocks, .editor-styles-wrapper) .personal-section {
	padding-block: clamp(3rem, 7vw, 6rem);
}
@media (max-width: 600px) {
	:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-cover :where(h1, h2) {
		max-width: 100%;
	}
}
@media (prefers-reduced-motion: reduce) {
	:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-button__link {
		transition: none;
	}
}

/* Twentig applies its hard shadow directly to Column blocks. */
:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-column.is-style-tw-hard-shadow {
	background-color: #fff;
	border: 1px solid #dce3ef;
	border-radius: 18px;
	box-shadow: 0 8px 28px rgb(23 36 59 / 7%) !important;
	padding: clamp(1.25rem, 2.5vw, 2rem);
}
:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-column.is-style-tw-hard-shadow > .wp-block-spacer {
	display: none;
}
/* Ultimate Blocks may set fill on paths, overriding a fill on the SVG root. */
:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-column.is-style-tw-hard-shadow .wp-block-ub-icon {
	color: #2458d3;
}
:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-column.is-style-tw-hard-shadow .wp-block-ub-icon :is(svg, svg path) {
	fill: #2458d3 !important;
}

/* Approved homepage section headings; smaller card headings are untouched. */
:is(.wp-block-post-content, .editor-styles-wrapper) .personal-section-heading {
	color: #17243b;
	font-family: var(--wp--preset--font-family--personal-sans);
	font-size: clamp(1.875rem, 5vw, 2.625rem);
	font-weight: 650;
	line-height: 1.15;
	letter-spacing: -0.035em;
	text-align: center;
	text-wrap: balance;
	margin-block: 0 2rem;
}
/* Eyebrows are real, editable Paragraph blocks in both views. */
:is(.wp-block-post-content, .editor-styles-wrapper) .personal-section-eyebrow {
 color: #2458d3;
 font-family: var(--wp--preset--font-family--personal-sans);
 font-size: 0.6875rem;
 font-weight: 600;
 line-height: 1.7;
 letter-spacing: 0.14em;
 text-align: center;
 margin-block: 0 1rem;
}
:is(.wp-block-post-content, .editor-styles-wrapper) .personal-logo-intro {
	color: #526078;
	text-align: center;
	max-width: 48ch;
	margin: 1.375rem auto 2rem;
}
/* Approved ten-brand grid: five columns on desktop, two on small screens. */
:is(.wp-block-post-content, .editor-styles-wrapper) .personal-logo-grid {
 display: grid;
 grid-template-columns: repeat(5, minmax(0, 1fr));
 gap: 14px;
 max-width: 1120px;
 margin-inline: auto;
}
:is(.wp-block-post-content, .editor-styles-wrapper) .personal-logo-grid > .wp-block-image {
 display: flex;
 align-items: center;
 justify-content: center;
 min-width: 0;
 min-height: 150px;
 margin: 0;
 padding: 24px 16px;
 background: #fff;
 border: 1px solid #e2e7f0;
 border-radius: 16px;
 box-sizing: border-box;
}
:is(.wp-block-post-content, .editor-styles-wrapper) .personal-logo-grid .wp-block-image img {
 width: 100% !important;
 height: 80px !important;
 max-width: 190px;
 object-fit: contain !important;
 aspect-ratio: auto !important;
 border-radius: 0;
}
/* Display the official white Investor mark in green on the approved white tile. */
.personal-logo-grid .personal-logo-investor img {
 filter: brightness(0) saturate(100%) invert(42%) sepia(26%) saturate(1167%) hue-rotate(51deg) brightness(93%) contrast(85%);
}
@media (max-width: 700px) {
 :is(.wp-block-post-content, .editor-styles-wrapper) .personal-logo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
 }
 :is(.wp-block-post-content, .editor-styles-wrapper) .personal-logo-grid > .wp-block-image {
  min-height: 130px;
 }
}

/* Approved direct-photo hero: no coloured panel or image tint. */
.wp-block-cover.personal-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	min-height: 680px;
	padding: 0 !important;
	background: transparent;
	color: #fff;
	isolation: isolate;
	overflow: hidden;
}
.wp-block-cover.personal-hero > .wp-block-cover__background {
	display: none;
}
.wp-block-cover.personal-hero > .wp-block-cover__image-background {
	position: absolute;
	inset: 0;
	width: 125%;
	height: 100%;
	min-height: 0;
	margin: 0;
	z-index: 0;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: 0% 0% !important;
	object-fit: cover;
	object-position: 0% 0%;
}
.wp-block-cover.personal-hero > .wp-block-cover__inner-container {
	position: relative;
	z-index: 1;
	width: 39%;
	min-width: 0;
	padding: 54px 0 54px 5%;
	box-sizing: border-box;
	background: transparent;
}
.wp-block-cover.personal-hero .wp-block-cover__inner-container > .wp-block-group,
.wp-block-cover.personal-hero .wp-block-cover__inner-container > .wp-block-group > .wp-block-group {
	padding: 0 !important;
	margin: 0;
	max-width: none;
}
.wp-block-cover.personal-hero h1 {
	color: #fff !important;
	font-size: clamp(2rem, 3vw, 3.25rem);
	font-weight: 650;
	line-height: 1.1;
	letter-spacing: -0.035em;
	max-width: 16ch;
	margin: 0;
	text-shadow: 0 2px 14px rgb(0 0 0 / 35%);
	overflow-wrap: break-word;
}
.wp-block-cover.personal-hero p {
	max-width: 43ch;
	color: #fff !important;
	font-size: 17px;
	line-height: 1.7;
	text-shadow: 0 1px 8px rgb(0 0 0 / 45%);
}
@media (max-width: 700px) {
	.wp-block-cover.personal-hero {
		flex-direction: column;
		align-items: stretch;
		min-height: 0;
	}
	.wp-block-cover.personal-hero > .wp-block-cover__image-background {
		position: relative;
		inset: auto;
		width: 100%;
		height: clamp(280px, 55vw, 420px);
		flex-shrink: 0;
		background-position: 60% 0% !important;
		object-position: 60% 0%;
	}
	.wp-block-cover.personal-hero > .wp-block-cover__inner-container {
		width: 100%;
		padding: 28px 6% 36px;
	}
	.wp-block-cover.personal-hero h1 {
		font-size: clamp(2rem, 6vw, 3rem);
		max-width: 23ch;
	}
	.wp-block-cover.personal-hero h1,
	.wp-block-cover.personal-hero p {
		color: #17243b !important;
		text-shadow: none;
	}
	.wp-block-cover.personal-hero p {
		max-width: 54ch;
	}
	.wp-block-cover.personal-hero .wp-block-button__link {
		background: #2458d3 !important;
		color: #fff !important;
	}
}


/* Approved minimal footer; the former multi-column layout is retired. */
.wp-block-post-content > p:last-child:empty {
	display: none;
}
.wp-site-blocks > footer.wp-block-template-part,
footer.wp-block-template-part.personal-minimal-footer {
	margin-top: 0;
}
.personal-minimal-footer {
	padding: 24px 6% 28px;
	text-align: center;
	color: #17243b;
	font-family: var(--wp--preset--font-family--personal-sans);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}
.personal-minimal-footer > p {
	margin: 0;
}

/* Skill cards are visible immediately, without Twentig/AOS entrance delays. */
:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-column.is-style-tw-hard-shadow {
	animation: none !important;
	transition: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
}

/* Approved header: original logo before the site name, no external navigation. */
.personal-header {
	margin: 0;
	background: var(--wp--preset--color--base, #f8f9fc);
}
.personal-header-inner {
	display: flex;
	align-items: center;
	min-height: 80px;
	padding: 16px 5%;
	box-sizing: border-box;
}
.personal-header .personal-header-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	max-width: 100%;
	color: #17243b;
	font-family: var(--wp--preset--font-family--personal-sans);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: -0.035em;
	text-decoration: none;
}
.personal-header .personal-header-logo {
	display: block;
	width: 48px;
	height: 48px;
	object-fit: contain;
	flex-shrink: 0;
}
.personal-header-brand > span {
	min-width: 0;
	overflow-wrap: anywhere;
}
@media (max-width: 420px) {
	.personal-header-inner {
		min-height: 72px;
	}
	.personal-header .personal-header-brand {
		font-size: 18px;
		gap: 10px;
	}
	.personal-header .personal-header-logo {
		width: 40px;
		height: 40px;
	}
}

/* Native Site Logo and Site Title blocks share the approved header styling. */
.personal-header > .personal-header-inner { width: 100%; max-width: none; margin: 0; gap: 12px; }
.personal-header .wp-block-site-title { margin: 0; color: #17243b; font-family: var(--wp--preset--font-family--personal-sans); font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -0.035em; }
.personal-header .wp-block-site-title a { color: inherit; text-decoration: none; }
.personal-header .wp-block-site-logo { flex-shrink: 0; }
.personal-header .wp-block-site-logo img { width: 48px; height: 48px; object-fit: contain; }
@media (max-width: 420px) {
 .personal-header .wp-block-site-title { font-size: 18px; }
 .personal-header .wp-block-site-logo img { width: 40px; height: 40px; }
}
/* Some WordPress versions use an extra InnerBlocks wrapper in the editor. */
.editor-styles-wrapper .personal-logo-grid > .block-editor-inner-blocks > .block-editor-block-list__layout {
 display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px;
}
.editor-styles-wrapper .personal-logo-grid > .block-editor-inner-blocks { grid-column: 1 / -1; }
.editor-styles-wrapper .personal-logo-grid .block-editor-block-list__layout > .wp-block-image {
 display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 150px; margin: 0; padding: 24px 16px; background: #fff; border: 1px solid #e2e7f0; border-radius: 16px; box-sizing: border-box;
}
@media (max-width: 700px) {
 .editor-styles-wrapper .personal-logo-grid > .block-editor-inner-blocks > .block-editor-block-list__layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Closing invitation: shared native block styling for frontend and editor. */
:is(.wp-site-blocks, .editor-styles-wrapper) .personal-linkedin-cta {
 text-align: center;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .personal-linkedin-cta .personal-section-eyebrow {
 margin-block: 0 16px;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .personal-linkedin-cta .personal-section-heading {
 margin-block: 0 20px;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .personal-linkedin-cta .personal-cta-invitation {
 color: #526078;
 font-size: 17px;
 line-height: 1.7;
 max-width: 560px;
 margin: 0 auto 26px;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .personal-linkedin-cta .wp-block-button__link {
 background: #2458d3;
 color: #fff;
 border-radius: 12px;
 padding: 17px 24px;
 font-size: 16px;
 font-weight: 600;
 line-height: 1.4;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .personal-linkedin-cta .wp-block-button__link:hover {
 background: #1b46b4;
}
@media (max-width: 430px) {
 :is(.wp-site-blocks, .editor-styles-wrapper) .personal-linkedin-cta {
  padding-top: 44px !important;
  padding-bottom: 30px !important;
 }
 :is(.wp-site-blocks, .editor-styles-wrapper) .personal-linkedin-cta .wp-block-button__link {
  font-size: 14px;
  padding: 16px 18px;
 }
}
