/* ==========================================================================
   Saife Portfolio — main.css
   ========================================================================== */

/* Fonts (self-hosted, latin subset) -------------------------------------- */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }

/* Tokens ----------------------------------------------------------------- */
:root {
	--bg: #0B1426;
	--bg-deep: #070E1C;
	--surface: #101C33;
	--surface-2: #15233F;
	--arch: #1B2D50;
	--line: #1C2B47;
	--line-2: #243554;
	--line-3: #2E4166;
	--text: #EEF2F9;
	--muted: #A3B3CC;
	--ice: #C9DAF3;
	--dim: #7F93B3;
	--ok: #3DDC97;
	--accent: #F2B55C;
	--on-accent: #0B1426;

	--display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
	--body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--pad: clamp(20px, 6.67vw, 96px);
	--max: 1440px;
	--header-h: 88px;
	--section-gap: clamp(88px, 10vw, 140px);
	--radius: 16px;
	--radius-lg: 28px;
	--ease: cubic-bezier(.22, 1, .36, 1);
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html:not(.lenis) { scroll-behavior: smooth; } }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.icon { flex-shrink: 0; }
.accent-text { color: var(--accent); }

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

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: fixed; top: 12px; left: 12px; z-index: 1000;
	padding: 12px 18px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 700;
	transform: translateY(-160%); transition: transform .2s;
}
.skip-link:focus { transform: none; color: var(--on-accent); }

/* Shared pieces ---------------------------------------------------------- */
.eyebrow {
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--accent);
}
.section-title, .hero__title, .contact__title, .page-title, .project__title, .role__title, .service__title { text-wrap: balance; }
.section-title {
	font-family: var(--display);
	font-weight: 800;
	font-size: clamp(36px, 3.9vw, 56px);
	line-height: 1.02;
	letter-spacing: -.03em;
	max-width: 22ch;
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.section-head > div:first-child { display: flex; flex-direction: column; gap: 14px; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	height: 52px; padding: 0 26px; border-radius: 999px;
	font-weight: 700; font-size: 16px; line-height: 1; white-space: nowrap;
	border: 1px solid transparent; background: none;
	transition: background-color .2s, border-color .2s, color .2s, transform .3s var(--ease);
}
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { color: var(--on-accent); filter: brightness(1.06); }
.btn--outline { border-color: var(--line-3); color: var(--text); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { height: 44px; padding: 0 20px; font-size: 14px; }
.btn--lg { height: 60px; padding: 0 30px; font-size: 17px; }
.btn--block { width: 100%; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 14px; background: var(--surface-2); color: var(--ice); }

/* Header ----------------------------------------------------------------- */
.site-header {
	position: fixed; inset: 0 0 auto 0; z-index: 100;
	padding-top: env(safe-area-inset-top, 0px);
	pointer-events: none;
}
.site-header__inner {
	pointer-events: auto;
	max-width: var(--max);
	height: var(--header-h);
	margin: 0 auto;
	padding: 0 var(--pad);
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	border-bottom: 1px solid var(--line);
	background: rgba(11, 20, 38, 0);
	transition: height .45s var(--ease), margin .45s var(--ease), padding .45s var(--ease), border-radius .45s var(--ease), background-color .45s, border-color .45s, max-width .45s var(--ease);
}
.brand { display: flex; align-items: center; min-height: 44px; }
.brand__logo { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; }
.brand__docked { display: none; align-items: center; gap: 14px; }
.brand__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: center 12%; border: 1.5px solid var(--accent); }
.brand__id { display: flex; flex-direction: column; line-height: 1.25; }
.brand__id strong { font-family: var(--display); font-weight: 700; font-size: 17px; }
.brand__id small { font-size: 13px; color: var(--muted); }
.brand:hover .brand__id strong { color: var(--text); }

.nav-menu { display: flex; gap: 36px; font-size: 15px; font-weight: 600; }
.nav-menu a { display: inline-flex; align-items: center; min-height: 44px; }
.nav-menu .current-menu-item > a, .nav-menu a.is-active { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-book { display: none; }
.menu-toggle { display: none; }

.recruiter-toggle {
	display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
	padding: 0; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--muted);
}
.recruiter-toggle__short { display: none; }
.recruiter-toggle__track {
	width: 44px; height: 24px; padding: 3px; border-radius: 12px;
	background: var(--line); border: 1px solid var(--line-3); display: flex;
	transition: background-color .25s, border-color .25s;
}
.recruiter-toggle__thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .3s var(--ease), background-color .25s; }
.recruiter-toggle[aria-pressed="true"] { color: var(--text); }
.recruiter-toggle[aria-pressed="true"] .recruiter-toggle__track { background: var(--accent); border-color: var(--accent); }
.recruiter-toggle[aria-pressed="true"] .recruiter-toggle__thumb { transform: translateX(20px); background: var(--on-accent); }

.site-header.is-scrolled:not(.is-docked) .site-header__inner {
	background: rgba(11, 20, 38, .86);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}
@media (min-width: 1441px) {
	.site-header.is-scrolled:not(.is-docked) { background: rgba(11, 20, 38, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}

/* Docked state */
.site-header.is-docked .site-header__inner {
	height: 72px;
	max-width: calc(var(--max) - 2 * var(--pad));
	margin-top: 16px;
	padding: 0 12px;
	border: 1px solid var(--line-3);
	border-radius: 36px;
	background: rgba(16, 28, 51, .88);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}
.site-header.is-docked .brand__logo { display: none; }
.site-header.is-docked .brand__docked { display: flex; animation: dock-in .5s var(--ease) both; }
.site-header.is-docked .recruiter-toggle__label, .site-header.is-docked .recruiter-toggle__short { display: none; }
.site-header.is-docked .header-cv { display: none; }
.site-header.is-docked .header-book { display: inline-flex; }
html.recruiter-mode .site-header.is-docked .header-cv { display: inline-flex; }
html.recruiter-mode .site-header.is-docked .header-book { display: none; }
@keyframes dock-in { from { opacity: 0; transform: translateY(8px) scale(.92); } to { opacity: 1; transform: none; } }

.site-main { padding-top: var(--header-h); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Hero ------------------------------------------------------------------- */
.hero {
	max-width: var(--max);
	margin: 0 auto;
	padding: clamp(40px, 5vw, 72px) var(--pad) 0;
	display: grid;
	grid-template-columns: 1.15fr .85fr;
	gap: 48px;
	align-items: center;
	min-height: min(860px, calc(100svh - var(--header-h)));
}
.hero__copy { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.status-pill {
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 36px; padding: 0 16px; border-radius: 18px;
	background: #102A24; border: 1px solid #1F5A48;
	font-size: 14px; font-weight: 600; color: #B9F0DA;
}
.status-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(61, 220, 151, 0); } }

.hero__role { font-family: var(--mono); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ice); }
.hero__title {
	font-family: var(--display); font-weight: 800;
	font-size: clamp(44px, 5.3vw, 76px);
	line-height: .98; letter-spacing: -.035em;
	max-width: 13ch;
}
.hero__title .word { will-change: transform; }
.hero__text { font-size: clamp(17px, 1.35vw, 19px); color: var(--muted); max-width: 36em; }
.hero__paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 640px; margin-top: 6px; }
.path-card {
	display: flex; flex-direction: column; gap: 6px;
	padding: 20px 22px; border-radius: var(--radius);
	background: var(--surface-2); border: 1px solid var(--line-3);
	transition: transform .35s var(--ease), border-color .25s;
}
.path-card:hover { color: var(--text); border-color: var(--accent); transform: translateY(-3px); }
.path-card__kicker { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.path-card__text { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 18px; font-weight: 700; }
.path-card__text .icon { transition: transform .35s var(--ease); }
.path-card:hover .path-card__text .icon { transform: translateX(4px); }
.path-card--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.path-card--primary:hover { color: var(--on-accent); }
.path-card--primary .path-card__kicker { color: var(--on-accent); opacity: .75; }

.video-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; border: 0; background: none; font-size: 15px; font-weight: 600; color: var(--ice); }
.video-link__icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-3); display: grid; place-items: center; transition: background-color .25s, color .25s, border-color .25s; }
.video-link:hover { color: var(--accent); }
.video-link:hover .video-link__icon { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.hero__visual { position: relative; height: clamp(480px, 46vw, 660px); }
.hero__ring {
	position: absolute; left: 6%; top: 2%;
	width: 88%; aspect-ratio: 1; border-radius: 50%;
	border: 1.5px solid var(--accent); opacity: .55;
}
.hero__ring::after {
	content: ""; position: absolute; top: 50%; right: -6px; width: 11px; height: 11px; margin-top: -5.5px;
	border-radius: 50%; background: var(--accent);
}
.motion-ready .hero__ring { animation: orbit 40s linear infinite; }
@keyframes orbit { to { rotate: 360deg; } }

.hero__figure {
	position: absolute; right: 0; bottom: 0;
	width: min(440px, 86%);
	aspect-ratio: 440 / 600;
	clip-path: inset(-40% 0 0 0 round 0 0 28px 28px);
	transform-origin: 50% 100%;
}
.hero__arch {
	position: absolute; left: 0; right: 0; bottom: 0; height: 86%;
	border-radius: 999px 999px 28px 28px;
	background: var(--arch);
	border: 1px solid var(--line-3);
}
.hero__portrait { position: absolute; left: 4%; bottom: 0; width: 92%; height: auto; }

.float-card {
	position: absolute;
	padding: 12px 16px; border-radius: 14px;
	background: rgba(16, 28, 51, .92); border: 1px solid var(--line-3);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	color: var(--ice); font-size: 13px; line-height: 1.35;
}
.float-card--level { left: 0; top: 58%; width: 220px; display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; }
a.float-card--level { transition: border-color .25s; }
a.float-card--level:hover { color: var(--ice); border-color: var(--accent); }
.float-card__value { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--accent); }
.float-card__label { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; }
.float-card--badge { right: -8px; top: 36%; display: flex; align-items: center; gap: 12px; max-width: 200px; }
.float-card__big { font-family: var(--display); font-size: 28px; font-weight: 800; color: var(--accent); }
.float-card--chip { right: 10px; bottom: 20px; font-weight: 600; font-size: 13px; }

/* Recruiter summary ------------------------------------------------------- */
.recruiter-summary { display: none; max-width: var(--max); margin: 56px auto 0; padding: 0 var(--pad); }
html.recruiter-mode .recruiter-summary { display: block; }
html.recruiter-mode [data-recruiter-hide] { display: none !important; }
.recruiter-summary__card {
	padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-lg);
	background: var(--surface); border: 1.5px solid var(--accent);
	display: grid; gap: 28px;
}
.recruiter-summary__title { font-family: var(--display); font-size: clamp(28px, 2.6vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.recruiter-summary__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; }
.fact dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.fact dd { font-size: 16px; font-weight: 600; }
.recruiter-summary__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Proof ------------------------------------------------------------------ */
.proof { max-width: var(--max); margin: 56px auto 0; padding: 0 var(--pad); }
.proof__list {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
	padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.proof__item, .proof__link { display: flex; flex-direction: column; gap: 6px; }
.proof__value { font-family: var(--display); font-size: clamp(32px, 4.4vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.proof__label { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }
.proof__link:hover .proof__label { color: var(--accent); }

/* Work ------------------------------------------------------------------- */
.work { margin-top: var(--section-gap); }
.work__pin { max-width: var(--max); margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.work__head { padding: 0 var(--pad); }
.work__progress { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 14px; color: var(--muted); white-space: nowrap; }
.work__bar { position: relative; width: 160px; height: 2px; background: var(--line-2); margin-left: 4px; }
.work__bar-fill { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(.25); }

.work__viewport {
	position: relative; /* contains absolutely positioned children (screen-reader text) */
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: 8px;
}
.work__viewport::-webkit-scrollbar { display: none; }
.work.is-pinned .work__viewport { overflow: visible; scroll-snap-type: none; }
.work__viewport { margin-inline: calc(50% - 50vw); }
.work__track { display: flex; gap: 28px; padding: 0 max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); width: max-content; }
.project { width: min(560px, 82vw); display: flex; flex-direction: column; gap: 18px; scroll-snap-align: start; scroll-margin-left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); }
.project__frame { border-radius: 18px; overflow: hidden; border: 1px solid var(--line-3); background: var(--surface); transition: border-color .3s; }
.project:hover .project__frame { border-color: var(--accent); }
.project__bar { height: 40px; padding: 0 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line-2); }
.project__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-3); }
.project__bar em { margin-left: 12px; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.project__screen { position: relative; display: block; width: 100%; height: var(--screen-h, 320px); padding: 0; border: 0; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.project__screen img { width: 100%; transition: transform 1.4s cubic-bezier(.22, 1, .36, 1); }
.project__zoom {
	position: absolute; right: 12px; bottom: 12px; padding: 7px 12px; border-radius: 999px;
	background: rgba(11, 20, 38, .86); border: 1px solid var(--line-3); color: var(--text);
	font-size: 12px; font-weight: 700; opacity: 0; translate: 0 6px; transition: opacity .3s, translate .3s var(--ease);
}
.project:hover .project__zoom, .project__screen:focus-visible .project__zoom { opacity: 1; translate: 0 0; }
.project__visit { display: inline-flex; margin-left: 10px; vertical-align: middle; }
.project:hover .project__screen img, .project:focus-within .project__screen img {
	transform: translateY(min(0px, calc(-100% + var(--screen-h, 320px))));
	transition: transform var(--scroll-dur, 20s) cubic-bezier(.4, 0, .6, 1) .25s;
}
.project__screen--empty { display: grid; place-items: center; }
.project__placeholder { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.project__title { font-family: var(--display); font-size: clamp(24px, 2.1vw, 30px); font-weight: 700; letter-spacing: -.01em; }
.project__title a { display: inline; }
.project__title .icon { opacity: .5; transition: opacity .2s, transform .3s var(--ease); }
.project__visit:hover .icon { opacity: 1; transform: translate(2px, -2px); }
.project__desc { color: var(--muted); font-size: 16px; max-width: 46ch; }

/* Automation ------------------------------------------------------------- */
.automation { max-width: var(--max); margin: var(--section-gap) auto 0; padding: 0 var(--pad); }
.automation__panel {
	padding: clamp(28px, 4.4vw, 64px); border-radius: var(--radius-lg);
	background: var(--surface); border: 1px solid var(--line-2);
	display: flex; flex-direction: column; gap: 48px;
}
.automation__head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: end; }
.automation__head > div { display: flex; flex-direction: column; gap: 14px; }
.automation__text { color: var(--muted); font-size: 17px; line-height: 1.65; }

.flow { display: flex; align-items: center; }
.flow__node {
	flex: 0 0 auto; width: clamp(150px, 13.2vw, 190px);
	padding: 20px; border-radius: var(--radius);
	background: var(--surface-2); border: 1px solid var(--line-3);
	display: flex; flex-direction: column; gap: 8px;
	transition: border-color .4s, box-shadow .4s, transform .4s var(--ease);
}
.flow__node.is-lit { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(242, 181, 92, .12); }
.flow__kicker { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--muted); transition: color .4s; }
.flow__node.is-lit .flow__kicker { color: var(--accent); }
.flow__title { font-size: 17px; font-weight: 700; }
.flow__caption { font-size: 13px; color: var(--muted); }
.flow__link { flex: 1 1 auto; min-width: 24px; height: 2px; background: var(--line-3); position: relative; }
.flow__pulse {
	position: absolute; top: -4px; left: 0; width: 10px; height: 10px; border-radius: 50%;
	background: var(--accent); box-shadow: 0 0 12px var(--accent);
	animation: travel-x 2.2s linear infinite; animation-delay: var(--d, 0s);
}
@keyframes travel-x {
	0% { left: 0; opacity: 0; }
	15% { opacity: 1; }
	85% { opacity: 1; }
	100% { left: calc(100% - 10px); opacity: 0; }
}

/* Stack ------------------------------------------------------------------ */
.stack {
	max-width: var(--max); margin: var(--section-gap) auto 0; padding: 0 var(--pad);
	display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start;
}
.terminal { border-radius: 20px; overflow: hidden; border: 1px solid var(--line-3); background: var(--bg-deep); }
.terminal__bar { height: 42px; padding: 0 18px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.terminal__dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal__dot--r { background: #E5645B; }
.terminal__dot--y { background: #E9B949; }
.terminal__dot--g { background: #4FC27B; }
.terminal__bar em { margin-left: 14px; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.terminal__body { padding: 28px 30px; font-family: var(--mono); font-size: clamp(13px, 1.05vw, 15px); line-height: 1.9; color: var(--ice); min-height: 330px; }
.terminal__line { white-space: pre-wrap; word-break: break-word; }
.terminal__line--out { color: var(--dim); }
.terminal__line--gap { margin-top: 14px; }
.terminal__line--ok { color: var(--ok); }
.terminal__prompt { color: var(--accent); }
.terminal__cursor { display: inline-block; width: 9px; height: 1.1em; margin-left: 6px; vertical-align: -3px; background: var(--ice); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.services { display: flex; flex-direction: column; gap: 28px; }
.service { padding: 22px 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.service:last-child { border-bottom: 1px solid var(--line-2); }
.service__title { font-family: var(--display); font-size: clamp(21px, 1.7vw, 24px); font-weight: 700; }
.service__desc { font-size: 15px; color: var(--muted); }
html.recruiter-mode .stack { grid-template-columns: 1fr; }

/* Experience ------------------------------------------------------------- */
.experience {
	max-width: var(--max); margin: var(--section-gap) auto 0; padding: 0 var(--pad);
	display: grid; grid-template-columns: 1.3fr .7fr; gap: 72px; align-items: start;
}
.experience__main { display: flex; flex-direction: column; gap: 40px; }
.timeline { display: grid; grid-template-columns: 2px 1fr; gap: 28px; }
.timeline__rail { position: relative; background: var(--line-2); }
.timeline__fill { position: absolute; inset: 0; background: var(--accent); transform-origin: 50% 0; }
.timeline__list { display: flex; flex-direction: column; gap: 32px; }
.role { display: flex; flex-direction: column; gap: 6px; }
.role__dates { font-family: var(--mono); font-size: 13px; text-transform: uppercase; color: var(--muted); }
.role--current .role__dates { color: var(--accent); }
.role__title { font-family: var(--display); font-size: clamp(21px, 1.8vw, 26px); font-weight: 700; line-height: 1.2; }
.role__desc { font-size: 15px; color: var(--muted); max-width: 60ch; }

.credentials { display: flex; flex-direction: column; gap: 16px; padding-top: 12px; position: sticky; top: calc(var(--header-h) + 24px); }
.credentials__heading { font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cred { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-2); }
.cred__title { font-size: 16px; font-weight: 700; line-height: 1.4; }
.cred__meta { font-size: 14px; color: var(--muted); }
.credentials .btn { margin-top: 8px; }

/* Video portfolio -------------------------------------------------------- */
.videos { max-width: var(--max); margin: var(--section-gap) auto 0; padding: 0 var(--pad); display: flex; flex-direction: column; gap: 40px; }
.videos__text { color: var(--muted); max-width: 34ch; }
.videos__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; grid-auto-flow: dense; }
.vcard-wrap--featured { grid-column: span 2; grid-row: span 2; }
.vcard {
	position: relative; display: block; width: 100%; height: 100%; min-height: 200px; aspect-ratio: 16 / 10;
	padding: 0; border: 1px solid var(--line-3); border-radius: 18px; overflow: hidden;
	background: var(--surface-2); text-align: left; isolation: isolate;
}
.vcard-wrap--featured .vcard { aspect-ratio: auto; min-height: 420px; }
.vcard__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); z-index: -2; }
.vcard__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(7, 14, 28, .92) 0%, rgba(7, 14, 28, .35) 45%, rgba(7, 14, 28, .1) 100%); }
.vcard__play {
	position: absolute; left: 50%; top: 42%; translate: -50% -50%;
	width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
	background: rgba(11, 20, 38, .7); border: 1px solid rgba(238, 242, 249, .35); color: var(--text);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	transition: background-color .3s, color .3s, scale .4s var(--ease), border-color .3s;
}
.vcard-wrap--featured .vcard__play { width: 84px; height: 84px; }
.vcard__meta { position: absolute; left: 18px; right: 18px; bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.vcard__title { font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard-wrap--featured .vcard__title { font-family: var(--display); font-size: clamp(22px, 2vw, 30px); line-height: 1.15; }
.vcard__author { font-size: 13px; color: var(--muted); }
.vcard:hover .vcard__thumb, .vcard:focus-visible .vcard__thumb { transform: scale(1.06); }
.vcard:hover .vcard__play, .vcard:focus-visible .vcard__play { background: var(--accent); border-color: var(--accent); color: var(--on-accent); scale: 1.1; }
.vcard:hover { border-color: var(--accent); }

/* Ratings + reviews ------------------------------------------------------ */
.reviews { max-width: var(--max); margin: var(--section-gap) auto 0; padding: 0 var(--pad); display: flex; flex-direction: column; gap: 40px; }
.ratings { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.rating {
	height: 100%; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2);
	display: flex; flex-direction: column; align-items: flex-start; gap: 10px; transition: border-color .3s, transform .4s var(--ease);
}
a.rating:hover { color: var(--text); border-color: var(--accent); transform: translateY(-4px); }
.rating__platform { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ice); }
.rating__score { font-family: var(--display); font-weight: 800; font-size: clamp(48px, 4.6vw, 68px); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rating__detail { font-size: 14px; color: var(--muted); }
.stars { position: relative; display: inline-flex; color: var(--line-3); line-height: 0; }
.stars__base, .stars__fill { display: inline-flex; gap: 3px; }
.stars__fill { position: absolute; inset: 0 auto 0 0; width: var(--pct, 100%); overflow: hidden; color: var(--accent); white-space: nowrap; transition: width 1.4s var(--ease); }
html.motion .ratings .stars__fill { width: 0; }
html.motion .ratings.is-in .stars__fill { width: var(--pct, 100%); }

/* Client reviews --------------------------------------------------------- */
.testimonials { margin: var(--section-gap) auto 0; display: flex; flex-direction: column; gap: 40px; }
.testimonials__head { max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--pad); box-sizing: border-box; }
.marquees { display: flex; flex-direction: column; gap: 20px; }
.marquee {
	position: relative;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; gap: 20px; width: max-content; padding: 4px 0; animation: marquee var(--dur, 60s) linear infinite; }
.marquee--reverse .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee__item { width: min(400px, 82vw); flex-shrink: 0; display: flex; }
.marquee__item .review { width: 100%; }
.marquee__item .review__quote p { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 10px)); } }

.review-grid { max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--pad); box-sizing: border-box; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.review-grid > div { display: flex; }
.review { padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 16px; width: 100%; transition: border-color .3s; }
.review:hover { border-color: var(--line-3); }
.review__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; }
.review__platform { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 12px; background: var(--surface-2); color: var(--ice); }
.review__mark { font-family: var(--display); font-size: 56px; line-height: .6; color: var(--accent); height: 22px; }
.review__quote p { font-size: 16px; line-height: 1.6; color: var(--ice); }
.review__project { font-size: 13px; color: var(--muted); }
.review__by { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.review__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.review__avatar--initials { display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-3); font-weight: 700; font-size: 14px; color: var(--accent); }
.review__who { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.review__who strong { font-size: 15px; }
.review__who span { font-size: 13px; color: var(--muted); }
.review__source { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.review__source:hover { color: var(--accent); background: var(--surface-2); }

.reviews-page { max-width: var(--max); margin: 0 auto; padding: 72px 0 0; display: flex; flex-direction: column; gap: 48px; }
.reviews-page__head { padding: 0 var(--pad); display: flex; flex-direction: column; gap: 16px; max-width: 820px; }

@media (prefers-reduced-motion: reduce) {
	.marquee { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
	.marquee__track { animation: none; padding: 4px var(--pad); }
	.marquee__item[aria-hidden="true"] { display: none; }
}

/* Contact + footer ------------------------------------------------------- */
.contact {
	margin-top: var(--section-gap);
	padding: clamp(72px, 7.6vw, 110px) var(--pad) 56px;
	background: var(--bg-deep);
	border-top: 1px solid var(--line);
}
.contact__inner { width: 100%; max-width: calc(var(--max) - 2 * var(--pad)); margin: 0 auto; display: flex; flex-direction: column; gap: 44px; }
.contact__title { font-family: var(--display); font-weight: 800; font-size: clamp(52px, 7.2vw, 104px); letter-spacing: -.04em; line-height: .95; max-width: 11ch; transform-origin: 0 100%; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.contact__actions .btn { will-change: transform; }

.site-footer { background: var(--bg-deep); padding: 0 var(--pad) calc(40px + env(safe-area-inset-bottom, 0px)); }
.site-footer__inner {
	max-width: calc(var(--max) - 2 * var(--pad)); margin: 0 auto; padding-top: 28px;
	border-top: 1px solid var(--line);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
	font-size: 14px; color: var(--muted);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 600; }
.site-footer__links a { display: inline-flex; min-height: 44px; align-items: center; }
body:not(.is-portfolio-home) .site-footer { margin-top: var(--section-gap); padding-top: 8px; }

/* Video dialog ----------------------------------------------------------- */
.video-dialog { width: min(1100px, 92vw); max-width: none; padding: 0; border: 0; background: transparent; overflow: visible; }
.video-dialog::backdrop { background: rgba(3, 7, 15, .86); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.video-dialog__frame { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.video-dialog__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-dialog__close {
	position: absolute; top: -56px; right: 0; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--line-3); background: var(--surface); color: var(--text); display: grid; place-items: center;
}

/* Blog / pages ----------------------------------------------------------- */
.page-wrap { max-width: 800px; margin: 0 auto; padding: 72px 20px 0; }
.page-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.page-title { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 5vw, 60px); line-height: 1.02; letter-spacing: -.03em; }
.post-list { display: grid; gap: 28px; }
.post-card { padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); display: grid; gap: 10px; }
.post-card__media img { border-radius: 12px; margin-bottom: 10px; }
.post-card__date { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.post-card__title { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.15; }
.post-card__excerpt { color: var(--muted); }
.entry__media img { border-radius: 16px; margin-bottom: 32px; }
.entry__content { font-size: 18px; line-height: 1.75; }
.entry__content > * + * { margin-top: 1.2em; }
.entry__content h2, .entry__content h3 { font-family: var(--display); line-height: 1.2; margin-top: 1.8em; }
.entry__content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry__content ul { list-style: disc; padding-left: 1.3em; }
.entry__content ol { list-style: decimal; padding-left: 1.3em; }
.entry__content pre, .entry__content code { font-family: var(--mono); font-size: .9em; background: var(--surface); border-radius: 6px; }
.entry__content pre { padding: 18px; overflow-x: auto; }
.entry__content code { padding: 2px 6px; }
.entry__content img { border-radius: 12px; }
.entry__content blockquote { border-left: 3px solid var(--accent); padding-left: 20px; color: var(--ice); }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.nav-links { display: flex; gap: 16px; margin-top: 40px; }
.nav-links .page-numbers { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-3); padding: 0 12px; }
.nav-links .current { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.comments { margin-top: 64px; display: grid; gap: 24px; }
.comment-list { display: grid; gap: 20px; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea, .search-form input[type="search"] {
	width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-3); background: var(--surface); color: var(--text); font: inherit;
}
.comment-form input[type="submit"], .search-form input[type="submit"] { height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; cursor: pointer; }
.page-404 .btn { margin-top: 24px; }

/* Motion: initial states (only while GSAP is expected) ------------------- */
html.motion [data-hero-in],
html.motion [data-hero-title],
html.motion .hero__visual { opacity: 0; }

/* Responsive ------------------------------------------------------------- */
/* ==========================================================================
   Responsive
   Breakpoints: 1800+ wide screens · ≤1180 small laptops / tablet landscape ·
   ≤900 tablets (menu collapses) · ≤699 phones · ≤380 small phones
   ========================================================================== */
@media (min-width: 1800px) {
	:root { --max: 1600px; }
}

@media (max-width: 1180px) {
	.nav-menu { gap: 24px; }
	.recruiter-toggle__label { display: none; }
	.recruiter-toggle__short { display: inline; }
	/* Workflow: a tidy grid instead of a wrapping line with orphaned connectors. */
	.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
	.flow__node { width: auto; }
	.flow__link { display: none; }
	.float-card--chip { display: none; }
	.float-card--level { top: 64%; }
	.float-card--badge { top: 28%; right: -4px; }
}

@media (max-width: 900px) {
	:root { --header-h: 64px; --screen-h: 280px; }
	.brand__logo { font-size: 22px; }
	.primary-nav {
		position: absolute; top: calc(100% + 8px); left: 12px; right: 12px;
		padding: 12px 20px; border-radius: 20px;
		background: var(--surface); border: 1px solid var(--line-3);
		box-shadow: 0 24px 48px rgba(3, 7, 15, .5);
		display: none;
	}
	.site-header.nav-open .primary-nav { display: block; }
	.site-header.nav-open .site-header__inner { background: rgba(11, 20, 38, .96); }
	.site-header__inner { position: relative; }
	.nav-menu { flex-direction: column; gap: 0; font-size: 18px; }
	.nav-menu li + li { border-top: 1px solid var(--line-2); }
	.nav-menu a { min-height: 52px; width: 100%; }
	.menu-toggle { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-3); background: none; }
	.header-actions { gap: 10px; }
	.header-cv, .site-header.is-docked .header-book, html.recruiter-mode .site-header.is-docked .header-cv { display: none; }
	.site-header.is-docked .site-header__inner { height: 60px; margin-top: 10px; max-width: calc(100% - 20px); padding: 0 8px 0 10px; }
	.brand__avatar { width: 40px; height: 40px; }
	.brand__id small { display: none; }

	.hero { gap: 28px; padding-top: 32px; min-height: 0; }
	.hero__title { font-size: clamp(38px, 5.8vw, 76px); }
	.hero__paths { grid-template-columns: 1fr; }
	.hero__visual { height: clamp(380px, 60vw, 520px); }
	.float-card--level { padding: 10px 14px; width: auto; }
	.float-card--level .float-card__note { display: none; }
	.float-card__value { font-size: 18px; }

	.section-head { flex-direction: column; align-items: flex-start; }
	.work__progress { display: none; }
	.automation__head { grid-template-columns: 1fr; gap: 20px; }
	.stack, .experience { grid-template-columns: 1fr; gap: 48px; }
	.credentials { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
	.credentials__heading, .credentials .btn { grid-column: 1 / -1; }
	.terminal__body { min-height: 0; }
	.flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.float-card--badge { top: 46%; }
	.float-card--level { top: auto; bottom: 8%; }
}

@media (max-width: 699px) {
	:root { --screen-h: 260px; }
	.hero { grid-template-columns: 1fr; gap: 8px; padding-top: 24px; }
	.hero__title { max-width: 14ch; font-size: clamp(36px, 10.4vw, 52px); }
	.hero__visual { height: auto; aspect-ratio: 390 / 440; max-width: 420px; width: 100%; margin: 24px auto 0; }
	.hero__figure { right: 50%; transform: translateX(50%); width: 72%; }
	.hero__ring { left: 12%; width: 76%; }
	.float-card--level { top: auto; bottom: 6%; left: 0; }
	.float-card--badge { top: 44%; right: 0; max-width: 170px; }
	.status-pill { font-size: 13px; }

	.recruiter-summary__facts { grid-template-columns: 1fr 1fr; }
	.proof__list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 28px 0; row-gap: 28px; }

	.videos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.vcard-wrap--featured { grid-row: auto; }
	.vcard-wrap--featured .vcard { min-height: 0; aspect-ratio: 16 / 10; }
	.vcard { min-height: 0; aspect-ratio: 4 / 3; }
	.vcard__meta { left: 12px; right: 12px; bottom: 10px; }
	.vcard__title { font-size: 13px; }
	.vcard__author { display: none; }
	.vcard-wrap--featured .vcard__author { display: block; }
	.vcard__play { width: 44px; height: 44px; }

	.flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.flow__node { padding: 16px; }
	.flow__node:last-child:nth-child(odd) { grid-column: 1 / -1; }

	.ratings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.rating { padding: 20px; }
	.rating__score { font-size: 44px; }
	.review-grid { grid-template-columns: 1fr; }
	.project__zoom { opacity: 1; translate: 0 0; } /* no hover on touch: always show the hint */
}

@media (max-width: 520px) {
	.recruiter-summary__facts { grid-template-columns: 1fr; }
	.contact__actions .btn { width: 100%; }
	.btn--lg { height: 56px; font-size: 16px; }
}

@media (max-width: 380px) {
	.recruiter-toggle__short { display: none; }
	.ratings { grid-template-columns: 1fr; }
	.flow { grid-template-columns: 1fr; }
	.flow__node:last-child:nth-child(odd) { grid-column: auto; }
}

/* Short laptop screens: keep the pinned work cards inside the viewport. */
@media (min-width: 901px) and (max-height: 860px) {
	:root { --screen-h: clamp(220px, calc(100vh - 500px), 320px); }
}

@keyframes travel-y {
	0% { top: 0; opacity: 0; }
	15% { opacity: 1; }
	85% { opacity: 1; }
	100% { top: calc(100% - 10px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	.flow__pulse { display: none; }
	.project:hover .project__screen img { transform: none; }
}

/* Page editor content inside the portfolio template ---------------------- */
.page-content { max-width: var(--max); margin: var(--section-gap) auto 0; padding: 0 var(--pad); }
.page-content__inner { max-width: 760px; }
.page-content__inner > h2:first-child { margin-top: 0; font-size: clamp(32px, 3.4vw, 48px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.page-content__inner p { color: var(--muted); }

/* Full-page screenshot viewer ------------------------------------------- */
.shot-dialog { width: min(1180px, 94vw); height: 92vh; max-width: none; max-height: none; padding: 0; border: 1px solid var(--line-3); border-radius: 18px; background: var(--surface); color: var(--text); overflow: hidden; }
.shot-dialog[open] { display: flex; flex-direction: column; }
.shot-dialog::backdrop { background: rgba(3, 7, 15, .86); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.shot-dialog__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line-2); }
.shot-dialog__close { position: static; }
.shot-dialog__scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; background: #fff; }
.shot-dialog__scroll img { width: 100%; height: auto; display: block; }

/* Project case-study page ------------------------------------------------ */
.case { max-width: 1180px; margin: 0 auto; padding: 72px var(--pad) 0; display: flex; flex-direction: column; gap: 48px; }
.case__head { display: flex; flex-direction: column; gap: 18px; max-width: 820px; }
.case__back { font-size: 15px; font-weight: 600; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.case__lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); }
.case__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.case__content { max-width: 760px; }
.case__shot { border-radius: 18px; overflow: hidden; border: 1px solid var(--line-3); background: var(--surface); }
.case__shot img { width: 100%; height: auto; }
