/* Retro / early-2000s blog look
   Palette:
     --retro-blue: #006FB3
     --retro-red: #FE6565
     --retro-green: #35a776
   Fonts: Playfair Display (headings), Merriweather (body)
*/
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Merriweather:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&display=swap');

:root{
  --retro-blue: #006FB3;
  --retro-red: #FE6565;
  --retro-green: #35a776;
  --paper: #f7f3ed;
  --card: #fffdf9;
  --muted: #6b6b6b;
  --shadow: rgba(0,0,0,0.08);
  --radius: 10px;
  --max-width: 1100px;
}

html,body {
  height: 100%;
  margin: 0;
  background: var(--paper);
  font-family: "Merriweather", serif;
  color: #222;
  -webkit-font-smoothing:antialiased;
  text-rendering: optimizeLegibility;
}

#quarto-content,
main.content,
.quarto-container,
.content,
.content-container,
.home-section,
.manifiesto-wrapper,
.home-gallery,
#galeria {
  background: var(--paper) !important;
}

/* Page container adjustments */
.content-container, .home-section, .manifiesto-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px;
}

/* Banner */
.home-banner {
  border-bottom: 0;
  background-size: cover;
  background-position: center center;
  min-height: 100vh;
  position: relative;
}

/* Full-screen banner overlay layout */
.banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
}

/* Top bar inside the banner: left / center / right */
.banner-topbar {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 18px;
  z-index: 6;
}
.top-left, .top-center, .top-right { display:flex; align-items:center; }
.top-center { gap: 10px; }
.top-center .banner-btn { background: rgba(0,0,0,0.35); color: #fff; padding: 8px 14px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.06); }
.top-center .banner-btn:hover { transform: translateY(-2px); background: rgba(0,0,0,0.5); }

/* Left brand */
.site-brand-mini { display:flex; align-items:center; gap:10px; color:#fff; }
.site-brand-mini .mini-title { font-size: 0.92rem; line-height:1; }
.site-brand-icon { width: 44px; height: 44px; object-fit:contain; border-radius:8px; box-shadow: 0 6px 14px rgba(0,0,0,0.28); }

/* Right social icons and search */
.social-icons { display:flex; gap:10px; align-items:center; }
.social-link { display:inline-flex; width:36px; height:36px; align-items:center; justify-content:center; background: rgba(0,0,0,0.28); border-radius:8px; }
.social-link svg { width:18px; height:18px; fill: #fff; }
.search-box { display:flex; align-items:center; margin-left:8px; background: rgba(0,0,0,0.2); padding:6px 8px; border-radius:8px; }
.search-box input { border: none; background: transparent; color: #fff; outline: none; width: 140px; }
.search-box .search-icon { width:18px; height:18px; margin-right:8px; }

/* Center hero title */
.hero-title { font-family: "Playfair Display", serif; font-size: 4rem; text-align:center; color: #fff; text-shadow: 0 14px 30px rgba(0,0,0,0.6); z-index:4; }
.hero-subtitle { font-size:1.05rem; margin-top:.6rem; color: rgba(255,255,255,0.9); z-index:4; }

@media (max-width: 880px) {
  .hero-title { font-size: 2.2rem; }
  .site-brand-icon { width:36px; height:36px; }
  .search-box input { width: 80px; }
  .top-center .banner-btn { padding: 6px 10px; }
}

/* Headings */
h1, h2, h3, .manifiesto-title {
  font-family: "Playfair Display", serif;
  color: var(--retro-blue);
  margin-top: .6em;
  margin-bottom: .4em;
  letter-spacing: .3px;
}

/* Subheadings and small caps style for nav/summaries */
.letra-cancion, .hero-label {
  font-family: "Merriweather", serif;
  color: var(--retro-red);
  text-align: center;
  font-style: italic;
}

/* Buttons / nav */
.banner-nav .banner-btn {
  display: inline-block;
  margin: 6px;
  padding: 8px 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.12);
  background: linear-gradient(180deg, var(--retro-red), var(--retro-blue));
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform .08s ease, box-shadow .08s ease;
}
.banner-nav .banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,0.12);
}

.all-posts-cta {
  display: flex;
  justify-content: center;
  margin: 14px 0 8px;
}

.all-posts-cta .banner-btn {
  margin: 0;
}

/* Bottom contact section (parallax + dark overlay) */
.contact-parallax {
  position: relative;
  margin-top: 48px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 100vh;
  padding: 72px 18px 80px;
  display: flex;
  align-items: center;
  background-image: url("../images/huemul_mail.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.contact-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.contact-title {
  font-family: "Oswald", "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  text-align: center;
  color: #fff;
  letter-spacing: 0.3px;
  margin: 0;
}

.contact-divider {
  width: 100%;
  max-width: 540px;
  height: 6px;
  margin: 18px auto 30px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-row input,
.contact-row textarea {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.36);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 500;
}

.contact-row input::placeholder,
.contact-row textarea::placeholder {
  color: rgba(255, 255, 255, 0.86);
}

.contact-row textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-submit {
  justify-self: center;
  border: 2px solid rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: "Oswald", "Inter", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}

.contact-submit:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
}

/* Escritos page: bottom subscription preview form */
.escritos-subscribe {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #000;
  padding: 56px 18px 64px;
}

.escritos-subscribe-inner {
  max-width: 760px;
  margin: 0 auto;
}

.escritos-subscribe-title {
  margin: 0 0 20px;
  text-align: center;
  color: #fff;
  font-family: "Oswald", "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  letter-spacing: 0.2px;
}

.escritos-subscribe-form {
  display: grid;
  gap: 12px;
}

.escritos-subscribe-form input[type="email"] {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.36);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "Oswald", "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 500;
}

.escritos-subscribe-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.86);
}

@media (max-width: 880px) {
  .contact-parallax {
    background-attachment: scroll;
    min-height: 100vh;
    padding: 56px 14px 62px;
  }

  .contact-divider {
    height: 5px;
    margin: 14px auto 22px;
  }
}

/* Listing / cards */
.listing-grid, .listing {
  gap: 18px;
}
.card, .listing-item, .quarto-card {
  background: linear-gradient(180deg, var(--card), #f8f7f5);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 6px 14px var(--shadow);
}
.listing-item .title, .listing-item h2, .manifiesto-title {
  color: var(--retro-blue);
}

/* Links */
a {
  color: var(--retro-blue);
  text-decoration: none;
  border-bottom: 2px solid rgba(0,0,0,0.04);
}
a:hover { color: var(--retro-red); }

/* Manifesto list styling */
.manifiesto-text {
  background: repeating-linear-gradient(
    -45deg,
    rgba(0,0,0,0.01) 0px,
    rgba(0,0,0,0.01) 8px,
    rgba(255,255,255,0.00) 8px,
    rgba(255,255,255,0.00) 16px
  );
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.03);
  color: #222;
}

.manifiesto-columns {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: stretch;
}

.manifiesto-main {
  min-width: 0;
  flex: 0 0 70%;
  max-width: 70%;
}

.manifiesto-playlist {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  flex: 0 0 30%;
  max-width: 30%;
}

.manifiesto-playlist-title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 700;
  color: var(--retro-blue);
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
}

.manifiesto-playlist iframe {
  width: 100%;
  height: 352px;
  min-height: 0;
  display: block;
  border: 0;
  border-radius: 12px;
}

.inspiraciones-section {
  margin-top: 26px;
}

.inspiraciones-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inspiraciones-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inspiracion-card {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  border-bottom: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}

.inspiracion-card img {
  width: 100%;
  display: block;
  height: auto;
  max-height: none;
  transition: transform .2s ease;
}

.inspiracion-card:hover,
.inspiracion-card:focus-visible {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

.inspiracion-card:hover img,
.inspiracion-card:focus-visible img {
  transform: scale(1.02);
}

.inspiraciones-title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 700;
  color: var(--retro-blue);
  font-size: clamp(1.3rem, 2.1vw, 2rem);
  text-align: left;
}

@media (max-width: 1060px) {
  .inspiraciones-layout {
    gap: 12px;
  }

  .inspiraciones-title {
    text-align: center;
  }
}

@media (max-width: 880px) {
  .manifiesto-wrapper {
    max-width: 100% !important;
    margin: 1rem 0 1.5rem !important;
    padding: 0 !important;
  }

  .manifiesto-columns {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .manifiesto-main {
    width: 100%;
    flex: 1 1 100%;
    max-width: 100%;
    order: 1;
  }

  .manifiesto-playlist {
    width: 100%;
    flex: 1 1 100%;
    max-width: 100%;
    order: 2;
    margin-top: 6px;
  }

  .manifiesto-playlist-title {
    text-align: center;
  }

  .manifiesto-playlist iframe {
    height: 220px !important;
    min-height: 220px !important;
  }
}

/* Profile / hero */
.hero-left { text-align: center; padding: 8px; }
.hero-logo { width: 140px; border-radius: 8px; border: 2px solid rgba(0,0,0,0.04); box-shadow: 0 6px 12px var(--shadow); }
.hero-divider { width: 2px; background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.01)); margin: 0 12px; }

.hero-left-divider {
  width: min(100%, 300px);
  border: 0;
  border-top: 2px solid #683205;
  margin: 0.35rem auto 0.75rem;
  opacity: 0.9;
}

.lecturas-title {
  margin: 0 0 0.55rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #382110;
  font-style: italic;
}

.lecturas-title-desktop {
  width: min(100%, 300px);
  margin-left: auto;
  margin-right: auto;
  position: sticky;
  top: 88px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(1px);
  padding: 0.2rem 0.15rem;
}

.hero-mobile-divider,
.lecturas-title-mobile,
.goodreads-widget-mobile {
  display: none;
}

.goodreads-widget {
  margin: 0.8rem auto 0;
  border-radius: 0;
  background-color: transparent;
  border: 0;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  padding: 0;
  width: min(100%, 300px);
  box-sizing: border-box;
}

.goodreads-widget > [id^="gr_custom_widget_"] {
  display: flex;
  justify-content: center;
}

.goodreads-widget [class*="gr_custom_container_"] {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.goodreads-widget [class*="gr_custom_review_"] {
  display: none;
}

.goodreads-footer {
  margin-bottom: 0;
  height: 30px;
}

.goodreads-widget p {
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.goodreads-footer img {
  width: 100px;
  display: block;
  margin: 0 auto;
}

.goodreads-iframe {
  width: 100%;
  height: 300px;
  display: block;
  border: 0;
}

@media (max-width: 900px) {
  .lecturas-title-desktop,
  .goodreads-widget-desktop {
    display: none;
  }

  .hero-mobile-divider {
    display: block;
    width: min(100%, 300px);
    border: 0;
    border-top: 2px solid #683205;
    margin: 0.55rem auto 0.75rem;
    opacity: 0.9;
  }

  .lecturas-title-mobile,
  .goodreads-widget-mobile {
    display: block;
  }

  .lecturas-title-mobile,
  .goodreads-widget-mobile {
    width: min(100%, 300px);
    margin-left: auto;
    margin-right: auto;
  }

  .goodreads-widget-mobile [class*="gr_custom_container_"] {
    width: 100% !important;
    padding: 8px 6px !important;
  }

  .goodreads-widget-mobile [class*="gr_custom_book_container_"] {
    width: 82px !important;
    height: 132px !important;
    margin-right: 8px !important;
  }

  .goodreads-widget-mobile [class*="gr_custom_each_container_"] {
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
  }

  .goodreads-widget-mobile [class*="gr_custom_title_"] a {
    display: block;
    font-size: 0.88rem;
    line-height: 1.2;
  }

  .goodreads-widget-mobile [class*="gr_custom_author_"] {
    font-size: 0.75rem !important;
    line-height: 1.2;
  }

  .lecturas-title-desktop {
    position: static;
    background: transparent;
    backdrop-filter: none;
    padding: 0;
  }
}

.nosotros-photo-strip {
  position: relative;
  width: min(980px, 100%);
  margin: 1.4rem auto 2rem;
  padding: 0;
  text-align: center;
}

.nosotros-photo-strip::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 124px;
  height: 28px;
  background: #e9dbbd;
  opacity: 0.95;
  z-index: 2;
}

.nosotros-photo-img {
  width: 100%;
  display: block;
  border: 4px solid #fff;
  border-radius: 4px;
  box-shadow: 0 10px 18px rgba(0,0,0,0.14);
}

.nosotros-photo-strip figcaption {
  margin-top: 0.6rem;
  color: #222;
  font-style: italic;
}

/* Article body tweaks (improve reading feel) */
.proyecto-texto p, .content p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #222;
  margin-bottom: 1.1em;
}

/* Blockquote/vintage highlight */
blockquote {
  border-left: 4px solid var(--retro-green);
  background: rgba(53,167,118,0.04);
  padding: 10px 14px;
  margin: 0 0 18px 0;
  border-radius: 6px;
}

/* Small retro badges */
.badge {
  display:inline-block;
  padding:4px 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(0,0,0,0.02));
  color: var(--retro-blue);
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.05);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Footer / comments area */
#comments {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
  padding: 28px;
  border-radius: 12px;
  margin: 36px 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

/* Home gallery with museum-style frames */
.home-gallery {
  max-width: var(--max-width);
  margin: 42px auto 36px auto;
  padding: 0 18px;
}

.museum-gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
  margin-top: 18px;
}

.museum-frame {
  grid-column: span 2;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.museum-frame:nth-child(4n+1) { grid-column: span 3; }
.museum-frame:nth-child(5n+3) { grid-column: span 1; }
.museum-frame:nth-child(7n+2) { grid-column: span 2; }

.museum-photo {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--card), var(--paper));
  box-shadow: 0 10px 24px var(--shadow);
  cursor: zoom-in;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s ease, box-shadow .2s ease;
}

.museum-photo::before,
.museum-photo::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 72px;
  height: 20px;
  background: #e9dbbd;
  opacity: 0.95;
  z-index: 2;
  pointer-events: none;
}

.museum-photo::before {
  left: 18%;
  transform: rotate(-9deg);
}

.museum-photo::after {
  right: 18%;
  transform: rotate(9deg);
}

.museum-photo img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border: 4px solid var(--paper);
  border-radius: 4px;
  image-rendering: auto;
  transition: transform .2s ease;
}

.museum-frame:hover .museum-photo,
.museum-frame:focus-within .museum-photo {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

.museum-frame:hover .museum-photo img,
.museum-frame:focus-within .museum-photo img {
  transform: scale(1.02);
}

.museum-photo:focus-visible {
  outline: 3px solid var(--retro-blue);
  outline-offset: 4px;
}

.museum-frame figcaption {
  margin-top: 2px;
  text-align: center;
  color: #222;
  font-size: 0.95rem;
  font-style: italic;
}

.gallery-lightbox {
  border: 0;
  padding: 0;
  margin: auto;
  background: transparent;
  max-width: min(94vw, 1100px);
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.gallery-lightbox-image {
  display: block;
  max-width: 94vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border: 6px solid #fff;
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-caption {
  margin: 10px 0 0;
  text-align: center;
  color: #fff;
  font-style: italic;
  font-size: 1rem;
}

.gallery-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 880px) {
  .museum-gallery {
    gap: 14px;
  }

  .museum-photo {
    padding: 12px;
  }

  .museum-photo::before,
  .museum-photo::after {
    width: 62px;
    height: 18px;
    top: -9px;
  }

  .museum-frame figcaption {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .museum-photo:active {
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2);
  }

  .museum-photo:active img {
    transform: scale(1.01);
  }

  .gallery-lightbox {
    width: min(96vw, 780px);
  }

  .gallery-lightbox-image {
    max-width: 96vw;
    max-height: 72vh;
    border-width: 4px;
  }

  .gallery-lightbox-caption {
    margin-top: 8px;
    font-size: 0.94rem;
    line-height: 1.35;
    padding: 0 8px;
  }

  .gallery-lightbox-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
    background: rgba(0, 0, 0, 0.72);
  }
}

@media (max-width: 1000px) {
  .museum-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .museum-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .museum-frame,
  .museum-frame:nth-child(4n+1),
  .museum-frame:nth-child(5n+3),
  .museum-frame:nth-child(7n+2) { grid-column: span 2; }
}

/* Comments thread sizing: adapt to real content (form + comments) */
#comments .comments-thread,
#comments #cusdis_thread {
  min-height: 260px;
  height: auto;
}

#comments .comments-thread iframe,
#comments #cusdis_thread iframe {
  width: 100%;
  min-height: 260px;
  height: auto;
  border: 0;
}

/* If Cusdis renders directly in DOM, enlarge reply textarea to ~5 lines */
#comments #cusdis_thread textarea,
#comments .comments-thread textarea,
#comments #cusdis_thread .cusdis-textarea,
#comments .comments-thread .cusdis-textarea {
  min-height: 8.2em !important;
  line-height: 1.4;
}

@media (max-width: 880px) {
  #comments .comments-thread,
  #comments #cusdis_thread,
  #comments .comments-thread iframe,
  #comments #cusdis_thread iframe {
    min-height: 220px;
  }
}

/* Small responsive tweaks */
@media (max-width: 880px) {
  .hero-divider { display:none; }
  .content-container { padding: 12px; }
  .banner-nav .banner-btn { padding: 10px 12px; margin: 4px 2px; }
}

/* Hero title and sticky nav behavior */
.home-banner { position: relative; overflow: hidden; }
.banner-overlay { display: flex; align-items: center; justify-content: center; flex-direction: column; min-height: 360px; padding: 36px 12px; }
.hero-title {
  font-family: "Playfair Display", serif;
  font-size: 3.2rem;
  color: #ffffff;
  margin: 0;
  text-align: center;
  text-shadow: 0 6px 18px rgba(0,0,0,0.45);
  transition: transform .42s cubic-bezier(.2,.8,.2,1), opacity .36s ease;
}
.hero-subtitle {
  font-family: "Merriweather", serif;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.95);
  margin-top: .6rem;
  text-align: center;
  transition: opacity .36s ease, transform .36s ease;
}

/* When the page is scrolled a bit, hide hero text */
body.hero-scrolled .hero-title,
body.hero-scrolled .hero-subtitle {
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
}

/* Small, sticky site nav that appears after banner scroll */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transform: translateY(-110%);
  transition: transform .28s ease;
  z-index: 10001;
}
body.show-site-nav .site-nav { transform: translateY(0); }
.site-nav .site-nav-inner { max-width: var(--max-width); width: 100%; padding: 0 18px; display:flex; align-items:center; justify-content:space-between; gap: 18px; }
.site-nav-leftblock { display:flex; align-items:center; gap:18px; }
.site-links { display:flex; gap:12px; }
.site-link-btn { color: var(--retro-blue); text-decoration: none; font-weight:700; padding: 8px 12px; border-radius:6px; background: transparent; }
.site-link-btn:hover { color: var(--retro-red); background: rgba(0,0,0,0.02); }

/* Ensure brand doesn't push center: keep its content compact */
.site-brand { white-space: nowrap; }

@media (max-width:880px){
  .site-nav { height:56px; }
  .site-nav-left, .site-nav-right { flex:0.9; }
  .site-nav-center { display:block; }
  .site-links { gap: 0; }
  .site-links .site-link-btn:nth-child(n+2) { display: none; }
  .site-links .site-link-btn:first-child { padding: 8px 10px; }
}

@media (max-width: 880px) {
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .site-nav { height:56px; }
  .top-center .banner-btn:nth-child(n+2) { display: none; }
  .top-center { justify-content: center; }
}

/* Hide Quarto's default navbar to use our custom one */
/* Hide Quarto's default header/navbar elements (strong selectors) */
nav.navbar, .navbar, header .navbar, .quarto-navbar, .navbar-container,
header#quarto-header, header.quarto-banner, .navbar-brand-container, .navbar-brand-logo,
.navbar-title, .quarto-navbar-tools, .navbar-toggler, #navbarCollapse, .navbar-container.container-fluid {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Site-brand icon next to our title */
.site-brand-icon { width: 40px; height: 40px; object-fit: contain; margin-right: 10px; border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,0.12); display:inline-block !important; visibility:visible !important; opacity:1 !important; }
.site-brand { display:flex; align-items:center; font-weight:700; color: var(--retro-blue); font-family: "Playfair Display", serif; }

/* Force any logo images used in header/topbar to be visible (override theme) */
.site-brand-icon, .site-brand-mini img, .banner-topbar img { display:inline-block !important; visibility:visible !important; opacity:1 !important; }

/* Escritos section: large latest on left, three small on right */
.escritos-grid {
  max-width: var(--max-width);
  margin: 18px auto 36px auto;
  padding: 0 18px;
}
.escritos-grid > .listing {
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-rows: repeat(3, 1fr);
  gap: 24px;
  min-height: 100vh; /* full viewport height vertically */
}
.escritos-grid > .listing .listing-item { background: transparent; border: none; box-shadow: none; padding: 0; }
.escritos-grid > .listing .listing-item:nth-child(1) { grid-column: 1; grid-row: 1 / 4; }
.escritos-grid > .listing .listing-item:nth-child(2) { grid-column: 2; grid-row: 1; }
.escritos-grid > .listing .listing-item:nth-child(3) { grid-column: 2; grid-row: 2; }
.escritos-grid > .listing .listing-item:nth-child(4) { grid-column: 2; grid-row: 3; }
.escritos-grid .listing-item img, .escritos-grid .listing-item .thumbnail img, .escritos-grid .listing-item .figure img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display:block; }
.escritos-grid .listing-item:nth-child(1) img { height: 100%; }
.escritos-grid .listing-item .title, .escritos-grid .listing-item h2, .escritos-grid .listing-item h3 { color: var(--retro-blue); margin: 12px 0 6px 0; }
.escritos-grid .listing-item p { color: #333; margin: 0 0 10px 0; }

@media (max-width: 880px) {
  .escritos-grid > .listing { grid-template-columns: 1fr; grid-template-rows: none; min-height: auto; }
  .escritos-grid > .listing .listing-item { grid-column: auto; grid-row: auto; }
}

/* Quarto listing layout for "Escritos recientes": 60% left + 40% right (3 rows) */
#listing-product {
  min-height: 23vh;
}

#listing-product > .list {
  display: grid !important;
  grid-template-columns: 60% 40%;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-height: 23vh;
}

#listing-product > .list > .g-col-1 {
  min-height: 0;
}

#listing-product > .list > .g-col-1:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / 3;
}

#listing-product > .list::before,
#listing-product > .list::after {
  content: "";
  grid-column: 1;
  grid-row: 3;
  width: calc(50% - 6px);
  height: 100%;
  align-self: stretch;
  border-radius: 12px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--card);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

#listing-product > .list::before {
  justify-self: start;
  background-image: url("../images/mas_huemul_pared.jpg");
}

#listing-product > .list::after {
  justify-self: end;
  background-image: url("../images/huemul_esperanza.jpg");
}

#listing-product > .list > .g-col-1:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

#listing-product > .list > .g-col-1:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

#listing-product > .list > .g-col-1:nth-child(4) {
  grid-column: 2;
  grid-row: 3;
}

#listing-product .quarto-grid-link,
#listing-product .quarto-grid-item {
  height: 100%;
}

#listing-product .quarto-grid-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

#listing-product .post-contents {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#listing-product .listing-title {
  font-size: 1rem;
  line-height: 1.25;
}

#listing-product .listing-subtitle {
  display: none;
}

#listing-product .listing-reading-time {
  order: 3;
  font-size: 0.98rem;
  font-weight: 600;
}

#listing-product .listing-description {
  display: none;
}

#listing-product .card-attribution {
  order: 5;
}

#listing-product .listing-author,
#listing-product .listing-date {
  font-size: 0.98rem;
  font-weight: 600;
}

#listing-product .card-img-top {
  margin: 0;
}

#listing-product .card-img-top .thumbnail-image,
#listing-product .card-img-top img {
  width: 100%;
  object-fit: cover;
  height: 86px !important;
  transition: transform .2s ease;
}

#listing-product > .list > .g-col-1:nth-child(1) .card-img-top .thumbnail-image,
#listing-product > .list > .g-col-1:nth-child(1) .card-img-top img {
  height: 100% !important;
  object-fit: contain;
}

#listing-product > .list > .g-col-1:nth-child(1) .quarto-grid-item {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

#listing-product > .list > .g-col-1:nth-child(1) .card-img-top {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#listing-product > .list > .g-col-1:hover .quarto-grid-item,
#listing-product > .list > .g-col-1:focus-within .quarto-grid-item {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

#listing-product > .list > .g-col-1:hover .card-img-top img,
#listing-product > .list > .g-col-1:hover .card-img-top .thumbnail-image,
#listing-product > .list > .g-col-1:focus-within .card-img-top img,
#listing-product > .list > .g-col-1:focus-within .card-img-top .thumbnail-image {
  transform: scale(1.02);
}

#listing-product > .list > .g-col-1:nth-child(1) .listing-title {
  font-size: 1.25rem;
  line-height: 1.15;
}

#listing-product > .list > .g-col-1:nth-child(1) .listing-subtitle {
  display: block;
  font-size: 1.06rem;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

#listing-product > .list > .g-col-1:nth-child(1) .listing-reading-time {
  font-size: 1.02rem;
}

#listing-product > .list > .g-col-1:nth-child(1) .listing-description {
  display: none;
}

#listing-product > .list > .g-col-1:nth-child(1) .listing-author,
#listing-product > .list > .g-col-1:nth-child(1) .listing-date {
  font-size: 1.05rem;
  font-weight: 700;
}

@media (max-width: 880px) {
  #listing-product,
  #listing-product > .list {
    min-height: auto;
  }

  #listing-product > .list::before,
  #listing-product > .list::after {
    display: none;
  }

  #listing-product > .list {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  #listing-product > .list > .g-col-1:nth-child(1),
  #listing-product > .list > .g-col-1:nth-child(2),
  #listing-product > .list > .g-col-1:nth-child(3),
  #listing-product > .list > .g-col-1:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
  }

  #listing-product > .list > .g-col-1:nth-child(1) .card-img-top .thumbnail-image,
  #listing-product > .list > .g-col-1:nth-child(1) .card-img-top img,
  #listing-product .card-img-top .thumbnail-image,
  #listing-product .card-img-top img {
    height: 240px !important;
  }
}

@media (max-width: 880px) {
  .escritos-grid { flex-direction: column; gap:14px; }
  .escritos-left img { height: 260px; }
  .escritos-right { width: 100%; flex-direction: row; gap:10px; flex-wrap:wrap; }
  .escrito-small { width: calc(50% - 6px); }
}

/* Página escritos: cards horizontales apilados */
.escritos-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 140px);
  gap: 20px;
  align-items: start;
}

.escritos-main {
  min-width: 0;
}

.escritos-side {
  position: sticky;
  top: 84px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.escritos-side-image {
  width: min(100%, 140px);
  max-height: 62vh;
  height: auto;
  display: block;
  object-fit: contain;
}

.escritos-side .quarto-figure,
.escritos-side figure {
  margin: 0;
  width: 100%;
  text-align: center;
}

.escritos-side p {
  margin: 0;
  width: 100%;
  text-align: center;
}

.escritos-side img {
  width: min(100%, 140px);
  max-height: 62vh;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.escritos-side figcaption {
  display: none;
}

#listing-escritos > .list {
  display: flex !important;
  flex-direction: column;
  gap: 18px;
}

#listing-escritos > .list > .g-col-1 {
  width: 100%;
}

#listing-escritos .quarto-grid-link {
  display: block;
}

#listing-escritos .quarto-grid-item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  min-height: 190px;
}

#listing-escritos .card-img-top {
  flex: 0 0 36%;
  max-width: 36%;
  margin: 0;
}

#listing-escritos .card-img-top .thumbnail-image,
#listing-escritos .card-img-top img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  border-radius: 8px;
}

#listing-escritos .post-contents {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#listing-escritos .listing-title {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

#listing-escritos .listing-subtitle {
  font-size: 1.05rem;
  line-height: 1.4;
}

#listing-escritos .listing-reading-time,
#listing-escritos .listing-description,
#listing-escritos .card-attribution {
  display: none !important;
}

#listing-escritos .listing-reading-time,
#listing-escritos .listing-description {
  display: none !important;
}

#listing-escritos .card-attribution {
  display: flex !important;
  gap: 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

#listing-escritos .listing-author,
#listing-escritos .listing-date {
  font-weight: 600;
}

@media (max-width: 640px) {
  .escritos-page-layout {
    grid-template-columns: 1fr;
  }

  .escritos-main {
    order: 1;
  }

  .escritos-side {
    position: static;
    order: 2;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
  }

  .escritos-side .quarto-figure,
  .escritos-side figure,
  .escritos-side p {
    width: auto;
    margin: 0;
  }

  .escritos-side-image {
    width: 110px;
    max-height: 220px;
    object-fit: contain;
  }

  .escritos-side img {
    width: 110px;
    max-height: 220px;
  }

  #listing-escritos .quarto-grid-item {
    flex-direction: column;
    min-height: auto;
  }

  #listing-escritos .card-img-top {
    flex: 0 0 auto;
    max-width: 100%;
  }

  #listing-escritos .card-img-top .thumbnail-image,
  #listing-escritos .card-img-top img {
    height: 220px !important;
  }
}

/* Vertical social column on left under the banner top buttons */
.vertical-social {
  position: absolute;
  left: 8px;
  top: 74px; /* positioned below the topbar buttons */
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10050; /* above banner and nav */
  pointer-events: auto;
}
.social-link-vertical { display:inline-flex; width:44px; height:44px; align-items:center; justify-content:center; background: rgba(0,0,0,0.28); border-radius:8px; box-shadow: 0 6px 12px rgba(0,0,0,0.12); }
.social-link-vertical svg { width:20px; height:20px; fill:#fff; }

@media (max-width: 880px) {
  .vertical-social { display:none; }
}

/* Ensure Quarto-inserted social/search parts are hidden, but allow our banner socials */
.quarto-navbar .social-icons,
.quarto-navbar .search-box {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Banner top-right socials and search */
.banner-socials { display:flex; gap:8px; align-items:center; }
.banner-social { display:inline-flex; width:36px; height:36px; align-items:center; justify-content:center; background: rgba(0,0,0,0.28); border-radius:8px; }
.banner-social svg { width:18px; height:18px; fill:#fff; }
.banner-search { display:flex; align-items:center; gap:8px; margin-left:8px; }
.banner-search-btn { display:inline-flex; width:36px; height:36px; align-items:center; justify-content:center; border-radius:8px; background: rgba(0,0,0,0.28); border: none; }
.banner-search-btn svg { width:18px; height:18px; fill: #fff; }
.banner-search-form { display:none; position:absolute; right:18px; top:64px; background: var(--card); padding:8px; border-radius:8px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); border:1px solid rgba(0,0,0,0.04); }
.banner-search-form input[type="search"] { border: none; outline: none; padding:6px 8px; width:220px; }
.home-banner .banner-search-form { color:#222; }
.home-banner.search-open .banner-search-form { display:block; }

/* Vertical banner socials positioned at extreme right above the banner image */
.banner-vertical-socials {
  position: absolute;
  right: 18px;
  top: 72px; /* lowered to align with the banner buttons (Manifiesto) */
  display: flex;
  flex-direction: column;
  gap: 14px; /* increased vertical spacing */
  z-index: 10060;
  pointer-events: auto;
}
.banner-social-vertical {
  display:inline-flex;
  width:46px;
  height:46px;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,0.32);
  border-radius:10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}
.banner-social-vertical svg,
.banner-social-vertical i { width:20px; height:20px; color:#fff; font-size:20px; line-height:1; }

@media (max-width: 880px){
  .banner-vertical-socials {
    display: flex;
    flex-direction: row;
    gap: 10px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    bottom: 30px;
  }

  .banner-social-vertical {
    width: 42px;
    height: 42px;
  }
}

@media (max-width:880px){
  .banner-search-form { display:none !important; }
}

/* Sticky site-nav right area: socials + search */
.site-nav-right { display:flex; align-items:center; gap:12px; }
.site-socials { display:flex; gap:8px; align-items:center; }
.site-social { display:inline-flex; width:36px; height:36px; align-items:center; justify-content:center; border-radius:8px; background: transparent; border:1px solid rgba(0,0,0,0.04); }
.site-social svg,
.site-social i { width:18px; height:18px; color: var(--retro-blue); font-size:18px; line-height:1; }

.nav-search { position: relative; }
.nav-search-btn { background: transparent; border: none; width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; border-radius:8px; }
.nav-search-btn svg { width:18px; height:18px; fill: var(--retro-blue); }
.nav-search-form { position: absolute; right: 0; top: 44px; display: none; background: var(--card); padding:8px; border-radius:8px; box-shadow: 0 6px 18px rgba(0,0,0,0.08); border:1px solid rgba(0,0,0,0.04); }
.nav-search-form input[type="search"] { border: none; outline: none; padding: 6px 8px; width: 220px; font-family: inherit; }
.site-nav.search-open .nav-search-form { display:block; }

/* Hero title letter pieces for gravity animation */
.hero-title { position: relative; display: inline-block; }
.hero-title .hero-letter { display:inline-block; position:relative; will-change: transform, opacity; }
.falling-letter { position: fixed; left:0; top:0; pointer-events:none; font-family: "Playfair Display", serif; font-size: inherit; color: #fff; z-index:10060; text-shadow: 0 6px 18px rgba(0,0,0,0.45); }

/* small safety: when animation runs hide original letters visibility */
.hero-title.hidden-letters .hero-letter { visibility: hidden; }

/* Transition for return animation (letters coming back into place) */
.hero-letter {
  transition: transform 0.9s cubic-bezier(.2,.8,.2,1), opacity 0.6s ease;
  -webkit-transition: transform 0.9s cubic-bezier(.2,.8,.2,1), opacity 0.6s ease;
}

@media (max-width:880px){
  .site-social { display:none; }
  .nav-search-form input[type="search"] { width: 140px; }
}

/* Ensure page content starts below the fixed site-nav when shown */
:root{
  --site-nav-height: 64px;
  --site-nav-gap: 12px;
}

@media (max-width:880px){
  :root{ --site-nav-height: 56px; --site-nav-gap: 16px; }
}

body.show-site-nav .content-container,
body.show-site-nav main,
body.show-site-nav .page,
body.show-site-nav .quarto-content,
body.show-site-nav .content,
body.show-site-nav .quarto-page,
body.show-site-nav article,
body.show-site-nav .post,
body.show-site-nav .page-wrapper,
body.show-site-nav .document,
body.show-site-nav .page-body,
body.show-site-nav .page-title {
  padding-top: calc(var(--site-nav-height) + var(--site-nav-gap));
}

/* Product/title pages: keep title block below the fixed custom nav */
body.show-site-nav #title-block-header,
body.show-site-nav .quarto-title-block {
  padding-top: calc(var(--site-nav-height) + var(--site-nav-gap));
}

/* Make anchor jumps and headings respect the fixed header */
html { scroll-padding-top: calc(var(--site-nav-height) + var(--site-nav-gap)); }
h1, h2, h3 { scroll-margin-top: calc(var(--site-nav-height) + var(--site-nav-gap) + 6px); }

@media (max-width: 880px) {
  #quarto-document-content .quarto-layout-panel[data-layout="[50,50]"] > .quarto-layout-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  #quarto-document-content .quarto-layout-panel[data-layout="[50,50]"] .quarto-layout-cell {
    width: 100% !important;
    flex-basis: auto !important;
    order: 2;
  }

  #quarto-document-content .quarto-layout-panel[data-layout="[50,50]"] .hero-label.quarto-layout-cell {
    order: 1;
  }

  #quarto-document-content .quarto-layout-panel[data-layout="[50,50]"] .quarto-video {
    width: min(100%, 340px);
    margin: 0 auto;
  }
}

