/*!
 * Hakimi Portfolio — main stylesheet
 * Designed & Developed by HakimiTech — https://hakiminezhad.tech/
 *
 * Layout concept: a calm, product-grade developer site. One sans family set
 * with care, a modest type scale, hairline structure, browser-framed project
 * work and a single dark band (footer) for contrast.
 */

/* ---------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------- */
:root {
	/* Brand palette */
	--hp-ink: #243C4C;
	--hp-steel: #5289AD;
	--hp-slate: #698696;
	--hp-mist: #ACBCBF;
	--hp-paper: #F4FCFB;

	/* Semantic (light) */
	--hp-bg: var(--hp-paper);
	--hp-fg: var(--hp-ink);
	--hp-muted: #557080;
	--hp-line: rgba(36, 60, 76, .12);
	--hp-line-strong: rgba(36, 60, 76, .24);
	--hp-surface: #FFFFFF;
	--hp-surface-2: #EAF2F2;
	--hp-accent: var(--hp-steel);
	--hp-accent-ink: #3C7298;
	--hp-accent-fg: #FFFFFF;
	--hp-solid: var(--hp-ink);
	--hp-solid-fg: #FFFFFF;
	--hp-focus: #2F6F98;
	--hp-ok: #2F8A62;
	--hp-err: #B04A3D;
	--hp-shadow: 0 1px 2px rgba(36, 60, 76, .06), 0 12px 32px -16px rgba(36, 60, 76, .22);

	/* Type */
	--hp-font: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
	--hp-font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

	--hp-fs-xs: .75rem;
	--hp-fs-sm: .875rem;
	--hp-fs-md: 1rem;
	--hp-fs-lg: 1.125rem;
	--hp-fs-xl: 1.25rem;
	--hp-fs-h3: 1.375rem;
	--hp-fs-h2: clamp(1.875rem, 1.35rem + 1.7vw, 2.625rem);
	--hp-fs-h1: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem);

	/* Space & shape */
	--hp-wrap: 1200px;
	--hp-pad: clamp(16px, 4vw, 40px);
	--hp-section: clamp(72px, 9vw, 128px);
	--hp-radius: 12px;
	--hp-radius-lg: 18px;
	--hp-header-h: 68px;

	--hp-ease: cubic-bezier(.22, 1, .36, 1);

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--hp-bg: #13222B;
		--hp-fg: #E9F3F2;
		--hp-muted: #A3B5B9;
		--hp-line: rgba(172, 188, 191, .14);
		--hp-line-strong: rgba(172, 188, 191, .28);
		--hp-surface: #1A2C37;
		--hp-surface-2: #1F3441;
		--hp-accent: #7DB0D3;
		--hp-accent-ink: #9CC6E3;
		--hp-accent-fg: #13222B;
		--hp-solid: #E9F3F2;
		--hp-solid-fg: #13222B;
		--hp-focus: #9CC6E3;
		--hp-ok: #74C4A0;
		--hp-err: #E59A8F;
		--hp-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .6);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--hp-bg: #13222B;
	--hp-fg: #E9F3F2;
	--hp-muted: #A3B5B9;
	--hp-line: rgba(172, 188, 191, .14);
	--hp-line-strong: rgba(172, 188, 191, .28);
	--hp-surface: #1A2C37;
	--hp-surface-2: #1F3441;
	--hp-accent: #7DB0D3;
	--hp-accent-ink: #9CC6E3;
	--hp-accent-fg: #13222B;
	--hp-solid: #E9F3F2;
	--hp-solid-fg: #13222B;
	--hp-focus: #9CC6E3;
	--hp-ok: #74C4A0;
	--hp-err: #E59A8F;
	--hp-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -20px rgba(0, 0, 0, .6);
	color-scheme: dark;
}

/* ---------------------------------------------------------------
   2. Base
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hp-header-h) + 24px); }

body.hp-body,
.hp-scope {
	margin: 0;
	background: var(--hp-bg);
	color: var(--hp-fg);
	font-family: var(--hp-font);
	font-size: var(--hp-fs-md);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}
body.hp-body::before {
	content: "";
	position: fixed;
	inset: 0 0 auto;
	height: env(safe-area-inset-top, 0px);
	z-index: 90;
	background: var(--hp-bg);
}
body.hp-nav-open { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
::selection { background: var(--hp-accent); color: var(--hp-accent-fg); }
:focus-visible { outline: 2px solid var(--hp-focus); outline-offset: 3px; border-radius: 6px; }

.hp-skip {
	position: fixed;
	top: calc(8px + env(safe-area-inset-top, 0px));
	left: calc(8px + env(safe-area-inset-left, 0px));
	z-index: 200;
	padding: 10px 16px;
	border-radius: 8px;
	background: var(--hp-solid);
	color: var(--hp-solid-fg);
	transform: translateY(-160%);
	transition: transform .3s var(--hp-ease);
}
.hp-skip:focus { transform: none; }
.screen-reader-text, .hp-sr {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.hp-wrap {
	width: 100%;
	max-width: calc(var(--hp-wrap) + 2 * var(--hp-pad));
	margin-inline: auto;
	padding-left: max(var(--hp-pad), env(safe-area-inset-left, 0px));
	padding-right: max(var(--hp-pad), env(safe-area-inset-right, 0px));
}

/* Containers created by Portfolio Setup: no extra spacing around our sections */
.e-con.hp-e-section, .elementor-section.hp-e-section {
	--padding-top: 0px; --padding-bottom: 0px; --padding-left: 0px; --padding-right: 0px;
	--gap: 0px; --row-gap: 0px; --column-gap: 0px; --widget-spacing: 0px;
	--margin-block-start: 0px; --margin-block-end: 0px;
}
.hp-e-section > .elementor-widget, .hp-e-section .elementor-widget:not(:last-child) { margin-bottom: 0; }

/* ---------------------------------------------------------------
   3. Type primitives
   --------------------------------------------------------------- */
.hp-label {
	margin: 0;
	font-size: var(--hp-fs-sm);
	font-weight: 600;
	color: var(--hp-accent-ink);
	letter-spacing: .01em;
}
.hp-h1 {
	margin: 0;
	font-size: var(--hp-fs-h1);
	line-height: 1.08;
	font-weight: 600;
	letter-spacing: -.025em;
	text-wrap: balance;
}
.hp-h2 {
	margin: 0;
	font-size: var(--hp-fs-h2);
	line-height: 1.15;
	font-weight: 600;
	letter-spacing: -.02em;
	text-wrap: balance;
}
.hp-h3 {
	margin: 0;
	font-size: var(--hp-fs-h3);
	line-height: 1.25;
	font-weight: 600;
	letter-spacing: -.01em;
	text-wrap: balance;
}
.hp-h1 em, .hp-h2 em, .hp-h3 em { font-style: normal; color: var(--hp-accent-ink); }
.hp-muted { color: var(--hp-muted); }

/* ---------------------------------------------------------------
   4. Buttons, links, chips
   --------------------------------------------------------------- */
.hp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	padding: 12px 20px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-weight: 600;
	font-size: var(--hp-fs-md);
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--hp-ease);
}
.hp-btn svg { width: 17px; height: 17px; flex: none; transition: transform .35s var(--hp-ease); }
.hp-btn:hover svg { transform: translateX(3px); }
.hp-btn:active { transform: translateY(1px); }
.hp-btn--solid { background: var(--hp-solid); color: var(--hp-solid-fg); }
.hp-btn--solid:hover { background: var(--hp-accent-ink); color: #FFFFFF; }
:root[data-theme="dark"] .hp-btn--solid:hover { color: #13222B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hp-btn--solid:hover { color: #13222B; } }
.hp-btn--line { border-color: var(--hp-line-strong); background: transparent; color: var(--hp-fg); }
.hp-btn--line:hover { border-color: var(--hp-fg); }
.hp-btn--sm { min-height: 40px; padding: 10px 16px; font-size: var(--hp-fs-sm); border-radius: 9px; }

.hp-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	font-size: var(--hp-fs-sm);
	color: var(--hp-accent-ink);
	text-decoration: none;
}
.hp-link svg { width: 15px; height: 15px; transition: transform .3s var(--hp-ease); }
.hp-link:hover { text-decoration: underline; }
.hp-link:hover svg { transform: translateX(2px); }

.hp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hp-chips li {
	font-size: .75rem;
	font-weight: 500;
	padding: 4px 9px;
	border-radius: 6px;
	background: var(--hp-surface-2);
	color: var(--hp-fg);
	white-space: nowrap;
}

kbd { font-family: var(--hp-font-mono); font-size: .6875rem; padding: 2px 5px; border: 1px solid var(--hp-line-strong); border-radius: 5px; }

/* ---------------------------------------------------------------
   5. Header + mega menu
   --------------------------------------------------------------- */
.hp-header {
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 80;
	background: color-mix(in srgb, var(--hp-bg) 88%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color .3s, background-color .3s;
}
.admin-bar .hp-header { top: calc(32px + env(safe-area-inset-top, 0px)); }
@media (max-width: 782px) { .admin-bar .hp-header { top: calc(46px + env(safe-area-inset-top, 0px)); } }
.hp-header.is-scrolled, .hp-header.has-open { border-bottom-color: var(--hp-line); }

.hp-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: var(--hp-header-h);
}

.hp-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; margin-right: auto; }
.hp-brand__mark {
	width: 36px; height: 36px;
	flex: none;
	display: grid; place-items: center;
	border-radius: 9px;
	background: var(--hp-solid);
	color: var(--hp-solid-fg);
	font-weight: 700;
	font-size: .875rem;
	letter-spacing: .02em;
}
.hp-brand__text { display: grid; line-height: 1.2; min-width: 0; }
.hp-brand__name { font-weight: 600; font-size: .9375rem; white-space: nowrap; }
.hp-brand__role { font-size: .75rem; color: var(--hp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-brand img { max-height: 36px; width: auto; }

.hp-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.hp-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 12px;
	border: 0;
	border-radius: 8px;
	background: none;
	font-size: .9375rem;
	font-weight: 500;
	color: var(--hp-fg);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.hp-nav__link:hover, .hp-nav__item.is-open > .hp-nav__link { background: var(--hp-surface-2); }
.hp-nav__link svg { width: 14px; height: 14px; transition: transform .3s var(--hp-ease); }
.hp-nav__item.is-open > .hp-nav__link svg { transform: rotate(180deg); }

.hp-mega {
	position: absolute;
	top: calc(100% - 6px);
	left: 50%;
	width: min(760px, calc(100vw - 32px));
	transform: translate(-50%, 6px);
	padding: 20px;
	border-radius: var(--hp-radius-lg);
	background: var(--hp-surface);
	border: 1px solid var(--hp-line);
	box-shadow: var(--hp-shadow);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s, transform .3s var(--hp-ease), visibility 0s linear .3s;
}
.hp-nav__item.is-open > .hp-mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s, transform .3s var(--hp-ease), visibility 0s; }

.hp-mega__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
.hp-mega__head { margin: 0 0 10px; font-size: var(--hp-fs-xs); font-weight: 600; color: var(--hp-muted); text-transform: uppercase; letter-spacing: .06em; }
.hp-mega__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hp-mega__item {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	padding: 8px;
	border-radius: 10px;
	text-decoration: none;
	transition: background-color .2s;
}
.hp-mega__item:hover, .hp-mega__item:focus-visible { background: var(--hp-surface-2); }
.hp-mega__item strong { display: block; font-size: .9375rem; font-weight: 600; }
.hp-mega__item span span, .hp-mega__item small { display: block; font-size: .8125rem; color: var(--hp-muted); line-height: 1.4; }
.hp-mega__thumb { width: 56px; height: 42px; border-radius: 7px; overflow: hidden; background: linear-gradient(135deg, var(--c1, #243C4C), var(--c2, #5289AD)); }
.hp-mega__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hp-mega__side { padding: 12px; border-radius: 12px; background: var(--hp-surface-2); display: grid; gap: 4px; align-content: start; }
.hp-mega__side a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: .9375rem; font-weight: 500; }
.hp-mega__side a:hover { background: var(--hp-surface); }
.hp-mega__side a span { color: var(--hp-muted); font-size: .8125rem; font-weight: 400; }
.hp-mega__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hp-line); font-size: .875rem; color: var(--hp-muted); }
.hp-mega--xp .hp-mega__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.hp-mega--xp .hp-mega__item { grid-template-columns: 8px minmax(0, 1fr); }
.hp-mega--xp .hp-mega__item::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--hp-accent); align-self: start; margin-top: 7px; }
.hp-mega--simple { width: min(320px, calc(100vw - 32px)); }

.hp-header__tools { display: flex; align-items: center; gap: 8px; }
.hp-iconbtn {
	width: 40px; height: 40px;
	display: grid; place-items: center;
	border-radius: 9px;
	border: 1px solid var(--hp-line-strong);
	background: transparent;
	cursor: pointer;
	transition: border-color .2s, background-color .2s;
}
.hp-iconbtn:hover { border-color: var(--hp-fg); }
.hp-iconbtn svg { width: 18px; height: 18px; }
.hp-iconbtn .hp-i-sun { display: none; }
:root[data-theme="dark"] .hp-iconbtn .hp-i-sun { display: block; }
:root[data-theme="dark"] .hp-iconbtn .hp-i-moon { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .hp-iconbtn .hp-i-sun { display: block; }
	:root:not([data-theme="light"]) .hp-iconbtn .hp-i-moon { display: none; }
}
.hp-burger { display: none; }
.hp-burger span { display: grid; gap: 4px; }
.hp-burger i { display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .3s var(--hp-ease), opacity .2s; }
.hp-header.is-nav-open .hp-burger i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hp-header.is-nav-open .hp-burger i:nth-child(2) { opacity: 0; }
.hp-header.is-nav-open .hp-burger i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 980px) {
	/* backdrop-filter would trap the fixed drawer inside the header */
	.hp-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--hp-bg); }
	.hp-burger { display: grid; }
	.hp-header__cta { display: none; }
	.hp-nav {
		position: fixed;
		left: 0; right: 0;
		top: calc(var(--hp-header-h) + env(safe-area-inset-top, 0px));
		bottom: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--hp-bg);
		border-top: 1px solid var(--hp-line);
		padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity .25s, transform .3s var(--hp-ease), visibility 0s linear .3s;
	}
	.admin-bar .hp-nav { top: calc(var(--hp-header-h) + 46px); }
	.hp-header.is-nav-open .hp-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .3s var(--hp-ease), visibility 0s; }
	.hp-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.hp-nav__item { border-bottom: 1px solid var(--hp-line); }
	.hp-nav__link { width: 100%; justify-content: space-between; height: 56px; padding: 0 4px; font-size: 1.0625rem; border-radius: 0; }
	.hp-nav__link:hover, .hp-nav__item.is-open > .hp-nav__link { background: none; }
	.hp-mega {
		position: static;
		width: auto;
		transform: none;
		padding: 0 0 16px;
		border: 0;
		box-shadow: none;
		background: transparent;
		display: none;
		opacity: 1;
		visibility: visible;
		transition: none;
	}
	.hp-nav__item.is-open > .hp-mega { display: block; transform: none; }
	.hp-mega__grid, .hp-mega--xp .hp-mega__list { grid-template-columns: minmax(0, 1fr); }
	.hp-nav__mobile-cta { display: grid; margin-top: 20px; }
}
.hp-nav__mobile-cta { display: none; }
@media (max-width: 520px) { .hp-brand__role { display: none; } }

/* ---------------------------------------------------------------
   6. Hero
   --------------------------------------------------------------- */
.hp-hero { padding-block: clamp(48px, 7vw, 96px) clamp(16px, 3vw, 40px); }
.hp-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
	gap: clamp(32px, 6vw, 88px);
	align-items: center;
}
.hp-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 24px;
	padding: 6px 12px 6px 10px;
	border-radius: 999px;
	border: 1px solid var(--hp-line-strong);
	background: var(--hp-surface);
	font-size: var(--hp-fs-sm);
	font-weight: 500;
}
.hp-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--hp-ok); flex: none; }
.hp-dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--hp-ok); animation: hp-pulse 2.4s var(--hp-ease) infinite; }
@keyframes hp-pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

.hp-hero__text { margin: 24px 0 0; font-size: var(--hp-fs-lg); line-height: 1.6; color: var(--hp-muted); max-width: 54ch; text-wrap: pretty; }
.hp-hero__text strong { color: var(--hp-fg); font-weight: 600; }
.hp-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hp-hero__points { list-style: none; margin: 36px 0 0; padding: 20px 0 0; border-top: 1px solid var(--hp-line); display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: var(--hp-fs-sm); color: var(--hp-muted); }
.hp-hero__points li { display: inline-flex; align-items: center; gap: 8px; }
.hp-hero__points svg { width: 16px; height: 16px; color: var(--hp-accent); }

.hp-hero__visual { position: relative; isolation: isolate; justify-self: end; width: 100%; max-width: 420px; }
.hp-portrait {
	position: relative;
	margin: 0;
	aspect-ratio: 4 / 5;
	max-width: 100%;
	border-radius: var(--hp-radius-lg);
	overflow: hidden;
	background: var(--hp-surface-2);
}
.hp-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.hp-hero__visual::before {
	content: "";
	position: absolute;
	inset: 14px -14px -14px 14px;
	border: 1px solid var(--hp-line-strong);
	border-radius: var(--hp-radius-lg);
	z-index: -1;
}
.hp-recent {
	position: absolute;
	left: -28px;
	bottom: 28px;
	width: min(290px, calc(100% - 8px));
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 2px 12px;
	align-items: center;
	padding: 14px 16px;
	border-radius: 14px;
	background: var(--hp-surface);
	border: 1px solid var(--hp-line);
	box-shadow: var(--hp-shadow);
	text-decoration: none;
	transition: transform .35s var(--hp-ease);
}
.hp-recent:hover { transform: translateY(-3px); }
.hp-recent small { grid-column: 1; font-size: var(--hp-fs-xs); font-weight: 600; color: var(--hp-accent-ink); }
.hp-recent strong { grid-column: 1; font-size: .9375rem; }
.hp-recent span { grid-column: 1; font-size: .8125rem; color: var(--hp-muted); line-height: 1.4; }
.hp-recent svg { grid-column: 2; grid-row: 1 / span 3; width: 18px; height: 18px; color: var(--hp-muted); }

@media (max-width: 900px) {
	.hp-hero__grid { grid-template-columns: minmax(0, 1fr); }
	.hp-hero__visual { justify-self: start; max-width: 360px; margin-top: 8px; }
	.hp-recent { left: auto; right: -10px; }
}
@media (max-width: 480px) {
	.hp-hero__visual { max-width: calc(100% - 16px); }
	.hp-recent { right: -8px; bottom: 16px; }
}

/* Gentle load-in (resting state stays visible) */
.hp-js .hp-hero__copy > * { animation: hp-up .8s var(--hp-ease) both; }
.hp-js .hp-hero__copy > *:nth-child(2) { animation-delay: .05s; }
.hp-js .hp-hero__copy > *:nth-child(3) { animation-delay: .1s; }
.hp-js .hp-hero__copy > *:nth-child(4) { animation-delay: .15s; }
.hp-js .hp-hero__copy > *:nth-child(5) { animation-delay: .2s; }
.hp-js .hp-hero__visual { animation: hp-up .9s var(--hp-ease) .15s both; }
@keyframes hp-up { from { opacity: .001; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------
   7. Sections
   --------------------------------------------------------------- */
.hp-section { padding-block: var(--hp-section); }
.hp-section--alt { background: var(--hp-surface-2); }
:root[data-theme="dark"] .hp-section--alt { background: #172832; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hp-section--alt { background: #172832; } }

.hp-sechead {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 16px 48px;
	align-items: end;
	margin-bottom: clamp(32px, 4.5vw, 56px);
}
.hp-sechead__main { display: grid; gap: 12px; }
.hp-sechead__side { display: grid; gap: 18px; justify-items: start; }
.hp-sechead__intro { margin: 0; font-size: var(--hp-fs-lg); color: var(--hp-muted); max-width: 48ch; text-wrap: pretty; }
@media (max-width: 860px) { .hp-sechead { grid-template-columns: minmax(0, 1fr); } }

.hp-js [data-hp-reveal].is-pending { opacity: .001; transform: translateY(20px); }
.hp-js [data-hp-reveal] { transition: opacity .8s var(--hp-ease), transform .8s var(--hp-ease); }

/* ---------------------------------------------------------------
   8. Browser frame (project media)
   --------------------------------------------------------------- */
.hp-frame {
	--c1: var(--hp-ink);
	--c2: var(--hp-steel);
	display: block;
	overflow: hidden;
	border-radius: var(--hp-radius);
	border: 1px solid var(--hp-line);
	background: var(--hp-surface);
	max-width: 100%;
}
.hp-frame__bar {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 12px;
	border-bottom: 1px solid var(--hp-line);
	background: var(--hp-surface);
}
.hp-frame__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--hp-line-strong); }
.hp-frame__bar span {
	margin-left: 10px;
	flex: 1;
	min-width: 0;
	max-width: 260px;
	height: 18px;
	padding: 0 10px;
	border-radius: 5px;
	background: var(--hp-surface-2);
	font-family: var(--hp-font-mono);
	font-size: .6875rem;
	line-height: 18px;
	color: var(--hp-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hp-frame__body {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: linear-gradient(140deg, var(--c1), var(--c2));
	overflow: hidden;
}
.hp-frame__body img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .8s var(--hp-ease); }
/* generated UI skeleton when no screenshot is set */
.hp-skel { position: absolute; inset: 9% 7% 0 7%; display: grid; grid-template-columns: 22% 1fr; gap: 4%; padding: 4%; border-radius: 10px 10px 0 0; background: rgba(244, 252, 251, .92); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .45); }
.hp-skel__side { display: grid; align-content: start; gap: 10px; }
.hp-skel__side i, .hp-skel__main i { display: block; height: 8px; border-radius: 4px; background: rgba(36, 60, 76, .12); }
.hp-skel__side i:first-child { height: 14px; width: 70%; background: var(--c1); opacity: .8; }
.hp-skel__main { display: grid; align-content: start; gap: 10px; }
.hp-skel__main b { display: block; height: 18px; width: 55%; border-radius: 4px; background: rgba(36, 60, 76, .8); }
.hp-skel__main i:nth-child(3) { width: 80%; }
.hp-skel__main i:nth-child(4) { width: 65%; }
.hp-skel__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.hp-skel__cards span { display: block; aspect-ratio: 4 / 3; border-radius: 6px; background: linear-gradient(135deg, var(--c2), var(--c1)); opacity: .55; }
.hp-skel__cards span:nth-child(2) { opacity: .35; }
.hp-skel__cards span:nth-child(3) { opacity: .2; }

/* landing variant */
.hp-skel--landing { grid-template-columns: 1fr; align-content: start; gap: 10px; padding: 5% 6%; }
.hp-skel--landing .hp-skel__nav { display: flex; justify-content: space-between; align-items: center; }
.hp-skel--landing .hp-skel__nav b { width: 18%; height: 10px; border-radius: 3px; background: var(--c1); opacity: .8; }
.hp-skel--landing .hp-skel__nav span { display: flex; gap: 8px; }
.hp-skel--landing .hp-skel__nav i { width: 28px; height: 6px; }
.hp-skel--landing .hp-skel__hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8%; align-items: center; margin-top: 6%; }
.hp-skel--landing .hp-skel__hero > span { display: grid; gap: 8px; }
.hp-skel--landing .hp-skel__hero b { display: block; height: 14px; border-radius: 4px; background: rgba(36, 60, 76, .8); }
.hp-skel--landing .hp-skel__hero b + b { width: 70%; }
.hp-skel--landing .hp-skel__hero em { display: block; width: 40%; height: 16px; margin-top: 6px; border-radius: 5px; background: var(--c2); }
.hp-skel--landing .hp-skel__art { aspect-ratio: 1; border-radius: 10px; background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: .6; }
/* chart variant */
.hp-skel--chart { grid-template-columns: 1fr; align-content: start; gap: 12px; }
.hp-skel--chart .hp-skel__bars { display: flex; align-items: flex-end; gap: 3%; height: clamp(56px, 12vw, 150px); padding-top: 4%; border-bottom: 1px solid rgba(36, 60, 76, .15); }
.hp-skel--chart .hp-skel__bars i { flex: 1; height: var(--h); border-radius: 2px 2px 0 0; background: var(--c2); opacity: .75; }
.hp-skel--chart .hp-skel__bars i:nth-child(3n) { background: var(--c1); opacity: .55; }
.hp-skel i, .hp-skel b { font-style: normal; }

/* ---------------------------------------------------------------
   9. Selected work
   --------------------------------------------------------------- */
.hp-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-filter button {
	height: 36px;
	padding: 0 14px;
	border-radius: 8px;
	border: 1px solid var(--hp-line-strong);
	background: transparent;
	cursor: pointer;
	font-size: var(--hp-fs-sm);
	font-weight: 500;
	transition: background-color .2s, color .2s, border-color .2s;
}
.hp-filter button:hover { border-color: var(--hp-fg); }
.hp-filter button[aria-pressed="true"] { background: var(--hp-solid); color: var(--hp-solid-fg); border-color: var(--hp-solid); }

.hp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.hp-card {
	display: grid;
	grid-template-rows: auto 1fr;
	border-radius: var(--hp-radius-lg);
	background: var(--hp-surface);
	border: 1px solid var(--hp-line);
	overflow: hidden;
	min-width: 0;
	transition: border-color .3s, box-shadow .3s;
}
.hp-card:hover { border-color: var(--hp-line-strong); box-shadow: var(--hp-shadow); }
.hp-card.is-hidden { display: none; }
.hp-card__media { display: block; padding: 16px 16px 0; background: var(--hp-surface-2); text-decoration: none; }
.hp-card__media .hp-frame { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.hp-card:hover .hp-frame__body img { transform: scale(1.02); }
.hp-card__body { display: grid; align-content: start; gap: 12px; padding: 22px 24px 24px; min-width: 0; }
.hp-card__meta { margin: 0; font-size: var(--hp-fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--hp-muted); }
.hp-card__title { margin: 0; font-size: 1.375rem; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
.hp-card__title a { text-decoration: none; }
.hp-card__title a:hover { color: var(--hp-accent-ink); }
.hp-card__summary { margin: 0; color: var(--hp-muted); text-wrap: pretty; }

.hp-card--wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto; }
.hp-card--wide .hp-card__media { padding: 24px 0 0 24px; display: flex; align-items: flex-end; }
.hp-card--wide .hp-card__media .hp-frame { width: 100%; border-right: 0; border-top-right-radius: 0; }
.hp-card--wide .hp-card__body { padding: clamp(24px, 3vw, 40px); align-content: center; }
.hp-card--wide .hp-card__title { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); }

.hp-more { border-top: 1px solid var(--hp-line); margin-top: 4px; }
.hp-more summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 0 2px;
	cursor: pointer;
	list-style: none;
	font-size: var(--hp-fs-sm);
	font-weight: 600;
}
.hp-more summary::-webkit-details-marker { display: none; }
.hp-more summary::after {
	content: "";
	width: 9px; height: 9px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-3px);
	transition: transform .3s var(--hp-ease);
}
.hp-more[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.hp-spec { margin: 14px 0 0; display: grid; gap: 14px; font-size: var(--hp-fs-sm); }
.hp-spec dt { font-weight: 600; margin-bottom: 4px; }
.hp-spec dd { margin: 0; color: var(--hp-muted); }
.hp-spec ul:not(.hp-chips) { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.hp-spec ul:not(.hp-chips) li::marker { color: var(--hp-accent); }
.hp-card__links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 4px; }

@media (max-width: 860px) {
	.hp-cards { grid-template-columns: minmax(0, 1fr); }
	.hp-card--wide { grid-template-columns: minmax(0, 1fr); }
	.hp-card--wide .hp-card__media { padding: 16px 16px 0; }
	.hp-card--wide .hp-card__media .hp-frame { border-right: 1px solid var(--hp-line); border-top-right-radius: var(--hp-radius); }
}

/* ---------------------------------------------------------------
   10. Expertise
   --------------------------------------------------------------- */
.hp-xp { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.hp-xp__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hp-xp__tab {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 2px 16px;
	align-items: center;
	padding: 16px 18px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: none;
	text-align: left;
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}
.hp-xp__tab:hover { background: color-mix(in srgb, var(--hp-surface) 60%, transparent); }
.hp-xp__tab[aria-selected="true"] { background: var(--hp-surface); border-color: var(--hp-line); box-shadow: var(--hp-shadow); }
.hp-xp__name { font-size: 1.0625rem; font-weight: 600; }
.hp-xp__kicker { grid-column: 1; font-size: var(--hp-fs-sm); color: var(--hp-muted); }
.hp-xp__arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--hp-muted); transition: transform .3s var(--hp-ease), color .2s; }
.hp-xp__arrow svg { width: 16px; height: 16px; }
.hp-xp__tab[aria-selected="true"] .hp-xp__arrow { color: var(--hp-accent); transform: translateX(3px); }

.hp-xp__panels { position: sticky; top: calc(var(--hp-header-h) + 32px); }
.hp-xp__panel {
	padding: clamp(24px, 3vw, 36px);
	border-radius: var(--hp-radius-lg);
	background: var(--hp-surface);
	border: 1px solid var(--hp-line);
	animation: hp-fade .5s var(--hp-ease);
}
.hp-xp__panel[hidden] { display: none; }
@keyframes hp-fade { from { opacity: .001; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hp-xp__panel p { margin: 12px 0 22px; color: var(--hp-muted); text-wrap: pretty; max-width: 56ch; }
.hp-xp__tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.hp-xp__tools li { display: flex; align-items: center; gap: 10px; font-size: var(--hp-fs-sm); font-weight: 500; }
.hp-xp__tools svg { width: 16px; height: 16px; color: var(--hp-accent); flex: none; }
.hp-xp__proof { margin: 22px 0 0 !important; padding-top: 16px; border-top: 1px solid var(--hp-line); font-size: var(--hp-fs-sm) !important; }
.hp-xp__proof b { color: var(--hp-fg); font-weight: 600; }

@media (max-width: 860px) {
	.hp-xp { grid-template-columns: minmax(0, 1fr); }
	.hp-xp__panels { position: static; }
	.hp-xp__tools { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------
   11. Professional background
   --------------------------------------------------------------- */
.hp-bgx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.hp-bgx__main { display: grid; gap: 12px; }
.hp-bgx__main > p:not(.hp-label) { margin: 10px 0 0; font-size: var(--hp-fs-lg); color: var(--hp-muted); max-width: 58ch; text-wrap: pretty; }
.hp-bgx__main > p:not(.hp-label):first-of-type { color: var(--hp-fg); }

.hp-kv { margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.hp-kv > div { padding: 14px 0; border-top: 1px solid var(--hp-line); }
.hp-kv dt { font-size: var(--hp-fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--hp-muted); }
.hp-kv dd { margin: 4px 0 0; font-weight: 600; }
@media (max-width: 480px) { .hp-kv { grid-template-columns: minmax(0, 1fr); } }

.hp-tl-wrap { padding: clamp(24px, 3vw, 36px); border-radius: var(--hp-radius-lg); background: var(--hp-surface); border: 1px solid var(--hp-line); }
.hp-tl-wrap .hp-h3 { margin-bottom: 24px; }
.hp-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.hp-tl { position: relative; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 20px; padding-bottom: 28px; }
.hp-tl:last-child { padding-bottom: 0; }
.hp-tl::before { content: ""; position: absolute; left: calc(7.5rem + 30px); top: 20px; bottom: -2px; width: 1px; background: var(--hp-line-strong); }
.hp-tl:last-child::before { display: none; }
.hp-tl__when { font-size: var(--hp-fs-xs); font-weight: 600; color: var(--hp-accent-ink); padding-top: 3px; line-height: 1.4; }
.hp-tl__body { position: relative; padding-left: 26px; }
.hp-tl__body::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--hp-surface); border: 2px solid var(--hp-accent); }
.hp-tl__body h4 { margin: 0; font-size: 1rem; font-weight: 600; }
.hp-tl__org { margin: 2px 0 6px; font-size: var(--hp-fs-sm); color: var(--hp-accent-ink); font-weight: 500; }
.hp-tl__body p { margin: 0 0 10px; font-size: var(--hp-fs-sm); color: var(--hp-muted); }
@media (max-width: 980px) { .hp-bgx { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
	.hp-tl { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-left: 26px; }
	.hp-tl::before { left: 9px; top: 22px; }
	.hp-tl__body { padding-left: 0; }
	.hp-tl__body::before { left: -26px; top: -18px; }
}

/* ---------------------------------------------------------------
   12. Contact
   --------------------------------------------------------------- */
.hp-contact__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.hp-contact__intro { margin: 16px 0 0; font-size: var(--hp-fs-lg); color: var(--hp-muted); max-width: 44ch; text-wrap: pretty; }
.hp-contact__details { margin: 32px 0 0; display: grid; gap: 10px; }
.hp-contact__details > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--hp-surface); border: 1px solid var(--hp-line); }
.hp-contact__details dt { font-size: var(--hp-fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--hp-muted); }
.hp-contact__details dd { margin: 0; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.hp-contact__details a { text-decoration: none; }
.hp-contact__details a:hover { color: var(--hp-accent-ink); }

.hp-copy { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; font-weight: 600; text-align: left; }
.hp-copy__state { font-size: .6875rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--hp-surface-2); color: var(--hp-muted); }
.hp-copy.is-copied .hp-copy__state { color: var(--hp-ok); }

.hp-form { display: grid; gap: 18px; padding: clamp(22px, 3vw, 36px); border-radius: var(--hp-radius-lg); background: var(--hp-surface); border: 1px solid var(--hp-line); }
.hp-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hp-field { display: grid; gap: 7px; min-width: 0; }
.hp-field label, .hp-field legend { font-size: var(--hp-fs-sm); font-weight: 600; padding: 0; }
.hp-field input, .hp-field textarea {
	width: 100%;
	min-width: 0;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid var(--hp-line-strong);
	background: var(--hp-bg);
	color: var(--hp-fg);
	font: inherit;
	transition: border-color .2s, box-shadow .2s;
}
.hp-field textarea { min-height: 136px; resize: vertical; }
.hp-field input:focus, .hp-field textarea:focus { outline: none; border-color: var(--hp-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp-accent) 22%, transparent); }
.hp-field ::placeholder { color: var(--hp-muted); opacity: .75; }
.hp-pills { border: 0; margin: 0; padding: 0; min-width: 0; }
.hp-pills__set { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hp-pills input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hp-pills label.hp-pill { font-size: var(--hp-fs-sm); font-weight: 500; padding: 8px 12px; border: 1px solid var(--hp-line-strong); border-radius: 8px; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.hp-pills input:checked + label.hp-pill { background: var(--hp-solid); color: var(--hp-solid-fg); border-color: var(--hp-solid); }
.hp-pills input:focus-visible + label.hp-pill { outline: 2px solid var(--hp-focus); outline-offset: 2px; }
.hp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.hp-form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.hp-form__note { margin: 0; font-size: var(--hp-fs-sm); color: var(--hp-muted); }
.hp-form__status { margin: 0; font-size: var(--hp-fs-sm); font-weight: 600; min-height: 1.4em; }
.hp-form__status.is-ok { color: var(--hp-ok); }
.hp-form__status.is-err { color: var(--hp-err); }
.hp-form.is-busy button[type="submit"] { opacity: .6; pointer-events: none; }
@media (max-width: 960px) { .hp-contact__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .hp-form__row { grid-template-columns: minmax(0, 1fr); } .hp-contact__details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------------------------------------------------------------
   13. Footer
   --------------------------------------------------------------- */
.hp-footer {
	--hp-fg: #E9F3F2;
	--hp-muted: #A3B5B9;
	--hp-line: rgba(172, 188, 191, .16);
	--hp-line-strong: rgba(172, 188, 191, .3);
	--hp-accent-ink: #9CC6E3;
	--hp-surface-2: rgba(172, 188, 191, .1);
	--hp-solid: #F4FCFB;
	--hp-solid-fg: #243C4C;
	background: var(--hp-ink);
	color: var(--hp-fg);
	padding-top: clamp(56px, 7vw, 96px);
	padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
:root[data-theme="dark"] .hp-footer { background: #0E1A21; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hp-footer { background: #0E1A21; } }
.hp-footer .hp-btn--solid:hover { background: var(--hp-accent-ink); color: #13222B; }

.hp-footer__cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; padding-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--hp-line); }
.hp-footer__title { margin: 0; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.hp-footer__title span { color: var(--hp-accent-ink); }
.hp-footer__mail {
	position: relative;
	display: inline-block;
	margin-top: 16px;
	font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem);
	font-weight: 500;
	text-decoration: none;
	color: var(--hp-fg);
}
.hp-footer__mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform-origin: left; transform: scaleX(.25); transition: transform .5s var(--hp-ease); }
.hp-footer__mail:hover::after { transform: scaleX(1); }
.hp-footer__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hp-footer__cols { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: clamp(40px, 5vw, 56px); }
.hp-footer__about { margin: 0; max-width: 34ch; color: var(--hp-muted); font-size: var(--hp-fs-sm); }
.hp-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-weight: 600; }
.hp-footer__brand .hp-brand__mark { background: #F4FCFB; color: #243C4C; }
.hp-footer__label { margin: 0 0 12px; font-size: var(--hp-fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--hp-muted); }
.hp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--hp-fs-sm); }
.hp-footer ul a { text-decoration: none; }
.hp-footer ul a:hover { color: var(--hp-accent-ink); }
.hp-footer .hp-clock time { font-variant-numeric: tabular-nums; color: var(--hp-fg); font-weight: 600; }

.hp-footer__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 20px; border-top: 1px solid var(--hp-line); font-size: var(--hp-fs-xs); color: var(--hp-muted); }
.hp-footer__bar a { color: var(--hp-fg); text-decoration: none; font-weight: 600; }
.hp-footer__bar a:hover { color: var(--hp-accent-ink); }
.hp-totop { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--hp-line-strong); background: transparent; cursor: pointer; font-size: var(--hp-fs-xs); font-weight: 600; color: var(--hp-fg); }
.hp-totop svg { width: 14px; height: 14px; transition: transform .3s var(--hp-ease); }
.hp-totop:hover svg { transform: translateY(-2px); }

@media (max-width: 900px) {
	.hp-footer__cta { grid-template-columns: minmax(0, 1fr); }
	.hp-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hp-footer__cols > div:first-child { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------
   14. Generic content (pages, single project, archive)
   --------------------------------------------------------------- */
.hp-page { padding-block: clamp(48px, 7vw, 96px) var(--hp-section); }
.hp-page__head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); padding-bottom: 28px; border-bottom: 1px solid var(--hp-line); }
.hp-page__title { margin: 0; font-size: var(--hp-fs-h1); line-height: 1.1; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.hp-page__lede { margin: 0; font-size: var(--hp-fs-lg); color: var(--hp-muted); max-width: 60ch; }

.hp-prose { max-width: 72ch; font-size: var(--hp-fs-lg); line-height: 1.7; }
.hp-prose > * + * { margin-top: 1.1em; }
.hp-prose h2 { font-size: 1.625rem; line-height: 1.25; margin-top: 1.8em; letter-spacing: -.01em; }
.hp-prose h3 { font-size: 1.25rem; line-height: 1.3; margin-top: 1.6em; }
.hp-prose a { color: var(--hp-accent-ink); }
.hp-prose img { border-radius: var(--hp-radius); }
.hp-prose blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 3px solid var(--hp-accent); color: var(--hp-muted); }
.hp-prose pre { overflow-x: auto; padding: 18px; border-radius: var(--hp-radius); background: var(--hp-surface-2); font-family: var(--hp-font-mono); font-size: .875rem; }
.hp-prose code { font-family: var(--hp-font-mono); font-size: .9em; }

.hp-case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(32px, 6vw, 80px); align-items: start; }
.hp-case__aside { position: sticky; top: calc(var(--hp-header-h) + 32px); padding: 24px; border-radius: var(--hp-radius-lg); background: var(--hp-surface); border: 1px solid var(--hp-line); }
.hp-case__aside .hp-spec { margin: 0; }
.hp-case__hero { margin-bottom: clamp(32px, 5vw, 56px); }
@media (max-width: 960px) { .hp-case { grid-template-columns: minmax(0, 1fr); } .hp-case__aside { position: static; } }

.hp-grid-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(20px, 3vw, 32px); }
.hp-post { display: grid; gap: 10px; text-decoration: none; }
.hp-post img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-radius: var(--hp-radius); }
.hp-post h2 { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.hp-post p { margin: 0; color: var(--hp-muted); font-size: var(--hp-fs-sm); }
.hp-pagination { margin-top: 48px; display: flex; gap: 6px; flex-wrap: wrap; }
.hp-pagination .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--hp-line-strong); text-decoration: none; }
.hp-pagination .page-numbers.current { background: var(--hp-solid); color: var(--hp-solid-fg); border-color: var(--hp-solid); }

.hp-404 { min-height: 60vh; display: grid; align-content: center; justify-items: start; gap: 16px; }
.hp-404__code { margin: 0; font-family: var(--hp-font-mono); font-size: var(--hp-fs-sm); color: var(--hp-accent-ink); font-weight: 500; }

.alignwide { max-width: min(1200px, 100%); }
.alignfull { width: 100%; max-width: none; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: var(--hp-fs-sm); color: var(--hp-muted); }

/* ---------------------------------------------------------------
   15. Elementor kit guard
   Elementor Site Settings can style every <button> and <a> on the page.
   These higher-specificity resets keep the theme's own controls intact.
   --------------------------------------------------------------- */
html body .hp-nav__link, html body .hp-filter button, html body .hp-xp__tab,
html body .hp-iconbtn, html body .hp-totop, html body .hp-copy, html body .hp-more summary {
	font-family: var(--hp-font);
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	color: var(--hp-fg);
}
html body .hp-nav__link, html body .hp-iconbtn, html body .hp-totop, html body .hp-copy, html body .hp-xp__tab { background-color: transparent; }
html body .hp-nav__link:hover, html body .hp-nav__item.is-open > .hp-nav__link { background-color: var(--hp-surface-2); }
html body .hp-xp__tab[aria-selected="true"] { background-color: var(--hp-surface); box-shadow: var(--hp-shadow); }
html body .hp-filter button { background-color: transparent; }
html body .hp-filter button[aria-pressed="true"] { background-color: var(--hp-solid); color: var(--hp-solid-fg); }
html body .hp-btn { font-family: var(--hp-font); text-transform: none; letter-spacing: normal; }
html body .hp-btn--solid { background-color: var(--hp-solid); color: var(--hp-solid-fg); }
html body .hp-btn--solid:hover { background-color: var(--hp-accent-ink); }
html body .hp-btn--line { background-color: transparent; color: var(--hp-fg); }
html body .hp-header a, html body .hp-footer a, html body .hp-card a, html body .hp-mega a { text-decoration: none; }
html body .hp-brand, html body .hp-mega__item, html body .hp-mega__side a, html body .hp-recent { color: var(--hp-fg); }
html body .hp-link { color: var(--hp-accent-ink); }

/* ---------------------------------------------------------------
   16. Reduced motion
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	.hp-js [data-hp-reveal].is-pending { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
	html body .hp-nav__link:hover, html body .hp-nav__item.is-open > .hp-nav__link { background-color: transparent; }
}
