/* =========================================================
   PORTFOLIO / RECENT WORKS — redesign
   Used on Home ("My Recent Works") and Creations pages.
   Fixes the uneven masonry grid (uniform image height) and
   makes captions always visible (mobile-friendly), with a
   modern gradient + hover zoom. Theme-aware.
========================================================= */

/* Uniform, rounded image cards -> even isotope grid, no gaps */
.portfolio-box .portfolio-item {
	padding: 0;
	border-radius: 16px;
	overflow: hidden;
	position: relative;
	background: var(--tj-theme-accent-2);
	border: 1px solid rgba(135, 80, 247, .35);
	-webkit-box-shadow: 0 10px 30px rgba(135, 80, 247, .12);
	box-shadow: 0 10px 30px rgba(135, 80, 247, .12);
	-webkit-transition: border-color .4s ease, box-shadow .4s ease, -webkit-transform .4s ease;
	transition: border-color .4s ease, box-shadow .4s ease, transform .4s ease;
}
.portfolio-box .portfolio-item:hover {
	border-color: var(--tj-theme-primary);
	-webkit-box-shadow: 0 22px 50px rgba(135, 80, 247, .38);
	box-shadow: 0 22px 50px rgba(135, 80, 247, .38);
}

.portfolio-box .image-box {
	width: 100%;
	overflow: hidden;
	line-height: 0;
}
.portfolio-box .image-box img {
	width: 100%;
	aspect-ratio: 16 / 11;
	-o-object-fit: cover;
	object-fit: cover;
	display: block;
	-webkit-transition: -webkit-transform .6s cubic-bezier(.16, 1, .3, 1);
	transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}
.portfolio-box .portfolio-item:hover .image-box img {
	-webkit-transform: scale(1.06);
	-ms-transform: scale(1.06);
	transform: scale(1.06);
}

/* Caption: always visible (no hover needed — key for mobile) */
.portfolio-box .content-box {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	margin: 0;
	padding: 48px 56px 18px 20px;
	border-radius: 0;
	opacity: 1;
	visibility: visible;
	-webkit-transform: none;
	-ms-transform: none;
	transform: none;
	background: -o-linear-gradient(bottom, rgba(30, 11, 66, .97) 0%, rgba(52, 24, 110, .78) 42%, rgba(135, 80, 247, 0) 100%);
	background: linear-gradient(to top, rgba(30, 11, 66, .97) 0%, rgba(52, 24, 110, .78) 42%, rgba(135, 80, 247, 0) 100%);
}
.portfolio-box .portfolio-item .content-box .portfolio-title {
	font-size: 20px;
	margin-bottom: 5px;
	line-height: 1.25;
	color: #ffffff;
}
.portfolio-box .portfolio-item .content-box p {
	margin-bottom: 0;
	font-size: 13px;
	line-height: 1.55;
	color: rgba(255, 255, 255, .82);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Whole card is clickable (opens the popup). The tall link is clipped
   by the item's overflow:hidden, so it covers the entire card. */
.portfolio-box .portfolio-item .content-box .portfolio-link {
	position: absolute;
	left: 0;
	bottom: 0;
	top: auto;
	width: 100%;
	height: 1000px;
	z-index: 2;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
}

/* Circular arrow badge, bottom-right */
.portfolio-box .portfolio-item .content-box i {
	top: auto;
	bottom: 18px;
	right: 18px;
	-webkit-transform: none;
	-ms-transform: none;
	transform: none;
	width: 36px;
	height: 36px;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(135, 80, 247, .85);
	color: #ffffff;
	font-size: 14px;
	z-index: 1;
	-webkit-box-shadow: 0 4px 14px rgba(135, 80, 247, .5);
	box-shadow: 0 4px 14px rgba(135, 80, 247, .5);
}
.portfolio-box .portfolio-item:hover .content-box i {
	background: var(--tj-theme-primary);
	-webkit-transform: rotate(360deg);
	-ms-transform: rotate(360deg);
	transform: rotate(360deg);
}

/* Tablet: keep 2 columns, slightly shorter cards */
@media only screen and (min-width: 768px) and (max-width: 991px) {
	.portfolio-box .image-box img { aspect-ratio: 16 / 11; }
}

/* Mobile: 1 column, taller image, bigger title */
@media only screen and (max-width: 767px) {
	.portfolio-box .portfolio-sizer,
	.portfolio-box .portfolio-item { width: 100%; }
	.portfolio-box .gutter-sizer { width: 0; }
	.portfolio-box .portfolio-item {
		margin-bottom: 20px;
		padding: 0;
	}
	.portfolio-box .image-box img { aspect-ratio: 16 / 10; }
	.portfolio-box .content-box {
		width: 100%;
		padding: 46px 52px 16px 18px;
	}
	.portfolio-box .portfolio-item .content-box .portfolio-title {
		font-size: 19px;
		margin: 0 0 4px;
	}
}

/* Light mode */
.light-mode .portfolio-box .portfolio-item {
	background: var(--tj-white);
	border-color: rgba(135, 80, 247, .3);
	-webkit-box-shadow: 0 10px 30px rgba(135, 80, 247, .12);
	box-shadow: 0 10px 30px rgba(135, 80, 247, .12);
}
.light-mode .portfolio-box .portfolio-item:hover {
	border-color: var(--tj-theme-primary);
	-webkit-box-shadow: 0 22px 46px rgba(135, 80, 247, .28);
	box-shadow: 0 22px 46px rgba(135, 80, 247, .28);
}
