:root {
    --verde: #4A6B3A;      /* Verde terroso - ni oscuro ni claro */
    --marron: #6B4E3D;     /* Marrón principal */
    --marron-claro: #8B5E3C;
    --marron-muy-claro: #D4C4B0;
    --negro: #1A1A1A;
    --fondo: #F5F0E8;      /* Beige cálido de fondo */
    --texto: #2C2C2C;
    --blanco: #FFFFFF;
}

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

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--fondo);
    color: var(--texto);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER / NAVEGACIÓN
   ============================================ */
.main-header {
    background: var(--blanco);
    border-bottom: 2px solid var(--marron-muy-claro);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    max-width: 60px;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.08));
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.nav-menu a {
    color: var(--marron);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
    color: var(--verde);
    border-bottom-color: var(--verde);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--marron);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, var(--fondo) 0%, #E8E0D5 100%);
    border-bottom: 3px solid var(--marron);
}

.hero .logo {
    max-width: 160px;
    margin: 0 auto 20px;
}

h1 {
    font-size: 2.5rem;
    color: var(--negro);
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.tagline {
    font-size: 1.3rem;
    color: var(--marron);
    font-weight: 500;
}

.hero-divider {
    width: 80px;
    height: 3px;
    background: var(--verde);
    margin: 24px auto;
}

.subtagline {
    font-size: 1rem;
    color: #6B6B6B;
}

/* ============================================
   GRID DE PROYECTOS
   ============================================ */
.proyectos {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--negro);
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--marron);
    margin-bottom: 48px;
    font-size: 1.1rem;
}

.grid-proyectos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.card-proyecto {
    background: var(--blanco);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--marron-muy-claro);
}

.card-proyecto:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: var(--verde);
}

.card-icon {
    font-size: 3rem;
    color: var(--verde);
    margin-bottom: 20px;
}

.card-proyecto h3 {
    font-size: 1.5rem;
    color: var(--negro);
    margin-bottom: 12px;
}

.card-proyecto p {
    color: #5A5A5A;
    margin-bottom: 24px;
}

.btn-usar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--marron);
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
}

.btn-usar:hover {
    background: var(--verde);
    transform: scale(1.02);
}

/* ============================================
   BLOG HOME
   ============================================ */
.blog-home {
    padding: 60px 0;
    background: var(--fondo);
}

.post-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 12px;
}

/* ============================================
   ARTÍCULO INDIVIDUAL
   ============================================ */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--texto);
}

.post-content h2 {
    font-size: 1.6rem;
    color: var(--negro);
    margin: 32px 0 16px;
}

.post-content h3 {
    font-size: 1.3rem;
    color: var(--marron);
    margin: 24px 0 12px;
}

.post-content p {
    margin-bottom: 16px;
}

.post-content ul,
.post-content ol {
    margin: 16px 0 16px 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
}

.post-content th,
.post-content td {
    border: 1px solid var(--marron-muy-claro);
    padding: 10px 12px;
    text-align: left;
}

.post-content th {
    background: var(--marron-muy-claro);
    color: var(--negro);
}

.post-content blockquote {
    border-left: 4px solid var(--verde);
    padding-left: 16px;
    margin: 20px 0;
    color: var(--marron);
    font-style: italic;
}

/* ============================================
   SOBRE MÍ
   ============================================ */
.sobre-mi {
    background: var(--marron-muy-claro);
    padding: 60px 0;
    text-align: center;
}

.sobre-mi-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.sobre-mi h2 {
    color: var(--negro);
    margin-bottom: 24px;
}

.avatar-placeholder {
    font-size: 4rem;
    color: var(--marron);
    margin-bottom: 16px;
}

.monetizacion-nota {
    background: rgba(255,255,240,0.6);
    padding: 16px;
    border-radius: 48px;
    margin-top: 32px;
    font-size: 0.9rem;
}

/* ============================================
   STATS
   ============================================ */
.stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 48px 20px;
    background: var(--blanco);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--verde);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--marron);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--negro);
    color: #CCCCCC;
    text-align: center;
    padding: 32px 20px;
    font-size: 0.85rem;
}

footer a {
    color: var(--marron-claro);
    text-decoration: none;
    margin: 0 4px;
}

footer a:hover {
    color: var(--verde);
}

.footer-desc {
    margin-top: 12px;
    color: #999;
    font-size: 0.8rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    .tagline { font-size: 1rem; }
    .grid-proyectos { grid-template-columns: 1fr; }
    .stats { gap: 24px; }

    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--fondo);
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 600px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        justify-content: center;
    }
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1A1A1A;
    color: #F5F0E8;
    padding: 1rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.cookie-banner.visible {
    transform: translateY(0);
}

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

.cookie-content p {
    flex: 3;
    min-width: 250px;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.cookie-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.cookie-btn.accept {
    background: var(--verde, #4A6B3A);
    color: white;
}

.cookie-btn.accept:hover {
    background: #3D5A2F;
    transform: scale(1.02);
}

.cookie-btn.reject {
    background: transparent;
    border: 1px solid #6B4E3D;
    color: #D4C4B0;
}

.cookie-btn.reject:hover {
    background: rgba(107, 78, 61, 0.3);
}

.cookie-link {
    color: var(--marron-claro, #8B5E3C);
    text-decoration: underline;
    font-size: 0.8rem;
}

.cookie-link:hover {
    color: var(--verde, #4A6B3A);
}

/* ============================================
   NOTIFICACIONES FLOTANTES
   ============================================ */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: #1A1A1A;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 48px;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: var(--verde, #4A6B3A);
    border-left: 4px solid #2C4A1E;
}

.notification-error {
    background: #B84C3C;
    border-left: 4px solid #8B2A1A;
}

/* ============================================
   FADE IN
   ============================================ */
.card-proyecto.visible,
.fade-in.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Categorías del blog */
.categories-nav {
    text-align: center;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--blanco);
    color: var(--marron);
    text-decoration: none;
    border: 2px solid var(--marron-muy-claro);
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.category-pill:hover {
    background: var(--verde);
    color: white;
    border-color: var(--verde);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 107, 58, 0.2);
}

.category-count {
    display: inline-block;
    background: var(--marron-muy-claro);
    color: var(--marron);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.category-pill:hover .category-count {
    background: rgba(255,255,255,0.25);
    color: white;
}

.post-meta a:hover {
    color: var(--verde) !important;
    text-decoration: underline !important;
}