:root {
    /* Colors - Light Mode (Default) */
    --bg-body: #ffffff;
    --bg-card: #f8f9fa;
    --bg-nav: #bf0808;
    --bg-hover: #a30000;

    --text-main: #333333;
    --text-muted: #666666;
    --text-inverse: #ffffff;

    --border-color: #dddddd;

    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

    /* Layout */
    --container-width: 1200px;
    --spacing: 20px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-body: #101010;
    --bg-card: #1a1a1a;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --border-color: #333333;
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.justify-between {
    justify-content: space-between;
}

/* Top Date Bar */
.top-bar {
    background: #000;
    color: #888;
    font-size: 0.75rem;
    padding: 8px 0;
    font-weight: 600;
    text-transform: uppercase;
}

/* Hero Section */
.hero-header {
    background-color: #222;
    background-image: url('/Imagenes/ciudad.png');
    background-size: cover;
    background-position: center;
    height: 350px;
    /* Increased height for impact */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.hero-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.site-title {
    font-size: 5.5rem;
    /* Increased from 4rem */
    font-weight: 900;
    letter-spacing: -3px;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.site-tagline {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.9;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Navigation */
.main-nav {
    background-color: var(--bg-nav);
    color: var(--text-inverse);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    height: 100%;
}

.nav-links li {
    height: 100%;
}

.nav-links a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.nav-links a:hover {
    background-color: rgba(0, 0, 0, 0.15);
}

.has-dropdown::after {
    content: '▼';
    font-size: 0.6em;
    margin-left: 5px;
}

.nav-icons {
    display: flex;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
}

/* Main Layout */
.site-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
}

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

/* Post Cards */
.post-card {
    background-color: var(--bg-card);
    padding: 0;
    margin-bottom: 40px;
    border-radius: 2px;
}

.post-cat {
    background-color: #d8acaa;
    color: #fff;
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    border-radius: 2px;
}

.post-title {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 800;
    color: var(--text-main);
}

.post-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.post-meta i {
    margin-right: 5px;
}

.post-excerpt {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.7;
}

.btn-read-more {
    display: inline-block;
    border: 1px solid var(--text-muted);
    padding: 10px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-main);
    letter-spacing: 1px;
}

.btn-read-more:hover {
    background: var(--text-main);
    color: var(--bg-body);
}

/* Sidebar Widgets */
.widget {
    background-color: var(--bg-card);
    padding: 20px;
    margin-bottom: 30px;
    border-left: 3px solid var(--text-muted);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Code and Preformatted text */
pre {
    background: #f4f4f4;
    padding: 15px;
    overflow-x: auto;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] pre {
    background: #1e1e1e;
    border-color: #333;
}

code {
    font-family: var(--font-mono, monospace);
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
    display: block;
}

/* MathJax / Latex adjustments */
.mjx-chtml {
    font-size: 110% !important;
}