/* Portfolio projects section - custom styles layered on top of the Strata template. */

/* ---------- general ---------- */

[hidden] {
	display: none !important;
}

.project-intro {
	margin: 0 0 1.75rem;
}

/* ---------- acento de marca (probar alternativas cambiando la variable) ---------- */

:root {
	--bp-accent: #a7262f;
}

#main .button:hover {
	border-color: var(--bp-accent);
	color: var(--bp-accent) !important;
}

#main .button:active {
	background-color: rgba(167, 38, 47, 0.12);
	border-color: var(--bp-accent);
	color: var(--bp-accent) !important;
}

/* ---------- seccion Let's Connect ---------- */

#three h2 {
	margin-bottom: .75em;
}

#three p {
	margin-bottom: 1.25rem;
}

.contact-links {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	justify-content: flex-start;
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
	text-align: left;
}

.contact-links li {
	padding-left: 0;
}

.contact-links a {
	align-items: center;
	border: solid 1px #d8d8d8;
	border-radius: 2rem;
	color: #787878;
	display: inline-flex;
	font-size: .95rem;
	font-weight: 600;
	gap: .45em;
	letter-spacing: .03em;
	padding: .55rem 1.15rem;
	transition: color .2s ease, border-color .2s ease;
}

.contact-links a:hover {
	border-color: var(--bp-accent);
	color: var(--bp-accent) !important;
}

.contact-links .icon:before {
	font-size: 1.1em;
	margin-right: 0;
}

.contact-location {
	color: #787878;
	margin: 0;
}

.contact-location .icon:before {
	color: var(--bp-accent);
	margin-right: .5em;
}

/* ---------- footer integrado (desktop: dentro del header) ---------- */

#header #footer {
	text-align: center;
}

#header #footer .icons {
	margin: 0 0 .75em 0;
}

#header #footer .copyright {
	margin: .75em 0 0 0;
}

/* ---------- filters ---------- */

.project-filters {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
	margin: 0 0 2rem;
	border-bottom: solid 1px #e0e0e0;
}

.project-filter {
	font-family: "Source Sans Pro", Helvetica, sans-serif;
	font-size: .95rem;
	font-weight: 600;
	letter-spacing: .03em;
	color: #9a9a9a;
	background: transparent;
	border: solid 1px transparent;
	border-bottom: solid 2px transparent;
	border-radius: .5rem .5rem 0 0;
	padding: .65rem 1.3rem;
	margin-bottom: -1px;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.project-filter:hover {
	background: #f7f7f7;
	border-color: #e0e0e0;
	border-bottom-color: transparent;
	color: #262626;
}

.project-filter.is-active {
	background: #262626;
	border-color: #262626;
	color: #fff;
}

.project-filter-count {
	opacity: .7;
	font-size: .8em;
}

/* ---------- grid & cards ---------- */

.project-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2.25rem 2.5rem;
}

@media screen and (max-width: 736px) {
	.project-grid {
		grid-template-columns: 1fr;
	}
}

.project-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: solid 1px #e6e6e6;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	transition: opacity .22s ease, transform .22s ease, box-shadow .2s ease, border-color .2s ease;
	animation: project-card-in .45s ease backwards;
}

@keyframes project-card-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.project-grid.is-fading .project-card {
	opacity: 0;
	transform: translateY(8px);
}

.project-card:hover,
.project-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
	border-color: #49bf9d;
	outline: none;
}

.project-card-media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #222;
}

.project-card-media::before,
.project-gallery-main-wrap::before {
	content: '';
	position: absolute;
	inset: -8px;
	background: inherit;
	background-size: cover;
	background-position: center;
	filter: blur(12px);
	transform: scale(1.05);
	z-index: 0;
}

.project-cover {
	display: block;
	position: relative;
	z-index: 1;
	width: 100%;
	height: calc(100% + 6px);
	margin: -3px 0;
	object-fit: contain;
	object-position: center;
	padding: 0 4px;
	box-sizing: border-box;
	transition: transform .3s ease;
	background: transparent;
}

.project-card:hover .project-cover {
	transform: scale(1.03);
}

.project-card-view {
	position: absolute;
	right: .75rem;
	bottom: .75rem;
	z-index: 2;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .05em;
	color: #fff;
	background: rgba(0, 0, 0, .6);
	padding: .35rem .7rem;
	border-radius: 2rem;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity .2s ease, transform .2s ease;
	pointer-events: none;
}

.project-card:hover .project-card-view,
.project-card:focus-visible .project-card-view {
	opacity: 1;
	transform: none;
}

.project-badge {
	position: absolute;
	top: .75rem;
	left: .75rem;
	z-index: 2;
	display: inline-block;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(0, 0, 0, .55);
	padding: .32rem .65rem;
	border-radius: 2rem;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.project-badge-shipped {
	background: #49bf9d;
}

.project-badge-prototype {
	background: #e89b3c;
}

.project-badge-technical-demo {
	background: #5f8fd9;
}

.project-badge-community {
	background: #a06bd9;
}

.project-badge-devlog {
	right: .75rem;
	left: auto;
	background: #e63946;
}

.project-card-body {
	display: flex;
	flex-direction: column;
	gap: .55rem;
	flex: 1;
	padding: 1.15rem 1.3rem 1.3rem;
}

.project-card-title {
	margin: 0;
	font-size: 1.15em;
	font-weight: 600;
	color: #444;
}

.project-card-short {
	margin: 0;
	font-size: .92rem;
	line-height: 1.55;
	flex: 1;
}

.project-card-tech {
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .02em;
	color: #49bf9d;
}

.project-card-meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: .75rem;
	padding-top: .7rem;
	border-top: solid 1px #efefef;
	font-size: .78rem;
}

.project-card-role {
	font-weight: 600;
	color: #444;
}

.project-card-platforms {
	color: #a5a5a5;
}

/* ---------- modal ---------- */

.project-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	overflow-y: auto;
	background: rgba(22, 22, 22, .9);
	padding: 2rem 1rem;
	animation: project-overlay-in .25s ease;
}

@keyframes project-overlay-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.project-modal {
	display: flex;
	flex-direction: column;
	position: relative;
	width: 100%;
	max-width: 900px;
	max-height: 92vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, .4);
	animation: project-modal-in .25s ease;
}

@keyframes project-modal-in {
	from {
		opacity: 0;
		transform: translateY(18px) scale(.96);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.project-modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	width: 2.4rem;
	height: 2.4rem;
	font-size: 1.4rem;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, .55);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease;
}

.project-modal-close:hover {
	background: #49bf9d;
	transform: rotate(90deg);
}

.project-modal .project-video {
	position: absolute;
	inset: 0;
	background: #000;
}

.project-modal .project-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	z-index: 3;
}

.project-modal .project-video-poster {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: pointer;
}

.project-modal .project-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .9);
	background: rgba(0, 0, 0, .55);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background-color .2s ease, transform .2s ease;
}

.project-modal .project-video-play svg {
	display: block;
	width: 32px;
	height: 36px;
}

.project-modal .project-video-play:hover {
	background: #49bf9d;
	transform: translate(-50%, -50%) scale(1.08);
}

.project-gallery {
	background: #fafafa;
}

.project-gallery-main-wrap {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.project-gallery-main {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	cursor: zoom-in;
	background: transparent;
}

.project-gallery-thumbs {
	display: flex;
	gap: .5rem;
	overflow-x: auto;
	padding: .35rem .75rem;
	border-top: solid 1px rgba(255, 255, 255, .08);
	background: #262626;
}

.project-gallery-thumb-wrap {
	flex-shrink: 0;
}

.project-gallery-thumb {
	display: block;
	position: relative;
	z-index: 1;
	width: 128px;
	height: 80px;
	flex-shrink: 0;
	object-fit: contain;
	padding: 4px;
	box-sizing: border-box;
	border-radius: 4px;
	border: solid 1px rgba(255, 255, 255, .14);
	cursor: pointer;
	opacity: .65;
	transition: opacity .2s ease, box-shadow .2s ease;
	background: transparent;
}

.project-gallery-thumb:hover {
	opacity: 1;
}

.project-gallery-thumb.is-active {
	opacity: 1;
	box-shadow: 0 0 0 2px #49bf9d;
}

.project-gallery-thumb-video {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #141414;
	font: inherit;
}

.project-gallery-thumb-video::after {
	content: '';
	width: 0;
	height: 0;
	border-left: 24px solid #f2f2f2;
	border-top: 14px solid transparent;
	border-bottom: 14px solid transparent;
	margin-left: 5px;
}

.project-modal-body {
	padding: 1.5rem 1.75rem 2rem;
}

.project-modal-title-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .75rem;
	margin-bottom: .6rem;
}

.project-modal-title {
	margin: 0;
	font-size: 1.6em;
	font-weight: 600;
	color: #444;
}

.project-modal .project-badge {
	position: static;
}

.project-modal-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	font-size: .9rem;
	margin-bottom: 1rem;
}

.project-modal-role {
	font-weight: 600;
	color: #49bf9d;
}

.project-modal-platforms {
	color: #a5a5a5;
}

.project-modal-short {
	font-size: .95rem;
	margin: 0 0 1rem;
}

.project-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin-bottom: 1.25rem;
}

.project-chip {
	font-size: .75rem;
	font-weight: 600;
	color: #0f7a5f;
	background: #eefaf6;
	border: solid 1px #cdebe2;
	border-radius: 2rem;
	padding: .28rem .65rem;
}

.project-tags {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin-top: 1.25rem;
}

.project-tag {
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .02em;
	color: #787878;
	background: #f5f5f5;
	border: solid 1px #e0e0e0;
	border-radius: 2rem;
	padding: .28rem .7rem;
}

.project-modal-desc p {
	margin: 0 0 1rem;
}

.project-modal-desc p:last-child {
	margin-bottom: 0;
}

.project-modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-top: 1.5rem;
}

/* ---------- lightbox ---------- */

.project-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1100;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .93);
	animation: project-overlay-in .2s ease;
}

.project-lightbox-img {
	max-width: 92vw;
	max-height: 84vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, .6);
	background: #1c1c1c;
}

.project-lightbox-btn {
	position: absolute;
	width: 2.75rem;
	height: 2.75rem;
	font-size: 1.5rem;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, .5);
	border: solid 1px rgba(255, 255, 255, .25);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.project-lightbox-btn:hover {
	background: #49bf9d;
	border-color: #49bf9d;
}

.project-lightbox-close {
	top: 1.25rem;
	right: 1.25rem;
}

.project-lightbox-prev {
	left: 1.25rem;
}

.project-lightbox-next {
	right: 1.25rem;
}

.project-lightbox-counter {
	position: absolute;
	bottom: 1.25rem;
	left: 0;
	right: 0;
	text-align: center;
	font-size: .85rem;
	color: #bbb;
}

/* ---------- responsive ---------- */

@media screen and (max-width: 736px) {
	.project-modal-overlay {
		padding: 0;
	}

	.project-modal {
		max-width: 100%;
		max-height: 100vh;
		height: 100vh;
		border-radius: 0;
		box-shadow: none;
	}

	.project-modal-body {
		padding: 1.25rem 1.25rem 1.75rem;
	}

	.project-gallery-thumb {
		width: 104px;
		height: 65px;
	}

	.project-lightbox-prev {
		left: .5rem;
	}

	.project-lightbox-next {
		right: .5rem;
	}
}

/* ---------- foto de perfil: tarjeta rectangular en todas las pantallas ---------- */

#header .image.avatar {
	aspect-ratio: 908 / 842;
	border: solid 2px #4b4b4b;
	border-radius: 1em;
	box-shadow: 0 0.5em 1.5em rgba(0, 0, 0, 0.35);
	display: block;
	margin: 0 auto 1.5em auto;
	max-width: 100%;
	object-fit: cover;
	width: 12em;
}

/* ---------- parrafos de la intro mas juntos ---------- */

#one p {
	margin-bottom: 1em;
}

/* ---------- sidebar centrado en pantallas medianas ---------- */

@media screen and (min-width: 981px) and (max-width: 1280px) {
	#header {
		align-items: center;
		padding: 6em 4em 3em 4em;
		text-align: center;
	}

	#header > .inner {
		flex-grow: 0;
		margin: 0;
	}

	#header .image.avatar {
		margin-bottom: 0;
	}

	#header h1 {
		font-size: 1em;
		line-height: 1.6em;
	}

	#header h1 br {
		display: inline;
	}

	#footer {
		padding: 0 0 2em 0;
	}

	#footer .icons {
		margin-top: 0;
	}
}

/* ---------- sidebar centrado y compacto en pantallas anchas ---------- */

@media screen and (min-width: 1281px) {
	#header {
		align-items: center;
		padding: 4em 2.5em 3em 2.5em;
		text-align: center;
		width: min(29%, 500px);
	}

	#header > .inner {
		flex-grow: 0;
		margin: 0;
	}

	#header .image.avatar {
		margin-bottom: 0;
	}

	#header h1 {
		font-size: 1em;
		line-height: 1.6em;
	}

	#footer {
		padding: 0 0 2em 0;
	}

	#footer .icons {
		margin-top: 0;
	}

	#footer .icons li .icon:before {
		font-size: 1.1em;
	}

	#main {
		margin-left: min(29%, 500px);
		max-width: none;
		padding: 4em 4em 4em 4em;
		width: calc(100% - min(29%, 500px));
	}

	#main > section {
		border-top: solid 2px #efefef;
		margin: 2em 0 0 0;
		padding: 2em 0 0 0;
	}

	#main > section:first-child {
		border-top: 0;
		margin-top: 0;
		padding-top: 0;
	}

	#main section header.major h2 {
		margin-bottom: 0.5em;
	}
}

/* ---------- moviles: texto e iconos del header mas compactos ---------- */

@media screen and (max-width: 980px) {
	#header h1 {
		font-size: 1.25em;
	}

	#footer .icons li .icon {
		font-size: 1em;
	}
}

@media screen and (max-width: 480px) {
	#header h1 br {
		display: inline;
	}
}
