/* Arcade 8-bit theme */
:root{
	--bg: #0b0e12;
	--panel: #11161d;
	--scan: rgba(255,255,255,0.04);
	--fg: #e6f3ff;
	--accent: #39ff14; /* neon green */
	--accent2: #ff3df3; /* magenta */
	--grid: rgba(57,255,20,0.2);
}

*{ box-sizing: border-box; }

html, body{
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: 'Press Start 2P', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
	line-height: 1.6;
}

/* Native smooth scrolling and offset for sticky header */
html{ scroll-behavior: smooth; scroll-padding-top: var(--header-offset, 0px); }

/* Starfield (sits behind content) */
.starfield{
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}
.star{
	position: absolute;
	width: 2px;
	height: 2px;
	image-rendering: pixelated;
	background: #e6f3ff;
	box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
	animation: twinkle 1.6s steps(2, jump-none) infinite;
}
.star.s1{ width: 1px; height: 1px; opacity: .6; }
.star.s2{ width: 2px; height: 2px; opacity: .8; }
.star.s3{ width: 3px; height: 3px; opacity: 1; }
.star.c1{ background: #e6f3ff; }
.star.c2{ background: #bde0ff; }
.star.c3{ background: #ffffff; }
@keyframes twinkle{ 50%{ opacity: .2; } }

/* Ensure link color is bright green site-wide and remove underline */
a{ color: var(--accent); text-decoration: none; }
a:visited{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: none; }

.crt{
	position: relative;
	overflow: hidden;
}

.crt::after{
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		to bottom,
		transparent 0px,
		transparent 2px,
		var(--scan) 3px,
		transparent 4px
	);
	pointer-events: none;
	mix-blend-mode: overlay;
}

.header{
	padding: 10px 16px 8px;
	text-align: center;
	background: linear-gradient(180deg, #0b0e12 0%, #0b0e12 40%, #0b0e12 60%),
		linear-gradient( to top, rgba(57,255,20,0.12), transparent 60% );
	border-bottom: 2px solid var(--accent);
	box-shadow: 0 0 0 2px var(--accent) inset;
	position: sticky;
	top: 0;
	z-index: 2;
}

.ui-bar{
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
	max-width: 1100px;
	margin: 0 auto 12px;
}

.brand{ color: var(--accent2); text-shadow: 0 0 8px var(--accent2); }
.credits{ text-align: right; color: var(--accent); text-shadow: 0 0 8px var(--accent); }
.brand-avatar{ display: block; width: 100px; height: 100px; image-rendering: pixelated; margin: 6px auto 0; border: 2px solid var(--fg); box-shadow: 4px 4px 0 0 var(--accent); cursor: pointer; }

.nav{ display: flex; gap: 12px; justify-content: center; }
.nav a{
	color: var(--accent);
	text-decoration: none;
	border: 2px solid var(--fg);
	padding: 6px 8px;
	box-shadow: 4px 4px 0 0 var(--accent);
	transition: transform .1s ease;
}
.nav a:visited{ color: var(--accent); border-color: var(--fg); }
.nav a:hover{ transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 var(--accent); }

.title{ font-size: 28px; margin: 10px 0 6px; letter-spacing: 2px; }
.subtitle{ opacity: .8; font-size: 12px; }
.blink{ animation: blink 1s steps(2, jump-none) infinite; color: var(--accent); }
@keyframes blink{ 50%{ opacity: 0; } }

main{
	max-width: 960px;
	margin: 0 auto;
	padding: 24px 16px 64px;
	background-image:
		linear-gradient(0deg, var(--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: 24px 24px, 24px 24px;
	background-position: center center;
	position: relative;
	z-index: 1;
}

.panel{
	background: var(--panel);
	border: 2px solid var(--fg);
	box-shadow: 6px 6px 0 0 var(--accent);
	padding: 18px 16px;
	margin: 24px 0;
}

.panel h2{
	margin: 0 0 12px;
	font-size: 18px;
	color: var(--accent2);
	text-shadow: 0 0 8px var(--accent2);
}

.list{ padding-left: 18px; }
.list li{ margin: 8px 0; }

.list a{ color: var(--accent); text-decoration: none; }
.list a:visited{ color: var(--accent); }
.contacts{
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 8px;
}
.contacts a{ color: var(--accent); text-decoration: none; }
.contacts a:visited{ color: var(--accent); }
.contacts a:hover{ color: var(--accent); }

.love{ color: var(--accent); }

.footer{
	text-align: center;
	padding: 24px;
	border-top: 2px solid var(--accent);
	box-shadow: 0 0 0 2px var(--accent) inset;
	position: relative;
	z-index: 1;
}

.easter-egg-hint{
	font-size: 8px;
	color: rgba(230, 243, 255, 0.3);
	margin: 8px 0 0 0;
	font-family: 'Press Start 2P', monospace;
}

/* Life Bar - Pixelated Arcade Style */
.life-bar{
	position: relative;
	width: 100px; /* Same width as enrico.png */
	height: 8px;
	background: #ff0000; /* Red background for depleted life */
	border: 2px solid #fff;
	image-rendering: pixelated;
	overflow: hidden;
	margin: 4px auto 0;
	box-shadow: 2px 2px 0 0 #666;
}

.life-bar-fill{
	height: 100%;
	background: #ffff00; /* Solid yellow for full life */
	width: 100%;
	transition: width 0.2s ease;
	image-rendering: pixelated;
	position: absolute;
	left: 0;
	top: 0;
}

/* Defeat Modal */
.defeat-modal{
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	z-index: 10000;
	display: flex;
	justify-content: center;
	align-items: center;
}

.defeat-modal-content{
	background: var(--panel);
	border: 4px solid var(--fg);
	box-shadow: 8px 8px 0 0 var(--accent);
	padding: 24px;
	text-align: center;
	position: relative;
	max-width: 400px;
	width: 90%;
}


.defeat-image{
	max-width: 200px;
	height: auto;
	image-rendering: pixelated;
	margin-bottom: 16px;
}

.defeat-modal h2{
	color: var(--accent2);
	text-shadow: 0 0 8px var(--accent2);
	margin: 0 0 12px;
	font-size: 18px;
}

.defeat-modal p{
	margin: 0 0 20px;
	font-size: 12px;
	color: var(--fg);
}

.reset-btn{
	background: var(--accent);
	color: var(--bg);
	border: 2px solid var(--fg);
	padding: 8px 16px;
	font-family: 'Press Start 2P', monospace;
	font-size: 10px;
	cursor: pointer;
	box-shadow: 4px 4px 0 0 var(--fg);
	transition: transform 0.1s ease;
}

.reset-btn:hover{
	transform: translate(-2px, -2px);
	box-shadow: 6px 6px 0 0 var(--fg);
}

/* Small screens */
@media (max-width: 600px){
	.nav{ flex-wrap: wrap; }
	.nav a{ padding: 6px; font-size: 10px; }
	.title{ font-size: 22px; }
}

