/* =============================================
   DevOpsTechia Modern Theme — Dark by default
   Basado en eje1.html
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0f172a;
  --card: #111827;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #3b82f6;
}

* {
  box-sizing: border-box;
}

/* ── Base ── */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  opacity: 0.85;
}

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

/* ── Header & Navbar ── */
header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.logo-img {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}

.logo:hover .logo-img {
  border-color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--border);
}

/* ── Hero Section ── */
.hero {
  text-align: center;
  padding: 90px 0 60px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.2;
  background: linear-gradient(135deg, #e5e7eb 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 580px;
  margin: 0 auto;
}

.button {
  display: inline-block;
  margin-top: 32px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: opacity 0.2s, transform 0.2s;
}

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

/* ── Article Grid / Cards ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  padding-bottom: 90px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.card h2,
.card h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  line-height: 1.4;
}

.card h2 a,
.card h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.card h2 a:hover,
.card h3 a:hover {
  color: var(--accent);
}

.card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.65;
}

.card-image img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
  object-fit: cover;
  max-height: 180px;
}

/* ── Article Page ── */
.article {
  max-width: 820px;
  margin: 0 auto;
  padding: 50px 20px 100px;
}

.article h1 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.25;
}

.article-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-meta .tag {
  display: inline-block;
  background: var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  margin-right: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.article-meta .tag:hover {
  background: var(--accent);
  color: #fff;
}

.article-content {
  color: var(--text);
}

.article-content h2 {
  font-size: 26px;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text);
}

.article-content h3 {
  font-size: 20px;
  margin-top: 36px;
  color: var(--text);
}

.article-content p {
  margin-bottom: 20px;
  color: var(--text);
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
  color: var(--text);
  margin-bottom: 20px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 28px 0;
  padding: 14px 20px;
  background: var(--card);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-style: italic;
}

/* ── Code Blocks ── */
pre {
  background: #0b1220;
  padding: 22px;
  border-radius: 10px;
  overflow-x: auto;
  color: #93c5fd;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid var(--border);
  margin: 24px 0;
}

code {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.9em;
}

:not(pre)>code {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  color: #93c5fd;
  font-size: 0.88em;
}

/* ── Page Hero (categories, tags, archives) ── */
.page-hero {
  text-align: center;
  padding: 64px 0 44px;
}

.page-hero-icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 10px;
}

.page-hero p {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

/* ── Chips Grid (all categories / all tags) ── */
.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 80px;
  justify-content: center;
}

.category-chip,
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.category-chip:hover,
.tag-chip:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
  transform: translateY(-2px);
  color: var(--text);
}

.chip-hash {
  color: var(--accent);
  font-weight: 700;
}

.chip-name {
  color: var(--text);
}

.chip-count {
  background: var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  min-width: 22px;
  text-align: center;
}

/* ── Card enhancements ── */
.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-date {
  font-size: 12px;
  color: var(--muted);
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s;
}

.card-link:hover {
  opacity: 0.8;
}

/* ── Archives ── */
.archives-list {
  padding: 30px 0 80px;
}

.archives-list h2 {
  font-size: 20px;
  margin: 36px 0 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.archives-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  list-style: none;
}

.archives-list time {
  color: var(--muted);
  font-size: 13px;
  min-width: 100px;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 0 60px;
}

.pagination a,
.pagination span {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination .active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  padding: 60px 0 30px;
}

.section-header h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--muted);
  font-size: 16px;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 30px;
  }

  nav {
    flex-direction: column;
    gap: 14px;
  }

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

  .grid {
    grid-template-columns: 1fr;
  }

  .article {
    padding: 30px 16px 80px;
  }
}