:root {
    --fg: #1a1a1a;
    --muted: #666;
    --accent: #d6336c;
    --bg: #fafafa;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.65;
    color: var(--fg);
    background: var(--bg);
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.site-header {
    border-bottom: 1px solid #eaeaea;
    background: #fff;
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--fg);
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 1.25rem;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: .95rem;
}

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

.intro {
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 1rem;
}

.intro h1 { margin: 0 0 .25rem; font-size: 2rem; }

.tagline { color: var(--muted); margin: 0; }

/* Intro con avatar (foto de perfil junto al nombre) */
.intro--avatar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.intro-text { min-width: 0; }

.avatar {
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 1px solid #eaeaea;
    background: #fff;
    object-fit: cover;
    display: block;
}

/* En about.html el avatar va dentro del artículo: sin borde inferior propio */
.about .intro--avatar { border-bottom: none; padding-bottom: 0; }

@media (max-width: 480px) {
    .avatar { width: 72px; height: 72px; }
}

/* Home: hero con imagen grande a la izquierda ocupando el alto */
.intro--hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 0 2rem;
}

.intro--hero .hero-avatar {
    flex: 0 0 auto;
    width: 260px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: .75rem;
    display: block;
}

.intro--hero .intro-text { min-width: 0; }
.intro--hero .intro-text h1 { font-size: 2.75rem; line-height: 1.05; margin: 0 0 .5rem; }
.intro--hero .tagline { font-size: 1.15rem; }

/* En mobile: vuelve al formato compacto (avatar redondo chico junto al nombre) */
@media (max-width: 600px) {
    .intro--hero {
        gap: 1rem;
        padding: 1rem 0 1.5rem;
    }
    .intro--hero .hero-avatar {
        width: 72px;
        border-radius: 50%;
        object-fit: cover;
        padding: 0;
    }
    .intro--hero .intro-text h1 { font-size: 2rem; }
    .intro--hero .tagline { font-size: 1rem; }
}

.section-title { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }

.breadcrumb {
    font-size: .85rem;
    color: var(--muted);
    margin: 0 0 1rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .current { color: var(--muted); }

.updated { color: var(--accent); }

.related {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 2px solid #eaeaea;
}

.sources {
    margin-top: 2.5rem;
    padding: 1.25rem 1.5rem;
    background: #f4f4f5;
    border-radius: 8px;
    font-size: .9rem;
}

.sources .section-title { margin-top: 0; }
.sources ol { margin: .5rem 0 0; padding-left: 1.25rem; }
.sources li { margin-bottom: .4rem; }
.sources a { color: var(--accent); word-break: break-word; }

main.container { padding-top: 2rem; padding-bottom: 3rem; }

.post-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #eaeaea;
}

.post-card-thumb {
    flex: 0 0 96px;
}

.post-card-thumb img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #eaeaea;
    display: block;
}

.post-card-body { flex: 1; min-width: 0; }

.post-card h2 { margin: 0 0 .25rem; }

@media (max-width: 480px) {
    .post-card { flex-direction: column; align-items: flex-start; }
}

.post-card a, .post a { color: var(--accent); text-decoration: none; }
.post-card a:hover, .post a:hover { text-decoration: underline; }

.meta { color: var(--muted); font-size: .875rem; margin: 0 0 .5rem; }

.post-body { margin: 1.5rem 0; }

.post-figure {
    margin: 2rem 0;
}

.post-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    display: block;
}

.post-figure figcaption {
    color: var(--muted);
    font-size: .8125rem;
    text-align: center;
    margin-top: .5rem;
}

/* Imagen de portada del artículo */
.post-hero {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    display: block;
    margin: 1.25rem 0;
}

/* Contenido renderizado desde Markdown */
.post-body h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; line-height: 1.25; }
.post-body h3 { font-size: 1.2rem; margin: 1.75rem 0 .5rem; line-height: 1.3; }
.post-body h4 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.post-body p { margin: 0 0 1.1rem; }
.post-body ul, .post-body ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.post-body li { margin-bottom: .35rem; }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 1.5rem 0; }
.post-body blockquote {
    margin: 1.5rem 0;
    padding: .5rem 1.25rem;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    font-style: italic;
}
.post-body code {
    background: #f0f0f1;
    padding: .12rem .35rem;
    border-radius: 4px;
    font-size: .9em;
}
.post-body pre {
    background: #1a1a1a;
    color: #f4f4f5;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: .875rem;
    line-height: 1.5;
}
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: .9rem; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid #eaeaea; padding: .5rem .75rem; text-align: left; }
.post-body th { background: #f4f4f5; }

/* Etiquetas */
.tags { margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
    display: inline-block;
    background: #f4f4f5;
    color: var(--muted) !important;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .82rem;
    text-decoration: none !important;
}
.tag:hover { background: var(--accent); color: #fff !important; }

/* Paginación */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 2.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid #eaeaea;
    font-size: .9rem;
    flex-wrap: wrap;
}
.pagination a { color: var(--accent); text-decoration: none; }
.pagination a:hover { text-decoration: underline; }
.pagination .disabled { color: #bbb; }
.pagination .page-info { color: var(--muted); }

.site-footer {
    border-top: 1px solid #eaeaea;
    color: var(--muted);
    font-size: .875rem;
    padding: 1.5rem 0;
}

.footer-profiles {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .9rem;
    margin-bottom: .6rem;
}
.footer-profiles a { color: var(--muted); text-decoration: none; }
.footer-profiles a:hover { color: var(--accent); }

/* Sección "Encontrame en" en Sobre mí */
.profiles { margin-top: 2rem; }
.profiles-list {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.profiles-list a {
    display: inline-block;
    border: 1px solid #eaeaea;
    border-radius: 999px;
    padding: .3rem .8rem;
    color: var(--fg);
    text-decoration: none;
    font-size: .9rem;
}
.profiles-list a:hover { border-color: var(--accent); color: var(--accent); }
