/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
	--navy:    #1a1a2e;
	--navy2:   #16213e;
	--blue:    #4ea8de;
	--blue2:   #3a8fc5;
	--light:   #f4f6fb;
	--white:   #ffffff;
	--gray:    #64748b;
	--gray2:   #e2e8f0;
	--text:    #1e293b;
	--radius:  12px;
	--shadow:  0 4px 20px rgba(0,0,0,0.08);
	--transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
	background: var(--light);
	color: var(--text);
	min-height: 100vh;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	letter-spacing: -0.011em;
}

/* =========================================
   HEADER & NAV
   ========================================= */
#header {
	position: sticky;
	top: 0;
	z-index: 200;
	background: var(--navy);
	transition: box-shadow var(--transition);
}

#header.scrolled {
	box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.nav-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.nav-logo {
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--blue);
	text-decoration: none;
	letter-spacing: 1px;
	flex-shrink: 0;
}

#mainNav {
	display: flex;
	gap: 0.25rem;
	align-items: center;
}

.nav-link {
	color: rgba(255,255,255,0.75);
	text-decoration: none;
	padding: 0.45rem 0.85rem;
	border-radius: 8px;
	font-size: 0.9rem;
	font-weight: 500;
	transition: color var(--transition), background var(--transition);
	white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
	color: #fff;
	background: rgba(78,168,222,0.18);
}

.nav-link.active {
	color: var(--blue);
}

/* Hamburger */
.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
}
.nav-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	transition: var(--transition);
}

@media (max-width: 860px) {
	.nav-toggle { display: flex; }
	#mainNav {
		display: none;
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		background: var(--navy2);
		flex-direction: column;
		padding: 1rem;
		gap: 0.25rem;
		border-top: 1px solid rgba(255,255,255,0.08);
	}
	#mainNav.open { display: flex; }
	.nav-link { width: 100%; padding: 0.7rem 1rem; }
}

/* =========================================
   SECTIONS
   ========================================= */
.cv-section {
	max-width: 980px;
	margin: 2.5rem auto;
	padding: 0 1.5rem 2rem;
	animation: fadeIn 0.35s ease;
}

.cv-section.hidden { display: none; }

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.section-header {
	margin-bottom: 2.5rem;
	border-left: 4px solid var(--blue);
	padding-left: 1rem;
}

.section-header h2 {
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--navy);
}

.section-header p {
	color: var(--gray);
	margin-top: 0.3rem;
	font-size: 1rem;
}

/* =========================================
   HERO (INICIO)
   ========================================= */
#inicio {
	max-width: none;
	margin: 0;
	padding: 0;
}

.hero {
	background:
		linear-gradient(100deg, rgba(15,18,38,0.95) 0%, rgba(16,24,52,0.82) 45%, rgba(15,40,80,0.60) 100%),
		url('images/hero-bg.png') center center / cover no-repeat;
	color: #fff;
	overflow: hidden;
}

.hero-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
	min-height: calc(100vh - 64px);
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 2rem;
	align-items: center;
}

.hero-text {
	padding: 2rem 0;
}

.hero-tag {
	display: inline-block;
	background: rgba(78,168,222,0.2);
	color: var(--blue);
	border: 1px solid rgba(78,168,222,0.35);
	border-radius: 100px;
	padding: 0.25rem 0.85rem;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin-bottom: 1rem;
}

.hero h1 {
	font-size: 3.4rem;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.03em;
	margin-bottom: 0.4rem;
}

.hero-role {
	font-size: 1.4rem;
	font-weight: 500;
	color: var(--blue);
	letter-spacing: -0.01em;
	margin-bottom: 1.1rem;
}

.hero-desc {
	font-size: 1.05rem;
	color: rgba(255,255,255,0.78);
	max-width: 560px;
	margin-bottom: 1.75rem;
}

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

.hero-contact a {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	color: rgba(255,255,255,0.85);
	text-decoration: none;
	font-size: 0.9rem;
	background: rgba(255,255,255,0.07);
	border: 1px solid rgba(255,255,255,0.12);
	padding: 0.4rem 0.85rem;
	border-radius: 8px;
	transition: background var(--transition), color var(--transition);
}

.hero-contact a:hover {
	background: var(--blue);
	color: #fff;
	border-color: var(--blue);
}

.hero-photo {
	align-self: end;
	display: flex;
	justify-content: center;
}

.hero-photo img {
	width: 100%;
	max-width: 460px;
	height: auto;
	display: block;
	filter: grayscale(100%) drop-shadow(0 18px 40px rgba(0,0,0,0.35));
}

@media (max-width: 760px) {
	.hero-inner {
		grid-template-columns: 1fr;
		gap: 0;
		text-align: center;
		min-height: 0;
		padding: 2.5rem 1.5rem 0;
	}
	.hero-text { padding: 0 0 1.5rem; }
	.hero h1 { font-size: 2.4rem; }
	.hero-desc { margin-left: auto; margin-right: auto; }
	.hero-contact { justify-content: center; }
	.hero-photo img { max-width: 280px; }
}

/* =========================================
   HERRAMIENTAS
   ========================================= */
.tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 1rem;
}

.tool-card {
	background: var(--white);
	border: 1px solid var(--gray2);
	border-radius: var(--radius);
	padding: 1.25rem 0.5rem 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.7rem;
	transition: transform var(--transition), box-shadow var(--transition);
	cursor: default;
}

.tool-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(78,168,222,0.15);
}

.tool-card img {
	height: 40px;
	max-width: 80px;
	object-fit: contain;
}

.tool-card span {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--gray);
	text-align: center;
}

/* =========================================
   EXPERIENCIA — CABECERA + BADGE
   ========================================= */
.exp-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 2.5rem;
	flex-wrap: wrap;
}

.exp-header-row .section-header {
	margin-bottom: 0;
	flex: 1 1 320px;
}

.exp-badge {
	flex-shrink: 0;
	background: linear-gradient(135deg, var(--navy) 0%, #0f3460 100%);
	color: #fff;
	border-radius: var(--radius);
	padding: 1.1rem 1.6rem;
	text-align: center;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 140px;
}

.exp-badge-num {
	font-size: 2.6rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
}

.exp-badge-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--blue);
	margin-top: 0.3rem;
}

.exp-badge-months {
	font-size: 0.78rem;
	color: rgba(255,255,255,0.6);
	margin-top: 0.35rem;
}

/* =========================================
   TIMELINE (EXPERIENCIA)
   ========================================= */
.timeline {
	position: relative;
	padding-left: 2rem;
}

.timeline::before {
	content: '';
	position: absolute;
	left: 7px;
	top: 8px;
	bottom: 8px;
	width: 2px;
	background: var(--gray2);
}

.timeline-item {
	position: relative;
	margin-bottom: 2rem;
}

.timeline-dot {
	position: absolute;
	left: -2rem;
	top: 1.2rem;
	width: 16px;
	height: 16px;
	background: var(--blue);
	border: 3px solid var(--white);
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--blue);
}

.timeline-card {
	background: var(--white);
	border: 1px solid var(--gray2);
	border-radius: var(--radius);
	padding: 1.5rem 1.75rem;
	box-shadow: var(--shadow);
}

.timeline-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.company-info {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.company-logo {
	height: 38px;
	max-width: 96px;
	object-fit: contain;
	flex-shrink: 0;
}

.timeline-header h3 {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--navy);
}

.company {
	display: block;
	font-size: 0.9rem;
	color: var(--blue);
	font-weight: 600;
	margin-top: 0.15rem;
}

.timeline-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.4rem;
	flex-shrink: 0;
}

.date-badge {
	background: var(--light);
	border: 1px solid var(--gray2);
	border-radius: 100px;
	padding: 0.25rem 0.75rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--gray);
	white-space: nowrap;
	flex-shrink: 0;
}

.age-note {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--gray);
	white-space: nowrap;
}

.age-note i {
	color: var(--blue);
	font-size: 0.8rem;
}

.internship-note {
	font-size: 0.85rem;
	color: var(--gray);
	margin-bottom: 0.75rem;
	font-style: italic;
}

.timeline-card ul {
	padding-left: 1.25rem;
	color: var(--text);
}

.timeline-card ul li {
	margin-bottom: 0.45rem;
	font-size: 0.95rem;
}

/* =========================================
   FORMACIÓN ACADÉMICA
   ========================================= */
.academic-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2.5rem;
}

.academic-card {
	background: var(--white);
	border: 1px solid var(--gray2);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	gap: 1rem;
	transition: transform var(--transition), box-shadow var(--transition);
}

.academic-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 28px rgba(78,168,222,0.12);
}

.academic-main {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.academic-logo {
	height: 32px;
	max-width: 70px;
	object-fit: contain;
	flex-shrink: 0;
}

.academic-title {
	font-size: 0.97rem;
	font-weight: 700;
	color: var(--navy);
	line-height: 1.35;
}

.academic-school {
	font-size: 0.88rem;
	color: var(--blue);
	font-weight: 600;
	margin-top: 0.2rem;
}

.academic-years {
	font-size: 0.82rem;
	color: var(--gray);
	margin-top: 0.15rem;
}

.academic-toggle {
	background: transparent;
	color: var(--blue);
	border: 1.5px solid var(--blue);
	border-radius: 8px;
	padding: 0.4rem 0.9rem;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--transition), color var(--transition);
	font-family: inherit;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.academic-toggle:hover,
.academic-toggle.expanded {
	background: var(--blue);
	color: #fff;
}

.academic-toggle .fa-chevron-down {
	transition: transform var(--transition);
}

.academic-toggle.expanded .fa-chevron-down {
	transform: rotate(180deg);
}

.academic-details {
	display: none;
	background: var(--light);
	border-left: 3px solid var(--blue);
	border-radius: 0 8px 8px 0;
	padding: 1rem 1rem 0.75rem 1.1rem;
	font-size: 0.92rem;
}

.academic-details.open {
	display: block;
	animation: fadeIn 0.2s ease;
}

.academic-details ul {
	padding-left: 1rem;
}

.academic-details li {
	margin-bottom: 0.35rem;
	color: var(--text);
}

/* Idiomas */
.idiomas-block {
	background: var(--white);
	border: 1px solid var(--gray2);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.idiomas-block h3 {
	font-size: 1.1rem;
	color: var(--navy);
	margin-bottom: 1.1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.idiomas-grid {
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
}

.idioma-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.idioma-flag {
	font-size: 1.8rem;
}

.idioma-item strong {
	display: block;
	font-size: 1rem;
	color: var(--navy);
}

.idioma-level {
	font-size: 0.88rem;
	color: var(--gray);
}

.cert-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.82rem;
	color: var(--blue);
	text-decoration: none;
	margin-top: 0.2rem;
}

.cert-link:hover { text-decoration: underline; }

/* =========================================
   PLACEHOLDER (Inquietudes / Blog)
   ========================================= */
.placeholder {
	background: var(--white);
	border: 1px dashed var(--gray2);
	border-radius: var(--radius);
	padding: 4rem 2rem;
	text-align: center;
	color: var(--gray);
}

.placeholder i {
	font-size: 2.5rem;
	color: var(--blue);
	margin-bottom: 1rem;
}

.placeholder p {
	font-size: 1rem;
}


.hero-highlights {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255,255,255,0.12);
}

.hero-highlights span {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.82rem;
	color: rgba(255,255,255,0.78);
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.1);
	padding: 0.35rem 0.85rem;
	border-radius: 100px;
}

.hero-highlights span i {
	color: var(--blue);
	font-size: 0.78rem;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
	text-align: center;
	padding: 1.5rem;
	color: var(--gray);
	font-size: 0.85rem;
	border-top: 1px solid var(--gray2);
	margin-top: 1rem;
}

footer a {
	color: var(--blue);
	text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 600px) {
	.tools-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
	.timeline { padding-left: 1.5rem; }
	.timeline-header { flex-direction: column; }
	.timeline-meta { align-items: flex-start; }
	.section-header h2 { font-size: 1.6rem; }

	footer {
		padding: 1rem;
		font-size: 0.8rem;
		word-break: break-word;
	}
	.hero-highlights {
		justify-content: center;
	}
}
