/* =========================================================================
   Tobia Giani — "Manifesto v3" theme
   Orange field (#E87130) + black blocks (#131313), poster typography.
   Multi-page evolution: compact home + topic pages, geometric decorations
   (space / video games / mathematics) as inline SVG — see inc/deco.php.
   Single stylesheet: tokens, @font-face, reset, layout, components.
   ========================================================================= */

/* ---------- @font-face (self-hosted woff2, no CDN) --------------------- */
@font-face {
	font-family: "Archivo";
	font-style: normal;
	font-weight: 100 900;              /* variable */
	font-display: swap;
	src: url("../../fonts/archivo-latin-var.woff2") format("woff2");
}
@font-face {
	font-family: "Instrument Sans";
	font-style: normal;
	font-weight: 400 700;             /* variable */
	font-display: swap;
	src: url("../../fonts/instrument-sans-latin-var.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../../fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../../fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
}
@font-face {
	font-family: "IBM Plex Mono";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../../fonts/ibm-plex-mono-latin-600.woff2") format("woff2");
}

/* ---------- Design tokens --------------------------------------------- */
:root {
	--c-field:        #e87130;
	--c-block:        #131313;
	--c-panel:        #1a1b1e;
	--c-panel-2:      #232428;
	--c-ink:          #f2f0ec;
	--c-ink-on-field: #131313;
	--c-muted:        #a09c94;
	--c-signal:       #ff6b1a;
	--c-signal-soft:  #ffa068;
	--c-line:         rgba(242, 240, 236, .10);
	--c-line-strong:  rgba(242, 240, 236, .18);

	--f-display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-body:    "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-mono:    "IBM Plex Mono", ui-monospace, Consolas, "SFMono-Regular", monospace;

	/* type scale (rem) */
	--t-xs:  0.72rem;
	--t-sm:  0.9rem;
	--t-md:  1rem;
	--t-lg:  1.25rem;
	--t-xl:  1.6rem;
	--t-2xl: 2.2rem;
	--t-hero: clamp(3rem, 9vw, 6.5rem);

	--space: 8px;
	--pad-section: clamp(64px, 10vw, 128px);
	--maxw: 1180px;
	--reading: 68ch;

	--ease: cubic-bezier(.22, .61, .36, 1);
	--dur: 250ms;
}

/* ---------- Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible {
	outline: 2px solid var(--c-signal);
	outline-offset: 3px;
}
.section--field :focus-visible { outline-color: var(--c-block); }

/* ---------- Base ------------------------------------------------------ */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.65;
	color: var(--c-ink);
	background: var(--c-block);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
	position: fixed; top: -100px; left: 8px; z-index: 200;
	background: var(--c-signal); color: var(--c-block);
	padding: 10px 16px; font-family: var(--f-mono); font-weight: 600;
	text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* Utility text roles */
.mono { font-family: var(--f-mono); }
.display { font-family: var(--f-display); }
.eyebrow, .section-index, .project-year, .entry-meta {
	font-family: var(--f-mono);
	text-transform: uppercase;
	letter-spacing: .18em;
	font-size: var(--t-xs);
}

/* =========================================================================
   Sections & fields
   ========================================================================= */
.section {
	padding: var(--pad-section) 0;
	position: relative;
}
.section--dark  { background: var(--c-block); color: var(--c-ink); }
.section--field { background: var(--c-field); color: var(--c-ink-on-field); }
.section--hero  { min-height: 100vh; display: flex; align-items: center; }

.inner {
	width: min(100% - 48px, var(--maxw));
	margin-inline: auto;
}

/* Left padding on desktop to clear the fixed nav — every template. */
@media (min-width: 1025px) {
	main .section .inner,
	.site-footer .inner { padding-left: 152px; }
	.page-header { padding-left: 176px; }
}

/* =========================================================================
   Decorative geometry (inc/deco.php)
   ========================================================================= */
.has-deco { overflow: hidden; }
.has-deco > .inner { position: relative; z-index: 1; }

.deco { position: absolute; pointer-events: none; z-index: 0; height: auto; }
.section--field .deco { color: var(--c-block); }
.section--dark .deco  { color: var(--c-signal); }

.deco--hero {
	right: clamp(-40px, -1vw, 0px);
	top: 50%;
	transform: translateY(-50%);
	width: clamp(300px, 38vw, 560px);
}
.page-hero .deco--hero {
	width: clamp(240px, 30vw, 460px);
	right: 3vw;
	top: 44%;
}
.deco--corner { right: 3vw; bottom: 8%; width: min(32vw, 360px); }
.deco--corner-right {
	right: 5vw; top: -20px;
	width: clamp(84px, 10vw, 132px);
	transform: rotate(14deg);
}
.deco--contact { right: -40px; bottom: 36px; width: min(50vw, 560px); }

@media (max-width: 860px) {
	.deco--hero, .deco--corner, .deco--contact { opacity: .45; }
	.deco--hero { width: 62vw; right: -12vw; }
}

/* Card glyphs are laid out in flow, not absolutely positioned. */
.explore-glyph .deco { position: static; width: 44px; height: 44px; }

/* Slow ornamental motion — only when the visitor allows it. */
@media (prefers-reduced-motion: no-preference) {
	.deco-spin {
		animation: deco-spin 70s linear infinite;
		transform-box: fill-box;
		transform-origin: center;
	}
	.deco-spin--rev { animation-duration: 110s; animation-direction: reverse; }
	.deco-dash {
		stroke-dasharray: 5 9;
		animation: deco-dash 14s linear infinite;
	}
	.deco-star { animation: deco-blink 3.8s ease-in-out infinite; }
	.deco-star:nth-of-type(2n) { animation-delay: 1.3s; }
	.deco-star:nth-of-type(3n) { animation-delay: 2.2s; }
}
@keyframes deco-spin { to { transform: rotate(360deg); } }
@keyframes deco-dash { to { stroke-dashoffset: -140; } }
@keyframes deco-blink { 0%, 100% { opacity: .9; } 50% { opacity: .25; } }

/* =========================================================================
   Navigation (sidebar.php — rendered by header.php on every page)
   ========================================================================= */
.site-nav {
	position: fixed;
	top: 0; left: 0; bottom: 0;
	width: 140px;
	z-index: 100;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	padding: 24px 16px;
	border-right: 1px solid var(--c-line);
	background: transparent;
	color: var(--c-ink);
	transition: color var(--dur) var(--ease);
}
.nav-brand { display: none; }
.nav-toggle { display: none; }

.nav-list { counter-reset: nav; display: flex; flex-direction: column; gap: 6px; }
.nav-list a {
	counter-increment: nav;
	display: flex;
	align-items: baseline;
	gap: 8px;
	text-decoration: none;
	font-family: var(--f-mono);
	font-size: var(--t-xs);
	text-transform: uppercase;
	letter-spacing: .1em;
	padding: 6px 4px;
	color: var(--c-muted);
	transition: color var(--dur) var(--ease);
}
.nav-list a .nav-index::before { content: counter(nav, decimal-leading-zero); }
.nav-list a:hover { color: var(--c-ink); }
.nav-list a.is-active { color: var(--c-signal); }

/* Poster-style adaptive ink (desktop). The nav is transparent, so its items
   must be dark over orange fields and light over dark blocks — even when the
   nav straddles both at once. sidebar.php renders the list twice inside
   .nav-stack: the base list in light ink, plus a decorative twin
   (.nav-list--field) in dark ink that theme.js clips (clip-path) to the exact
   viewport bands where orange .section--field elements pass under the nav.
   The twin starts fully clipped inline, so without JS only the base list shows. */
.nav-stack { position: relative; }
.nav-list--field {
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	/* No pointer-events:none here: clip-path clips hit-testing too, so each list
	   must catch the clicks inside its own visible bands — the twin over orange,
	   the base over dark. Its links mirror the base ones (real hrefs). */
}
.nav-list--field a { color: rgba(19, 19, 19, .55); }
.nav-list--field a:hover { color: var(--c-ink-on-field); }
.nav-list--field a.is-active { color: var(--c-ink-on-field); font-weight: 600; }

/* Keyboard focus lives on the base list, whose clip would swallow the focus
   ring inside orange bands — so while the nav holds focus, lift the clips and
   mark the focused item with a solid black chip, readable on any background. */
.nav-stack:focus-within .nav-list { clip-path: none !important; -webkit-clip-path: none !important; }
.nav-stack:focus-within .nav-list--field { display: none; }
.nav-list a:focus-visible { background: var(--c-block); color: var(--c-ink); }

/* Mobile / tablet: top bar with hamburger */
@media (max-width: 1024px) {
	.site-nav {
		top: 0; left: 0; right: 0; bottom: auto;
		width: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 12px 20px;
		background: var(--c-block);
		border-right: 0;
		border-bottom: 1px solid var(--c-line);
	}
	.nav-brand { display: block; font-size: var(--t-sm); font-weight: 600; }
	.nav-brand a { text-decoration: none; }
	.nav-toggle {
		display: inline-flex; align-items: center; gap: 8px;
		background: none; border: 0; color: inherit;
		font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .1em;
		font-size: var(--t-xs);
	}
	.nav-toggle-icon { display: inline-grid; gap: 4px; }
	.nav-toggle-icon span { width: 22px; height: 2px; background: currentColor; display: block; }
	/* The desktop ink-clipping wrapper must not become the containing block of
	   the absolute dropdown here — remove it from layout so the dropdown anchors
	   to the fixed top bar (.site-nav) like it always did. */
	.nav-stack { display: contents; }
	.nav-list {
		position: absolute; top: 100%; left: 0; right: 0;
		background: var(--c-block);
		border-bottom: 1px solid var(--c-line);
		padding: 12px 20px 20px;
		gap: 2px;
		display: none;
	}
	.site-nav.is-open .nav-list { display: flex; }
	.nav-list a { font-size: var(--t-sm); padding: 10px 4px; }
	/* The clipped twin is a desktop-only device; the mobile bar is solid black. */
	.nav-list--field { display: none; }

	/* Clear the fixed top bar. */
	body:not(.home) main { padding-top: 56px; }
	.home #intro { padding-top: 88px; }
	.page-header { top: 56px; }
}

/* =========================================================================
   Homepage hero (#intro)
   ========================================================================= */
.section--hero .eyebrow { margin-bottom: 20px; color: var(--c-ink-on-field); opacity: .85; }
.hero-title {
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.03em;
	line-height: 0.92;
	font-size: var(--t-hero);
	color: var(--c-ink-on-field);
	max-width: 14ch;
}
.hero-lead {
	margin-top: 28px;
	max-width: 40ch;
	font-size: var(--t-lg);
	font-weight: 500;
	color: var(--c-ink-on-field);
}
.hero-lead p { margin-bottom: .6em; }
/* keyword highlight (inverted block) if the copy wraps a word in <strong>/<mark> */
.hero-lead strong,
.hero-title mark, .hero-title strong {
	background: var(--c-block);
	color: var(--c-field);
	padding: 0 .12em;
	font-weight: inherit;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.scroll-cue {
	display: inline-flex; align-items: center; gap: 8px;
	margin-top: 44px;
	text-transform: uppercase; letter-spacing: .18em; font-size: var(--t-xs);
	color: var(--c-ink-on-field); text-decoration: none;
}
.scroll-cue svg { animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(4px);} }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }

/* =========================================================================
   Topic page hero (field band with big title)
   ========================================================================= */
.page-hero {
	min-height: 46vh;
	display: flex;
	align-items: flex-end;
	padding-bottom: clamp(40px, 6vw, 72px);
}
.page-hero .eyebrow { margin-bottom: 16px; color: var(--c-ink-on-field); opacity: .85; }
.page-title {
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.03em;
	line-height: 0.92;
	font-size: clamp(2.6rem, 7.5vw, 5.2rem);
	color: var(--c-ink-on-field);
	max-width: 16ch;
}
.page-lead {
	margin-top: 18px;
	max-width: 46ch;
	font-size: var(--t-lg);
	font-weight: 500;
	color: var(--c-ink-on-field);
}
.page-hero .actions { margin-top: 28px; }

/* =========================================================================
   Section headings
   ========================================================================= */
.section-index { display: inline-block; color: var(--c-signal); margin-bottom: 14px; }
.section-index--dark { color: var(--c-ink-on-field); }
.section-title {
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: -0.03em;
	line-height: 1;
	font-size: clamp(2rem, 5vw, 3.6rem);
	margin-bottom: 28px;
}
.section--field .section-title { color: var(--c-ink-on-field); }
.section-lead { max-width: 60ch; margin-bottom: 40px; }

/* =========================================================================
   Prose (post content)
   ========================================================================= */
.prose { max-width: 65ch; color: var(--c-ink); }
.prose p { margin-bottom: 1.1em; }
.prose a {
	color: var(--c-signal-soft);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--c-signal); }
.prose strong { color: var(--c-ink); font-weight: 600; }
.prose h2, .prose h3 { font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; margin: 1.6em 0 .5em; }
.prose h2 { font-size: var(--t-xl); }
.prose h3 { font-size: var(--t-lg); }
.prose ul, .prose ol { margin: 0 0 1.1em 1.2em; }
.prose ul { list-style: none; margin-left: 0; }
.prose ul li { position: relative; padding-left: 1.4em; margin-bottom: .5em; }
.prose ul li::before {
	content: ""; position: absolute; left: 0; top: .7em;
	width: .55em; height: 2px; background: var(--c-signal);
}
.prose ol { list-style: decimal; }
.prose blockquote {
	border-left: 3px solid var(--c-field);
	padding-left: 1em; margin: 1.4em 0; color: var(--c-muted); font-style: italic;
}
.prose code { font-family: var(--f-mono); font-size: .9em; background: var(--c-panel-2); padding: .1em .35em; border-radius: 2px; }
.prose img { margin: 1.4em 0; }

/* Prose variant on the orange field */
.prose--on-field { color: var(--c-ink-on-field); max-width: 72ch; }
.prose--on-field a { color: var(--c-ink-on-field); text-decoration: underline; text-underline-offset: 3px; }
.prose--on-field a:hover { text-decoration-thickness: 2px; }
.prose--on-field strong { color: var(--c-ink-on-field); }
.prose--on-field em { font-style: italic; }
.prose--on-field ul li::before { background: var(--c-block); }

/* =========================================================================
   Two-column layouts (photo | text, contact)
   ========================================================================= */
.two-col {
	display: grid;
	grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}
.two-col--contact { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
@media (max-width: 860px) {
	.two-col, .two-col--contact { grid-template-columns: 1fr; }
	.two-col--contact .col-contact { order: 2; }
}
.photo-frame {
	position: relative;
	background: var(--c-field);
	padding: 12px;
}
/* height:auto keeps the intrinsic ratio whatever the frame width — never stretch */
.photo-frame img { filter: grayscale(1) contrast(1.05); width: 100%; height: auto; }
.photo-frame.is-empty { min-height: 320px; }
.photo-frame::after {
	content: ""; position: absolute; inset: 12px;
	border: 1px solid rgba(19,19,19,.25); pointer-events: none;
}
.photo-frame--square { max-width: 420px; }

/* Wide photo for the Talks page */
.talk-figure { max-width: 940px; margin-bottom: 44px; }
.talk-figure img { width: 100%; height: auto; filter: grayscale(.15) contrast(1.03); }

/* =========================================================================
   Project cards (projects page, archives, search)
   ========================================================================= */
.project-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-bottom: 44px;
}
.project-grid--list { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .project-grid, .project-grid--list { grid-template-columns: 1fr; } }

.project-card {
	background: var(--c-panel);
	border: 1px solid var(--c-line-strong);
	transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.project-card-link {
	display: flex; flex-direction: column; gap: 8px;
	height: 100%;
	padding: 24px;
	text-decoration: none;
}
.project-year { color: var(--c-muted); }
.project-title {
	font-weight: 800; letter-spacing: -.02em; line-height: 1.05;
	font-size: var(--t-lg); color: var(--c-ink);
}
.project-excerpt { color: var(--c-muted); font-size: var(--t-sm); flex: 1; }
.project-more { color: var(--c-signal); margin-top: 6px; opacity: 0; transition: opacity var(--dur) var(--ease); }
.project-card:hover {
	border-color: var(--c-signal);
	background: var(--c-panel-2);
	transform: translateY(-2px);
}
.project-card:hover .project-more { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
	.project-card { transition: border-color var(--dur) var(--ease); }
	.project-card:hover { transform: none; }
	.project-more { opacity: 1; }
}

/* =========================================================================
   Explore cards (homepage, on the orange field)
   ========================================================================= */
.explore-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin-top: 12px;
}
@media (max-width: 760px) { .explore-grid { grid-template-columns: 1fr; } }

.explore-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 230px;
	padding: 28px;
	background: var(--c-block);
	color: var(--c-ink);
	text-decoration: none;
	transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.explore-card:hover { background: #000; transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .explore-card:hover { transform: none; } }
.explore-glyph { width: 44px; height: 44px; color: var(--c-signal); margin-bottom: 6px; }
.explore-index { color: var(--c-muted); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .18em; }
.explore-title {
	font-weight: 800; letter-spacing: -.02em; line-height: 1.05;
	font-size: var(--t-xl); color: var(--c-ink);
}
.explore-desc { color: var(--c-muted); font-size: var(--t-sm); flex: 1; }
.explore-more { color: var(--c-signal); font-size: var(--t-lg); transition: transform var(--dur) var(--ease); align-self: flex-start; }
.explore-card:hover .explore-more { transform: translateX(6px); }

/* =========================================================================
   Buttons & actions
   ========================================================================= */
.actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 12px; }
.button {
	display: inline-block;
	font-family: var(--f-mono);
	text-transform: uppercase; letter-spacing: .12em; font-size: var(--t-xs);
	padding: 14px 26px;
	background: var(--c-signal);
	color: var(--c-block);
	text-decoration: none;
	border: 1px solid var(--c-signal);
	transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.button:hover { background: transparent; color: var(--c-signal); }
/* On the orange field the button is a solid black block with warm-white text. */
.section--field .button { background: var(--c-block); color: var(--c-ink); border-color: var(--c-block); }
.section--field .button:hover { background: transparent; color: var(--c-block); }
/* plain links inside field leads: black + underline, so they read on orange */
.hero-lead a:not(.button), .page-lead a:not(.button) { color: var(--c-ink-on-field); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   Talks CTA
   ========================================================================= */
.talks-list { margin-bottom: 40px; }
.talks-cta { margin-top: 20px; max-width: 65ch; }
.cta-block {
	display: block;
	background: var(--c-panel);
	border: 1px solid var(--c-line-strong);
	color: var(--c-ink);
	padding: 28px 32px;
	text-decoration: none;
	font-family: var(--f-display);
	font-weight: 800;
	font-size: var(--t-lg);
	letter-spacing: -.01em;
	line-height: 1.25;
	transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.cta-block strong { display: inline-block; margin-top: 8px; color: var(--c-signal); font-weight: 800; }
.cta-block:hover { background: var(--c-panel-2); border-color: var(--c-signal); }
/* field variant (if ever placed on orange) */
.section--field .cta-block { background: var(--c-block); border-color: var(--c-block); color: var(--c-field); }
.section--field .cta-block:hover { background: #000; }

/* =========================================================================
   "Next" chained navigation band (topic pages)
   ========================================================================= */
.section--next { padding: clamp(44px, 7vw, 84px) 0; }
.next-link { display: block; text-decoration: none; color: var(--c-ink-on-field); }
.next-label {
	display: block;
	text-transform: uppercase; letter-spacing: .18em; font-size: var(--t-xs);
	margin-bottom: 10px; opacity: .7;
}
.next-title {
	display: inline-block;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -.03em;
	line-height: .95;
	font-size: clamp(2rem, 7vw, 4.5rem);
	transition: transform var(--dur) var(--ease);
}
.next-link:hover .next-title { transform: translateX(14px); }
@media (prefers-reduced-motion: reduce) { .next-link:hover .next-title { transform: none; } }

/* =========================================================================
   Contact section (shared part)
   ========================================================================= */
.section--contact { min-height: 55vh; display: flex; align-items: center; }
.contact-list { display: flex; flex-direction: column; gap: 4px; }
.contact-item { border-top: 1px solid var(--c-line); padding: 14px 0; }
.contact-item:last-child { border-bottom: 1px solid var(--c-line); }
.contact-label {
	display: block; color: var(--c-muted); text-transform: uppercase;
	letter-spacing: .18em; font-size: var(--t-xs); margin-bottom: 6px;
}
.contact-value {
	display: inline-flex; align-items: center; gap: 10px;
	color: var(--c-ink); text-decoration: none; font-size: var(--t-md);
	transition: color var(--dur) var(--ease);
}
.contact-value:hover { color: var(--c-signal); }
.social-icon { color: var(--c-signal-soft); flex: none; }
.contact-value:hover .social-icon { color: var(--c-signal); }

/* =========================================================================
   Resume page
   ========================================================================= */
.resume-timeline { margin-top: 12px; max-width: 900px; }
.resume-item {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 8px 28px;
	border-top: 1px solid var(--c-line);
	padding: 26px 0;
}
@media (max-width: 700px) { .resume-item { grid-template-columns: 1fr; gap: 6px; } }
.resume-period {
	color: var(--c-signal-soft);
	font-size: var(--t-xs);
	text-transform: uppercase;
	letter-spacing: .12em;
	padding-top: 5px;
}
.resume-role { font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-size: var(--t-xl); }
.resume-org {
	color: var(--c-muted);
	font-size: var(--t-xs);
	text-transform: uppercase;
	letter-spacing: .12em;
	margin: 6px 0 12px;
}
.resume-details { max-width: 62ch; }
.resume-details li { position: relative; padding-left: 1.4em; margin-bottom: .5em; font-size: var(--t-sm); color: var(--c-ink); }
.resume-details li::before {
	content: ""; position: absolute; left: 0; top: .7em;
	width: .55em; height: 2px; background: var(--c-signal);
}
.resume-details a { color: var(--c-signal-soft); text-underline-offset: 3px; }
.resume-details a:hover { color: var(--c-signal); }

.resume-skills, .resume-block { margin-top: 64px; }
.skill-group { margin-top: 26px; }
.skill-group-title {
	color: var(--c-muted); text-transform: uppercase;
	font-size: var(--t-xs); letter-spacing: .18em; margin-bottom: 12px;
	font-weight: 500;
}
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; max-width: 900px; }
.pill {
	border: 1px solid var(--c-line-strong);
	padding: 6px 12px;
	font-family: var(--f-mono);
	font-size: var(--t-xs);
	letter-spacing: .04em;
	color: var(--c-ink);
}

.pub-list { display: flex; flex-direction: column; gap: 0; max-width: 820px; }
.pub-list li { border-top: 1px solid var(--c-line); padding: 16px 0; }
.pub-list li:last-child { border-bottom: 1px solid var(--c-line); }
.pub-year { color: var(--c-signal); margin-right: 10px; font-size: var(--t-xs); letter-spacing: .12em; }
.pub-title { font-weight: 600; }
.pub-authors {
	display: block; margin-top: 4px;
	color: var(--c-muted); font-size: var(--t-xs); letter-spacing: .06em;
}
.pub-venue {
	display: block; margin-top: 4px;
	color: var(--c-muted); font-size: var(--t-xs);
	text-transform: uppercase; letter-spacing: .12em;
}
.resume-note { color: var(--c-muted); font-size: var(--t-sm); margin-top: 12px; }
.resume-note a { color: var(--c-signal-soft); }

/* =========================================================================
   Inner pages (single posts, archives, search, 404)
   ========================================================================= */
.inner-page { padding-top: 0; }
.page-header {
	position: sticky; top: 0; z-index: 90;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 16px 24px;
	background: var(--c-block);
	border-bottom: 1px solid var(--c-line);
}
.page-header-title { font-weight: 600; text-decoration: none; letter-spacing: .04em; }
.page-header-nav { display: flex; align-items: center; gap: 10px; color: var(--c-muted); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .12em; }
.page-header-nav a { text-decoration: none; }
.page-header-nav a:hover { color: var(--c-ink); }
.page-header-nav .sep { opacity: .5; }

.reading { max-width: var(--reading); }
.section--reading { min-height: 60vh; }
.entry-meta { color: var(--c-muted); margin-bottom: 12px; }
.entry-title {
	font-weight: 800; text-transform: uppercase; letter-spacing: -.03em;
	line-height: 1.02; font-size: clamp(1.8rem, 5vw, 3.2rem); margin-bottom: 28px;
}
.entry-content { margin-top: 8px; }
.entry-thumb { margin-bottom: 32px; }

/* thumbnail with orange bracket corners */
.bracket-frame { position: relative; padding: 10px; }
.bracket-frame::before, .bracket-frame::after {
	content: ""; position: absolute; width: 28px; height: 28px; pointer-events: none;
}
.bracket-frame::before { top: 0; left: 0; border-top: 2px solid var(--c-field); border-left: 2px solid var(--c-field); }
.bracket-frame::after  { bottom: 0; right: 0; border-bottom: 2px solid var(--c-field); border-right: 2px solid var(--c-field); }

.page-links { margin: 24px 0; display: flex; gap: 10px; font-size: var(--t-xs); }
.edit-link a { color: var(--c-signal-soft); text-transform: uppercase; letter-spacing: .12em; font-size: var(--t-xs); }
.edit-link--dark a { color: var(--c-block); }

/* =========================================================================
   404
   ========================================================================= */
.section--404 { min-height: 70vh; display: flex; align-items: center; }
.error-code { color: var(--c-signal); letter-spacing: .28em; margin-bottom: 16px; }
.error-title { font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(2.6rem, 10vw, 6rem); line-height: .9; }
.error-lead { margin: 20px 0 32px; }
.error-search { margin-top: 32px; }

/* =========================================================================
   Pagination & search form
   ========================================================================= */
.pagination { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .1em; }
.pagination a, .pagination .page-numbers {
	padding: 8px 14px; border: 1px solid var(--c-line-strong); text-decoration: none; color: var(--c-muted);
	transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.pagination a:hover { border-color: var(--c-signal); color: var(--c-ink); }
.pagination .current { border-color: var(--c-signal); color: var(--c-signal); }

.search-form, .archive-search, .error-search .search-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 480px; }
.archive-search { margin-bottom: 32px; }
.search-field {
	flex: 1; min-width: 180px;
	background: var(--c-panel); border: 1px solid var(--c-line-strong); color: var(--c-ink);
	padding: 12px 14px; font-family: var(--f-mono); font-size: var(--t-sm);
}
.search-field::placeholder { color: var(--c-muted); }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--c-block); border-top: 1px solid var(--c-line); padding: 32px 0; }
.site-footer .inner { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }
.footer-line { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--c-muted); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; }
.footer-line a { color: var(--c-signal-soft); text-decoration: none; }
.footer-line a:hover { color: var(--c-signal); }
.footer-line .sep { opacity: .4; }

/* =========================================================================
   Comments (minimal)
   ========================================================================= */
.comments-area { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--c-line); }
.comments-title { font-size: var(--t-xl); margin-bottom: 20px; }
.comment-list { display: flex; flex-direction: column; gap: 20px; }
.comment-list ol { list-style: none; margin-left: 20px; }

/* =========================================================================
   Reveal on scroll
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
	/* Only hide-before-reveal when JS is present to bring it back. */
	.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
	.js .reveal.is-visible { opacity: 1; transform: none; }
}
