*, *::before, *::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	background: #000;
	color: #00ff00;
	font-family: "Roboto", system-ui, sans-serif;
	line-height: 1.55;
	overflow-x: hidden;
}

#matrix {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

#matrix.matrix-off {
	opacity: 0 !important;
}

.matrix-toggle {
	position: fixed;
	bottom: 4.5rem;
	right: 0.85rem;
	z-index: 40;
	background: rgba(0, 0, 0, 0.85);
	border: 1px solid rgba(0, 255, 0, 0.45);
	color: #00ff00;
	font-family: "Orbitron", Courier, monospace;
	font-size: 0.7rem;
	padding: 0.4rem 0.65rem;
	border-radius: 6px;
	cursor: pointer;
}

.matrix-toggle:hover {
	border-color: #00ced1;
	color: #00ced1;
}

nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 30;
	background: rgba(0, 0, 0, 0.88);
	border-bottom: 1px solid rgba(0, 255, 0, 0.15);
}

.navbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1040px;
	margin: 0 auto;
	padding: 0.65rem 1.1rem;
}

.toggle-button {
	display: none;
	background: transparent;
	border: none;
	color: #00ff00;
	font-size: 1.5rem;
	cursor: pointer;
}

.nav-links {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.15rem 0.35rem;
	margin: 0;
	padding: 0;
}

.nav-links > li {
	position: relative;
}

.nav-links a {
	color: #00ff00;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.92rem;
	padding: 0.35rem 0.55rem;
	display: block;
}

.nav-links a:hover {
	color: #00ced1;
}

.dropdown-content {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 12rem;
	background: rgba(0, 0, 0, 0.95);
	border: 1px solid rgba(0, 255, 0, 0.3);
	z-index: 35;
}

.dropdown-content a {
	font-weight: 400;
	font-size: 0.85rem;
	padding: 0.55rem 0.85rem;
}

.dropdown-content a:hover {
	background: rgba(0, 255, 0, 0.08);
}

.dropdown:hover .dropdown-content {
	display: block;
}

.container {
	position: relative;
	z-index: 1;
	max-width: 1040px;
	margin: 4.5rem auto 5.5rem;
	padding: 1rem 1.15rem 2rem;
	background: rgba(0, 0, 0, 0.88);
	border-radius: 12px;
	border: 1px solid rgba(0, 255, 0, 0.12);
}

h2 {
	font-family: "Orbitron", Courier, monospace;
	color: #00ff00;
	text-shadow: 0 0 8px rgba(0, 255, 0, 0.45);
	border-bottom: 1px solid #333;
	padding-bottom: 0.45rem;
	margin: 0 0 0.85rem;
	font-size: 1.35rem;
}

h3 {
	color: #00ced1;
	margin: 0.4rem 0 0.5rem;
	font-size: 1.05rem;
}

a {
	color: #5ad0ff;
	text-decoration: none;
}

a:hover {
	color: #00ff00;
}

footer {
	position: relative;
	z-index: 25;
	pointer-events: auto;
	text-align: center;
	padding: 1rem 1rem 1.25rem;
	background: rgba(0, 0, 0, 0.92);
	border-top: 1px solid rgba(0, 255, 0, 0.15);
	color: #6a8a6a;
	font-size: 0.9rem;
}

footer a {
	color: #00ff00;
}

footer p {
	margin: 0.3rem 0;
}

.sys-status {
	font-family: "Share Tech Mono", monospace;
	font-size: 0.72rem;
	color: #3d6a4a;
	letter-spacing: 0.04em;
	margin: 0.35rem 0 !important;
}

.footer-tty {
	margin-top: 0.55rem !important;
	position: relative;
	z-index: 26;
}

.tty-hint {
	background: none;
	border: none;
	padding: 0.35rem 0.5rem;
	cursor: pointer;
	font-family: "Share Tech Mono", "Courier New", monospace;
	font-size: 0.82rem;
	color: #3d6a4a;
	letter-spacing: 0.02em;
	pointer-events: auto;
	position: relative;
	z-index: 27;
}

.tty-hint:hover {
	color: #00ff88;
}

.tty-hint:focus-visible {
	outline: 1px solid #00ff66;
	outline-offset: 3px;
}

@media (max-width: 768px) {
	.toggle-button {
		display: block;
	}

	.nav-links {
		display: none;
		width: 100%;
		flex-direction: column;
		padding: 0.5rem 0 0.75rem;
	}

	.nav-links.active {
		display: flex;
	}

	.navbar {
		flex-wrap: wrap;
	}

	.dropdown-content {
		position: static;
		border: none;
		background: transparent;
		padding-left: 0.75rem;
	}

	.dropdown:hover .dropdown-content {
		display: none;
	}

	.dropdown.open .dropdown-content {
		display: block;
	}

	.container {
		margin: 4.25rem 0.55rem 4rem;
		padding: 0.85rem 0.75rem 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
