*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --fg: #e0e0e0;
    --accent: #ff453a;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    /* Stack de fuentes nativas del sistema, sin dependencias externas */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    line-height: 1.6;
    background: var(--bg);
    color: var(--fg);
}

::selection {
    background: #a81c15;
    color: #fff;
}

/* Skip link */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 1rem;
    margin: 0;
    clip: auto;
    white-space: normal;
    background: var(--accent);
    color: #000;
    display: block;
    text-align: center;
    font-weight: bold;
    z-index: 9999;
}
nav { 
    margin-top: 2rem;
    margin-bottom: 2rem; 
    border-bottom: 1px solid var(--accent); 
    padding-bottom: 1rem; 
}
nav ul {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
a { color: var(--accent); text-decoration: none; }
main a { text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus-visible { 
    text-decoration: underline; 
}
a:focus-visible {
    outline: 2px dashed var(--accent);
    outline-offset: 4px;
}
nav a { 
    font-size: 1.2em;
    font-weight: 700;
}

.article-date {
    font-size: 0.85em;
    opacity: 0.7;
    margin-bottom: -1.5rem;
    font-style: italic;
}


img { max-width: 100%; height: auto; opacity: 0.9; display: block; margin: 0 auto; }
pre, code { background: #000; color: var(--accent); padding: 0.2rem; border: 1px solid #222; }

/* Tipografía de Títulos */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: -0.02em;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

pre { padding: 1rem; overflow-x: auto; }
blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 1rem; color: #999; }
footer { margin-top: 3rem; border-top: 1px dashed var(--accent); padding-top: 1rem; font-size: 0.9em; opacity: 0.7; }

/* Ocultar elementos exclusivos de impresión en pantalla */
.print-only { display: none; }

/* ========================================================================= */
/* TABLAS CLÁSICAS / BRUTALISTAS                                             */
/* ========================================================================= */

table {
    margin: 3rem auto;
    width: auto;
    max-width: 100%;
    border-collapse: collapse;
    background-color: transparent;
    border: 6px double #555555;
}

th, td {
    padding: 0.85rem 1.5rem;
    border: 1px solid #555555;
    word-break: break-word;
    white-space: normal;
}

th {
    background-color: #1a1a1a;
    font-weight: bold;
}
