:root {
  --theme-color: #1f6feb;
  --sidebar-width: 280px;
}

/* Landing / cover */
section.cover {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #0b1220;
}

section.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/hero.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  z-index: 0;
}

section.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 10, 20, 0.92) 0%, rgba(5, 14, 28, 0.9) 45%, rgba(10, 23, 40, 0.88) 100%);
  z-index: 1;
}

section.cover .cover-main {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 16px 56px;
}

.cover-main {
  color: #f8fafc;
  text-shadow: 0 5px 20px rgba(2, 6, 16, 0.8);
}

.cover-main > p:first-child {
  margin-bottom: 20px;
}

.cover-main > p:first-child img {
  width: min(420px, 78vw);
  max-height: 420px;
  object-fit: contain;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.5));
}

.cover-main h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.05;
  margin: 0.2em 0 0.28em;
  color: #f8fafc;
}

.cover-main blockquote {
  font-size: clamp(1.08rem, 2vw, 1.6rem);
  color: #dbeafe;
  opacity: 1;
  border-left: 4px solid rgba(255, 255, 255, 0.35);
  background: rgba(3, 15, 30, 0.22);
  border-radius: 10px;
  padding: 12px 16px;
  display: inline-block;
}

.cover-main a {
  border-radius: 12px;
  padding: 12px 20px;
  min-width: 210px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.cover-main a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(31, 111, 235, 0.32);
}

.cover-main > p:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 16px;
}

.post-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
}

.post-link {
  display: block;
  color: inherit !important;
  text-decoration: none !important;
}

.post-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-info {
  padding: 14px 16px 16px 16px;
}

.post-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  background: var(--theme-color);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

.post-title {
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 8px 0;
}

.post-meta {
  font-size: 13px;
  opacity: .75;
}

.post-error {
  padding: 12px 14px;
  background: #fff3cd;
  border: 1px solid #ffe69c;
  border-radius: 10px;
}

.markdown-section {
  max-width: 1100px;
}

/* Top navbar over landing */
.app-nav {
  background: transparent;
  border: 0;
  padding: 14px 24px 0;
  box-shadow: none;
}

.app-nav a {
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 0 3px 12px rgba(2, 6, 16, 0.9);
}

.app-nav a:hover,
.app-nav li.active > a {
  color: #bfdbfe !important;
}

.app-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  margin: 0;
  padding: 0;
}

@media (max-width: 900px) {
  .app-nav {
    padding: 10px 6px 0;
  }

  .app-nav ul {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    row-gap: 14px;
    column-gap: 6px;
    align-items: center;
    justify-items: center;
  }

  .app-nav li {
    width: auto;
    text-align: center;
  }

  .app-nav li:nth-child(1) { grid-column: 1; grid-row: 1; }
  .app-nav li:nth-child(2) { grid-column: 3; grid-row: 1; }
  .app-nav li:nth-child(3) { grid-column: 5; grid-row: 1; }
  .app-nav li:nth-child(4) { grid-column: 2; grid-row: 2; }
  .app-nav li:nth-child(5) { grid-column: 4; grid-row: 2; }

  .app-nav a {
    font-size: 0.92rem;
    line-height: 1.2;
    padding: 2px 0;
    white-space: nowrap;
  }

  .cover-main a {
    display: block;
    min-width: 0;
    width: min(92vw, 360px);
    padding: 11px 14px;
  }
}

/* Logo pequeno en sidebar de Docsify (debajo del nombre del sitio) */
.sidebar .app-name::after {
  content: "";
  display: block;
  width: 72px;
  height: 72px;
  margin: 10px auto 8px;
  background: url("../img/logo.png") center/contain no-repeat;
}
