/* --- Base Styles --- */
:root {
	--box-gap: 25px;
	--content-width: 650px;
	--wide-content-width: 870px;
	--font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
	--accent-color: #bc13fe;
	--glow-color: rgba(188, 19, 254, 0.45);
}

html {
	background: #000000 !important;
	scrollbar-width: thin;
	scrollbar-color: #1a1a1a #050505;
}

body {
	margin: 0;
	padding: 0;
	background: #0a0a0a; 
	color: white;
	font-family: var(--font-mono); 
	font-size: 16px;
	line-height: 1.3;
	min-height: 100vh;
	overflow-x: hidden;
	animation: crt-flicker 0.4s infinite;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scrollbar-width: thin;
	scrollbar-color: #1a1a1a #050505;
}

body.main-page {
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

.terminal-container {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	width: 100%;
	padding: 20px;
	box-sizing: border-box;
}

/* CRT Screen Vignette & Lines */
html {
	--vignette-start: 55%;
	--vignette-opacity: 0.8;
}

html::after {
	content: " ";
	display: block;
	position: fixed;
	top: 0; left: 0; bottom: 0; right: 0;
	background: radial-gradient(circle, rgba(0, 0, 0, 0) var(--vignette-start), rgba(0, 0, 0, var(--vignette-opacity)) 100%);
	pointer-events: none;
	z-index: 101;
}

html.no-vignette::after {
	display: none !important;
}

.crt-lines {
	position: fixed;
	top: 0; left: 0; width: 100%; height: 100%;
	background: 
		linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.12) 50%), 
		linear-gradient(90deg, rgba(188, 0, 255, 0.012), rgba(120, 0, 200, 0.007), rgba(188, 0, 255, 0.012));
	background-size: 100% 2px, 3px 100%;
	z-index: 99;
	pointer-events: none;
}

.crt-lines::after {
	content: " ";
	display: block;
	position: absolute;
	top: 0; left: 0; bottom: 0; right: 0;
	background: linear-gradient(rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.03) 10%, rgba(255, 255, 255, 0) 20%);
	opacity: 1;
	z-index: 100;
	pointer-events: none;
	animation: crt-lines-roll 8s linear infinite;
}

/* Selection and Custom Scrollbar */
::selection {
	background: rgba(188, 19, 254, 0.25);
	color: #ffffff;
}

::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
::-webkit-scrollbar-track {
	background: #050505;
}
::-webkit-scrollbar-thumb {
	background: #1a1a1a;
	border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
	background: #bc13fe;
	box-shadow: 0 0 4px #bc13fe;
}

/* --- Typography & Links --- */
a { 
	color: inherit; 
	text-decoration: none; 
	cursor: pointer; 
	display: inline-block;
	vertical-align: baseline;
	transform: translateZ(0);
	transition: color 0.15s ease, filter 0.15s ease; 
}
a:hover { 
	color: #ffff00; 
	filter: drop-shadow(0 0 4px rgba(255, 255, 0, 0.8));
}	

.info-label {
	font-weight: 700;
	color: #ffffff;
	text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}

.logo-part {
	white-space: pre;
	font-size: inherit;
	line-height: 1.1;
}

/* --- Inner Pages (GRUB Frame) --- */
.grub-frame {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: var(--content-width);
	border: 2px solid white;
	padding: 25px;
	box-sizing: border-box;
	background: rgba(10, 10, 14, 0.98);
	border-radius: 0 !important;
	text-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
	margin: auto; 
	
	transform-origin: center;
	will-change: transform, opacity, filter, box-shadow;
	animation: 
		grub-window-open 0.3s cubic-bezier(0.22, 1, 0.36, 1) both,
		setup-glow-ignite 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

@keyframes setup-glow-ignite {
	0% {
		box-shadow: 0 0 0px rgba(188, 19, 254, 0), inset 0 0 0px rgba(255, 255, 255, 0);
	}
	100% {
		box-shadow: 0 0 30px rgba(188, 19, 254, 0.25), inset 0 0 15px rgba(255, 255, 255, 0.02);
	}
}

.grub-frame.grub-window-close, .neofetch-wrapper.grub-window-close {
	animation: grub-window-close 0.2s cubic-bezier(0.32, 0, 0.67, 0) both !important;
}

.grub-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
	margin-bottom: 25px;
	padding-bottom: 12px;
	opacity: 0;
	animation: footer-slide-down 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.grub-title {
	font-size: 28px;         
	font-weight: 700;
	text-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}

.terminal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
	padding-bottom: 8px;
	margin-bottom: 8px;
	opacity: 0;
	animation: footer-slide-down 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.4s both;
}

.terminal-header a {
	color: #bc13fe;
	filter: drop-shadow(0 0 3px rgba(188, 19, 254, 0.5));
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transform: translateZ(0);
	transition: color 0.15s ease, filter 0.15s ease;
}

.terminal-header a:hover {
	color: #55ffff;
	filter: drop-shadow(0 0 5px rgba(85, 255, 255, 0.8));
}

.content {
	opacity: 0;
	animation: footer-slide-down 1.0s cubic-bezier(0.16, 1, 0.3, 1) 1.7s both;
}

.lang-switcher {
	font-size: 14px;
	color: #8888aa;
	user-select: none;
}

.neo-toolbar, .grub-header, .terminal-header {
	position: relative;
	z-index: 100;
}

.lang-dropdown-wrapper {
	position: relative;
	display: inline-block;
	user-select: none;
	font-family: var(--font-mono);
	z-index: 101;
}

.lang-dropdown-btn {
	background: rgba(188, 19, 254, 0.12);
	border: 1px solid rgba(188, 19, 254, 0.4);
	color: #ffffff;
	font-family: var(--font-mono);
	font-size: 12.5px;
	padding: 4px 10px;
	cursor: pointer;
	border-radius: 0 !important;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
	transform: translateZ(0);
}

.lang-dropdown-btn:hover {
	border-color: #bc13fe;
	background: rgba(188, 19, 254, 0.25);
	filter: drop-shadow(0 0 6px rgba(188, 19, 254, 0.7));
}

.lang-dropdown-menu {
	display: flex;
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	background: #0a0a0e !important;
	border: 1px solid #bc13fe;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 0 0 15px rgba(188, 19, 254, 0.4);
	z-index: 9999;
	min-width: 160px;
	flex-direction: column;
	padding: 4px 0;
	opacity: 0;
	visibility: hidden;
	transform: translate3d(0, -8px, 0) scale(0.95);
	transform-origin: top right;
	pointer-events: none;
	transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

.lang-dropdown-wrapper.open .lang-dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translate3d(0, 0, 0) scale(1);
	pointer-events: auto;
}

.lang-dropdown-item {
	padding: 8px 14px;
	font-size: 13px;
	color: #cccccc;
	cursor: pointer;
	transition: background 0.1s ease, color 0.1s ease;
}

.lang-dropdown-item:hover {
	background: #bc13fe;
	color: #ffffff;
}

.lang-dropdown-item.active {
	color: #55ffff;
	font-weight: bold;
}

.lang-btn.active {
	color: #bc13fe;
	filter: drop-shadow(0 0 4px rgba(188, 19, 254, 0.8));
}

.lang-btn:hover {
	color: #ffffff;
	filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
}

/* Language Display Rules */
html[lang="en"] .lang-ru, html[lang="en"] .lang-ua { display: none !important; }
html[lang="ru"] .lang-en, html[lang="ru"] .lang-ua { display: none !important; }
html[lang="ua"] .lang-en, html[lang="ua"] .lang-ru { display: none !important; }

.grub-text { 
	font-size: 19px;       
	margin-bottom: 15px; 
	white-space: pre-wrap; 
	line-height: 1.55;
	opacity: 0;
	animation: footer-slide-down 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

.grub-menu { 
	display: flex; 
	flex-direction: column; 
	margin-bottom: 10px; 
}
.grub-item { 
	display: block; 
	padding: 6px 12px; 
	color: white; 
	text-decoration: none; 
	transition: none !important; 
}
.grub-item:hover { 
	background: white !important; 
	color: black !important; 
	text-shadow: none !important; 
}

/* Hints / Keyboard navigation */
.grub-hint { 
	border-top: 1px dashed rgba(255, 255, 255, 0.2); 
	padding-top: 15px; 
	font-size: 15px; 
	text-align: center;
	opacity: 0;
	animation: footer-slide-down 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both;
}

.grub-back { 
	color: yellow; 
	text-shadow: 0 0 4px rgba(255, 255, 0, 0.4); 
	display: inline-block;
	padding: 15px 20px;   
	margin: -15px -20px;  
}

.thanks-highlight {
	margin-top: 10px;
	margin-bottom: 20px;
	padding: 16px 16px 16px 24px;
	border: 1px solid rgba(188, 19, 254, 0.25);
	background: rgba(188, 19, 254, 0.03);
	border-radius: 4px;
	font-size: 16px;
	line-height: 1.5;
	color: #e8c5ff;
	position: relative;
	overflow: visible; /* Changed from hidden to allow the top border badge to stick out */
	box-shadow: 0 0 10px rgba(188, 19, 254, 0.15), inset 0 0 15px rgba(188, 19, 254, 0.05);
	opacity: 0;
	animation: 
		footer-slide-down 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both,
		thanks-border-glow 3s ease-in-out infinite alternate;
}

.thanks-highlight::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	background: linear-gradient(to bottom, #bc13fe, #ff2a8d, #7000ff, #bc13fe);
	background-size: 100% 200%;
	animation: flow-line 4s linear infinite;
	border-top-left-radius: 3px;
	border-bottom-left-radius: 3px;
}

.thanks-highlight::after {
	content: "[ <3 ]";
	position: absolute;
	top: -9px;           /* Align center on the top border */
	left: 20px;          /* Shift slightly right from the left neon line */
	background: #0a0a0a; /* Matches page background to cut/cover the border underneath */
	padding: 0 6px;      /* Pad left and right to prevent border touching brackets */
	color: #ff7beb;      /* Glowing neon pink color for the heart */
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.5px;
	line-height: 1;
	text-shadow: 0 0 8px rgba(255, 123, 235, 0.7);
	z-index: 2;
}

.thanks-name {
	font-weight: 700;
	background: linear-gradient(
		90deg,
		#ff7beb 0%,
		#bc13fe 25%,
		#7000ff 50%,
		#bc13fe 75%,
		#ff7beb 100%
	);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	display: inline-block;
	animation: text-shimmer 4s linear infinite;
	filter: drop-shadow(0 0 2px rgba(188, 19, 254, 0.6));
}

.thanks-heart {
	color: #ff2a8d;
	display: inline-block;
	font-weight: bold;
	animation: heart-beat 1.2s infinite ease-in-out alternate;
	text-shadow: 0 0 8px rgba(255, 42, 141, 0.8);
}

/* --- Layouts & Media Queries --- */

/* Desktop PC Layout */
@media (min-width: 1101px) {
	.box {
		display: flex;
		flex-direction: row;
		align-items: center;
		text-shadow: 
			-1px -1px 0 #0a0a0a,
			1px -1px 0 #0a0a0a,
			-1px 1px 0 #0a0a0a,
			1px 1px 0 #0a0a0a,
			0 0 8px #0a0a0a,
			0 0 16px #0a0a0a,
			0 0 24px #0a0a0a;
		gap: 0px;
		min-height: 21em;
		height: auto;
		will-change: gap, transform;
		transform: translate3d(0, 0, 0);
		backface-visibility: hidden;
		animation: crt-soft-load 0.3s ease-out both, expand-gap 0.4s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
	}

	.content-wrapper {
		display: flex;
		overflow: hidden;
		width: var(--content-width);
		max-width: 0px; 
		opacity: 0;
		will-change: max-width, opacity, transform;
		transform: translate3d(0, 0, 0);
		backface-visibility: hidden;
		contain: paint layout;
		animation: expand-content 0.4s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
	}

	.content-inner {
		width: var(--content-width);
		display: flex;
		flex-direction: column;
		gap: 30px;
		flex-shrink: 0;
		transform: translateZ(0);
	}

	.mobile-logo { display: none; }
	.desktop-logo {
		position: relative;
		font-family: 'JetBrains Mono', 'Consolas', monospace !important;
		font-language-override: "ENG";
		letter-spacing: 0px !important;
		word-spacing: 0px !important;
		font-size: 11px;
		width: 38ch; 
		height: 22em;
		flex-shrink: 0;
		display: block;
		will-change: transform;
		transform: translate3d(0,0,0);
		backface-visibility: hidden;
	}
	.logo-wrapper {
		width: 38ch;
		flex-shrink: 0;
		font-size: 11px;
		align-self: center; /* Keep logo vertically centered but don't let it drift horizontally */
		position: relative; /* Prevent browser from repositioning during flex reflow */
		will-change: transform, opacity, filter;
		transform: translate3d(0,0,0);
		backface-visibility: hidden;
		animation: crt-degauss-ignite 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
	}

	.part-a {
		position: absolute;
		top: 0; left: 0;
		opacity: 0;
		transform-origin: center center;
		will-change: transform, filter, opacity;
		transform-style: preserve-3d;
		animation: 
			v1-slide-left 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards,
			v1-volt-flicker 1.8s ease-out 0.3s forwards;
		transform: translate3d(0,0,0);
		backface-visibility: hidden;
	}

	.part-v {
		position: absolute;
		top: 0; left: 0;
		opacity: 0;
		transform-origin: center center;
		will-change: transform, filter, opacity;
		transform-style: preserve-3d;
		animation: 
			v1-slide-right 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards,
			v1-volt-flicker 1.8s ease-out 0.3s forwards;
		transform: translate3d(0,0,0);
		backface-visibility: hidden;
	}
	.content {
		white-space: pre-wrap;
	}

	.main-page .content div {
		white-space: pre;
	}

	.site-footer {
		font-size: 14px;
		color: #aaaaaa;
		opacity: 0;
		animation: footer-crt-ignite 0.8s ease-out 2.3s both; 
		line-height: 1.4;
	}
}

/* Mobile Adaptive Layout */
@media (max-width: 1100px) {
	.desktop-logo { display: none; }
	.logo-wrapper {
		width: 100%;
	}
	
	.mobile-logo { 
		display: block; 
		white-space: pre;
		font-size: 10px;
		line-height: 1.1;
		flex-shrink: 0;
		opacity: 0;
		animation: terminal-print 0.6s steps(10, end) 0.5s forwards;
		width: fit-content;
		margin: 0 auto 20px;
	}

	.terminal-container {
		align-items: center;
		/*------*/
		position: relative;
		left: 0;
		top: 0;
		transform: none;
		/*------*/
		padding: 30px 20px;
	}

	.box {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 0px;
		min-height: calc(100vh - 60px); 
		width: 100%;
		animation: expand-gap-mobile 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.4s forwards;
	}

	body.crt-collapsing.main-page .box {
		animation: main-page-exit-mobile 0.22s cubic-bezier(0.32, 0, 0.67, 0) both !important;
	}

	.content-wrapper {
		display: flex;
		flex-direction: column;
		flex-grow: 1;
		width: 100%;
		opacity: 0;
		transform: translate3d(0, 15px, 0);
		animation: content-fade-in-mobile 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.4s forwards;
	}

	.content-inner {
		width: 100%;
		display: flex;
		flex-direction: column;
		gap: 30px;
		flex-shrink: 1;
		flex-grow: 1;
	}

	.content {
		white-space: pre-wrap;
		max-width: 100%;
	}

	.site-footer {
		margin-top: auto; 
		padding-top: 40px;
		font-size: 13.5px;
		text-align: center;
		color: #b5c0d8; 
		opacity: 0;
		animation: footer-slide-up-mobile 1s cubic-bezier(0.16, 1, 0.3, 1) 2.3s both;
		line-height: 1.4;
	}

	.grub-frame { 
		padding: 15px; 
		font-size: 14px; 
		line-height: 1.4; 
		border: none !important;
		width: 100vw !important;
		max-width: 100vw !important;
		margin: 0 !important;
		border-radius: 0 !important;
	}
	
	/* Softer vignette on mobile — still has vibe, doesn't kill readability */
	html {
		--vignette-start: 70%;
		--vignette-opacity: 0.55;
	}
	
	.grub-title { 
		font-size: 20px !important; 
		margin-bottom: 15px !important; 
	}

	.grub-header .grub-title {
		margin-bottom: 0 !important;
		border-bottom: none !important;
		padding-bottom: 0 !important;
	}
	
	.grub-text { 
		font-size: 15px !important; 
		line-height: 1.55 !important;
	}

	.thanks-highlight {
		font-size: 13.5px !important;
		padding: 10px 12px 10px 16px !important;
		margin-top: 8px !important;
		margin-bottom: 15px !important;
	}

	@media (min-width: 650px) {
		.content-wrapper { max-width: 460px; }
		.mobile-logo { font-size: 12px; }
	}

	@media (max-width: 480px) {
		.mobile-logo { font-size: 8px !important; }
	}

	@media (max-width: 360px) {
		.mobile-logo { font-size: 6.5px !important; }
	}

	.contact-item {
		font-size: 14px;
		display: grid !important;
		grid-template-columns: 26px 15ch 20px 1fr !important;
		align-items: center !important;
		gap: 10px !important;
		width: 100%;
	}
	.contact-link {
		word-break: break-all;
	}
	@media (max-width: 480px) {
		.construction-sign {
			font-size: 10px;
		}
	}
}

/* 720p Monitors (1280–1366px wide) */
@media (min-width: 1101px) and (max-width: 1366px) {
	:root {
		--box-gap: 18px;
		--content-width: 600px;
	}
	body { font-size: 14px; }
	.desktop-logo { font-size: 10px; width: 38ch; }
	.logo-wrapper { font-size: 10px; width: 38ch; }
	.content-inner { width: var(--content-width); gap: 22px; }
	.box { min-height: 17em; }
}

/* 1080p Small Window Monitors (1367–1439px wide) */
@media (min-width: 1367px) and (max-width: 1439px) {
	:root {
		--box-gap: 22px;
		--content-width: 650px;
	}
	body { font-size: 16px; }
	.desktop-logo { font-size: 11.5px; width: 38ch; }
	.logo-wrapper { font-size: 11.5px; width: 38ch; }
	.content-inner { width: var(--content-width); gap: 26px; }
	.box { min-height: 19em; }
}

/* Standard 1080p Monitors (1440p–1999px wide) */
@media (min-width: 1440px) and (max-width: 1999px) {
	:root {
		--box-gap: 30px;
		--content-width: 750px;
		--wide-content-width: 1000px;
	}
	body { font-size: 20px; }
	.desktop-logo { font-size: 13.5px; width: 38ch; }
	.logo-wrapper { font-size: 13.5px; }
	.content-inner { width: var(--content-width); }
}

/* High Resolution 2K/4K Monitors (2000px+) */
@media (min-width: 2000px) {
	:root {
		--box-gap: 35px;
		--content-width: 900px;
		--wide-content-width: 1200px;
	}
	body { font-size: 24px; }
	.desktop-logo { font-size: 16px; width: 38ch; }
	.logo-wrapper { font-size: 16px; }
	.content-inner { width: var(--content-width); }
}

/* Compact Height Adjustments for Small Desktops (like 720p viewports) */
@media (max-height: 800px) and (min-width: 1101px) {
	.terminal-container {
		align-items: center;
		/*------*/
		position: relative;
		left: 0;
		top: 0;
		transform: none;
		/*------*/
		padding: 20px;
	}
	.grub-frame {
		padding: 15px 20px;
		margin-top: 20px;
		margin-bottom: 20px;
	}
	.grub-header {
		margin-bottom: 15px;
		padding-bottom: 8px;
	}
	.grub-title {
		font-size: 24px;
	}
	.grub-text {
		font-size: 17px;
		margin-bottom: 10px;
	}
	.setup-list li {
		padding: 2px 0;
		font-size: 14px;
	}
	.setup-section-title {
		margin-top: 15px;
		margin-bottom: 8px;
		font-size: 15px;
	}
	.setup-grid {
		gap: 20px;
	}
	.contact-list {
		gap: 6px;
	}
	.contact-item {
		font-size: 15px;
	}
}

/* --- Animation Keyframes --- */

/* 
 * TIMING (duration: 1.8s, delay: 0.3s):
 * 50% = 0.9s + 0.3s = 1.2s  ← collision, layout expand starts
 * 72% = 1.296s + 0.3s = 1.6s ← scale-down done, layout expand done
 * Scale-down and gap-expand are synchronized over 0.4s window.
 */
@keyframes slide-from-top {
	0% {
		transform: translate3d(0, -175px, 0) scale(1.45);
		opacity: 0;
	}
	10% { opacity: 0.55; }
	18% { opacity: 0.2; }
	28% { opacity: 0.8; }

	/* Still arriving zoomed */
	48% {
		transform: translate3d(0, 2px, 0) scale(1.45);
		opacity: 1;
	}

	/* COLLISION — wiggle, hold zoom */
	50% {
		transform: translate3d(-2.5px, 0, 0) scale(1.45);
		opacity: 1;
		/* From here: scale-down and layout expand start simultaneously */
		animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
	}
	51.5% {
		transform: translate3d(2px, 0, 0) scale(1.44);
	}
	53% {
		transform: translate3d(0, 0, 0) scale(1.43);
	}

	/* Scale-down phase — ends at 72%, same as layout expand */
	72% {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 1;
	}
	100% {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 1;
	}
}

@keyframes slide-from-bottom {
	0% {
		transform: translate3d(0, 175px, 0) scale(1.45);
		opacity: 0;
	}
	10% { opacity: 0.55; }
	18% { opacity: 0.2; }
	28% { opacity: 0.8; }

	48% {
		transform: translate3d(0, -2px, 0) scale(1.45);
		opacity: 1;
	}

	/* COLLISION */
	50% {
		transform: translate3d(2.5px, 0, 0) scale(1.45);
		opacity: 1;
		animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
	}
	51.5% {
		transform: translate3d(-2px, 0, 0) scale(1.44);
	}
	53% {
		transform: translate3d(0, 0, 0) scale(1.43);
	}

	/* Scale-down phase */
	72% {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 1;
	}
	100% {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 1;
	}
}

@keyframes crt-power-on-flicker {
	0% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 6px #ffffff,
			0 0 14px var(--accent-color, #bc13fe),
			0 0 25px rgba(188, 19, 254, 0.5);
		filter: brightness(1.1);
	}
	10% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 10px #ffffff,
			0 0 22px #00f0ff,
			0 0 38px var(--accent-color, #bc13fe);
		filter: brightness(2.0) drop-shadow(0 0 12px rgba(0, 240, 255, 0.7));
	}
	18% {
		color: #c8a0f0;
		-webkit-text-fill-color: #c8a0f0;
		text-shadow: 0 0 5px var(--accent-color, #bc13fe);
		filter: brightness(0.65);
	}
	28% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 8px #ffffff,
			0 0 20px #ff33aa,
			0 0 36px var(--accent-color, #bc13fe);
		filter: brightness(1.5);
	}
	/* Surge builds as parts approach */
	42% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 10px #ffffff,
			0 0 22px var(--accent-color, #bc13fe),
			0 0 40px rgba(188, 19, 254, 0.6);
		filter: brightness(1.7);
	}
	/* PEAK COLLISION at 50% = 1.2s page load */
	50% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 16px #ffffff,
			-4px 0 rgba(0, 240, 255, 0.9),
			4px 0 rgba(255, 42, 141, 0.9),
			0 0 44px var(--accent-color, #bc13fe),
			0 0 70px rgba(188, 19, 254, 0.6);
		filter: brightness(2.4) drop-shadow(0 0 24px rgba(188, 19, 254, 0.95));
	}
	/* Settle into final glow as scale normalizes */
	72% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 10px #ffffff,
			0 0 22px var(--accent-color, rgba(188, 19, 254, 0.8)),
			0 0 40px rgba(188, 19, 254, 0.45);
		filter: brightness(1.15);
	}
	100% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 10px #ffffff,
			0 0 20px rgba(255, 255, 255, 0.8),
			0 0 32px var(--accent-color, rgba(188, 19, 254, 0.7)),
			0 0 48px rgba(188, 19, 254, 0.35);
		filter: brightness(1.12);
	}
}
@keyframes expand-gap { to { gap: var(--box-gap); } }
@keyframes expand-gap-mobile { to { gap: 30px; } }
@keyframes expand-content { 
	0% { max-width: 0px; opacity: 0; } 
	100% { max-width: var(--content-width); opacity: 1; } 
}
@keyframes content-fade-in-mobile { 
	from { opacity: 0; transform: translate3d(0, 15px, 0); } 
	to { opacity: 1; transform: translate3d(0, 0, 0); } 
}
@keyframes footer-slide-down { 
	from { opacity: 0; transform: translate3d(0, -15px, 0); } 
	to { opacity: 1; transform: translate3d(0, 0, 0); } 
}
@keyframes footer-slide-up-mobile { 
	from { opacity: 0; transform: translate3d(0, 20px, 0); } 
	to { opacity: 1; transform: translate3d(0, 0, 0); } 
}
@keyframes terminal-print { 
	from { opacity: 0; clip-path: inset(0 0 100% 0); } 
	to { opacity: 1; clip-path: inset(0 0 0 0); } 
}
@keyframes crt-soft-load { 
	0% { opacity: 0; filter: brightness(2.2) blur(1.5px); } 
	50% { opacity: 0.8; filter: brightness(1.5) blur(0.5px); } 
	100% { opacity: 1; filter: brightness(1) blur(0px); } 
}
@keyframes crt-flicker { 
	0% { opacity: 0.992; } 
	50% { opacity: 1; } 
	100% { opacity: 0.995; } 
}
@keyframes crt-lines-roll { 
	0% { transform: translate3d(0, -100%, 0); } 
	100% { transform: translate3d(0, 100%, 0); } 
}
@keyframes grub-window-open {
	0% {
		opacity: 0;
		transform: scale3d(0.97, 0.97, 1) translate3d(0,0,0);
		filter: blur(4px);
	}
	100% {
		opacity: 1;
		transform: scale3d(1, 1, 1) translate3d(0,0,0);
		filter: blur(0px);
	}
}
@keyframes grub-window-close {
	0% {
		opacity: 1;
		transform: scale3d(1, 1, 1) translate3d(0,0,0);
		filter: blur(0px);
	}
	100% {
		opacity: 0;
		transform: scale3d(0.97, 0.97, 1) translate3d(0,0,0);
		filter: blur(4px);
	}
}
@keyframes text-shimmer {
	0% { background-position: 0% center; }
	100% { background-position: 200% center; }
}
@keyframes flow-line {
	0% { background-position: 0% 0%; }
	100% { background-position: 0% 200%; }
}
@keyframes thanks-border-glow {
	0% {
		border-color: rgba(188, 19, 254, 0.35);
		box-shadow: 0 0 8px rgba(188, 19, 254, 0.15), inset 0 0 10px rgba(188, 19, 254, 0.05);
	}
	100% {
		border-color: rgba(243, 85, 255, 0.8);
		box-shadow: 0 0 15px rgba(243, 85, 255, 0.3), inset 0 0 15px rgba(188, 19, 254, 0.15);
	}
}
@keyframes heart-beat {
	0% {
		transform: scale(0.95);
		filter: brightness(0.9);
	}
	100% {
		transform: scale(1.15);
		filter: brightness(1.2) drop-shadow(0 0 4px rgba(255, 42, 141, 0.8));
	}
}

/* --- Contact Widget --- */
.contact-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 12px 0;
}
.contact-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	transition: transform 0.2s ease;
}
.contact-item:hover {
	transform: translate3d(5px, 0, 0);
}
.contact-icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	flex-shrink: 0;
}
.contact-icon {
	width: 24px;
	height: 24px;
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}
.contact-item:hover .contact-icon {
	transform: scale(1.15) rotate(5deg);
	filter: drop-shadow(0 0 5px var(--glow-color, var(--brand-color)));
}
.contact-platform {
	font-weight: 500;
}
.contact-arrow {
	color: #666;
	user-select: none;
}
.contact-link {
	text-decoration: underline;
}

/* --- Wide Layout Styles --- */
.grub-frame.wide-frame {
	max-width: var(--wide-content-width);
}

.setup-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 25px;
	margin-top: 10px;
}

.setup-col {
	background: rgba(15, 15, 15, 0.65);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-top: 3px solid var(--accent-color);
	border-radius: 6px;
	padding: 20px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(255, 255, 255, 0.02);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.setup-col.col-pc {
	--accent-color: #3b65a6;
	--accent-glow: rgba(59, 101, 166, 0.25);
}

.setup-col.col-portable {
	--accent-color: #24a1de;
	--accent-glow: rgba(36, 161, 222, 0.25);
}

.setup-col.col-peripherals {
	--accent-color: #ea4335;
	--accent-glow: rgba(234, 67, 53, 0.25);
}

.setup-col:hover {
	transform: translateY(-4px);
	border-color: var(--accent-color);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-glow), inset 0 0 15px rgba(255, 255, 255, 0.03);
}

.setup-section-title {
	font-size: 16px;
	font-weight: 700;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
	padding-bottom: 10px;
	margin-bottom: 15px;
	margin-top: 0 !important;
	color: #ffffff;
	display: flex;
	align-items: center;
	gap: 10px;
	text-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
	transition: border-color 0.3s;
}

.setup-col:hover .setup-section-title {
	border-bottom-color: rgba(255, 255, 255, 0.3);
}

.setup-section-title svg {
	width: 20px;
	height: 20px;
	stroke: var(--accent-color);
	filter: drop-shadow(0 0 4px var(--accent-glow));
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.setup-col:hover .setup-section-title svg {
	transform: scale(1.1) rotate(3deg);
}

.setup-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.setup-list li {
	padding: 6px 8px;
	font-size: 14px;
	line-height: 1.5;
	border-radius: 4px;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	background: rgba(255, 255, 255, 0.01);
	border-left: 2px solid transparent;
}

.setup-list li:hover {
	background: rgba(255, 255, 255, 0.04);
	border-left-color: var(--accent-color);
	padding-left: 12px;
	text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

.setup-label {
	color: #cbd3e9;
	font-weight: 500;
	margin-right: 6px;
	transition: color 0.2s;
}

.setup-list li:hover .setup-label {
	color: #ffffff;
}

.setup-value {
	color: #eff0f1;
}

.setup-comment {
	color: #666666;
	margin-left: 8px;
	font-size: 13px;
	font-style: italic;
	transition: color 0.2s;
}

.setup-list li:hover .setup-comment {
	color: #999999;
}

.setup-dashboard {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 15px;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.05);
	padding: 12px 20px;
	border-radius: 4px;
	margin-bottom: 20px;
	font-size: 13px;
	color: #888888;
}

.dash-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.dash-label {
	font-weight: bold;
	color: #666;
}

.dash-value {
	color: #cbd3e9;
	font-family: inherit;
}

.dash-value.pulse-green {
	color: #55ff55;
	text-shadow: 0 0 6px rgba(85, 255, 85, 0.6);
	animation: text-pulse 2s infinite ease-in-out;
}

@keyframes text-pulse {
	0%, 100% { opacity: 0.7; }
	50% { opacity: 1; }
}

@media (max-width: 1100px) {
	.setup-grid {
		grid-template-columns: 1fr 1fr;
		gap: 20px;
	}
	.setup-col.col-peripherals {
		grid-column: span 2;
	}
}

@media (max-width: 768px) {
	.setup-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	.setup-col.col-peripherals {
		grid-column: span 1;
	}
	.setup-col {
		padding: 15px;
	}
	.setup-dashboard {
		padding: 10px 15px;
		font-size: 12px;
	}
}

@keyframes footer-crt-ignite {
	0% {
		opacity: 0;
		filter: brightness(2.5) blur(1px);
		color: #ffffff;
		text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
	}
	20% {
		opacity: 0.8;
		filter: brightness(1.5) blur(0.5px);
		color: #ffffff;
		text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
	}
	35% {
		opacity: 0.2;
		filter: brightness(0.5);
		color: #888888;
		text-shadow: none;
	}
	55% {
		opacity: 0.95;
		filter: brightness(1.8) blur(0.5px);
		color: #ffffff;
		text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
	}
	75% {
		opacity: 0.35;
		filter: brightness(0.6);
	}
	100% {
		opacity: 1;
		filter: brightness(1) blur(0px);
		color: #aaaaaa;
		text-shadow: 0 0 2px rgba(255, 255, 255, 0.15);
	}
}

/* --- Gallery / Under Construction Styles --- */
.construction-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 20px;
	border: 2px dashed #ff9f0a;
	background: rgba(255, 159, 10, 0.03);
	box-shadow: 0 0 15px rgba(255, 159, 10, 0.15), inset 0 0 10px rgba(255, 159, 10, 0.05);
	margin: 25px 0;
	position: relative;
	text-shadow: 0 0 8px rgba(255, 159, 10, 0.5);
	white-space: normal;
	animation: construction-glow 2.5s ease-in-out infinite alternate;
}

@keyframes construction-glow {
	0% {
		border-color: rgba(255, 159, 10, 0.4);
		box-shadow: 0 0 10px rgba(255, 159, 10, 0.1), inset 0 0 5px rgba(255, 159, 10, 0.02);
		text-shadow: 0 0 5px rgba(255, 159, 10, 0.3);
	}
	100% {
		border-color: rgba(255, 159, 10, 0.95);
		box-shadow: 0 0 25px rgba(255, 159, 10, 0.35), inset 0 0 15px rgba(255, 159, 10, 0.1);
		text-shadow: 0 0 12px rgba(255, 159, 10, 0.7);
	}
}

.construction-sign {
	font-size: 13px;
	color: #f1c40f;
	margin-bottom: 20px;
	line-height: 1.2;
	font-weight: bold;
	white-space: pre;
	filter: drop-shadow(0 0 3px rgba(241, 196, 15, 0.6));
}

.construction-title {
	font-size: 18px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.construction-desc {
	font-size: 15px;
	color: #cbd3e9;
	text-align: center;
	line-height: 1.5;
	margin-bottom: 5px;
}

.marquee-tape {
	width: 100%;
	overflow: hidden;
	white-space: nowrap;
	background: #f1c40f;
	color: #000000;
	font-weight: bold;
	font-size: 11px;
	padding: 4px 0;
	border-top: 1px solid #f1c40f;
	border-bottom: 1px solid #f1c40f;
	box-shadow: 0 0 8px rgba(241, 196, 15, 0.3);
	margin: 15px 0;
	user-select: none;
}

/* --- Konsole Easter Egg Terminal --- */
.version-click {
	display: inline-block;
}

/* --- KDE Plasma Breeze Konsole Theme --- */
#cmd-window.kde-konsole {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 680px;
	max-width: 95vw;
	height: 440px;
	background: #eff0f1;
	border: 1px solid #bcc2c7;
	border-radius: 6px;
	box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), 0 0 2px rgba(0, 0, 0, 0.4);
	display: none;
	flex-direction: column;
	font-family: 'JetBrains Mono', 'Consolas', monospace;
	color: #232629;
	z-index: 10000;
	box-sizing: border-box;
	overflow: hidden;
}

/* KDE Titlebar */
.kde-titlebar {
	background: linear-gradient(180deg, #f7f7f7 0%, #e3e5e7 100%);
	border-bottom: 1px solid #c8ccd0;
	padding: 6px 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	user-select: none;
	cursor: move;
}

.kde-title-left {
	display: flex;
	align-items: center;
	gap: 8px;
}

.kde-app-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	background: #31363b;
	color: #eff0f1;
	font-size: 10px;
	font-weight: 700;
	border-radius: 2px;
}

.kde-title-text {
	font-size: 12px;
	color: #232629;
	font-weight: 500;
}

.kde-controls {
	display: flex;
	gap: 4px;
}

.kde-control-btn {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #dcdfe1;
	border: 1px solid #b8bcbf;
	color: #4d5154;
	font-size: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.kde-control-btn:hover {
	background: #3daee9;
	border-color: #2980b9;
	color: #ffffff;
}

.kde-control-btn.kde-close:hover {
	background: #e74c3c;
	border-color: #c0392b;
	color: #ffffff;
}

/* KDE Menu Bar */
.kde-menubar {
	display: flex;
	background: #eff0f1;
	border-bottom: 1px solid #d0d4d8;
	padding: 2px 8px;
	font-size: 12px;
	color: #232629;
	user-select: none;
}

.kde-menu-item {
	padding: 3px 8px;
	cursor: pointer;
	border-radius: 3px;
	transition: background 0.1s;
}

.kde-menu-item:hover {
	background: rgba(61, 174, 233, 0.18);
	color: #2980b9;
}

/* KDE Toolbar */
.kde-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f5f6f7;
	border-bottom: 1px solid #cfd3d7;
	padding: 4px 10px;
	font-size: 11.5px;
	user-select: none;
}

.kde-tool-group {
	display: flex;
	gap: 4px;
}

.kde-tool-btn {
	background: #ffffff;
	border: 1px solid #c2c7cc;
	border-radius: 3px;
	padding: 3px 9px;
	font-size: 11px;
	font-family: inherit;
	color: #31363b;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: background 0.15s, border-color 0.15s;
}

.kde-tool-btn:hover {
	background: #3daee9;
	border-color: #2980b9;
	color: #ffffff;
}

.kde-tool-divider {
	width: 1px;
	height: 16px;
	background: #d0d4d8;
}

/* KDE Terminal Viewport */
.kde-terminal-body {
	background: #232629 !important;
	color: #eff0f1 !important;
	padding: 12px !important;
	flex-grow: 1;
	overflow-y: auto;
	font-size: 13px;
	line-height: 1.45;
	display: flex;
	flex-direction: column;
}

.kde-terminal-body::before {
	display: none !important;
}

/* KDE Tab Bar at Bottom */
.kde-tabbar {
	display: flex;
	background: #e3e5e7;
	border-top: 1px solid #c8ccd0;
	padding: 3px 6px 0;
	gap: 4px;
	user-select: none;
}

.kde-tab {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	background: #d8dcde;
	border: 1px solid #c0c4c8;
	border-bottom: none;
	border-radius: 4px 4px 0 0;
	font-size: 11px;
	color: #4d5154;
	cursor: pointer;
}

.kde-tab.active {
	background: #232629;
	color: #eff0f1;
	border-color: #232629;
	font-weight: 600;
}

.kde-tab-close {
	font-size: 12px;
	opacity: 0.6;
	cursor: pointer;
}

.kde-tab-close:hover {
	opacity: 1;
	color: #e74c3c;
}

.cmd-resize-handle {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 14px;
	height: 14px;
	cursor: se-resize;
	background: linear-gradient(135deg, transparent 45%, #3daee9 55%, transparent 60%, #3daee9 70%, transparent 75%, #3daee9 85%);
	opacity: 0.6;
	z-index: 1010;
	transition: opacity 0.2s;
}

.cmd-resize-handle:hover {
	opacity: 1;
}

#cmd-body {
	position: relative;
	flex-grow: 1;
	padding: 12px;
	overflow-y: auto;
	font-size: 13px;
	line-height: 1.45;
	display: flex;
	flex-direction: column;
	cursor: text;
	background: #0d0f11;
}

#cmd-body::before {
	content: " ";
	display: block;
	position: absolute;
	top: 0; left: 0; bottom: 0; right: 0;
	background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
	background-size: 100% 3px, 3px 100%;
	z-index: 1001;
	pointer-events: none;
	opacity: 0.75;
}

#cmd-history {
	white-space: pre-wrap;
	word-break: break-all;
}

#cmd-line {
	display: flex;
	align-items: center;
}

#cmd-prompt {
	margin-right: 8px;
	white-space: nowrap;
}

#cmd-input {
	background: transparent;
	border: none;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	flex-grow: 1;
	outline: none;
	caret-color: currentColor;
}

@keyframes rainbow-text {
	0% { color: #ff0055; }
	16.7% { color: #ff9900; }
	33.3% { color: #33ff00; }
	50% { color: #00ffff; }
	66.7% { color: #0055ff; }
	83.3% { color: #cc00ff; }
	100% { color: #ff0055; }
}

.rainbow-logo {
	animation: rainbow-text 8s linear infinite !important;
}

/* Background canvas rain layers */
#bg-matrix-canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 1;
	opacity: 0.12;
	pointer-events: none;
}

.box {
	position: relative;
	z-index: 2;
}

.logo-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}

.email-link {
	color: #ffbaba !important;
}
.email-link:hover {
	color: yellow !important;
	text-shadow: 0 0 8px rgba(255, 255, 0, 0.6) !important;
}

/* --- Kernel Panic Easter Egg --- */
body.kernel-panic-blackout {
	background: #000000 !important;
	overflow: hidden !important;
}

body.kernel-panic-blackout .crt-lines,
body.kernel-panic-blackout .terminal-container,
body.kernel-panic-blackout #cmd-window,
body.kernel-panic-blackout #bg-matrix-canvas {
	display: none !important;
}

body.kernel-panic-active {
	background: #000000 !important;
	overflow: hidden !important;
}

body.kernel-panic-active .crt-lines,
body.kernel-panic-active #cmd-window,
body.kernel-panic-active #bg-matrix-canvas {
	display: none !important;
}

body.kernel-panic-active .content-wrapper {
	display: none !important;
}

body.kernel-panic-active .desktop-logo,
body.kernel-panic-active .mobile-logo {
	cursor: pointer !important;
	user-select: none !important;
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
}

body.kernel-panic-active .logo-wrapper {
	animation: logo-panic-ignition 0.6s ease-out, logo-panic-blink 1.2s infinite 0.6s !important;
	user-select: none !important;
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
}

body.kernel-panic-active .part-a {
	animation: none !important;
	opacity: 1 !important;
	position: relative !important;
	transform: none !important;
}

body.kernel-panic-active .part-v {
	animation: none !important;
	opacity: 1 !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	transform: none !important;
}

@keyframes logo-pulse {
	0% { opacity: 0; }
	50% { opacity: 1; }
	100% { opacity: 0; }
}

.panic-top-left-text {
	position: fixed;
	top: 20px;
	left: 20px;
	font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
	font-size: 13px;
	line-height: 1.4;
	color: #eff0f1;
	white-space: pre-wrap;
	word-break: break-all;
	z-index: 10000;
	pointer-events: none;
	opacity: 1;
	transform: translateY(0);
	transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.panic-top-left-text.disappear {
	transform: translateY(150px);
	opacity: 0;
}

/* --- Gallery Grid & Upload Zone --- */
.grub-frame.gallery-frame {
	max-width: none !important;
	width: calc(100vw - 60px);
	height: calc(100vh - 60px);
	display: flex;
	flex-direction: column;
	padding: 25px;
	margin: auto;
	box-shadow: 0 0 30px rgba(188, 19, 254, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.grub-frame.gallery-frame .grub-hint {
	text-align: center;
	margin: 0;
	padding: 10px 0 0 0;
}

.gallery-scroll-container {
	flex-grow: 1;
	overflow-y: auto;
	margin-bottom: 15px;
	padding-right: 8px;
	box-sizing: border-box;
}

/* Custom scrollbar for GRUB gallery scroll container */
.gallery-scroll-container::-webkit-scrollbar {
	width: 10px;
}
.gallery-scroll-container::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.5);
	border-left: 1px solid rgba(255, 255, 255, 0.15);
}
.gallery-scroll-container::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border: 2px solid rgba(0, 0, 0, 0.5);
	transition: background-color 0.2s;
}
.gallery-scroll-container::-webkit-scrollbar-thumb:hover {
	background: #bc13fe;
	box-shadow: 0 0 10px rgba(188, 19, 254, 0.5);
}

.gallery-upload-zone {
	display: none;
	border: 1px dashed rgba(255, 255, 255, 0.4);
	background: rgba(255, 255, 255, 0.02);
	padding: 20px;
	text-align: center;
	cursor: pointer;
	margin-bottom: 25px;
	transition: all 0.2s ease;
	user-select: none;
}

.gallery-upload-zone:hover, .gallery-upload-zone.dragover {
	border-color: #bc13fe;
	background: rgba(188, 19, 254, 0.05);
	box-shadow: 0 0 10px rgba(188, 19, 254, 0.2);
}

.upload-icon {
	width: 32px;
	height: 32px;
	color: #bc13fe;
	margin-bottom: 8px;
	filter: drop-shadow(0 0 4px rgba(188, 19, 254, 0.4));
	transition: transform 0.2s ease;
}

.gallery-upload-zone:hover .upload-icon {
	transform: translateY(-2px);
}

.upload-text {
	font-size: 14px;
	font-weight: 500;
	color: #ffffff;
	margin-bottom: 4px;
}

.upload-hint {
	font-size: 11px;
	color: #666666;
}

/* Upload zone terminal console logs */
.upload-zone-log {
	width: 100%;
	height: 130px;
	font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
	font-size: 13px;
	color: #eff0f1;
	text-align: left;
	overflow-y: auto;
	background: #0b0c0d;
	border: 1px solid rgba(255, 255, 255, 0.15);
	padding: 12px;
	box-sizing: border-box;
	line-height: 1.5;
}
.log-line {
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.log-prefix {
	font-weight: bold;
}
.log-info .log-prefix { color: #bc13fe; }
.log-loading .log-prefix { color: #ffff55; }
.log-success .log-prefix { color: #55ff55; }
.log-error .log-prefix { color: #ff5555; }
.log-message {
	color: #cbd3e9;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 25px;
	margin-top: 10px;
}

.gallery-empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	color: #666666;
	font-size: 14px;
	border: 1px dashed rgba(255, 255, 255, 0.15);
	background: rgba(255, 255, 255, 0.01);
}

/* Mini window frames styling for photos */
.gallery-item {
	background: rgba(10, 10, 10, 0.95);
	border: 1px solid rgba(255, 255, 255, 0.4);
	display: flex;
	flex-direction: column;
	cursor: pointer;
	transition: all 0.2s ease-out;
}

.gallery-item:hover {
	transform: scale(1.02);
	border-color: #bc13fe;
	box-shadow: 0 0 15px rgba(188, 19, 254, 0.4);
}

.gallery-item-header {
	background: rgba(255, 255, 255, 0.05);
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	padding: 6px 12px;
	display: flex;
	align-items: center;
	overflow: hidden;
}

.gallery-item:hover .gallery-item-header {
	background: rgba(188, 19, 254, 0.1);
	border-bottom-color: rgba(188, 19, 254, 0.3);
}

.gallery-filename {
	font-size: 11px;
	font-weight: 500;
	color: #aaaaaa;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	width: calc(100% - 40px);
}

.gallery-item:hover .gallery-filename {
	color: #ffffff;
}

.gallery-window-buttons {
	display: flex;
	gap: 5px;
	margin-left: auto;
	color: #666666;
	user-select: none;
}

.win-btn {
	font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
	font-size: 11px;
	color: #666666;
	transition: color 0.15s;
}

.gallery-item:hover .win-btn {
	color: #aaaaaa;
}

.win-btn:last-of-type:hover {
	color: #ff5555 !important;
}

.gallery-item-body {
	padding: 10px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.gallery-img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: #000000;
	transition: filter 0.2s ease-in-out;
}

.gallery-item:hover .gallery-img {
	filter: brightness(1.05) contrast(1.05);
}

.gallery-caption {
	margin-top: 10px;
	font-size: 13px;
	color: #cbd3e9;
	line-height: 1.4;
	text-align: center;
	min-height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Blinking block terminal cursor */
.gallery-caption span::after,
.lightbox-caption span::after {
	content: ' ';
	display: inline-block;
	width: 8px;
	height: 13px;
	background: #bc13fe;
	margin-left: 5px;
	vertical-align: middle;
	animation: terminal-cursor 1.0s step-end infinite;
}

.lightbox-caption span::after {
	width: 10px;
	height: 16px;
	background: #ffffff;
	animation-duration: 0.8s;
}

@keyframes terminal-cursor {
	0%, 49% { opacity: 0; }
	50%, 100% { opacity: 1; }
}

/* Lightbox Modal (Fullscreen Window) */
.gallery-lightbox {
	position: fixed;
	top: 0; left: 0;
	width: 100vw; height: 100vh;
	background: rgba(0, 0, 0, 0.96);
	z-index: 2000;
	display: none;
	flex-direction: column;
	box-sizing: border-box;
	animation: crt-soft-load 0.25s ease-out;
}

.lightbox-top-bar {
	background: #1b1e20;
	border-bottom: 1px solid #4d545c;
	padding: 8px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #eff0f1;
	user-select: none;
	flex-shrink: 0;
}

.lightbox-filename {
	font-size: 13px;
	font-weight: 500;
	font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
}

.lightbox-controls {
	display: flex;
	align-items: center;
	gap: 15px;
}

.control-btn {
	font-size: 12px;
	color: #a0a0a0;
	cursor: pointer;
	padding: 2px 6px;
	border: 1px solid transparent;
	font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
}

.control-btn:hover {
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.05);
}

.lightbox-close {
	color: #a0a0a0;
	font-size: 24px;
	font-weight: bold;
	cursor: pointer;
	line-height: 1;
}

.lightbox-close:hover {
	color: #ff5555;
}

.lightbox-image-wrapper {
	flex-grow: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
	background: #0b0c0d;
}

.lightbox-content {
	max-width: 95%;
	max-height: 95%;
	object-fit: contain;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 10px 40px rgba(0,0,0,0.8);
	transition: transform 0.05s ease-out;
	will-change: transform;
}

.lightbox-caption {
	background: #1b1e20;
	border-top: 1px solid #4d545c;
	padding: 15px 20px;
	color: #eff0f1;
	text-align: center;
	font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
	font-size: 14px;
	line-height: 1.5;
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.grub-frame.gallery-frame {
		width: calc(100vw - 30px);
		height: calc(100vh - 30px);
		padding: 15px;
	}
	.gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
		gap: 15px;
	}
	.gallery-img {
		height: 120px;
	}
	.lightbox-controls {
		display: none;
	}
}

/* --- Running Dotted Borders for Subpages --- */
/* Removed: running-border was causing two redundant animated lines on mobile */
.running-border {
	display: none !important;
}

@media (max-width: 1100px) {
	/* Responsive caution tapes layout */
	.diagonal-tape {
		font-size: 10px !important;
		padding: 4px 0 !important;
		border-top-width: 1px !important;
		border-bottom-width: 1px !important;
		box-shadow: 0 0 10px rgba(241, 196, 15, 0.4) !important;
	}
	
	.diagonal-tape.tape-1 {
		top: 15% !important;
		transform: rotate(-6deg) !important;
	}
	
	.diagonal-tape.tape-2 {
		bottom: 15% !important;
		transform: rotate(6deg) !important;
	}
}


/* --- Full-Screen Diagonal Breakout Caution Tapes --- */
.diagonal-tape {
	position: fixed;
	z-index: 1005;
	width: 150vw;
	background: #f1c40f;
	color: #000000;
	font-weight: bold;
	font-size: 14px;
	padding: 8px 0;
	border-top: 2px solid #000000;
	border-bottom: 2px solid #000000;
	box-shadow: 0 0 20px rgba(241, 196, 15, 0.6);
	user-select: none;
	pointer-events: none;
	overflow: hidden;
	white-space: nowrap;
	display: none;
}

/* --- Flexbox Gapless Marquee Track --- */
.marquee-track {
	display: flex;
	width: max-content;
	animation: marquee-infinite 15s linear infinite;
}

.marquee-group {
	display: flex;
	flex-shrink: 0;
	align-items: center;
}

.marquee-group span {
	display: inline-block;
	white-space: nowrap;
	padding: 0 10px;
}

@keyframes marquee-infinite {
	from {
		transform: translate3d(0, 0, 0);
	}
	to {
		transform: translate3d(-50%, 0, 0);
	}
}

.diagonal-tape .marquee-track {
	animation-duration: 25s; /* Slow diagonal crawl */
}

.marquee-tape .marquee-track {
	animation-duration: 15s; /* Standard crawl */
}

body.barrier-broken .diagonal-tape {
	display: block;
}

.diagonal-tape.tape-1 {
	top: 35%;
	left: -25vw;
	transform: rotate(-15deg);
	transform-origin: center;
	animation: tape-enter-1 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.diagonal-tape.tape-2 {
	bottom: 35%;
	left: -25vw;
	transform: rotate(20deg);
	transform-origin: center;
	animation: tape-enter-2 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes tape-enter-1 {
	from { 
		clip-path: inset(0 100% 0 0); 
		opacity: 0; 
	}
	to { 
		clip-path: inset(0 0 0 0); 
		opacity: 1; 
	}
}

@keyframes tape-enter-2 {
	from { 
		clip-path: inset(0 0 0 100%); 
		opacity: 0; 
	}
	to { 
		clip-path: inset(0 0 0 0); 
		opacity: 1; 
	}
}

body.barrier-closing .diagonal-tape.tape-1 {
	animation: tape-exit-1 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

body.barrier-closing .diagonal-tape.tape-2 {
	animation: tape-exit-2 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes tape-exit-1 {
	from { 
		clip-path: inset(0 0 0 0); 
		opacity: 1; 
	}
	to { 
		clip-path: inset(0 100% 0 0); 
		opacity: 0; 
	}
}

@keyframes tape-exit-2 {
	from { 
		clip-path: inset(0 0 0 0); 
		opacity: 1; 
	}
	to { 
		clip-path: inset(0 0 0 100%); 
		opacity: 0; 
	}
}

/* Glitch dissolve animation for inner tape escaping reality */
.marquee-tape.tape-glitch-out {
	animation: tape-glitch-dissolve 0.55s ease-out forwards !important;
	pointer-events: none;
}

@keyframes tape-glitch-dissolve {
	0%   { opacity: 1; transform: translateX(0) scaleY(1); filter: brightness(1); }
	10%  { opacity: 1; transform: translateX(-6px) scaleY(1.05); filter: brightness(2.5) hue-rotate(30deg); }
	20%  { opacity: 0.8; transform: translateX(8px) scaleY(0.85); filter: brightness(4); clip-path: inset(10% 0 10% 0); }
	30%  { opacity: 0.9; transform: translateX(-10px) scaleY(1.1); filter: brightness(3); clip-path: inset(0 0 0 0); }
	45%  { opacity: 0.5; transform: translateX(5px) scaleY(0.4); filter: brightness(6) saturate(3); clip-path: inset(30% 0 30% 0); }
	60%  { opacity: 0.3; transform: translateX(-3px) scaleY(0.1); filter: brightness(8); clip-path: inset(45% 0 45% 0); }
	80%  { opacity: 0.1; transform: translateX(0) scaleY(0.02) scaleX(1.2); filter: brightness(12); }
	100% { opacity: 0; transform: scaleY(0) scaleX(1.3); filter: brightness(20); }
}


/* --- Kernel Panic Animation Overhauls --- */
.panic-top-left-text.disappear {
	animation: text-glitch-out 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes text-glitch-out {
	0% { opacity: 1; transform: translate3d(0, 0, 0) scaleY(1); filter: brightness(1); }
	20% { opacity: 0.8; transform: translate3d(-4px, 2px, 0) scaleY(0.8); filter: brightness(2); }
	40% { opacity: 0.4; transform: translate3d(4px, -2px, 0) scaleY(0.4); filter: brightness(4); }
	60% { opacity: 0.6; transform: translate3d(-8px, 1px, 0) scaleY(0.1) scaleX(1.1); }
	80% { opacity: 0.2; transform: translate3d(0, 0, 0) scaleY(0.01) scaleX(1.3); }
	100% { opacity: 0; transform: translate3d(0, 0, 0) scaleY(0) scaleX(1.5); filter: brightness(10); }
}

@keyframes logo-panic-ignition {
	0% { opacity: 0; transform: scale3d(0.9, 0.9, 1); filter: brightness(4) blur(2px); }
	15% { opacity: 0.8; }
	30% { opacity: 0.2; }
	45% { opacity: 0.9; }
	60% { opacity: 0.3; }
	75% { opacity: 1; filter: brightness(2); }
	90% { opacity: 0.7; }
	100% { opacity: 1; transform: scale3d(1, 1, 1); filter: brightness(1); }
}

@keyframes logo-panic-blink {
	0%, 49% { opacity: 1; filter: drop-shadow(0 0 12px currentColor); }
	50%, 99% { opacity: 0.08; filter: none; }
	100% { opacity: 1; filter: drop-shadow(0 0 12px currentColor); }
}


/* --- Mobile Keyboard Overlay Adaptations --- */
@media (max-width: 1100px) {
	#cmd-window {
		width: 100vw !important;
		max-width: 100vw !important;
		height: 50vh !important;
		top: 0 !important;
		left: 0 !important;
		transform: none !important;
		border-radius: 0 !important;
		border-left: none !important;
		border-right: none !important;
		border-top: none !important;
	}
}

/* --- Retro Specifications Table --- */
.setup-tables-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); /* Auto-fit columns to wrap naturally when there isn't enough space */
	gap: 24px;
	align-items: start;
	width: 100%;
	white-space: normal; /* Override pre-wrap from .grub-text to prevent HTML whitespaces from rendering as blank lines */
}

/* Themes with custom CSS variables */
.retro-table.theme-pc {
	--theme-color: #56b4d3;
	--theme-color-rgb: 86, 180, 211;
	--theme-bg: rgba(10, 20, 25, 0.75);
}

.retro-table.theme-portable {
	--theme-color: #5af5a2;
	--theme-color-rgb: 90, 245, 162;
	--theme-bg: rgba(10, 25, 20, 0.75);
}

.retro-table.theme-peripherals {
	--theme-color: #cc8ef5;
	--theme-color-rgb: 204, 142, 245;
	--theme-bg: rgba(20, 10, 25, 0.75);
}

.retro-table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--font-mono);
	font-size: 12px; /* Reduced from 13px to ensure values and comments fit on wider desktop layouts */
	margin-bottom: 0;
	background: var(--theme-bg);
	border: 1px solid rgba(var(--theme-color-rgb), 0.15);
	border-top: 3px solid var(--theme-color);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(var(--theme-color-rgb), 0.08);
	border-radius: 4px;
	overflow: hidden;
	transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15), box-shadow 0.3s ease, border-color 0.3s ease;
}

.retro-table:hover {
	transform: translateY(-6px) scale(1.015);
	border-color: rgba(var(--theme-color-rgb), 0.6);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(var(--theme-color-rgb), 0.25);
}

.retro-table th {
	background: var(--theme-color);
	color: #0d0d0d !important;
	border-bottom: 1px solid var(--theme-color);
	text-align: left;
	padding: 10px 12px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	display: flex !important;
	align-items: center; /* Vertically center the custom SVG icon and the text */
}

/* Custom SVG setup icon style */
.setup-icon {
	width: 16px;
	height: 16px;
	margin-right: 8px;
	vertical-align: middle;
	display: inline-block;
	flex-shrink: 0;
}

.retro-table tbody {
	display: block;
	padding: 6px 4px;
}

.retro-table tr {
	display: flex;
	flex-wrap: wrap; /* Allow items to wrap cleanly when space is tight */
	align-items: baseline;
	padding: 8px 12px;
	border-bottom: 1px dashed rgba(var(--theme-color-rgb), 0.1);
	transition: background-color 0.2s ease;
}

.retro-table tr:hover {
	background-color: rgba(var(--theme-color-rgb), 0.03);
}

.retro-table tr:last-child {
	border-bottom: none;
}

.retro-table td {
	padding: 0;
	border: none;
	background: none;
}

/* Dotted leader line between label and value */
.retro-table tr::after {
	content: "";
	flex-grow: 1;
	order: 2;
	border-bottom: 1px dotted rgba(var(--theme-color-rgb), 0.2);
	margin: 0 12px;
	min-width: 10px;
}

.spec-label {
	order: 1;
	font-weight: 700;
	color: var(--theme-color);
	text-shadow: 0 0 8px rgba(var(--theme-color-rgb), 0.4);
	font-size: 11.5px;
	flex-shrink: 0;
}

.spec-value {
	order: 3;
	color: #eff0f1;
	font-weight: 500;
	flex-shrink: 1; /* Allow to shrink to prevent horizontal overflow */
	white-space: normal; /* Allow wrapping to prevent any layout breakage with long text additions */
	word-break: break-word;
	text-align: right;
}

.spec-comment {
	order: 4;
	color: rgba(255, 255, 255, 0.35);
	font-style: italic;
	font-size: 10.5px;
	margin-left: auto; /* Push to the right when wrapped */
	text-align: right;
	flex-shrink: 1; /* Allow comment to shrink */
	white-space: normal; /* Allow comment text to wrap if it gets too long */
	word-break: break-word;
	max-width: 100%;
}

@media (max-width: 1100px) {
	.setup-tables-container {
		grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
		gap: 20px;
	}
	.retro-table {
		margin-bottom: 0; /* Removed 20px margin-bottom to avoid duplicate gap spacing with grid-gap */
		font-size: 11.5px;
	}
	.retro-table:hover {
		transform: none;
	}
}

@media (max-width: 480px) {
	.retro-table tr {
		flex-direction: column;
		align-items: flex-start;
		padding: 8px 10px;
		gap: 3px;
	}
	.retro-table tr::after {
		display: none;
	}
	.spec-label {
		font-size: 11px;
	}
	.spec-value {
		font-size: 11.5px;
		order: 2;
		white-space: normal; /* Allow wrapping on very small screens */
	}
	.spec-comment {
		font-size: 10px;
		margin-left: 0;
		margin-top: 1px;
		order: 3;
		text-align: left;
	}
}

/* Custom Spacing Overrides for Wide Content Frame (Setup, About Me) to reduce vertical gaps */
.grub-frame.wide-frame .grub-header {
	margin-bottom: 12px !important;
	padding-bottom: 8px !important;
}

.grub-frame.wide-frame .grub-text {
	margin-bottom: 8px !important;
}

/* .grub-frame.wide-frame .grub-hint {
	padding-top: 8px !important;
} */

@media (max-width: 1100px) {
	.grub-frame.wide-frame .running-border {
		margin: 8px 0 !important;
	}
	.grub-frame.wide-frame .grub-header {
		margin-bottom: 8px !important;
		padding-bottom: 6px !important;
	}
}

/* --- Buttery-Smooth Window Transitions --- */
body.crt-collapsing .grub-frame,
body.crt-collapsing .setup-mainframe,
body.crt-collapsing .post-screen,
.setup-mainframe.grub-window-close {
	animation: grub-window-close 0.22s cubic-bezier(0.32, 0, 0.67, 0) both !important;
}

/* Main page exit — freeze gap so logo stays left, no jump to center */
@media (min-width: 1101px) {
	body.crt-collapsing.main-page .box {
		animation: main-page-exit 0.22s cubic-bezier(0.32, 0, 0.67, 0) both !important;
	}
}

@keyframes main-page-exit {
	from {
		opacity: 1;
		gap: var(--box-gap);
		filter: blur(0px);
	}
	to {
		opacity: 0;
		gap: var(--box-gap);
		filter: blur(2px);
	}
}

@keyframes main-page-exit-mobile {
	from {
		opacity: 1;
		gap: 30px;
		filter: blur(0px);
	}
	to {
		opacity: 0;
		gap: 30px;
		filter: blur(2px);
	}
}

/* Inner pages only: play quick fade-in on arrival.
   Main page is EXCLUDED — it has its own multi-step logo animation. */
body.crt-igniting:not(.main-page) .grub-frame,
body.crt-igniting:not(.main-page) .setup-mainframe,
body.crt-igniting:not(.main-page) .post-screen {
	animation: grub-window-open 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* --- Fullscreen Setup Diagnostics Mainframe --- */
.page-setup body {
	margin: 0;
	padding: 0;
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #0a0a0a;
}

.page-setup .setup-mainframe {
	display: flex;
	flex-direction: column;
	width: 100vw;
	height: 100vh;
	box-sizing: border-box;
	padding: 16px;
	gap: 16px;
	z-index: 10;
	position: relative;
}

.sys-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #1a1d22;
	border: 2px solid #2a2d32;
	border-radius: 4px;
	padding: 10px 18px;
	font-family: var(--font-mono);
	font-size: 13px;
	color: #cbd3e9;
	box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05), 0 4px 12px rgba(0,0,0,0.5);
}

.sys-topbar-left {
	display: flex;
	gap: 20px;
	align-items: center;
}

.sys-hostname {
	color: var(--accent-color, #bc13fe);
	font-weight: 700;
	text-shadow: 0 0 6px var(--glow-color, rgba(188, 19, 254, 0.3));
}

.sys-status {
	display: flex;
	align-items: center;
	gap: 8px;
}

.status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #55ff55;
	box-shadow: 0 0 8px #55ff55;
	animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}

.sys-date {
	font-weight: 500;
}

.sys-grid {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 16px;
	flex-grow: 1;
	height: calc(100% - 70px);
}

.sys-sidebar {
	background: #15181c;
	border: 2px solid #2a2d32;
	border-radius: 4px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.sidebar-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: rgba(255, 255, 255, 0.35);
	margin-bottom: 8px;
	font-weight: 700;
}

.sys-tab-nav {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sys-tab-btn {
	font-family: var(--font-mono);
	font-size: 13px;
	color: #eff0f1;
	background: #1a1d22;
	border: 2px solid #2a2d32;
	padding: 12px 14px;
	text-align: left;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

.sys-tab-btn:hover {
	border-color: var(--accent-color, #bc13fe);
	color: var(--accent-color, #bc13fe);
	box-shadow: 0 0 10px var(--glow-color, rgba(188, 19, 254, 0.15));
}

.sys-tab-btn.active {
	background: var(--accent-color, #bc13fe);
	color: #0d0f11 !important;
	border-color: var(--accent-color, #bc13fe);
	font-weight: 700;
	text-shadow: none !important;
}

.sys-sidebar-footer {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sys-back-btn {
	font-family: var(--font-mono);
	font-size: 12px;
	color: rgba(255,255,255,0.6);
	text-decoration: none;
	padding: 10px;
	border: 1px dashed rgba(255,255,255,0.2);
	border-radius: 4px;
	text-align: center;
	transition: all 0.2s ease;
}

.sys-back-btn:hover {
	border-color: #ff5555;
	color: #ff5555;
	background: rgba(255, 85, 85, 0.05);
}

.sys-main-panel {
	background: #15181c;
	border: 2px solid #2a2d32;
	border-radius: 4px;
	padding: 20px;
	position: relative;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 12px rgba(0,0,0,0.5);
	overflow-y: auto;
}

.sys-tab-content {
	display: none;
	animation: spec-fade-in 0.25s ease-out forwards;
	height: 100%;
}

.sys-tab-content.active {
	display: block;
}

@keyframes spec-fade-in {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

.spec-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
	gap: 16px;
	align-content: start;
}

.spec-card {
	background: #1a1d22;
	border: 1px solid #2a2d32;
	border-radius: 4px;
	padding: 14px 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.spec-card:hover {
	border-color: var(--accent-color, #bc13fe);
	box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 12px var(--glow-color, rgba(188, 19, 254, 0.08));
}

.spec-card-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: var(--accent-color, #bc13fe);
	font-weight: 700;
	text-shadow: 0 0 4px var(--glow-color, rgba(188, 19, 254, 0.2));
	border-bottom: 1px solid rgba(255,255,255,0.06);
	padding-bottom: 6px;
	margin-bottom: 4px;
}

.spec-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 13px;
	line-height: 1.5;
}

.spec-label {
	color: rgba(255,255,255,0.55);
	font-weight: 500;
}

.spec-value {
	color: #eff0f1;
	font-weight: bold;
	text-align: right;
}

.spec-comment {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.3);
	font-style: italic;
	margin-top: -2px;
	text-align: right;
}

/* Responsive Styles for Fullscreen Setup Page */
@media (max-width: 900px) {
	.page-setup body {
		overflow-y: auto;
		height: auto;
	}
	
	.page-setup .setup-mainframe {
		height: auto;
		min-height: 100vh;
		padding: 10px;
		gap: 12px;
	}
	
	.sys-grid {
		grid-template-columns: 1fr;
		height: auto;
	}
	
	.sys-sidebar {
		padding: 12px;
		gap: 10px;
	}
	
	.sys-tab-nav {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px;
		width: 100%;
	}
	
	.sys-tab-btn {
		flex: 1 1 calc(33.33% - 8px);
		min-width: 100px;
		padding: 10px 8px;
		font-size: 12px;
		justify-content: center;
	}
	
	.sys-sidebar-footer {
		margin-top: 10px;
		width: 100%;
	}
	
	.sys-main-panel {
		padding: 14px;
		height: auto;
		overflow-y: visible;
	}
	
	.spec-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}

@media (max-width: 480px) {
	.sys-topbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
		padding: 8px 12px;
	}
	
	.sys-topbar-left {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		width: 100%;
	}
	
	.sys-tab-nav {
		flex-direction: column;
	}
	
	.sys-tab-btn {
		flex: 1 1 100%;
	}
	
	.spec-card {
		padding: 10px 12px;
	}
	
	.spec-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}
	
	.spec-value {
		text-align: left;
	}
	
	.spec-comment {
		text-align: left;
	}
}

/* ===== BACK BUTTON: MOBILE TOP / DESKTOP BOTTOM ===== */

/* Desktop: hide the mobile top button */
.mobile-top-back {
	display: none;
}

/* Mobile: show top button, hide bottom hint */
@media (max-width: 900px) {
	.grub-header {
		margin-bottom: 8px !important;
	}

	.mobile-top-back {
		display: flex;
		justify-content: center;
		margin-top: 14px;
		margin-bottom: 24px;
		/* Same animation as .grub-header — syncs with page appearance */
		opacity: 0;
		animation: footer-slide-down 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
	}

	/* Style it exactly like the original .grub-back link but with clean borders */
	.mobile-top-back .grub-back {
		color: #ffff00;
		text-shadow: 0 0 4px rgba(255, 255, 0, 0.4);
		text-decoration: none;
		font-size: 13px;
		border: 1px solid rgba(255, 255, 255, 0.15);
		background: rgba(255, 255, 255, 0.02);
		padding: 6px 14px;
		border-radius: 4px;
		transition: all 0.2s ease;
		display: inline-flex;
		align-items: center;
	}

	.mobile-top-back .grub-back:hover {
		color: #ffff00;
		border-color: #ffff00;
		background: rgba(255, 255, 0, 0.05);
		box-shadow: 0 0 10px rgba(255, 255, 0, 0.2);
		text-shadow: 0 0 6px rgba(255, 255, 0, 0.6);
	}

	/* Hide the bottom buttons on mobile */
	.grub-hint,
	.neo-footer {
		display: none !important;
	}
}

/* ─── Part A: slide from LEFT at scale(1.3) ─── */
@keyframes v1-slide-left {
	0% {
		transform: translate3d(-170px, 0, 0) scale(1.3);
		opacity: 0;
	}
	/* Pre-flash 1 */
	9%  { opacity: 0.05; }
	12% { opacity: 0.75; }
	16% { opacity: 0.0;  }
	/* Pre-flash 2 */
	21% { opacity: 0.85; }
	25% { opacity: 0.0;  }
	30% { opacity: 1.0;  }

	/* Approaching zoomed */
	47% {
		transform: translate3d(2px, 0, 0) scale(1.3);
		opacity: 1;
	}
	/* ── COLLISION at 50% = 1.2s ── */
	50% {
		transform: translate3d(-2px, 0, 0) scale(1.3);
		opacity: 1;
		animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
	}
	52% { transform: translate3d(1.5px, 0, 0) scale(1.29); }
	54% { transform: translate3d(0, 0, 0) scale(1.28); }

	/* Scale-down — ends at 72% = 1.6s */
	72% {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 1;
	}
	100% {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 1;
	}
}

/* ─── Part V: slide from RIGHT at scale(1.3) ─── */
@keyframes v1-slide-right {
	0% {
		transform: translate3d(170px, 0, 0) scale(1.3);
		opacity: 0;
	}
	9%  { opacity: 0.05; }
	12% { opacity: 0.75; }
	16% { opacity: 0.0;  }
	21% { opacity: 0.85; }
	25% { opacity: 0.0;  }
	30% { opacity: 1.0;  }

	47% {
		transform: translate3d(-2px, 0, 0) scale(1.3);
		opacity: 1;
	}
	/* ── COLLISION at 50% = 1.2s ── */
	50% {
		transform: translate3d(2px, 0, 0) scale(1.3);
		opacity: 1;
		animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
	}
	52% { transform: translate3d(-1.5px, 0, 0) scale(1.29); }
	54% { transform: translate3d(0, 0, 0) scale(1.28); }

	72% {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 1;
	}
	100% {
		transform: translate3d(0, 0, 0) scale(1);
		opacity: 1;
	}
}

/* ─── Voltage flicker glow — purple (#bc13fe) palette ─── */
@keyframes v1-volt-flicker {
	/* Invisible until first glitch flash */
	0% {
		color: transparent;
		-webkit-text-fill-color: transparent;
		text-shadow: none;
	}
	/* Pre-flash 1 — purple burst with chromatic split */
	9% {
		color: #d4aaff;
		-webkit-text-fill-color: #d4aaff;
		text-shadow:
			-7px 0 rgba(80,  0, 200, 0.9),
			 7px 0 rgba(255, 20, 254, 0.9),
			 0 0 28px #bc13fe;
		filter: brightness(3.5);
	}
	12% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow: none;
		filter: brightness(0.25);
	}
	16% {
		color: transparent;
		-webkit-text-fill-color: transparent;
		filter: brightness(0);
	}
	/* Pre-flash 2 — smaller, hotter */
	21% {
		color: #e0aaff;
		-webkit-text-fill-color: #e0aaff;
		text-shadow:
			-5px 0 rgba(80,  0, 200, 0.85),
			 5px 0 rgba(255, 20, 254, 0.85),
			 0 0 20px #bc13fe;
		filter: brightness(2.5);
	}
	25% {
		color: transparent;
		-webkit-text-fill-color: transparent;
		filter: brightness(0);
	}
	/* Stable glow on approach */
	30% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 8px #ffffff,
			0 0 18px #bc13fe,
			0 0 34px rgba(188, 19, 254, 0.6);
		filter: brightness(1.4);
	}
	/* Building up */
	42% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 10px #ffffff,
			0 0 22px #bc13fe,
			0 0 42px rgba(188, 19, 254, 0.65);
		filter: brightness(1.75);
	}
	/* ── PEAK COLLISION at 50% = 1.2s ── */
	50% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 16px #ffffff,
			-5px 0 rgba(80,  0, 200, 1),
			 5px 0 rgba(255, 20, 254, 1),
			 0 0 48px #bc13fe,
			 0 0 75px rgba(188, 19, 254, 0.65);
		filter: brightness(2.8) drop-shadow(0 0 26px rgba(188, 19, 254, 1));
	}
	/* Settle with scale-down */
	72% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 10px #ffffff,
			0 0 22px rgba(188, 19, 254, 0.9),
			0 0 42px rgba(188, 19, 254, 0.5);
		filter: brightness(1.18);
	}
	100% {
		color: #ffffff;
		-webkit-text-fill-color: #ffffff;
		text-shadow:
			0 0 10px #ffffff,
			0 0 20px rgba(255, 255, 255, 0.8),
			0 0 32px rgba(188, 19, 254, 0.75),
			0 0 50px rgba(188, 19, 254, 0.38);
		filter: brightness(1.12);
	}
}




