/* hombreimaginario — retro works */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #F5F5F3;
  --surface: #FFFFFF;
  --ink: #141414;
  --text: #262624;
  --soft: #3D3D3A;
  --muted: #5E5E5A;
  --line: #DADAD6;
  --chip: #CFCFCA;
  --code-bg: #E9E9E5;
  --accent: #2F5BEA;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 20px 96px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}
.brand { display: flex; flex-direction: column; gap: 6px; }
.brand-name { font-size: 28px; line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.brand-sub .cursor { color: var(--accent); }
.brand:hover .brand-name { color: var(--ink); }
.site-header.small .brand-name { font-size: 22px; }
.site-header.small .brand-sub { font-size: 13px; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
  font-family: var(--mono);
  font-size: 14px;
}
.site-nav a { color: var(--muted); padding: 12px 0; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 11px; }
.site-nav .sep { width: 1px; height: 18px; background: var(--chip); }
.site-nav .icon { width: 32px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; }
.site-nav .icon svg { width: 18px; height: 18px; fill: currentColor; }
.site-nav .icon.x svg { width: 16px; height: 16px; }

/* Platform filters */
.filters { display: none; gap: 8px; flex-wrap: wrap; }
.js .filters { display: flex; }
.filters button {
  min-height: 36px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--chip);
  color: var(--soft);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
}
.filters button:hover { border-color: var(--accent); color: var(--accent); }
.filters button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.empty { font-family: var(--mono); font-size: 14px; color: var(--muted); margin: 0; }

/* Post list (home) */
.post-list { border-top: 1px solid var(--line); }
.post-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.post-item[hidden] { display: none; }
.post-date { flex: 0 0 120px; font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 4px; }
.post-main { flex: 999 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tags { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.post-title { font-size: 24px; line-height: 1.25; font-weight: 600; margin: 0; }
.post-summary { margin: 0; font-size: 17px; line-height: 1.6; color: var(--soft); }
.post-cover { border: 1px solid var(--line); }
.more { align-self: flex-start; margin-top: -16px; padding: 12px 0; font-family: var(--mono); font-size: 14px; color: var(--accent); }

/* Archive */
.page-head { display: flex; flex-direction: column; gap: 16px; }
.prompt { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.page-title { margin: 0; font-size: 36px; line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; }
.page-lede { margin: 0; font-size: 17px; color: var(--soft); }
.months { display: flex; flex-direction: column; gap: 40px; }
.month[hidden] { display: none; }
.month h2 {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}
.month h2 .count { color: var(--muted); font-weight: 400; }
.month ul { list-style: none; margin: 0; padding: 0; }
.month li[hidden] { display: none; }
.month li a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.month .d { flex: 0 0 96px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.month .t { flex: 999 1 320px; min-width: 0; font-size: 17px; line-height: 1.4; font-weight: 500; }
.month .g { flex: 0 0 auto; font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* Single post */
.post-head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.meta { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.meta .tags { font-size: 13px; }
.post-head h1 { margin: 0; font-size: 40px; line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; }

.prose { display: flex; flex-direction: column; gap: 22px; font-size: 18px; line-height: 1.7; color: var(--text); }
.prose > * { margin: 0; }
.prose h2 { font-size: 26px; line-height: 1.25; font-weight: 600; color: var(--ink); margin-top: 16px; }
.prose h3 { font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--ink); margin-top: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose ul, .prose ol { padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.prose code { font-family: var(--mono); font-size: 0.85em; background: var(--code-bg); padding: 2px 6px; }
.prose pre {
  padding: 20px;
  background: var(--ink);
  color: #E8E8E3;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.prose blockquote { padding-left: 20px; border-left: 2px solid var(--accent); color: var(--soft); font-style: italic; }
.prose figure { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.prose figure img { border: 1px solid var(--line); width: 100%; }
.prose figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.prose .gallery img { border: 1px solid var(--line); width: 100%; }
.prose .status { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.prose .status .label { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.prose .status ul { font-size: 16px; }
.prose .video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Pixel art: keep hard edges when scaled */
img.pixel, .pixel img { image-rendering: pixelated; image-rendering: crisp-edges; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 13px;
}
.post-nav a { color: var(--muted); padding: 12px 0; max-width: 48%; }
.post-nav a:hover { color: var(--accent); }
.post-nav .next { text-align: right; margin-left: auto; }

/* Footer */
.site-footer {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .wrap { padding-top: 40px; gap: 40px; }
  .post-head h1 { font-size: 32px; }
  .page-title { font-size: 30px; }
  .post-nav a { max-width: 100%; }
}
