/* Anita Racz – personal portfolio
   One-page vcard: the header menu slides content panels horizontally (#scroller),
   the portfolio pages slide vertically inside #workmask. */

:root {
	--navy: #083B66;
	--navy-soft: #1B5486;
	--orange: #E78200;
	--orange-ink: #A65D00;
	--bg: #F3F6F9;
	--surface: #FFFFFF;
	--surface-2: #F7F9FC;
	--ink: #14202B;
	--muted: #5B6775;
	--line: #E3E8EF;
	--chip: #EEF2F7;
	--heading: var(--navy);
	--shadow: 0 1px 2px rgba(8, 30, 52, .06), 0 12px 32px -8px rgba(8, 30, 52, .14), 0 40px 80px -24px rgba(8, 30, 52, .18);
	--radius: 22px;
	--ease: cubic-bezier(.65, 0, .35, 1);
	--slide: 760ms;
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color-scheme: light;
}


*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	font: 400 15px/1.6 var(--sans);
	color: var(--ink);
	background:
		radial-gradient(1100px 600px at 12% -10%, color-mix(in srgb, var(--navy) 10%, transparent), transparent 70%),
		radial-gradient(900px 500px at 105% 110%, color-mix(in srgb, var(--orange) 12%, transparent), transparent 70%),
		var(--bg);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--heading); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--heading); margin: 0; letter-spacing: -.01em; font-optical-sizing: auto; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/*---------------------------------- Wrapper / vcard ----------------------------------*/
#wrapper {
	min-height: 100%;
	display: grid;
	place-items: center;
	padding: 32px 24px;
}
#vcard {
	position: relative;
	width: min(1140px, 100%);
	height: clamp(620px, calc(100dvh - 64px), 780px);
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	isolation: isolate;
}
/* thin brand line on top of the card */
#vcard::before {
	content: "";
	position: absolute; inset: 0 0 auto 0; height: 4px;
	background: linear-gradient(90deg, var(--navy) 0 62%, var(--orange) 62% 100%);
	z-index: 3;
}

/*---------------------------------- Header ----------------------------------*/
#header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 26px 40px 0;
	flex: none;
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; }
.brand-logo { display: grid; place-items: center; border-radius: 10px; }
.brand-logo img { height: 34px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; padding-left: 16px; border-left: 1px solid var(--line); }
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--heading); }
.brand-role { font-size: 12.5px; color: var(--muted); }

#menu { position: relative; display: flex; gap: 4px; }
#menu a {
	display: flex; align-items: baseline; gap: 7px;
	padding: 10px 14px 14px;
	font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
	color: var(--muted); text-decoration: none;
	transition: color .25s;
}
#menu a .num { font-size: 10.5px; letter-spacing: .04em; color: var(--orange-ink); opacity: .55; transition: opacity .25s; font-variant-numeric: tabular-nums; }
#menu a:hover, #menu a[aria-selected="true"] { color: var(--heading); }
#menu a[aria-selected="true"] .num, #menu a:hover .num { opacity: 1; }
#menu .indicator {
	position: absolute; left: 0; bottom: 4px; height: 2px; width: 0;
	background: var(--orange); border-radius: 2px;
	transition: transform var(--slide) var(--ease), width var(--slide) var(--ease);
}

/*---------------------------------- Content / horizontal scroller ----------------------------------*/
#content {
	position: relative;
	flex: 1;
	min-height: 0;
	margin-top: 18px;
	border-top: 1px solid var(--line);
	overflow: hidden;
}
#scroller {
	display: flex;
	height: 100%;
	transition: transform var(--slide) var(--ease);
	will-change: transform;
}
/* inactive panels stay faintly visible so the slide reads as one strip */
.contentitem {
	flex: 0 0 100%;
	height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 40px 48px 30px;
	opacity: .3;
	transform: scale(.985);
	transition: opacity var(--slide) var(--ease), transform var(--slide) var(--ease);
	scrollbar-width: thin;
	display: flex;
	flex-direction: column;
}
.contentitem.is-active { opacity: 1; transform: none; }
/* vertically centre short panels; auto margins collapse to 0 when content overflows */
.home-grid, .contact-grid { margin-block: auto; }

/* entrance stagger for the active panel */
.contentitem .reveal { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.contentitem.is-active .reveal { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 55ms + 140ms); }

/* no-JS fallback: plain vertical page */
html:not(.js) #vcard { height: auto; }
html:not(.js) #scroller { display: block; }
html:not(.js) .contentitem { opacity: 1; transform: none; height: auto; border-bottom: 1px solid var(--line); }
html:not(.js) #footer .pager, html:not(.js) #worknavigation { display: none; }
html:not(.js) #workmask { height: auto; }
html:not(.js) #workscroller .work { height: auto; margin-bottom: 18px; }

/*---------------------------------- Shared ----------------------------------*/
.eyebrow {
	font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
	color: var(--orange-ink); margin-bottom: 12px;
	display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--orange); border-radius: 2px; }
.panel-head { margin-bottom: 26px; }
.panel-head h2, .contact-grid h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; }
.card {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 24px 26px;
}
.card h3 { font-size: 19px; margin-bottom: 14px; }

.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 20px;
	border-radius: 999px;
	font-size: 14px; font-weight: 600; text-decoration: none;
	border: 1px solid transparent; cursor: pointer;
	transition: transform .2s, background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--navy) 70%, transparent); }
.btn-primary:hover { background: var(--navy-soft); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--heading); background: var(--surface); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-ink); transform: translateY(-1px); }

/*---------------------------------- Home ----------------------------------*/
.home-grid {
	display: grid;
	grid-template-columns: minmax(220px, 300px) 1fr;
	gap: 52px;
	align-items: start;
}
.portrait { margin: 0; position: relative; }
.portrait::after {
	content: ""; position: absolute; z-index: -1;
	inset: 14px -14px -14px 14px;
	border: 2px solid var(--orange); border-radius: 18px;
}
.portrait img {
	width: 100%; height: auto; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: 50% 20%;
	border-radius: 18px;
	background: var(--chip);
}
.edu { margin-top: 10px; font-size: 13px; color: var(--muted); padding-left: 18px; }
.based { margin-top: 30px; font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.based .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 22%, transparent); transform: translateY(-1px); }

#menu_home h1 { font-size: clamp(32px, 4.1vw, 50px); line-height: 1.06; margin-bottom: 20px; }
#menu_home h1 em { font-style: italic; color: var(--orange-ink); font-weight: 400; }
.lead { font-size: 17px; line-height: 1.6; color: var(--ink); max-width: 60ch; }
.lead-2 { margin-top: 12px; color: var(--muted); max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.stats {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
	margin: 28px 0 0; padding-top: 20px;
	border-top: 1px solid var(--line);
}
.stats div { padding-right: 18px; }
.stats div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.stats dt { font-family: var(--serif); font-size: 32px; line-height: 1; color: var(--heading); font-weight: 500; margin-bottom: 8px; font-variant-numeric: lining-nums; }
.stats dd { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/*---------------------------------- Strengths ----------------------------------*/
.strengths-grid { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 20px; align-items: stretch; }
.langs li {
	display: grid; grid-template-columns: 1fr auto; grid-template-areas: "lang level" "meter meter";
	gap: 6px 10px; padding: 11px 0; border-bottom: 1px dashed var(--line);
}
.langs li:last-child { border-bottom: 0; padding-bottom: 0; }
.langs li:first-child { padding-top: 0; }
.lang { grid-area: lang; font-weight: 600; }
.level { grid-area: level; font-size: 12.5px; color: var(--muted); }
.meter { grid-area: meter; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.meter i { height: 5px; border-radius: 3px; background: var(--line); }
.meter[data-v="5"] i,
.meter[data-v="4"] i:nth-child(-n + 4),
.meter[data-v="3"] i:nth-child(-n + 3),
.meter[data-v="2"] i:nth-child(-n + 2),
.meter[data-v="1"] i:nth-child(1) { background: linear-gradient(90deg, var(--navy), var(--navy-soft)); }

.ticks li { position: relative; padding: 0 0 12px 28px; font-size: 14px; color: var(--muted); }
.ticks li:last-child { padding-bottom: 0; }
.ticks li strong { color: var(--ink); font-weight: 600; }
.ticks li::before {
	content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
	background: color-mix(in srgb, var(--orange) 18%, transparent)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 10.5 3 3 6-7' fill='none' stroke='%23A65D00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.note { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.chipgroup + .chipgroup { margin-top: 12px; }
.chip-label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips li { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }

/*---------------------------------- Work / portfolio ----------------------------------*/
#menu_work { display: flex; flex-direction: column; overflow: hidden; }
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; flex: none; }
ul.navigation { display: flex; gap: 6px; padding: 4px; background: var(--chip); border-radius: 999px; }
ul.navigation button {
	display: flex; align-items: center; gap: 7px;
	border: 0; background: transparent; cursor: pointer;
	padding: 7px 14px; border-radius: 999px;
	font-size: 13px; font-weight: 600; color: var(--muted);
	transition: background-color .25s, color .25s, box-shadow .25s;
}
ul.navigation button span {
	display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
	font-size: 10.5px; background: var(--surface); color: var(--muted);
}
ul.navigation button:hover { color: var(--heading); }
ul.navigation button[aria-pressed="true"] { background: var(--surface); color: var(--heading); box-shadow: 0 1px 3px rgba(8, 30, 52, .12); }
ul.navigation button[aria-pressed="true"] span { background: var(--orange); color: #fff; }

#workmask { position: relative; flex: 1; min-height: 0; overflow: hidden; margin: 0 -8px; }
#workscroller { height: 100%; transition: transform 640ms var(--ease); will-change: transform; }
ul.work {
	height: 100%;
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
	align-content: start;
	padding: 4px 8px 8px;
	overflow-y: auto;
	transition: opacity 500ms ease;
}
.js ul.work:not(.is-current) { opacity: .2; }
ul.work > li {
	position: relative;
	display: flex; flex-direction: column;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 26px 24px 22px;
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
ul.work > li::before {
	content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 3px;
	background: var(--orange); border-radius: 0 0 3px 3px;
	transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
ul.work > li:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -18px rgba(8, 30, 52, .3); border-color: color-mix(in srgb, var(--orange) 35%, var(--line)); }
ul.work > li:hover::before { transform: scaleX(1); }
ul.work h3 { font-size: 20px; line-height: 1.22; margin-bottom: 10px; }
ul.work p { font-size: 14px; color: var(--muted); }
ul.work .icon {
	display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
	border-radius: 12px; background: color-mix(in srgb, var(--navy) 9%, transparent); color: var(--heading);
}
ul.work .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 18px; }
.tags li { font-size: 12px; font-weight: 600; color: var(--orange-ink); background: color-mix(in srgb, var(--orange) 12%, transparent); padding: 3px 10px; border-radius: 999px; }
.timeline .when { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 12px; }
.timeline .org { color: var(--heading); font-weight: 600; font-size: 13.5px; margin: -4px 0 12px; opacity: .85; }

ul.quotes { grid-template-columns: repeat(2, 1fr); gap: 16px; }
ul.quotes > li { padding: 22px 24px 20px; }
ul.quotes blockquote {
	margin: 0 0 14px; font-family: var(--serif); font-size: 16.5px; line-height: 1.45; color: var(--ink); font-weight: 400;
}
ul.quotes .who { margin-top: auto; font-size: 12.5px; padding-top: 12px; border-top: 1px solid var(--line); }
ul.quotes .who strong { display: block; color: var(--heading); font-size: 13.5px; }

/*---------------------------------- Blog ----------------------------------*/
ul.posts {
	display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: auto auto; gap: 16px;
}
ul.posts > li.featured { grid-row: span 2; }
ul.posts a {
	position: relative; display: flex; flex-direction: column; height: 100%;
	background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px;
	padding: 18px 20px 20px; overflow: hidden;
	color: inherit; text-decoration: none;
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
ul.posts a:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -18px rgba(8, 30, 52, .3); border-color: color-mix(in srgb, var(--orange) 35%, var(--line)); }
ul.posts img { margin: -18px -20px 16px; width: calc(100% + 40px); max-width: none; height: auto; border-bottom: 1px solid var(--line); }
.post-cat { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 8px; }
.post-title { font-family: var(--serif); font-size: 18px; line-height: 1.25; color: var(--heading); font-weight: 500; }
.featured .post-title { font-size: 22px; }
.post-excerpt { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.posts-more { margin-top: 16px; text-align: right; }
.posts-more a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.posts-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
ul.posts li:not(.featured) .post-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/*---------------------------------- Contact ----------------------------------*/
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 52px; align-items: start; }
.contact-grid .sidebar > p:not(.eyebrow) { margin-top: 16px; color: var(--muted); max-width: 46ch; }
.contact-list { margin-top: 26px; border-top: 1px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.contact-list .k { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.form { padding: 28px; }
.field + .field { margin-top: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
	width: 100%;
	font: inherit; font-size: 15px; color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--line); border-radius: 10px;
	padding: 11px 13px;
	transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--navy) 14%, transparent); }
.field .error, .field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #C2410C; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.form-status { font-size: 13px; color: #B42318; }
.sendbutton[disabled] { opacity: .6; cursor: progress; }
.sent { text-align: center; padding: 44px 28px; }
.sent-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: color-mix(in srgb, var(--orange) 16%, transparent); }
.sent-icon svg { width: 28px; fill: none; stroke: var(--orange-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sent h3 { font-size: 22px; margin-bottom: 8px; }
.sent p { color: var(--muted); }

/*---------------------------------- Footer / pager ----------------------------------*/
#footer {
	flex: none;
	display: flex; align-items: center; justify-content: space-between;
	padding: 12px 40px;
	border-top: 1px solid var(--line);
	font-size: 12.5px; color: var(--muted);
	background: var(--surface);
}
.pager { display: flex; align-items: center; gap: 12px; }
.pager .count { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.pager .count b { color: var(--heading); font-weight: 600; }
.pager button {
	display: grid; place-items: center; width: 34px; height: 34px;
	border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
	transition: border-color .2s, color .2s, opacity .2s;
}
.pager button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pager button:hover:not([disabled]) { border-color: var(--orange); color: var(--orange-ink); }
.pager button[disabled] { opacity: .35; cursor: default; }

/*---------------------------------- Responsive ----------------------------------*/
@media (max-width: 1020px) {
	.strengths-grid { grid-template-columns: 1fr 1fr; }
	.strengths-grid .card:last-child { grid-column: 1 / -1; }
	ul.work { grid-template-columns: repeat(2, 1fr); }
	.stats { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
	.stats div:nth-child(3) { padding-left: 0; border-left: 0; }
	ul.posts { grid-template-columns: 1fr 1fr; }
	ul.posts > li.featured { grid-row: auto; grid-column: 1 / -1; }
	ul.posts > li.featured img { display: none; }
	.home-grid { gap: 36px; }
}

@media (max-width: 860px) {
	#header { flex-direction: column; align-items: stretch; gap: 14px; padding: 22px 24px 0; }
	#menu { justify-content: space-between; margin: 0 -10px; }
	#menu a { padding: 8px 10px 12px; white-space: nowrap; }
	.contentitem { padding: 28px 24px 28px; }
	.home-grid, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
	.home-grid .sidebar { display: grid; grid-template-columns: 120px 1fr; column-gap: 20px; align-items: center; align-content: center; }
	.home-grid .portrait { grid-row: span 2; }
	.home-grid .sidebar .based { align-self: end; }
	.home-grid .sidebar .edu { align-self: start; margin-top: 6px; }
	.portrait::after { inset: 8px -8px -8px 8px; border-radius: 14px; }
	.portrait img { border-radius: 14px; }
	.based { margin-top: 0; }
	#footer { padding: 10px 24px; }
}

@media (max-width: 640px) {
	#wrapper { padding: 0; }
	#vcard { height: 100dvh; border-radius: 0; }
	.brand-logo { display: none; }
	.brand-text { border-left: 0; padding-left: 0; }
	.strengths-grid, ul.work, ul.quotes, ul.posts { grid-template-columns: 1fr; }
	.work-head { align-items: stretch; }
	#menu a { font-size: 11.5px; letter-spacing: .03em; padding: 8px 5px 12px; }
	#menu a .num { display: none; }
	ul.navigation { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
	ul.navigation button { justify-content: center; white-space: nowrap; padding: 7px 4px; font-size: 12px; width: 100%; }
	ul.navigation button span { display: none; }
	.edu { padding-left: 0; }
	.lead { font-size: 16px; }
	.stats dt { font-size: 28px; }
	#footer > p { display: none; }
	#footer { justify-content: center; }
}

/* compact mode for laptop-height screens: keep every panel inside the card */
@media (max-height: 920px) and (min-width: 861px) {
	#wrapper { padding: 16px 24px; }
	#vcard { height: clamp(580px, calc(100dvh - 32px), 780px); }
	#header { padding-top: 20px; }
	#content { margin-top: 12px; }
	.contentitem { padding: 28px 48px 22px; }
	.home-grid { grid-template-columns: minmax(200px, 255px) 1fr; gap: 44px; }
	#menu_home h1 { font-size: clamp(30px, 3.3vw, 42px); margin-bottom: 14px; }
	.lead { font-size: 16px; }
	.actions { margin-top: 20px; }
	.stats { margin-top: 24px; padding-top: 18px; }
	.stats dt { font-size: 28px; }
	.panel-head { margin-bottom: 18px; }
	.panel-head h2, .contact-grid h2 { font-size: clamp(24px, 2.6vw, 30px); }
	.card { padding: 18px 22px; }
	.card h3 { font-size: 18px; margin-bottom: 10px; }
	.langs li { padding: 7px 0; }
	.ticks li { padding-bottom: 8px; font-size: 13.5px; }
	ul.work { gap: 16px; }
	ul.work > li { padding: 22px 22px 18px; }
	ul.quotes > li { padding: 18px 22px 16px; }
	ul.quotes blockquote { font-size: 15px; margin-bottom: 10px; }
	ul.quotes .who { padding-top: 10px; }
	ul.posts { gap: 12px; }
	ul.posts a { padding: 14px 18px 16px; }
	ul.posts img { margin: -14px -18px 12px; width: calc(100% + 36px); }
	.post-title { font-size: 16.5px; }
	.featured .post-title { font-size: 19px; }
	.form { padding: 22px; }
	.field + .field { margin-top: 12px; }
	.field textarea { min-height: 96px; }
	.form-foot { margin-top: 14px; }
	.contact-list { margin-top: 18px; }
	.contact-list li { padding: 9px 0; }
}
@media (max-height: 740px) and (min-width: 861px) {
	#wrapper { padding: 10px 24px; }
	#vcard { height: calc(100dvh - 20px); min-height: 0; }
	#header { padding: 14px 40px 0; }
	.brand-logo img { height: 28px; }
	.brand-name { font-size: 17px; }
	#menu a { padding: 8px 12px 11px; }
	#content { margin-top: 8px; }
	.contentitem { padding: 22px 44px 16px; }
	#footer { padding: 7px 40px; }
	.pager button { width: 30px; height: 30px; }
	.lead { font-size: 15px; }
	#menu_home h1 { font-size: clamp(28px, 3vw, 36px); }
	.home-grid { grid-template-columns: minmax(180px, 220px) 1fr; }
	.based { margin-top: 22px; }
	.stats { margin-top: 18px; padding-top: 14px; }
	.stats dt { font-size: 25px; margin-bottom: 6px; }
	.stats dd { font-size: 12px; }
	.note { display: none; }
	.panel-head { margin-bottom: 14px; }
	.eyebrow { margin-bottom: 8px; }
	ul.quotes blockquote { font-size: 14px; }
	ul.posts > li.featured img { max-height: 150px; object-fit: cover; object-position: top; }
	.post-excerpt { font-size: 13px; }
	.contact-grid .sidebar > p:not(.eyebrow) { margin-top: 10px; }
	.contact-list { margin-top: 12px; }
	.contact-list li { padding: 7px 0; }
	.field label { margin-bottom: 4px; }
	.field input, .field textarea { padding: 8px 12px; }
	.field textarea { min-height: 80px; }
}
/* very short viewports (e.g. 1280x720 laptops with browser toolbars) */
@media (max-height: 640px) and (min-width: 861px) {
	.contentitem { padding: 16px 40px 12px; }
	#menu_home h1 { font-size: clamp(26px, 2.7vw, 32px); margin-bottom: 10px; }
	.lead { font-size: 14.5px; line-height: 1.55; }
	.actions { margin-top: 14px; }
	.btn { padding: 9px 16px; font-size: 13.5px; }
	.home-grid { grid-template-columns: minmax(160px, 190px) 1fr; gap: 36px; }
	.edu { display: none; }
	.stats { margin-top: 14px; padding-top: 12px; }
	.stats dt { font-size: 22px; }
	.panel-head h2, .contact-grid h2 { font-size: 24px; }
	.card { padding: 14px 18px; }
	.card h3 { font-size: 17px; margin-bottom: 8px; }
	.langs li { padding: 5px 0; }
	.ticks li { padding-bottom: 6px; font-size: 13px; line-height: 1.5; }
	.chips li { padding: 2px 9px; font-size: 12px; }
	.chipgroup + .chipgroup { margin-top: 8px; }
	ul.work > li { padding: 18px 20px 16px; }
	ul.work h3 { font-size: 18px; }
	ul.work .icon { width: 38px; height: 38px; margin-bottom: 12px; }
	ul.quotes > li { padding: 14px 18px 12px; }
	ul.quotes blockquote { font-size: 13.5px; line-height: 1.4; }
	ul.posts { gap: 10px; }
	ul.posts > li.featured img { max-height: 110px; }
	.post-title { font-size: 15.5px; }
	.featured .post-title { font-size: 17px; }
	.post-excerpt { margin-top: 4px; }
	.contact-grid .sidebar > p:not(.eyebrow) { font-size: 14px; }
	.form { padding: 16px 18px; }
	.field + .field { margin-top: 8px; }
	.field textarea { min-height: 58px; }
	.form-foot { margin-top: 10px; }
}

@media (max-height: 580px) and (min-width: 861px) {
	.field textarea { min-height: 44px; }
}

/* phones in landscape: fill the screen, header on one row, so the panel keeps usable height */
@media (max-height: 500px) and (orientation: landscape) {
	#wrapper { padding: 0; }
	#vcard { height: 100dvh; min-height: 0; border-radius: 0; }
	#header { flex-direction: row; align-items: center; gap: 16px; padding: 10px max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
	.brand-logo, .brand-role, #menu a .num { display: none; }
	.brand-text { border-left: 0; padding-left: 0; }
	.brand-name { font-size: 17px; white-space: nowrap; }
	#menu { margin: 0; justify-content: flex-end; }
	#menu a { padding: 8px 9px 10px; font-size: 12px; letter-spacing: .05em; }
	#content { margin-top: 8px; }
	.contentitem { padding: 18px max(24px, env(safe-area-inset-right)) 16px max(24px, env(safe-area-inset-left)); }
	.home-grid { grid-template-columns: 170px 1fr; gap: 28px; }
	.home-grid .sidebar { display: block; }
	.home-grid .portrait { grid-row: auto; }
	.based { margin-top: 18px; }
	.edu { display: none; }
	#menu_home h1 { font-size: 28px; margin-bottom: 12px; }
	.lead { font-size: 15px; }
	.actions { margin-top: 16px; }
	.panel-head { margin-bottom: 14px; }
	.panel-head h2, .contact-grid h2 { font-size: 24px; }
	.contact-grid { grid-template-columns: 1fr 1.1fr; gap: 28px; }
	#footer { padding: 6px max(20px, env(safe-area-inset-right)) 6px max(20px, env(safe-area-inset-left)); }
	#footer > p { display: block; }
	.pager button { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
	:root { --slide: 1ms; }
	*, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; }
}
