/* ===========================================================================
   PDF reader pages (CV, Portfolio PDF).

   A plain top bar plus the pages rendered underneath by
   site/_code/js/pdf-viewer.js. These pages deliberately do NOT load the
   site's main.css — they are a reader, not a portfolio page.
   =========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
	background: #1a1c2e;
	font-family: system-ui, sans-serif;
	min-height: 100vh;
}

/* ── Top bar ───────────────────────────────────────────────────────────── */

.top-bar {
	background: #242943;
	border-bottom: 1px solid rgba(212,212,255,0.1);
	padding: 0.85em 2em;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 10;
}

.top-bar .logo {
	color: #ffffff;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.95em;
	letter-spacing: 0.05em;
}

.top-bar .actions {
	display: flex;
	align-items: center;
	gap: 1.4em;
}

.top-bar .back,
.top-bar .download {
	color: rgba(244,244,255,0.5);
	text-decoration: none;
	font-size: 0.85em;
	display: flex;
	align-items: center;
	gap: 0.4em;
	transition: color 0.2s;
}

.top-bar .back:hover,
.top-bar .download:hover { color: #9bf1ff; }

/* Phones: the name and the two links no longer fit on one line; each link
   keeps its words together, and the bar wraps neatly instead of breaking
   every item in two. */
@media (max-width: 520px) {
	.top-bar { padding: 0.75em 1.1em; flex-wrap: wrap; gap: 0.35em 1em; }
	.top-bar .logo { font-size: 0.85em; white-space: nowrap; }
	.top-bar .actions { gap: 1.1em; }
	.top-bar .back,
	.top-bar .download { font-size: 0.78em; white-space: nowrap; }
}

/* ── Rendered pages ────────────────────────────────────────────────────── */

#pdf-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 2em 1em 3em;
	gap: 1.5em;
}

.page-wrapper {
	position: relative;
	display: inline-block;
	box-shadow: 0 8px 40px rgba(0,0,0,0.5);
	border-radius: 2px;
	max-width: 100%;
	height: auto;
	line-height: 0;
}

.page-wrapper canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

/* The PDF's own hyperlinks, re-created as invisible hit areas on top of the
   canvas so e-mail addresses and links stay clickable. */
.page-wrapper a.pdf-link {
	position: absolute;
	display: block;
	opacity: 0;
	cursor: pointer;
	border-radius: 2px;
}
.page-wrapper a.pdf-link:hover {
	opacity: 0.15;
	background: #9bf1ff;
}

/* ── While loading / on failure ────────────────────────────────────────── */

#loading {
	color: rgba(244,244,255,0.5);
	font-size: 0.9em;
	padding: 4em;
	text-align: center;
}

#loading span {
	display: block;
	margin-top: 0.5em;
	font-size: 0.8em;
	color: rgba(244,244,255,0.35);
}
