/* ══════════════════════════════════════════════════════════════
   Zhanchao Yang — Thoughts
   Loads after home.css and inherits its tokens.

   The register here is a notebook rather than a journal article:
   graph-paper ground, slate-blue accent instead of brick red,
   smaller and more visual cards than the Research page, and a
   couple of things sitting a degree off-square on purpose.
══════════════════════════════════════════════════════════════ */

body.thoughts-page {
	--accent: #456a96;
	--accent-deep: #34527a;
	--paper: #fbfaf6;
	--paper-deep: #f4f2ea;
	--rule: rgba(11, 35, 69, 0.09);

	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* graph paper: fine grid, heavier every fifth line, fading downward */
body.thoughts-page::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image: linear-gradient(rgba(69, 106, 150, 0.09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(69, 106, 150, 0.09) 1px, transparent 1px),
		linear-gradient(rgba(69, 106, 150, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(69, 106, 150, 0.05) 1px, transparent 1px);
	background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
	-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 46%, transparent 92%);
	mask-image: linear-gradient(180deg, #000 0%, #000 46%, transparent 92%);
}

body.thoughts-page > main,
body.thoughts-page > section,
body.thoughts-page > footer {
	position: relative;
	z-index: 1;
}

body.thoughts-page .site-nav {
	background: rgba(251, 250, 246, 0.85);
}
body.thoughts-page .nav-links a.active {
	color: var(--accent-deep);
}
body.thoughts-page .nav-links a::after {
	background: var(--accent);
}
body.thoughts-page .footer-links a:hover {
	color: var(--accent-deep);
}
body.thoughts-page .footer-links a::after {
	background: var(--accent);
}
@media (max-width: 720px) {
	body.thoughts-page .nav-links {
		background: var(--paper);
	}
}

/* ══ Hero ═════════════════════════════════════════════════ */
.th-hero {
	padding: 176px 0 68px;
}
.th-hero-inner > * {
	max-width: 900px;
}
.th-eyebrow {
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--accent-deep);
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	gap: 14px;
}
.th-eyebrow::after {
	content: '';
	height: 1px;
	width: 68px;
	background: var(--accent);
	opacity: 0.45;
}
.th-hero h1 {
	font-family: var(--serif);
	font-size: clamp(2.6rem, 6.4vw, 4.4rem);
	font-weight: 600;
	line-height: 1.06;
	letter-spacing: -0.02em;
	margin-bottom: 26px;
}
.th-hero h1 em {
	font-style: italic;
	color: var(--accent);
}
.th-hero-lead {
	font-family: var(--serif);
	font-size: clamp(1.12rem, 2.1vw, 1.34rem);
	line-height: 1.6;
	color: var(--ink-soft);
	max-width: 44ch;
}
.th-hero-note {
	margin-top: 26px;
	padding-left: 20px;
	border-left: 2px solid var(--accent);
	border-left-color: rgba(69, 106, 150, 0.35);
	font-size: 0.95rem;
	line-height: 1.75;
	color: var(--ink-faint);
	max-width: 60ch;
}

/* ══ Three kinds of material ══════════════════════════════ */
.th-kinds {
	padding: 26px 0 12px;
}
.th-kind-list {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}
.th-kind-list li + li {
	border-left: 1px solid var(--rule);
}
.th-kind-list a {
	display: block;
	padding: 24px 26px;
	text-decoration: none;
	color: inherit;
	transition: background 0.3s ease;
}
.th-kind-list a:hover {
	background: rgba(69, 106, 150, 0.05);
}
.th-kind-list li:first-child a {
	padding-left: 0;
}
.th-kind-verb {
	display: block;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 8px;
}
.th-kind-name {
	display: block;
	font-family: var(--serif);
	font-size: 1.2rem;
	font-weight: 600;
	margin-bottom: 5px;
}
.th-kind-eg {
	display: block;
	font-size: 0.8rem;
	color: var(--ink-faint);
	letter-spacing: 0.02em;
}

/* ══ Sections ═════════════════════════════════════════════ */
.th-section {
	padding: 88px 0;
}
.th-section.th-quiet {
	padding: 64px 0;
}
.th-head {
	max-width: 62ch;
	margin-bottom: 46px;
}
.th-label {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 12px;
}
.th-head h2 {
	font-family: var(--serif);
	font-size: clamp(1.8rem, 3.4vw, 2.5rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin-bottom: 14px;
}
.th-head-lead {
	font-size: 1rem;
	line-height: 1.75;
	color: var(--ink-soft);
}

/* ══ Experiment cards ═════════════════════════════════════ */
.th-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}
.th-card {
	background: var(--surface);
	border: 1px solid var(--line-soft);
	border-radius: 5px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
		box-shadow 0.35s ease, border-color 0.35s ease;
}
.th-card.is-feature {
	grid-column: span 3;
	flex-direction: row;
	align-items: stretch;
}
.th-card-media {
	display: block;
	background: var(--paper-deep);
	border-bottom: 1px solid var(--line-soft);
	overflow: hidden;
}
.th-card-media svg {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.th-card.is-feature .th-card-media {
	flex: 0 0 46%;
	border-bottom: none;
	border-right: 1px solid var(--line-soft);
	display: flex;
	align-items: center;
}
.th-card-body {
	padding: 22px 24px 26px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.th-card.is-feature .th-card-body {
	padding: 40px 44px;
	justify-content: center;
}
.th-card-format {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 10px;
}
.th-card h3 {
	font-family: var(--serif);
	font-size: 1.22rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin-bottom: 10px;
}
.th-card.is-feature h3 {
	font-size: clamp(1.6rem, 2.8vw, 2.05rem);
	margin-bottom: 14px;
}
.th-card h3 a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
}
.th-card h3 a:hover {
	color: var(--accent-deep);
}
.th-card-desc {
	font-size: 0.92rem;
	line-height: 1.68;
	color: var(--ink-soft);
}
.th-card.is-feature .th-card-desc {
	font-family: var(--serif);
	font-size: 1.04rem;
	max-width: 46ch;
}
.th-card-meta {
	margin-top: 14px;
	font-size: 0.76rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-faint);
}
.th-card-link {
	margin-top: 20px;
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: 0.88rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	color: var(--accent-deep);
	text-decoration: none;
	border-bottom: 1px solid rgba(69, 106, 150, 0.35);
	padding-bottom: 3px;
	transition: color 0.25s ease, border-color 0.25s ease;
}
.th-card-link .arrow {
	transition: transform 0.3s ease;
}
.th-card-link:hover {
	color: var(--ink);
	border-bottom-color: var(--ink);
}
.th-card-link:hover .arrow {
	transform: translateX(4px);
}

/* live cards lift; the map tiles drift a hair on hover */
.th-card.is-live:hover {
	transform: translateY(-3px);
	border-color: rgba(69, 106, 150, 0.3);
	box-shadow: var(--shadow-lift);
}
.th-card.is-live:hover .th-card-media svg {
	transform: scale(1.03);
}

/* nothing to open yet: quieter, and it says so plainly */
.th-card.is-pending {
	background: rgba(255, 255, 255, 0.55);
	border-style: dashed;
	border-color: var(--line);
}
.th-card.is-pending .th-card-media {
	opacity: 0.55;
}
.th-card.is-pending .th-card-format {
	color: var(--ink-faint);
}
.th-card.is-pending h3 {
	color: var(--ink-soft);
}
.th-card-state {
	margin-top: auto;
	padding-top: 18px;
	font-size: 0.76rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-faint);
	display: flex;
	align-items: center;
	gap: 9px;
}
.th-card-state::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	border: 1px solid var(--ink-faint);
}

/* ══ Empty states ═════════════════════════════════════════ */
.th-empty {
	font-family: var(--serif);
	font-style: italic;
	font-size: 1.05rem;
	color: var(--ink-faint);
	padding: 22px 0 0;
	border-top: 1px solid var(--rule);
}
.th-empty-block {
	border-top: 1px solid var(--rule);
	padding-top: 30px;
}
.th-empty-head {
	font-family: var(--serif);
	font-size: 1.3rem;
	font-weight: 600;
	margin-bottom: 8px;
}
.th-empty-sub {
	font-size: 0.95rem;
	color: var(--ink-faint);
	max-width: 52ch;
}

/* ══ Where this fits ══════════════════════════════════════ */
.th-fit {
	padding: 20px 0 84px;
}
.th-fit-line {
	max-width: 68ch;
	font-family: var(--serif);
	font-size: 1.02rem;
	line-height: 1.8;
	color: var(--ink-soft);
	padding: 26px 30px;
	background: var(--paper-deep);
	border-left: 2px solid var(--accent);
	border-radius: 0 4px 4px 0;
}
.th-fit-line a {
	color: var(--accent-deep);
	text-decoration: none;
	border-bottom: 1px solid rgba(69, 106, 150, 0.4);
	transition: color 0.25s ease, border-color 0.25s ease;
}
.th-fit-line a:hover {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

/* ══ Responsive ═══════════════════════════════════════════ */
@media (max-width: 960px) {
	.th-cards {
		grid-template-columns: repeat(2, 1fr);
	}
	.th-card.is-feature {
		grid-column: span 2;
		flex-direction: column;
	}
	.th-card.is-feature .th-card-media {
		flex: none;
		border-right: none;
		border-bottom: 1px solid var(--line-soft);
	}
	.th-card.is-feature .th-card-body {
		padding: 26px 28px 30px;
	}
	.th-kind-list {
		grid-template-columns: 1fr;
	}
	.th-kind-list li + li {
		border-left: none;
		border-top: 1px solid var(--rule);
	}
	.th-kind-list a,
	.th-kind-list li:first-child a {
		padding: 20px 0;
	}
}

@media (max-width: 720px) {
	.th-hero {
		padding: 128px 0 52px;
	}
	.th-section {
		padding: 66px 0;
	}
	.th-cards {
		grid-template-columns: 1fr;
	}
	.th-card.is-feature {
		grid-column: span 1;
	}
	.th-fit-line {
		padding: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.th-card,
	.th-card-media svg,
	.th-card-link .arrow {
		transition: none !important;
		transform: none !important;
	}
}

/* ══ Written thoughts: a ledger of posts ══════════════════
   Full-width horizontal rows rather than cards. The list should
   read like a table of contents: number on the left, the piece in
   the middle, date and cue on the right. Whole row is the target. */
.th-posts {
	list-style: none;
	border-top: 1px solid var(--rule);
}
.th-post {
	border-bottom: 1px solid var(--rule);
}
.th-post > a {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr) auto;
	align-items: start;
	gap: 28px;
	padding: 28px 20px 28px 0;
	text-decoration: none;
	color: inherit;
	position: relative;
	transition: background 0.3s ease, padding 0.3s ease;
}
.th-post > a::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--accent);
	transform: scaleY(0);
	transform-origin: 50% 0;
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.th-post > a:hover {
	background: rgba(69, 106, 150, 0.045);
	padding-left: 18px;
}
.th-post > a:hover::before {
	transform: scaleY(1);
}
.th-post-no {
	font-family: var(--serif);
	font-size: 1.32rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--terracotta);
	padding-top: 2px;
}
.th-post-main {
	display: block;
	min-width: 0;
}
.th-post-series {
	display: block;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 8px;
}
.th-post-title {
	display: block;
	font-family: var(--serif);
	font-size: clamp(1.28rem, 2.4vw, 1.62rem);
	font-weight: 600;
	line-height: 1.22;
	letter-spacing: -0.014em;
	margin-bottom: 10px;
	transition: color 0.25s ease;
}
.th-post > a:hover .th-post-title {
	color: var(--accent-deep);
}
.th-post-dek {
	display: block;
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--ink-soft);
	max-width: 56ch;
}
.th-post-source {
	display: block;
	margin-top: 12px;
	font-size: 0.8rem;
	letter-spacing: 0.02em;
	color: var(--ink-faint);
}
.th-post-source em {
	font-family: var(--serif);
	font-style: italic;
	font-size: 0.92rem;
}
.th-post-end {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	padding-top: 4px;
	white-space: nowrap;
}
.th-post-date {
	font-size: 0.76rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-faint);
}
.th-post-go {
	font-size: 0.84rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--accent-deep);
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.th-post > a:hover .th-post-go,
.th-post > a:focus-visible .th-post-go {
	opacity: 1;
	transform: none;
}
.th-posts-note {
	margin-top: 20px;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-faint);
}

@media (max-width: 720px) {
	.th-post > a {
		grid-template-columns: 56px minmax(0, 1fr);
		gap: 6px 16px;
		padding: 24px 0;
	}
	.th-post > a:hover {
		padding-left: 12px;
	}
	.th-post-no {
		font-size: 1.1rem;
	}
	.th-post-end {
		grid-column: 2;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding-top: 14px;
	}
	.th-post-go {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.th-post > a,
	.th-post > a::before,
	.th-post-go {
		transition: none !important;
	}
	.th-post > a:hover {
		padding-left: 0;
	}
}
