/*
Theme Name:   Pavel Astra Child
Description:  Child theme of Astra for pavel.se (CV front page and Publications blog).
Author:       Pavel Seraphimov
Template:     astra
Version:      1.4.0
Text Domain:  pavel-astra-child
*/

:root {
	--cv-ink: #1c2430;
	--cv-muted: #5b6573;
	--cv-accent: #1f4e79;
	--cv-rule: #e3e7ec;
	--cv-bg-soft: #f5f7fa;
}

/* ---------- CV front page ---------- */

.cv-section {
	max-width: 980px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem;
	color: var(--cv-ink);
}

.cv-section + .cv-section {
	border-top: 1px solid var(--cv-rule);
}

.cv-section h2.wp-block-heading {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cv-accent);
	margin: 0 0 1.5rem;
}

/* Hero */
.cv-hero-section {
	padding-top: 3.5rem;
}

.cv-hero {
	align-items: center !important;
	gap: 2.5rem;
}

.cv-photo img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(28, 36, 48, 0.15);
}

.cv-name {
	font-size: clamp(2.2rem, 5vw, 3.2rem);
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 0.4rem;
	color: var(--cv-ink);
}

.cv-headline {
	font-size: 1.08rem;
	line-height: 1.5;
	color: var(--cv-accent);
	font-weight: 600;
	margin: 0 0 0.75rem;
}

.cv-contact {
	font-size: 0.95rem;
	color: var(--cv-muted);
	margin: 0 0 1.25rem;
}

.cv-contact a {
	color: var(--cv-accent);
	text-decoration: none !important;
	border-bottom: 1px solid rgba(31, 78, 121, 0.3);
}

.cv-contact a:hover {
	border-bottom-color: var(--cv-accent);
}

/* LinkedIn link with the LinkedIn logo */
.cv-contact a.cv-linkedin {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	border-bottom: 0;
	text-decoration: none;
	color: #0a66c2;
	font-weight: 600;
}

.cv-contact a.cv-linkedin::before {
	content: "";
	width: 1.15em;
	height: 1.15em;
	flex: none;
	background: #0a66c2;
	border-radius: 3px;
	-webkit-mask: var(--cv-linkedin-logo) center / contain no-repeat;
	mask: var(--cv-linkedin-logo) center / contain no-repeat;
}

.cv-contact a.cv-linkedin:hover {
	color: #004182;
}

:root {
	--cv-linkedin-logo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.45 20.45h-3.56v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.14 1.45-2.14 2.94v5.67H9.35V9h3.41v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13zM7.12 20.45H3.56V9h3.56v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.73v20.54C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.73V1.73C24 .77 23.2 0 22.22 0z'/%3E%3C/svg%3E");
}

.cv-summary {
	font-size: 1.05rem;
	line-height: 1.7;
	margin: 0;
}

/* Entries */
h3.cv-org {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.25rem 1rem;
	font-size: 1.15rem;
	font-weight: 700;
	margin: 2rem 0 0.35rem;
	color: var(--cv-ink);
}

.cv-section h2 + h3.cv-org,
.cv-split .wp-block-column > h3.cv-org:first-child {
	margin-top: 0;
}

.cv-loc,
.cv-dates {
	font-size: 0.9rem;
	font-weight: 400;
	color: var(--cv-muted);
	white-space: nowrap;
}

.cv-role {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.25rem 1rem;
	margin: 1rem 0 0.35rem;
}

.cv-role strong {
	color: var(--cv-accent);
	font-weight: 600;
}

.cv-intro {
	color: var(--cv-muted);
	font-style: italic;
	margin: 0 0 0.5rem;
}

ul.cv-bullets {
	margin: 0 0 0.5rem 1.1rem;
	padding: 0;
}

ul.cv-bullets li {
	margin: 0 0 0.45rem;
	line-height: 1.6;
}

ul.cv-bullets li::marker {
	color: var(--cv-accent);
}

/* Education */
.cv-edu-text {
	margin: 0 0 0.5rem;
	line-height: 1.6;
}

ul.cv-courses {
	columns: 2;
	column-gap: 2rem;
	margin-top: 0.75rem;
}

ul.cv-courses li {
	break-inside: avoid;
}

@media (max-width: 781px) {
	ul.cv-courses {
		columns: 1;
	}
}

/* Side photos */
.cv-split {
	gap: 2.5rem;
}

.cv-side-photo img {
	width: 100%;
	border-radius: 10px;
	object-fit: cover;
}

@media (max-width: 781px) {
	.cv-hero {
		gap: 1.5rem;
	}

	/* On phones the portrait sits above the name. */
	.cv-hero > .wp-block-column:last-child {
		order: -1;
	}

	.cv-photo img {
		max-width: 320px;
		margin: 0 auto;
		display: block;
	}

	.cv-section {
		padding: 2rem 1.25rem;
	}

	.cv-side-photo img {
		max-height: 420px;
	}
}
