:root {
	--primary: #0a2e56;
	--primary-dark: #061d38;
	--secondary: #29b6ff;
	--accent: #0f4f8a;
	--text: #263240;
	--muted: #5d6b7b;
	--sidebar-text: #ffffff;
	--bg-light: #f5f9fc;
	--card-border: rgba(10, 46, 86, 0.08);
	--card-shadow: 0 18px 40px rgba(10, 30, 60, 0.12);
}

* { box-sizing: border-box; }

body {
	font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
	margin: 0;
	padding: 28px;
	background:
		radial-gradient(circle at top left, rgba(41, 182, 255, 0.28), transparent 32%),
		linear-gradient(135deg, #edf4fb 0%, #dce8f3 100%);
	color: var(--text);
	line-height: 1.45;
}

.container {
	width: 210mm;
	min-height: 297mm;
	margin: 0 auto;
	background: #ffffff;
	display: grid;
	grid-template-columns: 25% 75%;
	border-radius: 24px;
	overflow: hidden;
	border: 1px solid rgba(255,255,255,0.8);
	box-shadow: 0 28px 65px rgba(10, 30, 60, 0.18);
}

.sidebar {
	background:
		linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0)) top / 100% 140px no-repeat,
		linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
	color: var(--sidebar-text);
	padding: 35px 16px;
}

.photo-container {
	width: 132px;
	height: 132px;
	border-radius: 50%;
	border: 4px solid rgba(41, 182, 255, 0.85);
	margin: 0 auto 26px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,0.12);
	box-shadow: 0 12px 24px rgba(0,0,0,0.28);
}

.photo-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.sidebar h2 {
	font-size: 9.8pt;
	color: var(--secondary);
	text-transform: uppercase;
	border-bottom: 1px solid rgba(41,182,255,0.35);
	padding-bottom: 6px;
	margin-top: 24px;
	letter-spacing: 1.2px;
}

.contact-line,
.edu-item,
.lang-container { font-size: 7.8pt; }

.contact-line {
	margin-bottom: 9px;
	word-wrap: break-word;
	color: rgba(255,255,255,0.92);
}

.contact-line a {
	color: #ffffff;
	text-decoration: none;
}

.contact-line a:hover { color: var(--secondary); text-decoration: underline; }

.cert-item {
	background: rgba(255,255,255,0.08);
	padding: 7px 8px;
	border-radius: 10px;
	margin-bottom: 7px;
	border: 1px solid rgba(41,182,255,0.16);
	border-left: 3px solid var(--secondary);
	font-size: 7.4pt;
	backdrop-filter: blur(2px);
}

.cert-item strong { display: block; color: #fff; }
.cert-link { color: var(--secondary); text-decoration: none; font-weight: 700; }
.cert-link:hover { text-decoration: underline; }

/* --- REVISED SCREEN VIEWS (PAGES 2 & 3 FIX) --- */
.page2-print-block, 
.page3-print-block { 
	display: block; 
	width: 100%;
}

.page2-left-pane, 
.page3-left-pane { 
	display: none !important; 
}

.page2-right-pane, 
.page3-right-pane { 
	width: 100% !important;
	padding: 0 !important;
}
/* --------------------------------------------- */

.sidebar-stacks-block { margin-top: 2px; }
.stack-category { margin-top: 11px; }
.stack-category h3 {
	font-size: 7.3pt;
	color: rgba(255,255,255,0.96);
	text-transform: uppercase;
	margin: 0 0 5px 0;
	opacity: 0.95;
	font-weight: 700;
	letter-spacing: 0.5px;
}

.tag-container { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
	background: rgba(15, 79, 138, 0.92);
	padding: 3px 6px;
	border-radius: 999px;
	font-size: 6.4pt;
	border: 1px solid rgba(41,182,255,0.45);
	white-space: nowrap;
	color: #fff;
}

.main {
	padding: 32px 28px 34px;
	background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.header-box {
	margin-bottom: 22px;
	padding: 22px 24px;
	background: linear-gradient(135deg, rgba(10,46,86,0.04), rgba(41,182,255,0.08));
	border: 1px solid rgba(41,182,255,0.18);
	border-radius: 20px;
	box-shadow: 0 16px 30px rgba(10, 46, 86, 0.08);
}

.header-box h1 {
	margin: 0;
	font-size: 25pt;
	color: var(--primary);
	text-transform: uppercase;
	letter-spacing: 1.5px;
	line-height: 1;
}

.header-box h3 {
	margin: 6px 0 10px;
	font-size: 12.8pt;
	color: var(--accent);
	font-weight: 700;
}

.header-box .exp-content {
	color: var(--text) !important;
	font-size: 9.3pt !important;
	font-weight: 500 !important;
	line-height: 1.55;
	text-align: left;
}

.section-title {
	font-size: 11.8pt;
	font-weight: 800;
	color: var(--primary);
	text-transform: uppercase;
	display: flex;
	align-items: center;
	margin: 22px 0 12px;
	letter-spacing: 0.8px;
}

.section-title::after {
	content: "";
	flex: 1;
	height: 2px;
	margin-left: 12px;
	background: linear-gradient(90deg, rgba(41,182,255,0.7), rgba(41,182,255,0));
}

.exp-item {
	margin-bottom: 14px;
	padding: 14px 16px 14px 18px;
	background: #ffffff;
	border-radius: 16px;
	border: 1px solid var(--card-border);
	border-left: 4px solid rgba(41,182,255,0.82);
	box-shadow: 0 10px 24px rgba(15, 54, 92, 0.07);
	page-break-inside: avoid;
	break-inside: avoid;
}

.exp-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 14px;
}

.role { font-size: 10.4pt; font-weight: 800; color: var(--primary); }

.date {
	font-size: 8pt;
	color: var(--muted);
	font-weight: 700;
	background: rgba(10,46,86,0.06);
	padding: 3px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

.company {
	font-size: 9.5pt;
	color: var(--accent);
	font-weight: 700;
	display: block;
	margin: 3px 0 6px;
}

.company a { color: inherit; text-decoration: none; }
.company a:hover { text-decoration: underline; }

.exp-content {
	font-size: 8.7pt;
	color: #3f4d5c;
	text-align: justify;
}

.exp-content ul { padding-left: 16px; margin: 6px 0 0; }
.exp-content li { margin-bottom: 4px; }

.edu-item { margin-bottom: 10px; color: rgba(255,255,255,0.94); }
.edu-item strong { color: var(--secondary); display: block; margin-bottom: 2px; }

.lang-container { line-height: 1.45; display: flex; flex-direction: column; gap: 8px; }
.lang-row { display: flex; align-items: flex-start; gap: 8px; }
.svg-flag { width: 18px; height: 13px; display: inline-block; border-radius: 2px; box-shadow: 0 0 1px rgba(0,0,0,0.3); margin-top: 3px; flex-shrink: 0; }

.lang-switcher {
	position: fixed;
	top: 16px;
	right: 24px;
	display: flex;
	gap: 8px;
	z-index: 1000;
}

.lang-switcher a {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: 999px;
	text-decoration: none;
	font-size: 7.8pt;
	font-weight: 700;
	border: 1.5px solid rgba(10,46,86,0.18);
	background: #ffffff;
	color: var(--muted);
	box-shadow: 0 2px 8px rgba(10,30,60,0.10);
	transition: all 0.18s;
}

.lang-switcher a:hover {
	border-color: var(--secondary);
	color: var(--primary);
	box-shadow: 0 4px 14px rgba(41,182,255,0.18);
}

.lang-switcher a.active {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

.lang-switcher svg { border-radius: 2px; box-shadow: 0 0 1px rgba(0,0,0,0.25); }

.btn-pdf {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: 999px;
	text-decoration: none;
	font-size: 7.8pt;
	font-weight: 700;
	border: 1.5px solid rgba(41,182,255,0.5);
	background: var(--primary);
	color: #fff;
	box-shadow: 0 2px 8px rgba(10,30,60,0.15);
	transition: all 0.18s;
	cursor: pointer;
}

.btn-pdf:hover {
	background: var(--accent);
	border-color: var(--secondary);
	box-shadow: 0 4px 14px rgba(41,182,255,0.25);
}

@page {
	size: A4;
	margin: 0mm;
}

@media print {
	.lang-switcher { display: none !important; }

	* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

	html, body {
		width: 210mm;
		margin: 0;
		padding: 0;
		background: #ffffff;
	}

	body {
		background: linear-gradient(to right, var(--primary) 0%, var(--primary) 25%, #ffffff 25%, #ffffff 100%);
	}

	:root {
		--print-sidebar-width: 52.5mm;
		--print-main-width: 157.5mm;
	}

	.container {
		display: block;
		width: 210mm;
		min-height: auto;
		margin: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background: transparent;
		overflow: visible;
	}

	.sidebar {
		position: absolute;
		top: 0;
		left: 0;
		width: var(--print-sidebar-width);
		height: 297mm;
		padding: 35px 16px;
		background: transparent;
	}

	.sidebar .sidebar-stacks-block { display: none !important; }

	.main {
		margin-left: var(--print-sidebar-width);
		width: var(--print-main-width);
		padding: 32px 28px 24px;
		background: transparent;
	}

	.header-box,
	.exp-item {
		background: transparent;
		box-shadow: none;
	}

	.header-box {
		border: 0;
		border-radius: 0;
		padding: 0 0 14px 0;
		margin-top: 32px;
		margin-bottom: 18px;
		border-bottom: 3px solid var(--primary);
	}

	.exp-item {
		border: 0;
		border-left: 3px solid rgba(41,182,255,0.8);
		border-radius: 0;
		padding: 0 0 0 12px;
		margin-bottom: 15px;
	}

	.page2-print-block {
		display: flex !important;
		width: 210mm;
		margin-left: calc(-1 * (var(--print-sidebar-width) + 28px));
		page-break-before: always;
		break-before: page;
		align-items: start;
	}

	.page2-left-pane {
		display: block !important;
		width: var(--print-sidebar-width) !important;
		flex: 0 0 var(--print-sidebar-width) !important;
		padding: 0 16px 0 !important;
		min-width: 0;
	}

	.page2-left-pane h2 {
		font-size: 9.8pt;
		color: var(--secondary);
		text-transform: uppercase;
		border-bottom: 1px solid rgba(41,182,255,0.35);
		padding-bottom: 6px;
		margin-top: 0;
		letter-spacing: 1.2px;
	}

	.page2-right-pane {
		width: var(--print-main-width) !important;
		flex: 0 0 var(--print-main-width) !important;
		padding: 32px 28px 0 !important;
		min-width: 0;
	}

	.section-title {
		page-break-after: avoid;
		break-after: avoid;
	}

	.page2-print-block + .exp-item {
		margin-top: 0;
	}

	.page3-print-block {
		display: flex !important;
		width: 210mm;
		margin-left: calc(-1 * (var(--print-sidebar-width) + 28px));
		align-items: start;
	}

	.page3-left-pane {
		display: block !important;
		width: var(--print-sidebar-width) !important;
		flex: 0 0 var(--print-sidebar-width) !important;
		padding: 0 16px 0 !important;
		min-width: 0;
	}

	.page3-right-pane {
		width: var(--print-main-width) !important;
		flex: 0 0 var(--print-main-width) !important;
		padding: 0 28px 0 !important;
		min-width: 0;
	}
}