:root {
	--talk-ink: #17221e;
	--talk-paper: #f3f0e8;
	--talk-muted: #66706a;
	--talk-accent: #d9553d;
	--talk-soft: #dce7df;
	--talk-code: #1b2522;
}

.talk-hip {
	--talk-accent: #d05a3d;
	--talk-soft: #e9cf70;
}

.talk-hydro {
	--talk-accent: #187f8e;
	--talk-soft: #a8ced2;
}

.talk-theme {
	background:
		linear-gradient(rgba(23, 34, 30, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(23, 34, 30, 0.025) 1px, transparent 1px),
		var(--talk-paper);
	background-size: 32px 32px;
}

.talk-theme .reveal-viewport,
.talk-theme .reveal {
	background: transparent;
}

.talk-theme .reveal {
	color: var(--talk-ink);
	font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 31px;
}

.talk-theme .reveal .slides {
	text-align: left;
}

.talk-theme .reveal .slides section {
	box-sizing: border-box;
	padding: 42px 64px;
}

.talk-theme .reveal h1,
.talk-theme .reveal h2,
.talk-theme .reveal h3,
.talk-theme .reveal h4 {
	color: var(--talk-ink);
	font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
	font-weight: 500;
	letter-spacing: -0.045em;
	line-height: 1.04;
	text-transform: none;
}

.talk-theme .reveal h1 {
	font-size: 2.45em;
}

.talk-theme .reveal h2 {
	margin: 0 0 0.65em;
	font-size: 1.55em;
}

.talk-theme .reveal h3 {
	font-size: 1.2em;
}

.talk-theme .reveal h2::after {
	display: block;
	width: 52px;
	height: 4px;
	margin-top: 18px;
	border-radius: 2px;
	background: var(--talk-accent);
	content: "";
}

.talk-theme .reveal p {
	color: var(--talk-ink);
	font-family: inherit;
	line-height: 1.55;
}

.talk-theme .reveal a {
	color: var(--talk-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.16em;
}

.talk-theme .reveal strong {
	color: var(--talk-accent);
	font-weight: 650;
}

.talk-theme .reveal ul,
.talk-theme .reveal ol {
	margin-left: 0.7em;
}

.talk-theme .reveal li {
	margin: 0.3em 0;
	padding-left: 0.18em;
	line-height: 1.4;
}

.talk-theme .reveal li::marker {
	color: var(--talk-accent);
}

.talk-theme .reveal table {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	font-size: 0.68em;
}

.talk-theme .reveal table th {
	border: 0;
	border-bottom: 2px solid var(--talk-ink);
	color: var(--talk-muted);
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.talk-theme .reveal table td {
	border: 0;
	border-bottom: 1px solid rgba(23, 34, 30, 0.16);
	padding: 0.55em 0.45em;
}

.talk-theme .reveal code:not(pre code) {
	padding: 0.12em 0.3em;
	border-radius: 0.25em;
	background: rgba(23, 34, 30, 0.08);
	color: #9c402f;
	font-family: "SFMono-Regular", Consolas, monospace;
	font-size: 0.84em;
}

.talk-theme .reveal pre {
	width: 100%;
	margin: 0.7em 0 0;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	background: var(--talk-code);
	box-shadow: 0 18px 45px rgba(23, 34, 30, 0.14);
	font-size: 0.49em;
}

.talk-theme .reveal pre code {
	max-height: 540px;
	padding: 1.4em 1.55em;
	background: transparent;
	line-height: 1.5;
}

.talk-theme .reveal .hljs {
	background: var(--talk-code);
}

.talk-theme .reveal img,
.talk-theme .reveal video {
	max-width: 100%;
	max-height: 535px;
	border: 1px solid rgba(23, 34, 30, 0.13);
	border-radius: 8px;
	box-shadow: 0 16px 40px rgba(23, 34, 30, 0.12);
	object-fit: contain;
}

/* Content-aware layouts for the denser teaching slides. */
.talk-theme .reveal .dense-slide {
	padding-top: 34px;
	padding-bottom: 34px;
	font-size: 0.82em;
}

.talk-theme .reveal .dense-slide h3 {
	margin-bottom: 0.48em;
	font-size: 1.42em;
}

.talk-theme .reveal .dense-slide p {
	margin: 0.48em 0;
	line-height: 1.42;
}

.talk-theme .reveal .dense-slide mjx-container[display="true"] {
	margin: 0.55em 0 !important;
}

.talk-theme .reveal .info-dense {
	padding-top: 30px;
	padding-bottom: 30px;
	font-size: 0.7em;
}

.talk-theme .reveal .info-dense h2 {
	margin-bottom: 0.48em;
	font-size: 1.62em;
}

.talk-theme .reveal .info-dense h2::after {
	width: 40px;
	height: 3px;
	margin-top: 12px;
}

.talk-theme .reveal .info-dense p {
	margin: 0.52em 0;
	line-height: 1.38;
}

.talk-theme .reveal .info-dense ul,
.talk-theme .reveal .info-dense ol {
	margin-top: 0.45em;
	margin-bottom: 0.45em;
}

.talk-theme .reveal .info-dense li {
	margin: 0.22em 0;
	line-height: 1.34;
}

.talk-theme .reveal .info-dense pre {
	margin-top: 0.45em;
	margin-bottom: 0.45em;
	font-size: 0.62em;
}

.talk-theme .reveal .table-dense {
	font-size: 0.76em;
}

.talk-theme .reveal .table-dense table {
	font-size: 0.72em;
}

.talk-theme .reveal .table-dense table td,
.talk-theme .reveal .table-dense table th {
	padding-top: 0.42em;
	padding-bottom: 0.42em;
}

.talk-theme .reveal .code-slide {
	padding-top: 26px;
	padding-bottom: 28px;
}

.talk-theme .reveal .code-slide h2 {
	margin-bottom: 0.34em;
	font-size: 1.45em;
}

.talk-theme .reveal .code-slide h2::after {
	width: 40px;
	height: 3px;
	margin-top: 10px;
}

.talk-theme .reveal .code-slide h3 {
	margin: 0.26em 0 0.42em;
	font-size: 1.05em;
}

.talk-theme .reveal .code-slide p {
	margin: 0.35em 0 0.5em;
	font-size: 0.66em;
	line-height: 1.35;
}

.talk-theme .reveal .code-slide pre {
	margin: 0.35em 0 0;
	font-size: 0.4em;
}

.talk-theme .reveal .code-slide pre code {
	box-sizing: border-box;
	max-height: 440px;
	padding: 1.15em 1.35em;
	overflow: auto;
	line-height: 1.35;
}

.talk-theme .reveal .compact-code-slide {
	display: flex !important;
	height: 100%;
	flex-direction: column;
	justify-content: center;
}

.talk-theme .reveal .compact-code-slide pre code {
	max-height: 500px;
}

.talk-theme .reveal .figure-slide {
	display: flex !important;
	height: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding-top: 30px;
	padding-bottom: 30px;
	text-align: center;
}

.talk-theme .reveal .figure-slide h3,
.talk-theme .reveal .figure-slide h4 {
	align-self: stretch;
	margin: 0 0 18px;
	text-align: left;
}

.talk-theme .reveal .figure-slide h3::after,
.talk-theme .reveal .figure-slide h4::after {
	display: none;
}

.talk-theme .reveal .figure-slide img {
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: 525px !important;
	margin: 0 auto !important;
	background: #050505 !important;
	object-fit: contain;
}

.talk-theme .reveal .portrait-figure img {
	max-height: 530px !important;
}

.talk-theme .reveal .MathJax,
.talk-theme .reveal mjx-container {
	color: var(--talk-ink);
}

.talk-theme .reveal .controls {
	color: var(--talk-accent);
	right: 14px;
	bottom: 8px;
	transform: scale(0.62);
	transform-origin: right bottom;
}

.talk-theme .reveal .progress {
	height: 4px;
	background: rgba(23, 34, 30, 0.1);
	color: var(--talk-accent);
}

.talk-theme .reveal .slide-number {
	right: 96px;
	bottom: 18px;
	padding: 0;
	background: transparent;
	color: var(--talk-muted);
	font-family: "SFMono-Regular", Consolas, monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
}

.talk-home {
	position: fixed;
	z-index: 50;
	top: 22px;
	left: 24px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid rgba(23, 34, 30, 0.18);
	border-radius: 999px;
	background: rgba(243, 240, 232, 0.82);
	color: var(--talk-ink);
	font: 600 11px/1 "Avenir Next", "Segoe UI", sans-serif;
	letter-spacing: 0.05em;
	text-decoration: none;
	text-transform: uppercase;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	transition: border-color 160ms ease, transform 160ms ease;
}

.talk-home:hover,
.talk-home:focus-visible {
	border-color: var(--talk-accent);
	transform: translateX(-2px);
}

.talk-home:focus-visible {
	outline: 2px solid var(--talk-accent);
	outline-offset: 3px;
}

.talk-theme .reveal .title-slide {
	height: 100%;
	padding: 76px 74px;
}

.talk-theme .reveal .title-slide h1 {
	position: relative;
	z-index: 2;
	max-width: 850px;
	margin: 0.3em 0 0;
	font-size: 2.4em;
	line-height: 0.95;
}

.talk-theme .reveal .title-slide h1 em {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 400;
}

.talk-theme .reveal .title-slide h1::after {
	display: none;
}

.talk-kicker {
	margin: 0 !important;
	color: var(--talk-muted) !important;
	font-family: "SFMono-Regular", Consolas, monospace !important;
	font-size: 0.34em !important;
	font-weight: 600;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.talk-byline {
	position: absolute;
	z-index: 2;
	bottom: 70px;
	left: 74px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 0 !important;
	font-size: 0.42em !important;
}

.talk-byline a {
	color: var(--talk-ink) !important;
	font-size: 1.12em;
	font-weight: 650;
	text-decoration: none !important;
}

.talk-byline span {
	color: var(--talk-muted);
}

.title-graphic {
	position: absolute;
	z-index: 0;
	right: 5%;
	bottom: 8%;
	width: 34%;
	aspect-ratio: 1;
	opacity: 0.92;
}

.hydro-graphic {
	overflow: hidden;
	border-radius: 50%;
	background: var(--talk-soft);
	transform: rotate(-9deg);
}

.hydro-graphic span {
	position: absolute;
	left: -16%;
	width: 132%;
	height: 34%;
	border: 3px solid var(--talk-ink);
	border-color: var(--talk-ink) transparent transparent;
	border-radius: 50%;
}

.hydro-graphic span:nth-child(1) {
	top: 22%;
	transform: rotate(6deg);
}

.hydro-graphic span:nth-child(2) {
	top: 40%;
	transform: rotate(-7deg);
}

.hydro-graphic span:nth-child(3) {
	top: 59%;
	transform: rotate(9deg);
}

.hydro-graphic span:nth-child(4) {
	top: 78%;
	transform: rotate(-5deg);
}

.hip-graphic {
	display: grid;
	place-items: center;
	border: 1px solid rgba(23, 34, 30, 0.2);
	background: var(--talk-soft);
	transform: rotate(4deg);
}

.chip-core {
	display: grid;
	width: 49%;
	aspect-ratio: 1;
	place-items: center;
	border: 3px solid var(--talk-ink);
	background: var(--talk-paper);
	font-family: "SFMono-Regular", Consolas, monospace;
	font-size: 0.9em;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.chip-line {
	position: absolute;
	background: var(--talk-ink);
}

.line-a,
.line-b {
	left: 0;
	width: 26%;
	height: 3px;
}

.line-a {
	top: 35%;
}

.line-b {
	bottom: 35%;
}

.line-c,
.line-d {
	top: 0;
	width: 3px;
	height: 26%;
}

.line-c {
	left: 35%;
}

.line-d {
	right: 35%;
}

/* Turn simple H1-only divider slides into intentional chapter cards. */
.talk-theme .reveal section:has(> h1:only-child) {
	display: grid !important;
	align-content: center;
	padding-left: 10%;
	background: var(--talk-ink);
	color: var(--talk-paper);
}

.talk-theme .reveal section:has(> h1:only-child) h1 {
	max-width: 820px;
	margin: 0;
	color: var(--talk-paper);
}

.talk-theme .reveal section:has(> h1:only-child)::before {
	margin-bottom: 22px;
	color: var(--talk-soft);
	font-family: "SFMono-Regular", Consolas, monospace;
	font-size: 0.28em;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	content: "Chapter";
}

@media (max-width: 700px) {
	.talk-home span:last-child {
		display: none;
	}

	.talk-home {
		padding: 8px 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.talk-home {
		transition: none;
	}
}
