/* ==========================================================================
   Zarnigor Portfolio — main styles
   1. Tokens (dark default / light)   2. Base   3. Layout & 100vh sections
   4. Header & nav   5. UI   6. Front page sections   7. Inner pages
   8. Footer   9. Utilities & motion
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
	--accent: #7c6cff;
	--accent-text: color-mix(in srgb, var(--accent) 62%, #fff);
	--accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
	--on-accent: #fff;

	--bg: #07080b;
	--bg-2: #0c0e13;
	--surface: #101218;
	--surface-2: #161922;
	--text: #f3f3f5;
	--muted: #9a9fad;
	--faint: #5d6270;
	--line: #1e2129;
	--line-2: #2a2e39;
	--btn-bg: #f3f3f5;
	--btn-text: #07080b;
	--shadow-lg: 0 30px 80px rgba(0, 0, 0, .5);

	/* Montserrat for the whole theme (body, headings and small labels). */
	--font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: var(--font-body);
	--font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--radius: 20px;
	--radius-sm: 12px;
	--header-h: 76px;
	--gutter: clamp(16px, 4vw, 40px);
	--section: clamp(72px, 9vw, 128px);

	color-scheme: dark;
}

[data-theme="light"] {
	--accent-text: color-mix(in srgb, var(--accent) 80%, #000);
	--accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
	--bg: #f6f6f8;
	--bg-2: #eeeef2;
	--surface: #ffffff;
	--surface-2: #f1f1f5;
	--text: #0d0e12;
	--muted: #5a5f6c;
	--faint: #9a9eaa;
	--line: #e3e3ea;
	--line-2: #d3d3dc;
	--btn-bg: #0d0e12;
	--btn-text: #fff;
	--shadow-lg: 0 30px 70px rgba(20, 20, 40, .14);
	color-scheme: light;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: clamp(.95rem, .92rem + .16vw, 1rem);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	transition: background-color .3s ease, color .3s ease;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-body);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.02em;
	margin: 0 0 .5em;
	text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent-text); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
ul, ol { padding-left: 1.25em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }

mark { background: none; color: var(--accent-text); }

.mono { font-family: var(--font-mono); font-size: .74rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.icon { flex-shrink: 0; vertical-align: middle; }
.flip { transform: scaleX(-1); }

/* 3. Layout ---------------------------------------------------------------- */
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 900px; }
.container--text { max-width: calc(720px + var(--gutter) * 2); }

.site-main { min-height: 60vh; outline: none; }

.section { position: relative; padding-block: var(--section); border-top: 1px solid var(--line); }
.section--tight { padding-block: clamp(32px, 5vw, 56px) var(--section); border-top: 0; }
.section--alt { background: var(--bg-2); }

/* Full-screen sections on desktop (front page). */
@media (min-width: 1024px) and (min-height: 600px) {
	.zp-full .site-main > .section,
	.zp-full .site-main > .hero {
		min-height: 100vh;
		min-height: 100svh;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
	.zp-full .site-main > .hero { min-height: calc(100svh - var(--header-h)); }
	.zp-full .site-main > .section > .container { width: 100%; }
	.zp-full .site-main > .section { padding-block: clamp(72px, 9vh, 104px); }
}

.section__head { max-width: 860px; margin-bottom: clamp(32px, 4vw, 52px); }
.section__title { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3rem); margin: 0; }
.section__lead { color: var(--muted); font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); max-width: 680px; margin: 1em 0 0; }

.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; color: var(--muted); font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow__num { color: var(--accent-text); }
.eyebrow__line { width: 32px; height: 1px; background: var(--line-2); }

.cards { display: grid; gap: clamp(16px, 2vw, 24px); list-style: none; margin: 0; padding: 0; }
.cards--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

/* 4. Header & nav ---------------------------------------------------------- */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1000; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: color-mix(in srgb, var(--bg) 72%, transparent);
	-webkit-backdrop-filter: saturate(160%) blur(16px);
	backdrop-filter: saturate(160%) blur(16px);
}
.nav-open .site-header::before { background: var(--bg); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 20px; }

.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.logo__img { max-height: 36px; width: auto; }
.logo__mark { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 700; font-size: 1rem; }
.logo__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.logo__name { font-weight: 600; white-space: nowrap; letter-spacing: -.01em; }
.logo__role { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.site-nav { margin-inline: auto; }
.menu { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.menu--primary { padding: 5px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.menu a { display: block; padding: 7px 16px; border-radius: 999px; color: var(--muted); font-size: .93rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color .2s, background-color .2s; }
.menu a:hover, .menu .current-menu-item > a, .menu a[aria-current] { color: var(--text); background: var(--surface-2); }

.site-header__actions { display: flex; align-items: center; gap: 8px; }
.site-nav__mobile-extra { display: none; }

.lang-switch { display: flex; gap: 2px; list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; }
.lang-switch a { display: block; padding: 4px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .06em; color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.is-current { background: var(--btn-bg); color: var(--btn-text); }

.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; transition: border-color .2s, transform .2s; }
.icon-btn:hover { border-color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.theme-toggle__moon { display: none; }
[data-theme="light"] .theme-toggle__sun { display: none; }
[data-theme="light"] .theme-toggle__moon { display: block; }

.nav-toggle, .nav-toggle__close { display: none; }

@media (max-width: 1100px) {
	.nav-toggle { display: inline-grid; }
	.site-header .site-header__lang { display: none; }
	.site-header__actions { margin-left: auto; }
	.site-nav {
		position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
		margin: 0; padding: 24px var(--gutter) 40px;
		background: var(--bg);
		display: flex; flex-direction: column; gap: 28px; overflow-y: auto;
		opacity: 0; visibility: hidden; transform: translateY(-8px);
		transition: opacity .25s, transform .25s, visibility .25s;
	}
	.admin-bar .site-nav { top: calc(var(--header-h) + 46px); }
	.nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
	.nav-open { overflow: hidden; }
	.nav-open .nav-toggle__open { display: none; }
	.nav-open .nav-toggle__close { display: block; }
	.menu--primary { flex-direction: column; gap: 0; padding: 0; border: 0; background: none; border-radius: 0; }
	.menu--primary a { font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; color: var(--text); padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line); }
	.menu--primary a:hover { background: none; color: var(--accent-text); }
	.site-nav__mobile-extra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
	.site-nav__mobile-extra .lang-switch a { padding: 8px 14px; font-size: .85rem; }
}
@media (max-width: 420px) { .logo__role { display: none; } }

/* 5. UI -------------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1px solid transparent;
	font: inherit; font-size: .97rem; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: transform .2s, background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: none; }
.btn--primary { background: var(--btn-bg); color: var(--btn-text); }
.btn--primary:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--text); }
.btn--link { color: var(--muted); padding-inline: 6px; min-height: 40px; }
.btn--link:hover { color: var(--text); transform: none; }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: .9rem; }
.btn .icon { transition: transform .2s; }
.btn:hover .icon-arrow { transform: translateX(3px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--surface) 60%, transparent); font-size: .92rem; color: var(--text); }
.chip__num { color: var(--accent-text); font-size: .72rem; }
.chip .icon { color: var(--accent-text); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tag { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-size: .9rem; line-height: 1.3; }
.tag a { color: inherit; text-decoration: none; }
.tags--sm .tag { padding: 3px 9px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .03em; border-radius: 6px; color: var(--muted); }

.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .3s, border-color .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.card__title { font-size: 1.2rem; margin: 0 0 .5em; }
.card__title a { color: inherit; text-decoration: none; }
.card__text { color: var(--muted); margin: 0; font-size: .97rem; }
.card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 500; font-size: .92rem; color: var(--text); }
.card__more .icon { transition: transform .2s; }
.card:hover .card__more .icon { transform: translateX(3px); }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { margin-top: 4px; color: var(--accent-text); }

.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter__item { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: .92rem; text-decoration: none; }
.filter__item:hover { color: var(--text); border-color: var(--text); }
.filter__item.is-active { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }

.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form__input { flex: 1; min-width: 0; min-height: 48px; padding: 12px 18px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; }
.search-form__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-form__btn { min-width: 48px; padding: 12px; }

.social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); transition: color .2s, border-color .2s; }
.social a:hover { color: var(--text); border-color: var(--text); }

/* 6. Front page sections --------------------------------------------------- */

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(32px, 4vw, 56px) 0; display: flex; flex-direction: column; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__fade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 40%, transparent 70%), linear-gradient(0deg, var(--bg) 0%, transparent 30%); }
.hero__inner { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero__meta { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.hero__role { margin: 0 0 6px; color: var(--accent-text); font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); font-weight: 500; }
.hero__stack { margin: 0 0 22px; color: var(--muted); font-size: .76rem; text-transform: none; letter-spacing: .04em; }
.hero__title { font-size: clamp(2.3rem, 1rem + 4.1vw, 4.3rem); line-height: 1.08; letter-spacing: -.035em; max-width: 19ch; margin-bottom: 26px; }
.hero__text { max-width: 620px; color: var(--muted); font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem); margin-bottom: 30px; }
.hero__row { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; margin-bottom: 32px; }
.hero__label { margin: 0; color: var(--faint); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__wordmark {
	margin: clamp(24px, 3vw, 40px) 0 0; padding-inline: var(--gutter);
	font-weight: 700; line-height: .78; letter-spacing: -.06em; white-space: nowrap;
	font-size: clamp(3.5rem, min(14vw, 17vh), 13rem); text-align: center;
	background: linear-gradient(180deg, color-mix(in srgb, var(--text) 16%, transparent) 0%, transparent 92%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	user-select: none; overflow: hidden;
}
@media (max-width: 640px) {
	.hero__row { grid-template-columns: 1fr; gap: 10px; }
	.hero__actions .btn { flex: 1 1 100%; }
	.hero__fade { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent) 0%, var(--bg) 100%); }
}

/* About */
.about__lead { font-size: clamp(1.45rem, .95rem + 1.6vw, 2.35rem); line-height: 1.18; letter-spacing: -.03em; max-width: 34ch; }
.about__lead .w { transition: color .3s; color: var(--faint); }
.about__lead .w.on { color: var(--text); }
.about .section__head { max-width: none; }
.about__grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about__grid--photo { grid-template-columns: .7fr 1.2fr .7fr; }
.about__media { margin: 0; }
.about__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); filter: grayscale(.2); }
.about__text { color: var(--muted); font-size: 1.05rem; max-width: 640px; }
.about__text p:last-child { margin-bottom: 0; }
.about__stats .hero__label { margin-bottom: 18px; }
.stats { display: grid; gap: 22px; margin: 0; }
.stats__item { display: flex; flex-direction: column-reverse; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.stats__value { margin: 0; font-size: clamp(2.2rem, 1.6rem + 1.8vw, 3.2rem); font-weight: 600; line-height: 1; letter-spacing: -.04em; }
.stats__label { color: var(--muted); font-size: .92rem; margin-top: 6px; }
@media (max-width: 960px) {
	.about__grid, .about__grid--photo { grid-template-columns: 1fr; }
	.about__media { max-width: 380px; }
	.stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
	.stats__item { border-bottom: 0; padding-bottom: 0; }
}

/* Services */
.services__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service { padding: clamp(22px, 2.4vw, 30px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .3s; }
.service:hover { background: var(--surface); }
.service__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.service__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2); color: var(--accent-text); }
.service__num { color: var(--faint); }
.service__title { font-size: 1.25rem; margin-bottom: .6em; letter-spacing: -.02em; }
.service__text { color: var(--muted); margin: 0; font-size: .97rem; }
@media (max-width: 960px) { .services__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services__grid { grid-template-columns: 1fr; } }

/* Skills */
.skills__rows { margin: 0; border-top: 1px solid var(--line); }
.skills__row { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: center; }
.skills__title { margin: 0; color: var(--muted); }
.skills__row dd { margin: 0; }
@media (max-width: 700px) { .skills__row { grid-template-columns: 1fr; gap: 12px; } }

.marquee { margin-top: clamp(48px, 6vw, 72px); overflow: hidden; padding-block: 8px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 56px; width: max-content; animation: marquee 50s linear infinite; }
.marquee__track span { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem); font-weight: 600; letter-spacing: -.03em; color: var(--faint); white-space: nowrap; }
.marquee__track span:nth-child(4n+1) { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Projects */
.projects__points { margin-top: -24px; margin-bottom: clamp(40px, 5vw, 64px); grid-template-columns: 160px 1fr; }
.features { display: grid; gap: clamp(24px, 3vw, 40px); }
.feature {
	display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
	padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line); border-radius: 28px; background: var(--bg-2);
	transition: border-color .3s;
}
.feature:hover { border-color: var(--line-2); }
.feature:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.feature:nth-child(even) .feature__media { order: 2; }
.browser { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-lg); text-decoration: none; }
.browser__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.browser__url { margin-left: 10px; padding: 3px 12px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .68rem; text-transform: none; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser__img { width: 100%; aspect-ratio: 16 / 9.5; object-fit: cover; object-position: top; transition: transform 1.2s ease; }
.feature:hover .browser__img { transform: scale(1.03); }
.browser__empty { display: grid; place-items: center; aspect-ratio: 16 / 9.5; color: var(--faint); }
.feature__body { padding: clamp(4px, 1vw, 16px); }
.feature__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; color: var(--accent-text); }
.feature__meta span + span { color: var(--muted); }
.feature__title { font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.2rem); margin-bottom: .25em; }
.feature__client { color: var(--muted); margin-bottom: 18px; }
.feature__text { color: var(--muted); font-size: 1.02rem; margin-bottom: 22px; }
.feature__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; }
.projects__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: clamp(32px, 4vw, 56px); padding-top: 28px; border-top: 1px solid var(--line); }
.projects__note { margin: 0; color: var(--muted); max-width: 560px; }
@media (max-width: 900px) {
	.feature, .feature:nth-child(even) { grid-template-columns: 1fr; }
	.feature:nth-child(even) .feature__media { order: 0; }
	.projects__points { grid-template-columns: 1fr; margin-top: 0; }
}

/* Project cards (archive, related) */
.project-card { display: flex; flex-direction: column; overflow: hidden; }
.project-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s ease; }
.project-card:hover .project-card__media img { transform: scale(1.04); }
.project-card__placeholder { height: 100%; display: grid; place-items: center; color: var(--faint); }
.project-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.project-card__body .tags { margin-top: 16px; }
.project-card__body .card__more { margin-top: auto; padding-top: 18px; }
.project-card__type { margin: 0 0 8px; font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); }

/* Why */
.why__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.why__item { grid-column: span 2; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); display: flex; flex-direction: column; transition: border-color .3s; }
.why__item:nth-child(4), .why__item:nth-child(5) { grid-column: span 3; }
.why__item:hover { border-color: var(--line-2); }
.why__num { color: var(--accent-text); margin-bottom: clamp(28px, 4vw, 56px); }
.why__title { font-size: clamp(1.3rem, 1.1rem + .6vw, 1.7rem); }
.why__text { color: var(--muted); margin: 0; }
@media (max-width: 960px) { .why__list { grid-template-columns: 1fr 1fr; } .why__item, .why__item:nth-child(4), .why__item:nth-child(5) { grid-column: auto; } }
@media (max-width: 600px) { .why__list { grid-template-columns: 1fr; } }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.step { padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); }
.step__num { display: block; font-family: var(--font-mono); font-size: .8rem; color: var(--accent-text); margin-bottom: 28px; }
.step__title { font-size: 1.2rem; }
.step__text { color: var(--muted); margin: 0; font-size: .97rem; }

/* Experience */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline__item { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.timeline__period { margin: 0; font-family: var(--font-mono); font-size: .8rem; color: var(--accent-text); letter-spacing: .04em; }
.timeline__title { font-size: 1.25rem; margin-bottom: .35em; }
.timeline__place { color: var(--muted); font-weight: 400; }
.timeline__body p { color: var(--muted); margin: 0; }
@media (max-width: 640px) { .timeline__item { grid-template-columns: 1fr; gap: 6px; } }

/* Testimonials */
.quote { margin: 0; padding: 28px; display: flex; flex-direction: column; }
.quote__icon { color: var(--accent-text); margin-bottom: 14px; }
.quote__text { margin: 0 0 20px; font-size: 1.02rem; }
.quote__author { margin-top: auto; display: flex; flex-direction: column; line-height: 1.4; }
.quote__author span { color: var(--muted); font-size: .9rem; }

/* FAQ */
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__grid .section__head { position: sticky; top: calc(var(--header-h) + 32px); }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q h3 { margin: 0; font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); font-weight: 500; letter-spacing: -.01em; }
.faq__q:hover h3 { color: var(--accent-text); }
.faq__icon { transition: transform .25s; color: var(--muted); }
.faq__item[open] .faq__icon { transform: rotate(45deg); color: var(--text); }
.faq__a { padding: 0 48px 24px 0; color: var(--muted); }
.faq__a p { margin: 0; }
@media (max-width: 900px) { .faq__grid { grid-template-columns: 1fr; } .faq__grid .section__head { position: static; } }

/* Blog cards */
.post-card { display: flex; flex-direction: column; overflow: hidden; }
.post-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card__body .card__more { margin-top: auto; padding-top: 18px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 12px; }

/* Contact */
.contact { overflow: hidden; isolation: isolate; }
.contact__glow { position: absolute; left: 50%; bottom: -40%; width: min(1100px, 120vw); aspect-ratio: 1; transform: translateX(-50%); z-index: -1; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 24%, transparent), transparent 60%); }
.contact__title { font-size: clamp(2.3rem, 1rem + 4.4vw, 4.8rem); line-height: 1.05; letter-spacing: -.04em; max-width: 16ch; margin-bottom: clamp(36px, 5vw, 64px); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; padding-top: 32px; border-top: 1px solid var(--line); }
.contact__intro { color: var(--muted); font-size: 1.07rem; }
.contact__intro strong { color: var(--text); font-weight: 600; }
.contact__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.contact__rows { list-style: none; margin: 0; padding: 0; }
.contact__row { display: grid; grid-template-columns: 110px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact__row:first-child { padding-top: 0; }
.contact__label { color: var(--faint); }
.contact__value { color: var(--text); font-size: 1.08rem; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact__value:hover { color: var(--accent-text); }
.contact__arrow { color: var(--faint); transition: transform .2s, color .2s; }
.contact__row:hover .contact__arrow { transform: translateX(3px); color: var(--text); }
.contact__copy { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; font-size: .68rem; }
.contact__copy:hover { color: var(--text); border-color: var(--text); }
.contact__form { margin-top: 32px; background: var(--surface); color: var(--text); padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .contact__row { grid-template-columns: 1fr auto; } .contact__label { grid-column: 1 / -1; } .contact__actions .btn { flex: 1 1 100%; } }

/* Forms (Contact Form 7, WPForms, comments) */
.contact__form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.contact__form textarea, .contact__form select,
.entry-content input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.entry-content textarea, .comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
	width: 100%; padding: 12px 14px; min-height: 48px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit;
}
.contact__form textarea, .entry-content textarea, .comment-form textarea { min-height: 140px; resize: vertical; }
.contact__form input:focus, .contact__form textarea:focus, .comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.contact__form [type="submit"], .entry-content [type="submit"], .comment-form [type="submit"] { min-height: 48px; padding: 12px 28px; border: 0; border-radius: 999px; background: var(--btn-bg); color: var(--btn-text); font: inherit; font-weight: 500; cursor: pointer; }

/* 7. Inner pages ----------------------------------------------------------- */
.page-header { padding-block: clamp(40px, 7vw, 96px) clamp(24px, 4vw, 40px); }
.page-header__title { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.6rem); line-height: 1.02; letter-spacing: -.045em; margin: 0; }
.page-header__lead { color: var(--muted); font-size: 1.15rem; max-width: 680px; margin: 18px 0 0; }

.breadcrumbs { margin-bottom: 24px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: .5; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current] { color: var(--text); display: inline-block; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.article__header { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 3vw, 36px); }
.article__cat { display: inline-block; margin-bottom: 16px; font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; text-decoration: none; }
.article__title { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.6rem); letter-spacing: -.04em; }
.article__cover { margin: 0 auto clamp(32px, 5vw, 56px); max-width: 1280px; }
.article__cover img { width: 100%; border-radius: var(--radius); }
.article__cover--browser img { border-radius: 0 0 var(--radius) var(--radius); border: 1px solid var(--line-2); border-top: 0; }
.browser-bar { display: flex; gap: 6px; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius) var(--radius) 0 0; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.article__footer { padding-block: 40px var(--section); display: grid; gap: 28px; }

.project__facts { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 22px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.project__facts dl { display: flex; flex-wrap: wrap; gap: 16px 44px; margin: 0; }
.project__facts dt { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.project__facts dd { margin: 4px 0 0; font-weight: 500; }

.entry-content { font-size: clamp(1.05rem, 1rem + .2vw, 1.15rem); line-height: 1.8; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content > * { margin-bottom: 0; }
.entry-content h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); margin-top: 2em; }
.entry-content h3 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); margin-top: 1.8em; }
.entry-content h2 + *, .entry-content h3 + * { margin-top: .6em; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content blockquote, .wp-block-quote { margin-inline: 0; padding: 6px 0 6px 24px; border-left: 2px solid var(--accent); font-size: 1.15em; font-weight: 500; }
.entry-content pre, .wp-block-code { padding: 20px; border-radius: var(--radius-sm); overflow-x: auto; background: var(--surface); border: 1px solid var(--line); font-family: var(--font-code); font-size: .88em; line-height: 1.6; }
.entry-content :not(pre) > code { padding: .15em .4em; border-radius: 6px; background: var(--surface-2); font-family: var(--font-code); font-size: .86em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95em; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content hr { border: 0; height: 1px; background: var(--line); }
.entry-content li + li { margin-top: .4em; }
.entry-content figcaption, .wp-caption-text { font-size: .88rem; color: var(--muted); text-align: center; margin-top: 10px; }
.entry-content .alignwide { width: min(1100px, 100vw - var(--gutter) * 2); max-width: none; margin-inline: calc(50% - min(550px, 50vw - var(--gutter))); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-inline: calc(50% - 50vw); }
.entry-content .alignfull img { border-radius: 0; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
@media (max-width: 600px) { .alignleft, .alignright { float: none; margin: 1em 0; } }
.wp-block-button__link { border-radius: 999px; background: var(--btn-bg); color: var(--btn-text); font-weight: 500; text-decoration: none; }

.share { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.share a { color: var(--muted); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line-2); }
.share a:hover { color: var(--text); border-color: var(--text); }

.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: flex; flex-direction: column; height: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); background: var(--bg-2); }
.post-navigation a:hover { border-color: var(--line-2); }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.nav-label { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.nav-title { font-weight: 500; line-height: 1.4; margin-top: 4px; }
@media (max-width: 560px) { .post-navigation .nav-links { grid-template-columns: 1fr; } .post-navigation .nav-next { grid-column: auto; } }

.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.page-numbers { min-width: 44px; height: 44px; padding: 0 12px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); font-family: var(--font-mono); font-size: .85rem; text-decoration: none; }
.page-numbers.current { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
a.page-numbers:hover { border-color: var(--text); }

.empty { text-align: center; color: var(--muted); padding: 48px 0; display: grid; justify-items: center; gap: 16px; }
.search-top { margin-bottom: 36px; }

.notfound { text-align: center; border-top: 0; }
.notfound .container { display: grid; justify-items: center; gap: 8px; }
.notfound__code { margin: 0; font-weight: 700; line-height: .9; font-size: clamp(7rem, 4rem + 12vw, 14rem); letter-spacing: -.07em; background: linear-gradient(180deg, var(--text), transparent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound__title { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem); }
.notfound__text { color: var(--muted); }
.notfound .search-form { width: 100%; margin: 16px 0; }

.comments { padding-bottom: var(--section); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .85rem; }
.comment-metadata a { color: var(--muted); }
.comment-form p { margin-bottom: 16px; }
.comment-form label { display: block; font-weight: 500; margin-bottom: 6px; }
.widgets { padding-bottom: var(--section); display: grid; gap: 32px; }
.widget-title { font-size: 1.1rem; }

/* 8. Footer ---------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(48px, 6vw, 72px); background: var(--bg); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.site-footer__text { color: var(--muted); max-width: 380px; margin: 18px 0 22px; }
.site-footer__nav .menu { flex-direction: column; gap: 2px; padding: 0; border: 0; background: none; }
.site-footer__nav .menu a { padding: 6px 0; border-radius: 0; }
.site-footer__nav .menu a:hover { background: none; color: var(--text); }
.site-footer__contacts { font-style: normal; display: grid; gap: 12px; align-content: start; }
.site-footer__contacts > * { display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; word-break: break-word; }
.site-footer__contacts a:hover { color: var(--text); }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.site-footer__bottom p { margin: 0; }
.to-top { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.to-top:hover { color: var(--text); }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* 9. Utilities & motion ---------------------------------------------------- */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important; }

.reveal-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.reveal-ready .reveal { opacity: 1; transform: none; }
	.marquee__track { animation: none; flex-wrap: wrap; width: auto; }
	.about__lead .w { color: var(--text); }
}

@media print {
	.site-header, .site-footer, .contact, .share, .post-navigation, .hero__canvas { display: none !important; }
	body { background: #fff; color: #000; }
}
