/*
Theme Name: Scholar Folio
Author: You
Description: A warm, card-based portfolio theme for researchers and academics. Nine home-page boxes (profile, publications, employment, creative work, contact, CV, soft skills, thoughts, research projects), each leading to its own page. Everything is editable in Appearance → Editor.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scholar-folio
Tags: portfolio, blog, education, block-patterns, full-site-editing, grid-layout
*/

/* =========================================================
   Frame
   ========================================================= */

.folio-page,
.folio-header,
.folio-footer {
	--folio-gutter: clamp(16px, 3vw, 28px);
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--wp--style--global--wide-size, 1240px) + 2 * var(--folio-gutter)) !important;
	margin-inline: auto !important;
	padding-inline: var(--folio-gutter) !important;
}
.folio-page { padding-block: clamp(1.5rem, 5vw, 4rem) clamp(2rem, 5vw, 4rem); }
.folio-page > * + * { margin-block-start: var(--wp--custom--gap, 16px); }

/* =========================================================
   Grid
   ========================================================= */

.folio-grid {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: minmax(132px, auto);
	grid-auto-flow: row dense;
	gap: var(--wp--custom--gap, 16px);
}
.folio-grid > * { margin: 0 !important; min-width: 0; grid-row: span 2; }

/* Box sizes — add these classes in Advanced → Additional CSS class(es) */
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: 1 / -1; }
.short  { grid-row: span 1 !important; }   /* half height  */
.mid    { grid-row: span 3 !important; }   /* 1.5 × height */
.tall   { grid-row: span 4 !important; }   /* double height */

/* A grid whose rows size to content (inner pages) */
.folio-grid.is-auto { grid-auto-rows: auto; }
.folio-grid.is-auto > * { grid-row: auto; }
.folio-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1080px) {
	.folio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mid  { grid-row: span 2 !important; }
	.tall { grid-row: span 3 !important; }
	.span-4 { grid-column: 1 / -1; }
	.span-3 { grid-column: span 1; }
	.folio-photo img { max-height: 520px; }
}
@media (max-width: 640px) {
	.folio-grid, .folio-grid.cols-3 { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
	.folio-grid > *, .short, .mid, .tall { grid-row: auto !important; }
	.span-2, .span-3, .span-4 { grid-column: auto; }
}

/* =========================================================
   Cards — Group block styles "Card" and "Card (clickable)"
   ========================================================= */

.is-style-card,
.is-style-card-link {
	position: relative;
	display: flex !important;
	flex-direction: column;
	gap: 0.5rem;
	box-sizing: border-box;
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card, 28px);
	padding: clamp(1.25rem, 2.6vw, 2rem);
	overflow: hidden;
}
.is-style-card > *,
.is-style-card-link > * { margin-block: 0 !important; }

/* Anything with .push sits at the bottom of its card */
.push { margin-top: auto !important; padding-top: 1rem; }
.push > * { margin-block: 0; }
.push > * + * { margin-block-start: 0.35rem; }

/* Clickable card: the link in the card's heading covers the whole card */
.is-style-card-link,
.folio-contact {
	transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease, border-color .3s ease;
}
.is-style-card-link :where(h1,h2,h3,h4) a,
.folio-contact :where(h1,h2,h3,h4) a { color: inherit; text-decoration: none; }
.is-style-card-link :where(h1,h2,h3,h4) a::after,
.folio-contact :where(h1,h2,h3,h4) a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: inherit;
}
/* Arrow badge in the corner */
.is-style-card-link::after,
.folio-contact::before {
	content: "";
	position: absolute;
	top: clamp(1rem, 2.4vw, 1.6rem);
	right: clamp(1rem, 2.4vw, 1.6rem);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--wp--preset--color--chip) url("assets/icons/arrow.svg") center / 18px no-repeat;
	transition: transform .4s cubic-bezier(.2,.8,.2,1), background-color .3s ease;
	pointer-events: none;
	z-index: 3;
}
.is-style-card-link:hover,
.folio-contact:hover {
	transform: translateY(-3px);
	box-shadow: 0 22px 40px -24px rgba(30, 27, 22, .35);
	border-color: #d6d0c1;
}
.is-style-card-link:hover::after {
	background-color: var(--wp--preset--color--ochre);
	transform: rotate(45deg);
}
.wp-block-cover.folio-contact::before { background-color: rgba(255,255,255,.2); background-image: url("assets/icons/arrow-light.svg"); backdrop-filter: blur(8px); opacity: 1; }
.folio-contact:hover::before { background-color: rgba(255,255,255,.35); transform: rotate(45deg); }
.is-style-card-link :where(h1,h2,h3) { padding-right: 2.75rem; }
.is-style-card-link:focus-within,
.folio-contact:focus-within { outline: 2px solid var(--wp--preset--color--forest); outline-offset: 3px; }

/* =========================================================
   Text styles — Paragraph block styles "Label", "Chip", "Status"
   ========================================================= */

p.is-style-label,
.wp-block-post-date.is-style-label {
	display: inline-block;
	width: fit-content;
	max-width: calc(100% - 3rem); /* keeps clear of the arrow badge */
	box-sizing: border-box;
	padding: 0.42em 0.95em;
	border-radius: 999px;
	background: var(--label-bg, color-mix(in srgb, var(--wp--preset--color--ochre) 24%, var(--wp--preset--color--card)));
	color: var(--label-fg, #6d4f14);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.25;
}
.dot-forest { --label-bg: color-mix(in srgb, var(--wp--preset--color--forest) 12%, var(--wp--preset--color--card)); --label-fg: var(--wp--preset--color--forest); }
.dot-coral  { --label-bg: color-mix(in srgb, var(--wp--preset--color--coral) 16%, var(--wp--preset--color--card)); --label-fg: #9a3f28; }
.dot-ink    { --label-bg: var(--wp--preset--color--chip); --label-fg: var(--wp--preset--color--ink); }

p.is-style-chip,
p.is-style-status,
.wp-block-post-date.is-style-chip {
	width: fit-content;
	background: var(--wp--preset--color--chip);
	border-radius: 999px;
	padding: 0.42em 0.95em;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.25;
}
p.is-style-status {
	display: flex;
	align-items: center;
	gap: 0.55em;
	background: color-mix(in srgb, var(--wp--preset--color--forest) 10%, var(--wp--preset--color--card));
	color: var(--wp--preset--color--forest);
	font-weight: 600;
}
p.is-style-status::before {
	content: "";
	width: 0.6em;
	height: 0.6em;
	flex: none;
	border-radius: 50%;
	background: currentColor;
	animation: folio-pulse 2.6s ease-in-out infinite;
}
@keyframes folio-pulse {
	0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wp--preset--color--forest) 35%, transparent); }
	60% { box-shadow: 0 0 0 6px transparent; }
}
.chips { gap: 0.45rem !important; }
.chips > * { margin: 0 !important; }

@media (prefers-reduced-motion: reduce) {
	p.is-style-status::before { animation: none; }
	.is-style-card-link, .folio-contact, .is-style-card-link::after, .folio-fan figure { transition: none !important; }
}

/* =========================================================
   Home — profile box
   ========================================================= */

.folio-avatar { margin: 0 !important; flex: none; }
.folio-avatar img {
	width: 76px;
	height: 76px;
	object-fit: cover;
	border-radius: 20px;
	display: block;
}
.folio-name {
	font-size: clamp(2.4rem, 1.4rem + 3vw, 4rem) !important;
	line-height: 0.98 !important;
	letter-spacing: -0.03em !important;
}
.folio-name em { font-style: italic; color: var(--wp--preset--color--forest); }
.folio-bio {
	font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.25rem);
	line-height: 1.55;
	max-width: 36em;
	text-wrap: pretty;
}
.folio-interests { margin-top: var(--wp--preset--spacing--30) !important; }
.folio-interests p.is-style-chip { background: transparent; border: 1px solid var(--wp--preset--color--line); }
.folio-links a { text-decoration: none; border-bottom: 1px solid var(--wp--preset--color--line); padding-bottom: 1px; }
.folio-links a:hover { border-color: currentColor; }

/* =========================================================
   Home — numbers, mini lists, timeline
   ========================================================= */

.folio-stat {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2.75rem, 2rem + 2.5vw, 4rem) !important;
	line-height: 0.9 !important;
	letter-spacing: -0.04em;
	font-weight: 300;
}

.mini-list { list-style: none; padding: 0 !important; margin: 0; font-size: var(--wp--preset--font-size--small); }
.mini-list li { display: flex; gap: 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--wp--preset--color--line); }
.mini-list li:first-child { border-top: 0; }
.mini-list li strong { font-weight: 600; min-width: 2.6rem; color: var(--wp--preset--color--muted); }

.timeline-mini > * { margin: 0 !important; }
.timeline-mini .tl {
	position: relative;
	padding: 0 0 1.1rem 1.4rem;
	border-left: 1px solid var(--wp--preset--color--line);
	margin-left: 5px !important;
}
.timeline-mini .tl:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-mini .tl::before {
	content: "";
	position: absolute;
	left: -6px;
	top: 0.3rem;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--wp--preset--color--card);
	border: 2px solid var(--wp--preset--color--forest);
	box-sizing: border-box;
}
.timeline-mini .tl:first-child::before { background: var(--wp--preset--color--forest); }
.timeline-mini .tl > * { margin: 0 !important; }

/* =========================================================
   Home — research visual, designs fan, CV
   ========================================================= */

.folio-visual {
	position: absolute !important;
	right: clamp(1rem, 3vw, 2.5rem);
	bottom: clamp(1rem, 2.5vw, 2rem);
	width: 44%;
	margin: 0 !important;
	pointer-events: none;
}
.folio-visual img { width: 100%; height: auto; display: block; }
.has-visual .push { max-width: 50%; }
@media (max-width: 640px) {
	.folio-visual { position: static !important; width: 100%; margin-top: 0.5rem !important; }
	.has-visual .push { max-width: none; }
}

.folio-fan {
	display: flex !important;
	justify-content: center;
	padding-top: 0.75rem;
}
.folio-fan figure {
	margin: 0 -14px !important;
	width: 38%;
	max-width: 110px;
	transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.folio-fan img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 16px;
	border: 3px solid var(--wp--preset--color--card);
	box-shadow: 0 10px 22px -12px rgba(30,27,22,.45);
	display: block;
}
.folio-fan figure:nth-child(1) { transform: rotate(-9deg) translateY(8px); }
.folio-fan figure:nth-child(2) { transform: translateY(-4px); z-index: 1; }
.folio-fan figure:nth-child(3) { transform: rotate(9deg) translateY(8px); }
.is-style-card-link:hover .folio-fan figure:nth-child(1) { transform: rotate(-14deg) translate(-10px, 4px); }
.is-style-card-link:hover .folio-fan figure:nth-child(3) { transform: rotate(14deg) translate(10px, 4px); }

.folio-cv-sheet {
	position: absolute !important;
	right: 16px;
	bottom: -18px;
	margin: 0 !important;
	width: 64px;
	aspect-ratio: 3 / 4;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	box-shadow: 0 14px 26px -18px rgba(30,27,22,.5);
	padding: 0 !important;
	box-sizing: border-box;
	transform: rotate(8deg);
	transition: transform .5s cubic-bezier(.2,.8,.2,1);
	background-image:
		linear-gradient(var(--wp--preset--color--ink), var(--wp--preset--color--ink)),
		linear-gradient(var(--wp--preset--color--line), var(--wp--preset--color--line)),
		repeating-linear-gradient(to bottom, var(--wp--preset--color--chip) 0 5px, transparent 5px 12px);
	background-size: 60% 4px, 38% 3px, 76% 60%;
	background-position: 8px 9px, 8px 17px, 8px 27px;
	background-repeat: no-repeat;
}
.is-style-card-link:hover .folio-cv-sheet { transform: rotate(0deg) translateY(-8px); }
.folio-cv::after { display: none; }
.folio-cv p.is-style-label { max-width: 100%; }

/* =========================================================
   Home — thoughts (latest posts)
   ========================================================= */

.folio-thoughts .wp-block-post-template { margin: 0; padding: 0; }
.folio-thoughts .wp-block-post {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	padding: 0.7rem 0;
	border-top: 1px solid var(--wp--preset--color--line);
	margin: 0 !important;
}
.folio-thoughts .wp-block-post-date { flex: none; min-width: 5.5rem; }
.folio-thoughts .wp-block-post-title { margin: 0; }
.folio-thoughts .wp-block-post-title a { text-decoration: none; }
.folio-thoughts .wp-block-post-title a:hover { text-decoration: underline; }

/* =========================================================
   Contact box and page (Cover block)
   ========================================================= */

.wp-block-cover.folio-contact {
	min-height: 290px;
	height: 100%;
	border-radius: var(--wp--custom--radius--card, 28px);
	padding: clamp(1.25rem, 2.6vw, 2rem);
	align-items: stretch;
	overflow: hidden;
	color: #fff;
}
.folio-contact .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	position: static;
	color: #fff;
}
.folio-contact .wp-block-cover__inner-container > * { margin-block: 0; }
.folio-contact p.is-style-label { background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(8px); }
.folio-contact :where(h1,h2,h3) { color: #fff; line-height: 1.02; }
.folio-contact p { color: rgba(255,255,255,.92); }

.folio-contact-page {
	max-width: 440px;
	margin-inline: auto !important;
}
.folio-contact-page .wp-block-cover.folio-contact { min-height: 480px; }
.folio-contact-page .folio-contact::before { display: none; }
.folio-contact-page .folio-contact:hover { transform: none; }

/* Dock of contact actions under the contact card */
.folio-dock {
	width: fit-content;
	margin: 1rem auto 0 !important;
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 6px !important;
	gap: 6px !important;
	align-items: center;
	box-shadow: 0 14px 30px -22px rgba(30,27,22,.4);
}
.folio-dock > * { margin: 0 !important; }
.folio-dock figure a {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--wp--preset--color--chip);
	transition: background .2s ease, transform .2s ease;
}
.folio-dock figure a:hover { background: var(--wp--preset--color--ochre); transform: translateY(-2px); }
.folio-dock img { width: 20px !important; height: 20px !important; }

/* =========================================================
   Icon tiles (About page "Tools")
   ========================================================= */

.folio-tiles {
	display: grid !important;
	grid-template-columns: repeat(3, 64px);
	gap: 10px;
	justify-content: center;
	margin-block: auto !important;
	padding-block: 1rem;
}
.folio-tiles > * { margin: 0 !important; }
.folio-tiles figure { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--wp--preset--color--chip); }
.folio-tiles img { width: 24px !important; height: 24px !important; }
.folio-tiles figcaption { display: none; }

/* Portrait card on the About page and photo box on the home page */
.folio-portrait, .folio-photo { padding: 10px !important; }
.folio-portrait figure, .folio-photo figure { margin: 0 !important; height: 100%; }
.folio-portrait img, .folio-photo img {
	width: 100%;
	height: 100%;
	min-height: 420px;
	object-fit: cover;
	border-radius: calc(var(--wp--custom--radius--card, 28px) - 8px);
	display: block;
}

/* =========================================================
   Inner-page header, title, footer
   ========================================================= */

.folio-header { padding-top: clamp(1rem, 3vw, 2rem); gap: 1rem; }
.folio-header .wp-block-site-title { font-family: var(--wp--preset--font-family--display); }
.folio-header .wp-block-site-title a { text-decoration: none; }
.folio-back a,
.folio-nav .wp-block-navigation-item__content {
	display: inline-block;
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 0.45em 1em;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
	transition: background .2s ease;
}
.folio-back a:hover,
.folio-nav .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--chip); color: inherit; }
.folio-nav .current-menu-item > .wp-block-navigation-item__content { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--card); }
.folio-nav .wp-block-navigation__container { gap: 0.4rem !important; }

.folio-title { margin-bottom: var(--wp--preset--spacing--40) !important; }
.folio-title .wp-block-post-title { margin: 0; }

.folio-footer { padding-block: 1rem 2.5rem; }
.folio-footer p { margin: 0; }

/* =========================================================
   Reading card (CV, long text) & publications
   ========================================================= */

.folio-sheet {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card, 28px);
	padding: clamp(1.25rem, 5vw, 4rem);
}

.pub {
	display: grid !important;
	grid-template-columns: 4.75rem minmax(0, 1fr);
	column-gap: 1.25rem;
	padding-block: 1.4rem;
	border-top: 1px solid var(--wp--preset--color--line);
}
.pub > * { grid-column: 2; margin: 0 !important; }
.pub > .pub-year { grid-column: 1; grid-row: 1 / span 6; align-self: start; }
.pub-type { font-size: var(--wp--preset--font-size--x-small) !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--forest); }
.pub-title { font-weight: 400; line-height: 1.3; margin-top: .2rem !important; }
.pub-title a { text-decoration: none; }
.pub-title a:hover { text-decoration: underline; }
.pub-authors strong { color: var(--wp--preset--color--ink); font-weight: 700; }
.pub .wp-block-buttons { margin-top: 0.8rem !important; gap: 0.4rem; }
.pub .wp-block-button__link { padding: 0.35em 0.9em; font-size: var(--wp--preset--font-size--x-small); }
@media (max-width: 640px) {
	.pub { grid-template-columns: minmax(0, 1fr); row-gap: .35rem; }
	.pub > *, .pub > .pub-year { grid-column: 1; grid-row: auto; }
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--line);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--card);
	border-color: var(--wp--preset--color--ink);
}

.row {
	display: grid !important;
	grid-template-columns: 9.5rem minmax(0, 1fr);
	column-gap: 1.5rem;
	padding-block: 1rem;
	border-top: 1px solid var(--wp--preset--color--line);
}
.row > * { margin: 0 !important; grid-column: 2; }
.row > :first-child { grid-column: 1; grid-row: 1 / span 4; }
@media (max-width: 640px) {
	.row { grid-template-columns: minmax(0, 1fr); }
	.row > *, .row > :first-child { grid-column: 1; grid-row: auto; }
}

/* Designs gallery cards */
.design-card { padding: 10px !important; }
.design-card figure { margin: 0 !important; flex: 1 1 auto; display: flex; }
.design-card img { width: 100% !important; height: clamp(200px, 22vw, 300px) !important; object-fit: cover; border-radius: calc(var(--wp--custom--radius--card, 28px) - 8px); display: block; }
.design-card .push { margin-top: 0 !important; }
.design-card .push { padding: 0.6rem 0.75rem 0.5rem; }

/* Posts list (Thoughts page) */
.folio-posts .wp-block-post-template { gap: var(--wp--custom--gap, 16px); }
.folio-posts .wp-block-post { margin: 0; }

::selection { background: color-mix(in srgb, var(--wp--preset--color--ochre) 45%, transparent); }
:focus-visible { outline: 2px solid var(--wp--preset--color--forest); outline-offset: 3px; }

/* =========================================================
   Home — publications covers, short CV, skills & software
   ========================================================= */

.folio-covers figure { width: 36%; max-width: 120px; }
.folio-covers img { aspect-ratio: 3 / 4; border-radius: 10px; }
.folio-covers { padding-block: 1.25rem 0.5rem; }

.folio-cv { justify-content: space-between; }
.folio-cv { padding: 1.25rem 1.5rem !important; }
.folio-cv h2 { margin-top: auto !important; padding-right: 72px !important; font-size: 1.35rem !important; }

.folio-skills { gap: 1.25rem 2rem !important; align-items: flex-start; }
.folio-skill-col { flex: 1 1 240px; min-width: 0; }
.folio-skill-col > * { margin: 0 !important; }
.folio-skill-col > * + * { margin-top: 0.75rem !important; }
.folio-skill-col h3 {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.folio-tools {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px 8px;
}
.folio-tools > * { margin: 0 !important; }
.folio-tools figure { display: flex; flex-direction: column; align-items: center; text-align: center; }
.folio-tools img { width: 44px !important; height: 44px !important; border-radius: 12px; transition: transform .25s ease; }
.folio-tools figure:hover img { transform: translateY(-3px) rotate(-4deg); }
.folio-tools figcaption {
	margin: 0.35rem 0 0 !important;
	font-size: 0.7rem;
	line-height: 1.2;
	color: var(--wp--preset--color--muted);
	max-width: 100%;
	overflow-wrap: anywhere;
}

.timeline-mini.is-top { margin-top: 1.25rem !important; padding-top: 0; }

/* Achievements */
.awards > * { margin: 0 !important; }
.awards > * + * { margin-top: 0.9rem !important; }
.award { gap: 0.8rem !important; }
.award figure { margin: 0 !important; flex: none; }
.award img {
	width: 38px !important;
	height: 38px !important;
	padding: 8px;
	box-sizing: border-box;
	border-radius: 12px;
	background: color-mix(in srgb, var(--wp--preset--color--coral) 14%, var(--wp--preset--color--card));
}
.award-text > * { margin: 0 !important; }
.awards.is-top { margin-top: 1.25rem !important; }

/* Achievements page cards */
.award-card img.award-icon, .award-card figure img {
	width: 48px !important;
	height: 48px !important;
	padding: 11px;
	box-sizing: border-box;
	border-radius: 14px;
	background: var(--wp--preset--color--chip);
}
.award-card figure { margin: 0 0 0.5rem !important; }

/* =========================================================
   Horizontal (landscape) box layouts
   ========================================================= */

.folio-photo img { min-height: 0 !important; }
.folio-grid > .folio-photo { min-height: 280px; }

.folio-intro > * { margin: 0 !important; }
.folio-intro > * + * { margin-top: 0.6rem !important; }
.folio-intro .folio-name { font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.4rem) !important; }
.folio-intro .folio-links { margin-top: 1rem !important; color: var(--wp--preset--color--muted); }

/* Text on the left, picture on the right */
.split { gap: 1.25rem !important; align-items: flex-end; }
.split-text { flex: 1 1 50%; min-width: 0; }
.split-text > * { margin: 0 !important; }
.split-text > * + * { margin-top: 0.4rem !important; }
.split-art { flex: 0 1 48%; min-width: 0; }
.split-art > * { margin: 0 !important; }
.split-art .folio-fan { padding: 0; }
.split-art figure img { display: block; }
.split-art > figure img { width: 100%; height: auto; }

/* Horizontal timeline */
.htl {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1rem !important;
}
.htl > * { margin: 0 !important; }
.hstep {
	position: relative;
	padding-top: 1.1rem;
	border-top: 1px solid var(--wp--preset--color--line);
}
.hstep::before {
	content: "";
	position: absolute;
	top: -6px;
	left: 0;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	box-sizing: border-box;
	background: var(--wp--preset--color--card);
	border: 2px solid var(--wp--preset--color--forest);
}
.hstep:first-child::before { background: var(--wp--preset--color--forest); }
.hstep > * { margin: 0 !important; }
.hstep > * + * { margin-top: 0.2rem !important; }

/* Achievements in a row */
.hawards {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1rem !important;
}
.hawards > * { margin: 0 !important; }
.haward > * { margin: 0 !important; }
.haward > * + * { margin-top: 0.2rem !important; }
.haward figure { margin-bottom: 0.5rem !important; }
.haward img {
	width: 36px !important;
	height: 36px !important;
	padding: 8px;
	box-sizing: border-box;
	border-radius: 11px;
	background: color-mix(in srgb, var(--wp--preset--color--coral) 14%, var(--wp--preset--color--card));
}

/* Wide, short CV and contact */
.folio-cv .cv-text > * { margin: 0 !important; }
.folio-cv .cv-text h2 { padding-right: 0 !important; }
.folio-cv .folio-cv-sheet { right: 40px; width: 72px; }
.wp-block-cover.folio-contact.short { min-height: 132px; }
.contact-row { gap: 0.5rem 1.5rem !important; align-items: baseline; }
.contact-row > * { margin: 0 !important; }

@media (max-width: 640px) {
	.split { flex-wrap: wrap !important; }
	.split-text, .split-art { flex-basis: 100%; }
	.split-art { order: -1; }
	.htl, .hawards { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
}

/* =========================================================
   Bento pattern extras (tints, dark box, strips)
   ========================================================= */

.tint-forest { background: color-mix(in srgb, var(--wp--preset--color--forest) 7%, var(--wp--preset--color--card)) !important; }
.tint-ochre  { background: color-mix(in srgb, var(--wp--preset--color--ochre) 16%, var(--wp--preset--color--card)) !important; }

/* Dark box (Thoughts) */
.folio-dark {
	background: var(--wp--preset--color--ink) !important;
	border-color: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--card);
}
.folio-dark p.is-style-label { background: rgba(255,255,255,.12); color: var(--wp--preset--color--card); }
.folio-dark :where(h1,h2,h3) { color: var(--wp--preset--color--card); }
.folio-dark a { color: var(--wp--preset--color--card); }
.folio-dark a:hover { color: var(--wp--preset--color--ochre); }
.folio-thoughts-stack .wp-block-post {
	display: block;
	padding: 0.8rem 0;
	border-top: 1px solid rgba(255,255,255,.14);
}
.folio-thoughts-stack .wp-block-post-date { color: rgba(251,250,246,.6); margin-bottom: 0.2rem; }
.folio-thoughts-stack .wp-block-post-title { line-height: 1.3; }
.folio-dark > p:last-child { margin-top: 0.6rem !important; }

/* Strips (short, wide boxes) */
.folio-strip { padding: 1.1rem 1.5rem !important; justify-content: center; }
.folio-strip::after { top: 50%; margin-top: -19px; }
.awards-strip { gap: 0.75rem 1.25rem !important; padding-right: 3rem; width: 100%; box-sizing: border-box; }
.awards-strip > * { margin: 0 !important; }
.strip-head > * { margin: 0 !important; }
.strip-head > * + * { margin-top: 0.4rem !important; }
.strip-head h2 { padding-right: 0 !important; }
.award-inline { gap: 0.6rem !important; align-items: center; }
.award-inline figure { margin: 0 !important; flex: none; }
.award-inline img {
	width: 36px !important;
	height: 36px !important;
	padding: 8px;
	box-sizing: border-box;
	border-radius: 11px;
	background: var(--wp--preset--color--card);
}
.award-inline .award-text > * { margin: 0 !important; line-height: 1.3; }

/* Bigger design fan in tall box */
.folio-fan-lg figure { width: 42%; max-width: 140px; }
.folio-fan-lg { padding-block: 1.5rem 0.5rem; }

/* Photo fills its tall box */
.folio-photo { min-height: 0; }
.folio-photo figure { height: 100%; }
.folio-photo img { height: 100% !important; min-height: 380px !important; }

/* Research visual sits higher in the tinted box */
.tint-forest .folio-visual { bottom: auto; top: clamp(2.5rem, 4vw, 3.5rem); width: 46%; }

@media (max-width: 640px) {
	.folio-strip { padding: 1.25rem !important; }
	.awards-strip { padding-right: 0; }
	.folio-strip::after { top: clamp(1rem, 2.4vw, 1.6rem); margin-top: 0; }
	.tint-forest .folio-visual { position: static !important; width: 100%; }
}

/* fine-tuning */
.folio-cv .folio-cv-sheet { right: 18px !important; width: 60px !important; }
.folio-cv h2 { padding-right: 70px !important; }
@media (max-width: 1080px) {
	.folio-dark { grid-column: 1 / -1; }
}
.folio-strip::after { display: none; }
.awards-strip { padding-right: 0 !important; flex-wrap: nowrap !important; }
@media (max-width: 640px) { .awards-strip { flex-wrap: wrap !important; } }
