/* ==========================================================================
   HG Tech Premium — estilos principales
   Mobile-first · Breakpoints: 700px (tablet) · 1024px (escritorio)
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
	--bg: #0B1220;
	--bg-deep: #070C17;
	--surface: #151F32;
	--surface-2: #1B2740;
	--surface-glass: rgba(21, 31, 50, 0.6);
	--accent: #38BDF8;
	--accent-strong: #0EA5E9;
	--accent-2: #818CF8;
	--accent-soft: rgba(56, 189, 248, 0.12);
	--accent-glow: rgba(56, 189, 248, 0.35);
	--text: #F1F5F9;
	--text-soft: #CBD5E1;
	--muted: #94A3B8;
	--muted-2: #64748B;
	--border: rgba(148, 163, 184, 0.12);
	--border-strong: rgba(148, 163, 184, 0.24);

	--font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-serif: "Lora", Georgia, "Times New Roman", serif;
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 22px;
	--shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.7);
	--shadow-lg: 0 30px 80px -30px rgba(2, 6, 23, 0.9);

	--container: 1120px;
	--narrow: 760px;
	--gutter: clamp(1rem, 4vw, 2rem);
	--header-h: 68px;
	--section-y: clamp(4rem, 9vw, 7.5rem);

	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--dur: 0.6s;
}

/* -------------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

body.nav-open {
	overflow: hidden;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-serif);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--text);
	margin: 0 0 0.6em;
}

p {
	margin: 0 0 1em;
}

button {
	font: inherit;
	color: inherit;
	cursor: pointer;
}

::selection {
	background: var(--accent);
	color: var(--bg);
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 0.75rem 1rem;
	background: var(--accent);
	color: var(--bg);
	border-radius: var(--radius-sm);
	font-weight: 600;
}

.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(var(--narrow) + var(--gutter) * 2);
}

.icon {
	flex-shrink: 0;
}

.text-gradient {
	background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 60%, var(--accent) 100%);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-style: italic;
	animation: gradient-shift 8s linear infinite;
}

@keyframes gradient-shift {
	to { background-position: 200% center; }
}

/* -------------------------------------------------------------------------
   3. Botones, chips, etiquetas
   ------------------------------------------------------------------------- */
.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 44px;
	padding: 0.65rem 1.15rem;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.25s var(--ease), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.btn .icon {
	transition: transform 0.25s var(--ease);
}

.btn:hover .icon--arrow-right {
	transform: translateX(3px);
}

.btn--primary {
	background: var(--accent);
	color: #04121F;
	box-shadow: 0 8px 24px -10px var(--accent-glow);
}

.btn--primary:hover {
	background: #7DD3FC;
	color: #04121F;
	transform: translateY(-1px);
	box-shadow: 0 14px 30px -10px var(--accent-glow);
}

.btn--ghost {
	background: var(--surface);
	border-color: var(--border);
	color: var(--text);
}

.btn--ghost:hover {
	background: var(--surface-2);
	border-color: var(--border-strong);
	color: var(--text);
	transform: translateY(-1px);
}

.btn--lg {
	min-height: 52px;
	padding: 0.8rem 1.4rem;
	font-size: 1rem;
}

.btn--ghost span {
	overflow: hidden;
	text-overflow: ellipsis;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tag {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	background: rgba(148, 163, 184, 0.08);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text-soft);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.6;
}

a.tag:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.chip {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0.35rem 0.9rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--muted);
	font-size: 0.875rem;
	font-weight: 500;
	transition: all 0.2s ease;
}

.chip:hover {
	color: var(--text);
	border-color: var(--border-strong);
}

.chip.is-active {
	background: var(--accent-soft);
	border-color: rgba(56, 189, 248, 0.45);
	color: var(--accent);
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.9rem;
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.eyebrow::before {
	content: "";
	width: 18px;
	height: 1px;
	background: currentColor;
	opacity: 0.6;
}

.eyebrow a {
	color: inherit;
}

.eyebrow--small {
	margin-bottom: 0.5rem;
	font-size: 0.6875rem;
}

.eyebrow--small::before {
	display: none;
}

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--text-soft);
	font-size: 0.95rem;
	font-weight: 500;
	white-space: nowrap;
}

.link-arrow .icon {
	transition: transform 0.25s var(--ease);
}

.link-arrow:hover {
	color: var(--accent);
}

.link-arrow:hover .icon {
	transform: translateX(4px);
}

/* -------------------------------------------------------------------------
   4. Cabecera y navegación
   ------------------------------------------------------------------------- */
.progress {
	position: fixed;
	inset: 0 0 auto;
	z-index: 120;
	height: 3px;
	pointer-events: none;
}

.progress__bar {
	display: block;
	height: 100%;
	width: 100%;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	transform: scaleX(var(--progress, 0));
	transform-origin: left;
	box-shadow: 0 0 12px var(--accent-glow);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-h);
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s ease, transform 0.35s var(--ease);
}

/*
 * El fondo desenfocado va en un pseudo-elemento: si el propio header tuviera
 * backdrop-filter, se convertiría en el bloque contenedor del menú móvil
 * (position: fixed) y el panel quedaría recortado a la altura de la cabecera.
 */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(11, 18, 32, 0.55);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	transition: background-color 0.3s ease;
	pointer-events: none;
}

.site-header.is-scrolled {
	border-bottom-color: var(--border);
}

.site-header.is-scrolled::before,
.nav-open .site-header::before {
	background: rgba(11, 18, 32, 0.92);
}

.site-header.is-hidden {
	transform: translateY(-100%);
}

/* Con el menú abierto la cabecera no se oculta ni se desplaza. */
.nav-open .site-header {
	transform: none;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	height: 100%;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--text);
	font-family: var(--font-serif);
	font-size: 1.125rem;
	font-weight: 500;
	white-space: nowrap;
}

.brand:hover {
	color: var(--text);
}

.brand__dot {
	position: relative;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft), 0 0 14px var(--accent-glow);
}

.brand:hover .brand__dot {
	animation: pulse 1.4s ease-out infinite;
}

.custom-logo-link img {
	max-height: 40px;
	width: auto;
}

.nav__list {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: var(--muted);
	font-size: 0.925rem;
	font-weight: 500;
}

.nav__link:hover,
.nav__link[aria-current="page"],
.nav__link.is-active {
	color: var(--text);
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.social {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social__link {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 10px;
	color: var(--muted);
	transition: all 0.2s ease;
}

.social__link:hover {
	background: var(--surface);
	border-color: var(--border);
	color: var(--accent);
	transform: translateY(-2px);
}

.nav-toggle {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
}

.nav-toggle__bars {
	position: relative;
	display: block;
	width: 18px;
	height: 12px;
}

.nav-toggle__bars span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: var(--text);
	border-radius: 2px;
	transition: transform 0.35s var(--ease), opacity 0.2s ease, top 0.35s var(--ease);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5px; }
.nav-toggle__bars span:nth-child(3) { top: 10px; }

.nav-open .nav-toggle__bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle__bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* Menú móvil / tablet */
@media (max-width: 1023px) {
	.social--header {
		display: none;
	}

	.nav {
		position: fixed;
		inset: var(--header-h) 0 0;
		z-index: 99;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 2rem;
		padding: 2rem var(--gutter) calc(2rem + env(safe-area-inset-bottom));
		background: rgba(7, 12, 23, 0.97);
		-webkit-backdrop-filter: blur(18px);
		backdrop-filter: blur(18px);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 0.3s ease, transform 0.4s var(--ease), visibility 0s linear 0.4s;
	}

	.nav-open .nav {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity 0.3s ease, transform 0.4s var(--ease), visibility 0s;
	}

	.nav__list {
		flex-direction: column;
		gap: 0.25rem;
	}

	.nav__list > li {
		opacity: 0;
		transform: translateY(10px);
		transition: opacity 0.4s ease, transform 0.5s var(--ease);
	}

	.nav-open .nav__list > li {
		opacity: 1;
		transform: none;
	}

	.nav-open .nav__list > li:nth-child(2) { transition-delay: 0.05s; }
	.nav-open .nav__list > li:nth-child(3) { transition-delay: 0.1s; }
	.nav-open .nav__list > li:nth-child(4) { transition-delay: 0.15s; }
	.nav-open .nav__list > li:nth-child(5) { transition-delay: 0.2s; }
	.nav-open .nav__list > li:nth-child(6) { transition-delay: 0.25s; }

	.nav__link {
		width: 100%;
		padding: 0.85rem 0;
		border-bottom: 1px solid var(--border);
		color: var(--text);
		font-family: var(--font-serif);
		font-size: 1.75rem;
	}

	.nav .sub-menu {
		margin: 0;
		padding: 0 0 0 1rem;
		list-style: none;
	}

	.nav .sub-menu .nav__link {
		font-family: var(--font-sans);
		font-size: 1.05rem;
		color: var(--muted);
	}

	.social--nav .social__link {
		width: 46px;
		height: 46px;
		background: var(--surface);
		border-color: var(--border);
	}
}

@media (min-width: 1024px) {
	.nav-toggle,
	.social--nav {
		display: none;
	}

	.nav {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}

	.nav__list {
		gap: 2rem;
	}

	.nav__list > li {
		position: relative;
	}

	.nav__link {
		padding: 0.5rem 0;
	}

	.nav__link::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 2px;
		height: 1px;
		background: var(--accent);
		transform: scaleX(0);
		transform-origin: right;
		transition: transform 0.35s var(--ease);
	}

	.nav__link:hover::after,
	.nav__link[aria-current="page"]::after,
	.nav__link.is-active::after {
		transform: scaleX(1);
		transform-origin: left;
	}

	.nav .sub-menu {
		position: absolute;
		top: 100%;
		left: -1rem;
		min-width: 220px;
		margin: 0;
		padding: 0.5rem;
		list-style: none;
		background: var(--surface);
		border: 1px solid var(--border);
		border-radius: var(--radius);
		box-shadow: var(--shadow-lg);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: all 0.25s var(--ease);
	}

	.nav li:hover > .sub-menu,
	.nav li:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.nav .sub-menu .nav__link {
		display: flex;
		padding: 0.5rem 0.75rem;
		border-radius: var(--radius-sm);
	}

	.nav .sub-menu .nav__link::after {
		display: none;
	}

	.nav .sub-menu .nav__link:hover {
		background: var(--surface-2);
	}
}

/* -------------------------------------------------------------------------
   5. Hero de portada
   ------------------------------------------------------------------------- */
.hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-top: calc(var(--header-h) * -1);
	padding: calc(var(--header-h) + clamp(3rem, 9vw, 6.5rem)) 0 clamp(4rem, 9vw, 7rem);
	border-bottom: 1px solid var(--border);
	--mx: 70%;
	--my: 30%;
}

.hero__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(600px circle at var(--mx) var(--my), rgba(56, 189, 248, 0.10), transparent 60%),
		linear-gradient(180deg, #0D1A2E 0%, var(--bg) 100%);
	transition: background 0.2s linear;
}

.hero__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: 0.55;
	animation: float 18s ease-in-out infinite alternate;
}

.hero__glow--1 {
	top: -15%;
	left: -10%;
	width: 55vw;
	max-width: 720px;
	aspect-ratio: 1;
	background: radial-gradient(circle, rgba(14, 116, 144, 0.55), transparent 65%);
}

.hero__glow--2 {
	right: -10%;
	bottom: -30%;
	width: 45vw;
	max-width: 560px;
	aspect-ratio: 1;
	background: radial-gradient(circle, rgba(99, 102, 241, 0.28), transparent 65%);
	animation-delay: -9s;
}

.hero__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
	background-size: 64px 64px;
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}

@keyframes float {
	0% { transform: translate3d(0, 0, 0) scale(1); }
	50% { transform: translate3d(4%, 6%, 0) scale(1.08); }
	100% { transform: translate3d(-3%, 2%, 0) scale(0.96); }
}

.hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3rem;
	align-items: start;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 1.75rem;
	padding: 0.4rem 0.9rem 0.4rem 0.75rem;
	background: rgba(21, 31, 50, 0.7);
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	color: var(--text-soft);
	font-size: 0.8125rem;
	line-height: 1.4;
}

.badge__pulse {
	position: relative;
	width: 8px;
	height: 8px;
	flex-shrink: 0;
	border-radius: 50%;
	background: #34D399;
}

.badge__pulse::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: inherit;
	animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
	75%, 100% { transform: scale(2.6); opacity: 0; }
}

@keyframes pulse {
	0% { box-shadow: 0 0 0 0 var(--accent-glow); }
	100% { box-shadow: 0 0 0 10px transparent; }
}

.hero__title {
	max-width: 19ch;
	margin-bottom: 1.5rem;
	font-size: clamp(2.3rem, 5.6vw, 4rem);
	line-height: 1.06;
	letter-spacing: -0.025em;
	color: #E2ECF7;
}

.hero__text {
	max-width: 54ch;
	margin-bottom: 2rem;
	color: var(--muted);
	font-size: clamp(1.05rem, 1.6vw, 1.175rem);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	max-width: 520px;
	margin: 3rem 0 0;
	padding-top: 1.75rem;
	border-top: 1px solid var(--border);
}

.stats__item {
	min-width: 0;
}

.stats__value {
	font-family: var(--font-serif);
	font-size: clamp(1.6rem, 3.5vw, 2.25rem);
	line-height: 1.1;
	color: var(--text);
	font-variant-numeric: tabular-nums;
}

.stats__label {
	margin: 0.35rem 0 0;
	color: var(--muted);
	font-size: 0.8125rem;
	line-height: 1.4;
}

/* Tarjeta lateral */
.focus {
	position: relative;
	padding: 1.5rem;
	background: linear-gradient(180deg, rgba(27, 39, 64, 0.75), rgba(21, 31, 50, 0.55));
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	transform-style: preserve-3d;
	transition: transform 0.3s var(--ease);
}

.focus::before {
	content: "";
	position: absolute;
	inset: -1px;
	z-index: -1;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(140deg, rgba(56, 189, 248, 0.6), transparent 40%, transparent 60%, rgba(129, 140, 248, 0.5));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
}

.focus__profile {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--border);
}

.focus__photo {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent);
}

.focus__name {
	margin: 0;
	font-family: var(--font-serif);
	font-size: 1.125rem;
}

.focus__desc {
	margin: 0;
	color: var(--muted);
	font-size: 0.875rem;
	line-height: 1.4;
}

.focus__title {
	margin: 0 0 0.9rem;
	color: var(--text-soft);
	font-size: 0.8125rem;
	font-weight: 500;
}

.focus__list {
	display: grid;
	gap: 0.7rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.focus__list li {
	position: relative;
	padding-left: 1.2rem;
	color: var(--text-soft);
	font-size: 0.925rem;
	line-height: 1.45;
}

.focus__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 8px var(--accent-glow);
}

.focus__terminal {
	margin-top: 1.4rem;
	padding: 0.75rem 0.9rem;
	background: rgba(7, 12, 23, 0.7);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text-soft);
	font-family: var(--font-mono);
	font-size: 0.8rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.focus__prompt {
	color: var(--accent);
}

.focus__caret {
	display: inline-block;
	width: 7px;
	height: 1em;
	margin-left: 2px;
	vertical-align: -0.15em;
	background: var(--accent);
	animation: blink 1s steps(1) infinite;
}

@keyframes blink {
	50% { opacity: 0; }
}

@media (min-width: 900px) {
	.hero__inner {
		grid-template-columns: minmax(0, 1fr) 340px;
		gap: 4rem;
	}

	.focus {
		margin-top: 0.5rem;
	}
}

@media (max-width: 480px) {
	.hero__actions .btn {
		flex: 1 1 auto;
	}

	.stats {
		gap: 0.75rem;
	}
}

/* -------------------------------------------------------------------------
   6. Secciones
   ------------------------------------------------------------------------- */
.section {
	position: relative;
	padding-block: var(--section-y);
}

.section--tight {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section--alt {
	background: linear-gradient(180deg, var(--bg-deep), var(--bg));
	border-block: 1px solid var(--border);
}

.section--about {
	padding-bottom: 0;
}

.section--about .entry-content {
	font-size: clamp(1.1rem, 2vw, 1.3rem);
	color: var(--text-soft);
}

.section__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__title {
	margin-bottom: 0.5rem;
	font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.section__text {
	max-width: 56ch;
	margin: 0;
	color: var(--muted);
}

.grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
}

@media (min-width: 700px) {
	.grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.5rem;
	}
}

/* -------------------------------------------------------------------------
   7. Tarjetas (con efecto "spotlight" que sigue al cursor)
   ------------------------------------------------------------------------- */
[data-spotlight] {
	--mx: 50%;
	--my: 50%;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: linear-gradient(180deg, rgba(21, 31, 50, 0.9), rgba(17, 26, 43, 0.9));
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	transition: transform 0.4s var(--ease), border-color 0.3s ease, box-shadow 0.4s var(--ease);
}

.card::before,
.timeline__card::before,
.cta::before,
.post-nav__link::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	border-radius: inherit;
	background: radial-gradient(420px circle at var(--mx) var(--my), rgba(56, 189, 248, 0.09), transparent 45%);
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.card:hover::before,
.timeline__card:hover::before,
.cta:hover::before,
.post-nav__link:hover::before {
	opacity: 1;
}

.card:hover {
	transform: translateY(-4px);
	border-color: rgba(56, 189, 248, 0.3);
	box-shadow: 0 30px 60px -30px rgba(2, 6, 23, 0.9), 0 0 0 1px rgba(56, 189, 248, 0.06);
}

.card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-bottom: 1px solid var(--border);
	background: var(--surface-2);
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s var(--ease), filter 0.5s ease;
	filter: saturate(0.9);
}

.card:hover .card__media img {
	transform: scale(1.05);
	filter: saturate(1.05);
}

.card__body {
	position: relative;
	z-index: 1;
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.5rem;
}

.card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.card__title {
	margin: 0 0 0.75rem;
	font-size: 1.3rem;
	line-height: 1.3;
}

.card__link {
	color: var(--text);
}

/* Toda la tarjeta clicable */
.card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.card__link:hover {
	color: var(--text);
}

.card__arrow {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border: 1px solid var(--border-strong);
	border-radius: 50%;
	color: var(--text-soft);
	transition: all 0.35s var(--ease);
}

.card:hover .card__arrow {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--bg);
	transform: rotate(45deg);
}

.card__meta {
	margin: -0.35rem 0 0.6rem;
	color: var(--muted-2);
	font-family: var(--font-mono);
	font-size: 0.75rem;
}

.card__excerpt {
	flex: 1;
	margin-bottom: 1.25rem;
	color: var(--muted);
	font-size: 0.95rem;
	line-height: 1.65;
}

.card .tags {
	position: relative;
	z-index: 2;
}

.card__foot {
	padding-top: 1rem;
	border-top: 1px solid var(--border);
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	color: var(--muted);
	font-size: 0.8125rem;
}

.post-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

/* Animación del filtro */
.card.is-hidden {
	display: none;
}

.card.is-filtered-in {
	animation: card-in 0.5s var(--ease) both;
}

@keyframes card-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
}

/* -------------------------------------------------------------------------
   8. Línea temporal (experiencia)
   ------------------------------------------------------------------------- */
.timeline {
	position: relative;
	display: grid;
	gap: 1.25rem;
	margin: 0;
	padding: 0 0 0 1.75rem;
	list-style: none;
}

.timeline::before {
	content: "";
	position: absolute;
	left: 6px;
	top: 0.75rem;
	bottom: 0.75rem;
	width: 1px;
	background: linear-gradient(180deg, var(--accent), var(--border-strong) 30%, transparent);
}

.timeline__item {
	position: relative;
}

.timeline__dot {
	position: absolute;
	left: calc(-1.75rem + 1px);
	top: 1.75rem;
	width: 11px;
	height: 11px;
	border: 2px solid var(--muted-2);
	border-radius: 50%;
	background: var(--bg);
}

.timeline__item.is-current .timeline__dot {
	border-color: var(--accent);
	background: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-soft), 0 0 16px var(--accent-glow);
}

.timeline__card {
	position: relative;
	padding: 1.4rem 1.5rem;
	background: var(--surface-glass);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	transition: border-color 0.3s ease, transform 0.4s var(--ease);
}

.timeline__card > * {
	position: relative;
	z-index: 1;
}

.timeline__card:hover {
	border-color: var(--border-strong);
	transform: translateX(4px);
}

.timeline__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
}

.timeline__role {
	margin: 0 0 0.2rem;
	font-size: 1.2rem;
}

.timeline__company {
	margin: 0;
	color: var(--accent);
	font-size: 0.95rem;
	font-weight: 500;
}

.timeline__location {
	color: var(--muted);
	font-weight: 400;
}

.timeline__period {
	padding: 0.2rem 0.65rem;
	background: rgba(148, 163, 184, 0.08);
	border-radius: 999px;
	color: var(--text-soft);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	white-space: nowrap;
}

.timeline__content {
	margin-top: 0.9rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.timeline__content > :last-child {
	margin-bottom: 0;
}

.timeline__card .tags {
	margin-top: 1rem;
}

@media (min-width: 700px) {
	.timeline {
		padding-left: 2.5rem;
	}

	.timeline__dot {
		left: calc(-2.5rem + 1px);
	}
}

/* -------------------------------------------------------------------------
   9. Llamada a la acción (contacto)
   ------------------------------------------------------------------------- */
.cta {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
	background: linear-gradient(160deg, #13223A 0%, var(--surface) 50%, #101A2C 100%);
	border: 1px solid var(--border-strong);
	border-radius: calc(var(--radius-lg) + 6px);
	text-align: center;
}

.cta > * {
	position: relative;
	z-index: 1;
}

.cta .eyebrow {
	justify-content: center;
}

.cta__glow {
	position: absolute;
	left: 50%;
	top: -60%;
	z-index: -1;
	width: 80%;
	aspect-ratio: 2 / 1;
	transform: translateX(-50%);
	background: radial-gradient(ellipse, rgba(56, 189, 248, 0.25), transparent 65%);
	filter: blur(30px);
}

.cta__title {
	max-width: 20ch;
	margin-inline: auto;
	font-size: clamp(1.9rem, 4.6vw, 3rem);
}

.cta__text {
	max-width: 52ch;
	margin: 0 auto 2rem;
	color: var(--muted);
}

.cta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.cta__actions .btn {
	max-width: 100%;
}

.social--cta {
	justify-content: center;
}

/* -------------------------------------------------------------------------
   10. Cabeceras de página interiores
   ------------------------------------------------------------------------- */
.page-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	margin-top: calc(var(--header-h) * -1);
	padding: calc(var(--header-h) + clamp(2.5rem, 7vw, 5rem)) 0 clamp(2rem, 5vw, 3.5rem);
}

.page-hero__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(900px 400px at 15% -10%, rgba(14, 116, 144, 0.35), transparent 60%),
		radial-gradient(700px 300px at 90% 0%, rgba(99, 102, 241, 0.12), transparent 60%);
}

.page-hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
	mask-image: linear-gradient(180deg, #000, transparent 85%);
}

.page-hero__title {
	max-width: 22ch;
	margin-bottom: 1rem;
	font-size: clamp(2.1rem, 5.5vw, 3.6rem);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.page-hero--article .page-hero__title {
	max-width: none;
}

.page-hero__lead,
.page-hero__text {
	max-width: 60ch;
	color: var(--muted);
	font-size: clamp(1.05rem, 1.8vw, 1.2rem);
}

.page-hero__text p:last-child {
	margin-bottom: 0;
}

.blog-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 2rem;
}

.search-form {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 320px;
}

.search-form .icon {
	position: absolute;
	left: 0.9rem;
	color: var(--muted);
	pointer-events: none;
}

.search-form__input {
	width: 100%;
	min-height: 42px;
	padding: 0.55rem 1rem 0.55rem 2.5rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--text);
	font: inherit;
	font-size: 0.925rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form__input::placeholder {
	color: var(--muted-2);
}

.search-form__input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-soft);
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 1.5rem;
	color: var(--muted);
	font-size: 0.875rem;
}

.empty {
	display: grid;
	justify-items: center;
	gap: 0.5rem;
	padding: 4rem 1rem;
	text-align: center;
	color: var(--muted);
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius-lg);
}

.empty h2 {
	margin: 0.5rem 0 0;
	font-size: 1.5rem;
}

/* Paginación */
.pagination {
	margin-top: 3rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
}

.page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 0.75rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text-soft);
	font-size: 0.925rem;
	font-weight: 500;
}

a.page-numbers:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.page-numbers.current {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--bg);
}

.page-numbers.dots {
	background: none;
	border: 0;
}

/* -------------------------------------------------------------------------
   11. Artículo
   ------------------------------------------------------------------------- */
.article__byline {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-top: 1.75rem;
}

.article__avatar,
.author-box img,
.comment-author img {
	border-radius: 50%;
}

.article__author {
	margin: 0;
	font-weight: 600;
	font-size: 0.95rem;
}

.article__cover {
	margin-block: 0 clamp(2rem, 5vw, 3.5rem);
}

.article__cover img {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
}

.article__layout {
	display: grid;
	gap: 3rem;
	max-width: calc(var(--narrow) + var(--gutter) * 2);
}

.has-sidebar .article__layout {
	max-width: calc(var(--container) + var(--gutter) * 2);
}

@media (min-width: 1024px) {
	.has-sidebar .article__layout {
		grid-template-columns: minmax(0, var(--narrow)) 280px;
		justify-content: space-between;
	}

	.article__sidebar {
		position: sticky;
		top: calc(var(--header-h) + 2rem);
		align-self: start;
	}
}

.article__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
}

.share {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.share__label {
	margin-right: 0.5rem;
	color: var(--muted);
	font-size: 0.875rem;
}

.author-box {
	display: flex;
	gap: 1.25rem;
	margin-top: 2.5rem;
	padding: 1.5rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

.author-box img {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
}

.author-box__name {
	margin: 0 0 0.25rem;
	font-family: var(--font-serif);
	font-size: 1.15rem;
}

.author-box__bio {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.post-nav {
	display: grid;
	gap: 1rem;
	margin-block: 1rem;
}

@media (min-width: 700px) {
	.post-nav {
		grid-template-columns: 1fr 1fr;
	}
}

.post-nav__link {
	position: relative;
	overflow: hidden;
	display: grid;
	gap: 0.35rem;
	padding: 1.25rem 1.4rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	transition: border-color 0.3s ease, transform 0.3s var(--ease);
}

.post-nav__link:hover {
	border-color: rgba(56, 189, 248, 0.35);
	color: var(--text);
	transform: translateY(-2px);
}

.post-nav__link--next {
	text-align: right;
	grid-column: -2;
}

.post-nav__label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--muted);
	font-size: 0.8125rem;
}

.post-nav__link--next .post-nav__label {
	justify-content: flex-end;
}

.post-nav__title {
	font-family: var(--font-serif);
	font-size: 1.1rem;
	line-height: 1.35;
}

/* Widgets */
.widget {
	margin-bottom: 2rem;
	padding: 1.4rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-size: 0.95rem;
}

.widget__title {
	margin-bottom: 1rem;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li {
	padding: 0.4rem 0;
	border-bottom: 1px solid var(--border);
}

.widget li:last-child {
	border-bottom: 0;
}

.widget a {
	color: var(--text-soft);
}

.widget a:hover {
	color: var(--accent);
}

/* -------------------------------------------------------------------------
   12. Contenido editorial (bloques de Gutenberg)
   ------------------------------------------------------------------------- */
.entry-content {
	color: var(--text-soft);
	font-size: 1.0625rem;
	line-height: 1.8;
}

.page-content {
	padding-bottom: var(--section-y);
}

.entry-content > * {
	margin-block: 0 1.4em;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 2.2em;
	margin-bottom: 0.7em;
	color: var(--text);
}

.entry-content h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.entry-content h3 { font-size: clamp(1.3rem, 2.4vw, 1.5rem); }
.entry-content h4 { font-size: 1.15rem; font-family: var(--font-sans); font-weight: 600; }

.entry-content a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: rgba(56, 189, 248, 0.4);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.entry-content a:hover {
	color: #7DD3FC;
	text-decoration-color: currentColor;
}

.entry-content a.wp-block-button__link,
.entry-content .tags a {
	text-decoration: none;
}

.entry-content strong {
	color: var(--text);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4em;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content li::marker {
	color: var(--accent);
}

.entry-content blockquote,
.entry-content .wp-block-quote {
	margin-inline: 0;
	padding: 0.25rem 0 0.25rem 1.5rem;
	border-left: 2px solid var(--accent);
	font-family: var(--font-serif);
	font-size: 1.25rem;
	font-style: italic;
	color: var(--text);
}

.entry-content blockquote cite {
	display: block;
	margin-top: 0.75rem;
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-style: normal;
	color: var(--muted);
}

.entry-content .wp-block-pullquote {
	padding: 2rem 0;
	border-block: 1px solid var(--border-strong);
}

.entry-content .wp-block-pullquote blockquote {
	border: 0;
	padding: 0;
	text-align: center;
	font-size: 1.6rem;
}

.entry-content code {
	padding: 0.15em 0.4em;
	background: rgba(56, 189, 248, 0.08);
	border: 1px solid var(--border);
	border-radius: 6px;
	color: #7DD3FC;
	font-family: var(--font-mono);
	font-size: 0.875em;
}

.entry-content pre,
.entry-content .wp-block-code {
	position: relative;
	overflow-x: auto;
	padding: 1.25rem 1.4rem;
	background: var(--bg-deep);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text-soft);
	font-family: var(--font-mono);
	font-size: 0.875rem;
	line-height: 1.7;
	tab-size: 4;
}

.entry-content pre code {
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	font-size: inherit;
}

.copy-code {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	color: var(--muted);
	opacity: 0;
	transition: opacity 0.2s ease, color 0.2s ease;
}

pre:hover .copy-code,
.copy-code:focus-visible {
	opacity: 1;
}

.copy-code:hover {
	color: var(--accent);
}

.entry-content img,
.entry-content .wp-block-image img {
	border-radius: var(--radius);
}

.entry-content figcaption,
.entry-content .wp-element-caption {
	margin-top: 0.7rem;
	color: var(--muted-2);
	font-size: 0.85rem;
	text-align: center;
}

.entry-content hr,
.entry-content .wp-block-separator {
	margin-block: 3rem;
	border: 0;
	border-top: 1px solid var(--border-strong);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.entry-content .wp-block-table {
	overflow-x: auto;
}

.entry-content th,
.entry-content td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--border);
	text-align: left;
}

.entry-content th {
	color: var(--text);
	font-weight: 600;
}

.entry-content .alignwide {
	max-width: var(--container);
	margin-inline: auto;
}

@media (min-width: 1024px) {
	.entry-content .alignwide {
		margin-inline: calc((var(--narrow) - var(--container)) / 2);
	}
}

.entry-content .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
}

.entry-content .alignfull img {
	border-radius: 0;
}

.alignleft {
	float: left;
	margin: 0.3rem 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.3rem 0 1rem 1.5rem;
}

.aligncenter {
	margin-inline: auto;
}

.wp-block-button__link {
	border-radius: 10px;
	font-weight: 600;
	transition: transform 0.25s var(--ease), filter 0.25s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-1px);
	filter: brightness(1.1);
}

.is-style-outline > .wp-block-button__link {
	border-color: var(--border-strong);
	color: var(--text);
}

.page-links {
	margin-top: 2rem;
	font-weight: 600;
}

/* -------------------------------------------------------------------------
   13. Proyecto individual
   ------------------------------------------------------------------------- */
.project__intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	align-items: end;
}

@media (min-width: 900px) {
	.project__intro {
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 4rem;
	}
}

.facts {
	padding: 1.4rem;
	background: var(--surface-glass);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.facts__list {
	display: grid;
	gap: 0.9rem;
	margin: 0 0 1.25rem;
}

.facts__list div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 0.9rem;
	border-bottom: 1px solid var(--border);
}

.facts dt,
.facts__label {
	margin: 0;
	color: var(--muted);
	font-size: 0.875rem;
}

.facts__label {
	margin-bottom: 0.6rem;
}

.facts dd {
	margin: 0;
	color: var(--text);
	font-weight: 500;
	text-align: right;
}

/* -------------------------------------------------------------------------
   14. Currículum
   ------------------------------------------------------------------------- */
.cv-hero {
	display: grid;
	gap: 1.5rem;
	align-items: center;
}

@media (min-width: 700px) {
	.cv-hero {
		grid-template-columns: auto 1fr;
		gap: 2.5rem;
	}
}

.cv-hero__photo {
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: 28px;
	box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-lg);
}

.cv-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.5rem;
}

@media (min-width: 1024px) {
	.cv-layout {
		grid-template-columns: 320px minmax(0, 1fr);
		gap: 4rem;
	}

	.cv-aside {
		position: sticky;
		top: calc(var(--header-h) + 1.5rem);
		align-self: start;
	}
}

@media (min-width: 700px) and (max-width: 1023px) {
	.cv-aside {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.25rem;
	}

	.cv-aside .panel {
		margin: 0;
	}
}

.panel {
	margin-bottom: 1.25rem;
	padding: 1.4rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

.panel__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.1rem;
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.panel__list {
	display: grid;
	gap: 0.7rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	font-size: 0.925rem;
	color: var(--text-soft);
}

.panel__list li {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	min-width: 0;
	word-break: break-word;
}

.panel__list .icon {
	color: var(--muted);
}

.panel__list a {
	color: var(--text-soft);
}

.panel__list a:hover {
	color: var(--accent);
}

.social--panel {
	margin-left: -0.5rem;
}

.skill-group + .skill-group {
	margin-top: 1.1rem;
}

.skill-group__title {
	margin: 0 0 0.5rem;
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 600;
}

.lang-list {
	display: grid;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.925rem;
}

.lang-list li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.lang-list__level {
	color: var(--muted);
}

.cv-section + .cv-section {
	margin-top: 3.5rem;
}

.cv-section__title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1.75rem;
	font-size: clamp(1.5rem, 3vw, 1.9rem);
}

.cv-section__title .icon {
	color: var(--accent);
}

/* -------------------------------------------------------------------------
   15. Comentarios
   ------------------------------------------------------------------------- */
.comments__title {
	margin-bottom: 1.5rem;
	font-size: 1.6rem;
}

.comment-list,
.comment-list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin-top: 1rem;
	padding-left: clamp(1rem, 4vw, 2.5rem);
	border-left: 1px solid var(--border);
}

.comment-body {
	margin-bottom: 1rem;
	padding: 1.25rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.comment-author .fn {
	font-style: normal;
	font-weight: 600;
}

.comment-author .says {
	display: none;
}

.comment-metadata {
	margin: 0.25rem 0 0.75rem;
	font-size: 0.8125rem;
}

.comment-metadata a {
	color: var(--muted);
}

.comment-content {
	color: var(--text-soft);
	font-size: 0.975rem;
}

.reply a {
	font-size: 0.875rem;
	font-weight: 600;
}

.comment-respond {
	margin-top: 2.5rem;
}

.comment-form {
	display: grid;
	gap: 1rem;
}

.comment-form label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--text-soft);
	font-size: 0.875rem;
	font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text);
	font: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-soft);
}

.comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	color: var(--muted);
	font-size: 0.875rem;
}

.comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
}

.comment-notes,
.logged-in-as {
	color: var(--muted);
	font-size: 0.875rem;
}

.comment-form .submit {
	border: 0;
}

/* -------------------------------------------------------------------------
   16. 404
   ------------------------------------------------------------------------- */
.page-hero--404 {
	min-height: 80vh;
	display: grid;
	align-items: center;
	text-align: center;
}

.not-found .page-hero__title,
.not-found .page-hero__lead {
	margin-inline: auto;
}

.not-found__code {
	margin: 0;
	font-family: var(--font-mono);
	font-size: clamp(5rem, 18vw, 9rem);
	font-weight: 700;
	line-height: 1;
	background: linear-gradient(180deg, var(--accent), rgba(56, 189, 248, 0.05));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.not-found__search {
	display: flex;
	justify-content: center;
	margin: 1.5rem 0 2rem;
}

.not-found .hero__actions {
	justify-content: center;
}

/* -------------------------------------------------------------------------
   17. Pie
   ------------------------------------------------------------------------- */
.site-footer {
	margin-top: 2rem;
	padding-top: 3rem;
	background: var(--bg-deep);
	border-top: 1px solid var(--border);
}

.site-footer__inner {
	display: grid;
	gap: 2rem;
	padding-bottom: 2.5rem;
}

@media (min-width: 700px) {
	.site-footer__inner {
		grid-template-columns: 1fr auto auto;
		align-items: center;
	}
}

.site-footer__text {
	margin: 0.6rem 0 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-nav a {
	color: var(--muted);
	font-size: 0.925rem;
}

.footer-nav a:hover {
	color: var(--text);
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	padding-block: 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
	border-top: 1px solid var(--border);
	color: var(--muted-2);
	font-size: 0.8125rem;
}

.site-footer__bottom p {
	margin: 0;
}

.site-footer__location {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

/* Botón volver arriba y aviso */
.to-top {
	position: fixed;
	right: max(1rem, env(safe-area-inset-right));
	bottom: max(1rem, env(safe-area-inset-bottom));
	z-index: 90;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: 50%;
	color: var(--text);
	box-shadow: var(--shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: all 0.35s var(--ease);
}

.to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.to-top:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	z-index: 200;
	padding: 0.7rem 1.1rem;
	background: var(--surface-2);
	border: 1px solid rgba(56, 189, 248, 0.4);
	border-radius: 999px;
	color: var(--text);
	font-size: 0.9rem;
	box-shadow: var(--shadow-lg);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 16px);
	transition: all 0.35s var(--ease);
}

.toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.toast:empty {
	display: none;
}

/* -------------------------------------------------------------------------
   18. Animaciones de aparición (solo con JS activo)
   ------------------------------------------------------------------------- */
.js [data-reveal] {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
	transition-delay: var(--delay, 0s);
}

.js [data-reveal].is-revealed {
	opacity: 1;
	transform: none;
}

/* Las tarjetas mantienen su propia transición tras aparecer */
.js .card[data-reveal].is-revealed {
	transition: opacity var(--dur) var(--ease), transform 0.4s var(--ease), border-color 0.3s ease, box-shadow 0.4s var(--ease);
}

.js .card[data-reveal].is-revealed:hover {
	transform: translateY(-4px);
}

.js .timeline__item[data-reveal] {
	transform: translateX(-12px);
}

.js .timeline__item[data-reveal].is-revealed {
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.js [data-reveal] {
		opacity: 1;
		transform: none;
	}
}

/* -------------------------------------------------------------------------
   19. Impresión (útil para imprimir el CV)
   ------------------------------------------------------------------------- */
@media print {
	:root {
		--bg: #fff;
		--surface: #fff;
		--text: #0B1220;
		--text-soft: #1e293b;
		--muted: #475569;
		--border: #e2e8f0;
	}

	body {
		background: #fff;
		color: #0B1220;
	}

	.site-header,
	.site-footer,
	.to-top,
	.toast,
	.progress,
	#contacto,
	.hero__actions,
	.page-hero__bg,
	.share,
	.comments {
		display: none !important;
	}

	.page-hero {
		margin-top: 0;
		padding-top: 1rem;
	}

	.js [data-reveal] {
		opacity: 1 !important;
		transform: none !important;
	}

	.cv-aside {
		position: static;
	}
}
