* {
	box-sizing: border-box;
}

html {
	scroll-padding-top: 84px;
}

body {
	margin: 0;
	font-family: Arial, sans-serif;
	color: #e8edf5;
	background:
		radial-gradient(circle at 20% 10%, rgba(0, 211, 255, 0.16), transparent 28rem),
		radial-gradient(circle at 90% 20%, rgba(126, 87, 255, 0.18), transparent 26rem),
		#070b12;
	line-height: 1.6;
}

#matrix-bg {
	position: fixed;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	background: #070b12;
	pointer-events: none;
}

a {
	color: inherit;
	text-decoration: none;
}

.form-popup {
	position: fixed;
	top: 1rem;
	left: 50%;
	z-index: 20;
	display: flex;
	width: min(calc(100% - 2rem), 420px);
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem;
	border: 1px solid rgba(134, 239, 172, 0.5);
	border-radius: 0.5rem;
	background: #16a34a;
	box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
	color: #ffffff;
	font-weight: 800;
	transform: translateX(-50%);
}

.form-popup[hidden] {
	display: none;
}

.form-popup-close {
	width: 36px;
	min-height: 36px;
	padding: 0;
	border-color: rgba(255, 255, 255, 0.3);
	background: rgba(255, 255, 255, 0.16);
	color: #ffffff;
	font-size: 1rem;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem clamp(1rem, 4vw, 4rem);
	background: rgba(7, 11, 18, 0.9);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
	font-weight: 800;
	letter-spacing: 0;
}

nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	justify-content: flex-end;
}

nav a {
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	color: #aeb9ca;
	font-size: 0.92rem;
}

nav a:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
}

main {
	overflow: hidden;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: clamp(2rem, 6vw, 5rem);
	align-items: center;
	min-height: 88vh;
	padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 6vw, 5rem);
	background:
		linear-gradient(135deg, rgba(0, 211, 255, 0.12), transparent 38%),
		linear-gradient(315deg, rgba(255, 199, 87, 0.1), transparent 32%),
		rgba(7, 11, 18, 0.52);
}

.hero-copy {
	max-width: 860px;
}

.eyebrow {
	margin: 0 0 0.75rem;
	color: #47e7ff;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

h1,
h2,
h3,
p {
	margin-top: 0;
}

h1 {
	margin-bottom: 1rem;
	font-size: clamp(2.35rem, 7vw, 5.45rem);
	line-height: 0.98;
	letter-spacing: 0;
}

h2 {
	margin-bottom: 1rem;
	font-size: clamp(2rem, 4vw, 3.2rem);
	line-height: 1.05;
}

h3 {
	margin-bottom: 0.45rem;
	font-size: 1.12rem;
}

.lead {
	max-width: 690px;
	color: #b8c4d7;
	font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.actions,
.profile-links,
.contact-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
}

.actions {
	margin-top: 2rem;
}

.button,
button,
.profile-links a,
.contact-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.7rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.06);
	color: #e8edf5;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.button.primary,
button {
	border-color: #00d3ff;
	background: #00d3ff;
	color: #07111f;
}

.button:hover,
button:hover,
.profile-links a:hover,
.contact-links a:hover {
	transform: translateY(-1px);
}

.profile-card,
.tech-grid article,
.project-grid article,
.course-card,
form {
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 0.5rem;
	background: rgba(13, 20, 32, 0.78);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.profile-card {
	padding: 1rem;
}

.animated-avatar {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 1;
	padding: 0;
	border: 0;
	background: transparent;
	animation: avatarFloat 5s ease-in-out infinite;
	perspective: 900px;
}

.animated-avatar::before {
	content: "";
	position: absolute;
	inset: 7%;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(71, 231, 255, 0.28), transparent 68%);
	filter: blur(14px);
	animation: avatarPulse 3.5s ease-in-out infinite;
}

.avatar-sphere {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	transform-style: preserve-3d;
	transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animated-avatar.is-pixel .avatar-sphere {
	transform: rotateY(180deg);
}

.avatar-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #d7eee7;
	border: 3px solid rgba(71, 231, 255, 0.28);
	border-radius: 50%;
	box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
	backface-visibility: hidden;
	overflow: hidden;
}

.avatar-pixel {
	object-fit: cover;
	background: #11081e;
	image-rendering: pixelated;
	transform: rotateY(180deg);
}

.animated-avatar.is-pixel .avatar-pixel {
	animation: pixelGlow 1.4s ease-in-out infinite;
}

.profile-card:hover .animated-avatar {
	animation-duration: 3.2s;
}

.profile-card strong,
.profile-card span {
	display: block;
}

.profile-card strong {
	margin-top: 1rem;
	color: #ffffff;
	font-size: 1.2rem;
	line-height: 1.3;
}

.profile-card span {
	color: #aeb9ca;
}

.profile-links {
	margin-top: 1rem;
	gap: 0.5rem;
}

.profile-links a {
	min-height: 38px;
	padding: 0.45rem 0.65rem;
	font-size: 0.9rem;
}

@keyframes avatarFloat {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-9px);
	}
}

@keyframes avatarPulse {
	0%,
	100% {
		opacity: 0.42;
		transform: scale(0.96);
	}

	50% {
		opacity: 0.86;
		transform: scale(1.04);
	}
}

@keyframes pixelGlow {
	0%,
	100% {
		filter: saturate(1.05) drop-shadow(0 0 0 rgba(71, 231, 255, 0));
	}

	50% {
		filter: saturate(1.35) drop-shadow(0 0 14px rgba(71, 231, 255, 0.55));
	}
}

.section {
	padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 6vw, 5rem);
}

.section-heading {
	max-width: 680px;
	margin-bottom: 2rem;
}

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

.tech-grid article,
.project-grid article,
.course-card {
	padding: 1.25rem;
}

.tech-grid p,
.project-grid p,
.course-card p {
	color: #b8c4d7;
}

.tech-grid img {
	width: 52px;
	height: 52px;
	margin-bottom: 1rem;
	border-radius: 0.5rem;
	padding: 0.45rem;
	background: rgba(255, 255, 255, 0.08);
}

.projects-section {
	background: rgba(255, 255, 255, 0.03);
}

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

.project-grid article {
	display: flex;
	min-height: 260px;
	flex-direction: column;
	background:
		linear-gradient(145deg, rgba(0, 211, 255, 0.12), transparent 40%),
		rgba(13, 20, 32, 0.86);
}

.project-grid a {
	margin-top: auto;
	color: #47e7ff;
	font-weight: 800;
}

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

.course-card {
	position: relative;
	min-height: 210px;
	overflow: hidden;
	background:
		linear-gradient(145deg, rgba(255, 209, 102, 0.1), transparent 42%),
		rgba(13, 20, 32, 0.82);
}

.course-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: #47e7ff;
}

.course-card span {
	display: inline-flex;
	margin-bottom: 1rem;
	padding: 0.35rem 0.6rem;
	border: 1px solid rgba(71, 231, 255, 0.22);
	border-radius: 999px;
	color: #47e7ff;
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
}

.course-icon {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	margin-bottom: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	font-weight: 900;
}

.course-icon svg {
	width: 32px;
	height: 32px;
	fill: #47e7ff;
}

img.course-icon {
	padding: 0.5rem;
	object-fit: contain;
}

.course-card.featured {
	background:
		linear-gradient(145deg, rgba(0, 211, 255, 0.18), transparent 45%),
		linear-gradient(315deg, rgba(255, 209, 102, 0.14), transparent 40%),
		rgba(13, 20, 32, 0.92);
}

.course-card.featured h3 {
	font-size: 1.12rem;
	line-height: 1.12;
}

.course-card.language {
	min-height: 210px;
}

.course-card p:last-child {
	margin-bottom: 0;
}

.course-items {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.course-items li {
	padding-left: 0.85rem;
	border-left: 2px solid rgba(71, 231, 255, 0.45);
}

.course-items strong,
.course-items small {
	display: block;
}

.course-items strong {
	color: #ffffff;
	line-height: 1.35;
}

.course-items small {
	margin-top: 0.2rem;
	color: #b8c4d7;
	font-size: 0.92rem;
	line-height: 1.45;
}

.contact {
	display: grid;
	grid-template-columns: 0.75fr 1fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
	background: rgba(255, 255, 255, 0.04);
}

form {
	display: grid;
	gap: 1rem;
	padding: 1.25rem;
}

label span {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 700;
}

input,
textarea {
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 0.45rem;
	padding: 0.85rem;
	background: rgba(255, 255, 255, 0.07);
	color: #ffffff;
	font: inherit;
}

textarea {
	resize: vertical;
}

.contact-links {
	grid-column: 2;
}

@media (max-width: 980px) {
	.site-header,
	.hero,
	.contact {
		grid-template-columns: 1fr;
	}

	.site-header {
		align-items: flex-start;
	}

	.tech-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.project-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.course-grid {
		grid-template-columns: 1fr;
	}

	.contact-links {
		grid-column: auto;
	}
}

@media (max-width: 560px) {
	.site-header {
		flex-direction: column;
		gap: 0.75rem;
		padding: 0.75rem 1rem;
	}

	.brand {
		line-height: 1.25;
	}

	nav {
		width: 100%;
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	nav::-webkit-scrollbar {
		display: none;
	}

	nav a {
		flex: 0 0 auto;
	}

	.hero {
		min-height: auto;
	}

	.tech-grid {
		grid-template-columns: 1fr;
	}

	.project-grid {
		grid-template-columns: 1fr;
	}
}
