/* ===========================
   Fucktum · custom.css
   - Mantiene tu comportamiento actual
   - Añade mejoras de legibilidad y theming
   =========================== */

/* ---- Variables base (puedes ajustar aquí) ---- */
:root {
  --ft-text: #111;         /* color texto por defecto */
  --ft-muted: #555;        /* texto atenuado / blockquote */
  --ft-border: #888;       /* bordes sutiles (blockquote) */
  --ft-maxw: 860px;        /* ancho de lectura */
}

/* Dark mode: usa lo que el sistema prefiera */
/* Solo aplica cuando el tema Book realmente esté en dark */
html[data-theme='dark']{
  --ft-text: #eaeaea;
  --ft-muted: #b0b0b0;
  --ft-border: #9a9a9a;
}


/* ---- Ajustes globales ---- */
html, body {
  color: var(--ft-text);
}

/* Ancho de lectura un poco más cómodo */
main article {
  max-width: var(--ft-maxw);
}

/* =========================================
   1) Oculta el H1 automático del tema en móvil
   ========================================= */
@media screen and (max-width: 768px) {
  main article header h1 {
    display: none;
  }
}

/* =========================================
   2) Tu título manual sólo en escritorio
   ========================================= */
.only-desktop {
  display: block;
  font-size: 2.5rem;
  margin: 1rem 0;
  font-weight: 700;
  line-height: 1.1;
}
@media screen and (max-width: 768px) {
  .only-desktop { display: none; }
}

/* =========================================
   3) Estilo para tus citas en bloque
   ========================================= */
blockquote {
  border-left: 4px solid var(--ft-border);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ft-muted);
}

/* =========================================
   4) Color de prueba (útil para debug)
   ========================================= */
/* body { background-color: limegreen !important; } */

/* =========================================
   5) Botón fijo de Home en móvil
   - Respeta áreas seguras (notch)
   - Usa currentColor para heredar color del tema
   ========================================= */
.home-button {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  left: calc(1rem + env(safe-area-inset-left, 0px));
  z-index: 1001;              /* por encima del contenido */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem;
  background: transparent;
  color: inherit;             /* hereda del tema (claro/oscuro) */
  border-radius: .5rem;
  transition: background-color .15s ease;
}
.home-button:hover { background: rgba(127,127,127,.12); }
.home-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Icono: usa currentColor para no fijar negro/blanco */
.home-button .home-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: currentColor;
}

/* Solo en escritorio ocultamos el botón */
@media screen and (min-width: 769px) {
  .home-button { display: none; }
}

/* =========================================
   6) Pequeños detalles tipográficos opcionales
   ========================================= */
main article p { line-height: 1.65; }
main article h2, main article h3 { line-height: 1.25; margin-top: 2rem; }

/* Que las anclas no queden escondidas bajo el header fijo */
.markdown [id] { scroll-margin-top: 80px; }  /* ajusta 64–96px según veas */

.libro img {
  width: 300px;      /* ancho fijo */
  height: 450px;     /* alto fijo */
  object-fit: cover; /* recorta manteniendo proporción */
  display: block;
  margin-bottom: .5rem;
}

.book-menu a[href="/fuentes/"] {
  border-top: 1px solid var(--ft-border);
  padding-top: .5rem;
  margin-top: .5rem;
  display: block;
}

