:root {
	--bg: #0b0c10;
	--fg: #e5e7eb;
	--accent: #82e0aa;
	--muted: #98a2b3;
	--mono: "Roboto Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
	--sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
		"Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji",
		sans-serif;
}
@media (prefers-color-scheme: light) {
	:root {
		--bg: #fafafa;
		--fg: #0b0c10;
		--accent: #2563eb;
		--muted: #667085;
	}
}
* {
	box-sizing: border-box;
}
html,
body {
	height: 100%;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 16px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
/* CRT Retro Effect: explicit overlay to ensure visibility */
#crt-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	pointer-events: none;
}
#crt-overlay.crt-off {
	display: none;
}
#crt-overlay::before,
#crt-overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
}
/* Scanlines */
#crt-overlay::before {
	background-image: linear-gradient(
			0deg,
			rgba(255, 255, 255, 0.28) 0px,
			rgba(255, 255, 255, 0.28) 1px,
			rgba(0, 0, 0, 0.4) 1px,
			rgba(0, 0, 0, 0.4) 4px
		),
		linear-gradient(
			90deg,
			rgba(255, 0, 0, 0.15) 0 2px,
			rgba(0, 255, 0, 0.15) 2px 4px,
			rgba(0, 0, 255, 0.15) 4px 6px,
			rgba(0, 0, 0, 0) 6px 8px
		);
	background-size: 100% 4px, 8px 100%;
	background-repeat: repeat, repeat;
	opacity: 0.6;
	animation: crt-flicker 2s infinite steps(2, end),
		scan-move 4s linear infinite alternate;
	will-change: opacity, background-position;
}
/* Vignette */
#crt-overlay::after {
	inset: -2%;
	background: radial-gradient(
		ellipse at center,
		rgba(0, 0, 0, 0) 28%,
		rgba(0, 0, 0, 0.35) 62%,
		rgba(0, 0, 0, 0.72) 100%
	);
}
@keyframes crt-flicker {
	0% {
		opacity: 0.18;
	}
	55% {
		opacity: 0.26;
	}
	100% {
		opacity: 0.18;
	}
}
@keyframes scan-move {
	0% {
		background-position-y: 0px;
	}
	100% {
		background-position-y: 3px;
	}
}
img,
svg,
video {
	max-width: 100%;
	display: block;
}

.noscript {
	padding: 12px 16px;
	background: #ef4444;
	color: white;
	text-align: center;
}

/* ASCII layer */
#ascii-layer {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	display: block;
	padding: 0;
	transform-origin: center center;
	will-change: transform;
	overflow: hidden;
}
#ascii-canvas {
	margin: 0;
	white-space: pre;
	letter-spacing: 0.6px;
	line-height: 1;
	opacity: 0.64;
	color: #ccc;
	font-family: monospace;
	font-size: 14px;
	text-rendering: optimizeSpeed;
	font-variant-ligatures: none;
	-webkit-font-smoothing: antialiased;
	user-select: none;
	width: 100%;
	height: 100%;
}

/********************************
  App layout
********************************/
.app {
	position: relative;
	z-index: 1;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.hero {
	max-width: 840px;
	text-align: center;
}
.hero h1 {
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0 0 8px;
	font-size: clamp(28px, 5vw, 56px);
}
.hero p {
	margin: 0 0 20px;
	color: var(--muted);
}
.hero .logo-arcade {
	display: block;
	margin: 12px auto 18px;
	will-change: transform, filter, opacity;
	filter: drop-shadow(0 0 0.6rem #730000);
	position: relative;
}
.hero .logo-arcade {
	animation: scan-reveal 1200ms steps(32, end) 50ms both,
		logo-arcade-in 900ms cubic-bezier(0.2, 0.9, 0.1, 1.05) 100ms both,
		logo-arcade-glow 2400ms ease-in-out 1.2s infinite alternate;
}
/* Sweeping scanline highlight */
.hero .logo-arcade::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	top: -6%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.9),
		transparent
	);
	filter: drop-shadow(0 0 6px #730000);
	opacity: 0.9;
	animation: scanline-sweep 1200ms ease-in 50ms both;
}

@keyframes logo-arcade-in {
	0% {
		opacity: 0;
		transform: translateY(-18px) scale(0.9) skewY(0.6deg);
		filter: blur(1px) drop-shadow(0 0 0.2rem var(--accent));
	}
	55% {
		opacity: 1;
		transform: translateY(0) scale(1.06) skewY(0);
		filter: blur(0.5);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
		filter: blur(0);
	}
}
@keyframes logo-arcade-glow {
	0% {
		filter: drop-shadow(0 0 0.25rem #b00);
	}
	100% {
		filter: drop-shadow(0 0 0.9rem #000);
	}
}
@keyframes scan-reveal {
	0% {
		clip-path: inset(100% 0 0 0);
	}
	100% {
		clip-path: inset(0 0 0 0);
	}
}
@keyframes scanline-sweep {
	0% {
		top: -6%;
		opacity: 0.95;
	}
	85% {
		top: 102%;
		opacity: 0.8;
	}
	100% {
		top: 106%;
		opacity: 0;
	}
}
.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}
.btn {
	appearance: none;
	background: var(--accent);
	color: white;
	border: none;
	border-radius: 10px;
	padding: 12px 16px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.1s ease, opacity 0.2s ease;
}
.btn:hover {
	transform: translateY(-1px);
}
.btn:active {
	transform: translateY(0);
}
.btn.secondary {
	background: transparent;
	outline: 1px solid color-mix(in oklab, var(--accent) 50%, transparent);
	color: var(--fg);
}
.btn[aria-pressed="true"] {
	opacity: 0.7;
}

.features {
	margin-top: 28px;
}
.features ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 8px;
}
.features li {
	background: color-mix(in oklab, var(--accent) 12%, transparent);
	border: 1px solid color-mix(in oklab, var(--accent) 28%, transparent);
	color: var(--fg);
	padding: 10px 12px;
	border-radius: 10px;
}

/* Reduce motion: keep background visible but static */
@media (prefers-reduced-motion: reduce) {
	#ascii-canvas {
		opacity: 0.12;
	}
}

.ascii-logo {
	cursor: default;
    font-family: "Courier New", Courier, monospace;
    white-space: pre;
    line-height: 1.2; /* Adjusting line height helps vertical spacing */
    letter-spacing: 0;
}

pre {
    font-size: 0.8vw; /* Art will grow/shrink based on screen width */
}

pre.small {
	font-size: 1vw;
	margin-left: 1rem;
}

@media (max-width: 768px) {
	pre {
		font-size: 1.08vw; /* 35% larger on mobile */
	}
	
	pre.small {
		margin-left: 1rem;
		font-size: 1.35vw; /* 35% larger on mobile */
	}
}

.email {
	cursor: pointer;
}
.email a {
	color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.email:hover {
	color: #667085;
}