*,
*::after,
*::before {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	outline: none;
}

body {
	overflow: hidden;
	background-color: #383B50;
	cursor: grab;
	font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

#css3d-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	background-color: #383B50;
}

.webgl {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1;
	pointer-events: none;
}

#controls-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	cursor: grab;
}

/* ─── Tooltip ─── */
.tooltip {
	position: fixed;
	z-index: 100;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 6px 14px;
	border-radius: 6px;
	font-size: 13px;
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s, transform 0.2s;
	white-space: nowrap;
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip.visible {
	opacity: 1;
	transform: translateY(0);
}

/* ─── Close Button ─── */
.close-btn {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 200;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s, background 0.2s;
	backdrop-filter: blur(8px);
}

.close-btn.visible {
	opacity: 1;
	pointer-events: auto;
}

.close-btn:hover {
	background: rgba(255, 255, 255, 0.15);
}

/* ─── Monitor Click Prompt ─── */
.monitor-prompt {
	position: fixed;
	bottom: 15%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 45;
	color: #fff;
	font-family: 'Inter', 'Segoe UI', sans-serif;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 2px;
	text-transform: uppercase;
	opacity: 0;
	pointer-events: none;
	transition: opacity 1s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.monitor-prompt.visible {
	opacity: 1;
}

.monitor-prompt .prompt-arrow {
	width: 1px;
	height: 50px;
	background: rgba(255, 255, 255, 0.3);
	position: relative;
	overflow: hidden;
}

.monitor-prompt .prompt-arrow::after {
	content: '';
	position: absolute;
	top: -100%;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to bottom, transparent, #fff);
	animation: promptSlide 2s ease-in-out infinite;
}

@keyframes promptSlide {
	0% { top: -100%; }
	50% { top: 100%; }
	100% { top: 100%; }
}

/* ─── Film Grain Overlay ─── */
#film-grain {
	position: fixed;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	z-index: 90;
	pointer-events: none;
	opacity: 0.08;
	mix-blend-mode: soft-light;
	animation: grain-shift 0.3s steps(4) infinite;
}

@keyframes grain-shift {
	0%   { transform: translate(0, 0); }
	25%  { transform: translate(-2%, -3%); }
	50%  { transform: translate(3%, 1%); }
	75%  { transform: translate(-1%, 2%); }
	100% { transform: translate(2%, -1%); }
}

/* ─── Blinking Cursor ─── */
.blink {
	animation: blink-anim 1s step-end infinite;
}

@keyframes blink-anim {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0; }
}

/* ─── Baseball Easter Egg Message ─── */
.baseball-message {
	position: fixed;
	top: 40%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 150;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	padding: 10px 24px;
	border-radius: 8px;
	font-size: 16px;
	font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
	pointer-events: none;
	animation: baseball-float 2.5s ease-out forwards;
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	white-space: nowrap;
}

@keyframes baseball-float {
	0%   { opacity: 0; transform: translateX(-50%) translateY(0); }
	15%  { opacity: 1; transform: translateX(-50%) translateY(-10px); }
	75%  { opacity: 1; transform: translateX(-50%) translateY(-30px); }
	100% { opacity: 0; transform: translateX(-50%) translateY(-50px); }
}

/* ─── BIOS Boot Screen ─── */
.boot-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #000;
	z-index: 500;
	font-family: 'Courier New', 'Lucida Console', monospace;
	color: #fff;
	font-size: 16px;
	letter-spacing: 0.8px;
	line-height: 1.4;
}

.boot-content {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 32px;
	box-sizing: border-box;
}

.boot-header {
	display: flex;
	flex-direction: row;
}

.boot-header p {
	margin: 0;
}

.boot-header-right {
	margin-left: 64px;
}

.boot-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding-top: 16px;
	overflow: hidden;
}

.boot-body p {
	margin: 0;
	line-height: 1.5;
}

.boot-footer p {
	margin: 0;
}

/* ─── Start Dialog Overlay ─── */
.start-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
}

.start-overlay.visible {
	opacity: 1;
	pointer-events: auto;
}

.start-dialog {
	background: #000;
	padding: 24px;
	border: 7px solid #fff;
	max-width: 500px;
	font-family: 'Courier New', 'Lucida Console', monospace;
	font-size: 16px;
	letter-spacing: 0.8px;
	color: #fff;
}

.start-dialog p {
	margin: 0;
}

.start-warning {
	color: yellow;
}

.start-prompt {
	display: flex;
	align-items: flex-end;
}

.start-btn-wrap {
	display: flex;
	justify-content: center;
	margin-top: 16px;
}

.start-btn {
	border: 3px solid #fff;
	padding: 8px 32px;
	cursor: pointer;
	font-family: 'Courier New', 'Lucida Console', monospace;
	font-size: 16px;
	letter-spacing: 0.8px;
	color: #fff;
	transition: background 0.15s, color 0.15s;
	user-select: none;
}

.start-btn:hover {
	background: #fff;
	color: #000;
}

/* ─── Overlay UI ─── */
.overlay-ui {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 50;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 16px;
	font-family: 'Inter', 'Segoe UI', sans-serif;
	color: #fff;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.5s;
}

.overlay-ui.visible {
	opacity: 1;
	pointer-events: auto;
}

.overlay-label {
	background: #000;
	padding: 4px 16px;
	margin-bottom: 4px;
}

.overlay-label p {
	margin: 0;
}

.overlay-row {
	display: flex;
	flex-direction: row;
	gap: 4px;
}

.overlay-icon-btn {
	background: #000;
	padding: 4px 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s;
}

.overlay-icon-btn:hover {
	opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════
   Win11 Desktop (CSS3D rendered on monitor)
   ═══════════════════════════════════════════════════════════ */

#win11-desktop,
#win11-desktop * {
	pointer-events: auto;
}

#win11-desktop {
	position: relative;
	overflow: hidden;
	font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
	user-select: none;
	cursor: default;
	background: #0d1525;
}

/* CRT scanline overlay */
#win11-desktop::after {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: repeating-linear-gradient(
		0deg,
		rgba(0, 0, 0, 0.06) 0px,
		rgba(0, 0, 0, 0.06) 1px,
		transparent 1px,
		transparent 3px
	);
	pointer-events: none;
	z-index: 9999;
}

/* ── Taskbar ── */
.win11-taskbar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 48px;
	background: rgba(32, 32, 32, 0.85);
	backdrop-filter: blur(20px);
	display: flex;
	align-items: center;
	padding: 0 12px;
	z-index: 100;
}

.taskbar-start {
	background: none;
	border: none;
	color: #4cc2ff;
	font-size: 20px;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 4px;
	transition: background 0.15s;
}

.taskbar-start:hover {
	background: rgba(255, 255, 255, 0.1);
}

.taskbar-apps {
	display: flex;
	gap: 4px;
	margin-left: 8px;
}

.taskbar-app {
	padding: 6px 8px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s;
	display: flex;
	align-items: center;
}

.taskbar-app:hover {
	background: rgba(255, 255, 255, 0.1);
}

.taskbar-app img {
	width: 24px;
	height: 24px;
}

.taskbar-search {
	margin-left: 8px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 4px;
	padding: 6px 16px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 13px;
	min-width: 200px;
	cursor: text;
}

.taskbar-tray {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.taskbar-clock {
	color: #fff;
	font-size: 12px;
	text-align: right;
	line-height: 1.3;
}

/* ── Desktop Icons ── */
.desktop-icons {
	position: absolute;
	top: 16px;
	left: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 10;
}

.desktop-icon {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 80px;
	padding: 8px 4px;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s;
}

.desktop-icon:hover {
	background: rgba(255, 255, 255, 0.15);
}

.desktop-icon img {
	width: 40px;
	height: 40px;
	margin-bottom: 4px;
}

.desktop-icon span {
	color: #fff;
	font-size: 11px;
	text-align: center;
	text-shadow: 0 1px 3px rgba(0,0,0,0.8);
	line-height: 1.2;
}

/* ── Windows ── */
.win11-window {
	position: absolute;
	background: rgba(32, 32, 32, 0.94);
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.5);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 50;
}

.win11-window.maximized {
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	border-radius: 0;
}

.win-titlebar {
	display: flex;
	align-items: center;
	height: 36px;
	padding: 0 8px;
	background: rgba(0, 0, 0, 0.2);
	cursor: move;
	flex-shrink: 0;
}

.win-icon {
	width: 16px;
	height: 16px;
	margin-right: 8px;
}

.win-title {
	color: #fff;
	font-size: 12px;
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.win-controls {
	display: flex;
	margin-left: auto;
}

.win-btn {
	background: none;
	border: none;
	color: #fff;
	width: 36px;
	height: 36px;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.1s;
}

.win-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.win-btn.win-close:hover {
	background: #e81123;
}

.win-body {
	flex: 1;
	display: flex;
	overflow: hidden;
}

/* ── Portfolio Window ── */
.portfolio-nav {
	width: 180px;
	background: rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	padding: 12px 0;
	flex-shrink: 0;
	border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-nav a {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	padding: 10px 20px;
	font-family: 'Inter', 'Segoe UI', sans-serif;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	transition: background 0.15s, color 0.15s;
	cursor: pointer;
}

.portfolio-nav a:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.portfolio-nav a.active {
	color: #4cc2ff;
	background: rgba(76, 194, 255, 0.08);
	border-left: 2px solid #4cc2ff;
}

.portfolio-content {
	flex: 1;
	overflow-y: auto;
	padding: 28px 32px;
	color: #e0e0e0;
	font-family: 'Inter', 'Segoe UI', sans-serif;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.portfolio-content::-webkit-scrollbar {
	width: 6px;
}

.portfolio-content::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
}

.portfolio-content h1 {
	font-size: 34px;
	font-family: 'Bagnard', Georgia, serif;
	color: #fff;
	margin-bottom: 8px;
	letter-spacing: 0.5px;
}

.portfolio-content h2 {
	font-size: 20px;
	font-family: 'Bagnard', Georgia, serif;
	color: #4cc2ff;
	margin: 28px 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-content h3 {
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	margin: 16px 0 6px;
	letter-spacing: 0.3px;
}

.portfolio-content p {
	font-size: 13px;
	line-height: 1.7;
	font-weight: 300;
	color: rgba(255, 255, 255, 0.75);
	margin-bottom: 12px;
}

.portfolio-content .subtitle {
	font-size: 18px;
	font-family: 'Bagnard', Georgia, serif;
	color: rgba(255, 255, 255, 0.5);
	margin-bottom: 28px;
	letter-spacing: 1px;
}

.portfolio-content .card {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 12px;
}

.portfolio-content .card-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 4px;
}

.portfolio-content .card-header h3 {
	margin: 0;
}

.portfolio-content .card-header .date {
	color: rgba(255, 255, 255, 0.4);
	font-size: 12px;
	white-space: nowrap;
}

.portfolio-content .card-sub {
	color: #4cc2ff;
	font-size: 13px;
	margin-bottom: 8px;
}

.portfolio-content ul {
	padding-left: 18px;
	margin: 8px 0;
}

.portfolio-content li {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.6;
	margin-bottom: 4px;
}

.portfolio-content .tags {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 8px;
}

.portfolio-content .tag {
	background: rgba(76, 194, 255, 0.12);
	color: #4cc2ff;
	padding: 3px 10px;
	border-radius: 4px;
	font-size: 11px;
}

.portfolio-content .contact-item {
	display: flex;
	justify-content: space-between;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 6px;
	margin-bottom: 8px;
}

.portfolio-content .contact-label {
	color: rgba(255, 255, 255, 0.4);
	font-size: 12px;
}

.portfolio-content .contact-val {
	color: #fff;
	font-size: 14px;
}

/* Home page centered */
.portfolio-home {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 100%;
}

.portfolio-home h1 {
	font-size: 52px;
	margin-bottom: 10px;
	letter-spacing: 1px;
}

.portfolio-home .nav-links {
	display: flex;
	gap: 28px;
	margin-top: 24px;
}

.portfolio-home .nav-links a {
	color: #4cc2ff;
	text-decoration: none;
	font-family: 'Inter', 'Segoe UI', sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 2px;
	text-transform: uppercase;
	padding-bottom: 3px;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s, color 0.2s;
	cursor: pointer;
}

.portfolio-home .nav-links a:hover {
	border-bottom-color: #4cc2ff;
}
