/* ==========================================================================
   VARIABLES GLOBALES (MODO CLARO EXCLUSIVO)
   ========================================================================== */
:root {
  --bg-primary: #f8fafc;        /* Fondo principal de la página */
  --bg-card: #ffffff;           /* Fondo de las tarjetas y contenedores */
  --bg-hover: #f1f5f9;          /* Fondo para hover de elementos */
  
  --text-primary: #0f172a;      /* Texto principal con alto contraste */
  --text-secondary: #64748b;    /* Texto secundario y descripciones */
  
  --accent: #0284c7;            /* Azul principal */
  --accent-hover: #0369a1;      /* Azul oscuro para interacciones */
  --accent-light: rgba(2, 132, 199, 0.08); /* Fondos suaves/destacadores */
  --accent-border: rgba(2, 132, 199, 0.25);
  
  --border: #e2e8f0;            /* Bordes suaves */
  --code-bg: #0f172a;           /* Fondo de bloques de código */
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 12px 20px -3px rgba(0, 0, 0, 0.08);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s ease-in-out;
  --max-width: 1200px;
}

/* ==========================================================================
   RESET Y ESTILOS BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  padding-bottom: 2rem;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   HEADER DE NAVEGACIÓN
   ========================================================================== */
.site-header {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.site-logo span {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-link:hover, 
.nav-link.active {
  color: var(--accent);
}

.nav-btn {
  background-color: var(--accent-light);
  color: var(--accent);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-border);
  font-weight: 600;
}

.nav-btn:hover {
  background-color: var(--accent);
  color: #ffffff;
}

/* ==========================================================================
   LANDING PAGE: HERO SECTION
   ========================================================================== */




.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

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

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   LANDING PAGE: GRID DE TARJETAS
   ========================================================================== */
.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-hover);
}

.card-tag {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background-color: var(--accent-light);
  border: 1px solid var(--accent-border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.card-lang {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: monospace;
}

.card-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}

.card-link:hover {
  color: var(--accent-hover);
  transform: translateX(4px);
}

/* ==========================================================================
   VISTA DE ARTÍCULO: LAYOUT DE 2 COLUMNAS (ARTÍCULO + SIDEBAR)
   ========================================================================== */
.layout-grid {
  max-width: var(--max-width);
  width: 100%;
  margin: 2rem auto 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.article-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.post-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.post-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

.post-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.post-content h2 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
  color: var(--text-primary);
}

.post-content h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--accent);
}

.post-content p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

/* Código en línea e Integración de Sintaxis */
:not(pre) > code {
  background-color: var(--accent-light) !important;
  color: var(--accent-hover) !important;
  padding: 0.2rem 0.4rem !important;
  border-radius: 4px !important;
  font-family: 'Fira Code', Consolas, monospace;
  font-size: 0.9em;
  word-break: break-word;
}

.code-block-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.copy-code-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

pre[class*="language-"] {
  border-radius: var(--radius-md);
  margin-bottom: 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: var(--code-bg);
  font-family: 'Fira Code', Consolas, Monaco, monospace;
  font-size: 0.9rem;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  padding-top: 2.5rem !important;
}

.diagram-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-width: 100%;
  overflow-x: auto;
}

.diagram-svg {
  width: 100%;
  min-width: 300px;
  max-width: 650px;
  height: auto;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

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

.post-callout {
  background-color: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: 2rem;
}

.post-callout p {
  margin: 0;
  font-weight: 500;
  color: var(--text-primary);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 5rem;
  min-width: 0;
}

.sidebar-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
  display: inline-block;
  color: var(--text-primary);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-item {
  text-decoration: none;
  color: inherit;
  display: block;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.sidebar-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-item:hover {
  transform: translateX(4px);
}

.sidebar-item:hover .sidebar-item-title {
  color: var(--accent);
}

.sidebar-item-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

.sidebar-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0.2rem 0;
  color: var(--text-primary);
  transition: var(--transition);
}

.sidebar-item-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg-card);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-socials {
  display: flex;
  gap: 1.25rem;
}

.footer-socials a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

/* ==========================================================================
   RESPONSIVO (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 900px) {
  .hero-title {
    font-size: 2rem;
  }

  .header-container {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
  }

  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .layout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 0 1rem;
  }

  .sidebar {
    position: static;
  }

  .article-container {
    padding: 1.25rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}


.filter-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  
}

.search-box input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #313244;
  border-radius: 6px;
  background-color: #28282e30;
  color: black;
  font-size: 1rem;
}

.filter-options {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.9rem;
  color: #a6adc8;
}

.filter-group select {
  padding: 0.5rem 0.8rem;
  background-color: #28282e30;
  color: black;
  border: 1px solid #313244;
  border-radius: 6px;
  cursor: pointer;
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #a6adc8;
  font-size: 1.1rem;
}




/* Hero Section - Estilo Rolando Andrade */
.hero-section {
  padding: 5rem 1.5rem 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-profile-container {
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Avatar Circular */
.profile-avatar-wrapper {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  padding: 4px;
  background: #1a1a1a;
  border: 1px solid #333333;
  margin-bottom: 2rem;
  overflow: hidden;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: #ffffff; /* Evita transparentes si usas PNG */
}

/* Tipografía del Hero */
.hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.8rem;
}

.hero-description {
  font-size: 0.95rem;
  color: #8e8e93;
  margin-bottom: 2rem;
  font-weight: 300;
}

/* Fila de Redes Sociales */
.hero-socials {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
}

.social-icon {
  color: #a0a0a0;
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

/* Colores de marca al pasar el mouse */
.icon-linkedin:hover { color: #0077b5; }
.icon-github:hover { color: black; }
.icon-gitlab:hover { color: #fc6d26; }
.icon-instagram:hover { color: #e4405f; }
.icon-x:hover { color: black; }
.icon-youtube:hover { color: #ff0000; }

.icon-youtube:hover { color: #ff0000; }
.icon-email:hover { color: rgb(4, 0, 255); }
.icon-whatsapp:hover { color: rgb(113, 175, 20); }