body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e9ecef 100%);
    color: #222;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    cursor: url('https://cdn.jsdelivr.net/gh/ionic-team/ionicons@7.1.0/src/svg/code-slash.svg'), auto;
}
header {
    background: linear-gradient(90deg, #222 0%, #444 100%);
    color: #fff;
    padding: 2.5rem 1rem 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    position: relative;
}
.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    margin-bottom: 1rem;
    background: #eee;
}
.cv-container {
    max-width: 950px;
    margin: 2.5rem auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    padding: 2.5rem 2rem;
    animation: fadeIn 1.2s ease;
}
/* Estilos para las columnas principales */
.cv-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Ajustes para la sección de habilidades */
.skills-top-row {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.skills-section {
    flex: 1;
    min-width: 250px;
}

.cv-col {
    flex: 1 1 100%;
    max-width: 100%;
}

/* Grid de habilidades técnicas */
.tech-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.skill-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Contenedor para las columnas de lenguajes y frameworks */
.languages-frameworks-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.languages-section,
.frameworks-section {
    flex: 1;
    min-width: 300px;
}

.cv-col-half {
    flex: 1 1 45%;
    min-width: 250px;
    max-width: 48%;
}

@media (max-width: 768px) {
    .cv-col-half {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.cv-col-half {
    width: 48%;
    display: inline-block;
    vertical-align: top;
    margin-right: 2%;
}

.cv-col-half:last-child {
    margin-right: 0;
}
h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.7rem;
    letter-spacing: 1px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.cv-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.cv-info span {
    background: rgba(255,255,255,0.18);
    border-radius: 6px;
    padding: 0.3rem 0.8rem;
    margin-bottom: 0.3rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.cv-info span:hover {
    background: #444;
    color: #ffd700;
    transition: background 0.3s, color 0.3s;
}
.cv-tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
    margin: 1.2rem 0 2rem 0;
}
.cv-tech-icons img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.10)) brightness(1.5) contrast(1.2) grayscale(0.1) drop-shadow(0 0 2px #fff);
    border-radius: 8px;
    padding: 4px;
    transition: transform 0.3s, filter 0.3s;
    cursor: pointer;
}
.cv-tech-icons img:hover {
    transform: scale(1.15) rotate(-8deg);
    filter: drop-shadow(0 2px 8px #222) brightness(1.7) contrast(1.3);
  
}
h2 {
    color: #222;
    margin-top: 2.2rem;
    font-size: 1.35rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}
h2:hover {
    color: #444;
}
h3 {
    color: #444;
    margin: 1.2rem 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}
ul {
    padding-left: 1.2rem;
    margin: 0.5rem 0 1rem 0;
}
li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    transition: background 0.3s;
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
}
li:hover {
    background: #f0f6ff;
}
p, .cv-info {
    margin: 0.3rem 0;
    font-size: 1rem;
}
.cv-contact a {
    color: #222;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}
.cv-contact a:hover {
    color: #ffd700;
    text-decoration: underline;
}

/* Estilos para las cards de experiencia y educación */
.experience-card, .education-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.experience-card:hover, .education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.experience-card::before, .education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #222;
    transition: all 0.3s ease;
}

.experience-card:hover::before, .education-card:hover::before {
    width: 6px;
    background: #0057b8;
}

.experience-date, .education-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.experience-card:hover .experience-date,
.education-card:hover .education-date {
    background: #e9ecef;
    color: #0057b8;
}

.experience-location, .education-specialty {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Barras de progreso y skills */
.skill-container {
    margin-bottom: 1rem;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #0057b8, #444);
    border-radius: 4px;
    transition: width 1.5s ease;
}

/* Clase para activar la animación cuando es visible */
.lang-item.visible .skill-fill {
    width: 95%; /* Se expandirá a este ancho cuando tenga la clase visible */
    animation: expandSkill 1.5s ease-out forwards;
}

:root {
    --skill-width: 80%; /* valor por defecto para animaciones de barras */
}

@keyframes expandSkill {
    from { width: 0; }
    to { width: var(--skill-width, 95%); }
}

/* Tooltips mejorados */
.cv-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    white-space: nowrap;
}

.cv-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: rgba(0,0,0,0.8) transparent transparent transparent;
}

/* Animaciones para elementos */
@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 700px) {
    .cv-container {
        padding: 1rem 0.5rem;
    }
    .cv-row {
        flex-direction: column;
        gap: 1rem;
    }
    .profile-img {
        width: 90px;
        height: 90px;
    }
}
#cv-canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Terminal Animation Styles */
.terminal-container {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #fff;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.terminal-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    color: #999;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.terminal-content {
    font-size: 0.9rem;
    line-height: 1.4;
}

.command-line {
    display: flex;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFade 0.3s ease forwards;
}

.prompt {
    color: #27c93f;
    margin-right: 0.5rem;
}

.command {
    color: #fff;
}

.ubuntu .prompt { color: #ff5f56; }
.windows .prompt { color: #00a4ef; }
.macos .prompt { color: #27c93f; }

.output {
    color: #999;
    margin: 0.25rem 0 1rem 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFade 0.3s ease forwards;
}

.skill-level {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.skill-level.expert {
    background: #27c93f33;
    color: #27c93f;
}

@keyframes typeWriter {
    from { width: 0; }
    to { width: 100%; }
}

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

.typing {
    overflow: hidden;
    white-space: nowrap;
    animation: typeWriter 2s steps(40, end);
    display: inline-block;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: #fff;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

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

/* Ajustes responsivos para la terminal */
@media (max-width: 700px) {
    .terminal-container {
        font-size: 0.8rem;
        padding: 0.8rem;
    }
    .terminal-dots {
        gap: 4px;
    }
    .terminal-dot {
        width: 10px;
        height: 10px;
    }
}

/* Estilos específicos para la terminal de código */
.code-terminal {
    background: #282a36;
    border-radius: 8px;
    font-family: 'Fira Code', 'Consolas', monospace;
    margin: 1rem 0;
    overflow: hidden;
}

.code-terminal .terminal-header {
    background: #1e1f29;
}

.code-section {
    padding: 1rem;
    position: relative;
    border-bottom: 1px solid #44475a;
}

.code-section:last-child {
    border-bottom: none;
}

.language-label {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    background: #44475a;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #8be9fd;
}

.code-content {
    margin-top: 1.5rem;
    line-height: 1.6;
}

.code-line {
    opacity: 0;
    transform: translateX(-10px);
}

/* Colores de sintaxis */
.keyword { color: #ff79c6; }
.string { color: #f1fa8c; }
.number { color: #bd93f9; }
.function { color: #50fa7b; }
.comment { color: #6272a4; }
.variable { color: #8be9fd; }
.operator { color: #ff79c6; }

/* Animaciones para el código */
@keyframes typeLine {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

.typing-line {
    white-space: pre;
    overflow: hidden;
    animation: typeLine 1.5s steps(40, end) forwards;
}

/* Output de código */
.code-output {
    background: #44475a;
    color: #f8f8f2;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFade 0.5s ease forwards;
    animation-delay: 1.5s;
}

.skill-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    background: #50fa7b33;
    color: #50fa7b;
    vertical-align: middle;
}

/* Estilo para el cursor parpadeante */
.code-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #f8f8f2;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes codeSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estilos para la grid de habilidades técnicas */
.tech-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.skill-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.category-label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.3rem;
}

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

.skill-tag {
    background: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: #0057b8;
    color: #fff;
    border-color: #0057b8;
    transform: translateY(-2px);
}

/* Estilos para la terminal compacta de lenguajes core */
.code-terminal.compact {
    background: #282a36;
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.code-terminal .terminal-header {
    background: #1e1f29;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #44475a;
}

.code-terminal .terminal-content {
    padding: 1rem;
}

.code-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lang-item, .framework-item {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.lang-item:hover, .framework-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.lang-name, .framework-name {
    color: #8be9fd;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.skill-bar {
    background: rgba(255,255,255,0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5rem 0;
    position: relative;
}

.skill-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #50fa7b, #8be9fd);
    border-radius: 3px;
    transition: width 1.5s ease-out;
}

/* Animaciones para las barras de habilidades */
@keyframes fillBar {
    from { width: 0; }
    to { width: var(--skill-width, 80%); }
}

.lang-item.visible .skill-fill,
.framework-item.visible .skill-fill {
    animation: fillBar 1.5s ease-out forwards;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .two-columns-container {
        flex-direction: column;
    }
    
    .column {
        width: 100%;
    }
}

/* Frameworks grid específico */
.frameworks-grid {
    display: grid;
    gap: 1rem;
}

.framework-item {
    background: #282a36;
    padding: 1rem;
    border-radius: 8px;
    color: #f8f8f2;
}

.skill-level {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    background: rgba(80, 250, 123, 0.2);
    color: #50fa7b;
}

/* Estilos adicionales para animaciones */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

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

/* Ajustes para la sección de habilidades adicionales */
.additional-skills {
    margin-top: 2rem;
}

.additional-skills h3 {
    color: #444;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.additional-skills ul {
    margin: 0;
    padding-left: 1.2rem;
}

.additional-skills li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Estilos para la sección adicional de skills (nuevas tarjetas) */
.additional-skills-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.skill-card {
    flex: 1 1 300px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.skill-icon {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,87,184,0.06), rgba(255,255,255,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.95;
    box-shadow: 0 6px 18px rgba(0,87,184,0.06);
}

.skill-icon i {
    font-size: 28px;
    color: #0057b8;
}

.skill-detail {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.4rem 0;
}

.skill-text {
    display: flex;
    flex-direction: column;
}

.skill-sub {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.18rem;
}

.badge {
    background: #eef4ff;
    color: #0057b8;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(0,87,184,0.04);
}

.level-expert {
    background: linear-gradient(90deg, #0057b8, #007bff);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,87,184,0.12);
}

/* Entrada animada y micro-interacciones */
@keyframes floatUp {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.skill-card { animation: floatUp 0.6s ease both; }

.skill-card .skill-detail i { color: #0057b8; font-size: 20px; }

@media (max-width: 900px) {
    .additional-skills-container { flex-direction: column; }
}

/* Alineación lado a lado para Lenguajes Core y Frameworks */
.two-columns-container {
    display: flex;
    gap: 1rem;
    align-items: stretch; /* Fuerza mismo alto */
    margin-top: 1.5rem;
}

.two-columns-container .column {
    flex: 1 1 50%;
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

/* Normalizar estilo: ambos hijos tendrán apariencia de tarjeta similar (estilo terminal oscuro) */
.two-columns-container .column > .code-terminal,
.two-columns-container .column > .frameworks-grid {
    background: #282a36; /* fondo terminal oscuro */
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
    color: #f8f8f2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Ajustes internos para que el contenido respete el nuevo fondo */
.two-columns-container .column > .code-terminal .terminal-header,
.two-columns-container .column > .code-terminal .terminal-content {
    background: transparent;
    color: inherit;
}

/* Hacer que el área del código se vea consistente (texto claro) */
.two-columns-container .column > .code-terminal .terminal-content .code-grid .lang-item {
    background: rgba(255,255,255,0.03);
    color: #f8f8f2;
}

/* Frameworks: adaptar fondo para encajar con el terminal oscuro */
.two-columns-container .column > .frameworks-grid .framework-item {
    background: rgba(255,255,255,0.03);
    color: #f8f8f2;
    border-radius: 8px;
    padding: 0.9rem;
}

/* Asegurar que barras y fills se adapten al fondo oscuro */
.two-columns-container .column .skill-bar { background: rgba(255,255,255,0.06); }
.two-columns-container .column .skill-fill { background: linear-gradient(90deg, #50fa7b, #8be9fd); }

/* Tilt 3D micro-animations */
.two-columns-container .column > .code-terminal,
.two-columns-container .column > .frameworks-grid {
    perspective: 1000px; /* contenedor con perspectiva para efecto 3D */
}

.lang-item, .framework-item {
    transform-style: preserve-3d;
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease, filter 220ms ease;
    will-change: transform;
    cursor: pointer;
}

.lang-item.is-tilting, .framework-item.is-tilting {
    box-shadow: 0 20px 40px rgba(2,6,23,0.18);
    filter: brightness(1.03);
}

/* Hover fallback: pequeña elevación al pasar el ratón */
.lang-item:hover, .framework-item:hover {
    transform: translateY(-6px) scale(1.01);
}

/* Cuando se resetea, suavizar la vuelta */
.lang-item.reset, .framework-item.reset {
    transition: transform 450ms cubic-bezier(.2,.9,.2,1);
}

/* Responsivo: apilar en pantallas pequeñas */
@media (max-width: 900px) {
    .two-columns-container { flex-direction: column; }
    .two-columns-container .column { width: 100%; }
}

/* Estilos para la grid mejorada de "Otras Competencias" */
.skills-grid.enhanced-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

.skills-grid.enhanced-grid .skill-item {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    background: transparent;
    padding: 0.6rem;
    border-radius: 8px;
    transition: background 0.18s ease, transform 0.18s ease;
}

.skills-grid.enhanced-grid .skill-item:hover {
    background: rgba(255,255,255,0.03);
    transform: translateY(-4px);
}

.skills-grid.enhanced-grid .skill-item i {
    font-size: 20px;
    color: #50fa7b;
    min-width: 28px;
    margin-top: 4px;
}

.skills-grid.enhanced-grid .skill-content h4 {
    margin: 0;
    font-size: 0.98rem;
    color: #f8f8f2;
}

.skills-grid.enhanced-grid .skill-content p {
    margin: 0.25rem 0 0 0;
    font-size: 0.88rem;
    color: #cbd5e1;
}

/* En el caso de que el card tenga fondo claro (desktop principal), ajustar colores */
.skill-card.other-skills .skill-item i { color: #0057b8; }
.skill-card.other-skills .skill-content h4 { color: #222; }
.skill-card.other-skills .skill-content p { color: #555; }

@media (max-width: 900px) {
    .skills-grid.enhanced-grid { grid-template-columns: 1fr; }
}

/* Botón de cambio de idioma flotante */
.language-switch {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1200;
}

.language-switch button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #ffffff, #f1f7ff);
    border: 0;
    padding: 8px 12px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    cursor: pointer;
    font-weight: 700;
    color: #0057b8;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.language-switch button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.language-switch .flag {
    font-size: 18px;
    display: inline-block;
    transform-origin: 50% 50%;
}

/* Animación simple al cambiar bandera */
.flag-change {
    animation: flagFlip 420ms cubic-bezier(.2,.9,.2,1);
}

@keyframes flagFlip {
    0% { transform: rotateX(0deg) scale(1); }
    40% { transform: rotateX(90deg) scale(0.95); }
    60% { transform: rotateX(-20deg) scale(1.02); }
    100% { transform: rotateX(0deg) scale(1); }
}

/* Pequeño ajuste para pantallas móviles: botón menos intrusivo */
@media (max-width: 480px) {
    .language-switch {
        top: 12px;
        right: 12px;
    }
    .language-switch button {
        padding: 6px 8px;
        gap: 6px;
        font-size: 0.9rem;
    }
}
