/**
 * 3D Portfolio Journey Widget Styles
 * Scoped and fully responsive for Elementor
 */

.wfs-3d-portfolio-wrapper {
	position: relative;
	width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* FIXED FULL-VIEWPORT SCENE */
.wfs-3d-portfolio-wrapper .wfs-fixed-background {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: 100vh;
	max-height: 100dvh;
	z-index: 10;
	background-color: var(--wfs-bg, #0a0a0a);
	overflow: hidden;
	box-sizing: border-box;
	pointer-events: none;
	transform: translateZ(0);
	backface-visibility: hidden;
}

/* Enable pointer events on interactive UI */
.wfs-3d-portfolio-wrapper .me-section,
.wfs-3d-portfolio-wrapper .action-buttons,
.wfs-3d-portfolio-wrapper .skill-box {
	pointer-events: auto;
}

/* WebGL Canvas Container */
.wfs-3d-portfolio-wrapper .canvas-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	pointer-events: none;
}

/* CSS3D Renderer Container (Matches Canvas) */
.wfs-3d-portfolio-wrapper .css-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
}

/* UI Overlay for Text Stages */
.wfs-3d-portfolio-wrapper .wfs-ui-layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	pointer-events: none;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 1.5rem;
	box-sizing: border-box;
}

/* --- TEXT STYLES --- */
.wfs-3d-portfolio-wrapper .overlay-text {
	position: absolute;
	text-align: center;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease, transform 0.5s ease;
	width: 90%;
	max-width: 800px;
	pointer-events: none;
}

.wfs-3d-portfolio-wrapper .wfs-h1 {
	font-size: clamp(1.8rem, 5.5vw, 4rem);
	font-weight: 800;
	text-transform: uppercase;
	margin: 0;
	color: #ffffff;
	text-shadow: 0 0 30px rgba(255, 189, 89, 0.35);
	line-height: 1.1;
	word-break: break-word;
}

.wfs-3d-portfolio-wrapper .wfs-h2 {
	font-size: clamp(0.9rem, 2vw, 1.2rem);
	color: var(--wfs-gold, #ffbd59);
	margin-bottom: 0.8rem;
	letter-spacing: 2px;
	text-transform: uppercase;
	font-weight: 600;
}

.wfs-3d-portfolio-wrapper .wfs-p {
	font-size: clamp(0.9rem, 1.6vw, 1.1rem);
	color: #888888;
	margin-top: 1rem;
	line-height: 1.5;
}

/* --- ME / PROFILE SECTION (Final Overlay) --- */
.wfs-3d-portfolio-wrapper .me-section {
	position: absolute;
	top: 0;
	left: 0;
	width: 50%;
	height: 100%;
	max-height: 100vh;
	max-height: 100dvh;
	z-index: 20;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(2rem, 4vw, 4rem);
	box-sizing: border-box;
	opacity: 0;
	transform: translateX(-50px);
	pointer-events: none;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 189, 89, 0.3) transparent;
}

.wfs-3d-portfolio-wrapper .me-section::-webkit-scrollbar {
	width: 5px;
}
.wfs-3d-portfolio-wrapper .me-section::-webkit-scrollbar-thumb {
	background: rgba(255, 189, 89, 0.3);
	border-radius: 4px;
}

/* Coding Animation Background */
.wfs-3d-portfolio-wrapper .code-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(0, 0, 0, 0.92), rgba(10, 10, 10, 0.85));
	opacity: 0.85;
	z-index: -1;
	border-right: 1px solid #333333;
	overflow: hidden;
}

.wfs-3d-portfolio-wrapper .code-bg::before {
	white-space: pre;
	color: #333333;
	font-family: 'Fira Code', 'Courier New', monospace;
	font-size: 1.35rem;
	position: absolute;
	top: 0;
	left: 0;
	padding: 20px;
	line-height: 1.5;
	animation: wfsScrollCode 22s linear infinite;
	pointer-events: none;
}

@keyframes wfsScrollCode {
	from {
		transform: translateY(0);
	}
	to {
		transform: translateY(-50%);
	}
}

.wfs-3d-portfolio-wrapper .me-content {
	display: flex;
	gap: clamp(1rem, 2vw, 2rem);
	align-items: center;
	position: relative;
	z-index: 2;
	margin-bottom: clamp(1.2rem, 3vh, 2.5rem);
}

.wfs-3d-portfolio-wrapper .me-img {
	width: clamp(80px, 9vw, 120px);
	height: clamp(80px, 9vw, 120px);
	border-radius: 50%;
	background: #333333;
	border: 2px solid var(--wfs-gold, #ffbd59);
	overflow: hidden;
	flex-shrink: 0;
	box-shadow: 0 0 20px rgba(255, 189, 89, 0.25);
}

.wfs-3d-portfolio-wrapper .me-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wfs-3d-portfolio-wrapper .me-text h3 {
	color: var(--wfs-gold, #ffbd59);
	margin: 0;
	text-transform: uppercase;
	font-size: clamp(0.75rem, 1.4vw, 1rem);
	letter-spacing: 1px;
	font-weight: 600;
}

.wfs-3d-portfolio-wrapper .me-text h1 {
	color: #ffffff;
	margin: 0.4rem 0;
	font-size: clamp(1.1rem, 2.2vw, 1.45rem);
	line-height: 1.25;
	font-weight: 700;
}

.wfs-3d-portfolio-wrapper .me-text p {
	color: #aaaaaa;
	margin: 0;
	max-width: 440px;
	font-size: clamp(0.85rem, 1.3vw, 1rem);
	line-height: 1.45;
}

/* Skills Grid */
.wfs-3d-portfolio-wrapper .skills-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
	gap: 0.65rem;
	margin-bottom: clamp(1rem, 2.5vh, 2rem);
	position: relative;
	z-index: 2;
}

.wfs-3d-portfolio-wrapper .skill-box {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid #333333;
	border-radius: 8px;
	padding: 0.4rem 0.5rem;
	text-align: center;
	color: #ffffff;
	font-size: clamp(0.68rem, 1.1vw, 0.75rem);
	font-weight: 500;
	transition: all 0.25s ease;
	word-break: break-word;
	user-select: none;
}

.wfs-3d-portfolio-wrapper .skill-box:hover {
	border-color: var(--wfs-gold, #ffbd59);
	background: rgba(255, 189, 89, 0.12);
	transform: translateY(-2px);
}

/* Action Buttons */
.wfs-3d-portfolio-wrapper .action-buttons {
	display: flex;
	gap: 1rem;
	position: relative;
	z-index: 2;
	pointer-events: auto;
	flex-wrap: wrap;
}

.wfs-3d-portfolio-wrapper .btn {
	padding: 12px 28px;
	border-radius: 30px;
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: clamp(0.75rem, 1.2vw, 0.85rem);
	letter-spacing: 0.5px;
	box-sizing: border-box;
}

.wfs-3d-portfolio-wrapper .btn-primary {
	background: var(--wfs-gold, #ffbd59);
	color: #000000;
	border: 1px solid var(--wfs-gold, #ffbd59);
}

.wfs-3d-portfolio-wrapper .btn-primary:hover {
	transform: scale(1.05);
	background: #ffce80;
	border-color: #ffce80;
	box-shadow: 0 0 15px rgba(255, 189, 89, 0.4);
}

.wfs-3d-portfolio-wrapper .btn-secondary {
	background: transparent;
	color: #ffffff;
	border: 1px solid #ffffff;
}

.wfs-3d-portfolio-wrapper .btn-secondary:hover {
	background: #ffffff;
	color: #000000;
	transform: scale(1.05);
}

/* --- LAPTOP SCREEN CONTENT (CSS3D) --- */
.wfs-3d-portfolio-wrapper .laptop-content {
	width: 1024px;
	height: 640px;
	background: #050505;
	overflow: hidden;
	display: flex;
	gap: 15px;
	padding: 15px;
	box-sizing: border-box;
}

.wfs-3d-portfolio-wrapper .website-col {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 15px;
	will-change: transform;
	transform: translateZ(0);
	backface-visibility: hidden;
}

.wfs-3d-portfolio-wrapper .scroll-down {
	animation: wfsScrollY var(--wfs-col1-speed, 30s) linear infinite;
}

.wfs-3d-portfolio-wrapper .col-3.scroll-down {
	animation: wfsScrollY var(--wfs-col3-speed, 30s) linear infinite;
}

.wfs-3d-portfolio-wrapper .scroll-up {
	animation: wfsScrollYReverse var(--wfs-col2-speed, 35s) linear infinite;
}

@keyframes wfsScrollY {
	0% {
		transform: translateY(0);
	}
	100% {
		transform: translateY(-50%);
	}
}

@keyframes wfsScrollYReverse {
	0% {
		transform: translateY(-50%);
	}
	100% {
		transform: translateY(0%);
	}
}

.wfs-3d-portfolio-wrapper .web-item {
	width: 100% !important;
	min-height: 200px !important;
	aspect-ratio: 16/9;
	background-color: #222222;
	border-radius: 6px;
	overflow: hidden;
	position: relative;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* SCROLL SPACER */
.wfs-3d-portfolio-wrapper .wfs-scroll-spacer {
	width: 100%;
	position: relative;
	z-index: 5;
	pointer-events: none;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 900px) {
	.wfs-3d-portfolio-wrapper .code-bg {
		border-right: none;
		border-bottom: 1px solid #333333;
	}

	.wfs-3d-portfolio-wrapper .me-section {
		width: 100%;
		max-height: 100vh;
		max-height: 100dvh;
		padding: 2rem 1.5rem;
		background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 55%, rgba(0, 0, 0, 0.2) 100%);
		justify-content: flex-end;
	}

	.wfs-3d-portfolio-wrapper .me-content {
		flex-direction: column;
		text-align: center;
		gap: 0.8rem;
		margin-bottom: 1rem;
	}

	.wfs-3d-portfolio-wrapper .me-text p {
		margin: 0 auto;
		max-width: 90%;
	}

	.wfs-3d-portfolio-wrapper .action-buttons {
		justify-content: center;
	}

	.wfs-3d-portfolio-wrapper .skills-grid {
		grid-template-columns: repeat(3, 1fr);
		margin-bottom: 1.2rem;
	}
}

@media (max-width: 480px) {
	.wfs-3d-portfolio-wrapper .me-section {
		padding: 1.2rem 1rem;
		justify-content: flex-end;
	}

	.wfs-3d-portfolio-wrapper .me-img {
		width: 65px;
		height: 65px;
	}

	.wfs-3d-portfolio-wrapper .me-text h1 {
		font-size: 1.15rem;
	}

	.wfs-3d-portfolio-wrapper .me-text p {
		font-size: 0.82rem;
		line-height: 1.35;
	}

	.wfs-3d-portfolio-wrapper .skills-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 0.4rem;
		margin-bottom: 0.8rem;
	}

	.wfs-3d-portfolio-wrapper .skill-box {
		padding: 0.25rem 0.35rem;
		font-size: 0.65rem;
	}

	.wfs-3d-portfolio-wrapper .action-buttons {
		gap: 0.5rem;
	}

	.wfs-3d-portfolio-wrapper .action-buttons .btn {
		width: calc(50% - 0.3rem) !important;
		padding: 8px 10px !important;
		font-size: 0.72rem !important;
	}
}

/* Extra small devices / landscape mobile */
@media (max-height: 520px) {
	.wfs-3d-portfolio-wrapper .me-section {
		justify-content: flex-start;
		padding-top: 1rem;
	}
	.wfs-3d-portfolio-wrapper .me-content {
		margin-bottom: 0.5rem;
	}
	.wfs-3d-portfolio-wrapper .me-img {
		width: 50px;
		height: 50px;
	}
}
