/* GLOBAL */

:root {
	color-scheme: light dark;
	--c-primary-l: #333;
	--c-primary-d: #fafafa;
	--c-background-l: #fafafa;
	--c-background-d: #333;
	--c-primary: light-dark(var(--c-primary-l), var(--c-primary-d));
	--c-background: light-dark(var(--c-background-l), var(--c-background-d));
	overflow-y: scroll;
	
	--font-serif: Rockwell,
		'Rockwell Nova',
		'Roboto Slab',
		'DejaVu Serif',
		'Sitka Small',
		serif;
	--font-sans: Inter,
		Roboto,
		'Helvetica Neue',
		'Arial Nova',
		'Nimbus Sans',
		Arial,
		sans-serif;
}

@supports (scrollbar-gutter: stable) {
	:root {
		overflow-y: auto;
		scrollbar-gutter: stable both-edges;
		scrollbar-width: thin;
		scrollbar-color: var(--c-primary-l) transparent;
	}
}

body {
	margin: 0;
	/* colors */
	color: var(--c-primary-l);
	background-color: var(--c-background-l);
	
	max-width: 60rem;
	margin: auto;
	margin-block: .75em;
	overflow: clip;
	background: #eaf0f1;
	
	/* fonts */
	font-family: var(--font-sans);
	font-weight: normal;
	line-height: 1.5;
}

/* STRUCTURE */

nav {
	position: sticky;
	
	text-align: center;
	padding: .75em .5em .1em .5em;
	
	/* horizontal scroll */
	white-space: nowrap;
	overflow-x: scroll;
	scrollbar-color: var(--c-primary-l) transparent;
	scrollbar-width: thin;
}

header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	
	border-radius: 1rem;
	border-bottom: solid;
	border-width: .3rem;
	overflow: clip;
	
	font-size: clamp(1em, 3vw, 1.5em);
	
	> hgroup {
		padding: 1em;
		
		> * {
			text-wrap: nowrap;
			line-height: 1.2;
			margin-block: .1em;
		}
	}
	
	height: clamp(100px, 25vw, 200px);
	width: 100%;
	
	background: var(--c-background-l);
}

main {
	border-bottom: solid;
}

footer {
	text-align: end;
	margin: 1em;
	font-weight: bold;
	font-size: .75em;
	/* border-right: solid;
	padding-right: .5em; */
}

/* text */

p {
	font-size: 1em;
	margin-block: .75em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-serif);
	font-weight: normal;
}

h2 {
	font-size: 2em;
}

h3 {
	margin-block: 1.5em .5em;
	font-size: 1.4em;
}

img,
video {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
}

hr {
	border: none;
	border-top: solid;
	border-color: var(--c-primary-l);
	margin-block: 1.5em;
}

/* links */

a {
	color: #317fac;
	font-weight: bold;
	text-decoration-line: underline;
	text-decoration-thickness: .1em;
	text-underline-offset: .15em;
	transition: text-underline-offset 100ms;
}

a:visited {
	text-decoration-color: #8b73b1;
}

a:hover {
	font-weight: bold;
	text-underline-offset: .3em;
}

a:active {
	text-underline-offset: .4em;
}

/* CLASSES */

.content-margin {
	margin-inline: auto;
	margin-block-end: 3em;
	padding: 0 1em;
	max-width: 40em;
}

.timeline {
	display: grid;
	margin-block: 3em;
	gap: 3em .5em;
	grid-template-columns: 1fr 6fr;
}

.timeline > time {
	grid-column: 1;
	justify-self: center;
	writing-mode: sideways-lr;
	text-align: end;
	font-weight: bold;
	font-size: clamp(2em, 10vw, 4em);
	line-height: 1;
	height: 100%;
	border-right: solid;
	border-width: .1em;
}

.timeline > article {
	grid-column: 2;
	
	:first-child {
		margin-top: 0;
	}
	
	img,
	video {
		color: transparent;
		outline: solid;
		outline-offset: 0;
		border-radius: .1em;
		transition-property: color, outline-offset;
		transition-duration: 100ms;
	}
	
	img:hover,
	video:hover {
		color: #317fac;
		outline-offset: .2em;
	}
	
	img:active,
	video:active {
		color: #317fac;
		outline-offset: .3em;
	}
}


/* buttons */

.btn {
	display: inline-block;
	border-radius: .3em;
	background: var(--c-primary-l);
	box-shadow: 0 0 .1em black;
}

.btn > span {
	height: 24px;
	display: inline-flex;
	align-items: center;
	column-gap: .2em;
	padding: .1em .3em;
	border-radius: inherit;
	background: linear-gradient(#cfe0df, var(--c-background-l));
	border: solid var(--c-primary-l);
	color: var(--c-primary-l);
	font-weight: bold;
}

div.btn > span {
	transform: translateY(-.1em);
}

a.btn > span {
	transform: translateY(-.3em);
	transition: transform 75ms ease-in;
}

a.btn:hover > span {
	transform: translateY(-.2em);
}

a.btn:active > span {
	transform: translateY(0);
}