/* ============================================================
   Michal Ptaszynski — site stylesheet
   Aesthetic: minimal, scientific, easy on the eye.
   Edit a CSS variable to restyle the whole site.
   ============================================================ */

:root {
	/* Type */
	--font-serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
	--font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
	--font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	/* Light palette (default) */
	--bg: #fafaf7;
	--surface: #ffffff;
	--ink: #1a1a1a;
	--ink-soft: #4a4a4a;
	--muted: #7a7a7a;
	--line: #e7e3da;
	--line-strong: #cfcabd;
	--accent: #1f3a5f;
	--accent-soft: #3d6391;
	--accent-bg: rgba(31, 58, 95, 0.06);
	--accent-bg-strong: rgba(31, 58, 95, 0.12);
	--shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);

	/* Layout */
	--maxw: 760px;
	--maxw-wide: 1040px;
	--radius: 6px;
	--radius-lg: 10px;
}

:root[data-theme="dark"] {
	--bg: #0f1012;
	--surface: #18191c;
	--ink: #e9e8e3;
	--ink-soft: #c2c0b8;
	--muted: #8d8b83;
	--line: #2a2b30;
	--line-strong: #3b3c42;
	--accent: #8fb3e1;
	--accent-soft: #c5d8f0;
	--accent-bg: rgba(143, 179, 225, 0.10);
	--accent-bg-strong: rgba(143, 179, 225, 0.18);
	--shadow: 0 1px 2px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.25);
}

* { box-sizing: border-box; }

html {
	font-size: 17px;
	scroll-behavior: smooth;
	overflow-x: clip; /* guard against stray horizontal scroll; keeps sticky working */
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-serif);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

/* Headings */
h1, h2, h3, h4 {
	font-family: var(--font-sans);
	font-weight: 600;
	color: var(--ink);
	letter-spacing: -0.01em;
	line-height: 1.25;
}

h1 { font-size: 1.95rem; margin: 0 0 .35rem; }
h2 { font-size: 1.25rem; margin: 1.4rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1rem 0 .35rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
h4 { font-size: .95rem; margin: .75rem 0 .2rem; }

p { margin: 0 0 .7rem; }

/* Links — quiet by default, accent on hover */
a {
	color: var(--accent);
	text-decoration: none;
	border-bottom: 1px solid var(--accent-bg-strong);
	transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

a:hover,
a:focus-visible {
	color: var(--accent-soft);
	border-bottom-color: var(--accent);
	background: var(--accent-bg);
}

a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Skip link for accessibility */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--accent);
	color: #fff;
	padding: .5rem 1rem;
	border: 0;
	z-index: 999;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Site header
   ============================================================ */

.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
}

.site-header__inner {
	max-width: var(--maxw-wide);
	margin: 0 auto;
	padding: .65rem 1.25rem;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 1rem;
	align-items: center;
}

.site-brand {
	display: flex;
	flex-direction: column;
	color: var(--ink);
	border: 0;
	line-height: 1.1;
	min-width: 0;
}
.site-brand:hover { background: transparent; color: var(--accent); }
.site-brand__name {
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.site-brand__role {
	font-family: var(--font-sans);
	font-size: .75rem;
	color: var(--muted);
	letter-spacing: .02em;
	margin-top: .1rem;
}

.site-nav {
	display: flex;
	justify-content: flex-start;
	gap: .05rem;
	flex-wrap: nowrap;
	white-space: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
	font-family: var(--font-sans);
	font-size: .86rem;
	color: var(--ink-soft);
	padding: .3rem .5rem;
	border-radius: var(--radius);
	border: 0;
	flex-shrink: 0;
}
.site-nav a:hover {
	color: var(--accent);
	background: var(--accent-bg);
}
.site-nav a[aria-current="page"] {
	color: var(--accent);
	background: var(--accent-bg);
	font-weight: 600;
}

.site-utility {
	display: flex;
	align-items: center;
	gap: .5rem;
}

/* Search trigger + theme toggle — compact square icon buttons */
.theme-toggle,
.site-search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink-soft);
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.theme-toggle:hover,
.site-search-btn:hover,
.site-search-btn:focus-visible {
	color: var(--accent);
	border-color: var(--accent-soft);
	background: var(--accent-bg);
}
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }

.lang-switcher {
	display: inline-flex;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.lang-btn {
	font-family: var(--font-sans);
	font-size: .75rem;
	padding: .25rem .55rem;
	background: var(--surface);
	color: var(--muted);
	border: 0;
	border-left: 1px solid var(--line);
	cursor: pointer;
}
.lang-btn:first-child { border-left: 0; }
.lang-btn:not(:disabled):hover { color: var(--accent); background: var(--accent-bg); }
.lang-btn.is-active { color: var(--ink); background: var(--accent-bg); font-weight: 600; }
.lang-btn:disabled { cursor: not-allowed; opacity: .55; }

/* ============================================================
   Main / page layout
   ============================================================ */

.page {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 1.5rem 1.25rem 2.5rem;
}
.page--wide { max-width: var(--maxw-wide); }

.page-title {
	font-size: 2rem;
	margin-bottom: .2rem;
	letter-spacing: -0.02em;
}
.page-lede {
	color: var(--muted);
	font-style: italic;
	margin-bottom: 1.25rem;
	font-size: .98rem;
	max-width: 65ch;
	line-height: 1.5;
}

.section-heading {
	font-family: var(--font-sans);
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .14em;
	color: var(--muted);
	margin: 1.6rem 0 .65rem;
	padding-bottom: .35rem;
	border-bottom: 1px solid var(--line);
	position: relative;
}
.section-heading::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 40px;
	height: 1px;
	background: var(--accent);
}

/* ============================================================
   Hero (home)
   ============================================================ */

.hero {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1.75rem;
	align-items: center;
	margin: .35rem 0 1.5rem;
	padding: .75rem 0;
	position: relative;
}
.hero::before {
	content: "";
	position: absolute;
	inset: -1.5rem -1.25rem auto auto;
	width: 170px;
	height: 170px;
	border-radius: 50%;
	background: radial-gradient(circle, var(--accent-bg-strong) 0%, transparent 70%);
	z-index: -1;
	pointer-events: none;
}
.hero__text h1 {
	margin: 0 0 .2rem;
	font-size: 2.15rem;
	letter-spacing: -0.02em;
}
.hero__role {
	font-family: var(--font-sans);
	color: var(--accent);
	font-size: .9rem;
	margin: 0 0 .55rem;
	font-weight: 500;
}
.hero__lede {
	font-size: 1.02rem;
	color: var(--ink-soft);
	margin: 0;
	max-width: 60ch;
	line-height: 1.55;
}
.hero__portrait img {
	width: 130px;
	height: 130px;
	object-fit: cover;
	border-radius: 50%;
	box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
	border: 4px solid var(--surface);
	transition: transform .3s ease;
}
.hero__portrait img:hover { transform: scale(1.03); }
:root[data-theme="dark"] .hero__portrait img {
	box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.3);
}

/* ============================================================
   Entry-point cards
   ============================================================ */

.entrypoints {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: .75rem;
	margin: 1.1rem 0 1.4rem;
}

.card {
	display: block;
	padding: .95rem 1rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	color: inherit;
	border-bottom: 1px solid var(--line);
	transition: transform .2s cubic-bezier(.2,.7,.3,1), border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
	position: relative;
	overflow: hidden;
}
.card::after {
	content: "";
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	height: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s cubic-bezier(.2,.7,.3,1);
}
.card:hover {
	transform: translateY(-3px);
	border-color: var(--accent-soft);
	box-shadow: 0 6px 20px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
	background: var(--surface);
}
.card:hover::after { transform: scaleX(1); }
:root[data-theme="dark"] .card:hover {
	box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.card h2 {
	margin: 0 0 .25rem;
	font-size: 1.02rem;
	color: var(--accent);
}
.card p {
	margin: 0;
	color: var(--ink-soft);
	font-size: .88rem;
	line-height: 1.45;
}

/* ============================================================
   News / latest
   ============================================================ */

.news-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.news-list li {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 1rem;
	padding: .55rem 0;
	border-bottom: 1px dashed var(--line);
	transition: background .15s ease;
}
.news-list li:last-child { border-bottom: 0; }
.news-list li:hover { background: var(--accent-bg); margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; border-radius: var(--radius); }
.news-list time {
	font-family: var(--font-sans);
	font-size: .75rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .1em;
	padding-top: .15rem;
	font-weight: 500;
}
.news-list p { margin: 0; color: var(--ink-soft); line-height: 1.5; font-size: .94rem; }

.news-rss {
	float: right;
	font-family: var(--font-sans);
	font-size: .65rem;
	font-weight: 700;
	color: var(--accent);
	letter-spacing: .12em;
	padding: .1rem .45rem;
	background: var(--accent-bg);
	border: 0;
	border-radius: 999px;
	margin-top: -.1rem;
}
.news-rss:hover {
	color: #fff;
	background: var(--accent);
	border-bottom: 0;
}
:root[data-theme="dark"] .news-rss:hover { color: var(--bg); }

/* ============================================================
   Profiles / social icon grid
   ============================================================ */

.profile-group { margin: .85rem 0; }
.profile-group h3 {
	margin: 0 0 .4rem;
	font-size: .7rem;
	color: var(--muted);
}
.profile-icons {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}
.profile-icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 6px;
	background: var(--surface);
	/* Thin, low-contrast hairline (mixes the line color toward the surface) */
	border: 1px solid color-mix(in srgb, var(--line) 55%, var(--surface));
	border-radius: var(--radius);
	transition: transform .18s cubic-bezier(.2,.7,.3,1), border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.profile-icons a:hover {
	transform: translateY(-2px) scale(1.05);
	border-color: var(--accent-soft);
	background: var(--accent-bg);
	box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.profile-icons img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* Theme-aware icon variants: show the light-theme image by default,
   swap to the dark-theme image when the dark palette is active. */
.theme-img-dark { display: none; }
:root[data-theme="dark"] .theme-img-light { display: none; }
:root[data-theme="dark"] .theme-img-dark { display: inline-block; }

/* ============================================================
   Split content (e.g. contact: English / Japanese side by side)
   ============================================================ */

.split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	margin: .75rem 0;
}
.split address {
	font-style: normal;
	color: var(--ink-soft);
	line-height: 1.55;
}

/* ============================================================
   Profile-page: Activities year-grouped list
   ============================================================ */

.activities-year {
	font-family: var(--font-sans);
	font-size: .98rem;
	font-weight: 600;
	color: var(--accent);
	margin: 1.1rem 0 .35rem;
	padding-bottom: .15rem;
	border-bottom: 1px solid var(--line);
	letter-spacing: 0;
	text-transform: none;
}
.activities-list {
	list-style: none;
	padding: 0;
	margin: 0 0 .3rem;
}
.activities-list li {
	font-size: .85rem;
	color: var(--ink-soft);
	line-height: 1.4;
	padding: .18rem 0 .18rem .8rem;
	border-left: 2px solid var(--line);
	margin-bottom: .05rem;
	transition: border-color .15s ease;
}
.activities-list li:hover { border-left-color: var(--accent); }

/* ============================================================
   Misc utility
   ============================================================ */

.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: .85rem; }
hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 1.5rem 0;
}

/* ============================================================
   Site footer
   ============================================================ */

.site-footer {
	border-top: 1px solid var(--line);
	background: var(--surface);
	margin-top: 2.5rem;
}
.site-footer__inner {
	max-width: var(--maxw-wide);
	margin: 0 auto;
	padding: 1rem 1.25rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	font-family: var(--font-sans);
	font-size: .82rem;
	color: var(--muted);
}
.site-footer__quote { margin: 0; max-width: 540px; text-align: right; }
.site-footer__cite { display: inline-block; margin-left: .35rem; color: var(--muted); }
.site-footer__copy { margin: 0; }

/* ============================================================
   Responsive
   ============================================================ */

/* ============================================================
   Support / tip-jar
   ============================================================ */

.support {
	margin: 1rem 0 1.5rem;
	padding: .7rem 1rem;
	background: var(--accent-bg);
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent);
	border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .45rem .8rem;
}
.support__label {
	font-family: var(--font-sans);
	font-weight: 600;
	font-size: .9rem;
	color: var(--ink);
}
.support__links {
	--badge-h: 34px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .55rem;
}
/* Uniform-height badge strip: forces a heterogeneous set of brand
   buttons (CDN PNGs, theme-aware logos, the Ko-fi JS widget) onto one
   shared baseline so the row reads as a tidy strip, not a jumble. */
.support__links > a {
	display: inline-flex;
	align-items: center;
	border: 0;
	border-radius: 7px;
	line-height: 0;
	transition: transform .15s ease, box-shadow .15s ease;
}
.support__links > a:hover,
.support__links > a:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,.13);
	background: transparent;
}
.support__links img {
	height: var(--badge-h);
	width: auto;
	max-width: none;
	border-radius: 7px;
	vertical-align: middle;
}
/* Ko-fi inline widget → fold into the same height/rhythm. */
.support__links .btn-container,
.support__links > div { display: inline-flex !important; align-items: center; margin: 0 !important; }
.support__links .kofi-button {
	height: var(--badge-h) !important;
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	padding: 0 .85rem !important;
	border-radius: 7px !important;
	line-height: 1 !important;
	box-shadow: none !important;
	font-family: var(--font-sans) !important;
	font-size: .8rem !important;
}
.support__links img.kofiimg {
	height: 16px !important;
	width: auto !important;
	border-radius: 0 !important;
	margin: 0 .4rem 0 0 !important;
}

/* Legacy pill button (kept for any other use) */
.support__btn {
	font-family: var(--font-sans);
	font-size: .8rem;
	font-weight: 500;
	padding: .28rem .7rem;
	border-radius: 999px;
	border: 1px solid var(--line-strong);
	background: var(--surface);
	color: var(--ink-soft);
	white-space: nowrap;
}
.support__btn:hover,
.support__btn:focus-visible {
	color: #fff;
	background: var(--accent);
	border-color: var(--accent);
}
:root[data-theme="dark"] .support__btn:hover,
:root[data-theme="dark"] .support__btn:focus-visible { color: var(--bg); }

/* ============================================================
   Profile TOC — compact-on-scroll (base styles live inline in
   each profile page; these win via higher specificity)
   ============================================================ */

.profile-toc { transition: padding .18s ease, box-shadow .18s ease; }
.profile-toc.is-compact {
	padding-top: .4rem;
	padding-bottom: .4rem;
	box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
:root[data-theme="dark"] .profile-toc.is-compact { box-shadow: 0 6px 18px rgba(0,0,0,0.55); }
.profile-toc.is-compact strong { display: none; }
.profile-toc.is-compact ul {
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.profile-toc.is-compact ul::-webkit-scrollbar { display: none; }
.profile-toc.is-compact ul li { flex-shrink: 0; }

/* ============================================================
   Site-wide search overlay
   ============================================================ */

.site-search-overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 8vh 1rem 1rem;
}
.site-search-overlay[hidden] { display: none; }
.site-search-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 16, 18, 0.5);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: search-fade .15s ease both;
}
.site-search-overlay__panel {
	position: relative;
	width: 100%;
	max-width: 620px;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-lg);
	box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.1);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	max-height: 80vh;
	transform-origin: top center;
	animation: search-expand .18s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes search-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes search-expand {
	from { opacity: 0; transform: translateY(-8px) scale(.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	.site-search-overlay__panel,
	.site-search-overlay__backdrop { animation: none; }
}
.site-search-overlay__inputrow {
	display: flex;
	align-items: center;
	gap: .65rem;
	padding: .75rem 1rem;
	border-bottom: 1px solid var(--line);
	color: var(--muted);
}
.site-search-overlay__input {
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 1rem;
	padding: .25rem 0;
}
.site-search-overlay__close {
	font-family: var(--font-sans);
	font-size: .7rem;
	letter-spacing: .08em;
	padding: .2rem .5rem;
	color: var(--muted);
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	cursor: pointer;
}
.site-search-overlay__close:hover { color: var(--accent); border-color: var(--accent-soft); }
.site-search-overlay__results {
	overflow-y: auto;
	max-height: 60vh;
}
.site-search-overlay__result {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: .65rem;
	padding: .55rem .9rem;
	border-bottom: 1px solid var(--line);
	color: var(--ink);
	border: 0;
	border-bottom: 1px solid var(--line);
	font-family: var(--font-sans);
}
.site-search-overlay__result:hover,
.site-search-overlay__result.is-active {
	background: var(--accent-bg);
	color: var(--ink);
}
.site-search-overlay__result:last-child { border-bottom: 0; }
.site-search-overlay__result.is-fallback { color: var(--accent); }
.site-search-overlay__kind {
	font-size: .65rem;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--muted);
	padding-top: .1rem;
}
.site-search-overlay__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.site-search-overlay__body strong {
	font-weight: 600;
	font-size: .93rem;
}
.site-search-overlay__snippet {
	font-size: .8rem;
	color: var(--ink-soft);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.site-search-overlay__empty {
	margin: 0;
	padding: 1rem;
	font-family: var(--font-sans);
	color: var(--muted);
	font-size: .9rem;
	font-style: italic;
}
.site-search-overlay__footer {
	font-family: var(--font-sans);
	font-size: .72rem;
	color: var(--muted);
	padding: .45rem .9rem;
	background: var(--bg);
	border-top: 1px solid var(--line);
	text-align: right;
}
.site-search-overlay__footer kbd {
	font-family: var(--font-mono);
	font-size: .68rem;
	padding: .05rem .35rem;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: 3px;
	color: var(--ink-soft);
}
body.has-search-open { overflow: hidden; }

@media (max-width: 820px) {
	.site-header__inner {
		grid-template-columns: 1fr auto;
		gap: .6rem;
	}
	.site-nav {
		grid-column: 1 / -1;
		justify-content: flex-start;
		margin: 0 -.25rem;
		padding-bottom: .1rem;
	}
	.site-brand__role { display: none; }
	.hero { grid-template-columns: 1fr; text-align: left; }
	.hero__portrait img { width: 110px; height: 110px; }
	.entrypoints { grid-template-columns: 1fr; }
	.split { grid-template-columns: 1fr; }
	.site-footer__inner { flex-direction: column; align-items: flex-start; }
	.site-footer__quote { text-align: left; }
	.news-list li { grid-template-columns: 1fr; gap: .15rem; }

	/* The two-row mobile header is taller than the desktop one, so the
	   secondary sticky bars would tuck underneath it. Let them scroll with
	   the page on mobile and disable the (sticky-only) compress behavior.
	   #main prefix raises specificity above the per-page inline base rules. */
	#main .pubs-toolbar { position: static; top: auto; }
	#main .pubs-toolbar.is-compact { padding: .6rem .9rem; box-shadow: none; }
	#main .pubs-toolbar.is-compact .pubs-filters { display: flex; }
	#main .pubs-toolbar.is-compact .pubs-count { display: block; }
	#main .profile-toc { position: static; top: auto; }
	#main .profile-toc.is-compact { padding: .65rem .9rem; box-shadow: var(--shadow); }
	#main .profile-toc.is-compact strong { display: block; }
	#main .profile-toc.is-compact ul { flex-wrap: wrap; overflow-x: visible; }
	#main .pub-section, #main .pub-year { scroll-margin-top: 1rem; }
}

@media (max-width: 600px) {
	html { font-size: 16px; }
	.page { padding: 1.25rem 1rem 2rem; }
	.page-title { font-size: 1.75rem; }
	.hero__text h1 { font-size: 1.95rem; }
	/* Bigger, easier tap targets */
	.theme-toggle, .site-search-btn { width: 38px; height: 38px; }
	.lang-btn { padding: .4rem .6rem; font-size: .8rem; }
	.site-nav a { padding: .45rem .55rem; }
	/* Tip-jar buttons full-width-ish so they're easy to tap */
	.support { gap: .5rem; }
	.support__links { width: 100%; }
}

@media print {
	.site-header, .site-footer, .theme-toggle, .lang-switcher { display: none; }
	body { background: #fff; color: #000; }
	a { color: #000; border: 0; text-decoration: underline; }
}
