/* ===== Brújula IA · Hoja de estilos del blog ===== */

:root {
  --ink: #15212e;
  --ink-soft: #44566b;
  --ink-faint: #6b7c8f;
  --paper: #fbfaf7;
  --paper-2: #f3f0e9;
  --line: #e4ded3;
  --brand: #0f6e6e;
  --brand-deep: #0a4f54;
  --brand-soft: #e3f1ef;
  --accent: #b8541d;
  --accent-deep: #8f3f14;
  --accent-soft: #f8e9df;
  --white: #ffffff;
  --shadow: 0 14px 50px -22px rgba(15, 33, 46, 0.30);
  --shadow-sm: 0 4px 18px -10px rgba(15, 33, 46, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1140px;
  --readw: 720px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.01em; }
a { color: var(--brand-deep); }
img { max-width: 100%; display: block; }

/* ===== Iconos SVG ===== */
.icon {
  width: 1.05em; height: 1.05em;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.16em;
  flex-shrink: 0;
}

/* ===== Barra de progreso de lectura ===== */
.reading-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  z-index: 100;
  transition: width 0.1s linear;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 1.15rem;
}
.brand .icon { width: 1.5rem; height: 1.5rem; color: var(--brand); stroke-width: 1.8; }
.brand-text strong { color: var(--brand); }
.nav-links {
  list-style: none; display: flex; align-items: center; gap: 1.4rem;
  margin: 0; padding: 0;
}
.nav-links a {
  text-decoration: none; color: var(--ink-soft);
  font-size: 0.95rem; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--brand); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--brand); color: var(--white) !important;
  padding: 0.5rem 1rem; border-radius: 999px; font-weight: 600 !important;
}
.nav-cta:hover { background: var(--brand-deep); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.3s; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: 0.8rem 1.5rem; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { background: var(--white); color: var(--brand-deep); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-lg { font-size: 1.08rem; padding: 0.95rem 1.9rem; }

/* ===== Hero del blog (home) ===== */
.blog-hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 80% -10%, var(--brand-soft) 0%, transparent 60%),
    radial-gradient(900px 480px at 6% 0%, var(--accent-soft) 0%, transparent 55%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.blog-hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 4.5rem 1.5rem 3.8rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.78rem; font-weight: 600; color: var(--brand); margin: 0 0 1rem;
}
.blog-hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.5rem); margin: 0 0 1.1rem;
  max-width: 18ch; color: var(--ink);
}
.blog-hero p {
  font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--ink-soft);
  max-width: 58ch; margin: 0;
}

/* ===== Sección genérica ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 4.2rem 1.5rem; scroll-margin-top: 80px; }
.section-head { margin-bottom: 2.4rem; }
.section-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 0 0 0.5rem;
}
.section-head p { color: var(--ink-soft); font-size: 1.05rem; max-width: 60ch; margin: 0; }

/* ===== Tarjetas de entradas (blog) ===== */
.posts-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem;
}
.post-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.post-card-cover { aspect-ratio: 16 / 9; }
.post-card-body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.post-card-title {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.5rem; line-height: 1.22; margin: 0.7rem 0 0.6rem; color: var(--ink);
}
.post-card:hover .post-card-title { color: var(--brand-deep); }
.post-card-excerpt { color: var(--ink-soft); font-size: 1rem; margin: 0 0 1.3rem; flex: 1; }
.post-card-more {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; color: var(--brand); font-size: 0.98rem;
}
.post-card:hover .post-card-more .icon { transform: translateX(3px); }
.post-card-more .icon { transition: transform 0.2s ease; }

/* Metadatos y etiqueta de categoría */
.post-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1rem; }
.cat-badge {
  display: inline-block; font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem; border-radius: 999px;
}
.cat-etica { background: var(--brand-soft); color: var(--brand-deep); }
.cat-carrera { background: var(--accent-soft); color: var(--accent-deep); }
.meta-bits { display: inline-flex; align-items: center; gap: 0.9rem; color: var(--ink-faint); font-size: 0.86rem; }
.meta-bits span { display: inline-flex; align-items: center; gap: 0.32rem; }

/* ===== Portadas temáticas (sin fotos: respaldo visual) ===== */
.cover { position: relative; overflow: hidden; background-color: var(--brand-deep); }
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.cover::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background-image: radial-gradient(rgba(255,255,255,0.16) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.cover-mark {
  position: absolute; z-index: 1; right: 1.1rem; bottom: 0.9rem;
  color: rgba(255,255,255,0.85); opacity: 0.9;
}
.cover-mark .icon { width: 2.6rem; height: 2.6rem; stroke-width: 1.4; }
.cover--etica { background: linear-gradient(135deg, #0a4f54 0%, #0f6e6e 55%, #14868a 100%); }
.cover--carrera { background: linear-gradient(135deg, #8f3f14 0%, #b8541d 50%, #d98a3d 100%); }

/* ===== Página de artículo ===== */
.post-hero {
  background:
    radial-gradient(900px 420px at 85% -20%, var(--brand-soft) 0%, transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.post-hero.carrera {
  background:
    radial-gradient(900px 420px at 85% -20%, var(--accent-soft) 0%, transparent 60%),
    var(--paper);
}
.post-hero-inner { max-width: var(--readw); margin: 0 auto; padding: 2.2rem 1.5rem 2.6rem; }
.post-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  text-decoration: none; color: var(--ink-faint); font-weight: 500; font-size: 0.92rem;
  margin-bottom: 1.6rem;
}
.post-back:hover { color: var(--brand); }
.post-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.1rem); margin: 0.8rem 0 0.7rem; color: var(--ink);
}
.post-subtitle { font-size: 1.2rem; color: var(--ink-soft); font-style: italic; margin: 0 0 1.5rem; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.post-author { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.95rem; color: var(--ink); }
.post-author .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: var(--white);
  display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; font-family: var(--serif);
}
.post-hero.carrera .post-author .avatar { background: var(--accent); }

/* Banner de portada del artículo */
.post-banner { max-width: 1000px; margin: 0 auto; padding: 2rem 1.5rem 0; }
.post-banner .cover { border-radius: var(--radius); aspect-ratio: 21 / 8; box-shadow: var(--shadow-sm); }
.post-banner .cover-caption { margin: 0.6rem 0 0; font-size: 0.84rem; color: var(--ink-faint); text-align: center; font-style: italic; }

/* Cuerpo del artículo */
.post-body {
  max-width: var(--readw); margin: 0 auto; padding: 2.6rem 1.5rem 1rem;
  font-family: var(--serif); font-size: 1.18rem; line-height: 1.78; color: #233241;
}
.post-body .lede { font-size: 1.3rem; line-height: 1.6; color: var(--ink); font-weight: 500; }
.post-body h3 {
  font-family: var(--sans); font-weight: 700; font-size: 1.35rem; color: var(--ink);
  margin: 2.6rem 0 0.8rem; letter-spacing: -0.01em;
}
.post-body p { margin: 0 0 1.3rem; }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body .ol-clean { margin: 1.4rem 0 1.8rem; padding-left: 1.3rem; }
.post-body .ol-clean li { margin-bottom: 0.9rem; }
.post-body blockquote {
  margin: 1.8rem 0; padding: 0.4rem 0 0.4rem 1.4rem;
  border-left: 4px solid var(--brand); color: var(--ink); font-style: italic; font-size: 1.22rem;
}
blockquote.accent { border-left-color: var(--accent); }
.article-close { margin-top: 2.5rem; font-style: italic; color: var(--ink-faint); text-align: right; }

/* Tarjetas de principios / claves dentro del artículo */
.feature-block { max-width: 1000px; margin: 2.5rem auto; padding: 0 1.5rem; }
.feature-block h3.fb-title {
  font-family: var(--sans); font-weight: 700; font-size: 1.35rem;
  text-align: center; margin: 0 0 0.4rem;
}
.feature-block p.fb-sub { text-align: center; color: var(--ink-soft); margin: 0 auto 2rem; max-width: 52ch; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem;
  box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--brand-soft); color: var(--brand-deep); margin-bottom: 0.9rem;
}
.card-icon .icon { width: 1.45rem; height: 1.45rem; }
.feature-block.carrera .card-icon { background: var(--accent-soft); color: var(--accent-deep); }
.feature-block.carrera .stat-num { color: var(--accent); }
.card h4 { font-family: var(--sans); font-size: 1.12rem; margin: 0 0 0.4rem; color: var(--ink); }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.6; }

/* Bloque de tres columnas (rutas) */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.col-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.col-box h4 {
  font-family: var(--serif); font-size: 1.3rem; margin: 0 0 0.9rem; color: var(--brand-deep);
  padding-bottom: 0.6rem; border-bottom: 2px solid var(--brand-soft);
}
.col-box ul { margin: 0; padding-left: 1.1rem; }
.col-box li { margin-bottom: 0.6rem; color: var(--ink-soft); }
.col-box.carrera h4 { color: var(--accent-deep); border-bottom-color: var(--accent-soft); }

/* CTA de descarga */
.post-download { background: var(--brand-deep); color: var(--white); padding: 3.4rem 1.5rem; text-align: center; margin-top: 3rem; }
.post-hero.carrera ~ * .post-download, .post-download.carrera { background: var(--accent-deep); }
.post-download .inner { max-width: 640px; margin: 0 auto; }
.post-download h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 0.7rem; }
.post-download p { color: rgba(255,255,255,0.85); margin: 0 0 1.6rem; font-size: 1.05rem; }
.post-download .btn-primary { background: var(--white); color: var(--brand-deep); }
.post-download.carrera .btn-primary { color: var(--accent-deep); }

/* Navegación entre artículos */
.post-nav { max-width: 1000px; margin: 3rem auto; padding: 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.post-nav a {
  display: block; text-decoration: none; padding: 1.4rem 1.5rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.post-nav a:hover { border-color: var(--brand); transform: translateY(-3px); }
.post-nav .dir { font-size: 0.82rem; color: var(--ink-faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; display: inline-flex; align-items: center; gap: 0.35rem; }
.post-nav .pt { font-family: var(--serif); font-size: 1.12rem; color: var(--ink); margin-top: 0.4rem; line-height: 1.25; }
.post-nav .next { text-align: right; }
.post-nav .next .dir { justify-content: flex-end; }

/* ===== Stats (panorama dentro de artículo) ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.3rem; box-shadow: var(--shadow-sm); }
.stat-num { font-family: var(--serif); font-weight: 700; font-size: 2.4rem; color: var(--brand); line-height: 1; display: block; margin-bottom: 0.6rem; }
.stat-label { font-size: 0.92rem; color: var(--ink-soft); }

/* ===== Autor ===== */
.author-card {
  max-width: var(--readw); margin: 0 auto;
  background: linear-gradient(135deg, var(--brand-soft), var(--white));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.1rem; display: flex; gap: 1.5rem; align-items: flex-start; box-shadow: var(--shadow-sm);
}
.author-avatar { flex-shrink: 0; width: 60px; height: 60px; border-radius: 50%; background: var(--brand); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; font-family: var(--serif); }
.author-info h3 { font-size: 1.25rem; margin: 0 0 0.6rem; }
.author-info p { margin: 0 0 0.6rem; color: var(--ink-soft); }
.author-contact { font-size: 0.9rem; font-style: italic; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.72); padding: 2.8rem 1.5rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.15rem; font-weight: 600; color: var(--white); margin: 0 0 0.5rem; }
.footer-brand .icon { width: 1.3rem; height: 1.3rem; }
.site-footer p { margin: 0 0 0.4rem; font-size: 0.95rem; }
.footer-credit { font-size: 0.85rem !important; color: rgba(255,255,255,0.5); margin-top: 0.8rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards, .cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.5rem 1.2rem; max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 460px; }
  .nav-links li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .nav-cta { justify-content: center; margin-top: 0.6rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .stats, .cards, .cols-3 { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .post-nav .next .dir { justify-content: flex-start; }
  .author-card { flex-direction: column; align-items: center; text-align: center; }
  .post-body { font-size: 1.1rem; }
  .post-body .lede { font-size: 1.18rem; }
}
