/* 1. TUS FUENTES VARIABLES (Normal y Cursiva) */
@font-face {
    font-family: 'Newsreader';
    src: url('fonts/Newsreader-VariableFont_opsz,wght.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Newsreader';
    src: url('fonts/Newsreader-Italic-VariableFont_opsz,wght.woff2') format('woff2');
    font-weight: 200 800;
    font-style: italic;
    font-display: swap;
}

/* 2. TUS COLORES EXACTOS */
:root {
    --bg-color: #F1EEE7;
    --text-heading: #1C1C1C;
    --text-base: #2B2B2B;
}

.dark-mode {
    --bg-color: #1F1E1D;
    --text-heading: #F0EEE6;
    --text-base: #EDEDED;
}

/* 3. SIMETRÍA Y MÁRGENES BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-base);
    font-family: 'Newsreader', serif;
    font-size: 21px; /* Tamaño de lectura ideal para Newsreader */
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* La columna central inquebrantable */
.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* 4. LA CABECERA (Tu Nombre y el Interruptor) */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 70px;
}

.site-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-heading);
    text-decoration: none;
}

/* El Interruptor de Modo Oscuro */
#theme-toggle {
    background: none;
    border: 2px solid var(--text-heading);
    cursor: pointer;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    position: relative;
    transition: border-color 0.3s;
}

#theme-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: var(--text-heading);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), background-color 0.3s;
}

.dark-mode #theme-toggle::after {
    transform: translateX(20px);
}

/* 5. TEXTOS Y ENLACES */
h1, h2, h3 {
    color: var(--text-heading);
    font-weight: 600;
}

h2 {
    font-size: 1.3rem;
    margin-top: 50px;
    margin-bottom: 20px;
}

p {
    margin-bottom: 25px;
    font-weight: 400;
}

a {
    color: var(--text-heading);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: text-decoration-thickness 0.2s;
}

a:hover {
    text-decoration-thickness: 2px;
}

.site-title:hover {
    text-decoration: none;
}

/* 6. LISTAS DE ARTÍCULOS */
.post-list {
    list-style: none;
}

.post-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
}

.post-list li::before {
    content: "•";
    color: var(--text-heading);
    margin-right: 10px;
    font-size: 1.2rem;
}

/* 7. CAJA DEL NEWSLETTER */
.newsletter-box {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--text-heading);
    opacity: 0.8;
}

.newsletter-box h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}