@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");

:root {
	--terminal-green: #7cff67;
	--terminal-dim: #3b9e34;
	--terminal-black: #071008;
}

/* Terminal page shell */
.terminal-page {
	background: var(--terminal-black);
	color: var(--terminal-green);
	font-family: "Share Tech Mono", "Courier New", monospace;
	overflow-x: hidden;
}

.terminal-page.booting {
	overflow: hidden;
}

.terminal-page.booting .terminal-content main {
	display: none;
}

.terminal-page.booting .terminal-content header {
	display: none;
}

.terminal-page::before,
.terminal-page::after {
	content: "";
	inset: 0;
	pointer-events: none;
	position: fixed;
	z-index: 10;
}

.terminal-page::before {
	background: repeating-linear-gradient(
		0deg,
		rgba(124, 255, 103, 0.035) 0,
		rgba(124, 255, 103, 0.035) 1px,
		transparent 1px,
		transparent 4px
	);
}

.terminal-page::after {
	background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.5));
}

.terminal {
	min-height: 100vh;
	position: relative;
}

/* Boot screen */
.terminal-boot {
	align-items: center;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-height: 100vh;
	padding: 2rem;
	text-shadow: 0 0 8px rgba(124, 255, 103, 0.65);
}

.terminal-boot > div.is-typing::after {
	animation: none;
	background: currentColor;
	content: "";
	display: inline-block;
	height: 1.15em;
	margin-left: 0.35em;
	vertical-align: text-bottom;
	width: 0.55em;
}

.terminal-boot > div.is-password .boot-password-cursor {
	animation: cursor-blink 1.2s ease-in-out infinite;
}

.terminal-boot > div.is-password::after {
	content: none;
	display: none;
}

.terminal-boot > div {
	max-width: 64rem;
	line-height: 2.1em;
	min-height: 2.1em;
	width: min(100%, 64rem);
}

.boot-password {
	background: transparent;
	border: 0;
	caret-color: transparent;
	color: inherit;
	display: inline-block;
	font: inherit;
	margin: 0;
	max-width: calc(100% - 1rem);
	min-width: 0;
	outline: none;
	padding: 0;
	width: auto;
}

.boot-password-cursor {
	background: currentColor;
	display: inline-block;
	height: 1.15em;
	vertical-align: text-bottom;
	width: 0.55em;
}

.terminal-boot > div.is-password .boot-password-cursor.is-typing {
	animation: none;
}

.boot-continue {
	bottom: 2rem;
	position: fixed;
	right: 2rem;
	text-align: right;
	width: auto;
}

.boot-mark {
	border-bottom: 1px solid var(--terminal-dim);
	margin-bottom: 1.25rem;
	padding-bottom: 0.75rem;
}

.boot-skip-button {
	background: transparent;
	border: 1px solid var(--terminal-dim);
	color: var(--terminal-dim);
	cursor: pointer;
	font: inherit;
	letter-spacing: 0.08rem;
	margin-top: 1rem;
	padding: 0.65rem 0.9rem;
}

.boot-skip-button:hover,
.boot-skip-button:focus-visible,
.boot-skip-button.is-holding {
	border-color: var(--terminal-green);
	color: var(--terminal-green);
	outline: 2px solid rgba(124, 255, 103, 0.2);
	outline-offset: 2px;
}

.boot-skip-button.is-holding {
	animation: skip-hold-progress 2.5s linear forwards;
	background: linear-gradient(
		90deg,
		rgba(124, 255, 103, 0.22) 0,
		rgba(124, 255, 103, 0.22) 100%,
		transparent 100%
	);
	background-size: 0% 100%;
	background-repeat: no-repeat;
}

/* Main terminal chrome */
.terminal-content {
	animation: none;
}

.terminal-content header {
	background: rgba(7, 16, 8, 0.92);
	border-bottom: 1px solid var(--terminal-dim);
	position: sticky;
	top: 0;
	z-index: 5;
}

.terminal-status {
	border-bottom: 1px solid rgba(124, 255, 103, 0.18);
	color: var(--terminal-dim);
	display: flex;
	font-size: 0.7rem;
	justify-content: space-between;
	letter-spacing: 0.08rem;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0.45rem 1.5rem;
	text-transform: uppercase;
}

.terminal-content main {
	background: rgba(7, 16, 8, 0.45);
	border-left: 1px solid rgba(124, 255, 103, 0.2);
	border-right: 1px solid rgba(124, 255, 103, 0.2);
	min-height: calc(100vh - 78px);
}

.terminal-content .logo,
.terminal-content h1,
.terminal-content .eyebrow {
	color: var(--terminal-green);
	text-shadow: 0 0 8px rgba(124, 255, 103, 0.45);
}

.prompt-cursor {
	animation: none;
	color: var(--terminal-green);
	margin-left: 0.2rem;
}

.terminal-panel {
	background: rgba(7, 16, 8, 0.52);
	border-color: rgba(124, 255, 103, 0.24);
}

.command-label,
.terminal-content .section-kicker,
.terminal-content .work-number {
	color: var(--terminal-green);
	font-size: 0.75rem;
	letter-spacing: 0.12rem;
	text-transform: uppercase;
}

.terminal-content h2,
.terminal-content h3,
.terminal-content .about-lede,
.terminal-content .profile-lede,
.terminal-content .timeline-title {
	color: var(--terminal-green);
}

.terminal-content .section-heading > p:last-child,
.terminal-content .contact-section > p:not(.section-kicker),
.terminal-content .skill-groups p,
.terminal-content .hero-description {
	color: var(--terminal-dim);
}

.terminal-content .process-grid article {
	background: rgba(7, 16, 8, 0.72);
	border-color: rgba(124, 255, 103, 0.24);
}

.terminal-content .tag-list li,
.terminal-content .button,
.terminal-content .work-link,
.terminal-content .filter-button {
	border-color: var(--terminal-dim);
	color: var(--terminal-green);
}

.terminal-content .filter-button.is-active,
.terminal-content .filter-button:hover,
.terminal-content .filter-button:focus-visible {
	background: rgba(124, 255, 103, 0.12);
	border-color: var(--terminal-green);
	color: var(--terminal-green);
}

.terminal-content .button-primary {
	background: var(--terminal-green);
	border-color: var(--terminal-green);
	color: var(--terminal-black);
}

/* Navigation controls */
.terminal-content .nav-links a {
	color: var(--terminal-dim);
}

.terminal-content .nav-links a:hover,
.terminal-content .nav-links a:focus-visible {
	background: rgba(124, 255, 103, 0.1);
	color: var(--terminal-green);
}

.boot-toggle {
	align-items: center;
	color: var(--terminal-dim);
	display: flex;
	font-size: 0.8rem;
	gap: 0.4rem;
	margin-left: 1rem;
	white-space: nowrap;
}

.boot-toggle input {
	accent-color: var(--terminal-green);
	cursor: pointer;
	height: 1rem;
	margin: 0;
	width: 1rem;
}

.boot-toggle:focus-within {
	color: var(--terminal-green);
}

.terminal-content .eyebrow {
	align-items: center;
	display: flex;
	gap: 0.8rem;
}

.terminal-content .eyebrow img {
	background: rgba(124, 255, 103, 0.04);
	border: 2px solid rgba(124, 255, 103, 0.9);
	box-shadow: 0 0 0 2px rgba(124, 255, 103, 0.12), 0 0 18px rgba(124, 255, 103, 0.2);
	filter: none;
	height: 280px;
	padding: 0.2rem;
	width: 280px;
}

/* Responsive terminal chrome */
@media (max-width: 600px) {
	.terminal-content header {
		transition: none;
	}

	.terminal-content header.mobile-nav-hidden {
		transform: translateY(-100%);
		pointer-events: none;
	}

	.terminal-content header {
		padding-top: env(safe-area-inset-top);
	}

	.terminal-status {
		display: none;
	}

	.terminal-content .eyebrow img {
		height: 120px;
		width: 120px;
	}
}

/* Motion */
@keyframes cursor-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

@keyframes terminal-reveal {
	from { opacity: 0; transform: translateY(0.5rem); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes skip-hold-progress {
	from { background-size: 0% 100%; }
	to { background-size: 100% 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.terminal-content,
	.terminal-boot > div.is-typing::after,
	.boot-skip-button.is-holding {
		animation: none;
	}
}
