/*
Theme Name: Ricardo Lúa Blog
Theme URI: https://drricardolua.com/
Description: Tema editorial para los artículos y videos del Dr. Ricardo Lúa.
Version: 1.3.0
Requires at least: 6.4
Requires PHP: 7.4
Author: Ricardo Lúa
Text Domain: ricardo-lua-blog
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

@font-face {
    font-family: "Instrument Serif";
    src: url("assets/fonts/InstrumentSerif-Regular.ttf") format("truetype");
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Serif";
    src: url("assets/fonts/InstrumentSerif-Italic.ttf") format("truetype");
    font-style: italic;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --night: #0d0d0d;
    --panel: #171717;
    --white: #f2f0ed;
    --muted: #bdbbb6;
    --line: #3c3b39;
    --serif: "Instrument Serif", "Bodoni 72", Didot, Georgia, serif;
    --sans: "Helvetica Neue", Arial, sans-serif;
    --shell: min(1320px, calc(100% - 96px));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; color: var(--white); background: var(--night); font: 16px/1.65 var(--sans); }
a { color: inherit; text-underline-offset: .28em; }
img, video { max-width: 100%; height: auto; }
img { display: block; }
input, textarea, button { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; }
.shell { width: var(--shell); margin-inline: auto; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 99999; top: 12px; left: 12px; padding: 10px 16px; background: var(--white); color: var(--night); }
.site-header a, .site-footer a, .pill, .text-link, .post-card h3 a { text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1; overflow-wrap: anywhere; }
p { margin: 0; }

.site-header { padding-inline: clamp(20px, 3vw, 48px); background: #090909; }
.header-bar {
    display: grid;
    min-height: 78px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}
.location { justify-self: start; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.brand { display: inline-block; width: min(260px, 100%); }
.brand img { width: 100%; filter: grayscale(1); }
.header-booking { justify-self: end; }
.pill {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 6px 5px 17px;
    border: 1px solid #6f6e6a;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}
.pill span { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 16px; font-weight: 400; }
.pill:hover, .pill-solid { color: var(--night); background: #d0cfca; border-color: #d0cfca; }
.pill-solid:hover { background: var(--white); }
.primary-nav ul { display: flex; min-height: 54px; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px clamp(18px, 5vw, 64px); margin: 0; padding: 4px 0; list-style: none; }
.primary-nav a { display: flex; min-height: 44px; align-items: center; font-size: 12px; font-weight: 600; }
.primary-nav a:hover, .primary-nav [aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; }
.menu-toggle { justify-self: end; min-height: 44px; padding-inline: 14px; color: var(--white); background: transparent; border: 1px solid #6f6e6a; border-radius: 100px; font-size: 12px; }

.blog-hero { overflow: hidden; border-bottom: 1px solid var(--line); background: #111; }
.hero-inner { position: relative; isolation: isolate; display: grid; min-height: clamp(420px, 36vw, 520px); align-items: center; padding-block: 62px; }
.hero-photo { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 71%; height: 100%; object-fit: cover; object-position: center 23%; filter: saturate(.57) brightness(.76); }
.hero-inner::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, #111 4%, #111 24%, rgb(17 17 17 / 88%) 41%, transparent 75%),
        linear-gradient(0deg, #111, transparent 25%),
        linear-gradient(270deg, #111, transparent 14%);
    content: "";
}
.hero-copy { width: min(100%, 610px); }
.eyebrow { margin-bottom: 18px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }
.hero-copy h1 { font-size: clamp(72px, 8vw, 126px); letter-spacing: -.035em; line-height: .84; }
.hero-copy h1 em { display: block; color: var(--muted); font-weight: 400; }
.hero-description { max-width: 395px; margin-top: 25px; color: #d1cfca; font-size: clamp(15px, 1.4vw, 18px); }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.home-content { display: grid; gap: clamp(28px, 4vw, 64px); padding-block: 56px 90px; }
.section-heading { display: flex; min-height: 52px; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 19px; }
.section-heading h2 { font-size: clamp(34px, 4vw, 53px); }
.post-grid { display: grid; gap: clamp(14px, 2vw, 26px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card { display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--line); background: var(--panel); }
.card-image { overflow: hidden; aspect-ratio: 16 / 9; background: #101010; }
.card-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.72); }
.card-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: clamp(16px, 2vw, 26px); }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; color: var(--muted); font-size: 11px; letter-spacing: .055em; }
.card-meta span { color: var(--white); }
.post-card h3 { font-size: clamp(29px, 3vw, 41px); }
.post-card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.card-excerpt { margin-top: 10px; color: var(--muted); font-size: 14px; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 6px; color: var(--white); font-size: 12px; font-weight: 600; }
.text-link:hover { text-decoration: underline; }
.card-link { padding-top: 8px; margin-top: auto; }
.card-player, .featured-video { overflow: hidden; background: #080808; }
.card-player figure { margin: 0; }
.featured-video { margin: 0; }
.card-player video, .card-player iframe, .featured-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; object-fit: contain; }
.reading > .featured-video { position: relative; margin-bottom: clamp(24px, 4vw, 42px); }
.featured-video__play {
    position: absolute;
    top: 42%;
    left: 50%;
    display: grid;
    width: clamp(52px, 6vw, 72px);
    aspect-ratio: 1;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid #dedcd8;
    border-radius: 50%;
    background: rgb(13 13 13 / 83%);
    color: var(--white);
    font-size: clamp(16px, 2.1vw, 23px);
}
.featured-video__play:hover { background: #0d0d0d; }
.featured-video__play > span[aria-hidden] { transform: translateX(2px); }
.card-player figcaption { padding: 4px 12px; color: var(--muted); font-size: 12px; }
.card-player .wp-video { width: 100% !important; }
.card-player .mejs-container { max-width: 100%; }

.blog-search { display: flex; width: min(100%, 260px); min-width: 0; border: 1px solid #6f6e6a; border-radius: 100px; }
.blog-search input, .blog-search button { min-height: 42px; color: var(--white); background: transparent; border: 0; font-size: 12px; }
.blog-search input { width: 100%; min-width: 0; padding-inline: 14px 4px; }
.blog-search input::placeholder { color: var(--muted); }
.blog-search button { padding-inline: 12px; border-left: 1px solid var(--line); }
.blog-search button:hover { border-radius: 0 100px 100px 0; color: var(--night); background: var(--white); }
.empty-state { padding: 24px; border: 1px solid var(--line); color: var(--muted); }
.pagination { margin-top: 24px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: inline-grid; min-width: 44px; min-height: 44px; place-items: center; padding-inline: 10px; border: 1px solid var(--line); font-size: 14px; text-decoration: none; }
.page-numbers.current, a.page-numbers:hover { color: var(--night); background: var(--white); }

.archive-content, .reading-shell { padding-block: clamp(42px, 7vw, 92px); }
.archive-heading, .reading-header { margin-bottom: 32px; }
.archive-heading h1, .reading-header h1 { margin: 12px 0 20px; font-size: clamp(49px, 8vw, 97px); line-height: .94; }
.reading-shell { width: min(850px, var(--shell)); }
.reading-shell--post { width: min(1000px, var(--shell)); padding-block: clamp(18px, 3.4vw, 48px) clamp(54px, 8vw, 96px); }
.reading-shell--post .reading-header { margin-bottom: clamp(18px, 2.2vw, 30px); }
.reading-back { color: var(--muted); }
.reading-back span { font-size: 17px; }
.reading-shell--post .reading-title {
    max-width: 22ch;
    margin: 7px 0 18px;
    font-size: clamp(39px, 5.1vw, 72px);
    line-height: 1.02;
    letter-spacing: -.023em;
    text-wrap: balance;
}
.reading-shell--post .reading-title--long { max-width: 31ch; font-size: clamp(34px, 4.3vw, 60px); line-height: 1.07; }
.reading-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; }
.reading-format { padding: 2px 9px; border: 1px solid #53524f; border-radius: 100px; color: var(--white); font-size: 11px; }
.reading-continuation, [data-reading-stream] .reading { margin-top: clamp(40px, 7vw, 80px); padding-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); }
[data-reading-stream] .reading-title a { text-decoration: none; }
[data-reading-stream] .reading-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.reading-next { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(16px, 3vw, 30px); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-decoration: none; }
.reading-next:hover { border-color: var(--muted); }
.reading-next__copy { display: grid; min-width: 0; gap: 7px; }
.reading-next__label { color: var(--muted); font-size: 12px; }
.reading-next__title { font: clamp(25px, 4vw, 39px)/1.08 var(--serif); overflow-wrap: anywhere; }
.reading-next__arrow { display: grid; flex: 0 0 42px; height: 42px; place-items: center; border: 1px solid #6f6e6a; border-radius: 50%; }
.reading-image { margin: 0 0 32px; }
.reading-image img { width: 100%; max-height: 550px; object-fit: cover; }
.reading-shell--post :is(.reading-image, .featured-video) { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.reading-shell--post .reading-image { background: var(--panel); }
.reading-shell--post .reading-image img { object-fit: contain; }
.entry-content { overflow-wrap: anywhere; color: #dedcd8; font-size: clamp(16px, 2vw, 18px); line-height: 1.75; }
.reading-shell--post :is(.entry-content, .entry-tags, .comments-area) { width: min(100%, 710px); margin-inline: auto; }
.reading-shell--post .entry-content > :is(h2, h3, h4) { margin-block: 1.2em .45em; line-height: 1.12; }
.reading-shell--post .entry-content > :first-child { margin-top: 0; }
.entry-content > * { margin-block: 0 1.35em; }
.entry-content h2 { font-size: clamp(34px, 5vw, 51px); }
.entry-content h3 { font-size: clamp(28px, 4vw, 42px); }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content .wp-block-embed iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.entry-content .wp-block-video video { display: block; width: auto; max-height: 70vh; margin-inline: auto; }
.entry-content figcaption { color: var(--muted); font-size: 14px; }
.entry-content pre, .entry-content .wp-block-table { overflow-x: auto; }
.entry-content table { border-collapse: collapse; }
.entry-content :is(td, th) { padding: 8px; border: 1px solid var(--line); }
.entry-content blockquote { padding-left: 18px; margin-left: 0; border-left: 1px solid var(--muted); }
.entry-tags, .post-navigation, .comments-area { padding-top: 24px; margin-top: 32px; border-top: 1px solid var(--line); }
.entry-tags a { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); margin-bottom: 5px; font-size: 13px; }
.comments-area h2, .comments-area h3 { margin-bottom: 14px; font-size: 35px; }
.comment-list { padding-left: 20px; }
.comment-list li, .comment-form p { margin-bottom: 12px; }
.comment-form label { display: block; }
.comment-form .comment-form-cookies-consent label { display: inline; }
.comment-form :is(input:not([type=checkbox]), textarea) { max-width: 100%; padding: 8px 12px; color: var(--white); background: var(--panel); border: 1px solid #6f6e6a; }

.site-footer { padding-block: 46px 22px; border-top: 1px solid var(--line); background: #090909; }
.footer-main, .footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.footer-location { display: grid; font-size: 13px; }
.footer-location span, .footer-bottom { color: var(--muted); }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11px; }

@media (max-width: 980px) {
    :root { --shell: calc(100% - 48px); }
    .home-content .section-heading { align-content: start; }
    .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    :root { --shell: calc(100% - 36px); }
    .header-bar { min-height: 65px; grid-template-columns: minmax(0, 1fr) auto; }
    .header-bar .location, .header-booking { display: none; }
    .header-bar .brand { width: min(224px, 100%); }
    .primary-nav ul { align-items: stretch; justify-content: flex-start; gap: 0 20px; padding-block: 8px; }
    .hero-inner { min-height: 0; padding-block: 225px 35px; }
    .hero-photo { inset: 0 0 auto; width: 100%; height: 310px; object-position: center 29%; }
    .hero-inner::after { background: linear-gradient(180deg, transparent 95px, #111 307px); }
    .hero-copy h1 { font-size: clamp(62px, 13vw, 90px); }
    .hero-description { margin-top: 18px; }
    .hero-links { margin-top: 18px; }
    .home-content { padding-block: 32px 55px; }
    .post-grid { grid-template-columns: minmax(0, 1fr); }
    .footer-main, .footer-bottom { align-items: flex-start; flex-direction: column; }
}
