/* Job theme overrides */

/* Accent palette — from jobeograd.org menu underlines; reuse via loops later */
:root {
	--job-color-1: #ad7193; /* mauve */
	--job-color-2: #e85e02; /* orange */
	--job-color-3: #4193d1; /* blue */
	--job-color-4: #5cbecc; /* teal */
	--job-color-5: #ffd30f; /* yellow */
}

body {
	background: whitesmoke;
}

.page-header {
	margin-bottom: 1rem;
}

.page-content p {
	color: #666;
}

.footer-top {
	font-size: .8rem;
	color: #ccc;
}

.footer-top a {
	display: block;
	color: #ccc;
}

.footer-top a:hover {
	color: #fff;
}

.footer-logos {
	width: 60%;
	margin: 1em auto 0;
	align-items: center;
}

@media (max-width: 768px) {
	.footer-logos {
		grid-template-columns: repeat(2, 1fr);
	}
}

.posts .post {
	padding: 1em;
	background: #fff;
	box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
}

.posts .post a {
	text-decoration: none;
}

.posts .post a:hover {
	text-decoration: underline;
}

/* Accent line under each post title — cycles job-color-* in order */
.posts .post h3::after {
	content: '';
	display: block;
	width: 60%;
	height: 4px;
	margin-top: 0.4em;
	background: var(--job-color-1);
	transform-origin: left center;
}

/*
 * Grow L→R as the post enters the viewport (no JS).
 * Timeline is on .post (not ::after) — view() on pseudo-elements is unreliable in Chrome.
 * Posts already fully on screen at load skip the visible scrub; scroll ones into view to see it.
 */
@supports (animation-timeline: view()) {
	.posts .post {
		view-timeline-name: --post-enter;
		view-timeline-axis: block;
	}

	.posts .post h3::after {
		transform: scaleX(0);
		animation: post-title-line linear both;
		animation-timeline: --post-enter;
		animation-range: entry 0% cover 30%;
	}
}

@keyframes post-title-line {
	to {
		transform: scaleX(1);
	}
}

.posts .post:nth-child(5n + 1) h3::after {
	background: var(--job-color-1);
}

.posts .post:nth-child(5n + 2) h3::after {
	background: var(--job-color-2);
}

.posts .post:nth-child(5n + 3) h3::after {
	background: var(--job-color-3);
}

.posts .post:nth-child(5n + 4) h3::after {
	background: var(--job-color-4);
}

.posts .post:nth-child(5n + 5) h3::after {
	background: var(--job-color-5);
}

/* Colored underline under each top-level nav item (not header icon tools) */
body > header .header-nav > ul > li {
	border-bottom: 3px solid var(--job-color-1);
	padding-bottom: 0.15em;
}

body > header .header-nav > ul > li:nth-child(5n + 1) {
	border-bottom-color: var(--job-color-1);
}

body > header .header-nav > ul > li:nth-child(5n + 2) {
	border-bottom-color: var(--job-color-2);
}

body > header .header-nav > ul > li:nth-child(5n + 3) {
	border-bottom-color: var(--job-color-3);
}

body > header .header-nav > ul > li:nth-child(5n + 4) {
	border-bottom-color: var(--job-color-4);
}

body > header .header-nav > ul > li:nth-child(5n + 5) {
	border-bottom-color: var(--job-color-5);
}

/* Same cycle in the mobile drawer */
body > header .header-drawer-nav > ul > li {
	border-bottom: 3px solid var(--job-color-1);
}

body > header .header-drawer-nav > ul > li:nth-child(5n + 1) {
	border-bottom-color: var(--job-color-1);
}

body > header .header-drawer-nav > ul > li:nth-child(5n + 2) {
	border-bottom-color: var(--job-color-2);
}

body > header .header-drawer-nav > ul > li:nth-child(5n + 3) {
	border-bottom-color: var(--job-color-3);
}

body > header .header-drawer-nav > ul > li:nth-child(5n + 4) {
	border-bottom-color: var(--job-color-4);
}

body > header .header-drawer-nav > ul > li:nth-child(5n + 5) {
	border-bottom-color: var(--job-color-5);
}
