:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e8e8e8;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e0e0e0;
    --accent: #0066cc;
    --accent-hover: #0052a3;
    --code-bg: #f5f5f5;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2e2e2e;
    --text-primary: #e8e8e8;

    --text-tertiary: #888888;
    --border-color: #3a3a3a;
    --accent: #4a9eff;
    --accent-hover: #66b0ff;
    --code-bg: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Courier New', monospace;
}

.nav {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
    color: var(--accent);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
}

.sun-icon,
.moon-icon {
    stroke-width: 2;
}

[data-theme="light"] .moon-icon,
[data-theme="dark"] .sun-icon {
    display: none;
}

/* Posts List */
.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.separator {
    color: var(--text-tertiary);
}

.categories {
    display: flex;
    gap: 0.5rem;
}

.category {
    background-color: var(--accent);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: var(--accent);
}

.post-summary {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--accent-hover);
}

/* Single Post */
.post {
    max-width: 800px;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-header .post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-categories {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content ul, .post-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-tags {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.tag {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.tag:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 2rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}


/* BLOCKQUOTE / HOOK */
article blockquote {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.07) 0%, rgba(34, 197, 94, 0) 100%);
    border-left: 3px solid #22c55e;
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-style: normal;
    color: #d4d4d4;
    font-weight: 400;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.04);
}

article blockquote p {
    margin: 0;
    line-height: 1.7;
    font-size: 1rem;
    color: #e5e5e5;
}

/* Kill the auto-quotes that Tailwind prose injects */
article blockquote p::before,
article blockquote p::after,
article blockquote::before,
article blockquote::after {
    content: none !important;
}

/* ESTILOS PARA LA BARRA LATERAL (ToC) */
#TableOfContents li {
    margin-bottom: 6px;
    line-height: 1.2;
}

#TableOfContents a {
    color: #9ca3af; /* Gris similar a text-text-muted */
    text-decoration: none;
    transition: all 0.2s ease;
    display: block; /* Para que el área clickeable ocupe toda la línea */
}

/* Estilo HOVER (Cuando pasas el ratón) */
#TableOfContents a:hover {
    color: #00ff00 !important; /* <--- TU VERDE PRIMARY */
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5); /* Opcional: un pequeño brillo glow */
    cursor: pointer;
}

/* Opcional: Si quieres que la línea vertical de la izquierda también se ilumine */
#TableOfContents ul {
    border-left: 1px solid #333;
}

/* Niveles anidados (H3) - Los indentamos un poco */
#TableOfContents ul ul {
    margin-top: 4px;
    padding-left: 12px;
}

