/*
Theme Name: CHM Theme
Theme URI: https://camilahernandez.es/
Description: Tema editorial de una sola página para Camila Hernández Martínez, hijo de Twenty Twenty-Four.
Author: Camila Hernández Martínez
Author URI: https://camilahernandez.es/
Template: twentytwentyfour
Version: 0.13.8
Requires at least: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: chm-theme
*/

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://camilahernandez.es/wp-content/uploads/fonts/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvUDVZNLo_U2r.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("https://camilahernandez.es/wp-content/uploads/fonts/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKeiukDVZNLo_U2r.woff2") format("woff2");
}

:root { color-scheme: light; --chm-page: #fff; --chm-ink: #171717; --chm-muted: #666; --chm-rule: #d9d9d9; --chm-control-border: #a7a7a7; --chm-header-surface: rgba(255, 255, 255, .97); --chm-banner: #171717; --chm-banner-ink: #fff; --chm-accent: #7d263a; --chm-accent-contrast: #fff; --chm-reading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; --chm-display: "Playfair Display", Georgia, serif; --chm-entry-size: 1.09375rem; --chm-meta-size: .875rem; --chm-shell-width: 1100px; --chm-reading-width: 1100px; }
html[data-chm-theme="dark"] { color-scheme: dark; --chm-page: #191919; --chm-ink: #f2efeb; --chm-muted: #bbb4af; --chm-rule: #484541; --chm-control-border: #77716b; --chm-header-surface: rgba(25, 25, 25, .97); --chm-banner: #fff; --chm-banner-ink: #171717; --chm-accent: #c7a7ec; --chm-accent-contrast: #191919; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--chm-page); color: var(--chm-ink); font-family: var(--chm-reading); }
/* The editorial sheet owns its 24px gutters; avoid a second 40px page gutter on phones. */
body:has(.chm-paper) main.wp-block-group { padding-left: 0; padding-right: 0; }
.chm-policy { width: min(760px, calc(100% - 40px)) !important; max-width: none !important; margin: 64px auto 96px !important; padding: 0 !important; }
.chm-policy h1, .chm-policy h2 { color: var(--chm-ink); font-family: var(--chm-display); }
.chm-policy h1 { margin: 0 0 12px; font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1.15; }
.chm-policy h2 { margin: 2.2rem 0 .65rem; font-size: clamp(1.5rem, 3vw, 1.85rem); line-height: 1.25; }
.chm-policy p { margin: 0 0 1rem; color: var(--chm-ink); font: 400 1.0625rem/1.7 var(--chm-reading); }
.chm-policy h1 + p { color: var(--chm-muted); font-size: .9375rem; }
.chm-policy a { color: var(--chm-accent); overflow-wrap: anywhere; }
.wp-site-blocks, .wp-block-post-content, footer.wp-block-template-part { background-color: var(--chm-page); color: var(--chm-ink); }
body.chm-menu-open { overflow: hidden; }
.wp-site-blocks { max-width: 100%; overflow-x: clip; padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }
.wp-block-group, main, .wp-block-post-content { min-width: 0; }
a { color: inherit; text-underline-offset: .19em; }
a:focus-visible { outline: 2px solid var(--chm-accent); outline-offset: 4px; }

/* Cabecera compacta: siempre visible, sin retrato ni redes. */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--chm-header-surface);
  border-bottom: 1px solid var(--chm-rule);
  backdrop-filter: blur(12px);
}
.admin-bar header.wp-block-template-part { top: 32px; }
.chm-header-inner {
  width: min(var(--chm-shell-width), calc(100% - 48px));
  min-height: 94px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.chm-brand { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chm-wordmark { font-family: var(--chm-display); font-size: 1.25rem; font-weight: 700; white-space: nowrap; text-decoration: none; }
.chm-header-role { color: var(--chm-muted); font: .9rem/1.35 system-ui, -apple-system, sans-serif; }
.chm-nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: clamp(12px, 2.5vw, 32px); }
.chm-nav a { padding: 5px 0; border: 0; font: 500 1.0625rem/1.4 system-ui, -apple-system, sans-serif; text-decoration: none; transition: color .2s ease; }
.chm-nav a::after { content: "↗"; display: inline-block; margin-left: 9px; transition: transform .2s ease; }
.chm-nav a:is(:hover, :focus-visible)::after { transform: translate(2px, -2px); }
.chm-nav a:hover, .chm-nav a:focus-visible { color: var(--chm-accent); }
.chm-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0; margin-left: auto; }
.chm-header-actions > .chm-nav { order: 0; padding-right: 20px; margin-right: 8px; border-right: 1px solid var(--chm-rule); }
.chm-header-actions > .chm-theme-toggle { order: 1; }
.chm-header-actions > .chm-language-switch { order: 2; }
.chm-header-actions > .chm-menu-toggle { order: 3; }
.chm-theme-toggle { display: inline-flex; width: 44px; height: 44px; flex: 0 0 44px; align-items: center; justify-content: center; padding: 8px; border: 0; border-radius: 50%; outline: 0 !important; box-shadow: none !important; background: transparent; color: var(--chm-ink); cursor: pointer; }
.chm-theme-toggle:hover { color: var(--chm-accent); }
.chm-theme-toggle:focus-visible { outline: 0; background: color-mix(in srgb, var(--chm-accent) 14%, transparent); }
.chm-theme-toggle svg { width: 23px; height: 23px; }
.chm-theme-toggle .chm-icon-sun { display: none; }
html[data-chm-theme="dark"] .chm-theme-toggle .chm-icon-sun { display: block; }
html[data-chm-theme="dark"] .chm-theme-toggle .chm-icon-moon { display: none; }
.chm-theme-toggle:is(:hover, :focus-visible) .chm-icon-moon { animation: chm-moon-tilt .45s ease; }
.chm-theme-toggle:is(:hover, :focus-visible) .chm-icon-sun { animation: chm-sun-turn .6s ease; }
.chm-language-switch { position: relative; display: flex; align-items: center; font: 500 .875rem/1.3 var(--chm-reading); }
.chm-language-trigger { display: inline-flex; min-width: 50px; height: 44px; align-items: center; justify-content: center; gap: 4px; padding: 8px 3px; border: 0; border-radius: 6px; outline: 0 !important; box-shadow: none !important; background: transparent; color: var(--chm-ink); font: 600 .875rem/1.2 var(--chm-reading); cursor: pointer; }
.chm-language-trigger svg { width: 14px; height: 14px; transition: transform .2s ease; }
.chm-language-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.chm-language-trigger:hover { color: var(--chm-accent); }
.chm-language-trigger:focus-visible { outline: 0; background: color-mix(in srgb, var(--chm-accent) 12%, transparent); }
.chm-language-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 1000; width: 158px; padding: 6px; border: 1px solid var(--chm-rule); border-radius: 10px; background: var(--chm-page); color: var(--chm-ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.chm-language-menu[hidden] { display: none; }
.chm-language-menu a { display: flex; min-height: 40px; align-items: center; padding: 9px 10px; border-radius: 6px; color: var(--chm-ink); text-decoration: none; }
.chm-language-menu a[aria-current="page"] { background: color-mix(in srgb, var(--chm-accent) 14%, transparent); font-weight: 700; }
.chm-language-menu a[aria-current="page"]::after { content: '✓'; margin-left: auto; color: var(--chm-accent); }
.chm-language-menu a:is(:hover, :focus-visible) { background: color-mix(in srgb, var(--chm-accent) 12%, transparent); color: var(--chm-accent); }
.chm-theme-toggle:is(:focus, :active), .chm-language-trigger:is(:focus, :active), .chm-menu-toggle:is(:focus, :active), .chm-menu-close:is(:focus, :active), .chm-contact-action:is(:focus, :active) { outline: 0 !important; box-shadow: none !important; }
.chm-mobile-controls { display: none; }
@keyframes chm-moon-tilt { 50% { transform: rotate(-15deg); } }
@keyframes chm-sun-turn { 50% { transform: rotate(25deg); } }
.chm-menu-toggle, .chm-mobile-backdrop, .chm-mobile-drawer { display: none; }

/* Una retícula editorial compartida por todas las secciones. */
body .wp-site-blocks .chm-main { width: min(var(--chm-shell-width), calc(100% - 48px)); max-width: var(--chm-shell-width) !important; margin: 0 auto; padding: 74px 0 104px; }
.chm-main .wp-block-post-content, .chm-main .wp-block-post-content > * { max-width: none !important; }
body .chm-main .wp-block-post-content > .chm-content-header,
body .chm-main .wp-block-post-content > .chm-section:not(.chm-bio) { width: 100%; max-width: var(--chm-reading-width) !important; margin-left: 0 !important; margin-right: auto !important; }
.chm-section { width: 100%; margin: 0; padding: 54px 0 0; border-top: 1px solid var(--chm-rule); scroll-margin-top: 112px; }
.chm-section + .chm-section { margin-top: 76px; }
body .chm-main .chm-bio {
  position: relative;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 35%) minmax(0, 1fr);
  column-gap: clamp(38px, 5vw, 76px);
  row-gap: 0;
  align-items: start;
  width: min(var(--chm-shell-width), calc(100vw - 48px));
  max-width: none !important;
  margin-left: 0 !important;
  transform: translateX(-50%);
  padding-top: 0;
  border-top: 0;
}
body .chm-main .chm-bio .chm-portrait { grid-column: 1; grid-row: 2 / span 3; width: 100%; height: 360px; margin: 42px 0 0 !important; }
.chm-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 34%; border-radius: 10px; filter: grayscale(100%); }
.chm-bio-copy { display: contents; }
.chm-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
body .chm-main .chm-bio-copy p { min-width: 0; margin: 0; text-align: justify; text-align-last: left; -webkit-hyphens: auto; hyphens: auto; }
.chm-bio-copy strong { -webkit-hyphens: none; hyphens: none; white-space: normal; }
body .chm-bio-copy p:first-of-type {
  grid-column: 1 / -1;
  grid-row: 1;
  padding: 0 0 24px;
  font: 400 clamp(1.875rem, 2.6vw, 2.5rem)/1.37 var(--chm-display);
  letter-spacing: -.025em;
}
body .chm-bio-copy p:nth-of-type(2) { grid-column: 2; grid-row: 2; padding-top: 42px; font: 400 1.125rem/1.72 var(--chm-reading); }
body .chm-bio-copy p:nth-of-type(3) { grid-column: 2; grid-row: 3; padding-top: 16px; font: 400 1.125rem/1.72 var(--chm-reading); }
.chm-bio-links { grid-column: 2; grid-row: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; justify-self: start; width: 100%; margin: 0 !important; gap: 12px 24px; padding-top: 22px; text-align: left; }
.chm-bio-links a { color: var(--chm-accent); font: 500 1.125rem/1.72 var(--chm-reading); text-decoration: none; border-bottom: 1px solid currentColor; }
.chm-bio-links a:hover { color: var(--chm-ink); }
.chm-bio-links a:first-child::after { content: ' ↗'; }
.chm-bio-links a:last-child::after { content: ' ↗'; }
.chm-section h2 { margin: 0 0 28px; color: var(--chm-ink) !important; font-family: var(--chm-display); font-size: clamp(1.875rem, 3.6vw, 2.625rem); font-weight: 600; line-height: 1.15; letter-spacing: -.025em; }
.chm-publication { position: relative; margin: 0 !important; padding: 22px 0 24px; border-bottom: 1px solid var(--chm-rule); font: 400 clamp(1.125rem, 1.55vw, 1.25rem)/1.48 var(--chm-display); letter-spacing: -.01em; hyphens: auto; overflow-wrap: anywhere; }
.chm-publication:first-of-type { border-top: 1px solid var(--chm-rule); }
.chm-publication-year { display: block; margin-bottom: 8px; color: var(--chm-accent); font: 600 var(--chm-meta-size)/1.4 var(--chm-reading); letter-spacing: .06em; text-transform: uppercase; }
.chm-publication-title { display: block; margin-bottom: 8px; color: var(--chm-ink); font: inherit; }
.chm-upcoming .chm-publication-title { margin-bottom: 0; }
.chm-publication a, body .chm-project-ref a { white-space: nowrap; font: 500 1em/1.6 var(--chm-reading); color: var(--chm-accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.chm-publication a { display: block; width: fit-content; margin-top: 6px; }
.chm-publication a::after, .chm-project-ref a::after, .chm-footer-links a:not([href^="mailto:"])::after {
  content: "";
  display: inline-block;
  width: .9em;
  height: .9em;
  margin-left: .32em;
  background: currentColor;
  -webkit-mask: url("assets/arrow-up-right.svg") center / contain no-repeat;
  mask: url("assets/arrow-up-right.svg") center / contain no-repeat;
  vertical-align: -.05em;
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.chm-publication a:hover::after, .chm-publication a:focus-visible::after,
.chm-project-ref a:hover::after, .chm-project-ref a:focus-visible::after,
.chm-footer-links a:hover::after, .chm-footer-links a:focus-visible::after { transform: translate(3px, -3px); }
body .chm-project { display: block; margin: 0 !important; padding: 22px 0 24px; border-bottom: 1px solid var(--chm-rule); font: 400 var(--chm-entry-size)/1.6 var(--chm-reading); hyphens: auto; overflow-wrap: anywhere; }
.chm-project:first-of-type { border-top: 1px solid var(--chm-rule); }
.chm-project:last-of-type { border-bottom: 1px solid var(--chm-rule); }
.chm-project > * { min-width: 0; }
body .chm-project-years { display: block; margin: 0 0 8px !important; color: var(--chm-accent); font: 600 var(--chm-meta-size)/1.4 var(--chm-reading); letter-spacing: .06em; white-space: normal; }
.chm-project-copy { display: block; min-width: 0; width: 100%; }
body .chm-project-copy h3 { display: block; margin: 0 0 10px !important; color: var(--chm-ink); font: 400 clamp(1.125rem, 1.55vw, 1.25rem)/1.48 var(--chm-display); letter-spacing: -.01em; }
body .chm-project-copy h3::after { content: none; }
body .chm-project-duration, body .chm-project-role { display: block !important; margin: 0 0 5px !important; font: 400 .96875rem/1.55 var(--chm-reading); }
body .chm-project-ref { display: block !important; margin: 6px 0 0 !important; color: var(--chm-muted); font: 400 .96875rem/1.55 var(--chm-reading); overflow-wrap: anywhere; }
body .chm-project-ref::before { content: none; }
.chm-projects .chm-project { padding: 30px 0 34px; }
.chm-projects .chm-project + .chm-project { margin-top: 8px !important; }
body .chm-projects .chm-project-years { margin-bottom: 12px !important; }
body .chm-projects .chm-project-copy h3, body .chm-conferences .chm-project-copy h3, body .chm-background .chm-project-copy h3 { max-width: 860px; font-size: clamp(1.375rem, 2.2vw, 1.6875rem); line-height: 1.38; }
body .chm-projects .chm-project-copy h3 { margin-bottom: 18px !important; }
body .chm-projects .chm-project-participation { margin: 0 0 2px !important; font: 400 1.03125rem/1.55 var(--chm-reading); }
body .chm-projects .chm-project-ref { margin: 0 !important; color: var(--chm-ink); font: 400 1.03125rem/1.55 var(--chm-reading); }

/* Contacto exclusivamente en el pie. */
footer.wp-block-template-part { border-top: 1px solid var(--chm-rule); }
.chm-footer-inner { width: min(var(--chm-shell-width), calc(100% - 48px)); min-height: 100px; margin: 0 auto; padding: 28px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; scroll-margin-top: 100px; }
.wp-block-shortcode:has(> .chm-footer-inner) { width: 100%; }
.chm-footer-links { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; column-gap: 18px; row-gap: 10px; }
body .chm-footer-links a, body .chm-copyright, body .chm-copyright a { color: var(--chm-ink); font: 500 .875rem/1.4 system-ui, -apple-system, sans-serif; }
.chm-footer-links a { white-space: nowrap; text-decoration: none; border-bottom: 1px solid var(--chm-rule); }
.chm-footer-links a:hover { color: var(--chm-accent); border-color: currentColor; }
.chm-copyright { flex: 0 0 auto; margin: 0; }
.chm-copyright a { text-decoration: none; }
.chm-copyright a:hover { color: var(--chm-accent); text-decoration: underline; }

@media (min-width: 681px) and (max-width: 1050px) {
  .chm-footer-inner { align-items: flex-start; flex-direction: column; gap: 16px; }
  .chm-footer-links { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .admin-bar header.wp-block-template-part { top: 46px; }
  .chm-header-inner { width: min(100% - 32px, 760px); min-height: 102px; padding: 13px 0; flex-direction: column; align-items: flex-start; gap: 11px; }
  .chm-wordmark { font-size: clamp(1.02rem, 4.5vw, 1.125rem); line-height: 1.24; white-space: normal; }
  .chm-header-role { max-height: 2em; overflow: hidden; font-size: .8rem; opacity: 1; transition: max-height .2s ease, opacity .2s ease; }
  header.chm-header-scrolled .chm-header-role { max-height: 0; opacity: 0; }
  .chm-nav { width: 100%; flex-wrap: nowrap; justify-content: flex-start; gap: 10px; overflow-x: auto; scrollbar-width: none; }
  .chm-nav::-webkit-scrollbar { display: none; }
  .chm-nav a { flex: 0 0 auto; font-size: .8125rem; }
  body .wp-site-blocks .chm-main { width: min(var(--chm-shell-width), calc(100% - 40px)); padding: 48px 0 80px; }
  .chm-section { padding-top: 48px; scroll-margin-top: 132px; }
  .chm-section + .chm-section { margin-top: 62px; }
  body .chm-main .chm-bio { width: min(var(--chm-shell-width), calc(100vw - 40px)); grid-template-columns: 1fr; }
  body .chm-bio-copy p:first-of-type { grid-column: 1; grid-row: 1; padding-bottom: 18px; font-size: clamp(1.5rem, 6vw, 2rem); line-height: 1.4; }
  body .chm-main .chm-bio .chm-portrait { grid-column: 1; grid-row: 2; width: min(100%, 520px); height: auto; aspect-ratio: 4 / 3; margin: 30px 0 0 !important; }
  body .chm-bio-copy p:nth-of-type(2) { grid-column: 1; grid-row: 3; padding-top: 30px; font-size: 1.0625rem; }
  body .chm-bio-copy p:nth-of-type(3) { grid-column: 1; grid-row: 4; padding-top: 18px; font-size: 1.0625rem; }
  .chm-bio-links { grid-column: 1; grid-row: 5; padding-top: 24px; }
  .chm-bio-links a { font-size: 1.0625rem; }
  :root { --chm-entry-size: 1.03125rem; }
  .chm-footer-inner { width: min(var(--chm-shell-width), calc(100% - 40px)); align-items: flex-start; flex-direction: column; gap: 16px; }
  .chm-footer-links { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chm-publication a::after, .chm-project-ref a::after, .chm-footer-links a::after, .chm-nav a { transition: none; }
}

/* Burbujas de ancho natural entre reglas, título y fichas a todo el ancho. */
.chm-content-header {
  margin: 104px 0 36px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--chm-rule);
  border-bottom: 1px solid var(--chm-rule);
  scroll-margin-top: 112px;
}
.chm-section-options { display: flex; flex-wrap: wrap; gap: 8px; }
.chm-section-option { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; width: auto; min-height: 44px; padding: 9px 14px; border: 1px solid var(--chm-control-border); border-radius: 999px; background: var(--chm-page); color: var(--chm-ink); text-align: left; white-space: nowrap; font: 500 .9375rem/1.25 var(--chm-reading); cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.chm-section-option:hover { border-color: var(--chm-accent); color: var(--chm-accent); }
.chm-section-option[aria-selected="true"] { border-color: var(--chm-accent); background: var(--chm-accent); color: var(--chm-accent-contrast); }
.chm-section-option:focus-visible { outline: 2px solid var(--chm-accent); outline-offset: 3px; }
.chm-section-icon, .chm-tab-icon { display: block; width: 18px; height: 18px; flex: 0 0 18px; }
.chm-tab-icon--clock :is(.chm-icon-hour, .chm-icon-minute) { transform-box: view-box; transform-origin: 12px 12px; }
.chm-section-option:is(:hover, :focus-visible) .chm-tab-icon--list .chm-icon-detail { animation: chm-icon-reveal .45s ease both; }
.chm-section-option:is(:hover, :focus-visible) .chm-icon-delay-2 { animation-delay: .08s !important; }
.chm-section-option:is(:hover, :focus-visible) .chm-icon-delay-3 { animation-delay: .16s !important; }
.chm-section-option:is(:hover, :focus-visible) .chm-icon-delay-4 { animation-delay: .24s !important; }
.chm-section-option:is(:hover, :focus-visible) .chm-icon-hour { animation: chm-icon-hour .55s ease-in-out; }
.chm-section-option:is(:hover, :focus-visible) .chm-icon-minute { animation: chm-icon-minute .55s ease-in-out; }
.chm-section-option:is(:hover, :focus-visible) .chm-icon-top { animation: chm-icon-layer-top .55s ease-in-out; }
.chm-section-option:is(:hover, :focus-visible) .chm-icon-bottom { animation: chm-icon-layer-bottom .55s ease-in-out; }
.chm-section-option:is(:hover, :focus-visible) .chm-icon-check { animation: chm-icon-check .55s ease-in-out; }
@keyframes chm-icon-reveal { 0% { opacity: .15; transform: translateX(-2px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes chm-icon-hour { 50% { transform: rotate(22deg); } }
@keyframes chm-icon-minute { 50% { transform: rotate(50deg); } }
@keyframes chm-icon-layer-top { 50% { transform: translateY(-2px); } }
@keyframes chm-icon-layer-bottom { 50% { transform: translateY(2px); } }
@keyframes chm-icon-check { 0% { opacity: .2; stroke-dasharray: 7; stroke-dashoffset: 7; } 100% { opacity: 1; stroke-dasharray: 7; stroke-dashoffset: 0; } }
.chm-section-count { flex: 0 0 auto; opacity: .8; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.chm-content-header ~ .chm-section:not(.chm-bio) { display: block; margin-top: 0 !important; padding-top: 0; border-top: 0; }
.chm-content-header ~ .chm-section:not(.chm-bio) > h2 { margin: 0 0 28px !important; font-size: clamp(2.125rem, 4vw, 2.875rem); }
.chm-content-header ~ .chm-section[hidden] { display: none !important; }

/* Contacto: una franja editorial después de las fichas, antes del pie. */
.chm-contact-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  width: 100%;
  margin: 104px 0 0 !important;
  min-height: 220px;
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: none !important;
  padding: 60px max(24px, calc((100vw - var(--chm-shell-width)) / 2));
  background: var(--chm-banner);
  color: var(--chm-banner-ink);
  border-top: 1px solid var(--chm-rule);
  transform: translateX(-50%);
  scroll-margin-top: 112px;
}
body .wp-site-blocks .chm-main:has(.chm-contact-banner) { padding-bottom: 0; }
.chm-contact-banner h2 { flex: 0 0 auto; margin: 0 !important; color: var(--chm-banner-ink) !important; font: 700 clamp(2.125rem, 3.5vw, 2.625rem)/1.2 var(--chm-display); letter-spacing: -.025em; }
.chm-contact-banner-address { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 !important; color: var(--chm-banner-ink); font: 500 clamp(1.0625rem, 1.8vw, 1.3125rem)/1.45 var(--chm-reading); }
.chm-contact-email { overflow-wrap: anywhere; user-select: all; }
.chm-contact-actions { display: inline-flex; position: relative; align-items: center; gap: 1px; }
.chm-contact-action { display: inline-flex; width: 34px; height: 38px; align-items: center; justify-content: center; padding: 8px; border: 0; background: transparent; color: var(--chm-banner-ink); cursor: pointer; text-decoration: none; transition: opacity .2s ease; }
.chm-contact-action .chm-link-icon { width: 18px; height: 18px; flex: 0 0 18px; transition: transform .25s ease; }
.chm-contact-action:is(:hover, :focus-visible) { opacity: .72; }
.chm-copy-email:is(:hover, :focus-visible) .chm-link-icon { transform: translate(2px, -2px); }
.chm-send-email:is(:hover, :focus-visible) .chm-link-icon { transform: translate(2px, -2px); }
.chm-contact-action:focus-visible { outline: 0; background: color-mix(in srgb, var(--chm-banner-ink) 12%, transparent); }
.chm-copy-feedback:not(:empty) { position: absolute; top: calc(100% + 8px); left: 0; min-width: max-content; color: var(--chm-banner-ink); font: 500 .875rem/1.3 var(--chm-reading); }

/* Correo legible y seleccionable; icono Lucide Mail animado sin dependencias JS. */
.chm-email-row { display: inline-flex; align-items: center; gap: 7px; color: var(--chm-ink); font: 500 .875rem/1.4 system-ui, -apple-system, sans-serif; }
.chm-email-address { white-space: nowrap; user-select: all; }
.chm-email-icon { width: 18px; height: 18px; flex: 0 0 18px; transition: transform .3s ease; }
.chm-email-row:hover .chm-email-icon { transform: translateY(-2px); }

@media (max-width: 680px) {
  .chm-header-inner { min-height: 74px; flex-direction: row; align-items: center; gap: 14px; transition: min-height .2s ease, padding .2s ease; }
  header.chm-header-scrolled .chm-header-inner { min-height: 58px; padding-top: 7px; padding-bottom: 7px; }
  .chm-nav { display: none; }
  .chm-header-actions > .chm-theme-toggle, .chm-header-actions > .chm-language-switch { display: none; }
  .chm-header-actions { gap: 0; }
  .chm-menu-toggle, .chm-menu-close { display: inline-flex; width: 44px; height: 44px; flex: 0 0 44px; align-items: center; justify-content: center; padding: 8px; border: 0; background: transparent; color: var(--chm-ink); cursor: pointer; }
  .chm-menu-toggle svg, .chm-menu-close svg { width: 26px; height: 26px; }
  .chm-menu-toggle:focus-visible, .chm-menu-close:focus-visible { outline: 0; background: color-mix(in srgb, var(--chm-accent) 12%, transparent); }
  .chm-mobile-nav a:focus-visible { outline: 2px solid var(--chm-accent); outline-offset: 3px; }
  .chm-mobile-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 100000; background: rgba(23, 23, 23, .48); }
  .chm-mobile-drawer { display: flex; position: fixed; top: 0; right: 0; bottom: 0; z-index: 100001; width: min(88vw, 370px); padding: max(20px, env(safe-area-inset-top)) 26px max(26px, env(safe-area-inset-bottom)); flex-direction: column; gap: 40px; background: var(--chm-page); color: var(--chm-ink); box-shadow: -16px 0 40px rgba(0, 0, 0, .12); transform: translateX(105%); visibility: hidden; transition: transform .28s ease, visibility .28s ease; overflow-y: auto; }
  .chm-mobile-drawer.is-open { transform: translateX(0); visibility: visible; }
  .chm-mobile-drawer-top { display: flex; align-items: center; justify-content: space-between; }
  .chm-mobile-drawer-label { font: 700 1.25rem/1.2 var(--chm-display); }
  .chm-mobile-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 0 18px; border-bottom: 1px solid var(--chm-rule); }
  .chm-mobile-controls .chm-language-switch { margin-left: auto; }
  .chm-mobile-controls:has(.chm-language-menu:not([hidden])) { margin-bottom: 44px; }
  .chm-mobile-nav { display: flex; flex-direction: column; }
  .chm-mobile-nav a { display: block; padding: 17px 0; border-bottom: 1px solid var(--chm-rule); font: 500 1.125rem/1.3 var(--chm-reading); text-decoration: none; }
  .chm-mobile-nav a:last-child { margin-top: 12px; color: var(--chm-accent); }
  .chm-content-header { margin: 76px 0 30px; padding: 18px 0 20px; scroll-margin-top: 132px; }
  .chm-section-option { min-height: 42px; padding: 8px 11px; font-size: .875rem; }
  .chm-content-header ~ .chm-section:not(.chm-bio) > h2 { margin-bottom: 24px !important; }
  .chm-contact-banner { min-height: 210px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px; margin-top: 76px !important; padding: 42px 20px; scroll-margin-top: 132px; }
  .chm-contact-banner h2 { font-size: 2.125rem; }
  .chm-contact-banner-address { font-size: 1.0625rem; }
  .chm-contact-action { width: 42px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .chm-section-option, .chm-email-icon, .chm-mobile-drawer, .chm-nav a::after, .chm-contact-action, .chm-contact-action .chm-link-icon, .chm-header-role, .chm-header-inner { transition: none; } .chm-section-option:is(:hover, :focus-visible) .chm-tab-icon * { animation: none !important; } }
@media (prefers-reduced-motion: reduce) { .chm-theme-toggle:is(:hover, :focus-visible) svg { animation: none; } }
