/* ============================================================
   cursos.raulcontrerasherrera.com — lean shell.
   Posts, tags, pages and the archive. Shares Pubzi's palette and
   two web fonts so the site reads as one thing, but none of its
   ~1.9 MB of Bootstrap/Swiper/GSAP/jQuery: these are the pages
   that have to rank.
   ============================================================ */

/* Palette and type are lifted from Pubzi (assets/css/home.css) so posts read
   as the same site as the homepage. What is NOT lifted is the 1.9 MB of
   Bootstrap, Swiper, GSAP and jQuery behind it — these pages are the SEO
   surface and they carry two web fonts and this file, nothing else. */
:root {
    --bg:        #0B0E13;   /* Pubzi --bg   */
    --bg-raised: #1C1D20;   /* Pubzi --bg-2 */
    --bg-code:   #14171d;
    --border:    #ffffff1f;
    --text:      #ABABAB;   /* Pubzi --text */
    --text-dim:  #8d8d8d;
    --text-faint:#6b6b6b;
    --accent:    #CBFE1C;   /* Pubzi --theme */
    --accent-dim:#4a5f10;
    --lock:      #ffc94d;   /* matches the beca seat colour */
    --white:     #fff;

    --wrap: 46rem;
    --wrap-wide: 68rem;
    --radius: 10px;

    --sans: "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --display: "Days One", var(--sans);
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    /* --gh-font-body is injected by Ghost's font settings; --sans is the fallback */
    font-family: var(--gh-font-body, var(--sans));
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.hero-title, .post-title, .page-title, .card-title, .featured-title {
    font-family: var(--gh-font-heading, var(--display));
    color: var(--white);
    font-weight: 400;   /* Days One ships one weight; bolding it smears */
    letter-spacing: -.01em;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.grid ~ .pagination, .wrap.related { max-width: var(--wrap-wide); }

.skip {
    position: absolute; left: -9999px;
    background: var(--accent); color: var(--bg);
    padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ── header ─────────────────────────────────────────────── */

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(140%) blur(8px);
}

.header-inner {
    max-width: var(--wrap-wide);
    display: flex; align-items: center; gap: 1.5rem;
    height: 62px;
}

.brand {
    display: flex; align-items: center; gap: .55rem;
    color: var(--text); text-decoration: none; font-weight: 650;
    white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark { font-family: var(--mono); color: var(--accent); font-size: .95rem; }

.nav { display: flex; gap: 1.25rem; margin-right: auto; }
.nav-link {
    color: var(--text-dim); text-decoration: none; font-size: .93rem;
    padding: .25rem 0; border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--text); text-decoration: none; border-bottom-color: var(--accent); }

.header-actions { display: flex; gap: .5rem; margin-left: auto; }

/* ── buttons ────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: .45rem .9rem;
    border-radius: var(--radius);
    font-size: .9rem; font-weight: 550;
    text-decoration: none; cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }

.btn-solid { background: var(--accent); color: #0B0E13; }
.btn-solid:hover { filter: brightness(1.1); }

.btn-ghost { border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: .7rem 1.4rem; font-size: 1rem; }

/* ── hero ───────────────────────────────────────────────── */

.hero {
    padding: 4.5rem 0 3rem;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(ellipse 60% 100% at 50% 0%, rgba(203, 254, 28, .07), transparent 70%);
}
.hero .wrap { max-width: var(--wrap-wide); }

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15; margin: 0 0 .75rem;
    letter-spacing: -.02em;
}
.hero-desc {
    font-size: 1.15rem; color: var(--text-dim);
    max-width: 34rem; margin: 0 0 1.75rem;
}
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── professional home ──────────────────────────────────── */

.intro {
    padding: 6rem 0 4.5rem;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(ellipse 55% 100% at 50% 0%, rgba(203, 254, 28, .06), transparent 70%);
}
.intro-inner { max-width: var(--wrap-wide); }

.intro-role {
    font-family: var(--mono); font-size: .8rem;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--accent); margin: 0 0 .9rem;
}

.intro-name {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    line-height: 1.05; margin: 0 0 1.25rem;
    letter-spacing: -.03em;
}

/* The one sentence that answers "what do you do". Deliberately the
   largest body text on the page — restraint everywhere else. */
.intro-line {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    line-height: 1.55; color: var(--text-dim);
    max-width: 38rem; margin: 0 0 2rem;
}

.intro-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.band { padding: 4rem 0; border-bottom: 1px solid var(--border); }
.band-alt { background: var(--bg-raised); }
.band-inner { max-width: var(--wrap-wide); }
.band-narrow { max-width: var(--wrap); }

.band-title {
    font-size: 1.05rem; text-transform: uppercase;
    letter-spacing: .1em; color: var(--text-faint);
    font-weight: 600; margin: 0 0 1.75rem;
}
.band-lede { color: var(--text-dim); max-width: 38rem; margin: -1rem 0 2rem; }
.band-note { font-size: .9rem; color: var(--text-faint); margin: 1.75rem 0 0; }

.offer-grid {
    display: grid; gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.offer {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg); padding: 1.5rem;
}
.offer-title { font-size: 1.15rem; margin: 0 0 .3rem; }
.offer-meta {
    font-family: var(--mono); font-size: .75rem;
    color: var(--accent); margin: 0 0 .9rem;
}
.offer-desc { color: var(--text-dim); font-size: .95rem; margin: 0 0 1rem; }
.offer-link { font-size: .9rem; font-weight: 550; text-decoration: none; }

.talks { list-style: none; padding: 0; margin: 0; }
.talk {
    display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline;
    padding: .85rem 0; border-bottom: 1px solid var(--border);
}
.talk-event { font-weight: 600; }
.talk-topic { color: var(--text-dim); flex: 1; }
.talk-year { font-family: var(--mono); font-size: .8rem; color: var(--text-faint); }

.work-grid {
    display: grid; gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.work {
    display: flex; flex-direction: column; gap: .2rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1rem 1.1rem; text-decoration: none; color: var(--text);
    transition: border-color .15s;
}
.work:hover { border-color: var(--accent); text-decoration: none; }
.work-name { font-weight: 600; }
.work-desc { font-size: .85rem; color: var(--text-faint); }

.contact-line { font-size: 1.2rem; margin: 0 0 .5rem; }

/* ── featured ───────────────────────────────────────────── */

.featured {
    display: block;
    margin: 2.5rem auto 0; max-width: var(--wrap-wide);
    padding: 1.75rem;
    border: 1px solid var(--accent-dim);
    border-radius: var(--radius);
    background: var(--bg-raised);
    text-decoration: none; color: var(--text);
}
.featured:hover { text-decoration: none; border-color: var(--accent); }

.featured-flag {
    font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--accent);
}
.featured-title { font-size: 1.5rem; margin: .5rem 0 .5rem; line-height: 1.25; }
.featured-excerpt { color: var(--text-dim); margin: 0 0 .75rem; }
.featured-more { color: var(--accent); font-size: .9rem; font-weight: 550; }

/* ── card grid ──────────────────────────────────────────── */

.grid {
    max-width: var(--wrap-wide); margin: 2.5rem auto;
    display: grid; gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-raised);
    overflow: hidden;
    transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card-link:hover { text-decoration: none; }

.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; }

.card-tag {
    font-family: var(--mono); font-size: .7rem; text-transform: uppercase;
    letter-spacing: .07em; color: var(--accent);
}
.card-title { font-size: 1.08rem; line-height: 1.35; margin: .4rem 0 .5rem; }
.card-lock { color: var(--lock); font-size: .85em; }
.card-excerpt { font-size: .92rem; color: var(--text-dim); margin: 0 0 .8rem; }
.card-meta { font-size: .8rem; color: var(--text-faint); }

.dot { margin: 0 .35rem; }

/* ── page heads ─────────────────────────────────────────── */

.page-head { padding: 3rem 1.25rem 1rem; max-width: var(--wrap-wide); }
.page-kicker {
    font-family: var(--mono); font-size: .75rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--accent);
}
.page-title { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: .4rem 0 .5rem; letter-spacing: -.02em; }
.page-desc { color: var(--text-dim); font-size: 1.05rem; margin: 0 0 .5rem; }
.page-count { color: var(--text-faint); font-size: .875rem; margin: 0; }

/* ── post ───────────────────────────────────────────────── */

.post-head { padding-top: 3rem; }

.post-kicker {
    font-family: var(--mono); font-size: .75rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--accent); text-decoration: none;
}

.post-title {
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    line-height: 1.2; margin: .5rem 0 .75rem;
    letter-spacing: -.02em;
}

.post-standfirst {
    font-size: 1.15rem; color: var(--text-dim);
    line-height: 1.6; margin: 0 0 1.25rem;
}

.post-meta {
    font-size: .875rem; color: var(--text-faint);
    padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.lock { color: var(--lock); }

.post-image { margin: 2rem auto; }
.post-image img { border-radius: var(--radius); width: 100%; }
.post-image figcaption {
    font-size: .85rem; color: var(--text-faint);
    text-align: center; margin-top: .6rem;
}

.post-body { padding-top: 2rem; padding-bottom: 3rem; font-size: 1.06rem; }

.post-body h2 {
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    margin: 3rem 0 1rem;
    line-height: 1.25;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}
.post-body h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.post-body h3 { font-size: 1.22rem; margin: 2.25rem 0 .7rem; }

.post-body p { margin: 0 0 1.3rem; }
.post-body strong { color: var(--white); font-weight: 600; }

.post-body ul, .post-body ol { margin: 0 0 1.4rem; padding-left: 0; list-style: none; }
.post-body ol { counter-reset: step; }

.post-body ul > li {
    position: relative; padding-left: 1.6rem; margin-bottom: .55rem;
}
.post-body ul > li::before {
    content: ""; position: absolute; left: 0; top: .72em;
    width: .7rem; height: 2px; background: var(--accent);
}

.post-body ol > li {
    counter-increment: step;
    position: relative; padding-left: 2.3rem; margin-bottom: .75rem;
}
.post-body ol > li::before {
    content: counter(step);
    position: absolute; left: 0; top: -.1em;
    width: 1.6rem; height: 1.6rem;
    display: grid; place-items: center;
    border: 1px solid var(--accent); border-radius: 50%;
    color: var(--accent); font-family: var(--display); font-size: .72rem;
}

/* Task lists in the checklists (publicar-juego-html5-itch-io) */
.post-body li > input[type="checkbox"] { margin-right: .5rem; accent-color: var(--accent); }

.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

.post-body blockquote {
    margin: 1.5rem 0; padding: .6rem 0 .6rem 1.1rem;
    border-left: 3px solid var(--accent);
    color: var(--text-dim);
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body table {
    width: 100%; border-collapse: collapse;
    margin: 1.5rem 0; font-size: .92rem;
}
.post-body th, .post-body td {
    border: 1px solid var(--border); padding: .55rem .75rem; text-align: left;
}
.post-body th { background: var(--bg-raised); font-weight: 600; }

/* code — the content is code-heavy, so this matters */

.post-body :not(pre) > code {
    font-family: var(--mono); font-size: .88em;
    background: var(--bg-code); border: 1px solid var(--border);
    border-radius: 4px; padding: .12em .38em;
    word-break: break-word;
}

/* Code is the substance of these posts, so it gets a real frame rather than a
   grey box: accent rule down the left, and horizontal scroll contained so a
   long line never makes the page scroll sideways on a phone. */
.post-body pre {
    position: relative;
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    overflow-x: auto;
    margin: 1.6rem 0;
    font-size: .875rem; line-height: 1.65;
    -webkit-overflow-scrolling: touch;
    tab-size: 2;
}
.post-body pre code {
    font-family: var(--mono);
    background: none; border: 0; padding: 0;
    white-space: pre;
}

/* Ghost cards */

.kg-card { margin: 1.75rem 0; }

.kg-embed-card { display: flex; flex-direction: column; }
.kg-embed-card iframe,
.post-body iframe {
    width: 100%; aspect-ratio: 16 / 9; height: auto;
    border: 0; border-radius: var(--radius);
    background: #000;
}

.kg-image-card img, .kg-image-card { border-radius: var(--radius); }

.kg-width-wide {
    max-width: var(--wrap-wide);
    margin-left: 50%; transform: translateX(-50%);
}

.kg-width-full {
    max-width: 100vw;
    margin-left: 50%; transform: translateX(-50%);
}
.kg-width-full img { width: 100%; border-radius: 0; }

.kg-bookmark-card a { text-decoration: none; }

/* tags */

.post-tags { padding-bottom: 3rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-chip {
    font-size: .82rem; color: var(--text-dim);
    border: 1px solid var(--border); border-radius: 100px;
    padding: .25rem .8rem; text-decoration: none;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── gate ───────────────────────────────────────────────── */

.post-gated .teaser {
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
    mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.gate {
    border: 1px solid var(--accent-dim);
    border-radius: var(--radius);
    background: var(--bg-raised);
    padding: 2.25rem 1.75rem;
    text-align: center;
    margin: 1rem 0 2rem;
}
.gate-icon { font-size: 1.75rem; margin-bottom: .5rem; }
.gate-title { font-size: 1.35rem; margin: 0 0 .75rem; line-height: 1.3; }
.gate-body { color: var(--text-dim); margin: 0 auto 1.25rem; max-width: 30rem; }
.gate-note { font-size: .93rem; }
.gate-alt { font-size: .9rem; color: var(--text-faint); margin: .9rem 0 0; }
.gate-free {
    font-size: .875rem; color: var(--text-faint);
    margin: 1.5rem 0 0; padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* ── course session list ────────────────────────────────── */

.sesiones { list-style: none; padding: 0; margin: 2rem auto 3rem; max-width: var(--wrap); }

.sesion { border-bottom: 1px solid var(--border); }
.sesion a {
    display: flex; align-items: center; gap: 1rem;
    padding: .9rem .25rem;
    color: var(--text); text-decoration: none;
}
.sesion a:hover { text-decoration: none; color: var(--accent); }

.sesion-num {
    font-family: var(--mono); font-size: .8rem;
    color: var(--text-faint); min-width: 1.75rem;
}
.sesion-title { flex: 1; }
.sesion-lock { color: var(--lock); font-size: .85rem; }
.sesion-gated .sesion-title { color: var(--text-dim); }

/* ── related / pagination / footer ──────────────────────── */

.related { padding: 2.5rem 1.25rem 1rem; border-top: 1px solid var(--border); }
.related-title { font-size: 1.2rem; margin: 0; }

.pagination {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; padding: 1rem 0 3.5rem;
    max-width: var(--wrap-wide); margin: 0 auto;
    font-size: .9rem;
}
.pagination a { color: var(--accent); text-decoration: none; }
.page-number { color: var(--text-faint); }

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    margin-top: auto;
}
.footer-inner { max-width: var(--wrap-wide); }
.footer-note { color: var(--text-dim); margin: 0 0 .5rem; font-size: .95rem; }
.footer-meta { color: var(--text-faint); font-size: .85rem; margin: 0; }
.footer-meta a { color: var(--text-faint); }

/* ── error ──────────────────────────────────────────────── */

.error-page { padding: 6rem 1.25rem; text-align: center; }
.error-code { font-family: var(--mono); font-size: 3.5rem; color: var(--accent); margin: 0; line-height: 1; }
.error-title { font-size: 1.6rem; margin: 1rem 0 .5rem; }
.error-desc { color: var(--text-dim); margin: 0 0 1.75rem; }
.error-page .hero-actions { justify-content: center; }

/* ── responsive ─────────────────────────────────────────── */

@media (max-width: 720px) {
    body { font-size: 16px; }
    .nav { display: none; }
    .header-inner { gap: .75rem; }
    .hero { padding: 3rem 0 2.25rem; }
    .kg-width-wide, .kg-width-full { margin-left: 0; transform: none; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
    .card:hover { transform: none; }
}

/* ── article polish ─────────────────────────────────────── */

/* Kicker + title block, matching the homepage's section-title rhythm */
.post-kicker {
    font-family: var(--sans);
    font-weight: 600;
}

.post-standfirst {
    color: var(--text);
    border-left: 2px solid var(--accent-dim);
    padding-left: 1rem;
}

/* Inline links inside prose need to survive a lime accent on dark without
   shouting on every other word. */
.post-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.post-body a:hover { border-bottom-color: var(--accent); text-decoration: none; }

.post-body :not(pre) > code { color: var(--accent); }

.post-body blockquote {
    background: rgba(255, 255, 255, .03);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: .9rem 1.1rem;
}

.post-body table { font-size: .95rem; }
.post-body th { color: var(--white); font-family: var(--sans); }

/* The horizontal rule before the closing CTA line in every free post */
.post-body hr { border-top-color: var(--border); margin: 2.75rem 0; }
.post-body hr + p {
    font-size: .95rem;
    color: var(--text-faint);
}

/* Tag chips and cards pick up the accent from :root automatically; the one
   thing that needed help is the card title, which is Days One at a size that
   was tuned for a system font. */
.card-title { font-size: 1.02rem; line-height: 1.4; }
.featured-title { line-height: 1.2; }
