/* Page headers, rows, year groups, topics, shelves, series, cards, empty states. */

.jb-page-header {
	margin-bottom: 2rem;
}

.jb-page-header h1 {
	margin: 0 0 0.5rem;
}

.jb-lede {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

.jb-muted {
	color: var(--wp--preset--color--muted);
}

.jb-empty {
	padding: 1rem 1.25rem;
	border: 1px dashed var(--wp--preset--color--border);
	border-radius: 8px;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--sm);
}

.jb-pill {
	display: inline-block;
	padding: 0.05rem 0.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	white-space: nowrap;
}

a.jb-pill {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

a.jb-pill:hover {
	border-color: var(--wp--preset--color--accent);
}

.jb-tags {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.jb-tag {
	padding: 0.05rem 0.4rem;
	border-radius: 4px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--xs);
	text-decoration: none;
}

.jb-tag:hover {
	text-decoration: underline;
}

.jb-cat-row {
	display: flex;
	gap: 0.6rem;
	margin-bottom: 1.25rem;
}

.jb-cat {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	background: var(--wp--preset--color--surface);
}

.jb-cat:hover {
	border-color: var(--wp--preset--color--accent);
}

.jb-cat svg,
.jb-row-icon svg {
	width: 16px;
	height: 16px;
	image-rendering: pixelated;
}

.jb-cat-tech { color: var(--jb-c-sky); }
.jb-cat-projects { color: var(--jb-c-amber); }
.jb-cat-ai { color: var(--jb-c-purple); }
.jb-cat-gaming { color: var(--jb-c-red); }
.jb-cat-learning { color: var(--jb-c-pink); }
.jb-cat-travel { color: var(--jb-c-teal); }
.jb-cat-life { color: var(--jb-c-green); }

.jb-search {
	max-width: 22rem;
	margin-bottom: 2.5rem;
}

.jb-search input[type="search"] {
	width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font: inherit;
	font-size: var(--wp--preset--font-size--sm);
}

.jb-search input[type="search"]:focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 1px;
}

.jb-year {
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.jb-year:last-child {
	border-bottom: 0;
}

.jb-year-head,
.jb-shelf-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.jb-year-head h2,
.jb-shelf-head h2 {
	margin: 0;
}

.jb-rows {
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.jb-row {
	display: grid;
	grid-template-columns: 1.5rem minmax(0, 1fr) auto;
	gap: 0.75rem;
	align-items: start;
	padding: 0.5rem 0;
}

/* Icon and tags share the title's first line box, so they centre on it even when the title wraps. */
.jb-row {
	--jb-row-line: 1.5em;
}

.jb-row-icon {
	display: inline-flex;
	align-items: center;
	height: var(--jb-row-line);
}

.jb-row-main {
	display: flex;
	flex-direction: column;
}

.jb-row-title {
	color: var(--wp--preset--color--text);
	font-weight: 600;
	line-height: var(--jb-row-line);
	text-decoration: none;
}

.jb-row-title:hover {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.jb-row time,
.jb-series-parts time {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--xs);
}

.jb-row-tags {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-height: var(--jb-row-line);
	max-width: 14rem;
}

.jb-row-tags .jb-tags {
	justify-content: flex-end;
}

.jb-topics .jb-letter {
	margin-bottom: 1.5rem;
}

.jb-letter h2 {
	margin: 0 0 0.75rem;
	font-size: var(--wp--preset--font-size--lg);
}

.jb-topic-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
	gap: 0.6rem;
}

.jb-topic,
.jb-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--accent);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--sm);
}

.jb-topic:hover,
.jb-card:hover {
	border-color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.jb-shelf {
	padding-bottom: 2rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.jb-shelf-posts {
	columns: 2 18rem;
	column-gap: 2.5rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--md);
}

.jb-shelf-posts li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
	break-inside: avoid;
}

.jb-shelf-posts .jb-row-icon {
	padding-top: 0;
}

.jb-shelf-posts .jb-row-icon svg {
	width: 18px;
	height: 18px;
}

.jb-shelf-posts a {
	color: var(--wp--preset--color--text);
	font-weight: 600;
	text-decoration: none;
}

.jb-shelf-posts a:hover {
	color: var(--wp--preset--color--accent);
}

.jb-shelf-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: 0.75rem;
}

.jb-shelf-card {
	flex-direction: column;
	align-items: stretch;
	color: var(--wp--preset--color--text);
}

.jb-card-head {
	display: flex;
	justify-content: space-between;
}

.jb-card-title {
	font-weight: 700;
}

.jb-card-text {
	color: var(--wp--preset--color--muted);
	line-height: 1.6;
}

.jb-shelf-card .jb-count {
	color: var(--wp--preset--color--accent);
}

.jb-series-count {
	margin: 0 0 0.25rem;
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--sm);
}

.jb-series-parts {
	padding-left: 1.5rem;
}

.jb-series-parts li {
	padding: 0.4rem 0;
}

.jb-series-parts li time {
	float: right;
}

.jb-series-index {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jb-series-index li {
	display: flex;
	flex-direction: column;
	padding: 0.5rem 0;
	font-size: var(--wp--preset--font-size--sm);
}

@media (max-width: 640px) {
	.jb-row {
		grid-template-columns: 1.5rem minmax(0, 1fr);
	}

	.jb-row-tags {
		grid-column: 2;
		justify-content: flex-start;
	}

	.jb-row-tags .jb-tags {
		justify-content: flex-start;
	}
}

.jb-section-title {
	margin: 2.5rem 0 1rem;
	font-size: var(--wp--preset--font-size--lg);
}

.jb-section-title.has-icon {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.jb-section-icon {
	display: inline-flex;
	flex: 0 0 auto;
}

.jb-section-icon svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.jb-page-header + .jb-section-title {
	margin-top: 2rem;
}

/* Home */

.jb-hero {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2rem;
	margin-bottom: 1rem;
}

.jb-hero h1 {
	margin: 0 0 0.75rem;
}

.jb-hero .jb-lede {
	color: var(--wp--preset--color--text);
	font-size: 20px;
}

.jb-avatar {
	flex: 0 0 auto;
	width: 160px;
	height: 160px;
	image-rendering: pixelated;
}

.jb-timeline {
	margin-top: 2rem;
}

.jb-timeline-title {
	margin: 0 0 0.9rem;
	font-size: 16px;
}

.jb-timeline ol {
	display: grid;
	gap: 0.85rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jb-timeline-item {
	display: grid;
	grid-template-columns: 7.5rem minmax(0, 1fr);
	gap: 1rem;
	font-size: 16px;
	line-height: 1.6;
}

.jb-timeline-when {
	color: var(--wp--preset--color--accent);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.6;
}

.jb-timeline-text {
	color: var(--wp--preset--color--text);
}

.jb-timeline-text strong {
	color: var(--wp--preset--color--accent);
}

.jb-timeline a {
	color: var(--wp--preset--color--accent);
	font-weight: 700;
	text-decoration: underline;
}

.jb-timeline-also {
	margin: 1.1rem 0 0;
	color: var(--wp--preset--color--text);
	font-size: 16px;
}

@media (max-width: 600px) {
	.jb-timeline-item {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.1rem;
	}
}

.jb-home-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin: 2.5rem 0 1rem;
}

.jb-home-head .jb-section-title {
	margin: 0;
}

.jb-home .jb-github .jb-section-title {
	margin-top: 2.5rem;
}

@media (max-width: 600px) {
	.jb-hero {
		flex-direction: column-reverse;
	}

	.jb-avatar {
		width: 96px;
		height: 96px;
	}
}

/* Pages (About, Now, Uses, Resume) */

.jb-page-content {
	font-size: 17px;
	line-height: 1.75;
}

.jb-page-content > h2 {
	margin: 2.75rem 0 0.75rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
	font-size: 1.5rem;
}

.jb-page-content > h3 {
	margin: 1.75rem 0 0.5rem;
	font-size: var(--wp--preset--font-size--lg);
}

.jb-page-content > h4 {
	margin: 1.25rem 0 0.25rem;
	font-size: 1rem;
	font-weight: 700;
}

.jb-page-content ul {
	padding-left: 2rem;
}

.jb-page-content li {
	margin: 0.25rem 0;
}

.jb-page-content li ul {
	margin: 0.25rem 0 0.5rem;
	padding-left: 1.25rem;
}

.jb-page-content li ul li::marker {
	color: var(--wp--preset--color--muted);
}

.jb-page-content li::marker {
	color: var(--wp--preset--color--accent);
}

/* About intro: text on the left, the photo on the right as tall as the text. */
.jb-page-content .jb-about-intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 2.5rem;
	align-items: stretch;
}

.jb-about-intro .jb-about-text > :first-child {
	margin-top: 0;
}

.jb-about-intro .jb-about-text > :last-child {
	margin-bottom: 0;
}

.jb-page-content .jb-about-avatar {
	position: relative;
	margin: 0;
	min-height: 220px;
}

.jb-page-content .jb-about-avatar img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 60%;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
}

@media (max-width: 700px) {
	.jb-page-content .jb-about-intro {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.jb-page-content .jb-about-avatar {
		order: -1;
		min-height: 0;
		aspect-ratio: 1;
	}
}

/* Resume header: name, role, then email | GitHub | portfolio on one line. */
.jb-resume-header h1 {
	margin: 0;
}

.jb-resume-role {
	margin: 0.35rem 0 0.75rem;
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

/* Items wrap whole; a divider that starts a line slides left of the box and is clipped. */
.jb-resume-contact {
	display: flex;
	flex-wrap: wrap;
	column-gap: 1.5rem;
	overflow: hidden;
	margin: 0;
	color: var(--wp--preset--color--muted);
}

/* Whole items move to the next line; one too long for a line on its own wraps inside. */
.jb-resume-item {
	min-width: 0;
	overflow-wrap: anywhere;
}

.jb-resume-item + .jb-resume-item {
	margin-left: -1.5rem;
}

.jb-resume-sep {
	display: inline-block;
	width: 1.5rem;
	text-align: center;
	white-space: pre;
}

/* Resume experience: job, then each client with logo, dates, stack chips and tasks. */
.jb-exp-list {
	display: grid;
	gap: 2.5rem;
	margin-top: 1rem;
}

.jb-exp-head {
	display: flex;
	gap: 1rem;
	align-items: center;
}

/* Let long lines and the redaction bar wrap on phones instead of widening the page. */
.jb-exp,
.jb-exp-head > div {
	min-width: 0;
}

.jb-page-content .jb-exp-head p,
.jb-page-content .jb-exp-head h3,
.jb-page-content .jb-exp-head h4 {
	margin: 0;
}

.jb-exp-title {
	font-size: var(--wp--preset--font-size--lg);
}

.jb-exp-client-name {
	font-size: var(--wp--preset--font-size--md);
}

.jb-exp-company a {
	font-weight: 600;
}

.jb-exp-meta {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--sm);
}

.jb-exp-logo {
	display: grid;
	flex: none;
	place-items: center;
	width: 44px;
	height: 44px;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background: #fff;
}

.jb-exp-logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.jb-redacted {
	display: inline-block;
	width: var(--jb-redact, 12ch);
	max-width: 100%;
	height: 0.9em;
	border-radius: 3px;
	background: var(--wp--preset--color--text);
	vertical-align: -0.05em;
}

.jb-exp-logo-icon {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--accent);
}

.jb-exp-logo-icon svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.jb-exp-client {
	margin: 1.5rem 0 0 1.25rem;
	padding-left: 1.5rem;
	border-left: 2px solid var(--wp--preset--color--border);
}

.jb-exp-badge {
	margin-left: 0.5rem;
	padding: 0.05rem 0.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.7rem;
}

.jb-exp-badge.is-active {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.jb-page-content ul.jb-exp-stack {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0.9rem 0 0;
	padding: 0;
	list-style: none;
}

.jb-page-content .jb-exp-stack li {
	margin: 0;
	padding: 0.1rem 0.55rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
}

.jb-page-content ul.jb-exp-duties {
	margin: 0.9rem 0 0;
	font-size: 16px;
}

@media (max-width: 600px) {
	.jb-exp-client {
		margin-left: 0;
		padding-left: 1rem;
	}
}

/* Resume projects, and the smaller detail text under Projects, Skills and Education. */
.jb-resume-content > ul,
.jb-resume-content > p {
	font-size: 16px;
}

.jb-page-content .jb-rproj-head {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

.jb-rproj-name {
	font-size: var(--wp--preset--font-size--lg);
}

.jb-rproj-name a {
	color: var(--wp--preset--color--text);
}

.jb-rproj-role {
	font-weight: 600;
}

.jb-rproj-sub {
	font-size: var(--wp--preset--font-size--sm);
}

.jb-page-content .jb-rproj-tagline {
	margin: 0.4rem 0 0;
	font-size: 16px;
	font-style: italic;
}

.jb-page-content .jb-edu-line {
	margin: 0.2rem 0 0;
}

.jb-page-content .jb-edu-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0 1rem;
}

.jb-edu-head strong {
	font-size: 17px;
}

.jb-edu-date {
	color: var(--wp--preset--color--muted);
}

.jb-resume-content > p.jb-edu-note {
	font-size: 14px;
	color: var(--wp--preset--color--muted);
}

.jb-updated {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--sm);
}

.jb-page-content .jb-contact {
	display: grid;
	gap: 0.4rem;
	padding: 0;
	list-style: none;
}

.jb-contact li {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
}

.jb-contact-icon {
	display: inline-flex;
	color: var(--wp--preset--color--accent);
}

.jb-contact-icon svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* 404 */

.jb-404-code {
	margin: 0 0 0.25rem;
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 4rem;
	font-weight: 700;
	line-height: 1;
}

.jb-404-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.jb-404-links .jb-pill {
	padding: 0.3rem 0.8rem;
	font-size: var(--wp--preset--font-size--sm);
}
