:root {
	--bg: #090713;
	--bg-2: #05030b;
	--panel: rgba(15, 11, 30, 0.84);
	--panel-strong: rgba(11, 8, 24, 0.95);
	--text: #d9ffe6;
	--muted: #93c9a5;
	--line: rgba(104, 255, 173, 0.32);
	--primary: #7bffb4;
	--accent: #67d8ff;
	--shadow: 0 14px 0 rgba(0, 0, 0, 0.28);
}

html {
	font-size: 18px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	color: var(--text);
	font-family: "VT323", monospace;
	background:
		radial-gradient(1300px 580px at 50% -30%, rgba(127, 79, 255, 0.2), transparent 70%),
		radial-gradient(900px 460px at 100% 10%, rgba(71, 216, 255, 0.16), transparent 60%),
		linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
	min-height: 100vh;
}

#bgTetris {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	z-index: 0;
	opacity: 0.24;
	pointer-events: none;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	opacity: 0.3;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		radial-gradient(2px 2px at 14% 24%, rgba(194, 255, 224, 0.9), transparent 60%),
		radial-gradient(1.5px 1.5px at 77% 17%, rgba(190, 235, 255, 0.9), transparent 60%),
		radial-gradient(1.2px 1.2px at 45% 69%, rgba(194, 255, 224, 0.8), transparent 60%);
	background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

body::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 1;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.15));
}

a {
	color: var(--primary);
}

main {
	width: min(1280px, 95vw);
	margin: 0 auto;
	padding: 2.8rem 0 5rem;
	position: relative;
	z-index: 2;
}

.site-header {
	width: min(1160px, 95vw);
	margin: 0 auto;
	padding: 1.9rem 0 0.7rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 0.8rem;
	position: relative;
	z-index: 2;
}

.brand {
	color: rgba(233, 246, 255, 0.82);
	text-decoration: none;
	font-family: "Press Start 2P", monospace;
	font-size: 0.88rem;
	letter-spacing: 0.12em;
}

.site-nav {
	display: flex;
	gap: 0.65rem;
	flex-wrap: wrap;
	justify-content: center;
	padding: 0.35rem;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: rgba(8, 6, 20, 0.92);
}

.site-nav a {
	text-decoration: none;
	color: var(--muted);
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 0.58rem 1rem;
	transition: 200ms ease;
	font-size: 1.16rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.site-nav a[href="/"]::before {
	content: "▣";
}

.site-nav a[href="/projects"]::before {
	content: "◆";
}

.site-nav a[href="/blog"]::before {
	content: "✦";
}

.site-nav a[href="/Navin_Nepal_Resume.pdf"]::before {
	content: "☰";
}

.site-nav a[href="/contact"]::before {
	content: "@";
}

.site-nav a:hover,
.site-nav a.active {
	color: var(--text);
	border-color: var(--line);
	background: rgba(104, 255, 173, 0.16);
}

.hero,
.page-head,
.contact-shell,
.featured,
.stats,
.article-shell,
.service-grid,
.retro-hud {
	animation: fadeSlide 520ms ease both;
}

.split {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 1rem;
	align-items: start;
}

.hero {
	margin-top: 1.8rem;
}

.hero > div,
.profile-panel,
.card,
.stats article,
.contact-form,
.contact-card,
.article-shell,
.service-card,
.publication-card,
.page-head,
.retro-hud {
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--panel);
	box-shadow: var(--shadow);
}

.hero > div {
	padding: 1.85rem;
}

.hero > div h1::before {
	content: "MISSION_LOG";
	display: block;
	font-size: 0.62rem;
	color: var(--accent);
	margin-bottom: 0.8rem;
	letter-spacing: 0.08em;
}

.profile-panel {
	padding: 1.55rem;
}

.profile-panel p {
	color: var(--muted);
	margin: 0.45rem 0;
}

.eyebrow {
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.78rem;
	color: var(--accent);
}

h1,
h2,
h3 {
	font-family: "Press Start 2P", monospace;
	margin: 0.45rem 0;
	line-height: 1.35;
}

h1 {
	font-size: clamp(1.55rem, 3.5vw, 2.35rem);
	max-width: 18ch;
}

h2 {
	font-size: clamp(1.1rem, 2.4vw, 1.5rem);
}

p {
	color: var(--muted);
	font-size: 1.5rem;
	line-height: 1.4;
}

.hero-actions {
	margin-top: 1rem;
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	border-radius: 8px;
	border: 1px solid transparent;
	padding: 0.72rem 1.1rem;
	font-weight: 700;
	cursor: pointer;
	font-family: "Press Start 2P", monospace;
	font-size: 0.8rem;
}

.btn.primary {
	color: #02120b;
	background: linear-gradient(120deg, var(--primary), #93ffd4);
}

.btn.ghost {
	color: var(--text);
	border-color: var(--line);
	background: rgba(103, 216, 255, 0.13);
}

.retro-hud {
	margin-top: 1rem;
	padding: 1rem 1.1rem;
	border-style: dashed;
	background: rgba(8, 6, 20, 0.8);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.7rem;
}

.retro-hud p {
	margin: 0;
	font-size: 1.2rem;
	color: #bafee0;
}

.retro-hud span {
	color: #71d6ff;
}

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

.service-card {
	padding: 1.2rem;
}

.service-card h3 {
	font-size: 1.1rem;
}

.service-card p {
	font-size: 1.05rem;
}

.section-head {
	margin: 3.4rem 0 1.4rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.section-head a {
	font-weight: 700;
	font-family: "Press Start 2P", monospace;
	font-size: 0.68rem;
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 1.3rem;
}

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

.card {
	padding: 1.35rem;
	transform: translateY(0);
	transition: 180ms ease;
	position: relative;
	overflow: hidden;
}

.card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, var(--primary), var(--accent));
	opacity: 0.8;
}

.card:hover {
	transform: translateY(-6px);
}

.projects-grid .card {
	transform-origin: top center;
	animation: cardUnfold 520ms cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.projects-grid .card:nth-child(2n) {
	animation-delay: 90ms;
}

.publication-card {
	margin-top: 1.45rem;
	padding: 1.4rem;
}

.publication-card ul {
	margin: 0.4rem 0 0;
	padding-left: 1.1rem;
	color: var(--muted);
}

.chip {
	display: inline-flex;
	border: 1px solid rgba(124, 255, 208, 0.4);
	color: #b4ffe6;
	border-radius: 999px;
	padding: 0.24rem 0.6rem;
	font-size: 0.88rem;
}

.card ul {
	margin: 0.75rem 0 0;
	padding-left: 1rem;
	color: var(--muted);
	font-size: 1.25rem;
}

.tags {
	font-size: 0.95rem;
	color: #9be7d4;
}

.blog-card h2 a,
.blog-card h3 a {
	color: var(--text);
	text-decoration: none;
}

.stats {
	margin-top: 3.3rem;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.2rem;
}

.stats article {
	padding: 1.25rem;
	background: var(--panel-strong);
}

.page-head {
	margin-top: 1.5rem;
	padding: 1.6rem;
}

.inline-filter {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.inline-filter input,
.inline-filter button,
.contact-form input,
.contact-form textarea {
	font: inherit;
	color: var(--text);
	border: 1px solid var(--line);
	background: rgba(16, 20, 32, 0.75);
	border-radius: 10px;
	padding: 0.65rem 0.75rem;
}

.inline-filter button {
	background: rgba(100, 210, 255, 0.16);
}

.contact-shell {
	margin-top: 1.2rem;
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 1.2rem;
}

.contact-form,
.contact-card,
.article-shell {
	padding: 1.2rem;
}

.contact-form {
	display: grid;
	gap: 0.55rem;
}

.contact-form label {
	font-size: 1.18rem;
	color: #b4ffe6;
	letter-spacing: 0.02em;
}

.contact-card p {
	margin: 0.4rem 0;
}

.form-status {
	min-height: 1.2rem;
}

.article-shell {
	max-width: 980px;
	margin: 0 auto;
}

.article-meta {
	font-size: 1.2rem;
	color: #91e3d4;
}

.pdf-frame {
	margin-top: 1rem;
	width: 100%;
	min-height: 86vh;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.22);
}

.site-footer {
	width: min(1280px, 95vw);
	margin: 1.4rem auto 1rem;
	padding: 0.4rem 0 0;
	text-align: center;
	position: relative;
	z-index: 2;
}

.site-footer p {
	margin: 0;
	font-size: 0.82rem;
	letter-spacing: 0.03em;
	color: rgba(167, 189, 208, 0.82);
}

@keyframes fadeSlide {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes cardUnfold {
	0% {
		opacity: 0;
		transform: perspective(900px) rotateX(-18deg) scale(0.98) translateY(18px);
	}
	100% {
		opacity: 1;
		transform: perspective(900px) rotateX(0deg) scale(1) translateY(0);
	}
}

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

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

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

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

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

@media (max-width: 640px) {
	.service-grid {
		grid-template-columns: 1fr;
	}

	.site-header {
		width: min(95vw, 1280px);
		flex-direction: column;
	}

	h1 {
		max-width: 100%;
	}

	.retro-hud {
		grid-template-columns: 1fr;
	}
}
