:root {
	--blue: #1106ff;
	--ink: #1d1d1d;
	--grey: #707070;
	--serif: "Lora", Georgia, "Times New Roman", serif;
	--sans: "Work Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #fff; scroll-behavior: smooth; }

body {
	margin: 0;
	color: var(--ink);
	font: 400 1rem/1.7 var(--sans);
}

main {
	width: min(100% - 3rem, 74rem);
	margin-inline: auto;
	padding-bottom: 10rem;
}

.sr-only {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Links: bold blue, bar slides in on hover */
a {
	color: var(--blue);
	font-weight: 600;
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
	transition: background-size 0.2s ease-out;
}
a:hover, a:focus-visible { background-size: 100% 2px; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* 1. Identity */
.intro { padding: clamp(8rem, 30vh, 18rem) 0 clamp(5rem, 14vh, 9rem); }

h1 {
	margin: 0 0 1.5rem;
	color: var(--blue);
	font: 400 clamp(3rem, 7vw, 5.5rem)/1 var(--serif);
	letter-spacing: -0.025em;
}

.now { margin: 0 0 0.75rem; color: var(--grey); font-size: 1.25rem; font-weight: 300; }
.links { margin: 0; font-size: 1.15rem; }
.links span { color: var(--grey); font-weight: 300; }

/* 2. Description / photo */
.about {
	display: grid;
	grid-template-columns: 5fr 6fr;
	column-gap: 8.33%;
	align-items: start;
}

.lead {
	margin: 0 0 1.75rem;
	color: var(--blue);
	font-size: clamp(1.05rem, 1.4vw, 1.25rem);
	line-height: 1.6;
}

.note { margin: 0 0 1.5rem; font-weight: 500; letter-spacing: -0.01em; }

.portrait {
	display: block;
	width: 100%;
	height: auto;
}

/* 3. Experience */
.experience { margin-top: clamp(5rem, 14vh, 9rem); }

.cv {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 2px solid var(--blue);
	border-bottom: 2px solid var(--blue);
	color: var(--blue);
	font-family: var(--serif);
	font-size: 1.15rem;
	line-height: 1.4;
}

.job {
	display: grid;
	grid-template-columns: 14rem 3fr 7fr;
	gap: 0 1.5rem;
	padding: 0.4rem 0;
}
.job.new { margin-top: 0.9rem; padding-top: 1rem; border-top: 1px solid var(--blue); }
.job.new:first-child { margin-top: 0; border-top: 0; padding-top: 1.1rem; }
.job:last-child { padding-bottom: 1.2rem; }

.job small {
	display: block;
	margin-top: 0.4rem;
	color: var(--grey);
	font: 400 0.875rem/1.5 var(--sans);
}

/* Go-top arrow */
.top {
	position: fixed;
	top: 4.5rem;
	right: clamp(1rem, 3vw, 3rem);
	z-index: 50;
	width: 2rem;
	height: 4rem;
	background: none;
	transition: opacity 0.3s ease-out, visibility 0.3s;
}
.top.is-hidden { opacity: 0; visibility: hidden; }
.top::before {
	content: "";
	position: absolute;
	left: 50%; top: 0; bottom: 0;
	width: 1px;
	background: var(--grey);
}
.top::after {
	content: "";
	position: absolute;
	left: 50%; top: 0;
	width: 0.6rem; height: 0.6rem;
	border-top: 1px solid var(--grey);
	border-left: 1px solid var(--grey);
	transform: translate(-50%, 0.1rem) rotate(45deg);
}
.top:hover::before, .top:focus-visible::before { background: var(--blue); }
.top:hover::after, .top:focus-visible::after { border-color: var(--blue); }

/* Page-load: a thin line grows, then the white veil lifts (pure CSS) */
body::before, body::after { pointer-events: none; }
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 100;
	background: #fff;
	animation: veil 1.55s forwards;
}
body::after {
	content: "";
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 101;
	width: 7vw;
	height: 1px;
	margin-left: -3.5vw;
	background: var(--blue);
	animation: line 1.15s both, veil 1.55s forwards;
}
@keyframes veil { 0%, 55% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes line { from { width: 0; } to { width: 7vw; } }

@media (prefers-reduced-motion: reduce) {
	body::before, body::after { display: none; }
	html { scroll-behavior: auto; }
	a, .top { transition: none; }
}

/* Small screens */
@media (max-width: 56rem) {
	.about { grid-template-columns: 1fr; }
	.portrait { margin-top: 1.5rem; }
	.top { top: 1rem; }
}

@media (max-width: 40rem) {
	.job { grid-template-columns: 1fr; gap: 0.1rem; }
	.job .company:empty { display: none; }
	.dates { font-size: 0.95rem; }
	.role { font-weight: 700; }
}

@media print {
	body::before, body::after, .top { display: none; }
	:root { --blue: #000; --grey: #444; }
	a[href^="http"]::after { content: " (" attr(href) ")"; font-weight: 400; font-size: 0.8em; }
	.job { break-inside: avoid; }
}
