/* ==========================================================================
   Landing pública: tokens visuales, layout editorial y módulos interactivos
   --------------------------------------------------------------------------
   Mapa rápido del archivo:
   1. Tipografías y design tokens
   2. Reset / base del documento
   3. Header y hero principal
   4. Secciones de trayectoria, cursos, skills, blog y contacto
   5. Blog index + detalle de artículo
   6. Chat público y widget flotante
   7. Breakpoints responsive
   ========================================================================== */

@font-face {
  font-family: "Baloo";
  src: url("../fonts/Baloo-Regular.7ea5a2778c10.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Parkinsans";
  src: url("../fonts/Parkinsans-Light.4d320fa7c28d.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Parkinsans";
  src: url("../fonts/Parkinsans-Regular.54749bf724bf.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Parkinsans";
  src: url("../fonts/Parkinsans-SemiBold.207687c4d64c.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Parkinsans";
  src: url("../fonts/Parkinsans-Bold.8ad9f17b4fdc.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --bg: #0d1012;
  --bg-soft: rgba(22, 24, 28, 0.86);
  --panel: rgba(24, 26, 30, 0.78);
  --panel-strong: rgba(16, 18, 21, 0.94);
  --line: rgba(154, 255, 112, 0.16);
  --line-strong: rgba(159, 255, 112, 0.28);
  --text: #f4f4ec;
  --muted: #b6c0b8;
  --accent: #9fff70;
  --accent-strong: #56f09d;
  --accent-warm: #ffbf69;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1220px;
}

/* --------------------------------------------------------------------------
   Reset y base global
   -------------------------------------------------------------------------- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Parkinsans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 88, 88, 0.24), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(90, 255, 180, 0.16), transparent 22%),
    radial-gradient(circle at 78% 78%, rgba(0, 197, 255, 0.13), transparent 24%),
    radial-gradient(circle at 22% 82%, rgba(159, 255, 112, 0.14), transparent 26%),
    linear-gradient(155deg, #060909 0%, #0a1210 34%, #10161a 68%, #0a1016 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(70px);
}

body::before {
  top: 3rem;
  left: -3rem;
  width: 20rem;
  height: 20rem;
  background: rgba(255, 82, 82, 0.18);
}

body::after {
  right: -4rem;
  bottom: 6rem;
  width: 24rem;
  height: 24rem;
  background: rgba(0, 197, 255, 0.11);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

main section[id],
header[id] {
  scroll-margin-top: 6rem;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.surface {
  background: linear-gradient(180deg, rgba(28, 31, 35, 0.9), rgba(18, 20, 24, 0.88));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

/* --------------------------------------------------------------------------
   Header sticky y navegación principal
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(7, 12, 11, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: inline-flex;
}

.brand-logo {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  /* object-fit: cover; */
  /* border: 1px solid rgba(255, 255, 255, 0.08); */
  /* border:1px solid red; */
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
}

.logo-badge {
  position: absolute;
  right: -8px;
  bottom: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #07120e;
  border: 2px solid #09110f;
  box-shadow: 0 10px 24px rgba(86, 240, 157, 0.22);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-copy strong {
  font-family: "Baloo", sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.brand-name {
  color: rgba(244, 244, 236, 0.58);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.brand-divider {
  display: inline-block;
  margin: 0 0.4rem;
  color: rgba(244, 244, 236, 0.34);
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.88rem;
}

.brand-summary {
  color: var(--accent);
  font-size: 0.82rem;
  line-height: 1.35;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  color: var(--muted);
  transition: 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background: rgba(159, 255, 112, 0.1);
}

.nav-cta {
  border: 1px solid rgba(159, 255, 112, 0.24);
}

.menu-toggle {
  display: none;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 16px;
  background: rgba(159, 255, 112, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 6px auto;
  background: var(--text);
  border-radius: 999px;
}

main {
  display: grid;
  gap: 1.4rem;
}

/* --------------------------------------------------------------------------
   Hero de apertura: marca, promesa y capacidades visibles al entrar
   -------------------------------------------------------------------------- */

.hero {
  display: block;
}

.hero-panel,
.section-card,
.journey-section,
.courses-section,
.blog-section,
.contact-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.eyebrow,
.section-tag,
.blog-meta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(159, 255, 112, 0.08);
  border: 1px solid rgba(159, 255, 112, 0.14);
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.contact-card h2 {
  font-family: "Baloo", sans-serif;
  font-weight: 400;
  line-height: 0.98;
}

.hero h1 {
  margin-top: 1rem;
  font-size: clamp(2.8rem, 5vw, 5.1rem);
  max-width: 15.2ch;
}

.hero-description,
.section-heading p,
.timeline-body p,
.skill-card p,
.blog-body p,
.contact-card p,
.course-intro {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1rem;
}

.hero-description {
  max-width: 60ch;
  margin-top: 1.15rem;
}

.hero-panel {
  position: relative;
  padding: 2.8rem;
  animation: heroEntry 1.1s cubic-bezier(0.18, 0.8, 0.22, 1) both;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 18%, rgba(159, 255, 112, 0.12), transparent 25%),
    radial-gradient(circle at 18% 85%, rgba(255, 191, 105, 0.08), transparent 24%);
  pointer-events: none;
}

.hero-panel::after {
  content: "";
  position: absolute;
  top: -12%;
  left: -4%;
  width: 460px;
  height: 260px;
  background:
    linear-gradient(135deg, rgba(255, 82, 82, 0.24), rgba(255, 82, 82, 0) 68%),
    radial-gradient(circle at 36% 72%, rgba(255, 164, 120, 0.18), transparent 18%),
    radial-gradient(circle at 44% 78%, rgba(255, 244, 214, 0.12), transparent 12%),
    radial-gradient(circle at 52% 82%, rgba(255, 82, 82, 0.16), transparent 15%);
  filter: blur(24px);
  opacity: 0;
  transform: rotate(-18deg);
  pointer-events: none;
  animation: heroTrailDust 1.15s ease-out 0.04s both;
}

.hero-top,
.hero-capabilities,
.hero-actions {
  position: relative;
  z-index: 1;
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
  gap: 2rem;
  align-items: stretch;
}

.hero-intro {
  max-width: 60rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
  position: relative;
  z-index: 1;
  animation: heroContentReveal 0.9s ease-out 0.2s both;
}

.hero-intro-copy {
  display: grid;
}

.hero-side-cards {
  display: grid;
  gap: 1rem;
  position: relative;
  z-index: 1;
  animation: heroContentReveal 0.9s ease-out 0.32s both;
}

.hero-side-card,
.hero-capability-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.14);
}

.hero-side-card {
  padding: 1rem 1.1rem;
}

.hero-side-card span {
  display: block;
  color: var(--accent-warm);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-side-card strong {
  display: block;
  margin-top: 0.4rem;
  line-height: 1.34;
  font-size: 1rem;
}

.hero-side-card small {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  line-height: 1.45;
}

.hero-meteor {
  position: absolute;
  top: 41%;
  left: 52%;
  width: clamp(170px, 19vw, 250px);
  transform: translate(-50%, -50%) rotate(-14deg);
  opacity: 0.88;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.22));
  animation: heroMeteorDrop 1.15s cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.hero-stack-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero-stack-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.96rem;
}

.hero-stack-row i {
  color: var(--accent);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.hero-actions {
  animation: heroContentReveal 0.9s ease-out 0.44s both;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04110c;
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.hero-capabilities {
  position: relative;
  z-index: 1;
  margin-top: 1.7rem;
  animation: heroContentReveal 0.9s ease-out 0.56s both;
}

.hero-capabilities-helper {
  margin-bottom: 0.9rem;
  color: rgba(182, 192, 184, 0.86);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

@keyframes heroEntry {
  0% {
    opacity: 0;
    transform: translate3d(-112px, -72px, 0) rotate(3deg) scale(0.965);
  }
  48% {
    opacity: 1;
    transform: translate3d(20px, 14px, 0) rotate(-0.8deg) scale(1.018);
  }
  72% {
    opacity: 1;
    transform: translate3d(-10px, -4px, 0) rotate(0.3deg) scale(0.997);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
}

@keyframes heroTrailDust {
  0% {
    opacity: 0;
    transform: translate3d(-120px, -72px, 0) rotate(-22deg) scale(0.76);
  }
  20% {
    opacity: 0.95;
  }
  62% {
    opacity: 0.82;
    transform: translate3d(32px, 30px, 0) rotate(-8deg) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate3d(72px, 44px, 0) rotate(-4deg) scale(1.14);
  }
}

@keyframes heroMeteorDrop {
  0% {
    opacity: 0;
    transform: translate(-122%, -108%) rotate(22deg) scale(0.62);
    filter: blur(12px) drop-shadow(0 34px 42px rgba(255, 82, 82, 0.24));
  }
  54% {
    opacity: 0.98;
    transform: translate(-44%, -36%) rotate(-20deg) scale(1.1);
    filter: blur(0) drop-shadow(0 28px 34px rgba(255, 82, 82, 0.16));
  }
  74% {
    opacity: 0.92;
    transform: translate(-54%, -54%) rotate(-12deg) scale(0.96);
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.26));
  }
  100% {
    opacity: 0.88;
    transform: translate(-50%, -50%) rotate(-14deg) scale(1);
    filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.22));
  }
}

@keyframes heroContentReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* --------------------------------------------------------------------------
   Tarjetas y bloques compartidos entre secciones
   -------------------------------------------------------------------------- */

.mini-card,
.nested-card,
.skill-card,
.blog-card,
.course-card,
.hero-capability-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.mini-card,
.course-card,
.hero-capability-card {
  padding: 1rem;
}

.nested-card:hover,
.skill-card:hover,
.blog-card:hover,
.timeline-card:hover,
.course-card:hover,
.hero-capability-card:hover,
.mini-card:hover {
  transform: translateY(-4px);
  border-color: rgba(159, 255, 112, 0.2);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.18);
}

.mini-card strong,
.skill-card h3,
.timeline-body h3,
.blog-body h3,
.course-card strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.mini-card span,
.timeline-company,
.course-card-head span {
  color: var(--muted);
}

.hero-capability-card {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 86px;
}

.hero-capability-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(159, 255, 112, 0.1);
  color: var(--accent);
}

.hero-capability-card strong {
  font-size: 1.02rem;
}
.contact-card h2,
.section-heading h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 1rem 0;
}

.journey-section,
.courses-section,
.blog-section {
  padding: 2.2rem;
}

.section-heading {
  max-width: 60rem;
}

.timeline {
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
}

/* --------------------------------------------------------------------------
   Trayectoria / experiencia profesional
   -------------------------------------------------------------------------- */

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), rgba(86, 240, 157, 0.12));
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.timeline-meta img {
  width: 140px;
  max-height: 64px;
  object-fit: contain;
  padding: 0.65rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.timeline-meta span {
  color: var(--accent-warm);
  font-size: 0.95rem;
}

.timeline-company {
  margin-bottom: 0.7rem;
}

.timeline-functions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
  padding-left: 0;
  list-style: none;
}

.timeline-functions li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.6;
}

.timeline-functions li::before {
  content: "";
  position: absolute;
  top: 0.72rem;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(159, 255, 112, 0.28);
}

.timeline-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.tooltip-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.9rem;
  cursor: default;
}

.tooltip-chip i {
  color: var(--accent);
}

.tooltip-chip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(280px, 70vw);
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  background: rgba(6, 11, 10, 0.94);
  border: 1px solid rgba(159, 255, 112, 0.15);
  color: var(--muted);
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.25);
}

.tooltip-chip:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.pill-group span {
  padding: 0.52rem 0.84rem;
  border-radius: 999px;
  background: rgba(159, 255, 112, 0.08);
  border: 1px solid rgba(159, 255, 112, 0.13);
  color: var(--text);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Cursos y aprendizaje continuo
   -------------------------------------------------------------------------- */

.text-link {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--accent);
}

.course-wall {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 290px);
  gap: 1rem;
}

.course-carousel {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.course-carousel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.course-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.course-nav:hover {
  transform: translateY(-2px);
  background: rgba(159, 255, 112, 0.1);
  border-color: rgba(159, 255, 112, 0.18);
}

.course-track {
  overflow-x: auto;
  padding-bottom: 0.45rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(159, 255, 112, 0.3) rgba(255, 255, 255, 0.04);
  scroll-snap-type: x proximity;
}

.course-track::-webkit-scrollbar {
  height: 10px;
}

.course-track::-webkit-scrollbar-thumb {
  background: rgba(159, 255, 112, 0.24);
  border-radius: 999px;
}

.course-track::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.course-card {
  display: grid;
  gap: 0.7rem;
  min-height: 190px;
  scroll-snap-align: start;
}

.course-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.course-card-head img {
  width: 52px;
  height: 52px;
  padding: 0.45rem;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.94);
}

.course-card strong {
  line-height: 1.38;
}

.course-link {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Skills y capacidades técnicas destacadas
   -------------------------------------------------------------------------- */

.skills-section {
  margin-top: 1.4rem;
}

.skills-shell {
  display: grid;
  gap: 1.4rem;
  padding: 2.2rem;
}

.skills-header {
  max-width: 62rem;
}

.skills-header h2 {
  margin-top: 0.8rem;
  font-family: "Baloo", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.04;
}

.skills-header p {
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.skill-card {
  padding: 1.5rem;
}

.skill-card-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.9rem;
  align-items: start;
}

.skill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(159, 255, 112, 0.16), rgba(86, 240, 157, 0.08));
  color: var(--accent);
  font-size: 1.3rem;
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.tech-icons span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.tech-icons i {
  color: var(--accent);
}

.skill-meter {
  width: 100%;
  height: 10px;
  margin-top: 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.skill-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 22px rgba(86, 240, 157, 0.24);
}

.accent-card {
  background:
    radial-gradient(circle at top right, rgba(255, 191, 105, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(19, 31, 28, 0.96), rgba(10, 17, 16, 0.96));
}

.highlight-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.highlight-metrics div {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.highlight-metrics strong {
  display: block;
  font-family: "Baloo", sans-serif;
  font-size: 1.8rem;
  color: var(--accent);
}

.highlight-metrics span {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Blog cards de la landing y bloque de contacto
   -------------------------------------------------------------------------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.blog-section-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.blog-card {
  overflow: hidden;
}

.blog-cover {
  min-height: 210px;
  background: linear-gradient(135deg, rgba(159, 255, 112, 0.18), rgba(86, 240, 157, 0.12));
}

.blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-cover-alt,
.blog-cover-code {
  display: grid;
  place-items: center;
  color: var(--text);
  font-family: "Baloo", sans-serif;
  font-size: 2rem;
}

.blog-cover-alt {
  background:
    radial-gradient(circle at top left, rgba(255, 191, 105, 0.3), transparent 38%),
    linear-gradient(145deg, #17221f, #0f1715);
}

.blog-cover-code {
  background:
    linear-gradient(135deg, rgba(86, 240, 157, 0.18), rgba(7, 12, 11, 0.2)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 18px
    );
}

.blog-body {
  display: grid;
  gap: 0.75rem;
  padding: 1.4rem;
}

.blog-body h3 {
  line-height: 1.3;
}

.blog-date {
  color: var(--accent-warm);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.contact-card {
  display: grid;
  gap: 1.3rem;
  padding: 2.2rem;
}

.contact-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.contact-actions {
  margin-top: 0;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  transition: transform 180ms ease, background 180ms ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  background: rgba(159, 255, 112, 0.12);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 0.6rem 0.3rem;
  color: var(--muted);
}

.footer-top {
  border: 1px solid rgba(159, 255, 112, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.footer-top:hover {
  transform: translateY(-2px);
  background: rgba(159, 255, 112, 0.08);
}

/* --------------------------------------------------------------------------
   Listado de artículos y detalle editorial
   -------------------------------------------------------------------------- */

.articles-page,
.article-page {
  display: grid;
  gap: 1.4rem;
}

.articles-hero,
.article-hero,
.article-layout,
.article-related {
  border-radius: var(--radius-xl);
}

.articles-hero,
.article-hero {
  padding: 2.3rem;
}

.article-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 1.2rem;
  align-items: stretch;
}

.article-hero-copy {
  display: grid;
  align-content: start;
}

.articles-hero h1 {
  margin-top: 1rem;
  font-family: "Baloo", sans-serif;
  font-weight: 400;
  line-height: 1.04;
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 28ch;
}

.article-hero h1 {
  margin-top: 1rem;
  font-family: "Baloo", sans-serif;
  font-weight: 400;
  line-height: 1.06;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  max-width: 24ch;
}

.articles-hero p,
.article-hero p,
.article-aside p,
.article-prose p,
.article-prose li {
  color: var(--muted);
  line-height: 1.78;
}

.article-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.articles-hero p,
.article-hero p {
  max-width: 76ch;
}

.article-engagement {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
}

.engagement-pill,
.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.reaction-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.reaction-pill small {
  color: var(--muted);
}

.article-share-row {
  margin-top: 0.6rem;
}

.article-share-trigger {
  min-height: 38px;
}

.article-share-modal[hidden] {
  display: none;
}

.article-share-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.article-share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 11, 0.72);
  backdrop-filter: blur(8px);
}

.article-share-card {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 28px;
}

.article-share-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.article-share-head h2 {
  margin-top: 0.55rem;
  font-size: 1.18rem;
  line-height: 1.15;
}

.article-share-head p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.article-share-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.article-share-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.article-share-option {
  min-height: 54px;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.article-share-option:hover,
.article-share-copy-button:hover,
.article-share-close:hover {
  transform: translateY(-1px);
  background: rgba(159, 255, 112, 0.08);
  border-color: rgba(159, 255, 112, 0.18);
}

.article-share-option i {
  color: var(--accent);
}

.article-share-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.article-share-copy--text {
  align-items: start;
}

.article-share-copy-shell {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.article-share-copy-shell span {
  color: var(--muted);
  font-size: 0.78rem;
}

.article-share-copy-shell strong {
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.article-share-copy-button {
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.article-share-feedback {
  color: var(--accent);
  font-size: 0.8rem;
}

.articles-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: center;
}

.article-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.mode-chip {
  min-height: 40px;
  padding: 0.62rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.mode-chip:hover,
.mode-chip.is-active {
  transform: translateY(-2px);
  color: var(--text);
  background: rgba(159, 255, 112, 0.08);
  border-color: rgba(159, 255, 112, 0.18);
}

.article-view-helper {
  max-width: 68ch;
  margin-top: 0.9rem;
  font-size: 0.98rem;
}

/* Buscador y explorador entre vista por artículos y vista por series. */
.search-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 58px;
  padding: 0 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-shell i {
  color: var(--accent);
}

.search-shell input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.search-shell input::placeholder {
  color: rgba(182, 192, 184, 0.72);
}

.articles-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.article-card {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(159, 255, 112, 0.2);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.18);
}

.series-card {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.series-card:hover {
  transform: translateY(-4px);
  border-color: rgba(159, 255, 112, 0.2);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.18);
}

.series-card-head,
.series-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.series-card-count,
.series-card-footer {
  color: var(--muted);
  font-size: 0.92rem;
}

.series-card h2 {
  font-size: 1.25rem;
  line-height: 1.3;
}

.series-card p {
  color: var(--muted);
  line-height: 1.68;
}

.article-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.article-card-date {
  color: var(--accent-warm);
  font-size: 0.9rem;
}

.article-card h2 {
  font-size: 1.25rem;
  line-height: 1.3;
}

.article-card p {
  color: var(--muted);
  line-height: 1.68;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.article-reading-time {
  color: var(--muted);
  font-size: 0.92rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.pagination button {
  min-width: 46px;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.pagination button:hover,
.pagination button.is-active {
  transform: translateY(-2px);
  background: rgba(159, 255, 112, 0.12);
  border-color: rgba(159, 255, 112, 0.24);
}

/* Layout 60/40 del detalle: contenido principal + panel lateral editorial. */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 0.95rem;
}

.article-content,
.article-aside,
.article-related {
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.article-prose {
  display: grid;
  gap: 0.9rem;
  font-size: 0.93rem;
}

.article-prose h2 {
  font-family: "Baloo", sans-serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.06;
}

/* Tipografía y bloques enriquecidos que salen del editor HTML/visual del panel. */
.article-prose ul,
.article-prose ol {
  display: grid;
  gap: 0.22rem;
  padding-left: 1.35rem;
  margin: 0.2rem 0 0.9rem;
}

.article-prose li {
  font-size: 0.95rem;
  line-height: 1.62;
}

.article-prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0.9rem 0 1.1rem;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.025);
}

.article-prose th,
.article-prose td {
  padding: 0.66rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.article-prose th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.article-quote {
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 18px 18px 0;
  background: rgba(159, 255, 112, 0.05);
  color: var(--text);
}

.article-aside {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  position: sticky;
  top: 1rem;
}

.article-aside-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.article-aside-toggle {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.article-aside-toggle:hover {
  background: rgba(159, 255, 112, 0.08);
  border-color: rgba(159, 255, 112, 0.2);
}

.article-aside-toggle i {
  transition: transform 180ms ease;
}

/* Estado colapsado del aside para priorizar lectura del artículo. */
.article-layout.is-aside-collapsed {
  grid-template-columns: minmax(0, 1fr) 58px;
}

.article-layout.is-aside-collapsed .article-aside {
  padding: 0.7rem;
  gap: 0.55rem;
}

.article-layout.is-aside-collapsed .article-aside-body {
  display: none;
}

.article-layout.is-aside-collapsed .article-aside-head {
  justify-content: center;
}

.article-layout.is-aside-collapsed .article-aside-head .section-tag {
  display: none;
}

.article-layout.is-aside-collapsed .article-aside-toggle i {
  transform: rotate(180deg);
}

.article-aside-media,
.article-hero-media {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 220px;
  padding: 1.15rem;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.18);
}

.article-aside-media::before,
.article-hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 12, 0.02), rgba(8, 10, 12, 0.62)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 18px
    );
  pointer-events: none;
}

.article-aside-media span,
.article-aside-media strong,
.article-hero-media span,
.article-hero-media strong {
  position: relative;
  z-index: 1;
}

.article-hero-media img,
.article-prose img {
  display: block;
  width: min(100%, 680px);
  height: auto;
  object-fit: contain;
  border-radius: inherit;
  margin-inline: auto;
}

.article-prose figure {
  margin: 1.2rem auto;
  width: fit-content;
  max-width: 100%;
}

.article-prose figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.article-prose pre {
  overflow-x: auto;
  padding: 1.1rem 1.2rem;
  border-radius: 20px;
  background: rgba(7, 10, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-prose code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.94rem;
}

.article-aside-media span,
.article-hero-media span {
  color: rgba(244, 244, 236, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-aside-media strong,
.article-hero-media strong {
  margin-top: 0.45rem;
  font-size: 1.15rem;
  line-height: 1.24;
}

.article-media-python {
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 210, 92, 0.24), transparent 20%),
    linear-gradient(145deg, rgba(42, 76, 122, 0.98), rgba(17, 27, 44, 0.98));
}

.article-media-architecture {
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 191, 105, 0.22), transparent 18%),
    linear-gradient(145deg, rgba(48, 56, 63, 0.98), rgba(24, 29, 34, 0.98));
}

.article-media-writing {
  background:
    radial-gradient(circle at 20% 20%, rgba(86, 240, 157, 0.18), transparent 18%),
    linear-gradient(145deg, rgba(36, 48, 43, 0.98), rgba(18, 24, 23, 0.98));
}

.article-media-drf {
  background:
    radial-gradient(circle at 80% 30%, rgba(255, 82, 82, 0.24), transparent 16%),
    linear-gradient(145deg, rgba(52, 28, 34, 0.98), rgba(20, 18, 24, 0.98));
}

.article-media-mobile {
  background:
    radial-gradient(circle at 24% 24%, rgba(0, 197, 255, 0.18), transparent 18%),
    linear-gradient(145deg, rgba(26, 42, 52, 0.98), rgba(14, 22, 28, 0.98));
}

.article-media-process {
  background:
    radial-gradient(circle at 78% 26%, rgba(159, 255, 112, 0.18), transparent 18%),
    linear-gradient(145deg, rgba(32, 46, 33, 0.98), rgba(16, 23, 18, 0.98));
}

/* Navegación de la serie actual y bloque lateral de apoyo. */
.article-aside h3,
.article-related h2 {
  font-size: 1rem;
}

.article-series-nav {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.45rem;
  padding: 0.72rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.article-series-nav-head {
  display: grid;
  gap: 0.18rem;
}

.article-series-nav-head h3 {
  font-size: 0.92rem;
}

.article-series-list {
  display: grid;
  gap: 0.4rem;
}

.article-series-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.55rem;
  padding: 0.58rem 0.62rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.article-series-item:hover {
  transform: translateY(-1px);
  border-color: rgba(159, 255, 112, 0.18);
  background: rgba(159, 255, 112, 0.05);
}

.article-series-item.is-current {
  border-color: rgba(159, 255, 112, 0.24);
  background: rgba(159, 255, 112, 0.09);
}

.article-series-item-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.68rem;
}

.article-series-item-copy {
  min-width: 0;
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.38;
}

.article-series-item-state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  background: rgba(159, 255, 112, 0.14);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 600;
}

.article-list {
  display: grid;
  gap: 0.8rem;
}

.article-comments {
  margin-top: 0.4rem;
  padding: 0.82rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.03);
}

.article-comments-head {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.65rem;
}

.article-comments-head h2 {
  font-size: 0.9rem;
}

.article-comments-head p {
  font-size: 0.72rem;
  line-height: 1.4;
}

/* Hilo de comentarios compacto: padre visible y respuestas con sangría constante. */
.article-comment-form {
  display: grid;
  gap: 0.48rem;
  padding: 0.62rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.article-comment-identity {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 0.48rem;
  align-items: start;
}

.article-comment-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 700;
  font-size: 0.7rem;
}

.article-comment-avatar.is-form {
  color: rgba(255, 255, 255, 0.82);
}

.article-comment-notice,
.article-comment-replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.68rem;
  border-radius: 12px;
  border: 1px solid rgba(159, 255, 112, 0.14);
  background: rgba(159, 255, 112, 0.08);
  color: var(--text);
  font-size: 0.76rem;
}

.article-comment-notice {
  margin-bottom: 0.75rem;
  justify-content: flex-start;
}

.article-comment-replying a {
  color: var(--accent);
  font-size: 0.8rem;
}

.article-comment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.article-comment-form input,
.article-comment-form textarea {
  width: 100%;
  min-height: 34px;
  padding: 0.54rem 0.68rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
}

.article-comment-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: end;
}

.article-comment-form textarea {
  min-height: 66px;
  resize: vertical;
}

.article-comment-submit {
  justify-self: end;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 12px;
  font-size: 0.8rem;
}

.article-comment-thread-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
  max-height: 50vh;
  overflow: auto;
  padding-right: 0.15rem;
}

.article-comment-node {
  display: grid;
  gap: 0.3rem;
}

.article-comment-node.is-root-thread {
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.article-comment-node.is-root-thread:first-child {
  padding-top: 0;
  border-top: 0;
}

.article-comment-row {
  display: block;
}

.article-comment-bubble {
  max-width: 100%;
  padding: 0.58rem 0.72rem;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.article-comment-bubble.is-reply {
  background: rgba(159, 255, 112, 0.06);
  border-color: rgba(159, 255, 112, 0.12);
}

.article-comment-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.16rem;
}

.article-comment-meta strong {
  font-size: 0.76rem;
}

.article-comment-bubble p {
  margin: 0;
  color: var(--text);
  line-height: 1.38;
  font-size: 0.72rem;
}

.article-comment-bubble small {
  color: var(--muted);
  font-size: 0.62rem;
}

.article-comment-actions {
  margin-top: 0.18rem;
}

.article-comment-reply-link {
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 600;
}

.article-comment-children {
  display: grid;
  gap: 0.4rem;
  padding-left: 0.9rem;
  margin: 0.15rem 0 0 0.7rem;
  border-left: 1px solid rgba(159, 255, 112, 0.14);
}

.article-comment-children .article-comment-node {
  gap: 0.24rem;
}

.article-comments-empty {
  color: var(--muted);
  font-size: 0.74rem;
}

.article-list a {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease;
}

.article-list a:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 255, 112, 0.2);
}

/* --------------------------------------------------------------------------
   Responsive general de landing, blog y artículo
   -------------------------------------------------------------------------- */

@media (max-width: 1160px) {
  .blog-grid,
  .contact-card,
  .articles-grid,
  .series-grid,
  .article-layout,
  .articles-toolbar,
  .article-hero-layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 14ch;
  }

  .hero-top,
  .hero-capability-grid,
  .hero-stack-row,
  .timeline-card {
    grid-template-columns: 1fr;
  }

  .highlight-metrics,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .article-share-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout.is-aside-collapsed {
    grid-template-columns: 1fr;
  }

  .article-layout.is-aside-collapsed .article-aside {
    padding: 1.35rem;
  }

  .article-layout.is-aside-collapsed .article-aside-body {
    display: grid;
  }

  .article-layout.is-aside-collapsed .article-aside-toggle i {
    transform: none;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(calc(100% - 1rem), var(--max-width));
    padding-top: 0.5rem;
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .article-share-card {
    padding: 1rem;
  }

  .article-share-grid,
  .article-share-copy {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: inline-block;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.5rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  .nav-cta {
    width: 100%;
    text-align: left;
  }

  .hero-panel,
  .journey-section,
  .blog-section,
  .section-card,
  .contact-card,
  .courses-section,
  .skills-shell {
    padding: 1.35rem;
    border-radius: 24px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 13vw, 4rem);
  }

  .hero-top,
  .hero-side-cards,
  .hero-capability-grid,
  .course-wall,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .course-wall {
    grid-auto-columns: minmax(240px, 82vw);
  }

  .skill-card-head {
    grid-template-columns: 1fr;
  }

  .skill-icon {
    width: 54px;
    height: 54px;
  }

  .hero-meteor {
    top: 1.2rem;
    left: auto;
    right: -0.4rem;
    width: 170px;
    transform: rotate(-12deg);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .brand {
    width: calc(100% - 68px);
  }

  .brand-logo {
    width: 68px;
    height: 68px;
    border-radius: 20px;
  }

  .brand-copy strong {
    font-size: 1.35rem;
  }

  .brand-name {
    font-size: 0.74rem;
  }

  .brand-divider {
    margin: 0 0.28rem;
  }

  .brand-copy small {
    font-size: 0.78rem;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-cta-row {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .hero-stack-row,
  .timeline-signals,
  .tech-icons,
  .article-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-capability-card {
    min-height: 74px;
  }

  .tooltip-chip::after {
    width: min(220px, 85vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-panel,
  .hero-panel::after,
  .hero-intro,
  .hero-side-cards,
  .hero-meteor,
  .hero-actions,
  .hero-capabilities {
    animation: none !important;
  }
}

.contact-actions {
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Portal público de chats (pantallas completas)
   -------------------------------------------------------------------------- */

.chat-public-main {
  width: min(1240px, calc(100% - 2rem));
  margin: 1.5rem auto 0;
}

.chat-public-card {
  padding: 1.6rem;
  border-radius: 28px;
}

.chat-public-card-narrow {
  max-width: 620px;
  margin-inline: auto;
}

.chat-public-head h1 {
  margin: 0.3rem 0 0.5rem;
  font-family: "Baloo", sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.04;
}

.chat-public-head p,
.chat-public-field span,
.chat-thread-public-item span,
.chat-public-bubble small {
  color: rgba(244, 244, 236, 0.72);
}

.chat-public-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.chat-public-form-compact {
  max-width: 560px;
}

.chat-public-field {
  display: grid;
  gap: 0.45rem;
}

.chat-public-field.is-full,
.chat-public-actions {
  grid-column: 1 / -1;
}

.chat-public-field input,
.chat-public-field textarea {
  min-height: 52px;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(159, 255, 112, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font: inherit;
}

.chat-public-field textarea {
  min-height: 150px;
  resize: vertical;
}

.chat-public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.chat-public-error {
  color: #ffb7b7;
}

.chat-thread-public-list,
.chat-public-workspace,
.chat-public-messages {
  display: grid;
  gap: 0.9rem;
}

.chat-thread-public-list {
  margin-top: 1.25rem;
}

.chat-thread-public-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(159, 255, 112, 0.08);
}

.chat-thread-public-item strong,
.chat-public-bubble strong {
  display: block;
}

.chat-public-messages {
  min-height: 260px;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-public-bubble {
  max-width: min(82%, 720px);
  padding: 0.95rem 1rem;
  border-radius: 20px;
  display: grid;
  gap: 0.25rem;
}

.chat-public-bubble.is-visitor {
  background: rgba(255, 255, 255, 0.05);
}

.chat-public-bubble.is-admin {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(159, 255, 112, 0.24), rgba(86, 240, 157, 0.12));
  color: #09110f;
}

.chat-public-bubble.is-admin small {
  color: rgba(9, 17, 15, 0.7);
}

.chat-public-reply {
  display: grid;
  gap: 0.9rem;
}

.chat-public-empty {
  color: rgba(244, 244, 236, 0.65);
}

@media (max-width: 720px) {
  .chat-public-main {
    width: min(100% - 1rem, 1240px);
  }

  .chat-public-form {
    grid-template-columns: 1fr;
  }

  .chat-public-actions {
    flex-direction: column;
  }

  .chat-public-bubble {
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Widget flotante de chat con OTP, listado de hilos y conversación
   -------------------------------------------------------------------------- */

.chat-widget {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 40;
}

.chat-widget-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 68px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(159, 255, 112, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 82, 82, 0.22), transparent 30%),
    linear-gradient(145deg, rgba(18, 22, 26, 0.96), rgba(11, 14, 18, 0.96));
  color: var(--text);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.chat-widget-trigger:hover {
  transform: translateY(-3px);
  border-color: rgba(159, 255, 112, 0.24);
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.32);
}

.chat-widget-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.18), rgba(255, 191, 105, 0.14));
  color: #ffb66b;
}

.chat-widget-trigger-copy {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.chat-widget-trigger-copy strong {
  font-size: 0.96rem;
}

.chat-widget-trigger-copy small {
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-widget-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 1rem);
  width: min(26rem, calc(100vw - 1rem));
}

.chat-widget-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 34rem;
  max-height: min(80vh, 44rem);
  border-radius: 30px;
  overflow: hidden;
}

.chat-widget-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 82, 82, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(16, 19, 22, 0.98), rgba(10, 13, 16, 0.98));
}

.chat-widget-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.chat-widget-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.16), rgba(255, 191, 105, 0.14));
  color: #ffbf69;
}

.chat-widget-brand strong {
  display: block;
  font-size: 0.96rem;
}

.chat-widget-brand small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}

.chat-widget-topbar-actions {
  display: flex;
  gap: 0.55rem;
}

.chat-widget-topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.chat-widget-topbar-link:hover {
  transform: translateY(-2px);
  background: rgba(159, 255, 112, 0.08);
  border-color: rgba(159, 255, 112, 0.18);
}

.chat-widget-body {
  display: grid;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 23, 27, 0.96), rgba(11, 14, 17, 0.98));
}

.chat-widget-body.is-loading {
  opacity: 0.82;
}

.chat-widget-loading,
.chat-widget-view {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-height: 0;
  padding: 1.1rem;
}

.chat-widget-view {
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  overflow: hidden;
}

.chat-widget-loading {
  place-items: center;
  align-content: center;
  color: var(--muted);
}

.chat-widget-loading-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 82, 82, 0.12);
  color: #ffb66b;
  font-size: 1.1rem;
}

.chat-widget-head-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.chat-widget-head h3 {
  margin-top: 0.45rem;
  font-family: "Baloo", sans-serif;
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1.02;
}

.chat-widget-head p,
.chat-widget-thread-copy span,
.chat-widget-bubble small,
.chat-widget-empty,
.chat-widget-field span,
.chat-widget-text-link {
  color: var(--muted);
}

.chat-widget-head p {
  font-size: 0.9rem;
  line-height: 1.55;
}

.chat-widget-notice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.6rem 2.1rem 0.6rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  line-height: 1.35;
}

.chat-widget-notice.is-success {
  border-color: rgba(159, 255, 112, 0.18);
  background: rgba(159, 255, 112, 0.08);
}

.chat-widget-notice.is-danger {
  border-color: rgba(255, 82, 82, 0.2);
  background: rgba(255, 82, 82, 0.08);
}

.chat-widget-notice i {
  margin-top: 0.08rem;
  color: var(--accent);
}

.chat-widget-notice.is-danger i {
  color: #ff9b9b;
}

.chat-widget-notice-close {
  position: absolute;
  top: 0.38rem;
  right: 0.38rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(244, 244, 236, 0.7);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.chat-widget-notice-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  transform: translateY(-1px);
}

.chat-widget-form,
.chat-widget-reply {
  display: grid;
  gap: 0.9rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
  align-content: start;
}

.chat-widget-field {
  display: grid;
  gap: 0.45rem;
}

.chat-widget-field input,
.chat-widget-field textarea,
.chat-widget-field .panel-input,
.chat-widget-field .panel-textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.88rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.chat-widget-field textarea,
.chat-widget-field .panel-textarea {
  min-height: 112px;
  resize: vertical;
}

.chat-widget-field input:focus,
.chat-widget-field textarea:focus,
.chat-widget-field .panel-input:focus,
.chat-widget-field .panel-textarea:focus {
  outline: none;
  border-color: rgba(159, 255, 112, 0.26);
  box-shadow: 0 0 0 4px rgba(159, 255, 112, 0.08);
}

.chat-widget-submit,
.chat-widget-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 38px;
  padding: 0.58rem 0.76rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #07120e;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.chat-widget-submit:hover,
.chat-widget-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(86, 240, 157, 0.16);
}

.chat-widget-toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  margin-left: auto;
}

.chat-widget-toolbar form {
  margin: 0;
}

.chat-widget-action.is-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.chat-widget-inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  padding-top: 0.75rem;
  padding-bottom: 0.15rem;
  background: linear-gradient(180deg, rgba(11, 14, 17, 0), rgba(11, 14, 17, 0.92) 28%, rgba(11, 14, 17, 1) 100%);
}

.chat-widget-text-link {
  font-size: 0.92rem;
}

.chat-widget-error {
  color: #ffb3b3;
  font-size: 0.82rem;
}

.chat-widget-thread-list {
  display: grid;
  gap: 0.35rem;
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  overflow-y: auto;
  min-height: 0;
  padding-right: 0.2rem;
}

.chat-widget-thread-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 0;
  padding: 0.34rem 0.72rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  align-self: start;
}

.chat-widget-thread-card:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 255, 112, 0.18);
  background: rgba(159, 255, 112, 0.05);
}

.chat-widget-thread-copy strong {
  display: block;
  font-size: 0.74rem;
  line-height: 1.2;
}

.chat-widget-thread-copy span {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.64rem;
  line-height: 1.15;
}

.chat-widget-thread-side {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
}

.chat-widget-thread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(159, 255, 112, 0.12);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
}

.chat-widget-empty {
  display: grid;
  gap: 0.7rem;
  place-items: center;
  padding: 1.4rem;
  text-align: center;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.chat-widget-empty i {
  color: #ffb66b;
  font-size: 1.2rem;
}

.chat-widget-empty-state {
  display: grid;
  place-items: center;
  gap: 0.65rem;
  min-height: 100%;
  padding: 1.2rem;
  text-align: center;
  color: var(--muted);
}

.chat-widget-empty-state strong {
  color: var(--text);
  font-size: 0.94rem;
}

.chat-widget-empty-state p {
  font-size: 0.86rem;
  line-height: 1.55;
}

.chat-widget-empty-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 191, 105, 0.08);
  color: #ffb66b;
}

.chat-widget-otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}

.chat-widget-otp input {
  width: 100%;
  min-height: 58px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
}

.chat-widget-otp input:focus {
  outline: none;
  border-color: rgba(159, 255, 112, 0.26);
  box-shadow: 0 0 0 4px rgba(159, 255, 112, 0.08);
}

.chat-widget-messages {
  display: grid;
  gap: 0.75rem;
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding: 0.2rem 0.1rem 0.2rem 0;
}

.chat-widget-bubble {
  display: grid;
  gap: 0.35rem;
  max-width: 84%;
  height: auto;
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  align-self: start;
}

.chat-widget-bubble strong {
  font-size: 0.74rem;
}

.chat-widget-bubble p {
  font-size: 0.9rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.chat-widget-bubble small {
  font-size: 0.72rem;
}

.chat-widget-bubble-text.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-widget-message-toggle {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.chat-widget-message-toggle:hover {
  text-decoration: underline;
}

.chat-widget-bubble.is-visitor {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(159, 255, 112, 0.14), rgba(86, 240, 157, 0.08));
}

.chat-widget-bubble.is-admin {
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-widget-view-conversation {
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.chat-widget-chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.2rem;
}

.chat-widget-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.chat-widget-chat-head-copy {
  min-width: 0;
}

.chat-widget-chat-head-copy strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.3;
}

.chat-widget-chat-head-copy span {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.chat-widget-messages-empty {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  padding: 0;
}

/* Composer fijo al pie del widget para no perder el campo de respuesta. */
.chat-widget-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: end;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 0.75rem;
  padding-bottom: 0.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(11, 14, 17, 0), rgba(11, 14, 17, 0.98) 24%);
}

.chat-widget-composer-field {
  display: grid;
  gap: 0.35rem;
}

.chat-widget-composer-field textarea,
.chat-widget-composer-field .panel-textarea {
  min-height: 54px;
  max-height: 96px;
  padding: 0.82rem 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  resize: none;
  overflow-y: auto;
  font: inherit;
  line-height: 1.45;
}

.chat-widget-composer-field textarea:focus,
.chat-widget-composer-field .panel-textarea:focus {
  outline: none;
  border-color: rgba(159, 255, 112, 0.26);
  box-shadow: 0 0 0 4px rgba(159, 255, 112, 0.08);
}

.chat-widget-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #07120e;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.chat-widget-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(86, 240, 157, 0.16);
}

@media (max-width: 820px) {
  .chat-widget {
    right: 0.7rem;
    left: 0.7rem;
    bottom: 0.7rem;
  }

  .chat-widget-trigger {
    width: 100%;
    justify-content: center;
  }

  .chat-widget-panel {
    width: 100%;
    right: 0;
  }

  .chat-widget-shell {
    min-height: 70vh;
    max-height: 82vh;
  }

  .chat-widget-toolbar {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .chat-widget-head-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .chat-widget-toolbar .chat-widget-action,
  .chat-widget-toolbar form,
  .chat-widget-toolbar .chat-widget-action.is-ghost {
    flex: 1 1 auto;
  }
}
