html[data-theme="dark"] {
    color-scheme: dark;
    --bs-body-bg: #060e1b;
    --bs-body-color: #f4f7fa;
    --bs-heading-color: #ffffff;
    --bs-secondary-color: rgba(244, 247, 250, 0.75);
    --bs-border-color: rgba(66, 179, 255, 0.25);
    --brand-accent: #42B3FF;
}

html[data-theme="dark"] body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

html[data-theme="dark"] .bg-body-tertiary,
html[data-theme="dark"] .bg-body-secondary {
    background-color: #0b1f3a !important;
}

html[data-theme="dark"] .navbar,
html[data-theme="dark"] .card,
html[data-theme="dark"] .skill-card,
html[data-theme="dark"] .achievement-card {
    background-color: rgba(11, 31, 58, 0.7);
    border-color: rgba(66, 179, 255, 0.2);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .timeline::before {
    left: -0.875rem;
    background: linear-gradient(180deg, rgba(66, 179, 255, 0.1), rgba(66, 179, 255, 0.3));
}

html[data-theme="dark"] .timeline-marker {
    left: -1.25rem;
    background-color: transparent;
    border: 2px solid #42B3FF;
    box-shadow: none;
}

html[data-theme="dark"] .btn-outline-primary {
    color: #42B3FF;
    border-color: #42B3FF;
}

html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-primary:focus-visible {
    background-color: #42B3FF;
    border-color: #42B3FF;
    color: #ffffff;
}

html[data-theme="dark"] .btn-primary {
    background-color: #42B3FF;
    border-color: #42B3FF;
    color: #ffffff;
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus-visible {
    background-color: #3ba3e6;
    border-color: #3ba3e6;
    color: #ffffff;
}

/* Mejorar contraste de enlaces en modo oscuro */
html[data-theme="dark"] a:not(.btn) {
    color: #42B3FF;
}

html[data-theme="dark"] a:not(.btn):hover,
html[data-theme="dark"] a:not(.btn):focus-visible {
    color: #66c2ff;
}

/* Modo oscuro por defecto (sin data-theme) */
html:not([data-theme="light"]) {
    color-scheme: dark;
    --bs-body-bg: #060e1b;
    --bs-body-color: #f4f7fa;
    --bs-heading-color: #ffffff;
    --bs-secondary-color: rgba(244, 247, 250, 0.75);
    --bs-border-color: rgba(66, 179, 255, 0.25);
}

html:not([data-theme="light"]) body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

html:not([data-theme="light"]) .bg-body-tertiary,
html:not([data-theme="light"]) .bg-body-secondary {
    background-color: #0b1f3a !important;
}

html:not([data-theme="light"]) .navbar,
html:not([data-theme="light"]) .card,
html:not([data-theme="light"]) .skill-card,
html:not([data-theme="light"]) .achievement-card {
    background-color: rgba(11, 31, 58, 0.7);
    border-color: rgba(66, 179, 255, 0.2);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.4);
}

html:not([data-theme="light"]) .timeline::before {
    left: -0.875rem;
    background: linear-gradient(180deg, rgba(66, 179, 255, 0.1), rgba(66, 179, 255, 0.3));
}

html:not([data-theme="light"]) .timeline-marker {
    left: -1.25rem;
    background-color: transparent;
    border: 2px solid #42B3FF;
    box-shadow: none;
}

html:not([data-theme="light"]) .btn-outline-primary {
    color: #42B3FF;
    border-color: #42B3FF;
}

html:not([data-theme="light"]) .btn-outline-primary:hover,
html:not([data-theme="light"]) .btn-outline-primary:focus-visible {
    background-color: #42B3FF;
    border-color: #42B3FF;
    color: #ffffff;
}

html:not([data-theme="light"]) .btn-primary {
    background-color: #42B3FF;
    border-color: #42B3FF;
    color: #ffffff;
}

html:not([data-theme="light"]) .btn-primary:hover,
html:not([data-theme="light"]) .btn-primary:focus-visible {
    background-color: #3ba3e6;
    border-color: #3ba3e6;
    color: #ffffff;
}

/* Mejorar contraste de enlaces en modo oscuro por defecto */
html:not([data-theme="light"]) a:not(.btn) {
    color: #42B3FF;
}

html:not([data-theme="light"]) a:not(.btn):hover,
html:not([data-theme="light"]) a:not(.btn):focus-visible {
    color: #66c2ff;
}

/* Estilos para chips de tecnologías en modo oscuro */
html[data-theme="dark"] .badge.text-bg-primary,
html:not([data-theme="light"]) .badge.text-bg-primary {
    background-color: rgba(66, 179, 255, 0.15) !important;
    color: #42B3FF !important;
    border: 1px solid rgba(66, 179, 255, 0.3);
    font-weight: 500;
}

html[data-theme="dark"] .badge.text-bg-secondary,
html:not([data-theme="light"]) .badge.text-bg-secondary {
    background-color: rgba(244, 247, 250, 0.1) !important;
    color: #f4f7fa !important;
    border: 1px solid rgba(244, 247, 250, 0.2);
    font-weight: 500;
}