:root {
  --bg:         #ffffff;
  --text:       #111111;
  --muted:      #777777;
  --dim:        #cccccc;
  --border:     #dedede;
  --code-bg:    #f4f4f4;
  --font-body:  Georgia, 'Times New Roman', serif;
  --font-mono:  'Courier New', Courier, monospace;
}

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

html { font-size: 18px; background: var(--bg); color: var(--text); }

body {
  font-family: var(--font-body);
  line-height: 1.72;
  padding: 0 2rem;
}

.site-wrap {
  max-width: 580px;
  margin: 0;
  padding: 3.5rem 0 5.5rem;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  margin-bottom: 3rem;
}

.site-name {
  display: block;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: normal;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.45rem;
}

nav { display: flex; gap: 1.2rem; }

nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
}
nav a:hover, nav a.active { color: var(--text); }

/* ── Site description ────────────────────────────────── */

.site-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ── Section labels ──────────────────────────────────── */

.section-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
  margin-top: 2.8rem;
}
.section-label:first-of-type { margin-top: 0; }

/* ── Post list ───────────────────────────────────────── */

.post-list { list-style: none; }

.post-list li {
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.2rem 1rem;
}
.post-list li:first-child { border-top: 1px dashed var(--border); }

.post-list a {
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
}
.post-list a:hover { text-decoration: underline; text-underline-offset: 2px; }

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.post-tags {
  display: flex;
  flex-basis: 100%;
  gap: 0.7rem;
  margin-top: 0.1rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
  text-decoration: none;
}
.tag::before { content: '#'; }
.tag:hover { color: var(--text); }

.post-tags .tag { font-size: 0.55rem; }

/* ── Hilos ───────────────────────────────────────────── */

.hilos-list { list-style: none; }

.hilos-list > li {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border);
}
.hilos-list > li:first-child { border-top: 1px dashed var(--border); }

.hilo-name {
  font-size: 0.92rem;
  color: var(--text);
}

.hilo-desc {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.15rem;
  line-height: 1.5;
}

.hilo-posts {
  margin-top: 0.45rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hilo-posts li { margin: 0; }

.hilo-posts a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-decoration: none;
}
.hilo-posts a:hover { color: var(--text); }

/* ── Arte generativo ─────────────────────────────────── */

.art-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 960px) {
  .art-canvas { display: none; }
}

/* ── Projects ────────────────────────────────────────── */

.project-list { list-style: none; }

.project-list li {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border);
}
.project-list li:first-child { border-top: 1px dashed var(--border); }

.project-title {
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
}
.project-title:hover { text-decoration: underline; text-underline-offset: 2px; }

.project-meta {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.project-desc {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.2rem;
  font-style: italic;
}

/* ── Post page ───────────────────────────────────────── */

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}

.post-title {
  font-size: 1.25rem;
  font-weight: normal;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.post-dateline {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* ── Post body ───────────────────────────────────────── */

.post-body { font-size: 0.95rem; }
.post-body p { margin-bottom: 1.3rem; }

.post-body h2 {
  font-size: 1rem;
  font-weight: normal;
  font-style: italic;
  margin: 2.5rem 0 0.6rem;
}
.post-body h3 {
  font-size: 0.9rem;
  font-weight: normal;
  font-style: italic;
  color: var(--muted);
  margin: 2rem 0 0.4rem;
}

.post-body blockquote {
  margin: 2.2rem 0 2.2rem 2rem;
  padding: 0;
  color: var(--text);
  font-style: normal;
}
.post-body blockquote p { margin-bottom: 0.6rem; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body blockquote cite {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-style: normal;
  color: var(--muted);
}

.post-body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--dim);
  text-underline-offset: 2px;
}
.post-body a:hover { text-decoration-color: var(--text); }

.post-body strong { font-weight: bold; }
.post-body em     { font-style: italic; }

.post-body hr {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 2.5rem 0;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--code-bg);
  padding: 0.1em 0.32em;
}

.post-body pre {
  background: var(--code-bg);
  border: 1px dashed var(--border);
  padding: 1rem 1.1rem;
  margin: 1.8rem 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
}
.post-body pre code { background: none; padding: 0; }

.post-img {
  max-width: 100%;
  display: block;
  margin: 2rem 0;
}

.post-body ul, .post-body ol { padding-left: 1.2rem; margin-bottom: 1.3rem; }
.post-body li { margin-bottom: 0.25rem; }

/* ── Footnotes ───────────────────────────────────────── */

.footnotes {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.6;
}
.footnotes ol { padding-left: 1.1rem; }
.footnotes li { margin-bottom: 0.35rem; }

/* ── Post footer ─────────────────────────────────────── */

.post-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}
.back-link {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--text); }

/* ── Site footer ─────────────────────────────────────── */

.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ── Archivo (details/summary) ───────────────────────── */

.archive {
  margin-top: 0.2rem;
}

.archive summary {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  user-select: none;
}
.archive summary::-webkit-details-marker { display: none; }
.archive summary::before {
  content: '▸';
  font-size: 0.6rem;
  transition: transform 0.15s;
}
.archive[open] summary::before {
  transform: rotate(90deg);
}
.archive summary:hover { color: var(--text); }
.archive .post-list { margin-top: 0.4rem; }

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 600px) {
  html { font-size: 16px; }
  body { padding: 0 1.2rem; }
  .site-wrap { padding: 2rem 0 3rem; }
  .site-wrap { max-width: 100%; }
  .post-list li {
    flex-direction: column;
    gap: 0.15rem;
    align-items: flex-start;
  }
  .post-meta { display: none; }
  .post-tags { margin-top: 0.15rem; }
  .post-list a { font-size: 0.95rem; line-height: 1.4; }
  .hilo-desc { font-size: 0.8rem; }
  .site-footer { flex-direction: column; gap: 0.4rem; }
}

@media (max-width: 400px) {
  body { padding: 0 1rem; }
  .site-wrap { padding: 1.5rem 0 2.5rem; }
}
