/* Teaching & Memes page
 **************************************************/
.tm {
	--tm-accent: #03cc85;
	--tm-accent-ink: #027a50;
	--tm-ink: #222;
	--tm-muted: #6b6b6b;
	--tm-line: #e6e6e6;
	--tm-card: #fff;
	--tm-bg: #f7f7f7;
	color: var(--tm-ink);
	background: var(--tm-bg);
	min-height: 100%;
}

.tm-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 48px;
}

/* hero */
.tm-hero {
	background: linear-gradient(180deg, #fff 0%, #f1f4f3 100%);
	border-bottom: 1px solid var(--tm-line);
	padding: 64px 0 48px;
}
.tm-eyebrow {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--tm-accent-ink);
	margin: 0 0 12px;
}
.tm-hero h1 {
	font-size: 46px;
	font-weight: 300;
	line-height: 1.1;
	margin: 0 0 16px;
	color: var(--tm-ink);
}
.tm-lead {
	font-size: 18px;
	line-height: 1.6;
	color: #4a4a4a;
	max-width: 62ch;
	margin: 0 0 28px;
}
.tm-hero-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 40px;
}
.tm-hero-row .tm-lead { margin: 0; }
.tm-jump {
	display: flex;
	flex: none;
	flex-wrap: nowrap;
	gap: 10px;
}
.tm-btn,
.tm-btn:focus {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	background: var(--tm-accent);
	color: #fff;
	transition: background .2s, transform .2s;
}
.tm-btn:hover {
	background: var(--tm-accent-ink);
	color: #fff;
	transform: translateY(-1px);
}
.tm-btn.ghost,
.tm-btn.ghost:focus {
	background: #fff;
	color: var(--tm-ink);
	border: 1px solid var(--tm-line);
}
.tm-btn.ghost:hover {
	border-color: var(--tm-accent);
	color: var(--tm-accent-ink);
}

/* sections */
.tm-section {
	padding: 56px 0;
}
.tm-section + .tm-section {
	border-top: 1px solid var(--tm-line);
}
.tm-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 32px;
}
.tm-section-head h2 {
	font-size: 32px;
	font-weight: 300;
	margin: 0;
}
.tm-section-head p {
	margin: 0;
	color: var(--tm-muted);
	font-size: 15px;
}

/* course timeline */
.tm-year {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 24px;
	padding: 24px 0;
	border-top: 1px dashed var(--tm-line);
}
.tm-year:first-of-type {
	border-top: 0;
	padding-top: 0;
}
.tm-year-label {
	position: sticky;
	top: 24px;
	align-self: start;
	font-size: 22px;
	font-weight: 700;
	color: var(--tm-ink);
	font-variant-numeric: tabular-nums;
}
.tm-year-label small {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: var(--tm-muted);
	letter-spacing: .04em;
	text-transform: uppercase;
	margin-top: 2px;
}
.tm-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}
.tm-card,
.tm-card:focus {
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--tm-card);
	border: 1px solid var(--tm-line);
	border-radius: 12px;
	padding: 18px 20px 16px;
	color: var(--tm-ink);
	box-shadow: 0 1px 2px rgba(0,0,0,.04);
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tm-card:hover {
	color: var(--tm-ink);
	transform: translateY(-3px);
	border-color: var(--tm-accent);
	box-shadow: 0 10px 24px -12px rgba(0,0,0,.25);
}
.tm-card:focus-visible {
	outline: 2px solid var(--tm-accent);
	outline-offset: 2px;
}
.tm-tag {
	align-self: flex-start;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 999px;
	background: #e7f8f1;
	color: var(--tm-accent-ink);
}
.tm-tag.cw  { background: #e8f0fb; color: #1d4f91; }
.tm-tag.rep { background: #fdf2dc; color: #8a5a00; }
.tm-tag.sem { background: #f1eafb; color: #5b2d91; }
.tm-card h3 {
	font-size: 18px;
	font-weight: 400;
	line-height: 1.35;
	margin: 0;
}
.tm-note {
	font-size: 14px;
	color: var(--tm-muted);
	margin: 0;
	line-height: 1.45;
}
.tm-card-foot {
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 14px;
	font-weight: 700;
	color: var(--tm-accent-ink);
}
.tm-card-foot .fa-arrow-right {
	transition: transform .2s;
}
.tm-card:hover .tm-card-foot .fa-arrow-right {
	transform: translateX(4px);
}

/* older years, collapsed by default */
.tm-older {
	border-top: 1px dashed var(--tm-line);
	padding-top: 24px;
}
.tm-older > summary {
	list-style: none;
	cursor: pointer;
	user-select: none;
}
.tm-older > summary::-webkit-details-marker { display: none; }
.tm-older > summary .fa-angle-down { font-size: 18px; transition: transform .2s; }
.tm-older[open] > summary .fa-angle-down { transform: rotate(180deg); }
.tm-older .tm-older-hide,
.tm-older[open] .tm-older-show { display: none; }
.tm-older[open] .tm-older-hide { display: inline; }
.tm-older[open] > summary { margin-bottom: 8px; }
.tm-older .tm-year:first-of-type { border-top: 0; padding-top: 16px; }

/* meme gallery */
.tm-memes {
	columns: 3 260px;
	column-gap: 16px;
}
.tm-meme {
	display: block;
	width: 100%;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	break-inside: avoid;
	cursor: zoom-in;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
	transition: box-shadow .25s, transform .25s;
}
.tm-meme img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform .4s;
}
.tm-meme:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 30px -14px rgba(0,0,0,.35);
}
.tm-meme:hover img {
	transform: scale(1.02);
}
.tm-meme:focus-visible {
	outline: 3px solid var(--tm-accent);
	outline-offset: 2px;
}

/* lightbox */
.tm-lightbox {
	border: 0;
	padding: 0;
	margin: 0;
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	background: transparent;
	overflow: hidden;
}
.tm-lightbox::backdrop {
	background: rgba(15,15,15,.92);
}
.tm-lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}
.tm-lightbox figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}
.tm-lightbox img {
	max-width: calc(100vw - 160px);
	max-height: calc(100vh - 110px);
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0,0,0,.5);
	background: #fff;
}
.tm-lightbox figcaption {
	color: #ccc;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}
.tm-lb-btn {
	position: fixed;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 0;
	background: rgba(255,255,255,.12);
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	transition: background .2s;
}
.tm-lb-btn:hover,
.tm-lb-btn:focus-visible {
	background: rgba(255,255,255,.28);
	outline: 0;
}
.tm-lb-close { top: 20px; right: 20px; }
.tm-lb-prev  { left: 20px;  top: 50%; margin-top: -24px; }
.tm-lb-next  { right: 20px; top: 50%; margin-top: -24px; }

/* private tutoring */
.tm-tutor {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 32px;
	background: var(--tm-card);
	border: 1px solid var(--tm-line);
	border-left: 3px solid var(--tm-accent);
	border-radius: 12px;
	padding: 22px 26px;
}
.tm-tutor-text { flex: 1 1 420px; }
.tm-tutor-text p { margin: 0 0 8px; font-size: 16.5px; line-height: 1.65; color: #3a3a3a; max-width: 70ch; text-wrap: pretty; }
.tm-tutor-text p:last-child { margin-bottom: 0; }
.tm-tutor-rating { font-size: 15px !important; color: var(--tm-muted) !important; }
.tm-tutor-rating a { color: var(--tm-accent-ink); font-weight: 700; }
.tm-tutor-rating strong { color: var(--tm-ink); margin-right: 2px; }
.tm-stars { color: #e3a21a; letter-spacing: 1px; margin-right: 4px; }

/* tutoring reviews slider */
.tm-reviews {
	margin-top: 18px;
	background: var(--tm-card);
	border: 1px solid var(--tm-line);
	border-radius: 12px;
	padding: 22px 26px 18px;
}
.tm-reviews-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 20px;
	margin-bottom: 14px;
}
.tm-reviews-head h3 { margin: 0; font-size: 20px; font-weight: 400; }
.tm-reviews-head a { font-size: 13.5px; font-weight: 700; color: var(--tm-accent-ink); }
.tm-reviews-head a .fa { font-size: 11px; margin-left: 2px; }
.tm-reviews-viewport { position: relative; }
.tm-review { margin: 0 0 18px; padding: 0 0 0 42px; position: relative; }
.tm-review::before {
	content: "\201E";
	position: absolute; left: 0; top: -18px;
	font: 700 64px/1 Georgia, serif;
	color: var(--tm-accent);
	opacity: .55;
}
.tm-review blockquote { margin: 0; padding: 0; border: 0; font-size: 17px; line-height: 1.65; color: #333; }
.tm-review blockquote p { margin: 0; font-size: inherit; text-wrap: pretty; }
.tm-review-long blockquote { font-size: 15px; line-height: 1.6; }
.tm-review-reply { margin: 10px 0 0; padding: 8px 12px; background: #f6f8f7; border-radius: 8px; font-size: 14px; line-height: 1.55; color: var(--tm-muted); }
.tm-review-reply span { font-weight: 700; color: var(--tm-ink); }
.tm-review figcaption { margin-top: 10px; font-size: 14px; color: var(--tm-muted); }
.tm-review figcaption strong { color: var(--tm-ink); margin-right: 8px; }
.tm-reviews-nav { display: none; }
/* with JS: one review at a time */
.tm-reviews.tm-js .tm-reviews-viewport { min-height: 140px; }
.tm-reviews.tm-js .tm-review { display: none; margin: 0; }
.tm-reviews.tm-js .tm-review.is-active { display: block; animation: tm-rev-in .35s ease; }
.tm-reviews.tm-js .tm-reviews-nav { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.tm-reviews:not(.tm-js) .tm-reviews-viewport { max-height: 420px; overflow-y: auto; }
@keyframes tm-rev-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.tm-rev-prev, .tm-rev-next {
	width: 36px; height: 36px; border-radius: 50%;
	border: 1px solid var(--tm-line); background: #fff; color: var(--tm-ink);
	font-size: 20px; line-height: 1; cursor: pointer; flex: none;
	transition: border-color .2s, color .2s, background .2s;
}
.tm-rev-prev:hover, .tm-rev-next:hover { border-color: var(--tm-accent); color: var(--tm-accent-ink); }
.tm-rev-progress { flex: 1; height: 4px; background: #edf0ef; border-radius: 4px; overflow: hidden; }
.tm-rev-progress span { display: block; height: 100%; width: 0; background: var(--tm-accent); border-radius: 4px; transition: width .35s ease; }
.tm-rev-count { font-size: 13.5px; color: var(--tm-muted); font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.tm-rev-count b { color: var(--tm-ink); }
@media (max-width: 640px) {
	.tm-reviews { padding: 18px 16px 14px; }
	.tm-review { padding-left: 30px; }
	.tm-review::before { font-size: 48px; top: -12px; }
	.tm-review blockquote { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.tm *, .tm *::before, .tm *::after { transition: none !important; }
}

@media (max-width: 1199px) {
	.tm-hero-row { flex-direction: column; align-items: flex-start; }
	.tm-hero-row .tm-lead { margin-bottom: 8px; }
	.tm-jump { flex-wrap: wrap; }
}
@media (max-width: 991px) {
	.tm-wrap { padding: 0 28px; }
	.tm-hero { padding-top: 72px; }
}
@media (max-width: 640px) {
	.tm-wrap { padding: 0 16px; }
	.tm-hero h1 { font-size: 34px; }
	.tm-lead { font-size: 16px; }
	.tm-year { grid-template-columns: 1fr; gap: 12px; }
	.tm-year-label { position: static; }
	.tm-lightbox img { max-width: calc(100vw - 24px); max-height: calc(100vh - 150px); }
	.tm-lb-prev, .tm-lb-next { top: auto; bottom: 20px; margin-top: 0; }
	.tm-lb-prev { left: calc(50% - 60px); }
	.tm-lb-next { right: calc(50% - 60px); }
}
