/* ---------- Fonts (self-hosted, latin + latin-ext for hr diacritics) ---------- */
@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-500-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-600-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-600-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-700-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'IBM Plex Mono';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/ibm-plex-mono-700-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url('../fonts/open-sans-300-800-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url('../fonts/open-sans-300-800-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens (design/untitled.pen variables) ---------- */
:root {
	--c-ink: #0e1440;          /* navy-900: page/nav/hero/footer */
	--c-ink-2: #141b54;        /* navy-800: raised dark panel */
	--c-ink-3: #232c74;        /* navy-700: events gradient end */
	--c-brand: #3840cf;        /* accent */
	--c-brand-hover: #565ee6;  /* accent-hover */
	--c-brand-soft: #8288f5;   /* readable accent on dark */
	--c-surface: #f4f0e7;      /* cream */
	--c-card: #ffffff;         /* cream-card */
	--c-text: #181d3e;         /* text-on-light */
	--c-text-inverse: #ffffff; /* text-on-dark */
	--c-text-inverse-dim: #a9afd6; /* text-muted-dark */
	--c-muted: #5b6079;        /* text-muted-light */
	--c-line: #2a3168;         /* border-dark */
	--c-line-soft: #dfe1f0;
	--radius-card: 14px;
	--radius-panel: 16px;
	--radius-pill: 999px;
	--radius-sm: 8px;
	--container: 1312px;
	--font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 15px;
	color: var(--c-text);
	background: var(--c-surface);
	line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
.container { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
h1, h2, h3, h4 { font-weight: 600; }

/* ---------- Shared components ---------- */
.kicker {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--c-brand);
	margin: 0;
}
.dark .kicker { font-weight: 600; color: var(--c-text-inverse-dim); }
.chip {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 12px;
	background: rgba(56, 64, 207, 0.25);
	color: var(--c-brand-soft);
}
.btn {
	display: inline-block;
	padding: 14px 28px;
	border-radius: 26px;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.25;
	text-decoration: none;
	border: 1px solid transparent;
}
.btn--primary { background: var(--c-brand); color: #fff; }
.btn--primary:hover { background: var(--c-brand-hover); }
.btn--pill { padding: 11px 20px; border-radius: var(--radius-pill); font-size: 14px; }
.card {
	background: var(--c-card);
	border-radius: var(--radius-card);
	overflow: hidden;
}

/* ---------- Header ---------- */
.site-header { background: var(--c-ink); color: var(--c-text-inverse); }
.site-header__inner {
	display: flex; align-items: center; gap: 32px;
	padding-block: 22px;
}
.site-logo {
	display: flex; align-items: center; gap: 12px;
	color: var(--c-text-inverse); text-decoration: none;
}
.site-logo__mark { display: inline-flex; }
.site-logo__mark svg { width: 36px; height: 36px; fill: currentColor; }
.site-logo__text { font-size: 18px; font-weight: 800; letter-spacing: 0.055em; line-height: 1.2; }
.site-logo__text small {
	display: block; font-family: var(--font-mono); font-weight: 500;
	font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase;
	color: var(--c-text-inverse-dim);
}
.site-nav { display: flex; align-items: center; gap: 34px; margin-left: auto; }
.site-nav__list {
	display: flex; gap: 10px; list-style: none; margin: 0; padding: 0;
}
.site-nav__list a {
	display: block; padding: 8px 12px; border-radius: var(--radius-sm);
	font-size: 14px; font-weight: 500; text-decoration: none; color: var(--c-text-inverse);
}
.site-nav__list a:hover { background: rgba(255, 255, 255, 0.08); }
.search-form label {
	display: flex; align-items: center; gap: 8px;
	width: 280px; max-width: 100%; padding: 10px 16px;
	background: var(--c-card);
	border: 1px solid var(--c-line-soft); border-radius: 20px;
	color: var(--c-muted);
}
.search-form svg { flex: none; }
.search-form input[type="search"] {
	background: none; border: 0; outline: 0; padding: 0;
	color: var(--c-text); font-size: 13px; font-family: var(--font-sans);
	width: 100%; min-width: 0;
}
.search-form input[type="search"]::placeholder { color: var(--c-muted); }
.menu-toggle { display: none; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--c-ink); color: var(--c-text-inverse);
	border-top: 1px solid var(--c-line);
}
.site-footer__grid {
	display: grid; grid-template-columns: 280px 1fr 1fr 1fr;
	gap: 56px; padding-block: 56px 44px;
}
.site-footer__name { font-size: 18px; font-weight: 800; letter-spacing: 0.055em; margin: 12px 0 6px; }
.site-footer__desc {
	font-family: var(--font-mono); font-size: 13px; line-height: 1.5;
	color: var(--c-text-inverse-dim); margin: 0;
}
.site-footer__social { list-style: none; display: flex; gap: 10px; margin: 18px 0 0; padding: 0; }
.site-footer__social a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; border-radius: 17px;
	background: rgba(255, 255, 255, 0.07); border: 1px solid var(--c-line);
	color: var(--c-text-inverse);
}
.site-footer__social a:hover { border-color: var(--c-brand-soft); color: var(--c-brand-soft); }
.site-footer__heading {
	font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
	color: var(--c-text-inverse); margin: 0 0 14px;
}
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list a {
	display: block; padding-block: 7px; font-size: 13px;
	color: var(--c-text-inverse-dim); text-decoration: none;
}
.site-footer__list a:hover { color: var(--c-text-inverse); }
.site-footer__bottom {
	display: flex; justify-content: space-between; align-items: center; gap: 24px;
	border-top: 1px solid var(--c-line);
	padding-block: 20px 32px;
	font-size: 12px; color: var(--c-text-inverse-dim);
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-footer__bottom-links a { text-decoration: none; color: var(--c-text-inverse-dim); }
.site-footer__bottom-links a:hover { color: var(--c-text-inverse); }

/* ---------- Hero ---------- */
.hero { background: var(--c-ink); color: var(--c-text-inverse); }
.hero__inner {
	display: grid; grid-template-columns: 1.24fr 1fr;
	gap: 56px; align-items: center; padding-block: 60px 72px;
}
.hero .chip {
	background: rgba(56, 64, 207, 0.16);
	border: 1px solid var(--c-brand);
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 12px;
	color: var(--c-brand-soft);
}
.hero__title { font-size: clamp(34px, 4vw, 58px); line-height: 1.08; margin: 26px 0 0; }
.hero__intro {
	font-family: var(--font-mono); font-size: 15px; line-height: 1.55; font-weight: 400;
	color: var(--c-text-inverse-dim); max-width: 520px; margin: 26px 0 0;
}
.hero__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 26px 0 0; }
.hero__secondary {
	display: inline-flex; align-items: center; gap: 8px;
	color: var(--c-text-inverse); font-size: 15px; font-weight: 500; text-decoration: none;
}
.hero__secondary:hover { color: var(--c-brand-soft); }
.hero__art img { display: block; width: 100%; }

/* ---------- Highlights strip (TopicsBar) ---------- */
.highlights { background: var(--c-ink); padding-bottom: 76px; }
.highlights__grid {
	display: grid; grid-template-columns: repeat(4, 1fr);
	background: var(--c-ink-2);
	border: 1px solid var(--c-line); border-radius: var(--radius-panel);
	overflow: hidden;
}
.highlight {
	padding: 26px; min-height: 210px;
	display: flex; flex-direction: column; gap: 14px;
	border-left: 1px solid var(--c-line);
}
.highlight:first-child { border-left: 0; }
.highlight__meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.highlight .kicker { font-weight: 600; letter-spacing: 0.09em; color: var(--c-text-inverse-dim); }
.highlight__title { font-size: 16px; line-height: 1.28; margin: 0; flex: 1; }
.highlight__title a { color: var(--c-text-inverse); text-decoration: none; }
.highlight__more {
	font-size: 13px; font-weight: 500;
	color: var(--c-brand-soft); text-decoration: none;
}

/* ---------- Section headers ---------- */
.section-head {
	display: flex; justify-content: space-between; align-items: flex-end;
	gap: 24px; margin-bottom: 44px;
}
.section-head--center {
	flex-direction: column; align-items: center; text-align: center;
	gap: 18px; margin-bottom: 56px;
}
.section-head--center .section-head__sub { max-width: 640px; }
.section-head__title { font-size: clamp(28px, 3vw, 42px); line-height: 1.15; margin: 0; }
.section-head__sub {
	font-family: var(--font-mono); font-size: 16px; font-weight: 400; line-height: 1.5;
	color: var(--c-muted); margin: 10px 0 0;
}
.dark .section-head__sub { color: var(--c-text-inverse-dim); }

/* ---------- News grid ---------- */
.news { padding-block: 72px; }
.news__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: var(--c-card); border-radius: var(--radius-card); overflow: hidden; display: flex; flex-direction: column; }
.post-card--featured { grid-column: span 2; grid-row: span 2; }
.post-card__media { display: block; aspect-ratio: 16 / 9; background: var(--c-ink-2); }
.post-card--featured .post-card__media { aspect-ratio: auto; flex: 1; min-height: 260px; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.post-card--featured .post-card__body { flex: none; }
.post-card__title { margin: 0; font-size: 19px; line-height: 1.15; }
.post-card--featured .post-card__title { font-size: 28px; }
.post-card__title a { text-decoration: none; color: var(--c-text); }
.post-card__more { font-size: 13px; color: var(--c-brand); text-decoration: none; margin-top: auto; }
.post-card--featured .post-card__more { color: var(--c-muted); }

/* ---------- Events ---------- */
.events {
	background: linear-gradient(180deg, var(--c-ink) 0%, var(--c-ink-3) 100%);
	color: var(--c-text-inverse); padding-block: 84px;
}
.events__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 56px; }
.event-card__media {
	display: block; height: 240px; background: var(--c-ink-2);
	border-radius: var(--radius-card); overflow: hidden;
}
.event-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-card__head { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.event-card__title { font-size: 20px; line-height: 1.3; margin: 0; flex: 1; }
.event-card__title a { color: var(--c-text-inverse); text-decoration: none; }
.event-card__arrow { color: var(--c-brand-soft); font-size: 18px; }
.event-card__meta { font-family: var(--font-mono); font-size: 13px; color: var(--c-text-inverse-dim); margin: 6px 0 0; }
.events__list-title { font-size: 30px; margin: 0 0 34px; }
.events__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 56px; }
.event-row {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding-bottom: 16px; border-bottom: 1px solid var(--c-line);
}
.event-row__title { color: var(--c-text-inverse); font-size: 18px; font-weight: 700; text-decoration: none; }
.event-row__meta { font-family: var(--font-mono); font-size: 13px; color: var(--c-text-inverse-dim); margin: 5px 0 0; }
.event-row__cta { font-size: 13px; font-weight: 600; color: var(--c-brand-soft); text-decoration: none; white-space: nowrap; }

/* ---------- Inner pages ---------- */
.container--narrow { max-width: 780px; }
.page-head { padding-block: 48px 24px; }
.page-head__title { font-size: clamp(28px, 3.6vw, 42px); margin: 8px 0 0; }
.archive-page { padding-bottom: 72px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pagination-wrap { margin-top: 40px; }
.pagination-wrap .nav-links { display: flex; gap: 8px; justify-content: center; }
.prose { max-width: 68ch; }
.prose img { border-radius: var(--radius-card); }
.single-hero-img { margin: 0 0 24px; }
.single-hero-img img { border-radius: var(--radius-card); width: 100%; }
.event-box {
	background: var(--c-card); border: 1px solid var(--c-line-soft); border-radius: var(--radius-card);
	padding: 20px 24px; margin-bottom: 28px;
	display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.event-box__meta { font-family: var(--font-mono); font-size: 14px; margin: 0; }
.static-page__layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding-block: 48px 72px; }
.static-page__layout > article:only-child { grid-column: 1 / -1; }
.section-nav__top a { font-weight: 700; text-decoration: none; }
.section-nav ul { list-style: none; padding: 0; margin: 12px 0 0; }
.section-nav li a { display: block; padding-block: 6px; font-size: 14px; text-decoration: none; }
.section-nav li.current_page_item > a { color: var(--c-brand); font-weight: 600; }

/* ---------- Animations (all gated on motion preference) ---------- */
.btn { transition: background-color 0.25s ease, transform 0.25s ease; }
.post-card, .event-card, .highlight { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.post-card__media img, .event-card__media img { transition: transform 0.5s ease; }
.highlight__more, .post-card__more, .event-row__cta, .hero__secondary,
.site-footer__list a, .site-footer__social a, .site-footer__bottom-links a { transition: color 0.2s ease, border-color 0.2s ease; }

@media (prefers-reduced-motion: no-preference) {
	.btn--primary:hover { transform: translateY(-1px); }
	.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(14, 20, 64, 0.12); }
	.post-card:hover .post-card__media img { transform: scale(1.04); }
	.event-card:hover .event-card__media img { transform: scale(1.04); }
	.highlight:hover { transform: translateY(-2px); }

	.hero .chip, .hero__title, .hero__intro, .hero__actions {
		animation: hero-rise 0.7s ease backwards;
	}
	.hero .chip { animation-delay: 0.05s; }
	.hero__title { animation-delay: 0.15s; }
	.hero__intro { animation-delay: 0.3s; }
	.hero__actions { animation-delay: 0.45s; }
	.hero__art { animation: hero-art 0.9s ease 0.25s backwards; }

	html.js-reveal .reveal {
		opacity: 0; transform: translateY(22px);
		transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
		transition-delay: var(--reveal-delay, 0ms);
	}
	html.js-reveal .reveal.is-visible {
		opacity: 1; transform: none;
		transition: transform 0.3s ease, box-shadow 0.3s ease;
		transition-delay: 0ms;
	}
}

@keyframes hero-rise {
	from { opacity: 0; transform: translateY(22px); }
}
@keyframes hero-art {
	from { opacity: 0; transform: translateY(10px) scale(0.985); }
}

/* ---------- Mobile (mockup reference: 390px) ---------- */
@media (max-width: 860px) {
	.menu-toggle {
		display: block; margin-left: auto;
		background: none; border: 0; padding: 10px; cursor: pointer;
	}
	.menu-toggle__bars,
	.menu-toggle__bars::before,
	.menu-toggle__bars::after {
		content: ""; display: block; width: 22px; height: 2px;
		background: var(--c-text-inverse); margin: 5px 0;
	}
	.site-header { position: relative; }
	.site-header__inner { padding-block: 16px; }
	.site-nav {
		display: none; position: absolute; inset: 72px 0 auto 0;
		flex-direction: column; align-items: stretch; gap: 16px;
		background: var(--c-ink); padding: 12px 20px 24px; z-index: 10;
		border-bottom: 1px solid var(--c-line);
	}
	.site-nav.is-open { display: flex; }
	.site-nav__list { flex-direction: column; }
	.search-form label { width: 100%; }

	.hero__inner { grid-template-columns: 1fr; gap: 36px; padding-block: 40px 48px; }
	.hero__title { font-size: clamp(30px, 8.5vw, 38px); }
	.highlights { padding-bottom: 56px; }
	.highlights__grid { grid-template-columns: 1fr; }
	.highlight { border-left: 0; border-top: 1px solid var(--c-line); min-height: 0; }
	.highlight:first-child { border-top: 0; }

	.news { padding-block: 56px; }
	.news__grid, .events__cards, .events__list { grid-template-columns: 1fr; }
	.post-card--featured { grid-column: auto; grid-row: auto; }
	.post-card--featured .post-card__media { aspect-ratio: 16 / 9; min-height: 0; flex: none; }
	.post-card--featured .post-card__title { font-size: 22px; }
	.section-head { flex-direction: column; align-items: flex-start; }
	.events { padding-block: 56px; }
	.event-card__media { height: 200px; }

	.site-footer__grid { grid-template-columns: 1fr; gap: 32px; padding-block: 40px 32px; }
	.site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
	.archive-grid { grid-template-columns: 1fr; }
	.static-page__layout { grid-template-columns: 1fr; gap: 24px; }
}
