/*
	Live CV for shahnawazqadir.com
	Uses Dimension's own vocabulary only: Source Sans Pro, white on the dark
	panel, 50% white for secondary text, 1px white rules, uppercase spaced labels.
*/

/* ---------- layout inside the pop-up ---------- */

	.live-cv {
		font-size: 1rem;
	}

	.live-cv .cv-head {
		margin-bottom: 2em;
	}

	.live-cv .cv-role {
		margin: 0 0 1em 0;
	}

	.live-cv .cv-prose {
		margin: 0 0 1em 0;
	}

	.live-cv .cv-links {
		margin: 1.5em 0 0 0;
	}

		.live-cv .cv-links a {
			display: inline-flex !important;
			align-items: center;
			justify-content: center;
			color: #ffffff;
		}

	.live-cv svg.cv-svg {
		width: 1em;
		height: 1em;
		fill: currentColor;
		flex: none;
	}

		.live-cv .cv-actions svg.cv-svg {
			vertical-align: -0.125em;
			margin-right: 0.6em;
		}

	.live-cv .cv-glance {
		color: rgba(255, 255, 255, 0.5);
		font-size: 0.9em;
		margin: 1.25em 0 0 0;
	}

/* Section index: echoes the two white rules framing the home page title. */

	.live-cv .cv-index {
		display: -moz-flex;
		display: -webkit-flex;
		display: -ms-flex;
		display: flex;
		-moz-flex-wrap: wrap;
		-webkit-flex-wrap: wrap;
		-ms-flex-wrap: wrap;
		flex-wrap: wrap;
		gap: 0.2em 1.2em;
		border-top: solid 1px #ffffff;
		border-bottom: solid 1px #ffffff;
		padding: 1em 0;
		margin: 0 0 0.5em 0;
	}

		.live-cv .cv-index button {
			box-shadow: none;
			background: none;
			height: auto;
			line-height: 1.75;
			padding: 0;
			font-size: 0.6em;
			letter-spacing: 0.15rem;
			color: rgba(255, 255, 255, 0.5) !important;
			white-space: normal;
			text-align: left;
		}

			.live-cv .cv-index button:hover {
				background: none;
				color: #ffffff !important;
			}

/* Sections */

	.live-cv .cv-section {
		margin-top: 2.75em;
		scroll-margin-top: 1.5em;
	}

		.live-cv .cv-section h3.major {
			margin-bottom: 1.5em;
			max-width: 100%; /* long headings wrap on phones instead of widening the page */
		}

		.live-cv .cv-section h4 {
			margin: 1.75em 0 0.85em 0;
		}

			.live-cv .cv-section h3 + h4 {
				margin-top: 0;
			}

/* Dated entries: year on the left, details on the right. */

	.live-cv .cv-entries {
		list-style: none;
		padding: 0;
		margin: 0 0 1em 0;
	}

		.live-cv .cv-entries li.cv-entry {
			display: grid;
			grid-template-columns: 6.25em minmax(0, 1fr);
			-moz-column-gap: 1.25em;
			-webkit-column-gap: 1.25em;
			column-gap: 1.25em;
			padding: 0.85em 0;
			border-top: solid 1px rgba(255, 255, 255, 0.075);
		}

			.live-cv .cv-entries li.cv-entry:first-child {
				border-top: 0;
				padding-top: 0;
			}

		.live-cv .cv-when {
			color: rgba(255, 255, 255, 0.5);
			font-size: 0.9em;
			line-height: 1.85;
			font-variant-numeric: tabular-nums;
		}

		.live-cv .cv-what > * {
			display: block;
		}

		.live-cv .cv-title {
			font-weight: 600;
		}

		.live-cv .cv-extra,
		.live-cv .cv-detail {
			color: rgba(255, 255, 255, 0.5);
			font-size: 0.9em;
		}

/* Publications: hanging indent, or numbered when Vitae numbers them. */

	.live-cv .cv-cites {
		list-style: none;
		padding: 0 0 0 1.5em;
		margin: 0 0 1em 0;
	}

		.live-cv .cv-cites li {
			padding-left: 0;
			text-indent: -1.5em;
			margin-bottom: 0.85em;
			overflow-wrap: break-word;
			word-wrap: break-word;
		}

		.live-cv .cv-cites.is-numbered {
			list-style: decimal;
			padding-left: 1.85em;
		}

			.live-cv .cv-cites.is-numbered li {
				text-indent: 0;
				padding-left: 0.35em;
			}

			.live-cv .cv-cites.is-numbered li::marker {
				color: rgba(255, 255, 255, 0.5);
			}

		.live-cv .cv-doi {
			color: rgba(255, 255, 255, 0.5);
			font-size: 0.85em;
			overflow-wrap: anywhere;
			word-break: normal;
		}

/* Year filter above long publication lists */

	.live-cv .cv-yearfilter {
		display: flex;
		flex-wrap: wrap;
		gap: 0.3em 1.1em;
		padding: 0 0 1em 0;
		margin: 0 0 1.75em 0;
		border-bottom: solid 1px rgba(255, 255, 255, 0.175);
	}

		.live-cv .cv-yearfilter button {
			box-shadow: none;
			background: none;
			height: auto;
			line-height: 1.8;
			padding: 0 0 0.1em 0;
			border-radius: 0;
			border-bottom: solid 1px transparent;
			font-size: 0.65em;
			letter-spacing: 0.15rem;
			color: rgba(255, 255, 255, 0.5) !important;
		}

			.live-cv .cv-yearfilter button:hover {
				background: none;
				color: #ffffff !important;
			}

			.live-cv .cv-yearfilter button[aria-pressed="true"] {
				color: #ffffff !important;
				border-bottom-color: #ffffff;
			}

	.live-cv [hidden] {
		display: none !important;
	}

	.live-cv .cv-fulltext {
		font-size: 0.85em;
		font-weight: 600;
		margin-left: 0.2em;
	}

/* "Cite" on each publication */

	.live-cv .cv-cite-btn {
		display: inline-flex;
		align-items: center;
		gap: 0.45em;
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
		background: none;
		border-radius: 4px;
		height: auto;
		line-height: 1.6;
		padding: 0.2em 0.7em 0.2em 0.6em;
		margin-left: 0.4em;
		font-size: 0.65em;
		font-weight: 600;
		letter-spacing: 0.15rem;
		vertical-align: 0.15em;
		text-indent: 0;
		color: rgba(255, 255, 255, 0.85) !important;
		transition: background-color 0.2s, box-shadow 0.2s;
	}

		.live-cv .cv-cite-btn svg.cv-svg {
			width: 0.95em;
			height: 0.95em;
		}

		.live-cv .cv-cite-btn:hover,
		.live-cv .cv-cite-btn[aria-expanded="true"] {
			background: rgba(255, 255, 255, 0.075);
			box-shadow: inset 0 0 0 1px #ffffff;
			color: #ffffff !important;
		}

	.live-cv .cv-cite-panel {
		text-indent: 0;
		margin: 0.75em 0 0.5em 0;
		padding: 0.9em 1em 0.1em 1em;
		border-radius: 4px;
		background: rgba(255, 255, 255, 0.075);
		font-size: 0.9em;
	}

		.live-cv .cv-cite-panel .cv-cite-text {
			margin: 0 0 0.8em 0;
		}

		.live-cv .cv-cite-panel pre {
			margin: 0 0 1em 0;
			padding: 0.75em;
			border-radius: 4px;
			background: rgba(0, 0, 0, 0.25);
			font-size: 0.8em;
			line-height: 1.5;
			white-space: pre-wrap;
			overflow-wrap: anywhere;
		}

		.live-cv .cv-cite-panel ul.actions {
			margin-bottom: 0.8em;
			gap: 0.6em;
		}

	.live-cv .cv-skills {
		list-style: none;
		padding: 0;
		margin: 0 0 1em 0;
	}

		.live-cv .cv-skills li {
			padding-left: 0;
			margin-bottom: 0.4em;
		}

	.live-cv .cv-actions {
		margin: 3em 0 1em 0;
		padding-left: 0;
	}

		.live-cv .cv-actions li {
			padding-left: 0;
		}

/* Loading line, shown only until the first copy arrives. */

	.live-cv .cv-status {
		color: rgba(255, 255, 255, 0.5);
		font-size: 0.7em;
		letter-spacing: 0.2rem;
		text-transform: uppercase;
		margin: 0 0 2em 0;
		-moz-animation: live-cv-pulse 1.6s ease-in-out infinite;
		-webkit-animation: live-cv-pulse 1.6s ease-in-out infinite;
		animation: live-cv-pulse 1.6s ease-in-out infinite;
	}

	@-webkit-keyframes live-cv-pulse { 50% { opacity: 0.35; } }
	@keyframes live-cv-pulse { 50% { opacity: 0.35; } }

	@media (prefers-reduced-motion: reduce) {
		.live-cv .cv-status {
			-webkit-animation: none;
			animation: none;
		}
	}

	.live-cv .cv-print-only {
		display: none;
	}

	.live-cv a:focus-visible,
	.live-cv button:focus-visible {
		outline: solid 1px #ffffff;
		outline-offset: 3px;
	}

	@media screen and (max-width: 480px) {

		.live-cv .cv-entries li.cv-entry {
			grid-template-columns: minmax(0, 1fr);
		}

		.live-cv .cv-when {
			font-size: 0.8em;
			line-height: 1.6;
			margin-bottom: 0.15em;
		}

		.live-cv .cv-when:empty {
			display: none;
		}

	}

/* ---------- print / save as PDF (only while the CV is open) ---------- */

	@media print {

		@page {
			margin: 16mm 15mm;
		}

		body.cv-printing,
		body.cv-printing #wrapper,
		body.cv-printing #main {
			background: #ffffff !important;
		}

		body.cv-printing #bg,
		body.cv-printing #header,
		body.cv-printing #footer,
		body.cv-printing #main > article:not(.has-live-cv),
		body.cv-printing .has-live-cv > :not(.live-cv),
		body.cv-printing .live-cv .cv-index,
		body.cv-printing .live-cv .cv-links,
		body.cv-printing .live-cv .cv-actions,
		body.cv-printing .live-cv .cv-cite-btn,
		body.cv-printing .live-cv .cv-yearfilter,
		body.cv-printing .live-cv .cv-cite-panel {
			display: none !important;
		}

		body.cv-printing #wrapper,
		body.cv-printing #main {
			display: block !important;
			min-height: 0 !important;
			padding: 0 !important;
		}

			body.cv-printing #wrapper:before {
				display: none !important;
			}

		body.cv-printing .has-live-cv {
			display: block !important;
			width: auto !important;
			max-width: none !important;
			padding: 0 !important;
			background: none !important;
			border-radius: 0 !important;
			opacity: 1 !important;
			-webkit-transform: none !important;
			transform: none !important;
		}

		body.cv-printing .live-cv {
			font-size: 10.5pt;
			line-height: 1.45;
		}

			body.cv-printing .live-cv,
			body.cv-printing .live-cv * {
				color: #000000 !important;
			}

			body.cv-printing .live-cv .cv-print-only {
				display: block !important;
			}

			body.cv-printing .live-cv .cv-print-name {
				font-size: 20pt;
				letter-spacing: 0.2em;
				line-height: 1.2;
				margin: 0 0 6pt 0;
			}

			body.cv-printing .live-cv .cv-print-contact {
				font-size: 9.5pt;
				margin: 0.6em 0 0 0;
			}

			body.cv-printing .live-cv .cv-head {
				margin-bottom: 1em;
				padding-bottom: 0.9em;
				border-bottom: solid 1.5pt #000000;
			}

			body.cv-printing .live-cv .cv-section {
				margin-top: 1.4em;
			}

			body.cv-printing .live-cv h3.major {
				font-size: 11pt;
				letter-spacing: 0.15em;
				border-bottom-color: #000000;
				padding-bottom: 2pt;
				margin-bottom: 0.8em;
			}

			body.cv-printing .live-cv h4 {
				font-size: 9pt;
				letter-spacing: 0.15em;
				margin: 1em 0 0.5em 0;
			}

			body.cv-printing .live-cv h3,
			body.cv-printing .live-cv h4 {
				break-after: avoid;
				page-break-after: avoid;
			}

			body.cv-printing .live-cv .cv-entries li.cv-entry {
				grid-template-columns: 6.25em minmax(0, 1fr);
				padding: 0.45em 0;
				border-top-color: #d0d0d0;
				break-inside: avoid;
				page-break-inside: avoid;
			}

			body.cv-printing .live-cv .cv-when {
				font-size: 0.9em;
				line-height: 1.6;
			}

			body.cv-printing .live-cv .cv-extra,
			body.cv-printing .live-cv .cv-detail,
			body.cv-printing .live-cv .cv-glance,
			body.cv-printing .live-cv .cv-doi {
				color: #444444 !important;
			}

			body.cv-printing .live-cv .cv-cites li {
				margin-bottom: 0.45em;
				break-inside: avoid;
				page-break-inside: avoid;
			}

			body.cv-printing .live-cv .cv-cites.is-numbered li::marker {
				color: #000000;
			}

			body.cv-printing .live-cv a {
				border-bottom: 0 !important;
			}

	}
