/* ==========================================================================
   Maksym Skuibida — mskuibida.com
   Palette derived from the portrait: harbour dusk (deep blue) + lamp brass.
   ========================================================================== */

:root {
	--ink: #05071f;
	--ink-raised: #0a0e29;
	--mist: #e6e9f5;
	--dim: #939bbd;
	--brass: #e0a648;

	--line: rgb(230 233 245 / 0.13);
	--line-strong: rgb(230 233 245 / 0.28);
	--brass-soft: rgb(224 166 72 / 0.14);

	--display: "Bodoni Moda", Georgia, serif;
	--body: "Instrument Sans", system-ui, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

	--gutter: 1.5rem;
	--measure: 1100px;

	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 6rem;
}

body {
	margin: 0;
	background: var(--ink);
	color: var(--dim);
	font-family: var(--body);
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* The one atmospheric move: lamplight bleeding into the dusk, top-left. */
body::before {
	content: "";
	position: fixed;
	inset: -20vh -20vw auto -20vw;
	height: 90vh;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(58% 60% at 22% 8%, rgb(224 166 72 / 0.07), transparent 70%),
		radial-gradient(70% 60% at 78% 0%, rgb(88 120 210 / 0.10), transparent 72%);
}

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

a {
	color: inherit;
}

h1,
h2,
h3 {
	margin: 0;
	font-weight: 400;
	color: var(--mist);
}

p {
	margin: 0;
}

ul,
ol,
dl,
dd {
	margin: 0;
	padding: 0;
}

ul,
ol {
	list-style: none;
}

::selection {
	background: var(--brass);
	color: var(--ink);
}

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

.wrap {
	width: min(100% - (var(--gutter) * 2), var(--measure));
	margin-inline: auto;
	position: relative;
	z-index: 1;
}

.sep {
	color: var(--brass);
	padding-inline: 0.15em;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	z-index: 99;
	background: var(--brass);
	color: var(--ink);
	padding: 0.6rem 1rem;
	font-family: var(--mono);
	font-size: 0.75rem;
	text-decoration: none;
}

.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Signature: the measurement rail. A ruler down the left margin that marks
   where you are in the document. Desktop only — it is orientation, not content.
   -------------------------------------------------------------------------- */

.rail {
	display: none;
}

@media (min-width: 1460px) {
	.rail {
		display: block;
		position: fixed;
		left: 1.5rem;
		top: 50%;
		transform: translateY(-50%);
		z-index: 5;
	}

	.rail-list {
		display: grid;
		gap: 1.15rem;
	}

	.rail a {
		display: flex;
		align-items: center;
		gap: 0.6rem;
		text-decoration: none;
		font-family: var(--mono);
		font-size: 0.5625rem;
		letter-spacing: 0.2em;
		text-transform: uppercase;
		color: var(--dim);
		opacity: 0.45;
		transition: opacity 0.3s var(--ease), color 0.3s var(--ease);
	}

	.rail-tick {
		display: block;
		width: 10px;
		height: 1px;
		background: currentColor;
		transition: width 0.35s var(--ease), background-color 0.3s var(--ease);
	}

	.rail a:hover,
	.rail a:focus-visible {
		opacity: 1;
	}

	.rail a.is-active {
		opacity: 1;
		color: var(--brass);
	}

	.rail a.is-active .rail-tick {
		width: 24px;
	}
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
	position: relative;
	z-index: 2;
	padding-block: 1.75rem;
}

.masthead-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.mark {
	display: block;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.mark-monogram {
	width: 66px;
	height: 41px;
	-webkit-mask-image: url("/img/ms-monogram.svg");
	mask-image: url("/img/ms-monogram.svg");
}

.mark-lockup {
	width: 168px;
	height: 105px;
	-webkit-mask-image: url("/img/ms-lockup.svg");
	mask-image: url("/img/ms-lockup.svg");
}

.mark-link {
	color: var(--mist);
	display: block;
	transition: color 0.3s var(--ease);
}

.mark-link:hover {
	color: var(--brass);
}

.masthead-mail {
	font-family: var(--mono);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	color: var(--dim);
	text-decoration: none;
	border-bottom: 1px solid var(--line-strong);
	padding-bottom: 2px;
	transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.masthead-mail:hover {
	color: var(--brass);
	border-color: var(--brass);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
	position: relative;
	z-index: 1;
	padding-block: clamp(3.75rem, 6.5vw, 5.75rem);
}

.section-intro {
	padding-top: clamp(2rem, 5vw, 4rem);
	padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.section-title {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}

.section-title span {
	font-family: var(--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--brass);
	white-space: nowrap;
}

.section-title::before {
	content: "";
	width: 5px;
	height: 5px;
	flex: none;
	background: var(--brass);
}

.section-title::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--line);
}

/* --------------------------------------------------------------------------
   Intro
   -------------------------------------------------------------------------- */

.intro-grid {
	display: grid;
	gap: clamp(2.5rem, 5vw, 4rem);
	align-items: center;
}

@media (min-width: 900px) {
	.intro-grid {
		grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
	}
}

.eyebrow {
	font-family: var(--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--dim);
	margin-bottom: 1.5rem;
}

.display {
	font-family: var(--display);
	font-optical-sizing: auto;
	font-weight: 500;
	font-size: clamp(3.25rem, 10.5vw, 7.5rem);
	line-height: 0.9;
	letter-spacing: -0.02em;
	color: var(--mist);
}

.lede {
	margin-top: clamp(1.5rem, 3vw, 2.25rem);
	max-width: 46ch;
	font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
	line-height: 1.55;
	color: var(--mist);
}

.actions {
	margin-top: clamp(2rem, 4vw, 2.75rem);
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.8rem 1.4rem;
	font-family: var(--mono);
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid transparent;
	transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
		border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn-icon {
	width: 1em;
	height: 1em;
	flex: none;
}

.btn-primary {
	background: var(--brass);
	color: var(--ink);
	font-weight: 500;
}

.btn-primary:hover {
	background: #f0bd68;
	transform: translateY(-1px);
}

.btn-ghost {
	border-color: var(--line-strong);
	color: var(--mist);
}

.btn-ghost:hover {
	border-color: var(--brass);
	color: var(--brass);
	transform: translateY(-1px);
}

.portrait {
	margin: 0;
	padding: 10px;
	border: 1px solid var(--line);
	background: var(--ink-raised);
	max-width: 340px;
	justify-self: start;
}

@media (min-width: 900px) {
	.portrait {
		justify-self: end;
		max-width: 100%;
	}
}

.portrait img {
	width: 100%;
	filter: saturate(0.82) contrast(1.06) brightness(0.94);
}

.specs {
	margin-top: clamp(3rem, 6vw, 5rem);
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 700px) {
	.specs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 2rem;
	}
}

.spec dt {
	font-family: var(--mono);
	font-size: 0.625rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--brass);
	margin-bottom: 0.5rem;
}

.spec dd {
	color: var(--mist);
	font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-grid {
	display: grid;
	gap: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 900px) {
	.about-grid {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
	}
}

.prose {
	max-width: 58ch;
	display: grid;
	gap: 1.25rem;
	font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
	line-height: 1.6;
}

.prose p:first-child {
	color: var(--mist);
}

.facts {
	display: grid;
	gap: 1.5rem;
	align-content: start;
}

.fact {
	padding-top: 0.875rem;
	border-top: 1px solid var(--line);
}

.fact dt {
	font-family: var(--mono);
	font-size: 0.625rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--brass);
	margin-bottom: 0.4rem;
}

.fact dd {
	color: var(--mist);
	font-size: 0.9375rem;
}

.fact a {
	text-decoration: none;
	border-bottom: 1px solid var(--line-strong);
	transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.fact a:hover {
	color: var(--brass);
	border-color: var(--brass);
}

/* --------------------------------------------------------------------------
   What I do
   -------------------------------------------------------------------------- */

.caps {
	display: grid;
	border-top: 1px solid var(--line);
}

.cap {
	display: grid;
	gap: 0.75rem 2.5rem;
	padding-block: clamp(1.75rem, 3vw, 2.5rem);
	border-bottom: 1px solid var(--line);
}

@media (min-width: 860px) {
	.cap {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
		align-items: start;
	}

	.cap-tags {
		grid-column: 2;
	}
}

.cap-title {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.cap-body {
	max-width: 52ch;
	color: var(--dim);
}

.cap-tags {
	font-family: var(--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mist);
	opacity: 0.62;
}

/* --------------------------------------------------------------------------
   Stack
   -------------------------------------------------------------------------- */

.stack-grid {
	display: grid;
	gap: 2.25rem 2rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 820px) {
	.stack-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 2.75rem 3rem;
	}
}

.stack-group-title {
	font-family: var(--mono);
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--brass);
	padding-bottom: 0.75rem;
	margin-bottom: 0.875rem;
	border-bottom: 1px solid var(--line);
}

.stack-list {
	display: grid;
	gap: 0.4rem;
	font-family: var(--mono);
	font-size: 0.8125rem;
	color: var(--mist);
	opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.section-contact {
	padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.contact-lede {
	max-width: 40ch;
	margin-bottom: clamp(2rem, 4vw, 3rem);
	font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
	color: var(--mist);
}

.channels {
	border-top: 1px solid var(--line);
}

.channel {
	border-bottom: 1px solid var(--line);
}

.channel a {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	gap: 0.25rem 1.5rem;
	padding-block: clamp(1.1rem, 2.2vw, 1.6rem);
	text-decoration: none;
	transition: color 0.3s var(--ease);
}

@media (min-width: 700px) {
	.channel a {
		grid-template-columns: 150px 1fr auto;
	}
}

.channel-label {
	font-family: var(--mono);
	font-size: 0.625rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--dim);
	grid-column: 1;
}

.channel-value {
	font-family: var(--display);
	font-size: clamp(1.375rem, 1.1rem + 1.3vw, 2.25rem);
	line-height: 1.1;
	color: var(--mist);
	grid-column: 1;
	transition: color 0.3s var(--ease);
	overflow-wrap: anywhere;
}

@media (min-width: 700px) {
	.channel-value {
		grid-column: 2;
	}
}

.channel-arrow {
	font-family: var(--mono);
	color: var(--dim);
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
	transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

@media (min-width: 700px) {
	.channel-arrow {
		grid-column: 3;
	}
}

.channel a:hover .channel-value,
.channel a:focus-visible .channel-value {
	color: var(--brass);
}

.channel a:hover .channel-arrow,
.channel a:focus-visible .channel-arrow {
	color: var(--brass);
	transform: translateX(6px);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
	position: relative;
	z-index: 1;
	border-top: 1px solid var(--line);
	padding-block: clamp(2.5rem, 5vw, 4rem);
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.footer .mark-lockup {
	color: var(--mist);
	opacity: 0.55;
}

.footer-line {
	font-family: var(--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--dim);
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

.js .load {
	opacity: 0;
	animation: rise 0.9s var(--ease) forwards;
}

.load-1 { animation-delay: 0.05s; }
.load-2 { animation-delay: 0.15s; }
.load-3 { animation-delay: 0.28s; }
.load-4 { animation-delay: 0.4s; }
.load-5 { animation-delay: 0.52s; }

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.js .reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.js .load,
	.js .reveal {
		opacity: 1;
		transform: none;
	}
}
