/* ==========================================================================
   site.css — Estilos compuestos. Adaptado del template developer-bs5-v3.1
   y de startbootstrap-blog. Todos los colores apuntan a var(--brand-*)
   definido en theme.css. NO edites colores aquí; cambia theme.css.
   ========================================================================== */

/* ====== Botones CTA del template ====== */
.btn, a.btn {
    transition: all 0.4s ease-in-out;
    font-family: var(--brand-font-heading);
    padding: 8px 16px;
    font-weight: bold;
}
.btn .svg-inline--fa, a.btn .svg-inline--fa { margin-right: 5px; position: relative; top: -2px; }
.btn:hover, a.btn:hover { text-decoration: none; }

a.btn-cta-primary, .btn-cta-primary {
    background: var(--brand-accent);
    border: 1px solid var(--brand-accent);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
}
a.btn-cta-primary:hover, .btn-cta-primary:hover {
    background: var(--brand-accent-hover);
    border-color: var(--brand-accent-hover);
    color: #fff;
}

a.btn-cta-secondary, .btn-cta-secondary {
    background: var(--brand-secondary);
    border: 1px solid var(--brand-secondary);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
}
a.btn-cta-secondary:hover, .btn-cta-secondary:hover {
    background: var(--brand-secondary-hover);
    border-color: var(--brand-secondary-hover);
    color: #fff;
    box-shadow: none;
}

.text-highlight { color: var(--brand-text-strong); }

.badge-theme {
    background: var(--brand-primary);
    font-size: 12px;
    color: #fff;
    border-radius: 2px;
    background-clip: padding-box;
    padding: 4px 8px;
}

a.dotted-link {
    border-bottom: 1px dotted var(--brand-text-muted);
    color: var(--brand-text-muted);
}
a.dotted-link:hover { text-decoration: none; color: var(--brand-text-strong); }

/* ====== Header ====== */
.site-header {
    padding: 30px 0;
    background: var(--brand-header-bg);
    border-top: 10px solid var(--brand-header-stripe);
}
.site-header .btn { font-weight: bold; }
.site-header .profile-image { margin-right: 30px; max-width: 130px; }
.site-header .profile-content .name {
    color: var(--brand-text-strong);
    font-size: 38px;
    margin-bottom: 5px;
    margin-top: 30px;
}
.site-header .profile-content .desc {
    color: var(--brand-text-muted);
    font-family: var(--brand-font-sans);
    font-weight: 400;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 15px;
}
.site-header .profile-content .social { margin-bottom: 0; }
.site-header .profile-content .social .list-inline-item { margin-right: 6px; }
.site-header .profile-content .social a {
    background: #b0b7bf;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-clip: padding-box;
    color: #fff;
    text-align: center;
    transition: background 0.2s ease;
}
.site-header .profile-content .social a:hover { background: var(--brand-text-muted); text-decoration: none; }
.site-header .profile-content .social a .svg-inline--fa {
    font-size: 16px;
    margin: 0;
    line-height: 1;
    width: 1em;
    text-align: center;
}

/* Navigation chips inside header */
.site-header .header-nav { margin-top: 12px; }
.site-header .header-nav .nav-link {
    color: var(--brand-text-muted);
    font-family: var(--brand-font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    padding: 6px 14px;
}
.site-header .header-nav .nav-link.active,
.site-header .header-nav .nav-link:hover {
    color: var(--brand-primary);
}

/* ====== Sections ====== */
.section { margin-bottom: 30px; }
.section .section-inner {
    background: var(--brand-surface);
    padding: 30px;
    border-radius: 8px;
}
.section .heading {
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--brand-heading);
    font-size: 24px;
}
.section .content .more-link .svg-inline--fa { margin-right: 5px; font-size: 14px; position: relative; top: -2px; }

/* Latest projects */
.latest .item { margin-bottom: 30px; }
.latest .item .title { font-size: 18px; margin-top: 0; }
.latest .item .title a { color: var(--brand-text-muted); }
.latest .item .title a:hover { color: var(--brand-text-strong); }
.latest .item .project-image:hover { opacity: 0.8; }
.latest .divider { margin-bottom: 60px; }
.latest .featured { margin-bottom: 60px; }
.latest .featured .title { font-size: 20px; margin-bottom: 5px; }
.latest .featured .summary { margin-bottom: 30px; color: var(--brand-text-muted); }
.latest .featured img { margin-bottom: 30px; }
.latest .featured .desc { margin-bottom: 30px; }
.latest .has-ribbon { position: relative; display: inline-block; }
.latest .has-ribbon .text { background: var(--brand-primary); color: #fff; }
.latest .has-ribbon .ribbon {
    position: absolute; top: -4px; right: -4px;
    width: 110px; height: 110px; overflow: hidden;
}
.latest .has-ribbon .ribbon .text {
    font-family: var(--brand-font-heading);
    position: relative;
    left: -8px; top: 18px;
    width: 158px;
    padding: 10px;
    font-size: 15px; font-weight: bold;
    text-align: center; text-transform: uppercase;
    color: #fff;
    background-color: var(--brand-secondary);
    transform: rotate(45deg) translate3d(0, 0, 0);
}
.latest .has-ribbon .ribbon .text:before,
.latest .has-ribbon .ribbon .text:after {
    content: ''; position: absolute; bottom: -5px;
    border-top: 5px solid var(--brand-secondary-hover);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}
.latest .has-ribbon .ribbon .text:before { left: 0; }
.latest .has-ribbon .ribbon .text:after { right: 0; }

/* Projects */
.projects .item { margin-bottom: 30px; }
.projects .item .title { font-size: 16px; margin-top: 0; margin-bottom: 5px; line-height: 1.5; }
.projects .item .title a { color: var(--brand-text-muted); }
.projects .item .title a:hover { color: var(--brand-text-strong); }

/* Experience */
.experience .item { margin-bottom: 30px; }
.experience .item .title { font-size: 16px; margin-top: 0; margin-bottom: 5px; line-height: 1.5; }
.experience .item .title .place { color: var(--brand-text-subtle); font-weight: normal; }
.experience .item .title .place a { color: var(--brand-text-subtle); }
.experience .item .title .place a:hover { color: var(--brand-text-muted); }
.experience .item .title .year { color: var(--brand-text-subtle); font-weight: normal; }

/* GitHub */
.github-graph { margin-bottom: 30px; }
.github-graph .js-calendar-graph-svg { max-width: 100%; }
.github-graph h2 { font-size: 18px; }
.ghfeed { height: 500px; }
.ghfeed, .ghfeed *, .ghfeed *:before, .ghfeed *:after { box-sizing: content-box; }

/* Mi GitHub — intro + listado de repos destacados */
.github .github-intro { color: var(--brand-text-muted); margin-bottom: 18px; }
.github .github-intro a { color: var(--brand-link); }
.github .github-intro i.fa-github { margin-right: 4px; }
.github .github-subheading {
    font-family: var(--brand-font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-heading);
    margin: 24px 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.github-repos { display: flex; flex-direction: column; gap: 14px; }
.github-repo-item {
    padding: 14px 16px;
    border: 1px solid var(--brand-border-soft);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
    transition: border-color .2s ease, background .2s ease;
}
.github-repo-item:hover { border-color: var(--brand-link); background: rgba(58, 170, 100, 0.04); }
[data-theme="dark"] .github-repo-item { background: rgba(255, 255, 255, 0.03); }
[data-theme="dark"] .github-repo-item:hover { background: rgba(83, 196, 125, 0.07); }
.github-repo-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.github-repo-item-title { font-size: 15px; font-weight: 600; margin: 0; line-height: 1.3; }
.github-repo-item-title i { color: var(--brand-text-muted); margin-right: 6px; font-size: 13px; }
.github-repo-item-title a { color: var(--brand-link); text-decoration: none; }
.github-repo-item-title a:hover { color: var(--brand-link-hover); text-decoration: underline; }
.github-repo-item-posted {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(58, 170, 100, 0.15);
    color: var(--brand-primary);
    text-decoration: none;
}
.github-repo-item-posted:hover { background: rgba(58, 170, 100, 0.25); color: var(--brand-primary-hover); text-decoration: none; }
[data-theme="dark"] .github-repo-item-posted { background: rgba(83, 196, 125, 0.18); color: #79d49a; }
.github-repo-item-desc { font-size: 13.5px; color: var(--brand-text-muted); margin: 0 0 8px 0; line-height: 1.5; }
.github-repo-item-meta { font-size: 12px; color: var(--brand-text-muted); display: flex; align-items: center; gap: 6px; }
.github-repo-item-lang-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #178600; /* C# verde */
}

/* Basic info */
.info .svg-inline--fa { margin-right: 15px; color: var(--brand-border-soft); }
.info .svg-inline--fa.fa-envelope-o { font-size: 14px; }
.info ul { margin-bottom: 0; }
.info li { margin-bottom: 15px; }
.info li:last-child { margin-bottom: 0; }

/* Skills */
.skills .intro { margin-bottom: 30px; }
.skills .skillset .item { margin-bottom: 30px; }
.skills .skillset .level-title {
    font-size: 16px;
    position: relative;
    margin-top: 0;
    margin-bottom: 10px;
}
.skills .skillset .level-title .level-label {
    color: var(--brand-border-soft);
    font-size: 14px; font-weight: 400;
    font-family: var(--brand-font-sans);
    position: absolute; right: 0; top: 0;
}
.skills .skillset .level-bar { height: 15px; background: var(--brand-border); }
.skills .skillset .level-bar-inner { height: 15px; background: var(--brand-primary); }
.skills .svg-inline--fa { margin-right: 3px; position: relative; top: 0; }

/* Testimonials */
.testimonials .item { margin-bottom: 30px; }
.testimonials .item:last-child { margin-bottom: 0; }
.testimonials .item .quote {
    color: var(--brand-text);
    font-size: 16px;
    border-left: 5px solid var(--brand-primary);
    padding: 5px 15px;
    margin-bottom: 15px;
}
.testimonials .item .quote p { margin-bottom: 0; }
.testimonials .item .quote .svg-inline--fa { color: var(--brand-primary); margin-right: 15px; }
.testimonials .item .source { font-size: 14px; padding-left: 20px; font-weight: 500; }
.testimonials .item .source .name { color: var(--brand-text-muted); font-weight: 600; }
.testimonials .item .source .title { color: var(--brand-text-subtle); }

/* Education */
.education .item { margin-bottom: 30px; }
.education .item:last-child { margin-bottom: 0; }
.education .item .title { font-size: 16px; margin-top: 0; }
.education .item .university {
    font-family: var(--brand-font-sans);
    font-size: 13px;
    color: var(--brand-text-subtle);
    font-weight: 600;
    padding-left: 25px;
}
.education .item .university .year { color: var(--brand-border-soft); font-weight: 500; }

/* Languages */
.languages .item { margin-bottom: 15px; }
.languages .item .title { color: var(--brand-text-muted); }
.languages .item .level { color: var(--brand-text-subtle); }
.languages .item:last-child { margin-bottom: 0; }
.languages .item .svg-inline--fa { color: var(--brand-primary); }

/* Blog (perfil aside) */
.aside.blog .item { margin-bottom: 24px; }
.aside.blog .item .title { font-size: 16px; line-height: 1.3; margin-bottom: 4px; }
.aside.blog .item .title a { color: var(--brand-text-muted); }
.aside.blog .item .title a:hover { color: var(--brand-text-strong); }
.aside.blog .item .meta { font-size: 12px; color: var(--brand-text-subtle); }
.aside.blog .item:last-child { margin-bottom: 0; }

/* List sections (music, conferences) */
.list ul li { margin-bottom: 10px; }
.list ul li .svg-inline--fa { margin-right: 5px; color: var(--brand-primary); }
.list ul li a { color: var(--brand-text-muted); }
.list ul li a:hover { color: var(--brand-text-strong); }

.aside .subheading { font-size: 18px; color: var(--brand-heading); }

/* ====== Dark-mode switch ====== */
.dark-mode-switch { margin-bottom: 1rem; }
.dark-mode-switch .form-switch { display: flex; }
.dark-mode-switch label { font-size: 0.875rem; font-weight: bold; }
.dark-mode-switch .form-switch .form-check-input {
    border-radius: 1em;
    border-color: var(--brand-bg);
}
.dark-mode-switch .form-check-input:checked {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
}
.dark-mode-switch .form-check-input:focus {
    box-shadow: none;
    border-color: var(--brand-bg);
}

/* ====== Footer ====== */
.site-footer {
    background: var(--brand-footer-bg);
    color: #fff;
    padding: 16px 0;
}
.site-footer .copyright {
    line-height: 1.6;
    color: var(--brand-footer-text);
    font-size: 14px;
}
.site-footer a { color: #fff; }
.site-footer .fa-heart { color: #fb866a; }

/* ==========================================================================
   Blog (listado y detalle) — adaptado de startbootstrap-blog
   Las cards usan look del template (rounded + shadow-sm) coherente con perfil.
   ========================================================================== */

.blog-hero {
    background: var(--brand-bg-alt);
    border-bottom: 1px solid var(--brand-border);
    padding: 48px 0;
    margin-bottom: 30px;
}
.blog-hero h1 {
    font-family: var(--brand-font-heading);
    color: var(--brand-text-strong);
    font-weight: 700;
}
.blog-hero p.lead { color: var(--brand-text-muted); margin-bottom: 0; }

.blog-list .card {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform .2s ease, box-shadow .2s ease;
}
.blog-list .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}
.blog-list .card-img-top { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.blog-list .card .card-title {
    font-family: var(--brand-font-heading);
    color: var(--brand-text-strong);
}
.blog-list .card .card-text { color: var(--brand-text); }
.blog-list .card .small.text-muted { color: var(--brand-text-subtle) !important; }

.blog-list .pagination .page-link {
    color: var(--brand-primary);
    border-color: var(--brand-border);
}
.blog-list .pagination .page-item.active .page-link {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}
.blog-list .pagination .page-item.disabled .page-link { color: var(--brand-text-subtle); }

/* Sidebar widgets */
.blog-sidebar .card {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 8px;
}
.blog-sidebar .card-header {
    background: var(--brand-bg-alt);
    color: var(--brand-text-strong);
    font-family: var(--brand-font-heading);
    font-weight: 700;
    border-bottom: 1px solid var(--brand-border);
}
.blog-sidebar .about-widget img.avatar {
    width: 80px; height: 80px; border-radius: 50%;
    margin-bottom: 12px; object-fit: cover;
}

/* Single post */
.blog-post article header h1 {
    font-family: var(--brand-font-heading);
    color: var(--brand-text-strong);
}
.blog-post article header .meta {
    color: var(--brand-text-subtle);
    font-style: italic;
    font-size: .95rem;
    margin-bottom: 12px;
}
.blog-post article header .badge {
    background: var(--brand-primary) !important;
    color: #fff;
    margin-right: 4px;
    font-weight: 500;
}
.blog-post article figure img {
    width: 100%; height: auto;
    border-radius: 8px;
}
.blog-post article .post-body h2 {
    margin-top: 2rem;
    color: var(--brand-text-strong);
    font-family: var(--brand-font-heading);
}
.blog-post article .post-body p { font-size: 1.05rem; line-height: 1.7; }
.blog-post article .post-body ul, .blog-post article .post-body ol {
    font-size: 1.05rem; line-height: 1.7;
}
.blog-post article .post-body figure { margin: 1.5rem 0; }
.blog-post article .post-body figcaption {
    color: var(--brand-text-subtle);
    font-size: .9rem; text-align: center; margin-top: .5rem;
}

/* Code blocks dentro del post — tema oscuro consistente en light/dark mode.
   Override bg-light de Bootstrap que dejaba el ASCII art y los snippets ilegibles. */
.blog-post article .post-body pre,
.blog-post article .post-body pre.bg-light {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.55;
}
.blog-post article .post-body pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0;
    font-family: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: inherit;
    white-space: pre;
}
.blog-post article .post-body figure pre {
    margin: 0;
}

/* Inline code: chip sutil con borde y monospace, visible en ambos modos. */
.blog-post article .post-body p code,
.blog-post article .post-body li code,
.blog-post article .post-body td code {
    background: rgba(58, 170, 100, 0.10);
    color: var(--brand-primary);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
    border: 1px solid rgba(58, 170, 100, 0.20);
}
[data-theme="dark"] .blog-post article .post-body p code,
[data-theme="dark"] .blog-post article .post-body li code,
[data-theme="dark"] .blog-post article .post-body td code {
    background: rgba(83, 196, 125, 0.13);
    color: #79d49a;
    border-color: rgba(83, 196, 125, 0.25);
}

/* Comments */
.blog-comments .card {
    background: var(--brand-bg-alt);
    border: 1px solid var(--brand-border);
}
.blog-comments .commenter-name { font-weight: 700; color: var(--brand-text-strong); }
.blog-comments .comment-body { color: var(--brand-text); }
.blog-comments .rounded-circle { width: 50px; height: 50px; object-fit: cover; }

/* ====== Responsive tweaks ====== */
@media (max-width: 767.98px) {
    .site-header { text-align: center; }
    .site-header .profile-image { float: none !important; margin: 0 auto; }
    .site-header .profile-content { float: none !important; text-align: center; }
    .site-header .btn { margin-top: 30px; float: none !important; }
    .project-image { margin-bottom: 15px; }
}

@media (min-width: 1400px) {
    .container { width: 1360px; max-width: inherit; }
}
