.emy-portfolio-section {
	position: relative;
	padding: 120px 0;
	background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
	overflow: hidden;
}

[data-theme="dark"] .emy-portfolio-section {
	background: #07111f;
}

.emy-portfolio-section::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.08), transparent 28%),
		radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.06), transparent 30%);
	pointer-events: none;
}

[data-theme="dark"] .emy-portfolio-section::before {
	background:
		radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.14), transparent 28%),
		radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.10), transparent 30%);
}

.emy-portfolio-container {
	position: relative;
	z-index: 2;
}

.emy-portfolio-header {
	max-width: 850px;
	margin: 0 auto 70px;
}

.emy-portfolio-badge {
	display: inline-block;
	margin-bottom: 18px;
	color: #0284c7;
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 3px;
}

[data-theme="dark"] .emy-portfolio-badge {
	color: #22d3ee;
}

.emy-portfolio-title {
	margin: 0;
	color: #0f172a;
	font-size: clamp(2.2rem, 4vw, 4.5rem);
	font-weight: 900;
	letter-spacing: -0.04em;
}

[data-theme="dark"] .emy-portfolio-title {
	color: #ffffff;
}

.emy-portfolio-title span {
	background: var(--emy-gradient-brand);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.emy-portfolio-subtitle {
	max-width: 760px;
	margin: 22px auto 0;
	color: rgba(15, 23, 42, 0.72);
	font-size: 1.08rem;
	line-height: 1.8;
}

[data-theme="dark"] .emy-portfolio-subtitle {
	color: rgba(226, 232, 240, 0.74);
}

.emy-portfolio-divider {
	width: 90px;
	height: 4px;
	margin: 28px auto 0;
	border-radius: 999px;
	background: var(--emy-gradient-line);
}

.emy-project-card {
	position: relative;
	overflow: hidden;
	border-radius: 28px;
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid rgba(148, 163, 184, 0.14);
	backdrop-filter: blur(16px);
	transition: all 0.35s ease;
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .emy-project-card {
	background: rgba(30, 41, 59, 0.58);
	box-shadow: none;
}

.emy-project-gradient {
	height: 12px;
	width: 100%;
}


.emy-project-gradient.blue-cyan,
.emy-project-gradient.purple-blue,
.emy-project-gradient.cyan-blue,
.emy-project-gradient.blue-purple {
	background: var(--emy-gradient-line);
}

.emy-project-content {
	padding: 34px;
}

.emy-project-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 20px;
}

.emy-project-category {
	display: inline-block;
	margin-bottom: 10px;
	color: #0284c7;
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 2px;
}

[data-theme="dark"] .emy-project-category {
	color: #22d3ee;
}

.emy-project-title {
	margin: 0;
	color: #0f172a;
	font-size: 1.65rem;
	font-weight: 900;
}

[data-theme="dark"] .emy-project-title {
	color: #ffffff;
}

.emy-project-icon {
	width: 46px;
	height: 46px;
	flex: 0 0 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	color: rgba(15, 23, 42, 0.65);
	background: rgba(37, 99, 235, 0.08);
	transition: all 0.3s ease;
}

[data-theme="dark"] .emy-project-icon {
	color: rgba(226, 232, 240, 0.8);
	background: rgba(255, 255, 255, 0.06);
}

.emy-project-card:hover .emy-project-icon {
	color: #22d3ee;
	background: rgba(34, 211, 238, 0.12);
}

.emy-project-description {
	color: rgba(15, 23, 42, 0.72);
	font-size: 0.98rem;
	line-height: 1.8;
	margin-bottom: 26px;
}

[data-theme="dark"] .emy-project-description {
	color: rgba(226, 232, 240, 0.75);
}

.emy-project-techs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.emy-project-techs span {
	padding: 7px 14px;
	border-radius: 999px;
	color: #1d4ed8;
	font-size: 0.8rem;
	font-weight: 700;
	background: rgba(37, 99, 235, 0.10);
	border: 1px solid rgba(37, 99, 235, 0.18);
}

[data-theme="dark"] .emy-project-techs span {
	color: #93c5fd;
	background: rgba(37, 99, 235, 0.12);
	border: 1px solid rgba(37, 99, 235, 0.22);
}

@media (max-width: 991px) {
	.emy-portfolio-section {
		padding: 90px 0;
	}

	.emy-portfolio-header {
		margin-bottom: 52px;
	}
}

@media (max-width: 575px) {
	.emy-project-content {
		padding: 28px 22px;
	}

	.emy-project-head {
		flex-direction: column;
	}
}

/* ========= PORTFOLIO EXECUTIVE CINEMATIC ========= */
.emy-portfolio-section::after {
	content: '';
	position: absolute;
	inset: -10%;
	background:
		radial-gradient(circle at center, rgba(37, 99, 235, 0.06), transparent 60%);
	opacity: 0;
	transform: scale(1.15);
	transition:
		opacity 1.8s ease,
		transform 2.8s ease;
	pointer-events: none;
}

.emy-portfolio-section.emy-section-visible::after {
	opacity: 1;
	transform: scale(1);
}

/* Header */
.emy-portfolio-header .emy-reveal-item {
	opacity: 0;
	transform: translateY(34px);
	filter: blur(8px);
}

/* Base card */
.emy-project-card.emy-reveal-item {
	opacity: 0;
	filter: blur(10px);
	transform: translateY(55px) scale(0.96);
	transition:
		opacity 1.15s cubic-bezier(0.19, 1, 0.22, 1),
		transform 1.35s cubic-bezier(0.19, 1, 0.22, 1),
		filter 1.1s ease;
}

/* Alternancia lateral */
.emy-project-left {
	transform: translateY(55px) translateX(-28px) scale(0.96);
}

.emy-project-right {
	transform: translateY(55px) translateX(28px) scale(0.96);
}

/* Activación */
.emy-reveal-group.emy-reveal-active .emy-project-card.emy-reveal-item,
.emy-reveal-group.emy-reveal-active .emy-portfolio-header .emy-reveal-item,
.emy-reveal-group.emy-reveal-active .emy-reveal-item {
	opacity: 1;
	transform: translateY(0) translateX(0) scale(1);
	filter: blur(0);
}

/* Hover premium */
.emy-project-card:hover {
	transform: translateY(-12px) scale(1.015);
}

/* Glow interno */
.emy-project-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			135deg,
			rgba(255,255,255,0.00),
			rgba(255,255,255,0.05),
			rgba(34,211,238,0.06),
			rgba(255,255,255,0.00)
		);
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.emy-project-card:hover::before {
	opacity: 1;
}

/* Tech pills */
.emy-project-techs span {
	transition:
		transform 0.25s ease,
		background 0.25s ease,
		border-color 0.25s ease;
}

.emy-project-techs span:hover {
	transform: translateY(-2px);
}

/* Icon */
.emy-project-icon {
	transition:
		transform 0.35s ease,
		background 0.35s ease,
		color 0.35s ease;
}

.emy-project-card:hover .emy-project-icon {
	transform: rotate(-8deg) scale(1.08);
}

/* Rendimiento */
.emy-portfolio-section .emy-reveal-group {
	will-change: transform, opacity;
}

html:not([data-theme="dark"]) .emy-reveal-group.emy-reveal-active .emy-project-card:hover {
	border-color: rgba(37, 99, 235, 0.58);
	background: rgba(255, 255, 255, 0.94);
	box-shadow:
		0 28px 64px rgba(37, 99, 235, 0.16),
		0 0 0 4px rgba(6, 182, 212, 0.16);
}

html:not([data-theme="dark"]) .emy-project-card:hover .emy-project-icon {
	color: #ffffff;
	background: var(--emy-gradient-dropdown-active);
	box-shadow: 0 14px 28px var(--emy-glow-blue);
}

html:not([data-theme="dark"]) .emy-project-card:hover .emy-project-techs span {
	color: #1e40af;
	background: rgba(37, 99, 235, 0.14);
	border-color: rgba(37, 99, 235, 0.28);
}