:root {
	--bg: #06080d;
	--bg-soft: #0c1018;
	--panel: rgba(12, 16, 25, 0.78);
	--line: rgba(255, 255, 255, 0.08);
	--text: #f6f8fc;
	--muted: #9ba7bc;
	--accent: #7c3aed;
	--accent-2: #2563eb;
	--good: #10b981;
	--shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	scroll-behavior: smooth;
}

body {
	font-family: 'Montserrat', sans-serif;
	background:
		radial-gradient(
			circle at top left,
			rgba(37, 99, 235, 0.16),
			transparent 26%
		),
		radial-gradient(
			circle at 85% 18%,
			rgba(124, 58, 237, 0.18),
			transparent 24%
		),
		radial-gradient(
			circle at 78% 82%,
			rgba(16, 185, 129, 0.12),
			transparent 24%
		),
		linear-gradient(180deg, #06080d 0%, #0a0f18 100%);
	color: var(--text);
	overflow-x: hidden;
}

a,
button {
	cursor: pointer;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

::-webkit-scrollbar {
	width: 10px;
}
::-webkit-scrollbar-track {
	background: #07090d;
}
::-webkit-scrollbar-thumb {
	background: #1b2230;
	border-radius: 999px;
}

.bg-grid {
	position: fixed;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
	background-size: 40px 40px;
	mask-image: radial-gradient(circle at center, black 48%, transparent 100%);
	opacity: 0.48;
}

header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 50;
	background: rgba(6, 8, 13, 0.72);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wrap {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 28px;
}

.head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 18px 0;
	flex-wrap: wrap;
}

.brand {
	display: flex;
	align-items: center;
	gap: 14px;
	color: inherit;
	text-decoration: none;
	flex-shrink: 0;
}

.brand img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 16px;
	padding: 3px;
	background: linear-gradient(
		145deg,
		rgba(255, 255, 255, 0.28),
		rgba(255, 255, 255, 0.04)
	);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.brand strong {
	display: block;
	font-size: 0.96rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

nav ul {
	list-style: none;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.avatar-center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 4rem;
	font-weight: 900;
	color: #ffffff;
	letter-spacing: 0;
	text-transform: uppercase;
	pointer-events: none;
	z-index: 1;
}

nav a {
	text-decoration: none;
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 11px 15px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.07);
	background: rgba(255, 255, 255, 0.03);
	transition:
		transform 0.18s ease,
		color 0.18s ease,
		background 0.18s ease,
		border-color 0.18s ease;
}

nav a:hover {
	transform: translateY(-1px);
	color: #fff;
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.14);
}

main,
section {
	position: relative;
	z-index: 1;
}

.hero {
	min-height: 100vh;
	display: grid;
	grid-template-columns: 0.8fr 1.2fr;
	gap: 32px;
	align-items: center;
	padding-top: 140px;
	padding-bottom: 60px;
}

.reveal {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 0.7s ease,
		transform 0.7s ease;
}

.reveal.on {
	opacity: 1;
	transform: none;
}

.section-kicker {
	margin-top: 50px;
}

.kicker,
.section-kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: fit-content;
	padding: 10px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.76rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-weight: 800;
	color: #dce3f1;
}

.kicker::before,
.section-kicker::before {
	content: '';
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--good), var(--accent-2));
	box-shadow: 0 0 14px rgba(37, 99, 235, 0.55);
}

.hero h1 {
	font-size: clamp(5rem, 10vw, 8rem);
	line-height: 0.9;
	letter-spacing: -0.06em;
	text-transform: uppercase;
	font-weight: 900;
	margin: 18px 0;
}

.hero h1 span {
	display: block;
	background: linear-gradient(180deg, #ffffff 0%, #d3dceb 35%, #7887a0 85%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hero-subtitle {
	font-size: 1.1rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: #d2dbeb;
	margin-bottom: 18px;
}

.lead {
	max-width: 680px;
	color: #adb8cb;
	line-height: 1.9;
	font-size: 1rem;
}

.stack {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 22px;
}

.stack span,
.tag {
	padding: 10px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hero-visual {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	width: 100%;
}

.glass {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 30px;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.08),
		var(--shadow);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.avatar-card {
	padding: 22px;
	position: relative;
	overflow: hidden;
	min-height: 420px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 700px;
}

.avatar-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(
			circle at top left,
			rgba(255, 255, 255, 0.12),
			transparent 24%
		),
		radial-gradient(
			circle at bottom right,
			rgba(37, 99, 235, 0.18),
			transparent 28%
		);
	pointer-events: none;
}

.avatar-frame {
	position: relative;
	width: 100%;
	max-width: 600px;
	border-radius: 24px;
	background: linear-gradient(135deg, #141a26, #090d14);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
	aspect-ratio: 1;
}

.avatar-frame img {
	width: 76%;
	height: 76%;
	object-fit: contain;
	filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.42));
}

.avatar-meta {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 2;
}

.meta-chip {
	padding: 12px 14px;
	border-radius: 16px;
	background: rgba(7, 10, 16, 0.82);
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #d5dded;
	position: absolute;
	pointer-events: auto;
}

.meta-left {
	bottom: 50%;
	left: -10px;
	transform: translateY(50%) rotate(-40deg);
	transform-origin: left center;
}

.meta-right {
	top: 50%;
	right: -10px;
	transform: translateY(-50%) rotate(40deg);
	transform-origin: right center;
}

section {
	padding-top: 80px;
	padding-bottom: 80px;
}

#contacts {
	padding-bottom: 10px;
}

.section-head {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 28px;
}

.section-head h2 {
	font-size: clamp(2.4rem, 4vw, 4rem);
	letter-spacing: -0.05em;
	text-transform: uppercase;
	font-weight: 900;
}

.section-head p {
	max-width: 760px;
	color: var(--muted);
	line-height: 1.85;
}

.about-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 22px;
}

.about-copy {
	padding: 30px;
	width: 100%;
}

.about-copy h3 {
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 18px;
}

.about-copy p {
	color: #adb8cb;
	line-height: 1.95;
}

.about-copy p + p {
	margin-top: 16px;
}

.about-copy strong {
	color: #fff;
}

.info-line {
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.07);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.info-box {
	padding: 16px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.info-box b {
	display: block;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.info-box span {
	color: var(--muted);
	font-size: 0.92rem;
	line-height: 1.6;
}

.projects-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

.project-card,
.stat-card,
.contact-card {
	padding: 28px;
}

.contact-card {
	padding: 28px;
	width: 100%;
}

.project-top,
.stat-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}

.project-top i,
.stat-top i {
	width: 52px;
	height: 52px;
	padding: 12px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.05);
}

.project-card h3,
.stat-card h3,
.contact-card h3 {
	font-size: 1.35rem;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	font-weight: 900;
	margin-bottom: 14px;
}

.project-card p,
.stat-card p,
.contact-card p {
	color: #adb8cb;
	line-height: 1.82;
	font-size: 0.95rem;
}

.project-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.portfolio-showcase {
	margin-top: 20px;
	padding: 18px;
}

.portfolio-showcase .cat-image {
	aspect-ratio: 21 / 9;
}

.portfolio-showcase p {
	margin-top: 14px;
	color: var(--muted);
	line-height: 1.75;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 20px;
}

.stat-card b {
	display: block;
	font-size: 2rem;
	font-weight: 900;
	letter-spacing: -0.05em;
	margin: 10px 0 8px;
}

.stat-card span {
	font-size: 0.76rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: #cfd7e7;
}

.github-extra {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin-top: 18px;
}

.inline-link {
	color: #dce7ff;
	text-decoration: none;
	border-bottom: 1px solid rgba(220, 231, 255, 0.25);
}

.contacts-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

.contact-card a {
	color: #e6eeff;
	text-decoration: none;
	word-break: break-word;
	font-weight: 700;
}

.image-placeholder {
	width: 100%;
	height: 100%;
	min-height: 200px;
	background: linear-gradient(135deg, #141a26, #090d14);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	font-size: 0.9rem;
	text-align: center;
	padding: 20px;
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, 0.07);
	flex-direction: column;
	gap: 12px;
}

.image-placeholder i {
	width: 48px;
	height: 48px;
	opacity: 0.5;
}

.commit-history {
	margin-top: 20px;
	padding: 20px;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.commit-history h4 {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
	margin-bottom: 14px;
}

.commit-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.commit-item:last-child {
	border-bottom: none;
}

.commit-item .commit-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(16, 185, 129, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.commit-item .commit-icon i {
	width: 16px;
	height: 16px;
	color: var(--good);
}

.commit-item .commit-info {
	flex: 1;
	min-width: 0;
}

.commit-item .commit-message {
	color: #dce7ff;
	font-size: 0.9rem;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.commit-item .commit-meta {
	color: var(--muted);
	font-size: 0.7rem;
	margin-top: 2px;
	letter-spacing: 0.05em;
}

.commit-item .commit-link {
	color: var(--muted);
	text-decoration: none;
	font-size: 0.7rem;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.06);
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.commit-item .commit-link:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.15);
}

.github-chart-wrapper {
	margin-top: 22px;
	padding: 20px;
	background: rgba(13, 17, 23, 0.6);
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.github-chart-wrapper h3 {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 14px;
	color: var(--muted);
}

.github-chart-wrapper img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	filter: invert(0.92) hue-rotate(180deg);
}

footer {
	padding: 40px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	margin-top: 20px;
}

footer .wrap {
	text-align: center;
	color: var(--muted);
	font-size: 0.85rem;
	letter-spacing: 0.04em;
}

footer .wrap span {
	display: inline-block;
	margin: 0 6px;
}

@media (max-width: 1180px) {
	.hero,
	.about-grid {
		grid-template-columns: 1fr;
	}
	.stats-grid,
	.projects-grid,
	.github-extra {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.hero-visual {
		grid-template-columns: 1fr;
	}
	.contacts-grid {
		grid-template-columns: 1fr;
		max-width: 100%;
	}
	.hero {
		padding-top: 160px;
	}
}

@media (max-width: 860px) {
	.wrap {
		padding: 0 20px;
	}
	.head {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		padding: 14px 0;
		flex-wrap: nowrap;
	}
	nav {
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	nav::-webkit-scrollbar {
		display: none;
	}
	nav ul {
		width: 100%;
		justify-content: flex-start;
		flex-wrap: nowrap;
		min-width: 0;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 2px;
	}
	nav ul::-webkit-scrollbar {
		display: none;
	}
	nav a {
		display: block;
		white-space: nowrap;
	}
	.stats-grid,
	.projects-grid,
	.github-extra,
	.info-line {
		grid-template-columns: 1fr;
	}
	.hero {
		min-height: auto;
		gap: 26px;
		padding-top: 148px;
	}
	.hero > *,
	.hero-visual,
	.avatar-card,
	.project-card,
	.stat-card,
	.contact-card,
	.about-copy {
		min-width: 0;
	}
	.hero h1 {
		font-size: 4.6rem;
		letter-spacing: 0;
	}
	.avatar-card {
		max-width: 100%;
		min-height: 0;
		padding: 18px;
	}
	.avatar-frame {
		max-width: 100%;
	}
	.project-top,
	.stat-top {
		align-items: flex-start;
	}
	.project-top .tag {
		min-width: 0;
		text-align: right;
		overflow-wrap: anywhere;
	}
}

@media (max-width: 640px) {
	.hero h1 {
		font-size: 3.75rem;
	}
}

@media (max-width: 480px) {
	.head {
		flex-direction: column;
		align-items: flex-start;
	}
	nav ul {
		flex-direction: row;
		gap: 8px;
	}
	nav a {
		width: auto;
		text-align: left;
		padding: 10px 13px;
		font-size: 0.72rem;
		letter-spacing: 0.09em;
	}
	.hero {
		padding-top: 142px;
		padding-bottom: 44px;
	}
	.hero h1 {
		font-size: 3.25rem;
	}
	.hero-subtitle {
		font-size: 0.92rem;
		line-height: 1.45;
		letter-spacing: 0.12em;
	}
	.lead {
		font-size: 0.94rem;
		line-height: 1.78;
	}
	.stack {
		gap: 8px;
	}
	.stack span,
	.tag {
		padding: 9px 12px;
		font-size: 0.68rem;
		letter-spacing: 0.08em;
	}
	section {
		padding-top: 56px;
		padding-bottom: 56px;
	}
	.section-kicker {
		margin-top: 24px;
	}
	.section-head h2 {
		font-size: 2.25rem;
		letter-spacing: 0;
	}
	.about-copy,
	.project-card,
	.stat-card,
	.contact-card {
		padding: 22px;
	}
	.github-chart-wrapper {
		overflow-x: auto;
	}
	.github-chart-wrapper img {
		min-width: 560px;
	}
}

@media (max-width: 380px) {
	.wrap {
		padding: 0 16px;
	}
	.brand img {
		width: 44px;
		height: 44px;
		border-radius: 14px;
	}
	.brand strong {
		font-size: 0.86rem;
		letter-spacing: 0.14em;
	}
	nav a {
		padding: 9px 11px;
		font-size: 0.68rem;
	}
	.hero h1 {
		font-size: 2.9rem;
	}
	.avatar-card {
		padding: 14px;
	}
	.avatar-center {
		font-size: 3rem;
	}
	.meta-chip {
		padding: 10px 12px;
		font-size: 0.65rem;
	}
}
