/**
 * PW Resume – frontend styles
 * Dual-column layout, timeline, skills, testimonials.
 */

/* -------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------- */
.pw-resume {
	--pw-resume-col-gap: 2rem;
	--pw-resume-timeline-width: 2px;
	--pw-resume-dot-size: 12px;
	--pw-resume-track-width: 4rem;
	/* Line center: all timeline elements (track, icons, dots) align to this */
	--pw-resume-line-center: 2rem;
	width: 100%;
	box-sizing: border-box;
}

.pw-resume__inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--pw-resume-col-gap);
	align-items: flex-start;
}

/* Section-row layout: each section is one row; next section starts after its skills/testimonials */
.pw-resume--section-rows {
	position: relative;
	width: 100%;
}

.pw-resume--section-rows .pw-resume__timeline-track--global {
	position: absolute;
	left: calc(var(--pw-resume-track-width, 4rem) / 2);
	top: 0;
	bottom: 0;
	width: var(--pw-resume-timeline-width);
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.12);
	border-radius: 2px;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

.pw-resume--section-rows .pw-resume__inner--section-rows {
	display: flex;
	flex-direction: column;
	gap: 0;
	flex-wrap: nowrap;
	width: 100%;
	min-width: 0;
	align-items: stretch;
}

/* Section row: wraps section content (per-item rows for alignment) */
.pw-resume--section-rows .pw-resume__section-row {
	display: block !important;
	min-width: 0;
	width: 100%;
}

/* Section content: flex column of header row + item rows */
.pw-resume__section-content {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
	width: 100%;
}

/* Header row and each item row: flex; mobile-first single column (stacked); two columns from 768px up */
.pw-resume__section-header-row,
.pw-resume__item-row {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: var(--pw-resume-col-gap);
	align-items: stretch;
	min-width: 0;
	width: 100%;
}

@media (min-width: 768px) {
	.pw-resume__section-header-row,
	.pw-resume__item-row {
		flex-direction: row;
		align-items: flex-start;
	}
}

.pw-resume__section-header-left,
.pw-resume__item-row-left {
	min-width: 0;
}

@media (min-width: 768px) {
	.pw-resume__section-header-left,
	.pw-resume__item-row-left {
		flex: var(--pw-resume-col-left-fr, 1) 1 0;
	}
}

.pw-resume__section-header-right {
	min-width: 0;
}

@media (min-width: 768px) {
	.pw-resume__section-header-right {
		flex: var(--pw-resume-col-right-fr, 1) 1 0;
	}
}

.pw-resume__item-row-right {
	min-width: 0;
	align-self: start;
}

@media (min-width: 768px) {
	.pw-resume__item-row-right {
		flex: var(--pw-resume-col-right-fr, 1) 1 0;
	}
}

/* Header-only and item-only sections: single row grid (track | content) inside the left cell */
.pw-resume__section--header-only,
.pw-resume__section--item-only {
	display: grid;
	grid-template-columns: var(--pw-resume-track-width) 1fr;
	align-items: start;
	gap: 0;
	min-width: 0;
	width: 100%;
}

/* Section divider: always show a line; Elementor Style tab can override color/width */
.pw-resume--section-rows .pw-resume__section-divider {
	display: block;
	width: 100%;
	min-width: 100%;
	min-height: 0;
	height: 0;
	margin: 1rem 0;
	box-sizing: border-box;
	flex: 0 0 auto;
	border-top: 1px solid rgba(0, 0, 0, 0.25);
	border-top-style: solid !important;
}

.pw-resume--order-row .pw-resume__inner {
	flex-direction: row;
}

.pw-resume--order-row-reverse .pw-resume__inner {
	flex-direction: row-reverse;
}

.pw-resume--order-row-reverse.pw-resume--section-rows .pw-resume__section-row {
	direction: rtl;
}

.pw-resume--order-row-reverse.pw-resume--section-rows .pw-resume__section-row > * {
	direction: ltr;
}

.pw-resume__col {
	flex: 1 1 100%;
	min-width: 0;
}

@media (min-width: 768px) {
	.pw-resume__col {
		flex: 1 1 calc(50% - var(--pw-resume-col-gap) / 2);
	}
}

/* Mobile: section divider and skills column padding */
@media (max-width: 767px) {
	.pw-resume--section-rows .pw-resume__section-divider {
		width: 100% !important;
		margin-left: 0 !important;
	}

	/* Align skills/testimonials with history: same left offset as timeline track */
	.pw-resume--section-rows .pw-resume__item-row-right.pw-resume__col--skills {
		padding-left: var(--pw-resume-track-width, 4rem);
		box-sizing: border-box;
	}

	.pw-resume--order-row-reverse.pw-resume--section-rows .pw-resume__section-row {
		direction: ltr;
	}
}

/* Mobile: stack vertically, History first */
@media (max-width: 767px) {
	.pw-resume__inner {
		flex-direction: column !important;
	}

	.pw-resume__col--skills {
		order: 2;
	}

	.pw-resume__col--history {
		order: 1;
	}
}

/* -------------------------------------------------------------------------
   Timeline: two-column grid so track, icons and dots share same column and stay centered
   ------------------------------------------------------------------------- */
.pw-resume__history {
	position: relative;
}

/* Track column = 4rem; content column = 1fr. Track is absolute in that column. */
.pw-resume__timeline {
	position: relative;
	--pw-resume-track-width: 4rem;
}

.pw-resume__timeline-track {
	position: absolute;
	left: calc(var(--pw-resume-track-width) / 2);
	top: 0;
	bottom: 0;
	width: var(--pw-resume-timeline-width);
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.12);
	border-radius: 2px;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

.pw-resume__timeline-fill {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 0%;
	transition: height 0.2s ease-out;
	will-change: height;
}

.pw-resume__timeline-body {
	position: relative;
	z-index: 1;
}

/* Section = grid: col1 = track (icons/dots), col2 = content. */
.pw-resume__section {
	display: grid;
	grid-template-columns: var(--pw-resume-track-width) 1fr;
	align-items: start;
	gap: 0;
}

.pw-resume__section:last-child .pw-resume__section-items {
	padding-bottom: 0;
}

/* Section header: its children become grid cells (icon | title) */
.pw-resume__section-header {
	display: contents;
}

.pw-resume__section-icon-wrap {
	grid-column: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--pw-resume-icon-size, 40px);
	height: var(--pw-resume-icon-size, 40px);
	justify-self: center;
	margin-top: 0.1em;
	z-index: 1;
}

.pw-resume__section-icon-box {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	line-height: 1;
	width: 100%;
	height: 100%;
}

/* Inner icon: centered in circle; contain so graphic doesn’t clip */
.pw-resume__section-icon-box i,
.pw-resume__section-icon-box svg {
	flex-shrink: 0;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pw-resume__section-icon-box i {
	width: 1em;
	height: 1em;
	font-size: inherit;
	line-height: 1;
}

.pw-resume__section-icon-box svg {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.pw-resume__section-icon-box.is-active {
	transform: scale(1.08);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.pw-resume__section-title {
	grid-column: 2;
	margin: 0;
	font-size: 1.25rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.pw-resume__section-header--no-icon {
	/* When no icon, title still in column 2; icon wrap is not rendered */
}

/* Section items: children flow as grid rows (dot, date-row, spacer, content per item) */
.pw-resume__section-items {
	display: contents;
}

/* Dot and date banner share one grid row; dot centers vertically with banner */
.pw-resume__timeline-dot-wrap {
	grid-column: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	justify-self: center;
	align-self: center;
	width: var(--pw-resume-dot-size);
	height: var(--pw-resume-dot-size);
	z-index: 1;
}

.pw-resume__history-date-row {
	grid-column: 2;
}

.pw-resume__timeline-dot-spacer {
	grid-column: 1;
}

.pw-resume__history-content {
	grid-column: 2;
	padding-bottom: 1.5rem;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
}

.pw-resume__section-items .pw-resume__history-content:last-child {
	padding-bottom: 0;
}

.pw-resume__timeline-dot {
	width: var(--pw-resume-dot-size);
	height: var(--pw-resume-dot-size);
	border-radius: 50%;
	background: #fff;
	border: 2px solid rgba(0, 0, 0, 0.2);
	box-sizing: border-box;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pw-resume__timeline-dot.is-active {
	transform: scale(1.15);
}

.pw-resume__date-banner {
	display: inline-block;
	padding: 0.25em 0.6em;
	margin-bottom: 0.35rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
}

/* Banner shapes: applied to date, skills, and testimonial banners */
.pw-resume--banner-rectangle .pw-resume__date-banner,
.pw-resume--banner-rectangle .pw-resume__skills-banner,
.pw-resume--banner-rectangle .pw-resume__testimonials-banner {
	border-radius: 4px !important;
}

.pw-resume--banner-pill .pw-resume__date-banner,
.pw-resume--banner-pill .pw-resume__skills-banner,
.pw-resume--banner-pill .pw-resume__testimonials-banner {
	border-radius: 9999px !important;
}

.pw-resume--banner-flag .pw-resume__date-banner,
.pw-resume--banner-flag .pw-resume__skills-banner,
.pw-resume--banner-flag .pw-resume__testimonials-banner {
	border-radius: 0 2em 2em 0 !important;
}

.pw-resume--banner-pennon .pw-resume__date-banner,
.pw-resume--banner-pennon .pw-resume__skills-banner,
.pw-resume--banner-pennon .pw-resume__testimonials-banner {
	border-radius: 0 !important;
	clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%) !important;
	-webkit-clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%) !important;
}

.pw-resume--banner-burgee .pw-resume__date-banner,
.pw-resume--banner-burgee .pw-resume__skills-banner,
.pw-resume--banner-burgee .pw-resume__testimonials-banner {
	border-radius: 0 !important;
	clip-path: polygon(0 0, calc(100% - 0.75em) 0, 100% 50%, calc(100% - 0.75em) 100%, 0 100%) !important;
	-webkit-clip-path: polygon(0 0, calc(100% - 0.75em) 0, 100% 50%, calc(100% - 0.75em) 100%, 0 100%) !important;
	padding-right: 1em !important;
}

.pw-resume__item-title {
	width: 100%;
	margin: 0 0 0.2em;
	font-size: 1.1rem;
	font-weight: 700;
}

.pw-resume__item-subtitle {
	width: 100%;
	margin: 0 0 0.5em;
	font-size: 0.9rem;
	opacity: 0.85;
}

/* Item thumbnail: left of description, square crop, top-aligned; size from Style tab */
.pw-resume__item-thumb {
	flex-shrink: 0;
	margin: 0 1em 0.5em 0;
	width: 120px;
	height: 120px;
	overflow: hidden;
	background: #eee;
}

.pw-resume__item-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.pw-resume__item-description {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.55;
}

/* When no thumbnail: use block layout so description stacks left under title/subtitle */
.pw-resume__history-content--no-thumb {
	display: block;
}

.pw-resume__history-content--no-thumb .pw-resume__item-title,
.pw-resume__history-content--no-thumb .pw-resume__item-subtitle,
.pw-resume__history-content--no-thumb .pw-resume__item-description {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.pw-resume__history-content--no-thumb .pw-resume__item-description {
	flex: none;
	width: 100%;
	text-align: left;
}

.pw-resume__history-content--no-thumb .pw-resume__item-description p {
	text-align: left;
}

.pw-resume__item-description p:first-child {
	margin-top: 0;
}

.pw-resume__item-description p:last-child {
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Skills section
   ------------------------------------------------------------------------- */
.pw-resume__skills {
	margin-bottom: 2rem;
}

.pw-resume__skills-banner {
	display: block;
	padding: 0.4em 0.75em;
	margin-bottom: 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
}

.pw-resume__skill {
	margin-bottom: 1rem;
}

.pw-resume__skill-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 0.35rem;
}

.pw-resume__skill-label {
	font-weight: 600;
	font-size: 0.95rem;
}

.pw-resume__skill-value {
	font-size: 0.85rem;
	opacity: 0.9;
}

.pw-resume__progress-bar {
	width: 100%;
	height: 8px;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	overflow: hidden;
}

.pw-resume__progress-fill {
	height: 100%;
	border-radius: 4px;
	transition: width 0.6s ease-out;
	will-change: width;
}

/* -------------------------------------------------------------------------
   Testimonials section
   ------------------------------------------------------------------------- */
.pw-resume__testimonials-banner {
	display: block;
	padding: 0.4em 0.75em;
	margin-bottom: 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
}

.pw-resume__testimonial-card {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 1rem;
	margin-bottom: 1rem;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 6px;
	box-sizing: border-box;
}

.pw-resume__testimonial-card:last-child {
	margin-bottom: 0;
}

.pw-resume__testimonial-image {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	background: #eee;
}

.pw-resume__testimonial-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pw-resume__testimonial-body {
	flex: 1;
	min-width: 0;
}

.pw-resume__testimonial-name {
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 0.15em;
}

.pw-resume__testimonial-title {
	font-size: 0.85rem;
	opacity: 0.85;
	margin-bottom: 0.5em;
}

.pw-resume__testimonial-quote {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	font-style: normal;
}
