/* ============================================================
   Accesibilidad & Quick Wins — Fase 1
   Devin Conde Mancilla | devinconde.com
   ============================================================ */

/* ---------- Skip link ---------- */
.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	background: #0C6AAF;
	color: #fff !important;
	padding: 0.75rem 1.25rem;
	border-radius: 4px;
	font-weight: 700;
	z-index: 10000;
	text-decoration: none;
	transition: top 0.2s ease-in-out;
}
.skip-link:focus,
.skip-link:focus-visible {
	top: 1rem;
	color: #fff !important;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------- Focus visible global ---------- */
:focus-visible {
	outline: 2px solid #0C6AAF;
	outline-offset: 3px;
	border-radius: 2px;
}
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
	box-shadow: 0 0 0 3px rgba(12, 106, 175, 0.35) !important;
	outline: none;
}
.form-control:focus-visible {
	border-color: #0C6AAF;
	box-shadow: 0 0 0 0.2rem rgba(12, 106, 175, 0.25);
}
a:focus-visible {
	outline: 2px solid #0C6AAF;
	outline-offset: 2px;
	border-radius: 2px;
}

/* Dark mode focus adjustments */
body.dark-mode :focus-visible {
	outline-color: #4D7CFF;
}
body.dark-mode .skip-link {
	background: #4D7CFF;
}

/* ---------- Dark mode toggle (header) ---------- */
.theme-toggle-btn {
	background: transparent;
	border: 1.5px solid rgba(255, 255, 255, 0.5);
	color: #fff;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: all 0.25s ease-in-out;
	position: absolute;
	top: 1.25rem;
	right: 1rem;
	z-index: 1100;
}
.theme-toggle-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.9);
	transform: rotate(15deg);
}
.theme-toggle-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}
.theme-toggle-btn .fa-sun { display: none; }
.theme-toggle-btn .fa-moon { display: inline-block; }
body.dark-mode .theme-toggle-btn .fa-sun { display: inline-block; }
body.dark-mode .theme-toggle-btn .fa-moon { display: none; }

@media (prefers-reduced-motion: reduce) {
	.theme-toggle-btn:hover { transform: none; }
}

/* En desktop: reposiciona dentro del sidebar (encima del nombre) */
@media (min-width: 992px) {
	.theme-toggle-btn { position: absolute; }
}

/* ---------- Dark mode toggle (sidebar) — ocultar bloque original ---------- */
.header .dark-mode-toggle { display: none; }

/* ---------- Smooth transitions ---------- */
body {
	transition: background-color 0.3s ease, color 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
	body { transition: none; }
}

/* ---------- Scroll progress (decorativo, lo añadimos en JS) ---------- */
.scroll-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	background: linear-gradient(90deg, #0C6AAF 0%, #4D7CFF 100%);
	width: 0;
	z-index: 9999;
	transition: width 0.1s linear;
}
body.dark-mode .scroll-progress {
	background: linear-gradient(90deg, #4D7CFF 0%, #FF7A4D 100%);
}
@media (prefers-reduced-motion: reduce) {
	.scroll-progress { transition: none; }
}

/* ---------- Mejoras de contraste para el brand color ---------- */
a.theme-link { color: #0a558c; }
a.theme-link:hover { color: #0C6AAF; }
body.dark-mode a.theme-link { color: rgba(255, 255, 255, 0.95); }

/* ---------- Imágenes responsivas con aspect-ratio ---------- */
.profile-image, .resume-profile-image {
	max-width: 100%;
	height: auto;
}

/* ---------- Print stylesheet básico para resumen.html ---------- */
@media print {
	.header, .footer, .theme-toggle-btn, .scroll-progress, .skip-link { display: none !important; }
	.main-wrapper { margin-left: 0 !important; }
	.resume-wrapper { box-shadow: none !important; border: 0 !important; }
	a { color: #000 !important; text-decoration: underline; }
	a[href]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
