/**
 * Theme Name:        Portfolio
 * Theme URI:         http://github.com/fai-sal/portfolio
 * Description:       FSE theme for iamfaisal.com — an editorial, flat, rule-based portfolio built entirely on core blocks.
 * Version:           1.0.0
 * Author:            Faisal Ahmed
 * Author URI:        https://iamfaisal.com/
 * Tags:              portfolio, blog, one-column, block-patterns, block-styles, full-site-editing, editor-style, style-variations
 * Text Domain:       portfolio
 * Domain Path:       /assets/lang
 * Tested up to:      7.1.1
 * Requires at least: 7.1.1
 * Requires PHP:      8.3
 * License:           GNU General Public License v2.0 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 */

/*
 * Nearly all styling lives in theme.json. Each rule below is here because
 * theme.json cannot express it (custom grids, pseudo-elements, states).
 */

@keyframes fa-fade-up {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--inverse);
}

/* Skip link target should not show an outline when focused programmatically. */
main:focus { outline: none; }

/* ---------- Header: translucent + blurred (theme.json has no backdrop-filter or rgba presets) ---------- */
.fa-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}
.admin-bar .fa-header { top: var(--wp-admin--admin-bar--height, 32px); }
.fa-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }

/* ---------- Hero ---------- */
.fa-hero { animation: fa-fade-up 0.7s ease both; }
.fa-avatar {
	box-sizing: border-box;
	width: 56px !important;
	height: 56px;
	padding: 0 !important;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
/* Contact row: underlined links separated by a soft middle dot. */
.fa-contact a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding-bottom: 2px;
}
.fa-contact a:hover { color: var(--wp--preset--color--accent); border-bottom-color: currentColor; }
.fa-contact .fa-dot { color: #c9c4b6; }

/* ---------- Section title followed by a flex-filling hairline ---------- */
.fa-section-title {
	display: flex;
	align-items: baseline;
	gap: 16px;
}
.fa-section-title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--wp--preset--color--line);
}

/* ---------- Mono uppercase label (block style "Mono label") ---------- */
.is-style-label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* ---------- Experience rows: date gutter | company, role, stack ---------- */
.fa-job {
	display: grid !important;
	grid-template-columns: 200px 1fr;
	gap: 32px !important;
	padding: 26px 0;
	border-bottom: 1px solid var(--wp--preset--color--line-soft);
	margin-top: 0 !important;
}
.fa-job > *,
.fa-job > * > * { margin: 0 !important; }
.fa-dates {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--tiny);
	color: var(--wp--preset--color--muted);
	padding-top: 4px;
}
.fa-company {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.3;
	margin-bottom: 4px !important;
}
.fa-role {
	font-size: var(--wp--preset--font-size--base);
	font-weight: 500;
	color: var(--wp--preset--color--accent);
	margin-bottom: 8px !important;
}
.fa-stack {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	line-height: 1.5;
}

/* Pill link button ("All work →", "All posts →"). */
.fa-pill .wp-block-button__link {
	background: none;
	border: 1px solid var(--wp--preset--color--rule);
	color: var(--wp--preset--color--body);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	padding: 12px 24px;
	border-radius: 24px;
	cursor: pointer;
}
.fa-pill .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast);
	background: none;
}

/* ---------- Accent en-dash bullets (block style "Accent dash") ---------- */
.is-style-dash {
	list-style: none;
	padding-left: 0;
	margin-top: 0;
}
.is-style-dash > li {
	position: relative;
	padding-left: 16px;
}
.is-style-dash > li + li { margin-top: 6px; }
.is-style-dash > li::before {
	content: "\2013";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent);
}

/* ---------- Selected Work rows (reuse .fa-job): type tag in the date gutter ---------- */
.fa-job .fa-tag { padding-top: 5px; line-height: 1.5; }
.fa-work-desc { margin-bottom: 8px !important; line-height: 1.65; }
.fa-work-desc .wp-block-post-excerpt__excerpt { margin: 0; }
.fa-tag,
.fa-tag a {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}
.fa-stackline a { color: inherit; }

/* ---------- Skill chips (block style "Chip") ---------- */
.is-style-chip {
	margin: 0 !important;
	padding: 6px 14px;
	border-radius: 20px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--strong);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

/* ---------- List rows (writing, archives): date gutter + hover wash ---------- */
.fa-row {
	display: grid !important;
	grid-template-columns: 200px 1fr;
	gap: 32px !important;
	padding: 22px 0;
	border-bottom: 1px solid var(--wp--preset--color--line-soft);
	transition: background-color 0.15s ease;
}
.fa-row:hover { background: var(--wp--preset--color--wash); }
.fa-row > * { margin: 0 !important; }
.fa-row-body > * { margin: 0 !important; }
.fa-row-body .wp-block-post-title { margin-bottom: 4px !important; }
.fa-row-body .wp-block-read-more { display: inline-block; margin-top: 8px !important; }
.fa-row-body .wp-block-post-excerpt__excerpt { margin: 0; }

/* ---------- Footer ---------- */
.fa-footer .is-style-outline .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--inverse-line);
	color: var(--wp--preset--color--inverse);
	background: transparent;
	padding: 13px 27px;
	font-weight: 400;
}
.fa-footer .is-style-outline .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--inverse);
	background: transparent;
}
.fa-footer .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: var(--wp--preset--color--inverse);
	color: var(--wp--preset--color--contrast);
}

/* ---------- Pagination ---------- */
.wp-block-query-pagination a:hover { color: var(--wp--preset--color--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	.fa-header { position: static; padding-left: 20px !important; padding-right: 20px !important; }
	.fa-row, .fa-job { grid-template-columns: 1fr; gap: 6px !important; }
	.fa-contact .fa-dot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
