/*
 * Substack writing (Huios) — cards, featured post, archive list, subscribe.
 * Uses the original design tokens (--gold, --cedar, --stone…, --font-display).
 */

/* ---------- Card (dark sections by default) ---------- */
#site .nd-post-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--gold-dim);
	background: rgba(232, 227, 220, 0.03);
	text-align: left;
	transition: border-color 0.3s, transform 0.4s cubic-bezier(.22, 1, .36, 1);
}
#site .nd-post-card:hover { border-color: rgba(232, 185, 35, 0.35); transform: translateY(-4px); }
#site .nd-post-media {
	display: block;
	position: relative;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	background: var(--cedar-mid);
}
#site .nd-post-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s cubic-bezier(.22, 1, .36, 1);
}
#site .nd-post-card:hover .nd-post-media img { transform: scale(1.04); }
#site .nd-post-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 28px 28px 32px;
}
#site .nd-post-meta {
	font-size: 11px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--gold);
	font-weight: 500;
	margin-bottom: 14px;
}
#site .nd-post-title {
	font-family: var(--font-display);
	font-size: 26px;
	font-weight: 400;
	line-height: 1.25;
	margin-bottom: 12px;
}
#site .nd-post-title a { color: inherit; text-decoration: none; }
#site .nd-post-title a:hover { color: var(--gold); }
#site .nd-post-excerpt {
	font-size: 15px;
	line-height: 1.75;
	color: var(--stone-mid);
	font-weight: 300;
	margin-bottom: 24px;
}
#site .nd-post-link {
	margin-top: auto;
	align-self: flex-start;
	font-size: 11px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--gold);
	text-decoration: none;
	font-weight: 500;
}
#site .nd-post-link:hover { color: var(--gold-light); }

/* Cards on light sections */
#site .bg-cream .nd-post-card { border-color: rgba(20, 41, 37, 0.12); background: var(--bg-light-alt); }
#site .bg-cream .nd-post-card:hover { border-color: rgba(232, 185, 35, 0.6); }
#site .bg-cream .nd-post-excerpt { color: var(--slate); }
#site .bg-cream .nd-post-link { color: var(--ember); }
#site .bg-cream .nd-post-title a:hover { color: var(--ember); }

/* ---------- Homepage: 3 latest ---------- */
#site .nd-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}
@media (max-width: 900px) {
	#site .nd-post-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}

/* ---------- Writing page: featured latest ---------- */
#site .nd-post-featured {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	max-width: 1040px;
	margin: 0 auto;
}
#site .nd-post-featured .nd-post-media { aspect-ratio: auto; height: 100%; min-height: 320px; }
#site .nd-post-featured .nd-post-body { padding: 48px 44px; justify-content: center; }
#site .nd-post-featured .nd-post-title { font-size: clamp(30px, 3.4vw, 42px); font-weight: 300; line-height: 1.15; margin-bottom: 16px; }
#site .nd-post-featured .nd-post-excerpt { font-size: 17px; margin-bottom: 32px; }
#site .nd-post-featured .nd-post-link { margin-top: 0; }
@media (max-width: 900px) {
	#site .nd-post-featured { grid-template-columns: 1fr; max-width: 560px; }
	#site .nd-post-featured .nd-post-media { aspect-ratio: 2 / 1; min-height: 0; height: auto; }
	#site .nd-post-featured .nd-post-body { padding: 32px 28px 36px; }
}

/* ---------- Writing page: archive list ---------- */
#site .nd-post-list { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
#site .nd-post-row { display: grid; grid-template-columns: 280px 1fr; }
#site .nd-post-row .nd-post-media { aspect-ratio: auto; height: 100%; min-height: 160px; }
#site .nd-post-row .nd-post-body { padding: 28px 32px; justify-content: center; }
#site .nd-post-row .nd-post-excerpt { margin-bottom: 18px; }
#site .nd-post-row .nd-post-link { margin-top: 0; }
@media (max-width: 680px) {
	#site .nd-post-row { grid-template-columns: 1fr; }
	#site .nd-post-row .nd-post-media { aspect-ratio: 2 / 1; min-height: 0; height: auto; }
}

#site .nd-post-empty { text-align: center; color: var(--stone-mid); font-size: 17px; }
#site .bg-cream .nd-post-empty { color: var(--slate); }
#site .nd-post-empty a { color: var(--gold); }

/* ---------- Subscribe (native form → Substack signup) ---------- */
#site .nd-subscribe { max-width: 520px; margin: 0 auto; text-align: center; }
#site .nd-subscribe-label {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
#site .nd-subscribe-row { display: flex; gap: 0; }
#site .nd-subscribe-input {
	flex: 1;
	min-width: 0;
	padding: 16px 20px;
	font-family: var(--font-body);
	font-size: 16px;
	color: var(--cedar);
	background: var(--bg-light-alt);
	border: 1px solid rgba(20, 41, 37, 0.25);
	border-right: none;
	border-radius: 0;
	outline: none;
	transition: border-color 0.3s;
}
#site .nd-subscribe-input::placeholder { color: var(--slate); opacity: 1; }
#site .nd-subscribe-input:focus { border-color: var(--gold); }
#site .nd-subscribe-btn { flex: none; border-radius: 0; cursor: pointer; justify-content: center; text-align: center; }
#site .nd-subscribe-note {
	margin-top: 16px;
	font-size: 13px;
	line-height: 1.7;
	color: var(--slate);
}
#site .nd-subscribe-note a { color: var(--cedar); text-decoration: underline; text-underline-offset: 2px; }
#site .nd-subscribe-note a:hover { color: var(--ember); }
@media (max-width: 520px) {
	#site .nd-subscribe-row { flex-direction: column; gap: 10px; }
	#site .nd-subscribe-input { border-right: 1px solid rgba(20, 41, 37, 0.25); }
	#site .nd-subscribe-btn { width: 100%; }
}
