@import url("https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap");
/* ========================================
   PORTFOLIO - ROGELIO MUÑOZ MUÑOZ
   Desktop-First · Paleta Formal · Ejecutivo
   Con: Dark Mode, Animaciones, Mejoras UX
   ======================================== */

@keyframes shimmer {
  0% {
    transform: translateX(-150%) skewX(-25deg);
  }
  100% {
    transform: translateX(150%) skewX(-25deg);
  }
}

/* ========== VARIABLES ========== */
:root {
  /* Paleta Formal Corporativa */
  --brand-900: #0f1a2a;
  --brand-800: #1a2744;
  --brand-700: #1e3a5f;
  --brand-600: #2c4a6e;
  --brand-500: #34567d;
  --brand-400: #4a6d94;
  --brand-300: #7a9ab8;

  /* Dorado sutil */
  --accent-gold: #b8a06a;
  --accent-gold-dark: #9a8554;
  --share-main-border: var(--accent-gold);
  --share-main-border-hover: var(--accent-gold-dark);
  --share-main-bg: var(--brand-900);
  --share-main-bg-hover: var(--brand-800);
  --share-main-color: var(--bg-card);
  --share-main-shadow: 0 10px 24px rgba(15, 26, 42, 0.18);
  --share-main-shadow-hover: 0 14px 30px rgba(15, 26, 42, 0.24);

  /* Superficies */
  --surface: #f8f9fa;
  --surface-alt: #f0f2f4;
  --bg-card: #ffffff;

  /* Texto */
  --text: #1a1f26;
  --text-secondary: #4a5568;
  --muted: #718096;

  /* Bordes */
  --border: #d2d6dc;
  --border-light: #e8eaed;

  /* Tipografía */
  --font-serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Espaciado */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 800px;
  --content-max: 100%;

  /* Radios y sombras */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 3px rgba(15, 26, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 26, 42, 0.1);
  --shadow-lg: 0 8px 24px rgba(15, 26, 42, 0.14);

  /* Transiciones */
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

/* ========== DARK MODE — Negro + Naranja ========== */
[data-theme="dark"] {
  /* Brand: naranja como acento, no como paleta invertida */
  --brand-900: #f5f5f5; /* texto principal claro */
  --brand-800: #e0e0e0;
  --brand-700: #f97316; /* naranja — énfasis, links, tags */
  --brand-600: #ea580c; /* naranja profundo — hover */
  --brand-500: #fb923c; /* naranja suave — secundario */
  --brand-400: #2a2a2a; /* superficie oscura */
  --brand-300: #222222; /* superficie más oscura */

  /* Fondos */
  --surface: #040404;
  --surface-alt: #0b0b0b;
  --bg-card: #111111;

  /* Texto */
  --text: #f0f0f0;
  --text-secondary: #b0b0b0;
  --muted: #717171;

  /* Dorado → mantener en dark */
  --accent-gold: #f97316;
  --accent-gold-dark: #ea580c;
  --share-main-border: #f97316;
  --share-main-border-hover: #fb923c;
  --share-main-bg: #0f172a;
  --share-main-bg-hover: #111827;
  --share-main-color: #f9fafb;
  --share-main-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  --share-main-shadow-hover: 0 14px 30px rgba(0, 0, 0, 0.42);

  /* Bordes */
  --border: #2a2a2a;
  --border-light: #1f1f1f;

  /* Sombras más pronunciadas sobre negro */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* ========== PREMIUM REFINEMENTS ========== */
h1,
h2,
h3,
h4,
.hero-title,
.section-title {
  text-wrap: balance;
}

p,
.hero-subtitle {
  text-wrap: pretty;
}

/* Custom Scrollbar Premium */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--surface);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #333;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--brand-700);
}

/* ========== RESET ========== */
html.theme-preload *,
html.theme-preload *::before,
html.theme-preload *::after {
  transition: none !important;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

body {
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--surface);
  transition:
    background var(--transition-slow),
    color var(--transition-slow);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--brand-900);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: var(--text);
}

h1 {
  font-size: 2.75rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}

p {
  margin: 0;
  max-width: var(--content-max);
}
a {
  text-decoration: none;
  color: inherit;
}
ul,
ol {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
}

/* ========== ANIMACIONES SCROLL ========== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
}

.stagger-1 {
  transition-delay: 0.1s;
}
.stagger-2 {
  transition-delay: 0.2s;
}
.stagger-3 {
  transition-delay: 0.3s;
}
.stagger-4 {
  transition-delay: 0.4s;
}
.stagger-5 {
  transition-delay: 0.5s;
}

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.header-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .header.header-scrolled {
  background: rgba(4, 4, 4, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--space-xl);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand-900);
}

[data-theme="dark"] .logo {
  color: var(--text);
}

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

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-500);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-900);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Dark mode toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  font-size: 1.125rem;
}

.theme-toggle:hover {
  background: var(--brand-700);
  color: var(--bg-card);
}

[data-theme="dark"] .theme-toggle {
  background: #2a2a2a;
  color: var(--text);
  border-color: var(--border);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--brand-900);
  transition: all var(--transition);
}

[data-theme="dark"] .hamburger span {
  background: var(--text);
}

/* ========== BOTONES ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--brand-700);
  color: var(--bg-card);
  border-color: var(--brand-700);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 20%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 4s infinite;
  transform: skewX(-25deg);
}

[data-theme="dark"] .btn-primary {
  background: var(--brand-700);
  color: #0f0f0f;
  border-color: #f97316;
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--brand-600);
  border-color: #fb923c;
}

.btn-primary:hover {
  background: var(--brand-800);
  border-color: var(--brand-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-900);
  border-color: var(--brand-900);
}

[data-theme="dark"] .btn-secondary {
  color: var(--text);
  border-color: var(--text);
}

.btn-secondary:hover {
  background: var(--brand-900);
  color: var(--bg-card);
}

[data-theme="dark"] .btn-secondary:hover {
  background: var(--text);
  color: var(--surface);
}

.btn-cv {
  background: var(--brand-900);
  color: var(--bg-card);
  padding: 0.625rem 1.25rem;
}

[data-theme="dark"] .btn-cv {
  background: var(--text);
  color: var(--surface);
}

.btn-cv:hover {
  background: var(--brand-800);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ========== HERO ========== */
.hero {
  padding: var(--space-4xl) 0;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--surface) 100%);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-content {
  max-width: 640px;
}

.home-shell .hero-grid {
  align-items: stretch;
  gap: clamp(0.75rem, 1.8vw, 1.1rem);
}

.home-shell .home-hero-main,
.home-shell .home-hero-aside {
  background: #fff;
  border: 1px solid rgba(31, 59, 101, 0.14);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  height: 100%;
}

[data-theme="dark"] .home-shell .home-hero-main,
[data-theme="dark"] .home-shell .home-hero-aside {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.home-shell .home-hero-main {
  max-width: none;
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  color: var(--brand-900);
}

[data-theme="dark"] .hero-title {
  color: var(--text);
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--surface-alt);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  animation: bounce 2s infinite;
}

.scroll-indicator-icon {
  width: 24px;
  height: 36px;
  border: 2px solid var(--muted);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator-icon::before {
  content: "";
  width: 4px;
  height: 8px;
  background: var(--muted);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-dot 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-8px);
  }
  60% {
    transform: translateX(-50%) translateY(-4px);
  }
}

@keyframes scroll-dot {
  0% {
    opacity: 1;
    top: 6px;
  }
  100% {
    opacity: 0;
    top: 16px;
  }
}

.hero-aside {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.home-shell .home-hero-aside {
  height: 100%;
}

.hero-aside-photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover !important;
  object-position: center 15%;
  margin: 0 auto var(--space-md);
  border: 4px solid var(--brand-700);
  box-shadow: var(--shadow-md);
}

.hero-aside-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

[data-theme="dark"] .hero-aside-title {
  color: var(--text);
}

.hero-aside-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hero-aside-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.hero-aside-list li::before {
  content: "→";
  color: var(--brand-500);
  font-weight: 600;
  flex-shrink: 0;
}

/* ========== METRICS ========== */
.metrics-bar {
  background: var(--brand-900);
  padding: var(--space-xl) 0;
}

[data-theme="dark"] .metrics-bar {
  background: var(--bg-card);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  text-align: center;
}

.metric-item {
  padding: var(--space-md);
}

.metric-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bg-card);
  line-height: 1;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .metric-number {
  color: var(--text);
}

.metric-label {
  font-size: 0.875rem;
  color: var(--brand-300);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .metric-label {
  color: var(--text-secondary);
}

/* ========== CARDS ========== */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-700);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-card);
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  color: var(--brand-900);
}

[data-theme="dark"] .card-title {
  color: var(--text);
}

.card-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.card-list li {
  padding-left: var(--space-md);
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.card-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--brand-500);
}

/* ========== MÉTODO ========== */
.method-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.method-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--brand-900);
  color: var(--bg-card);
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .step-number {
  background: var(--brand-500);
  color: var(--surface);
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--brand-900);
}

[data-theme="dark"] .step-title {
  color: var(--text);
}

.step-description {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ========== CASOS ========== */
.case-card {
  display: flex;
  flex-direction: column;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
}

.case-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--brand-900);
  color: var(--bg-card);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .case-tag {
  background: var(--brand-500);
  color: var(--surface);
}

.case-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: auto;
}

.case-detail strong {
  display: block;
  color: var(--brand-900);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

[data-theme="dark"] .case-detail strong {
  color: var(--text);
}

.case-detail p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ========== TESTIMONIOS ========== */
.testimonials-section {
  background: var(--surface-alt);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: 1000px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--brand-300);
  position: absolute;
  top: var(--space-md);
  left: var(--space-lg);
  line-height: 1;
  opacity: 0.5;
}

.testimonial-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: var(--space-lg);
  padding-top: var(--space-md);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-700);
  color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.125rem;
}

.testimonial-info {
  flex: 1;
}

.testimonial-name {
  font-weight: 600;
  color: var(--brand-900);
  font-size: 0.9375rem;
}

[data-theme="dark"] .testimonial-name {
  color: var(--text);
}

.testimonial-role {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ========== FORMACIÓN ========== */
.section-education {
  background: var(--bg-card);
}

.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

.education-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.education-title {
  font-size: 1.5rem;
  color: var(--brand-900);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--brand-700);
}

[data-theme="dark"] .education-title {
  color: var(--text);
}

.education-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.education-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300);
}

.education-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.education-content {
  flex: 1;
}

.education-item-title {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
  color: var(--brand-900);
}

[data-theme="dark"] .education-item-title {
  color: var(--text);
}

.education-institution {
  font-size: 0.9375rem;
  color: var(--brand-500);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.education-year {
  font-size: 0.8125rem;
  color: var(--muted);
}

.education-description {
  margin-top: var(--space-sm);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent-gold);
  color: var(--brand-900);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-top: var(--space-sm);
}

[data-theme="dark"] .cert-badge {
  color: #0f1a2a;
}

/* ========== TRAYECTORIA ========== */
.section-trajectory {
  background: var(--brand-900);
  color: var(--bg-card);
}

[data-theme="dark"] .section-trajectory {
  background: var(--bg-card);
}

.section-trajectory .section-title {
  color: var(--bg-card);
}

[data-theme="dark"] .section-trajectory .section-title {
  color: var(--text);
}

.section-trajectory .section-subtitle {
  color: var(--brand-300);
}

[data-theme="dark"] .section-trajectory .section-subtitle {
  color: var(--text-secondary);
}

.trajectory-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.trajectory-item {
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  font-size: 1.0625rem;
  color: var(--brand-300);
}

[data-theme="dark"] .trajectory-item {
  background: var(--surface-alt);
  color: var(--text-secondary);
}

/* ========== CTA FINAL ========== */
.section-cta-final {
  background: var(--surface-alt);
  text-align: center;
}

.cta-block {
  max-width: 700px;
  margin: 0 auto;
}

.cta-block .section-title {
  margin-bottom: var(--space-md);
}

.cta-block p {
  max-width: none;
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: var(--space-xl);
}

.cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* ========== CV MODAL ========== */
.cv-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 26, 42, 0.95);
  z-index: 9999;
  padding: var(--space-lg);
  overflow: auto;
}

.cv-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.cv-modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 500px;
  width: 100%;
  text-align: center;
  position: relative;
}

.cv-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: var(--surface-alt);
  border-radius: 50%;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.cv-modal-close:hover {
  background: var(--brand-900);
  color: var(--bg-card);
}

.cv-modal-icon {
  width: 64px;
  height: 64px;
  background: var(--brand-700);
  color: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  font-size: 1.75rem;
}

.cv-modal-title {
  margin-bottom: var(--space-sm);
}

.cv-modal-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.cv-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--brand-900);
  color: var(--bg-card);
  padding: var(--space-xl) 0;
}

[data-theme="dark"] .footer {
  background: var(--bg-card);
  color: var(--text);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
  gap: var(--space-xl);
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col-title {
  font-size: 1.125rem;
  font-family: var(--font-serif);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--bg-card);
}

[data-theme="dark"] .footer-col-title {
  color: var(--text);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--brand-300);
}

[data-theme="dark"] .footer-copy {
  color: var(--text-secondary);
}

.footer-tagline {
  font-size: 0.8125rem;
  color: var(--brand-400);
  margin-top: 0.25rem;
  font-style: italic;
}

[data-theme="dark"] .footer-tagline {
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-link {
  color: var(--brand-300);
  font-size: 0.875rem;
  transition: color var(--transition);
}

[data-theme="dark"] .footer-link {
  color: var(--text-secondary);
}

.footer-link:hover {
  color: var(--bg-card);
}

[data-theme="dark"] .footer-link:hover {
  color: var(--text);
}

.footer-link.active {
  color: var(--bg-card);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

[data-theme="dark"] .footer-link.active {
  color: var(--brand-700);
}

/* ========== PAGE HEADER ========== */
.page-header {
  padding: var(--space-3xl) 0 var(--space-2xl);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.page-header .container {
  max-width: 900px;
  text-align: left;
}

.page-title {
  margin-bottom: var(--space-sm);
  text-align: left;
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

/* ========== BIO ========== */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
}

.bio-main {
  max-width: 700px;
}

.bio-title {
  margin-bottom: var(--space-lg);
}

.bio-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.bio-text p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.bio-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.sidebar-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}

[data-theme="dark"] .sidebar-title {
  color: var(--text);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sidebar-list li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  padding-left: var(--space-md);
  position: relative;
}

.sidebar-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--brand-500);
}

/* ========== PRINCIPIOS ========== */
.principles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

.principle-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.principle-item:hover {
  border-color: var(--brand-300);
  background: var(--surface-alt);
}

.principle-icon {
  font-size: 1.25rem;
  color: var(--brand-500);
}

.principle-text {
  font-size: 1.0625rem;
  color: var(--text);
}

/* ========== PERSONAL ========== */
.section-personal {
  background: var(--surface-alt);
}

.personal-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.personal-title {
  margin-bottom: var(--space-md);
}

.personal-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ========== TIMELINE ========== */
.timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 72px;
  padding-bottom: var(--space-2xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 16px;
  top: 8px;
  width: 18px;
  height: 18px;
  background: var(--brand-700);
  border: 3px solid var(--surface);
  border-radius: 50%;
  z-index: 1;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.timeline-content:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
}

.timeline-meta {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.timeline-title {
  margin-bottom: 0.5rem;
}

.timeline-org {
  font-size: 1rem;
  color: var(--brand-500);
  font-weight: 500;
}

.timeline-period {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.timeline-achievements li {
  padding-left: var(--space-md);
  position: relative;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.timeline-achievements li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-500);
}

.timeline-header-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.timeline-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(31, 59, 101, 0.16);
  padding: 8px;
  flex: 0 0 auto;
}

.timeline-company-inline {
  margin-bottom: 0.35rem;
}

.timeline-tags-inline {
  margin-top: 0.2rem;
}

.timeline-block {
  margin-top: 0.75rem;
}

.timeline-metric-box {
  margin-top: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(31, 59, 101, 0.12);
  background: var(--surface-alt);
  border-radius: 14px;
}

.timeline-metric-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.3rem;
}

.timeline-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: #14213d;
}

.timeline-metric-description {
  margin-top: 0.3rem;
  color: #52607a;
}

.timeline-stack-block {
  margin-top: 0.65rem;
}

.timeline-metrics-block {
  margin-top: 0.9rem;
}

.timeline-block-title {
  display: block;
  margin-bottom: 0.4rem;
}

.timeline-metrics-list {
  margin-top: 0;
}

.timeline-reco-block {
  margin-top: 1rem;
}

.timeline-reco-title {
  margin-bottom: 0.6rem;
}

.timeline-reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.timeline-reco-card {
  background: var(--bg-card);
  border: 1px solid rgba(31, 59, 101, 0.14);
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: 0 8px 20px rgba(8, 20, 43, 0.06);
}

.timeline-reco-head {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.timeline-reco-avatar {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 999px;
}

.timeline-reco-name {
  font-weight: 700;
  line-height: 1.2;
}

.timeline-reco-company {
  font-size: 0.85rem;
  color: #5c6a82;
}

.timeline-reco-text {
  margin: 0;
  font-size: 0.92rem;
  color: #334563;
  line-height: 1.45;
}

[data-theme="dark"] .timeline-logo {
  background: var(--surface-alt);
  border-color: var(--border);
}

[data-theme="dark"] .timeline-metric-box {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .timeline-metric-kicker {
  color: var(--muted);
}

[data-theme="dark"] .timeline-metric-value {
  color: var(--text);
}

[data-theme="dark"] .timeline-metric-description {
  color: var(--text-secondary);
}

[data-theme="dark"] .timeline-reco-card {
  background: var(--surface-alt);
  border-color: var(--border);
}

[data-theme="dark"] .timeline-reco-company,
[data-theme="dark"] .timeline-reco-text {
  color: var(--text-secondary);
}

/* ========== CASE DETAIL ========== */
.case-detail-header {
  padding: var(--space-2xl) 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--brand-500);
  font-weight: 500;
  margin-bottom: var(--space-md);
  transition: all var(--transition);
}

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

.case-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
}

.section-label {
  font-size: 1.375rem;
  margin-bottom: var(--space-md);
  color: var(--brand-900);
}

[data-theme="dark"] .section-label {
  color: var(--text);
}

.case-section p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.case-section-alt {
  background: var(--bg-card);
}

.deliverables-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.deliverables-list li {
  padding-left: var(--space-lg);
  position: relative;
  font-size: 1.0625rem;
  color: var(--text-secondary);
}

.deliverables-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--brand-500);
}

.case-nav-links {
  display: flex;
  gap: var(--space-md);
  justify-content: space-between;
  flex-wrap: wrap;
}

/* ========== ARTICLES ========== */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition);
  overflow: hidden;
}

.article-card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Article Card Cover Image */
.article-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: calc(var(--space-xl) * -1) calc(var(--space-xl) * -1) var(--space-lg)
    calc(var(--space-xl) * -1);
  overflow: hidden;
  background: var(--surface-alt);
}

.article-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-cover img {
  transform: scale(1.05);
}

/* CSS gradient fallback covers when no image is provided */
.article-cover-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
  z-index: 1;
}

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

.article-cover-placeholder .cover-icon {
  font-size: 3.5rem;
  opacity: 0.25;
  filter: grayscale(0.5);
  transition:
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.4s ease,
    filter 0.4s ease;
}

.article-card:hover .cover-icon {
  transform: scale(1.15) rotate(5deg);
  opacity: 0.4;
  filter: grayscale(0);
}

/* Category-specific gradients */
.article-cover-placeholder[data-cover="gestion"] {
  background: linear-gradient(135deg, #0f1b2d 0%, #1a365d 50%, #2b4a7f 100%);
}

.article-cover-placeholder[data-cover="crm"] {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.article-cover-placeholder[data-cover="liderazgo"] {
  background: linear-gradient(135deg, #1b2838 0%, #2d3f50 50%, #3a5a6f 100%);
}

.article-cover-placeholder[data-cover="tecnologia"] {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #21262d 100%);
}

/* Article Detail Hero Image */
.article-detail-cover {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 6px;
}

.article-detail-cover img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 480px;
  object-fit: contain;
  border-radius: calc(var(--radius-lg) - 4px);
}

.article-detail-cover-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    #0f1b2d 0%,
    #1a365d 40%,
    var(--accent-gold) 100%
  );
  z-index: 1;
}

.article-detail-cover-placeholder .cover-icon {
  font-size: 5rem;
  opacity: 0.2;
  transition: transform 1s ease-out;
}

.article-detail-cover:hover .cover-icon {
  transform: scale(1.05) translateY(-5px);
}

/* Article filters */
.article-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.filter-btn {
  padding: 0.6rem 1.05rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.filter-btn.active {
  background: var(--brand-700);
  color: #111111;
  border-color: var(--brand-700);
}

.card-article {
  display: flex;
  flex-direction: column;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.article-category {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--brand-700);
  color: var(--bg-card);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .article-category {
  background: rgba(255, 255, 255, 0.1);
  color: var(--brand-700);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.article-date {
  font-size: 0.8125rem;
  color: var(--muted);
}

.article-link {
  color: var(--brand-500);
  font-weight: 600;
  margin-top: auto;
  padding-top: var(--space-md);
  transition: all var(--transition);
}

[data-theme="dark"] .article-link {
  color: var(--brand-700);
}

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

/* ========== ARTICLE DETAIL ========== */
.article-detail-header {
  padding: var(--space-2xl) 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.article-content {
  background: var(--surface);
}

.article-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.article-content p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.article-related {
  background: var(--bg-card);
}

/* ========== CONTACT ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
  max-width: 1000px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--brand-900);
  font-size: 0.9375rem;
}

[data-theme="dark"] .form-label {
  color: var(--text);
}

.form-input,
.form-textarea {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all var(--transition);
  background: var(--bg-card);
  color: var(--text);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(52, 86, 125, 0.1);
}

.form-input.error,
.form-textarea.error {
  border-color: #dc3545;
}

.form-input.success,
.form-textarea.success {
  border-color: #28a745;
}

.form-error {
  font-size: 0.8125rem;
  color: #dc3545;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.form-char-count {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}

.form-success-message {
  display: none;
  padding: var(--space-lg);
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: var(--radius-md);
  color: #155724;
  text-align: center;
}

.form-success-message.visible {
  display: block;
}

.contact-info-title {
  margin-bottom: var(--space-lg);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.contact-link:hover {
  border-color: var(--brand-300);
  background: var(--surface-alt);
}

.contact-link-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  color: var(--brand-500);
}

.contact-link-label {
  font-size: 0.8125rem;
  color: var(--muted);
}

.contact-link-value {
  font-weight: 600;
  color: var(--text);
}

.contact-availability {
  padding: var(--space-lg);
  background: var(--surface-alt);
  border-radius: var(--radius-md);
}

.availability-title {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.availability-text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (min-width: 1200px) {
  h1 {
    font-size: 3.25rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .method-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .method-step {
    flex-direction: column;
    text-align: center;
    padding: var(--space-lg);
  }

  .step-number {
    margin: 0 auto var(--space-md);
  }

  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .education-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr 380px;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .method-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .method-step {
    flex-direction: column;
    text-align: center;
  }

  .bio-grid {
    grid-template-columns: 1fr 320px;
  }

  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .education-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .method-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .method-step {
    flex-direction: column;
    text-align: center;
  }

  .bio-grid {
    grid-template-columns: 1fr;
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

@media (max-width: 767px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3xl) var(--space-lg);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    gap: var(--space-sm);
  }

  .nav.active {
    right: 0;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .theme-toggle {
    position: absolute;
    top: var(--space-lg);
    right: 60px;
  }

  .btn-cv {
    width: 100%;
    margin-top: var(--space-md);
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.0625rem;
  }

  .home-shell .home-hero-main {
    padding: var(--space-lg);
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-aside {
    display: none;
  }

  .scroll-indicator {
    display: none;
  }

  .cards-grid,
  .method-grid,
  .articles-grid,
  .education-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-number {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .cta-buttons .btn {
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: left;
    gap: var(--space-lg);
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item {
    padding-left: 48px;
  }

  .timeline-marker {
    left: 8px;
    width: 12px;
    height: 12px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .case-nav-links {
    flex-direction: column;
  }

  .case-nav-links .btn {
    width: 100%;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .education-item {
    flex-direction: column;
    text-align: center;
  }

  .education-image {
    margin: 0 auto;
  }
}

/* ========== ARTEFACTOS (Sección Home) ========== */
.section-artefactos {
  background: var(--bg-card);
}

.artefactos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.artefacto-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition);
}

.artefacto-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-500);
}

.artefacto-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--space-sm);
}

.artefacto-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .artefacto-title {
  color: var(--text);
}

.artefacto-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.section-action {
  text-align: center;
  margin-top: var(--space-xl);
}

/* Artefactos mini (caso-detalle) */
.artefactos-grid-small {
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-md);
}

.artefacto-card-mini {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  transition: all var(--transition);
}

.artefacto-card-mini:hover {
  background: var(--brand-700);
  color: var(--bg-card);
}

.artefacto-card-mini:hover .artefacto-title {
  color: var(--bg-card);
}

.artefacto-card-mini .artefacto-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.artefacto-card-mini .artefacto-title {
  font-size: 0.75rem;
  margin-bottom: 0;
}

/* ========== AHORA PAGE ========== */
.ahora-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.card-icon i {
  font-size: 1.35rem;
}

.ahora-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition);
}

.ahora-card:hover {
  box-shadow: var(--shadow-md);
}

.ahora-card-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.ahora-card-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: var(--space-md);
}

[data-theme="dark"] .ahora-card-title {
  color: var(--text);
}

.ahora-card ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.ahora-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ahora-card li::before {
  content: "→";
  color: var(--brand-500);
  font-weight: 600;
  flex-shrink: 0;
}

.ahora-card a {
  color: var(--brand-500);
  text-decoration: underline;
  transition: color var(--transition);
}

.ahora-card a:hover {
  color: var(--brand-700);
}

/* ========== CONTACT ROUTES ========== */
.section-contact-routes {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-xl);
}

.contact-routes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.contact-route-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition);
}

.contact-route-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-500);
}

.route-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.route-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: var(--space-sm);
}

[data-theme="dark"] .route-title {
  color: var(--text);
}

.route-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

/* Contact Info Grid */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.contact-info-item {
  padding: var(--space-lg);
}

.contact-info-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.contact-info-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .contact-info-title {
  color: var(--text);
}

.contact-info-link {
  font-size: 0.9375rem;
  color: var(--brand-500);
  transition: color var(--transition);
}

.contact-info-link:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* ========== CASOS CARDS ========== */
.casos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(1rem, 1.8vw, 1.6rem);
}

.portfolio-filter-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
  margin: 0 0 1.35rem;
}

.portfolio-strategic-wrap {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(52, 86, 125, 0.06), rgba(184, 160, 106, 0.08));
}

.portfolio-strategic-copy p {
  margin: 0;
  color: var(--text-secondary);
}

.portfolio-strategic-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--brand-500);
}

.portfolio-strategic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portfolio-value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.portfolio-value-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(52, 86, 125, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.portfolio-value-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-500);
}

.portfolio-value-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: var(--brand-900);
}

.portfolio-value-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.portfolio-strategic-chip {
  border-color: var(--brand-300);
}

.portfolio-strategic-chip.is-active {
  background: var(--brand-900);
  color: var(--bg-card);
  border-color: var(--brand-900);
}

.portfolio-filter-empty {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-weight: 700;
}

.caso-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fdfefe 100%);
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 8px 22px rgba(15, 26, 42, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.caso-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #2b4f78, #4f7daf);
  opacity: 0.8;
  pointer-events: none;
}

.caso-card:hover {
  transform: translateY(-2px);
  border-color: #b8cbe1;
  box-shadow: 0 14px 30px rgba(15, 26, 42, 0.12);
}

.caso-cover {
  display: block;
  aspect-ratio: 16 / 8;
  background: linear-gradient(180deg, #eef4fb 0%, #e4edf7 100%);
  border-bottom: 1px solid #e4eaf2;
  overflow: hidden;
  padding: 0.65rem;
}

.caso-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 10px;
  background: #ffffff;
  transition: transform 0.3s ease;
}

.caso-card:hover .caso-cover img {
  transform: scale(1.01);
}

.caso-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.25rem 1.25rem 1.3rem;
  height: 100%;
}

.caso-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.caso-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  color: #20466f;
  background: #e9f0f8;
  border: 1px solid #d4e3f2;
}

.caso-period {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #314964;
  background: #f1f6fc;
  border: 1px solid #dbe7f4;
  border-radius: 999px;
  padding: 0.24rem 0.6rem;
}

.caso-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  line-height: 1.28;
  font-weight: 700;
  color: var(--brand-900);
  margin: 0;
}

.caso-title a {
  color: inherit;
  transition: color 0.2s ease;
}

.caso-title a:hover {
  color: #244e7a;
}

.caso-exp-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.caso-cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.caso-cat-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.24rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #36536f;
  border-radius: 999px;
  border: 1px solid #d8e3ee;
  background: #f7fafc;
}

.caso-cat-chip-strategic {
  background: rgba(184, 160, 106, 0.14);
  border-color: rgba(184, 160, 106, 0.35);
  color: var(--brand-900);
}

.caso-exp-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.26rem 0.62rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #2f4a67;
  border-radius: 999px;
  border: 1px solid #d7e2ef;
  background: #f4f8fd;
}

[data-theme="dark"] .caso-title {
  color: var(--text);
}

.caso-resumen {
  font-size: 0.97rem;
  color: #425a74;
  line-height: 1.65;
  margin: 0;
  max-width: 100%;
}

.caso-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.caso-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.56rem 0.92rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.caso-action-primary {
  background: var(--brand-700);
  color: #ffffff;
  border-color: var(--brand-700);
}

.caso-action-primary:hover {
  background: var(--brand-600);
  color: #ffffff;
  border-color: var(--brand-600);
}

.caso-action-secondary {
  background: #f5f8fc;
  color: #224974;
  border-color: #d7e2ef;
}

.caso-action-secondary:hover {
  background: #e8f0f9;
  color: #1b3f67;
  border-color: #c3d5e9;
}

[data-theme="dark"] .caso-card {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .caso-cover {
  background: var(--surface-alt);
  border-bottom-color: var(--border);
}

[data-theme="dark"] .caso-cover img {
  background: var(--surface-alt);
}

[data-theme="dark"] .caso-pill {
  color: var(--brand-700);
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.3);
}

[data-theme="dark"] .caso-period,
[data-theme="dark"] .caso-cat-chip,
[data-theme="dark"] .caso-exp-chip {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border);
}

[data-theme="dark"] .caso-cat-chip-strategic {
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.26);
  color: var(--text);
}

[data-theme="dark"] .caso-resumen {
  color: var(--text-secondary);
}

[data-theme="dark"] .caso-action-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .caso-action-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .caso-action-primary {
  background: #f97316;
  border-color: #f97316;
  color: #111111;
}

[data-theme="dark"] .caso-action-primary:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--brand-700);
  border: 1px solid var(--brand-700);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-outline:hover {
  background: var(--brand-700);
  color: var(--bg-card);
}

/* ========== CASO DETAIL ========== */
.caso-detail {
  padding-top: var(--space-xl);
}

.caso-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: var(--space-xl);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.caso-breadcrumb a {
  color: var(--brand-500);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: color var(--transition);
}

.caso-breadcrumb a:hover {
  color: var(--brand-700);
}

.caso-breadcrumb-current {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.caso-detail-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: var(--space-2xl);
}

.caso-detail-topline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.caso-detail-title {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0;
}

.caso-detail-lead {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.7;
  max-width: 72ch;
}

.caso-breadcrumb-sep {
  color: var(--muted);
}

.caso-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.caso-aporte {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(52, 86, 125, 0.12);
  background: linear-gradient(180deg, rgba(52, 86, 125, 0.05), rgba(184, 160, 106, 0.08));
}

.caso-aporte-label,
.caso-competitive-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-500);
}

.caso-aporte p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.caso-meta-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.03);
}

.caso-meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.caso-meta-value {
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--brand-900);
}

.caso-media {
  margin: 0 0 var(--space-xl);
  padding: clamp(0.65rem, 1.6vw, 1rem);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid #d8e3ef;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.caso-media img {
  width: auto;
  max-width: 100%;
  max-height: min(62vh, 640px);
  object-fit: contain;
  object-position: center center;
  border-radius: 12px;
  background: transparent;
}

.caso-detail .bloque-galeria {
  margin: 0 0 var(--space-xl) !important;
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg-card);
}

.caso-detail .bloque-galeria h3 {
  font-family: var(--font-serif);
  color: var(--brand-900);
}

.caso-detail .bloque-galeria .js-galeria-thumb img {
  height: 130px !important;
  object-fit: cover !important;
}

.caso-pill-outline {
  background: transparent;
  border: 1px solid rgba(52, 86, 125, 0.26);
  color: var(--brand-700);
}

.caso-competitive-frame {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(52, 86, 125, 0.16);
  background: linear-gradient(135deg, rgba(52, 86, 125, 0.06), rgba(184, 160, 106, 0.08));
}

.caso-competitive-title {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  color: var(--brand-900);
}

.caso-competitive-frame p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.caso-section {
  margin-bottom: var(--space-2xl);
}

.caso-section-title {
  font-size: 1.375rem;
  color: var(--brand-900);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--brand-700);
}

[data-theme="dark"] .caso-section-title {
  color: var(--text);
}

[data-theme="dark"] .caso-breadcrumb-current {
  color: var(--text-secondary);
}

[data-theme="dark"] .caso-meta-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

[data-theme="dark"] .caso-meta-value {
  color: var(--text);
}

[data-theme="dark"] .caso-related-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

[data-theme="dark"] .caso-related-title {
  color: var(--text);
}

.caso-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.caso-section-intro {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.caso-related-section {
  margin-top: calc(var(--space-xl) * -0.2);
}

.caso-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.caso-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.03);
}

.caso-related-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-500);
}

.caso-related-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--brand-900);
}

.caso-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.caso-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.caso-list li::before {
  content: "•";
  color: var(--brand-500);
  font-weight: bold;
  flex-shrink: 0;
}

.caso-list-check li::before {
  content: "✓";
  color: var(--brand-500);
}

.caso-impacto {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.impacto-item {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
}

.impacto-valor {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-700);
  margin-bottom: 0.5rem;
}

.impacto-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.caso-navigation {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-2xl);
}

[data-theme="dark"] .caso-media {
  border-color: var(--border);
  background: var(--surface-alt);
}

[data-theme="dark"] .caso-media img {
  background: transparent;
}

[data-theme="dark"] .caso-detail .bloque-galeria {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .caso-detail .bloque-galeria h3 {
  color: var(--text);
}

/* ========== EDUCATION CARDS (Formación) ========== */
.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.education-card:hover {
  box-shadow: var(--shadow-md);
}

.education-card .education-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.education-card .education-content {
  padding: var(--space-lg);
}

.education-card .education-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: 0.5rem;
  border: none;
  padding: 0;
}

[data-theme="dark"] .education-card .education-title {
  color: var(--text);
}

.education-card .education-meta {
  font-size: 0.875rem;
  color: var(--brand-500);
  margin-bottom: 0.5rem;
}

.education-card .education-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--transition);
}

.course-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-500);
}

.course-title {
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

[data-theme="dark"] .course-title {
  color: var(--text);
}

.course-meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ========== FORMACION V2 ========== */
.formacion-v2 .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.learning-section {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.96),
    rgba(245, 246, 248, 0.94)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.2vw, 1.8rem);
  box-shadow: 0 16px 40px rgba(12, 27, 58, 0.06);
}

.learning-section.is-cert:first-of-type {
  border-color: rgba(184, 160, 106, 0.28);
  background: linear-gradient(135deg, rgba(184, 160, 106, 0.08), rgba(52, 86, 125, 0.04));
}

.learning-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.learning-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-500);
  font-weight: 700;
}

.learning-heading {
  margin: 0.25rem 0 0.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  color: var(--brand-900);
}

.learning-subheading {
  margin: 0;
  color: var(--text-secondary);
  max-width: 62ch;
}

.learning-count {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-900);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.learning-card {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: var(--bg-card);
  border-radius: 18px;
  padding: 1rem 1rem 0.95rem;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.learning-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(148, 163, 184, 0.34);
  opacity: 1;
}

.learning-card:hover {
  transform: translateY(-3px);
  border-color: rgba(148, 163, 184, 0.42);
  box-shadow: 0 16px 34px rgba(29, 45, 86, 0.1);
}

.learning-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.learning-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #475569;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 0.22rem 0.55rem 0.22rem 0.35rem;
}

.learning-type-icon {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: #64748b;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  line-height: 1;
}

.learning-type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
}

.learning-year {
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
}

.learning-title {
  margin: 0;
  border: 0;
  padding: 0;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--brand-900);
}

.learning-institution {
  margin: 0.38rem 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-700);
}

.learning-summary {
  margin: 0 0 0.92rem;
  color: var(--text-secondary);
  line-height: 1.56;
  font-size: 0.92rem;
}

.learning-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.learning-period {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.8rem;
  color: #475569;
}

.learning-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.learning-link,
.learning-code {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.learning-link {
  color: #ea580c;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.42);
  text-decoration: none;
}

.learning-link:hover {
  color: #fff;
  text-decoration: none;
  background: #f97316;
  border-color: #f97316;
}

.learning-code {
  color: #475569;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.learning-empty {
  border: 1px dashed var(--border-light);
  background: color-mix(in srgb, var(--surface-alt) 88%, #fff 12%);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 2.5vw, 2rem);
  text-align: center;
}

.learning-empty h2 {
  border: 0;
  margin: 0 0 0.35rem;
  color: var(--brand-900);
  font-family: var(--font-serif);
}

.learning-empty p {
  margin: 0;
  color: var(--text-secondary);
}

[data-theme="dark"] .learning-section {
  background: linear-gradient(
    145deg,
    rgba(20, 20, 20, 0.96),
    rgba(24, 24, 24, 0.96)
  );
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .learning-section.is-cert:first-of-type {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(255, 255, 255, 0.02));
  border-color: rgba(249, 115, 22, 0.24);
}

[data-theme="dark"] .portfolio-strategic-wrap,
[data-theme="dark"] .corporate-client-card {
  border-color: var(--border);
}

[data-theme="dark"] .portfolio-strategic-wrap {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(255, 255, 255, 0.02));
}

[data-theme="dark"] .portfolio-value-card,
[data-theme="dark"] .caso-aporte,
[data-theme="dark"] .caso-competitive-frame {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

[data-theme="dark"] .portfolio-strategic-chip.is-active {
  background: var(--brand-700);
  color: #111111;
  border-color: var(--brand-700);
}

[data-theme="dark"] .portfolio-value-title,
[data-theme="dark"] .caso-competitive-title {
  color: var(--text);
}

[data-theme="dark"] .caso-pill-outline {
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] .learning-heading,
[data-theme="dark"] .learning-title {
  color: var(--text);
}

[data-theme="dark"] .learning-card {
  background: rgba(22, 22, 22, 0.94);
  border-color: rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .learning-type-badge {
  color: #d4d4d8;
  background: rgba(82, 82, 91, 0.34);
  border-color: rgba(161, 161, 170, 0.26);
}

[data-theme="dark"] .learning-type-icon {
  background: #71717a;
  color: #f8fafc;
}

[data-theme="dark"] .learning-institution {
  color: #d4d4d8;
}

[data-theme="dark"] .learning-summary,
[data-theme="dark"] .learning-subheading,
[data-theme="dark"] .learning-period {
  color: #c3d2ea;
}

[data-theme="dark"] .learning-count {
  color: #e5e7eb;
  background: rgba(63, 63, 70, 0.38);
  border-color: rgba(161, 161, 170, 0.26);
}

[data-theme="dark"] .learning-year {
  color: #d4d4d8;
  background: rgba(63, 63, 70, 0.36);
  border-color: rgba(161, 161, 170, 0.24);
}

[data-theme="dark"] .learning-link {
  color: #f97316;
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.62);
}

[data-theme="dark"] .learning-link:hover {
  color: #fff7ed;
  background: rgba(249, 115, 22, 0.18);
  border-color: #fb923c;
}

[data-theme="dark"] .learning-code {
  color: #d4d4d8;
  background: rgba(63, 63, 70, 0.32);
  border-color: rgba(161, 161, 170, 0.24);
}

@media (max-width: 991px) {
  .learning-grid {
    grid-template-columns: 1fr;
  }

  .learning-section-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ========== MILESTONES ========== */
.milestones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.milestone-card {
  text-align: center;
  padding: var(--space-lg);
}

.milestone-year {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-700);
  margin-bottom: var(--space-sm);
}

.milestone-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .milestone-title {
  color: var(--text);
}

.milestone-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ========== ARTICLE DETAIL ========== */
.article-detail {
  padding-top: var(--space-xl);
}

.article-detail-header {
  margin-bottom: var(--space-2xl);
}

.article-detail-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-top: var(--space-md);
  margin-bottom: var(--space-lg);
}

.article-detail-lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

[data-theme="dark"] .article-detail-lead {
  color: var(--text);
}

.article-readtime {
  color: var(--muted);
  font-size: 0.875rem;
}

.article-body {
  margin-bottom: var(--space-2xl);
}

.article-body h2 {
  font-size: 1.5rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.article-body p {
  margin-bottom: var(--space-md);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body ul,
.article-body ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
}

.article-body li {
  margin-bottom: var(--space-sm);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  list-style: disc;
}

.article-body blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg) var(--space-xl);
  background: var(--surface-alt);
  border-left: 4px solid var(--brand-700);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-light);
}

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

.article-share {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--muted);
  font-size: 0.875rem;
}

.share-link {
  color: var(--brand-500);
  transition: color var(--transition);
}

.share-link:hover {
  color: var(--brand-700);
}

.articles-grid-small .article-card {
  padding: var(--space-lg);
}

.articles-grid-small .article-title {
  font-size: 1rem;
}

/* ========== FORM STYLES ========== */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

[data-theme="dark"] .form-label {
  color: var(--text);
}

.form-label .required {
  color: #dc3545;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(52, 86, 125, 0.1);
}

.form-input.error {
  border-color: #dc3545;
}

.form-input.success {
  border-color: #28a745;
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.form-select {
  cursor: pointer;
}

.form-helper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.form-error {
  color: #dc3545;
  font-size: 0.8125rem;
}

.char-counter {
  font-size: 0.75rem;
  color: var(--muted);
}

.btn-full {
  width: 100%;
}

.form-success {
  text-align: center;
  padding: var(--space-xl);
  background: #d4edda;
  border-radius: var(--radius-md);
  margin-top: var(--space-lg);
}

.success-icon {
  width: 48px;
  height: 48px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: 1.5rem;
}

/* ========== SKILLS ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.skill-category {
  text-align: center;
}

.skill-category-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: var(--space-md);
}

[data-theme="dark"] .skill-category-title {
  color: var(--text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.375rem 0.875rem;
  background: var(--brand-700);
  color: var(--bg-card);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 100px;
}

/* ========== ABOUT GRID ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: var(--space-3xl);
  align-items: start;
}

.about-content {
  max-width: 700px;
}

.about-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.about-aside {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
}

.about-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-lg);
  border: 3px solid var(--brand-700);
}

.about-quick-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: left;
}

.quick-info-item {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

.quick-info-item:last-child {
  border-bottom: none;
}

.quick-info-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

.quick-info-value {
  font-weight: 600;
  color: var(--brand-900);
}

[data-theme="dark"] .quick-info-value {
  color: var(--text);
}

/* ========== PRINCIPLES ========== */
.principle-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition);
}

.principle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.principle-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.principle-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .principle-title {
  color: var(--text);
}

.principle-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== RESPONSIVE ADDITIONS ========== */
@media (max-width: 991px) {
  .artefactos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .artefactos-grid-small {
    grid-template-columns: repeat(3, 1fr);
  }

  .ahora-grid {
    grid-template-columns: 1fr;
  }

  .corporate-client-header {
    flex-direction: column;
  }

  .contact-routes-grid {
    grid-template-columns: 1fr;
  }

  .contact-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .casos-grid {
    grid-template-columns: 1fr;
  }

  .caso-impacto {
    grid-template-columns: 1fr;
  }

  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .milestones-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-aside {
    order: -1;
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .artefactos-grid {
    grid-template-columns: 1fr;
  }

  .artefactos-grid-small {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
  }

  .caso-navigation {
    flex-direction: column;
  }

  .caso-navigation .btn {
    width: 100%;
  }

  .caso-detail-meta {
    grid-template-columns: 1fr;
  }

  .caso-related-grid {
    grid-template-columns: 1fr;
  }

  .article-detail-title {
    font-size: 1.75rem;
  }

  .article-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: var(--space-lg);
  }

  .personal-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== PERSONAL / HOBBIES ========== */
.personal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.personal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition);
}

.personal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.personal-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.personal-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-900);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .personal-title {
  color: var(--text);
}

.personal-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.personal-quote {
  max-width: 800px;
  margin: var(--space-xl) auto 0;
  text-align: center;
}

.personal-quote blockquote {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--brand-700);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  margin: 0;
}

.personal-quote p {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 auto;
}

@media (max-width: 991px) {
  .personal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .personal-grid {
    grid-template-columns: 1fr;
  }

  .personal-quote blockquote {
    padding: var(--space-lg);
  }

  .personal-quote p {
    font-size: 1.0625rem;
  }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--brand-700);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--brand-800);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .back-to-top {
  background: var(--brand-700);
  color: #0f0f0f;
}

[data-theme="dark"] .back-to-top:hover {
  background: var(--brand-400);
}

/* ========== READING PROGRESS BAR ========== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-700), var(--accent-gold));
  z-index: 1001;
  transition: width 0.1s linear;
}

/* ========== SHARE BUTTONS ========== */
.share-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.share-bar-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.share-btn:hover {
  color: var(--brand-700);
  border-color: var(--brand-300);
  background: var(--bg-card);
  transform: translateY(-1px);
}

[data-theme="dark"] .share-btn:hover {
  color: var(--text);
  border-color: var(--brand-400);
  background: var(--brand-300);
}

.share-btn-icon {
  font-size: 1rem;
}

.share-btn.copied {
  color: #16a34a;
  border-color: #16a34a;
  background: #f0fdf4;
}

[data-theme="dark"] .share-btn.copied {
  background: rgba(22, 163, 74, 0.15);
}

/* ========== SKILL TAG TOOLTIPS ========== */
.skill-tag {
  position: relative;
  cursor: default;
}

.skill-tag[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--brand-900);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
  max-width: 240px;
  white-space: normal;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.skill-tag[data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--brand-900);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 101;
}

.skill-tag[data-tooltip]:hover::after,
.skill-tag[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.skill-tag[data-tooltip]:hover::before {
  transform: translateX(-50%);
}

[data-theme="dark"] .skill-tag[data-tooltip]::after {
  background: var(--text);
  color: var(--surface);
}

[data-theme="dark"] .skill-tag[data-tooltip]::before {
  border-top-color: var(--text);
}

/* ========== TYPING EFFECT ========== */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--brand-500);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink-cursor 0.75s step-end infinite;
}

@keyframes blink-cursor {
  from,
  to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero-title .typed-line {
  display: block;
  min-height: 1.15em;
}

/* ========== TOOLS / HERRAMIENTAS PAGE ========== */
.tools-section {
  padding-top: var(--space-3xl);
}

.tools-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-xl);
  align-items: end;
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.tools-kicker {
  display: inline-block;
  margin-bottom: var(--space-xs);
  color: var(--brand-700);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tools-overview-title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--brand-900);
}

[data-theme="dark"] .tools-overview-title {
  color: var(--text);
}

.tools-overview-text {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.tools-stats {
  min-width: 172px;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  text-align: center;
}

.tools-stats strong,
.tools-stats span {
  display: block;
}

.tools-stats strong {
  color: var(--brand-700);
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1;
}

.tools-stats span {
  margin-top: var(--space-xs);
  color: var(--muted);
  font-size: 0.8125rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
  align-items: start;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: left;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-700), var(--accent-gold));
  opacity: 0;
  transition: opacity var(--transition);
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-300);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: start;
  margin-bottom: var(--space-md);
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-700) 12%, transparent);
  color: var(--brand-700);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.tool-name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-900);
  margin: 0 0 var(--space-xs);
}

[data-theme="dark"] .tool-name {
  color: var(--text);
}

.tool-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

[data-theme="dark"] .tool-description {
  color: #cbd5e1 !important; /* Un gris muy claro/blanco roto para lectura */
}

.tool-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--brand-900);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}

[data-theme="dark"] .tool-count {
  background: var(--brand-700);
}

.tool-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-category-list li {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.2;
}

[data-theme="dark"] .tool-category-list li {
  background: color-mix(in srgb, var(--bg-card) 85%, #fff 4%);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 991px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .tools-overview {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .tools-stats {
    width: 100%;
    text-align: left;
  }

  .tool-card-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tool-count {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
  }
}

/* ========== AHORA TIMESTAMP ========== */
.ahora-timestamp {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  margin-top: var(--space-sm);
}

.ahora-timestamp-dot {
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ==================================================
   CMS bridge - Rogelio Munoz theme
   Hace que las vistas del CMS respiren dentro del tema.
   ================================================== */

:root {
  --text-main: var(--text);
  --border-color: var(--border);
}

main {
  min-height: 60vh;
}

.home-shell,
.page-shell,
.article-shell,
.portfolio-shell,
.error-shell {
  padding: var(--space-3xl) 0;
}

.cms-theme-stack {
  display: grid;
  gap: var(--space-3xl);
}

.cms-theme-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: clamp(1.5rem, 2vw, 2.5rem);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .cms-theme-panel {
  background: var(--bg-card);
  border-color: var(--border);
}

.cms-theme-panel > *:last-child {
  margin-bottom: 0;
}

.cms-rich-content,
.cms-rich-content p,
.cms-rich-content li {
  color: var(--text-secondary);
}

.corporate-clients-intro {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.corporate-clients-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.corporate-client-card {
  display: grid;
  gap: 0.85rem;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.corporate-client-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.corporate-client-logo {
  display: block;
  max-width: min(180px, 100%);
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.5rem;
}

.corporate-client-name,
.corporate-client-role {
  margin: 0;
}

.corporate-client-sector,
.corporate-client-context {
  margin: 0;
  color: var(--text-secondary);
}

.corporate-clients-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.profile-skill-description {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

[data-theme="dark"] .cms-rich-content,
[data-theme="dark"] .cms-rich-content p,
[data-theme="dark"] .cms-rich-content li {
  color: var(--text);
}

.cms-rich-content h1,
.cms-rich-content h2,
.cms-rich-content h3,
.cms-rich-content h4 {
  color: var(--brand-900);
}

[data-theme="dark"] .cms-rich-content h1,
[data-theme="dark"] .cms-rich-content h2,
[data-theme="dark"] .cms-rich-content h3,
[data-theme="dark"] .cms-rich-content h4 {
  color: var(--text);
}

/* Compatibilidad con utilidades Bootstrap en vistas legacy dentro del theme */
[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-light,
[data-theme="dark"] .card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .table,
[data-theme="dark"] .list-group-item {
  background-color: var(--bg-card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .text-dark,
[data-theme="dark"] .text-body {
  color: var(--text) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .alert-success,
[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-warning,
[data-theme="dark"] .alert-info {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.theme-slot > section,
.theme-slot > article,
.theme-slot > div {
  margin-bottom: 0;
}

.theme-slot .block-shell,
.theme-slot .servicios-destacados-block,
.theme-slot .ultimos-articulos-block,
.theme-slot .bloque-galeria,
.theme-slot .bloque-testimonios,
.theme-slot .bloque-newsletter-footer,
.theme-slot .bloque-indicadores-economicos {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: clamp(1.25rem, 2vw, 2rem);
  box-shadow: var(--shadow-md);
}

.theme-slot img {
  border-radius: 14px;
}

.page-title,
.article-title,
.section-title {
  color: var(--brand-900);
}

.page-lead,
.article-lead,
.section-subtitle {
  color: var(--text-secondary);
}

.service-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 1.8vw, 1.6rem);
  align-items: stretch;
}

.service-theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-height: 100%;
  padding: clamp(1.1rem, 1.5vw, 1.45rem);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #d7e2ef;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15, 26, 42, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.service-theme-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #2b4f78, #4f7daf);
  opacity: 0.82;
  pointer-events: none;
}

.service-theme-card:hover {
  transform: translateY(-2px);
  border-color: #b8cae1;
  box-shadow: 0 14px 30px rgba(15, 26, 42, 0.12);
}

.service-theme-cover {
  position: relative;
  display: block;
  width: calc(100% + (clamp(1.1rem, 1.5vw, 1.45rem) * 2));
  margin: calc(clamp(1.1rem, 1.5vw, 1.45rem) * -1)
    calc(clamp(1.1rem, 1.5vw, 1.45rem) * -1) 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #eef3f9;
}

.service-theme-cover img,
.service-theme-cover-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.service-theme-cover img {
  object-fit: cover;
  transition: transform 0.25s ease;
}

.service-theme-card:hover .service-theme-cover img {
  transform: scale(1.04);
}

.service-theme-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eff4fb 0%, #dfeaf6 100%);
  color: #31567f;
}

.service-theme-cover-placeholder i {
  font-size: 1.65rem;
  opacity: 0.78;
}

.service-theme-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.service-theme-icon {
  width: 2.55rem;
  height: 2.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #edf4fd 0%, #e6eff9 100%);
  border: 1px solid #d8e5f4;
  color: var(--service-icon-color, #2b4f78);
}

.service-theme-icon i {
  font-size: 1.12rem;
}

.service-theme-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.service-theme-badges .tag {
  margin: 0;
  padding: 0.28rem 0.68rem;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  background: #e9f1fb;
  color: #21476f;
  border: 1px solid #d5e3f2;
}

.service-theme-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.58rem);
  line-height: 1.3;
  color: var(--brand-900);
}

.service-theme-description {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.service-theme-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.56rem;
}

.service-theme-list li {
  position: relative;
  padding-left: 1.05rem;
  color: #29415f;
  font-size: 0.93rem;
  line-height: 1.52;
}

.service-theme-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #4d79a9;
  transform: translateY(-50%);
}

.service-theme-actions {
  margin-top: auto;
  padding-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.service-theme-actions .btn {
  min-width: 9.5rem;
  justify-content: center;
}

[data-theme="dark"] .service-theme-card {
  background: var(--bg-card);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .service-theme-card::before {
  opacity: 0;
}

[data-theme="dark"] .service-theme-title {
  color: var(--text);
}

[data-theme="dark"] .service-theme-description,
[data-theme="dark"] .service-theme-list li {
  color: var(--text-secondary);
}

[data-theme="dark"] .service-theme-badges .tag {
  background: rgba(249, 115, 22, 0.12);
  color: var(--brand-700);
  border-color: rgba(249, 115, 22, 0.25);
}

.contact-next-hero {
  position: relative;
  overflow: hidden;
}

.contact-next-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #21476f;
  background: #e8f1fb;
  border: 1px solid #d4e3f2;
}

.contact-next-title {
  margin: 0.8rem 0 0.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1.2;
  color: var(--brand-900);
}

.contact-next-lead {
  margin: 0;
  max-width: 64ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.72;
}

.contact-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.contact-next-trust {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contact-next-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.33rem 0.7rem;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 600;
  color: #365679;
  background: #f2f7fd;
  border: 1px solid #dbe8f6;
}

.contact-next-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.5fr);
  gap: clamp(1rem, 1.8vw, 1.7rem);
  align-items: start;
}

.contact-next-aside {
  position: sticky;
  top: 1rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
  border: 1px solid #d9e6f5;
  border-radius: 18px;
  padding: clamp(1rem, 1.6vw, 1.35rem);
  box-shadow: 0 8px 22px rgba(15, 26, 42, 0.06);
}

.contact-next-aside-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--brand-900);
}

.contact-next-aside-copy {
  margin: 0.55rem 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.62;
}

.contact-next-checks {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
}

.contact-next-checks li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.92rem;
  color: #304a68;
}

.contact-next-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.56em;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #4d79a9;
  transform: translateY(-50%);
}

.contact-next-channel-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
}

.contact-next-channel-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #1f4f81;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-next-channel-list a:hover {
  text-decoration: underline;
}

.contact-next-form-shell {
  background: #ffffff;
  border: 1px solid #d9e6f5;
  border-radius: 18px;
  padding: clamp(1rem, 1.9vw, 1.6rem);
  box-shadow: 0 8px 22px rgba(15, 26, 42, 0.06);
}

.contact-next-form-head {
  margin-bottom: 0.95rem;
}

.contact-next-form-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.42rem;
  color: var(--brand-900);
}

.contact-next-form-subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-next-form {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  gap: 0.92rem;
}

.contact-next-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-next-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.contact-next-topic-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
}

.contact-next-topic-chip {
  border: 1px solid #c8d9ec;
  background: #f5f9fe;
  color: #2e527a;
  border-radius: 999px;
  padding: 0.42rem 0.82rem;
  font-size: 0.83rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.contact-next-topic-chip:hover {
  border-color: #9db7d5;
  background: #eaf2fb;
}

.contact-next-topic-chip.is-active {
  background: #1f4f81;
  color: #ffffff;
  border-color: #1f4f81;
}

.contact-next-helper {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.contact-next-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.contact-next-counter {
  font-size: 0.79rem;
  font-weight: 700;
  color: #365679;
  background: #f3f8fd;
  border: 1px solid #dbe8f6;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
}

.contact-next-counter.is-short {
  color: #9a6a12;
  background: #fff8ea;
  border-color: #f0ddaf;
}

.contact-next-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: -0.2rem;
}

.contact-next-prompt {
  border: 1px dashed #bfd2e8;
  background: #f8fbff;
  color: #35577f;
  border-radius: 999px;
  padding: 0.3rem 0.68rem;
  font-size: 0.77rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.contact-next-prompt:hover {
  border-color: #91aed0;
  background: #edf4fc;
}

.contact-next-security {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.contact-next-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.2rem;
}

.contact-next-submit {
  min-width: 12rem;
  justify-content: center;
  gap: 0.4rem;
}

.contact-next-submit:disabled {
  opacity: 0.82;
  cursor: not-allowed;
}

.contact-next-policy {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.contact-next-form .form-input.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

[data-theme="dark"] .contact-next-kicker {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.25);
  color: var(--brand-700);
}

[data-theme="dark"] .contact-next-title {
  color: var(--text);
}

[data-theme="dark"] .contact-next-aside,
[data-theme="dark"] .contact-next-form-shell {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .contact-next-checks li,
[data-theme="dark"] .contact-next-aside-copy,
[data-theme="dark"] .contact-next-form-subtitle {
  color: var(--text-secondary);
}

[data-theme="dark"] .contact-next-topic-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--text-secondary);
}

[data-theme="dark"] .contact-next-topic-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--brand-700);
  color: var(--text);
}

[data-theme="dark"] .contact-next-topic-chip.is-active {
  background: var(--brand-700);
  color: #0f0f0f;
  border-color: var(--brand-700);
}

[data-theme="dark"] .contact-next-counter {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--text-secondary);
}

[data-theme="dark"] .contact-next-counter.is-short {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.3);
  color: var(--brand-700);
}

[data-theme="dark"] .contact-next-prompt {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text-secondary);
}

[data-theme="dark"] .contact-next-prompt:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--brand-700);
  color: var(--text);
}

.article-explorer-tools {
  margin-bottom: 1.2rem;
}

.article-search-wrap {
  position: relative;
  margin-bottom: 0.85rem;
}

.article-search-wrap i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.article-search-wrap .form-input {
  padding-left: 2.35rem;
}

.article-results-counter {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.article-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(0.9rem, 1.8vw, 1.5rem);
  border: 1px solid #dbe6f2;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 1.4rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 24px rgba(15, 26, 42, 0.08);
}

.article-spotlight.is-hidden {
  display: none;
}

.article-spotlight-cover {
  position: relative;
  min-height: 280px;
  display: block;
  background: #f3f7fc;
}

.article-spotlight-cover img,
.article-spotlight-cover .article-cover-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.article-spotlight-cover img {
  object-fit: cover;
}

.article-spotlight-content {
  padding: clamp(1rem, 1.9vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-spotlight-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.article-spotlight-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.14);
  color: var(--brand-700);
  border: 1px solid rgba(249, 115, 22, 0.34);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-spotlight-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.42rem, 2.4vw, 1.95rem);
  line-height: 1.22;
}

.article-spotlight-title a {
  color: var(--brand-900);
  text-decoration: none;
}

.article-spotlight-summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.68;
}

.article-grid-enhanced .article-card.is-hidden {
  display: none;
}

.article-grid-enhanced {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.05rem;
}

.article-grid-enhanced .article-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  min-height: 100%;
}

.article-grid-enhanced .article-card .article-cover {
  display: block;
  min-height: 165px;
  aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: 14px 14px 0 0;
}

.article-grid-enhanced .article-card .article-cover img,
.article-grid-enhanced .article-card .article-cover .article-cover-placeholder {
  width: 100%;
  height: 100%;
}

.article-grid-enhanced .article-card .card-article {
  padding: 0.95rem 1rem 1.05rem;
  gap: 0.55rem;
  flex: 1 1 auto;
}

.article-grid-enhanced .article-card .article-meta {
  margin-bottom: 0.35rem;
  gap: 0.5rem;
  align-items: center;
}

.article-grid-enhanced .article-card .article-date {
  font-size: 0.75rem;
  white-space: nowrap;
}

.article-grid-enhanced .article-card .article-category {
  font-size: 0.64rem;
  padding: 0.2rem 0.55rem;
}

.article-grid-enhanced .article-card .article-card-title {
  font-size: 1.07rem;
  line-height: 1.36;
  margin-bottom: 0.2rem;
}

.article-grid-enhanced .article-card .caso-resumen {
  margin-top: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-title {
  margin: 0 0 0.7rem;
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.34;
}

.article-card-title a {
  color: var(--brand-900);
  text-decoration: none;
}

.article-card-title a:hover {
  color: var(--brand-700);
}

.article-card-title-sm {
  font-size: 1.05rem;
}

.article-empty-state {
  margin: 0.9rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px dashed #c5d7ea;
  border-radius: 12px;
  background: #f7fbff;
  color: #35577f;
  font-size: 0.92rem;
}

[data-theme="dark"] .article-empty-state {
  border-color: var(--border);
  background: var(--surface-alt);
  color: var(--text-secondary);
}

.article-detail-header-v2 {
  padding-top: 0.5rem;
  border-bottom: 0;
}

.article-detail .caso-breadcrumb {
  margin-bottom: 1rem;
}

.article-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.article-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #34597f;
  background: #f2f7fd;
  border: 1px solid #dae8f7;
}

[data-theme="dark"] .article-stat-item {
  color: var(--brand-700);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.article-related-header {
  margin-bottom: 1rem;
}

.article-related-grid {
  gap: clamp(0.9rem, 1.6vw, 1.2rem);
}

.article-related-header .section-title,
.article-related-header .section-subtitle {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
}

[data-theme="dark"] .article-spotlight {
  border-color: var(--border);
}

[data-theme="dark"] .article-spotlight-cover {
  background: var(--surface-alt);
}

[data-theme="dark"] .article-spotlight-title a,
[data-theme="dark"] .article-card-title a {
  color: var(--brand-900);
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-900);
  color: var(--bg-card);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
  z-index: 950;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--brand-700);
}

@media (max-width: 992px) {
  .home-shell,
  .page-shell,
  .article-shell,
  .portfolio-shell,
  .error-shell {
    padding: var(--space-2xl) 0;
  }

  .service-theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-next-layout {
    grid-template-columns: 1fr;
  }

  .article-spotlight {
    grid-template-columns: 1fr;
  }

  .article-spotlight-cover {
    min-height: 240px;
  }
}

@media (max-width: 767px) {
  .service-theme-grid {
    grid-template-columns: 1fr;
  }

  .service-theme-card {
    padding: 1.02rem;
    gap: 0.82rem;
  }

  .service-theme-cover {
    width: calc(100% + (1.02rem * 2));
    margin: -1.02rem -1.02rem 0;
  }

  .service-theme-actions .btn {
    width: 100%;
  }

  .contact-next-field-grid {
    grid-template-columns: 1fr;
  }

  .contact-next-aside {
    position: static;
  }

  .contact-next-actions .btn,
  .contact-next-submit {
    width: 100%;
  }

  .contact-next-submit-row {
    align-items: stretch;
  }

  .contact-next-policy {
    width: 100%;
  }

  .contact-next-topic-chip,
  .contact-next-prompt {
    width: 100%;
    text-align: center;
  }

  .contact-next-channel-list a {
    width: 100%;
  }

  .article-filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  .article-filters .filter-btn {
    white-space: nowrap;
  }

  .article-spotlight-cover {
    min-height: 210px;
  }

  .article-spotlight-content {
    padding: 0.95rem;
  }

  .article-detail-stats {
    gap: 0.42rem;
  }

  .article-stat-item {
    font-size: 0.76rem;
  }
}

/* ========== PROFILE VIEW (MVC cleanup) ========== */
.profile-overview-section,
.profile-skills-section,
.profile-trajectory-section {
  padding-top: var(--space-xl) !important;
  padding-bottom: var(--space-xl) !important;
}

.profile-page-header {
  background: linear-gradient(
    180deg,
    rgba(241, 245, 249, 0.72) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  padding-top: var(--space-xl) !important;
  padding-bottom: var(--space-lg) !important;
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 320px);
  gap: 1rem;
  align-items: stretch;
}

.profile-overview-main {
  background: #fff;
  border: 1px solid rgba(31, 59, 101, 0.14);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 1rem;
  height: 100%;
}

.profile-kicker {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: #1f3b65;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}

.profile-rich-summary {
  color: #475569;
  font-size: 1rem;
  line-height: 1.8;
}

.profile-rich-summary p {
  margin: 0 0 1rem;
}

.profile-rich-summary a {
  color: #f97316;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

.profile-rich-summary a:hover {
  color: #c2410c;
}

.profile-metrics-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.profile-metric-card {
  border: 1px solid rgba(31, 59, 101, 0.14);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem 0.85rem;
}

.profile-metric-icon {
  color: #1f3b65;
  font-size: 0.95rem;
}

.profile-metric-value {
  margin-top: 0.2rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.profile-metric-label {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #64748b;
}

.profile-contact-chips {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(31, 59, 101, 0.18);
  background: #fff;
  color: #1f3b65;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  text-decoration: none;
}

.profile-chip:hover {
  border-color: rgba(31, 59, 101, 0.35);
  color: #0f172a;
}

.profile-aside-upgraded {
  text-align: center;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  padding: 1rem !important;
  height: 100%;
}

.profile-photo-xl {
  width: 132px;
  height: 132px;
  border-width: 4px;
  border-radius: 50%;
  object-fit: cover !important;
  object-position: center 15%;
}

.profile-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.profile-role {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.87rem;
  color: #475569;
}

.profile-skills-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.profile-skill-category {
  border: 1px solid rgba(31, 59, 101, 0.12);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  padding: 0.9rem;
}

.profile-skill-category .skill-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.profile-skill-category .skill-count {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(31, 59, 101, 0.08);
  color: #1f3b65;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-skill-tags {
  justify-content: flex-start;
}

.profile-skill-toggle {
  margin-top: 0.65rem;
  border: 1px solid rgba(31, 59, 101, 0.25);
  background: #fff;
  color: #1f3b65;
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.profile-skill-toggle:hover {
  border-color: #1f3b65;
}

.profile-exp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.profile-exp-card {
  border: 1px solid rgba(31, 59, 101, 0.14);
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem;
}

.profile-exp-period {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1f3b65;
  background: rgba(31, 59, 101, 0.09);
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
}

.profile-exp-role {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.profile-exp-company {
  margin: 0.18rem 0 0.5rem;
  color: #334155;
  font-weight: 600;
  font-size: 0.9rem;
}

.profile-exp-summary {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.55;
}

.profile-exp-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.profile-trajectory-section {
  background: var(--surface-alt);
}

.profile-skills-section .section-header,
.profile-trajectory-section .section-header {
  margin-bottom: 1.1rem;
}

.profile-aside-upgraded .about-quick-info {
  gap: 0.45rem;
}

.profile-aside-upgraded .quick-info-item {
  padding: 0.35rem 0;
}

.profile-aside-upgraded .quick-info-label {
  font-size: 0.66rem;
  margin-bottom: 0.12rem;
}

.profile-aside-upgraded .quick-info-value {
  font-size: 0.86rem;
  line-height: 1.35;
}

@media (max-width: 991px) {
  .profile-overview-grid {
    grid-template-columns: 1fr;
  }

  .profile-aside-upgraded {
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
  }

  .profile-skills-grid,
  .profile-exp-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== PROFILE DARK MODE ========== */
[data-theme="dark"] .profile-overview-main {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .profile-kicker {
  background: rgba(249, 115, 22, 0.12);
  color: var(--brand-700);
}

[data-theme="dark"] .profile-rich-summary {
  color: rgba(249, 250, 251, 0.82);
}

[data-theme="dark"] .profile-rich-summary a {
  color: #fb923c;
}

[data-theme="dark"] .profile-rich-summary a:hover {
  color: #fdba74;
}

[data-theme="dark"] .profile-metric-card {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .profile-metric-icon {
  color: var(--brand-700);
}

[data-theme="dark"] .profile-metric-value {
  color: var(--text);
}

[data-theme="dark"] .profile-metric-label {
  color: var(--text-secondary);
}

[data-theme="dark"] .profile-chip {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-secondary);
}

[data-theme="dark"] .profile-chip:hover {
  border-color: var(--brand-700);
  color: var(--text);
}

[data-theme="dark"] .profile-name {
  color: var(--text);
}

[data-theme="dark"] .profile-role {
  color: var(--text-secondary);
}

[data-theme="dark"] .profile-skill-category {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .profile-skill-category .skill-count {
  background: rgba(249, 115, 22, 0.12);
  color: var(--brand-700);
}

[data-theme="dark"] .profile-skill-toggle {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-secondary);
}

[data-theme="dark"] .profile-skill-toggle:hover {
  border-color: var(--brand-700);
  color: var(--brand-700);
}

[data-theme="dark"] .profile-exp-card {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .profile-exp-period {
  background: rgba(249, 115, 22, 0.12);
  color: var(--brand-700);
}

[data-theme="dark"] .profile-exp-role {
  color: var(--text);
}

[data-theme="dark"] .profile-exp-company {
  color: var(--text-secondary);
}

[data-theme="dark"] .profile-exp-summary {
  color: var(--muted);
}

/* ========== DARK MODE HARD OVERRIDES (no blancos residuales) ========== */
[data-theme="dark"] body,
[data-theme="dark"] main,
[data-theme="dark"] .home-shell,
[data-theme="dark"] .page-shell,
[data-theme="dark"] .article-shell,
[data-theme="dark"] .portfolio-shell,
[data-theme="dark"] .error-shell,
[data-theme="dark"] .section,
[data-theme="dark"] .section-education,
[data-theme="dark"] .section-trajectory,
[data-theme="dark"] .section-personal,
[data-theme="dark"] .section-contact-routes,
[data-theme="dark"] .profile-page-header,
[data-theme="dark"] .profile-trajectory-section {
  background: #050505 !important;
}

[data-theme="dark"] .cms-theme-panel,
[data-theme="dark"] .theme-slot .block-shell,
[data-theme="dark"] .theme-slot .servicios-destacados-block,
[data-theme="dark"] .theme-slot .ultimos-articulos-block,
[data-theme="dark"] .theme-slot .bloque-galeria,
[data-theme="dark"] .theme-slot .bloque-testimonios,
[data-theme="dark"] .theme-slot .bloque-newsletter-footer,
[data-theme="dark"] .theme-slot .bloque-indicadores-economicos,
[data-theme="dark"] .caso-card,
[data-theme="dark"] .service-theme-card,
[data-theme="dark"] .article-spotlight,
[data-theme="dark"] .learning-section,
[data-theme="dark"] .contact-next-aside,
[data-theme="dark"] .contact-next-form-shell,
[data-theme="dark"] .profile-overview-main,
[data-theme="dark"] .profile-metric-card,
[data-theme="dark"] .profile-skill-category,
[data-theme="dark"] .profile-exp-card,
[data-theme="dark"] .profile-chip,
[data-theme="dark"] .profile-skill-toggle {
  background: #111111 !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .caso-cover,
[data-theme="dark"] .caso-media,
[data-theme="dark"] .article-spotlight-cover,
[data-theme="dark"] .service-theme-cover,
[data-theme="dark"] .service-theme-cover-placeholder,
[data-theme="dark"] .service-theme-icon {
  background: #0c0c0c !important;
}

[data-theme="dark"] .caso-cover img,
[data-theme="dark"] .caso-media img {
  background: #0c0c0c !important;
}

[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background-color: #fff"],
[data-theme="dark"] [style*="background-color:#ffffff"],
[data-theme="dark"] [style*="background-color: #ffffff"] {
  background: #111111 !important;
}

/* Páginas solicitadas: perfil, experiencia, formación, casos, clientes */
[data-theme="dark"] .page-header,
[data-theme="dark"] .profile-overview-section,
[data-theme="dark"] .profile-skills-section,
[data-theme="dark"] .profile-trajectory-section,
[data-theme="dark"] .formacion-v2,
[data-theme="dark"] .casos-grid,
[data-theme="dark"] .timeline,
[data-theme="dark"] .clientes-grid,
[data-theme="dark"] .clientes-proyectos-wrap {
  background: #050505 !important;
}

[data-theme="dark"] .timeline-content,
[data-theme="dark"] .timeline-metric-box,
[data-theme="dark"] .timeline-reco-card,
[data-theme="dark"] .client-card,
[data-theme="dark"] .client-projects-group,
[data-theme="dark"] .project-card {
  background: #111111 !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .timeline::before {
  background: #1f1f1f !important;
}

[data-theme="dark"] .timeline-marker {
  border-color: #050505 !important;
}

.client-location-section {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.client-location-copy {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.client-location-address,
.client-location-note {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted, #525252);
}

.client-location-map {
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.12));
  background: #f5f5f5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.client-location-map .leaflet-container {
  width: 100%;
  height: 100%;
}

.client-location-map img,
.client-location-map .leaflet-tile,
.client-location-map .leaflet-marker-icon,
.client-location-map .leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}

[data-theme="dark"] .client-location-map {
  background: #0d0d0d;
}

@media (min-width: 960px) {
  .client-location-section {
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .client-location-map {
    min-height: 260px;
  }
}

/* Dark mode: los elementos con comportamiento de botón/pill usan naranja, no azul Bootstrap. */
[data-theme="dark"] .btn-outline-primary,
[data-theme="dark"] .btn-link.text-primary,
[data-theme="dark"] .bloque-articulos-destacados .btn-link,
[data-theme="dark"] .theme-slot .btn-link,
[data-theme="dark"] a.btn.text-primary {
  color: #f97316 !important;
  border-color: #f97316 !important;
}

[data-theme="dark"] .btn-outline-primary:hover,
[data-theme="dark"] .btn-outline-primary:focus,
[data-theme="dark"] .btn-outline-primary:active,
[data-theme="dark"] .btn-link.text-primary:hover,
[data-theme="dark"] .bloque-articulos-destacados .btn-link:hover,
[data-theme="dark"] .theme-slot .btn-link:hover,
[data-theme="dark"] a.btn.text-primary:hover {
  background: #f97316 !important;
  border-color: #fb923c !important;
  color: #0f0f0f !important;
}

[data-theme="dark"] .bloque-articulos-destacados .text-primary,
[data-theme="dark"] .theme-slot h3 .text-primary {
  color: #f97316 !important;
}

[data-theme="dark"] .contact-next-channel-list a {
  color: #f9fafb !important;
}

[data-theme="dark"] .contact-next-channel-list a i {
  color: #f97316 !important;
}

[data-theme="dark"] .contact-next-channel-list a:hover {
  color: #fb923c !important;
}

[data-theme="dark"] .contact-next-checks li::before {
  background: #f97316 !important;
}

[data-theme="dark"] .contact-next-topic-chip:hover,
[data-theme="dark"] .contact-next-prompt:hover {
  border-color: #f97316 !important;
  color: #f97316 !important;
}

[data-theme="dark"] .badge.bg-primary,
[data-theme="dark"] .badge.text-bg-primary,
[data-theme="dark"] .badge.bg-primary-subtle,
[data-theme="dark"] .badge.text-primary-emphasis,
[data-theme="dark"] .bg-primary-subtle.text-primary-emphasis,
[data-theme="dark"] .article-spotlight-pill,
[data-theme="dark"] .article-media-pill,
[data-theme="dark"] .v6-category-badge,
[data-theme="dark"] .caso-pill,
[data-theme="dark"] .tag-small,
[data-theme="dark"] .service-theme-badges .tag,
[data-theme="dark"] .learning-type-badge {
  background: rgba(249, 115, 22, 0.14) !important;
  border-color: rgba(249, 115, 22, 0.46) !important;
  color: #f97316 !important;
}

[data-theme="dark"] .article-media-pill i,
[data-theme="dark"] .article-spotlight-pill i,
[data-theme="dark"] .badge.bg-primary i,
[data-theme="dark"] .badge.bg-primary-subtle i {
  color: #f97316 !important;
}

/* Legal Premium Components - v6.7.7 */
.cms-legal-container {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}
.legal-header {
  text-align: center;
  margin-bottom: 5rem;
}
.legal-header h2 {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
.last-update {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mce-accordion {
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.03);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  margin-bottom: 1.2rem;
  padding: 20px !important;
}

.mce-accordion:hover {
  border-color: rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08);
}

.mce-accordion[open] {
  border-color: #3b82f6 !important;
  transform: scale(1.01);
  box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.1);
}

.mce-accordion-summary {
  padding: 2.5rem 3.5rem !important;
  list-style: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700 !important;
  color: #1e293b !important;
  font-size: 1.35rem !important;
  cursor: pointer;
  background: transparent !important;
}

.mce-accordion-summary::-webkit-details-marker,
.mce-accordion-summary::marker {
  display: none !important;
}

.mce-accordion-summary::after {
  content: "\F282";
  font-family: "bootstrap-icons";
  transition: transform 0.4s ease;
  font-size: 1.1rem;
  color: #64748b;
}

.mce-accordion[open] .mce-accordion-summary::after {
  transform: rotate(180deg);
  color: #3b82f6;
}

.mce-accordion-body {
  padding: 0.5rem 3.5rem 3rem !important;
  line-height: 2.1;
  color: #475569;
  font-size: 1.15rem;
  animation: slideDownFade 0.5s ease-out;
}

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

/* Soporte Dark Mode para Componentes Legales */
[data-theme="dark"] .mce-accordion {
  background: #111 !important;
  border-color: #1f2937 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .mce-accordion-summary {
  color: #f8fafc !important;
}

[data-theme="dark"] .legal-header h2 {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .mce-accordion-body {
  color: #94a3b8;
}

[data-theme="dark"] .mce-accordion[open] {
  border-color: #f97316 !important;
  box-shadow: 0 20px 25px -5px rgba(249, 115, 22, 0.15);
}

[data-theme="dark"] .mce-accordion[open] .mce-accordion-summary::after {
  color: #f97316;
}
