/* style.css — Microesfera */

:root {
  --bg: #0c0c0b;
  --surface: #141413;
  --text: #e8e4dc;
  --text-muted: #6b6760;
  --text-faint: #333330;
  --accent: #c8f060;
  --accent-dim: #8aaa3a;
  --border: #1f1f1d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
  font-weight: 400;
  line-height: 1.75;
  min-height: 100vh;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 24px 100px;
}

/* ── Encabezado del sitio ── */

.site-header,
header {
  margin-bottom: 64px;
  border-left: 2px solid var(--accent);
  padding-left: 20px;
}

.site-title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
  display: block;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s;
}

.site-title em { font-style: italic; color: var(--accent); }
.site-title:hover { color: var(--accent); border-bottom: none; }

/* h1 sin clase (index.html) */
h1 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
}

h1 em { font-style: italic; color: var(--accent); }

.site-meta,
.meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Navegación ── */

.back {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: none;
  margin-bottom: 48px;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}

.back:hover { color: var(--accent); border-bottom: none; }

/* ── Encabezado de nota ── */

.post-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.post-title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
}

.post-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Tipografía ── */

p {
  font-size: 0.9rem;
  color: #b8b4ac;
  margin-bottom: 20px;
  max-width: 52ch;
}

p:not(:has(img)) { max-width: 52ch; }
p:has(img) { overflow-x: auto; max-width: 100%; }
p:has(> img) { overflow-x: auto; max-width: 100%; }
p > img { display: block; }

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

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

h2 {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--text);
  margin: 48px 0 16px;
}

h3 {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 36px 0 14px;
}

/* índice usa h3 con más margen arriba */
nav ~ h3,
h3:first-of-type { margin-top: 40px; }

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

code {
  font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--accent);
  background: rgba(200, 240, 96, 0.06);
  padding: 2px 6px;
  border-radius: 3px;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 20px;
  overflow-x: auto;
}

pre code { background: none; padding: 0; color: #b8b4ac; }

blockquote {
  border-left: 2px solid var(--border);
  padding-left: 20px;
  margin: 28px 0;
  color: var(--text-muted);
  font-style: italic;
}

ul, ol { padding-left: 1.4em; margin-bottom: 20px; }

li {
  font-size: 0.9rem;
  color: #b8b4ac;
  margin-bottom: 6px;
}

/* ── Imágenes ── */

img {
  display: block;
  width: 550px;
  height: auto;
  image-rendering: pixelated;
  margin: 32px 0;
}

figure {
  margin: 0 0 36px;
  overflow-x: auto;
}

figure img { margin: 0 0 10px; }

figcaption {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.06em;
}

.post-image {
  margin-bottom: 36px;
  overflow-x: auto;
}

.post-image img {
  opacity: 0.85;
  filter: contrast(1.05);
  margin: 0;
}

/* ── Índice de entradas ── */

.index-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  border-left: none;
}

.index-line:last-child { border-bottom: none; }

.index-line .num {
  font-size: 0.72rem;
  color: var(--text-faint);
  min-width: 24px;
}

.index-line .title {
  font-size: 0.9rem;
  color: var(--text);
  flex: 1;
}

.index-line .date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.index-line:hover .title { color: var(--accent); }

/* ── Bloques de descarga (fuente.html) ── */

.dl-block {
  display: flex;
  align-items: baseline;
  gap: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.dl-block:first-of-type { border-top: 1px solid var(--border); }

.dl-block .dl-name {
  flex: 0 0 160px;
  padding-right: 32px;
  font-size: 0.9rem;
  color: var(--accent);
}

.dl-block .dl-desc {
  flex: 1;
  padding-right: 32px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dl-block .dl-link {
  flex: 0 0 80px;
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-bottom: none;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color 0.15s;
}

.dl-block .dl-link:hover { color: var(--accent); }

/* ── Footer ── */

footer {
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  border-bottom: none;
}

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

/* ── Responsive ── */

@media (max-width: 480px) {
  main { padding: 48px 20px 72px; }
  .dl-block { flex-wrap: wrap; gap: 6px; }
  .dl-block .dl-desc { max-width: 100%; }
}
