
/** RESET **/

/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
	box-sizing: border-box;
}

/* 2. Remove default margin */
* {
	margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
	html {
		interpolate-size: allow-keywords;
	}
}

body {
	/* 4. Add accessible line-height */
	line-height: 1.5;
	/* 5. Improve text rendering */
	-webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input, button, textarea, select {
	font: inherit;
}

/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
	overflow-wrap: break-word;
	hyphens: manual;
}
@media (max-width: 16em) {
	p, h1, h2, h3, h4, h5, h6 {
		hyphens: auto;
	}
}

/* 9. Improve line wrapping */
p {
	text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
	text-wrap: balance;
}

/* 10. Create a root stacking context */
#root, #__next {
	isolation: isolate;
}

/* 11. Prevent preload transitions */
.preload * ,
.preload *::before ,
.preload *::after {
	transition: none !important;
	animation-duration: 0.001s !important;
}


/** CUSTOM STYLES **/ 

@property --card-bg {
	syntax: '<color>';
	initial-value: #1e1e1e;
	inherits: true;
}

:root {
	--bg-color: #121212;
	--text-color: #eee;
	--card-bg: #1e1e1e;
	--shadow: rgba(0, 0, 0, 0.5);
	--btn-background: #2a2a2a;
	--btn-border-color: #444;
    --blockquote-border: #555;
}

[data-theme="light"] {
	--bg-color: #f9f9f9;
	--text-color: #222;
	--card-bg: #ffffff;
	--shadow: rgba(0, 0, 0, 0.1);
	--btn-background: none;
	--btn-border-color: var(--text-color);
 --blockquote-border: #ddd;
}

body {
	margin: 0;
	padding: 0;

	font-family: 'Josefin Sans', serif;
	line-height: 1.6;

	background-color: var(--bg-color);
	color: var(--text-color);

	transition: background 1s, color 1s;
}
.content-wide {
	padding-inline: 2rem;
}

.cards-preview .card h2 ,
h1 {
	font-size: 200%;
	text-align: center;
	margin: 0.5em 0 0.5em 0;
}

p {
	margin-bottom: 1em;
}

.author {
	text-align: center;
	font-size: 120%;
	font-weight: bold;
	margin: 1em 0;
}

.date {
	text-align: center;
	font-size: 110%;
	font-weight: bold;
	margin-bottom: 3em;
}

.cards-preview {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( min(16em, 100%), 1fr) );
	grid-gap: 2em 1em;
	width: 90%;
	margin: 2em auto;
	padding-bottom: 3em;
	place-content: center;
	place-items: stretch;
	margin: 0 auto;
}
.cards-preview a {
	color: inherit;
	text-decoration: inherit;
}

.card {
	width: fit-content;
	max-width: 65em;
	margin: 2em auto;
	background: var(--card-bg);
	padding: 2em;
	border-radius: 1rem;
	box-shadow: 0 0.5rem 2rem var(--shadow);
	transition: background 1s, color 1s;
}
.cards-preview .card {
	width: unset;
	font-size: 50%;
	padding: 3em;
	position: relative;
	height: 50em;
	overflow: clip;
}
.cards-preview .card::after {
	content: '';
	display: block;
	width: 100%;
	height: 50%;
	position: absolute;
	bottom: 0;
	left: 0;
	background: linear-gradient( to bottom, transparent 0%, var(--card-bg) 90% );
	transition: --card-bg 1s;
}

@media (max-width: 35rem) {
	.content-wide {
		padding-inline: 0.5rem;
	}

	.card {
		width: auto;
		padding: 1em;
		font-size: 70%;
	}
}

.top-buttons {
	display: grid;
		grid-template-columns: auto auto auto auto;
	grid-template-areas: 
		"list larger smaller light";
	margin: 2em 0;
	place-content: center;
	place-items: center;
   user-select: none;
}
.top-buttons * {
  user-select: none;
}
#btn-list {
	grid-area: list;
}
#btn-larger {
	grid-area: larger;
}
#btn-smaller {
	grid-area: smaller;
}
#btn-light {
	grid-area: light;
}
@media (max-width: 22rem) {
	.top-buttons {
		grid-template-columns: auto auto;
		grid-template-areas: 
			"list light"
			"larger smaller";
		}
	#home #btn-light {
		grid-row: 1;
		grid-column-start: 1;
		grid-column-end: 3;
	}
}

.card .top-buttons {
	margin-bottom: 4rem;
}
.back-btn ,
.font-size-btn {
	font-family: "Noto Sans Symbols 2", sans-serif;
}
a.back-btn ,
.font-size-btn ,
.theme-toggle {
	vertical-align: middle;
	display: grid;
	grid-template-columns: 1fr;
	place-content: center;
	place-items: center;
	font-size: 1.1rem;
	line-height: 1em;
	margin: 0.25em;
	width:  4em;
	height: 4em;
	background: var(--btn-background);
	border: 0.15rem solid var(--btn-border-color);
	border-radius: 10rem;

	color: var(--text-color);

	text-decoration: none;
	cursor: pointer;
	transition: background 1s, color 1s, border-color 1s;
}
a.back-btn span {
	font-weight: bold;
	font-size: 120%;
	height: 0.7em;
}
.font-size-btn span {
	height: 0.9em;
}

.quote {
	margin: 4em 10% 0.7em 10%;
}
.quote-author {
	display: block;
	margin: 0.7em 20% 4em 0;
	text-align: end;
	font-style: italic;
	font-size: 95%;
}


blockquote {
      border-left: 4px solid var(--blockquote-border);
      padding-left: 1em;
      margin: 1.5em 0;
      color: var(--text-color);
      opacity: 1;
      font-style: italic;
    }

.stage {
  font-style: italic;
  font-weight: 500;
  color: var(--text-color);
  opacity: 0.65;
  margin: 1.2rem 0 0.6rem;
}
