/* Smooth-scrolls to the in-page anchors from .about-side-nav below. Targets
   .page-main specifically (not html/body) because cocina.css's
   `overflow-x: hidden` on that rule makes browsers coerce overflow-y to
   `auto` — main, not the document, is the element that actually scrolls
   here. Scoped safely: this stylesheet only loads on about.html. */
.page-main { scroll-behavior: smooth; }

/* Sections are anchor targets for .about-side-nav — offset so the sticky
   header never covers the heading right after a jump. */
.about-section[id] { scroll-margin-top: calc(var(--site-header-h) + 20px); }

/* ── LAYOUT ──
   Single column on mobile/tablet (matches the rest of the site). On wide
   screens the hero becomes a sticky sidebar next to the content — without
   this, a lone centered column reads as mostly empty space either side. */
.about-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-main-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

@media (min-width: 860px) {
  .about-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    align-items: start;
    gap: 40px;
  }
  .about-sidebar {
    position: sticky;
    top: calc(var(--site-header-h) + 24px);
  }
  .about-hero {
    padding: 28px 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
  }
}

/* ── ABOUT HERO ── */
.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 8px 0 12px;
}

.about-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(24,95,165,0.18);
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }

.about-name {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
}

.about-handle {
  font-size: 13px;
  color: var(--ink-muted);
}

.about-inline-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ink-faint);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}
.about-inline-link:hover { text-decoration-color: currentColor; }

.about-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(24,95,165,0.18);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.about-tagline {
  margin-top: 4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.about-socials {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.about-portfolio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 100px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.about-portfolio-btn:hover { color: var(--cream); background: var(--ink); }

/* ── NEWSLETTER TEASER ── */
.about-newsletter-teaser {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--accent-light);
  border: 1px solid rgba(24,95,165,0.18);
  border-radius: 10px;
}

.about-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.about-newsletter-teaser p { font-size: 13px; color: var(--ink-muted); line-height: 1.5; }

/* ── PHOTO GALLERY ── */
.about-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 520px;
}

.about-photo-tile {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── SECTIONS ── */
.about-section { display: flex; flex-direction: column; gap: 12px; }

/* Quién soy + Más allá side by side on desktop only — stacked full-width
   text blocks left a lot of unused horizontal space in .about-main-col at
   wide viewports. Mobile/tablet keep the original stacked flow. */
.about-bio-row { display: flex; flex-direction: column; gap: 32px; }

@media (min-width: 860px) {
  .about-bio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
  .about-bio-row .about-body-text { max-width: none; }
}

.about-section-title-row { display: flex; align-items: baseline; gap: 10px; }

.about-section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}

.about-book-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
}

.about-draft-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 9px;
}

.about-placeholder {
  padding: 18px 20px;
  border: 1px dashed var(--ink-faint);
  border-radius: 10px;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-faint);
  line-height: 1.6;
}

.about-body-text {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 60ch;
}

.about-bio-row .about-body-text {
  text-align: justify;
  hyphens: auto;
}

/* ── BOOKS ──
   Horizontally scrollable row (not a wrapping grid) — this is a shelf of
   recommendations, not a gallery, and the cards carry enough text that
   wrapping them would eat the whole section height. */
.about-book-grid {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.about-book-card {
  flex: 0 0 152px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.about-book-cover {
  width: 152px;
  height: 216px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--accent-light);
  box-shadow: var(--shadow-sm);
}

.about-book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Title/author sized to their actual single-line content (not reserved for
   a hypothetical 2-line wrap) so there's no dead air above the toggle —
   the line-clamp is just a ceiling if a future title ever runs long. */
.about-book-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
}

.about-book-author {
  min-height: 14px;
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.about-book-desc-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.about-book-desc-toggle svg { transition: transform 0.2s ease; }
.about-book-desc-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.about-book-desc {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-faint);
  line-height: 1.5;
  text-align: center;
}

.about-book-buy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.2s;
}
.about-book-buy:hover { background: #124a82; }

/* ── COLLABORATIONS ── */
.about-collab-list { display: flex; flex-direction: column; gap: 8px; }

.about-collab-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.about-collab-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--sans);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.about-collab-toggle:hover { background: rgba(28,28,26,0.03); }

.about-collab-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.about-collab-logo-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.about-collab-logo-wrap--dark { background: #000; }

.about-collab-name { flex: 1; font-size: 14px; font-weight: 500; }

.about-collab-cta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-muted);
}
.about-collab-cta svg { transition: transform 0.2s ease; }
.about-collab-toggle[aria-expanded="true"] .about-collab-cta svg { transform: rotate(90deg); }

.about-collab-detail {
  padding: 0 14px 14px 62px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.about-collab-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.about-collab-link:hover { text-decoration: underline; }

/* ── CONTACT ── */
.about-contact-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--accent-light);
  border: 1px solid rgba(24,95,165,0.18);
  border-radius: 10px;
}

.about-contact-icon {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

.about-contact-body { display: flex; flex-direction: column; gap: 8px; }

.about-contact-text { font-size: 13px; color: var(--ink-muted); line-height: 1.5; }

.about-contact-email-row { display: flex; align-items: center; gap: 8px; }

.about-contact-email {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-faint);
}
.about-contact-email:hover { border-color: var(--ink); }

.about-contact-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(24,95,165,0.18);
  border-radius: 100px;
  background: none;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.about-contact-copy:hover { background: rgba(24,95,165,0.08); }
.about-contact-copy.copied { color: var(--green); border-color: var(--green); }

/* ── MOBILE SECTION NAV — a fixed bar directly under the header (a sibling
   of <header>/<main> in the body flex column, not something inside the
   scrolling page-main), same treatment as the Posts/Mapa/Cocina .site-nav
   bar on desktop. Always visible, never floats over content. Desktop hides
   this in favor of .about-side-nav in the sidebar. */
.about-mobile-nav-wrap {
  position: relative;
  flex-shrink: 0;
}

.about-mobile-nav {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
/* Centered only once JS confirms all items already fit (no overflow) —
   centering an overflowing flex row clips the first/last item off-screen
   with no way to scroll back to it, so it can't be the default. */
.about-mobile-nav.fits {
  justify-content: center;
}
.about-mobile-nav::-webkit-scrollbar { display: none; }

@media (max-width: 480px) {
  .about-mobile-nav { padding: 0 16px; }
}

.about-mobile-nav-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 13px 14px;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  border-top: 2px solid transparent;
  margin-top: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.about-mobile-nav-item:hover { color: var(--ink); }
.about-mobile-nav-item.active { color: var(--ink); border-top-color: var(--ink); }

/* Fade hint at the edges when there's more to scroll, same pattern as the
   recipe filter pills (.rf-pills-wrap) elsewhere on the site. */
.about-mobile-nav-wrap::before,
.about-mobile-nav-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 1px;
  width: 28px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.15s;
}
.about-mobile-nav-wrap::before { left: 0;  background: linear-gradient(to right, var(--cream), transparent); }
.about-mobile-nav-wrap::after  { right: 0; background: linear-gradient(to left,  var(--cream), transparent); }
.about-mobile-nav-wrap.can-scroll-left::before  { opacity: 1; }
.about-mobile-nav-wrap.can-scroll-right::after { opacity: 1; }

@media (min-width: 860px) {
  .about-mobile-nav-wrap { display: none; }
}

/* ── SIDE NAV (desktop only, portfolio-style jump links) ── */
.about-side-nav {
  display: none;
}

@media (min-width: 860px) {
  .about-side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 16px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
  }
}

.about-side-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.about-side-nav-item svg { flex-shrink: 0; }
.about-side-nav-item:hover { background: rgba(28,28,26,0.04); color: var(--ink); }
.about-side-nav-item.active { background: var(--accent-light); color: var(--accent); }

/* ── PRESS ── */
.about-press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.about-press-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.about-press-img {
  height: 150px;
  background: var(--accent-light);
}
.about-press-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }

.about-press-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  flex: 1;
}

.about-press-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.about-press-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

.about-press-desc {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.5;
  flex: 1;
}

.about-press-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.about-press-link:hover { text-decoration: underline; }
