/* ============================================
   BASE — Reset, Variables, Tipografía
   ============================================ */

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #000000;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary-color: #ffffff;
    --secondary-color: #1a1a1a;
    --accent-color: #76ebc8;
    --text-color: #e0e0e0;
    --text-light: #a0a0a0;
    --shadow: 0 2px 20px rgba(118, 235, 200, 0.1);
    --shadow-hover: 0 4px 30px rgba(118, 235, 200, 0.15);
    --bg-color: #0d0d0d;
    --bg-alt: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Courier New', 'Consolas', 'Monaco', monospace;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Foco visible sólo para navegación por teclado */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Transición de tema: sólo activa durante el cambio (cero costo en uso normal) */
html.theme-transition,
html.theme-transition * {
    transition: background-color 0.4s ease, color 0.4s ease,
        border-color 0.4s ease, box-shadow 0.4s ease !important;
}

/* Respeto a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    html {
        scroll-behavior: auto;
    }
}
