@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=UnifrakturMaguntia&display=swap");

:root {
	/* Surfaces */
	--page-bg: #f5f3ef;
	--surface-bg: #ebe7df;

	/* Typography */
	--text-main: #161616;
	--text-soft: #5c5c5c;

	/* Borders */
	--border: #b8b1a7;
	--border-strong: #7e786f;
}

* {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	font-family: "PT Serif", Georgia, "Times New Roman", serif;
	color: var(--text-main);
	scrollbar-width: none;
	-ms-overflow-style: none;
}

*::-webkit-scrollbar {
	display: none;
}

html,
body {
	height: 100%;
	width: 100%;
	overflow: hidden;
}

/* Layout */

main {
	height: 100%;
	width: 100%;
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 0.5rem;
	background-color: var(--page-bg);
}

/* Header */

header {
	position: relative;
	text-align: center;
	padding: 1.8rem 4rem;
	border-bottom: 3px solid var(--text-main);
	background-image: radial-gradient(var(--surface-bg) 20%, transparent 20%);
	background-position: 0 0, 5px 5px;
	background-size: 10px 10px;
}

header::before,
header::after {
	content: "";
	position: absolute;
	top: 100%;
	height: 3px;
	width: 5%;
	background-color: var(--page-bg);
}

header::before {
	left: 0;
}

header::after {
	right: 0;
}

header h1 {
	font-size: 4rem;
	font-family: "UnifrakturMaguntia", cursive;
}

header span {
	font-family: "Playfair Display", serif;
	text-transform: uppercase;
	word-spacing: 1rem;
	color: var(--text-soft);
}

/* Main Content */

.content {
	display: grid;
	grid-template-columns: 1.1fr 5fr 2.2fr;
	min-height: 0;
	min-width: 0;
	padding-top: 0.5rem;
}

/* Aside */

.content aside {
	padding: clamp(0.6rem, 2vh, 1.2rem) 1rem;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: clamp(0.45rem, 3.2vh, 2rem);
	min-width: 0;
	min-height: 0;
	overflow-y: auto;
}

.leagues {
	display: none;
}

.league {
	display: block;
	margin: 1.5rem 0;
	font-family: "Montserrat", sans-serif;
	font-size: 1.2rem;
	cursor: pointer;
	text-decoration: none;
}

.league:hover {
	text-decoration: underline;
}

/* Desktop-only: intro line, languages, and skills as three distinct
   groups, filling the space the nav would otherwise waste once every
   section is already on-screen. */

.side-intro p {
	font-family: "PT Serif", Georgia, "Times New Roman", serif;
	font-size: clamp(0.78rem, 1.7vh, 0.95rem);
	line-height: 1.5;
	color: var(--text-main);
}

.side-group-label {
	margin-bottom: clamp(0.35rem, 1vh, 0.6rem);
	font-family: "Montserrat", sans-serif;
	font-size: clamp(0.62rem, 1.2vh, 0.7rem);
	letter-spacing: 0.2rem;
	text-transform: uppercase;
	color: var(--text-soft);
}

.side-languages-text {
	font-family: "PT Serif", Georgia, "Times New Roman", serif;
	font-size: clamp(0.72rem, 1.6vh, 0.85rem);
	line-height: 1.5;
	color: var(--text-main);
}

.side-tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(0.3rem, 1vh, 0.5rem) 0.9rem;
}

.side-tags-list span {
	font-family: "Montserrat", sans-serif;
	font-size: clamp(0.6rem, 1.15vh, 0.68rem);
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--text-soft);
}

.cv-download {
	display: inline-block;
	margin-top: clamp(0.25rem, 1.2vh, 0.75rem);
	padding: clamp(0.25rem, 0.8vh, 0.5rem) 1rem;
	border: 1px solid var(--text-main);
	font-family: "Montserrat", sans-serif;
	font-size: clamp(0.64rem, 1.2vh, 0.72rem);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cv-download:hover {
	background-color: var(--text-main);
	color: var(--page-bg);
}

.social {
	margin-top: auto;
}

.social a {
	display: block;
	margin: clamp(0.3rem, 1.4vh, 1rem) 0;
	font-family: "Montserrat", sans-serif;
	text-decoration: none;
}

.social a:hover {
	text-decoration: underline;
}

/* Center */

.center {
	min-height: 0;
	min-width: 0;
	display: grid;
	grid-template-columns: 1.7fr 3fr;
	grid-template-rows: 2fr 1fr;
	row-gap: 1rem;
	border-left: 1px solid var(--border);
	border-right: 1px solid var(--border);
}

/* Counter */

.counter {
	min-height: 0;
	min-width: 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	scroll-snap-type: y mandatory;
}

.card-counter {
	min-height: 100%;
	padding: 0 0.5rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	scroll-snap-align: start;
	border-right: 1px solid var(--border);
}

.card-counter-photo {
	width: clamp(52px, 9vh, 84px);
	aspect-ratio: 1 / 1;
	margin-bottom: clamp(0.4rem, 1.2vh, 0.9rem);
	border-radius: 50%;
	overflow: hidden;
	border: 1px solid var(--border-strong);
}

.card-counter-genre {
	font-family: "Montserrat", sans-serif;
	font-size: clamp(0.68rem, 1.3vh, 0.8rem);
	letter-spacing: 0.3rem;
	color: var(--text-soft);
}

.card-counter-header {
	margin: clamp(3px, 0.5vh, 5px) 0 clamp(6px, 1vh, 10px);
	font-size: clamp(1.1rem, 2.3vh, 1.6rem);
	line-height: 1.25;
	font-family: "Cormorant Garamond", serif;
	overflow-wrap: break-word;
}

.card-counter-text {
	font-size: clamp(0.72rem, 1.55vh, 0.92rem);
	line-height: 1.45;
}

.card-counter-quote {
	margin: clamp(0.5rem, 1.3vh, 1.2rem) 0;
	font-size: clamp(0.78rem, 1.6vh, 0.95rem);
	font-family: "PT Serif", Georgia, "Times New Roman", serif;
}

/* Spotlight */

.spotlight {
	min-width: 0;
}

.spotlight-content {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	padding: 0 1rem;
	min-width: 0;
}

.spotlight-data {
	margin-bottom: 1rem;
	text-align: center;
	min-width: 0;
}

.spotlight-data span,
.spotlight-quote-header {
	font-family: "Montserrat", sans-serif;
	font-size: 0.8rem;
	letter-spacing: 0.3rem;
	text-transform: uppercase;
	color: var(--text-soft);
}

.spotlight-header {
	margin: 10px 0 15px;
	font-size: 1.5rem;
	line-height: 1.5rem;
	font-family: "Cormorant Garamond", serif;
	overflow-wrap: break-word;
}

.spotlight-text {
	font-size: 0.95rem;
}

.spotlight-quotes {
	position: relative;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border-strong);
}

.spotlight-quotes::before,
.spotlight-quotes::after {
	content: "";
	position: absolute;
	bottom: 100%;
	width: 10%;
	height: 1px;
	background-color: var(--page-bg);
}

.spotlight-quotes::before {
	left: 0;
}

.spotlight-quotes::after {
	right: 0;
}

.spotlight-quote-header {
	display: block;
	margin-bottom: 1rem;
	text-align: center;
}

.spotlight-quotes-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	min-width: 0;
}

.spotlight-quote {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}

.spotlight-quote-text {
	font-size: 0.9rem;
	font-family: "PT Serif", Georgia, "Times New Roman", serif;
}

.spotlight-quote-author {
	margin-top: 10px;
	font-size: 1rem;
	font-family: "Cormorant Garamond", serif;
}

/* Slider */

.slider {
	position: relative;
	grid-column: span 2;
	overflow: hidden;
}

.slider::before {
	content: "";
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: 95%;
	height: 1px;
	background-color: var(--border);
}

.slider::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 100%;
	background-color: var(--page-bg);
}

.slider-track {
	width: 100%;
	height: 100%;
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
}

.slider-card {
	min-width: 50%;
	margin: auto;
	padding: 0 1.5rem;
	scroll-snap-align: start;
	border-left: 1px solid var(--border);
}

.slider-card-header {
	font-size: 1.5rem;
	line-height: 1.5rem;
	font-family: "Cormorant Garamond", serif;
}

.slider-card-text {
	margin: 10px 0;
	font-size: 0.8rem;
	color: var(--text-soft);
}

.slider-card-time {
	display: block;
	text-align: end;
	font-size: 0.8rem;
	font-style: italic;
	color: var(--text-soft);
}

/* Sidebar */

.small {
	position: relative;
	min-width: 0;
	padding: 0 0.5rem;
	overflow-y: auto;
	scroll-snap-type: y proximity;
	scroll-padding-top: calc(30px + 1rem);
}

.header {
	position: sticky;
	top: 0;
	z-index: 1000;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	background-color: var(--page-bg);
	border-bottom: 1px solid var(--border);
}

.header h2 {
	font-size: 1.5rem;
	font-family: "Cormorant Garamond", serif;
}

.header a {
	font-family: "Montserrat", sans-serif;
	font-size: 1rem;
	text-decoration: none;
}

.header a:hover {
	text-decoration: underline;
}

.card-side {
	width: 100%;
	padding: 1rem;
	scroll-snap-align: start;
}

.card-side-img {
	width: 100%;
	aspect-ratio: 16 / 9;
}

.card-side-header {
	margin-top: 10px;
	font-size: clamp(1.1rem, 2.3vh, 1.6rem);
	line-height: 1.25;
	font-family: "Cormorant Garamond", serif;
	overflow-wrap: break-word;
}

.card-side-data {
	display: flex;
	justify-content: space-between;
}

.card-side-author,
.card-side-time {
	font-size: 0.9rem;
	font-style: italic;
	font-family: "Playfair Display", serif;
	color: var(--text-soft);
}

.card-side-text {
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--border);
}

.card-side a {
	display: block;
	margin-top: 1rem;
	text-align: end;
	font-family: "Montserrat", sans-serif;
	text-decoration: none;
	font-size: 1rem;
}

.card-side a:hover {
	text-decoration: underline;
}

/* Images */

img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(100%);
}

/* Footer */

footer {
	overflow: hidden;
	padding: 0.5rem 0;
	background-color: var(--text-main);
}

.ticker {
	width: 100%;
	overflow: hidden;
}

.ticker-track {
	--ticker-shift: -50%;
	width: max-content;
	display: flex;
	align-items: center;
	gap: 4rem;
	animation: ticker 32s linear infinite;
}

.ticker-track span {
	position: relative;
	white-space: nowrap;
	font-family: "Montserrat", sans-serif;
	font-size: 0.8rem;
	letter-spacing: 1px;
	color: var(--page-bg);
}

.ticker-track span::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -2rem;
	transform: translateY(-50%);
	height: 50%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background-color: var(--page-bg);
}

/* Animation */

@keyframes ticker {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(var(--ticker-shift));
	}
}

@media (prefers-reduced-motion: reduce) {
	.ticker-track {
		animation: none;
	}
}

/*
	Responsive.

	The reference's fixed 100vh dashboard (3 columns, 4 independently-scrolling
	internal panels) only really works with a desktop's combination of width
	AND height. Squeezing it into a narrower "collapsed but still fixed-height"
	middle tier — which is what an earlier pass at this did — left tablets in
	an awkward zone: technically not broken, but three nested scroll regions
	crammed into ~700px is a bad time on a touchscreen.

	So there's one real breakpoint: above 1168px, the full dashboard. At or
	below it — every tablet and phone — the page becomes one normal scrolling
	page. Same classes, same visuals, just reflowed top to bottom instead of
	fighting for space inside a fixed viewport.
*/

@media (max-width: 1168px) {
	html,
	body {
		height: auto;
		overflow: visible;
	}

	main {
		height: auto;
		display: block;
	}

	header {
		padding: 1.4rem 1.5rem 1.2rem;
	}

	header > h1 {
		font-size: clamp(2.2rem, 7vw, 3.5rem);
	}

	header span {
		word-spacing: 0.5rem;
		font-size: 0.85rem;
	}

	.content {
		display: block;
		padding-top: 0;
	}

	.content aside {
		position: sticky;
		top: 0;
		z-index: 50;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		row-gap: 0.6rem;
		column-gap: 1.5rem;
		padding: 0.9rem 1.25rem;
		background-color: var(--page-bg);
		border-bottom: 1px solid var(--border);
	}

	.leagues {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 1.1rem;
		font-size: 1.05rem;
	}

	.league {
		margin: 0;
	}

	.side-intro,
	.side-languages,
	.side-skills {
		display: none;
	}

	.social {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 1rem;
		margin-top: 0;
	}

	.social a {
		margin: 0;
	}

	.center {
		display: block;
		border-left: none;
		border-right: none;
	}

	.counter {
		overflow-y: visible;
		scroll-snap-type: none;
	}

	.card-counter {
		min-height: 0;
		border-right: none;
		border-bottom: 1px solid var(--border);
		padding: 1.75rem 1.25rem;
	}

	.spotlight-content {
		padding: 1.75rem 1.25rem;
	}

	.spotlight-quotes-container {
		grid-template-columns: 1fr;
	}

	.slider {
		overflow: visible;
	}

	.slider-track {
		height: auto;
		padding: 1.25rem 0;
	}

	.slider-card {
		min-width: 65%;
		padding-top: 0.4rem;
	}

	.slider-card-header {
		font-size: 1.15rem;
		line-height: 1.4rem;
	}

	.slider-card-text {
		font-size: 0.82rem;
		margin: 8px 0;
	}

	.slider-card-time {
		font-size: 0.72rem;
	}

	.small {
		overflow-y: visible;
		scroll-snap-type: none;
		padding: 0 1.25rem;
	}

	.header {
		position: static;
	}

	.counter,
	.spotlight,
	.slider,
	.small {
		scroll-margin-top: 4.5rem;
	}
}

@media (max-width: 640px) {
	.slider-card {
		min-width: 85%;
	}

	.card-counter-header,
	.spotlight-header,
	.card-side-header {
		font-size: 1.3rem;
		line-height: 1.6rem;
	}
}

@media (max-width: 420px) {
	header h1 {
		font-size: 2.1rem;
	}

	header span {
		word-spacing: 0.35rem;
		font-size: 0.7rem;
	}

	.leagues {
		font-size: 0.95rem;
		gap: 0.85rem;
	}

	.social {
		gap: 0.75rem;
	}
}
