/* Site design overrides layered on vendored semtx.css. */

@font-face {
	font-family: "Sprat";
	src: url("/static/fonts/SpratVF.woff2") format("woff2");
	font-display: swap;
}

@font-face {
	font-family: "Raleway";
	src: url("/static/fonts/Raleway-VariableFont_wght.ttf") format("truetype");
	font-weight: 100 900;
	font-display: swap;
}

/* Display title for the site name, used on landing and blog pages.
   Two stacked lines (Deep / Yearning) sharing one left edge inside a
   fit-content box that stays centered on the page. */
.site-title {
	font-family: "Sprat", var(--font-sans);
	font-size: clamp(3.5rem, 11vw, 8rem);
	font-weight: 600;
	line-height: 0.97;
	letter-spacing: -0.02em;
	width: fit-content;
	margin-inline: auto;
	text-align: left;
	margin-bottom: var(--space-8);
	text-decoration: underline dotted;
	text-underline-offset: 0.12em;
}

/* Masthead (site title + nav), rendered by page bodies via SiteMasthead. */
.site-masthead {
	padding-top: clamp(4rem, 15vh, 10rem);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* The chosen nav link gets a solid (not dotted) underline. */
.site-nav a.active-link {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Enlarged nav/menu links under the site title. */
.site-nav a {
	font-size: var(--fs-2xl);
}

.article-menu a {
	font-size: var(--fs-2xl);
	line-height: 1.4;
}

/* Reading column: wider than semtx's 65ch, guttered full-width on mobile. */
#article-body article {
	max-width: 81ch;
}

#article-body article.article-prose {
	font-family: "Raleway", var(--font-sans);
}

#article-body article.article-prose h1 {
	font-size: clamp(2rem, 5vw, 3rem);
	line-height: var(--lh-tight);
}

@media (max-width: 768px) {
	#article-body article {
		max-width: 100%;
		padding: 0 1rem;
	}
}

/* Fixed theme toggle, minimal semtx-consistent styling. */
.theme-toggle {
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 1200;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.25rem 0.5rem;
	font-size: var(--fs-lg);
	color: var(--text);
	background: var(--bg-surface);
	border: var(--border-w) solid var(--border);
	border-radius: var(--radius);
	cursor: pointer;
}

.theme-toggle:hover {
	border-color: var(--primary);
}

/* Page body always fills the viewport, and only grows when content does. */
.landing {
	min-height: 100vh;
	min-height: 100dvh;
}

/* Shared content column: about, projects and the article list all use it. */
.page-column {
	max-width: 81ch;
	margin-inline: auto;
	font-family: "Raleway", var(--font-sans);
}

@media (max-width: 768px) {
	.page-column {
		max-width: 100%;
		padding: 0 1rem;
	}
}

/* Projects: left-aligned list; description appears on hover/focus only. */
.project-list {
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}

.project-list li {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-1);
}

.project-list a {
	font-size: var(--fs-2xl);
	line-height: 1.4;
}

.project-meta {
	font-size: var(--fs-sm);
}

.project-list a[data-tip] {
	position: relative;
}

.project-list a[data-tip]::after {
	content: attr(data-tip);
	position: absolute;
	left: 0;
	top: calc(100% + 0.4rem);
	z-index: 10;
	width: min(46ch, 90vw);
	padding: var(--space-2) var(--space-3);
	border: var(--border-w) solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-surface);
	color: var(--text);
	font-family: "Raleway", var(--font-sans);
	font-size: var(--fs-sm);
	line-height: 1.4;
	box-shadow: var(--shadow);
	opacity: 0;
	pointer-events: none;
	transition: opacity 120ms ease;
}

.project-list a[data-tip]:hover::after,
.project-list a[data-tip]:focus-visible::after {
	opacity: 1;
}

@media (hover: none) {
	.project-list a[data-tip]::after {
		display: none;
	}
}
