/*
Theme Name: Persona
Theme URI: https://example.com/persona
Author: SilverKnight
Author URI: https://example.com
Description: A modern, fully customizable block theme for personal sites. Drag-and-drop menus and layouts via the Site Editor, category-driven menu sections, easy advertisement slots, and a built-in resume that exports to PDF (with the Persona Toolkit companion plugin).
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: persona
Tags: blog, portfolio, one-column, two-columns, block-patterns, full-site-editing, custom-colors, custom-menu, editor-style, featured-images, threaded-comments, translation-ready
*/

/*
 * Persona is a block theme. Almost all styling lives in theme.json and the
 * block templates, which you edit visually in Appearance > Editor.
 * This file is only required by WordPress for the theme header above and
 * holds a few small front-end tweaks that are easier to express in CSS.
 */

/* Smooth scrolling for in-page section links (used by category menu sections). */
html {
	scroll-behavior: smooth;
}

/* Keep ad slots visually contained and labelled. */
.persona-ad-slot {
	text-align: center;
	overflow: hidden;
}

.persona-ad-slot__label {
	display: block;
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.5;
	margin-bottom: 0.35rem;
}

/* Hide elements only meant for the printed/PDF resume on screen. */
.persona-print-only {
	display: none;
}

/* ---------------------------------------------------------------------------
 * Homepage
 * ------------------------------------------------------------------------- */

/* Hero — emphasised words pick up the accent colour. */
.persona-hero__title {
	line-height: 1.1;
}

.persona-hero__title em {
	color: var(--wp--preset--color--primary);
	font-style: italic;
}

/* Roles marquee — a slow horizontal scroll of role keywords. */
.persona-roles {
	margin-top: var(--wp--preset--spacing--50);
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
	overflow: hidden;
}

.persona-roles__track {
	display: inline-block;
	margin: 0;
	padding: 0.85rem 0;
	white-space: nowrap;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	animation: persona-marquee 28s linear infinite;
}

@keyframes persona-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.persona-roles__track {
		animation: none;
	}
}

/* Full-width page header band (blog index, etc.) — centered title block on a
 * soft blush gradient. */
.persona-page-header {
	background: linear-gradient(165deg, #f6e9e5 0%, #fbf4f1 55%, #f1ddd6 100%);
	border-bottom: 1px solid var(--wp--preset--color--border);
	text-align: center;
}

/* Blog section header — small eyebrow label and an "All Posts" link. */
.persona-eyebrow {
	margin: 0 0 0.2rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.persona-allposts {
	margin: 0;
	font-weight: 600;
}

.persona-allposts a {
	text-decoration: none;
}

.persona-post-grid .wp-block-post-title a {
	text-decoration: none;
}

.persona-post-grid .wp-block-post-title a:hover {
	text-decoration: underline;
}

/* Post grid: 3 columns, gracefully collapsing on narrower screens. */
.persona-post-grid.is-layout-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

@media (max-width: 600px) {
	.persona-post-grid.is-layout-grid {
		grid-template-columns: 1fr;
	}
}

/* Featured-image thumbnails — rounded, cropped, with a gentle hover zoom. */
.persona-post-grid .wp-block-post-featured-image {
	margin: 0;
	overflow: hidden;
	border-radius: 12px;
}

.persona-post-grid .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.persona-post-grid li:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

/* Each post is a card sharing the "Let's work together" surface background. */
.persona-post-grid.is-layout-grid li {
	background: var(--wp--preset--color--surface);
	border-radius: 16px;
	padding: 1.25rem;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.persona-post-grid.is-layout-grid li:hover {
	box-shadow: 0 10px 28px rgba(58, 38, 48, 0.1);
	transform: translateY(-3px);
}

/* Trim trailing margin so the excerpt sits evenly inside the card padding. */
.persona-post-grid .wp-block-post-excerpt {
	margin-bottom: 0;
}

/* Full-height hero with a soft blush gradient (built around the surface
 * colour) and vertically centred content. */
.persona-hero {
	position: relative;
	min-height: calc(100vh - 5.5rem);
	min-height: calc(100svh - 5.5rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
	background: linear-gradient(165deg, #f6e9e5 0%, #fbf4f1 55%, #f1ddd6 100%);
}

/* Give the hero a generous, elegant display size. */
.persona-hero__title {
	letter-spacing: 0.005em;
	line-height: 1.15;
	font-size: clamp(2.4rem, 6vw, 3.8rem);
}

/* Scroll-down cue pinned near the bottom of the hero. */
.persona-scroll-cue {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 1.5rem;
	margin: 0;
}

.persona-scroll-cue a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 1px solid var(--wp--preset--color--border);
	background: rgba(255, 255, 255, 0.55);
	color: var(--wp--preset--color--primary);
	font-size: 1.3rem;
	line-height: 1;
	text-decoration: none;
	animation: persona-bounce 1.8s ease-in-out infinite;
}

.persona-scroll-cue a:hover {
	background: #fff;
}

@keyframes persona-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
	.persona-scroll-cue a {
		animation: none;
	}
}

/* ---------------------------------------------------------------------------
 * Contact form
 * ------------------------------------------------------------------------- */

.persona-contact-form .persona-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin: 0 0 1.1rem;
}

/* Name + Email sit side by side, collapsing to one column on small screens. */
.persona-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.1rem;
	margin: 0 0 1.1rem;
}

.persona-field-row .persona-field {
	margin: 0;
}

@media (max-width: 600px) {
	.persona-field-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.persona-field-row .persona-field {
		margin: 0 0 1.1rem;
	}
}

/* Centered submit button, pill shaped to match the reference layout. */
.persona-submit-row {
	margin: 1.8rem 0 0;
	text-align: center;
}

.persona-submit {
	border-radius: 999px;
	padding: 0.85em 1.8em;
}

.persona-contact-form label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.persona-req {
	color: var(--wp--preset--color--primary);
}

.persona-contact-form input,
.persona-contact-form textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	box-sizing: border-box;
}

.persona-contact-form input:focus,
.persona-contact-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}

.persona-contact-form textarea {
	resize: vertical;
}

.persona-submit {
	cursor: pointer;
	border: 0;
	font-weight: 600;
}

/* Honeypot — kept in the DOM for bots but hidden from people. */
.persona-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.persona-form-notice {
	margin: 0 0 1.4rem;
	padding: 0.85rem 1rem;
	border-radius: 8px;
	font-weight: 600;
}

.persona-form-notice--ok {
	color: var(--wp--preset--color--primary-dark);
	background: var(--wp--preset--color--lime);
	border: 1px solid var(--wp--preset--color--primary);
}

.persona-form-notice--err {
	color: #7a1f1f;
	background: #fbe6e6;
	border: 1px solid #e3b1b1;
}

/* ---------------------------------------------------------------------------
 * Site-wide polish
 * ------------------------------------------------------------------------- */

::selection {
	background: var(--wp--preset--color--rose);
	color: #fff;
}

a {
	transition: color 0.18s ease;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Header navigation — animated underline on hover / current item. */
.persona-header .wp-block-navigation-item__content {
	position: relative;
}

.persona-header .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -4px;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--primary);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.22s ease;
}

.persona-header .wp-block-navigation-item__content:hover::after,
.persona-header .current-menu-item > .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/* Buttons — gentle lift and shadow; outline fills on hover. */
.wp-block-button__link {
	transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(176, 104, 131, 0.28);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* Consistent rounded, blush-tinted form fields everywhere (comments, etc.). */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	padding: 0.7rem 0.85rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}

/* Search block — pill-shaped field with the button tucked inside. */
.wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	padding: 0.2rem 0.2rem 0.2rem 0.5rem;
	overflow: hidden;
}

.wp-block-search__inside-wrapper .wp-block-search__input {
	border: 0;
	border-radius: 0;
	background: transparent;
	padding-block: 0.5rem;
}

.wp-block-search__inside-wrapper .wp-block-search__input:focus {
	outline: none;
	border: 0;
}

.wp-block-search__button {
	border-radius: 999px;
	margin: 0;
}

/* Comments — separated section with a soft card around the reply form. */
.wp-block-comments {
	border-top: 1px solid var(--wp--preset--color--border);
	padding-top: var(--wp--preset--spacing--50);
}

.wp-block-post-comments-form {
	background: var(--wp--preset--color--surface);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--40);
}

.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea {
	width: 100%;
	box-sizing: border-box;
}

/* Post content — elegant blockquotes, rounded media, soft rules. */
.wp-block-post-content blockquote {
	margin: 1.8rem 0;
	padding: 0.4rem 0 0.4rem 1.4rem;
	border-left: 4px solid var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--script);
	font-size: 1.35rem;
	font-style: italic;
	color: var(--wp--preset--color--primary-dark);
}

.wp-block-post-content img {
	border-radius: 12px;
}

.wp-block-post-content figcaption {
	color: var(--wp--preset--color--muted);
	font-size: 0.85rem;
	text-align: center;
}

.wp-block-post-content hr,
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--border);
}

/* Single-post meta row. */
.persona-post-meta {
	gap: 0.5rem 0.75rem;
}

.persona-post-meta a {
	text-decoration: none;
	font-weight: 600;
}

/* Tags row pills. */
.persona-tags a {
	display: inline-block;
	margin: 0 0.4rem 0.4rem 0;
	padding: 0.25rem 0.75rem;
	font-size: 0.8rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
 * Mobile navigation (burger overlay)
 * ------------------------------------------------------------------------- */

/* When the mobile menu is open, centre the items. Core maps the menu's
 * justification to the --navigation-layout-justification-setting variable and
 * feeds it into align-items, so overriding the variable (rather than fighting
 * specificity on align-items) reliably re-centres everything. */
.wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-justification-setting: center;
	--navigation-layout-justify: center;
	--navigation-layout-align: center;
	padding-left: var(--wp--preset--spacing--40);
	padding-right: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--base);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	width: 100%;
	gap: 1.25rem;
	text-align: center;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.2rem;
}
