/*
Theme Name: Gonzalo Terminal
Theme URI: https://gonzalovaras.cl
Author: Gonzalo Varas
Author URI: https://gonzalovaras.cl
Description: Tema oscuro estilo terminal para el blog personal de gonzalovaras.cl — port del tema Linuxero.
Version: 1.0.1
License: GPL v2 or later
Text Domain: gvterm
*/

/* ── CSS Custom Properties ── */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-code: rgba(110, 118, 129, 0.1);
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --text-muted: #8b949e;     /* raised from #6e7681 → passes WCAG AA 4.5:1 on bg-card */
  --accent: #00ff41;
  --accent-dim: rgba(0, 255, 65, 0.15);
  --accent-glow: rgba(0, 255, 65, 0.4);
  --link: #58a6ff;
  --link-hover: #79c0ff;
  --border: #30363d;
  --border-light: #21262d;
  --radius: 8px;
  --radius-lg: 12px;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
  --transition: 0.2s ease;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

a:hover {
  color: var(--link-hover);
}

ul, ol {
  padding-left: 1.5rem;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

code {
  font-family: var(--font-mono);
  background: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ── Utility ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* ── Header ── */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(22, 27, 34, 0.92);
}

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

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-branding .prompt {
  color: var(--accent);
  margin-right: 0.25rem;
}

.site-branding a {
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-branding a:hover {
  color: var(--accent);
}

.site-logo {
  height: 32px;
  width: auto;
}

/* ── Navigation ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-icon {
  flex-shrink: 0;
  opacity: 0.7;
  position: relative;
  top: -1px;
}

.main-nav a:hover .nav-icon,
.main-nav a.active .nav-icon {
  opacity: 1;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1;
}

/* ── Header Search ── */
.header-search {
  display: flex;
  align-items: center;
}

.header-search-form {
  display: flex;
  align-items: center;
}

.search-activator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.search-activator:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.search-form-inline {
  display: none;
  align-items: center;
  gap: 0;
  height: 38px;
  width: 260px;
  position: relative;
}

.search-form-inline.is-active {
  display: flex;
}

.search-form-inline .search-form-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  pointer-events: none;
}

.search-field-inline {
  flex: 1;
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0 36px 0 36px;
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-dim);
  transition: all 0.25s ease;
}

.search-field-inline::placeholder {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.search-close {
  position: absolute;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
  transition: color 0.2s;
}

.search-close:hover {
  color: var(--accent);
}

/* ── Hero Terminal ── */
.hero-terminal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin: 3rem auto 2.5rem;
  max-width: var(--max-width);
  position: relative;
  overflow: hidden;
}

.hero-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.hero-terminal .terminal-header {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.hero-terminal .terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.hero-terminal .terminal-dot.red { background: #ff5f56; }
.hero-terminal .terminal-dot.yellow { background: #ffbd2e; }
.hero-terminal .terminal-dot.green { background: #27c93f; }

.hero-terminal .terminal-line {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
}

.hero-terminal .terminal-line--gap {
  margin-top: 1rem;
}

.hero-terminal .terminal-line .prompt {
  color: var(--accent);
  margin-right: 0.75rem;
  white-space: nowrap;
}

.hero-terminal .terminal-line .command {
  color: var(--text-primary);
}

.hero-terminal .terminal-line .output {
  color: var(--text-secondary);
  margin-left: 0;
  width: 100%;
  text-wrap: balance;
}

.hero-terminal .terminal-line .terminal-output--accent,
.hero-terminal .terminal-output--accent {
  margin-left: 0.5rem;
  color: var(--accent);
  width: auto;
}

.hero-terminal .terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-terminal .typing-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--accent);
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
  display: inline-block;
  max-width: 100%;
}

@keyframes typing {
  from { width: 0; }
  to   { width: var(--type-w, 100%); }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent); }
}

/* ── Blog Index (Card Grid) ── */
.page-title {
  font-family: var(--font-mono);
  font-size: 2rem;
  margin: 2.5rem 0 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.page-title .prompt {
  color: var(--accent);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* ── Post Card ── */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover,
.post-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-dim);
  transform: translateY(-2px);
}

.post-card .card-image {
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}

.post-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .card-image img {
  transform: scale(1.05);
}

.post-card .card-image .no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.3;
}

.post-card .card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card .card-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.post-card .card-title {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.post-card .card-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-card .card-title a:hover {
  color: var(--accent);
}

.post-card .card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex: 1;
}

.post-card .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.post-card .card-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.post-card .card-reading-time {
  font-family: var(--font-mono);
}

/* ── Single Post ── */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-category {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}

.article-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.article-tags a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

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

.article-featured-image {
  margin-bottom: 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-featured-image img {
  width: 100%;
}

.article-content {
  font-size: 1.05rem;
}

.article-content h2 {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.article-content h3 {
  margin-top: 2rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.35rem;
}

.article-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0 3rem;
}

.pagination .page-numbers {
  font-family: var(--font-mono);
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ── Category Page ── */
.category-header {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem auto;
  max-width: var(--max-width);
}

.category-header h1 {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  margin-top: auto;
}

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

.footer-brand {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-brand .prompt {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

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

.footer-rss {
  color: var(--accent) !important;
  font-family: var(--font-mono);
}

/* ── 404 ── */
.not-found {
  text-align: center;
  padding: 5rem 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.not-found .error-code {
  font-family: var(--font-mono);
  font-size: 6rem;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

.not-found h1 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.not-found p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.not-found .btn-home {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--bg-primary);
  background: var(--accent);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all var(--transition);
}

.not-found .btn-home:hover {
  background: #00cc34;
  box-shadow: 0 0 20px var(--accent-glow);
  color: var(--bg-primary);
}

/* ── Table of Contents ── */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.toc-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  width: 100%;
  text-align: left;
  margin-bottom: 1rem;
}

.toc-toggle .prompt { color: var(--accent); }

.toc-toggle-icon {
  font-size: 0.65rem;
  transition: transform var(--transition);
  margin-left: auto;
  opacity: 0.6;
}

.toc-toggle[aria-expanded="false"] .toc-toggle-icon {
  transform: rotate(-90deg);
}

.toc-toggle[aria-expanded="false"] + .toc-list {
  display: none;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.toc-list li a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all var(--transition);
  text-decoration: none;
}

.toc-list li a::before {
  content: '›';
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.toc-list li a:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.toc-list .toc-sub a {
  padding-left: 1.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.toc-list .toc-sub a::before {
  content: '·';
  opacity: 0.6;
}

/* ── Prism.js — Linuxero Terminal Theme ── */
code[class*="language-"],
pre[class*="language-"] {
  color: var(--text-primary);
  background: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  line-height: 1.6;
  tab-size: 4;
  hyphens: none;
}

pre[class*="language-"] {
  position: relative;
  padding-top: 2.25rem;
}

pre[class*="language-"][data-language]::before {
  content: attr(data-language);
  position: absolute;
  top: 0.6rem;
  left: 1rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata       { color: var(--text-muted); font-style: italic; }

.token.punctuation { color: var(--text-secondary); }

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted     { color: #f97583; }

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted    { color: var(--link); }

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string { color: var(--text-secondary); }

.token.atrule,
.token.attr-value,
.token.keyword     { color: var(--accent); }

.token.function,
.token.class-name  { color: #e2c08d; }

.token.regex,
.token.important,
.token.variable    { color: #ff9f43; }

.token.important,
.token.bold        { font-weight: bold; }

.token.italic      { font-style: italic; }

/* ── Comments ── */
.comments-area {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.comments-title {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comments-title .prompt { color: var(--accent); }

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.comment-item {
  margin-bottom: 1.25rem;
}

.comment-item .children {
  list-style: none;
  padding: 0 0 0 1.5rem;
  margin: 1rem 0 0;
  border-left: 2px solid var(--border-light);
}

.comment-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition);
}

.bypostauthor > .comment-body {
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-dim);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.comment-avatar {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.comment-author-info {
  flex: 1;
  min-width: 0;
}

.comment-author-name,
.comment-author-name a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
}

.comment-author-name a:hover { text-decoration: underline; }

.comment-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

.comment-actions a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.comment-moderation {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 4px;
}

.comment-content p { font-size: 0.95rem; margin-bottom: 0.5rem; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-content code { font-size: 0.85em; }

.comments-closed {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.comments-password {
  color: var(--text-secondary);
  font-style: italic;
  margin: 2rem 0;
}

.comments-navigation {
  display: flex;
  justify-content: space-between;
  margin: 1.5rem 0;
}

.comments-navigation a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

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

/* Comment Form */
.comment-respond {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-top: 2.5rem;
}

.comment-reply-title {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.comment-reply-title .prompt { color: var(--accent); }

.comment-reply-title small {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 400;
  font-family: var(--font-sans);
}

.comment-reply-title small a {
  color: var(--text-muted);
}

.comment-reply-title small a:hover { color: var(--accent); }

.comment-form-field {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.comment-form-field label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.comment-form-field .required { color: var(--accent); }

.comment-form-field input[type="text"],
.comment-form-field input[type="email"],
.comment-form-field textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.comment-form-field input:focus,
.comment-form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.comment-form-field input::placeholder,
.comment-form-field textarea::placeholder {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.comment-form-field textarea {
  resize: vertical;
  min-height: 140px;
  font-family: var(--font-mono);
}

.comment-form-field small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-submit-btn {
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.comment-submit-btn:hover {
  background: #00cc34;
  box-shadow: 0 0 15px var(--accent-glow);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  html { font-size: 15px; }

  .header-inner {
    height: 56px;
    position: relative;
  }

  .search-activator {
    display: flex;
    width: 34px;
    height: 34px;
  }

  .search-form-inline.is-active {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: 64px;
    width: auto;
    z-index: 110;
    margin-left: 0 !important;
  }

  .search-field-inline {
    background: var(--bg-secondary);
  }

  .main-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    display: none;
    backdrop-filter: blur(12px);
    background: rgba(22, 27, 34, 0.96);
  }

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

  .main-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .nav-toggle { display: block; }

  .hero-terminal {
    padding: 1.5rem 1.25rem;
    margin: 2rem auto 1.5rem;
  }

  .hero-terminal .terminal-line {
    font-size: 0.95rem;
  }

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

  .article-title { font-size: 1.75rem; }

  .article-meta { gap: 1rem; flex-direction: column; align-items: flex-start; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-terminal .terminal-line {
    font-size: 0.9rem;
  }

  .hero-terminal .terminal-line .prompt {
    margin-right: 0.4rem;
  }

  .hero-terminal .terminal-output--accent {
    margin-left: 0.25rem;
    white-space: nowrap;
  }

  .hero-terminal .typing-text {
    white-space: normal;
    border-right: none;
    animation: none;
    width: auto !important;
  }
}

/* ── Compatibilidad bloques Gutenberg (contenido real del blog) ── */
.article-content figure,
.article-content .wp-block-image,
.article-content .wp-block-audio,
.article-content .wp-block-video,
.article-content .wp-block-media-text {
  margin: 2rem 0;
}

.article-content figure {
  border-radius: var(--radius);
}

.article-content figcaption,
.article-content .wp-element-caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.5rem;
}

.article-content .wp-block-audio audio {
  width: 100%;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.article-content .wp-block-quote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-primary);
}

.article-content .wp-block-quote p { margin: 0 0 0.75rem; }

.article-content .wp-block-quote cite {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.article-content .wp-block-pullquote {
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  color: var(--text-primary);
  padding: 1.5rem 0;
  margin: 2rem 0;
}

.article-content pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.75rem 0;
}

.article-content code {
  background: var(--bg-code);
  color: var(--link);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
}

.article-content th,
.article-content td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.9rem;
  text-align: left;
}

.article-content th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.article-content mark {
  background: var(--accent-dim);
  color: var(--text-primary);
  border-radius: 3px;
  padding: 0 0.25rem;
}

.article-content dl { margin: 1.5rem 0; }
.article-content dt { font-family: var(--font-mono); color: var(--accent); }
.article-content dd { margin: 0 0 1rem 1.5rem; color: var(--text-secondary); }

.article-content .has-text-align-left   { text-align: left; }
.article-content .has-text-align-center { text-align: center; }
.article-content .has-text-align-right  { text-align: right; }

/* Skip link + screen-reader (header usa ambos) */
.skip-link.screen-reader-text {
  position: absolute;
  top: -9999px;
  left: 0;
}

.skip-link.screen-reader-text:focus {
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  background: var(--bg-card);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute !important;
}

