﻿/* Estilos del blog de Martín Sgattoni */
:root {
  --ink: #1a1430;
  --ink-soft: #5a4f72;
  --paper: #f5f3eb;
  --paper-2: #ebe8df;
  --accent: #6b3fa0;
  --accent-2: #1aabb8;
  --line: rgba(26, 20, 48, 0.12);
  --shadow: 0 18px 40px rgba(26, 20, 48, 0.09);
  --radius: 2px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: "Trebuchet MS", "Lucida Grande", "Segoe UI", sans-serif;
  --max: 1120px;
  --estrecho: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  min-height: 100vh;
}

.atmosfera {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 8% -10%, rgba(107, 63, 160, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 5%, rgba(26, 171, 184, 0.07), transparent 50%),
    linear-gradient(180deg, #f7f5ef 0%, var(--paper) 42%, #ece9e0 100%);
}

.atmosfera::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.contenedor {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.contenedor.estrecho {
  width: min(100% - 2rem, var(--estrecho));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-2);
}

/* Header */
.sitio-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(245, 243, 235, 0.9);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.marca {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.marca-nombre {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.marca-tag {
  font-size: 0.75rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-principal {
  display: flex;
  gap: 1.25rem;
}

.nav-principal a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-principal a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 40rem;
  animation: entrar 0.8s ease both;
}

/* Hero del inicio: foto + texto */
.hero-inicio .hero-inner.hero-con-foto {
  max-width: none;
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.hero-foto {
  flex: 0 0 auto;
  width: min(280px, 38vw);
}

.hero-foto img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center top;
}

.hero-texto {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 36rem;
}

@media (max-width: 700px) {
  .hero-inicio .hero-inner.hero-con-foto {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-foto {
    width: min(220px, 70vw);
  }
}

.hero-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.hero-marca {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero-lead {
  margin: 1.1rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34rem;
}

.hero-meta {
  margin: 1.4rem 0 0;
  font-size: 0.9rem;
  color: var(--accent-2);
  font-weight: 600;
}

/* Listado */
.listado {
  padding: 2.5rem 0 4rem;
}

.buscador-wrap {
  margin-bottom: 1.75rem;
}

#buscar {
  width: 100%;
  max-width: 28rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#buscar:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.18);
}

.grilla-articulos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .grilla-articulos {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1000px) {
  .grilla-articulos {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.tarjeta-articulo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  animation: entrar 0.6s ease both;
  animation-delay: calc(var(--i, 0) * 0.04s);
}

.tarjeta-articulo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(107, 63, 160, 0.4);
  color: inherit;
}

.tarjeta-media {
  height: 140px;
  background-color: #c5b8d9;
  overflow: hidden;
  position: relative;
}

.tarjeta-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tarjeta-media.sin-imagen {
  background:
    linear-gradient(135deg, rgba(107, 63, 160, 0.4), rgba(26, 171, 184, 0.28)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 8px,
      rgba(26, 20, 48, 0.05) 8px,
      rgba(26, 20, 48, 0.05) 16px
    );
}

.tarjeta-cuerpo {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.55rem;
}

.tarjeta-cuerpo h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.tarjeta-cuerpo p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.leer-mas {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.35rem;
}

.sin-resultados {
  text-align: center;
  color: var(--ink-soft);
  padding: 2rem;
}

/* Artículo */
.articulo-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.volver {
  display: inline-block;
  margin-bottom: 1rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.articulo-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.articulo-meta {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.articulo-cuerpo {
  padding: 2rem 0 3rem;
  font-size: 1.05rem;
}

.articulo-cuerpo h1,
.articulo-cuerpo h2,
.articulo-cuerpo h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-top: 2rem;
}

.articulo-cuerpo h1 {
  font-size: 1.55rem;
}

.articulo-cuerpo h2 {
  font-size: 1.35rem;
}

.articulo-cuerpo h3 {
  font-size: 1.15rem;
}

.articulo-cuerpo p,
.articulo-cuerpo li {
  color: var(--ink);
}

.articulo-cuerpo img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.25rem auto;
  border-radius: var(--radius);
}

/* Videos de YouTube embebidos */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.25rem 0;
  border-radius: var(--radius);
  background: #1a1430;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-fallback {
  margin: 0.35rem 0 1.25rem;
  font-size: 0.9rem;
  text-align: center;
}

.articulo-cuerpo figure {
  margin: 1.5rem 0;
}

.articulo-cuerpo blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: rgba(107, 63, 160, 0.07);
  font-style: italic;
}

.articulo-cuerpo table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.25rem 0;
}

.articulo-cuerpo th,
.articulo-cuerpo td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  vertical-align: top;
}

.articulo-cuerpo ul,
.articulo-cuerpo ol {
  padding-left: 1.25rem;
}

.nav-articulos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--line);
}

.nav-articulos a {
  text-decoration: none;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.4);
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.nav-articulos a:hover {
  border-color: var(--accent);
  background: rgba(107, 63, 160, 0.07);
  color: inherit;
}

.nav-articulos span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.nav-articulos strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-next {
  text-align: right;
  justify-self: end;
}

@media (max-width: 600px) {
  .nav-articulos {
    grid-template-columns: 1fr;
  }

  .nav-next {
    text-align: left;
    justify-self: stretch;
  }
}

/* Footer */
.sitio-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 2.5rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
}

.sitio-footer p {
  margin: 0;
}

.sitio-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.sitio-footer a:hover {
  color: var(--accent);
}

.footer-mail {
  margin: 0;
}

.footer-mail a {
  font: inherit;
  font-weight: 600;
  font-size: inherit;
}

/* Página Quién soy */
.pagina-perfil {
  padding-bottom: 2rem;
}

.pagina-perfil .articulo-cuerpo {
  padding-top: 1.5rem;
}

.perfil-cta {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-cta {
  margin-top: 1.5rem;
}

.boton {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius);
  transition: background 0.2s ease, transform 0.2s ease;
}

.boton:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
}

.boton-secundario {
  background: transparent;
  color: var(--accent) !important;
  border: 2px solid var(--accent);
}

.boton-secundario:hover {
  background: var(--accent);
  color: #fff !important;
}

.nav-principal a[aria-current="page"] {
  color: var(--accent);
}

/* Novedades (inicio) */
.seccion-novedades,
.seccion-cursos {
  padding: 2.5rem 0 4rem;
}

.seccion-cabecera {
  margin-bottom: 1.75rem;
  max-width: 36rem;
}

.seccion-cabecera h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.seccion-cabecera p {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
}

.lista-novedades {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.lista-novedades li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  animation: entrar 0.55s ease both;
}

.lista-novedades time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.lista-novedades h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 700;
}

.lista-novedades h3 a {
  color: inherit;
  text-decoration: none;
}

.lista-novedades h3 a:hover {
  color: var(--accent);
}

.lista-novedades p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .lista-novedades li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* Cursos */
.grilla-cursos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 720px) {
  .grilla-cursos {
    grid-template-columns: 1fr 1fr;
  }
}

.tarjeta-curso {
  padding: 1.25rem 1.35rem 1.4rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tarjeta-curso:hover {
  border-color: rgba(107, 63, 160, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.tarjeta-curso h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.tarjeta-curso p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.tarjeta-curso .curso-meta {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.02em;
}

.nav-principal {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@keyframes entrar {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
