/* ============================================================
   ui-hugo content layer
   Blog layouts (feed, article, tags) built on the enoki tokens.
   Loaded after enoki.css.
   ============================================================ */

/* ---------- post feed (home / list / term) ---------- */

.en-feed { display: flex; flex-direction: column; }

.en-feed-item {
  display: grid;
  grid-template-columns: 108px 1fr 24px;
  gap: 22px;
  align-items: baseline;
  /* andryo 2026-09-17: the inner content needs left/right padding, not the
     highlight. The row background stays full width; the text is inset. */
  padding: 22px 16px;
  color: inherit;
  text-decoration: none;
  transition: background 0.12s ease;
}
/* first row: the section header rule is the top edge; no double line */
.en-feed-item:first-child { border-top: none; }
.en-feed-item:not(:first-child) { border-top: 1px solid var(--en-line); }
.en-feed-item:last-child { border-bottom: 1px solid var(--en-line); }
.en-feed-item:hover { background: var(--en-paper2); }
.en-feed-item:hover .en-feed-title { color: var(--en-accent); }

.en-feed-when {
  font-family: var(--en-ui);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--en-ink2);
}
.en-feed-title {
  display: block;
  font-family: var(--en-disp);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.en-feed-desc {
  display: block;
  margin-top: 7px;
  font-family: var(--en-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--en-ink2);
}
.en-feed-more { margin-top: 26px; }
.en-feed-page { margin-top: 26px; display: flex; justify-content: flex-end; }

/* ---------- tag clouds (taxonomy + article tags) ---------- */

.en-tags { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.en-tag {
  font-family: var(--en-ui);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border: 1px solid var(--en-line);
  background: var(--en-paper2);
  color: var(--en-ink);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.en-tag:hover { background: var(--en-ink); color: var(--en-paper); }
.en-tag-count {
  font-family: var(--en-ui);
  font-size: 11px;
  color: var(--en-ink2);
  margin-right: 8px;
}

/* ---------- article (single) ---------- */

/* the en-breadcrumbs host is display:contents, so a margin on it is
   ignored by layout — the top clearance must be padding on the article
   box (margins would also collapse through it to <main>'s padding). */
.en-article { max-width: 780px; margin: 0 auto; padding-top: 84px; }
/* The article page stacks many composited layers (fixed topbar/grid/rail,
   7 WebGL map canvases, the giscus iframe). On some GPUs Chrome loses the
   paint of static content near the top when scrolling back up after a
   layer invalidation off-screen ("breadcrumbs disappear" bug). Promoting
   the crumbs to their own compositor layer keeps the compositor in charge
   of that region instead of the main-frame paint. */
en-article nav.en-crumbs { transform: translateZ(0); }
/* Name hero: Anton stays (andryo 2026-09-17: old font ok) but calmer -
   smaller scale, thinner hollow stroke. Scoped to en-hero so the article
   keeps Oswald. */
en-hero {
  --en-disp: "Anton", "Oswald", sans-serif;
  --en-f-hero: clamp(60px, 9vw, 120px); /* 2026-09-17: 120px desktop / 60px mobile (andryo) */
}
en-hero .en-hero-h1 {
  font-weight: 400; /* same synthetic-bold fix as the stamp (2026-09-17) */
}
/* GO BUILD footer stamp: Anton with the name hero (andryo 2026-09-17). */
en-footer .en-footer-stamp {
  --en-disp: "Anton", sans-serif;
  font-weight: 400; /* Anton is 400-only: 800 triggers Chrome synthetic bold,
                       which draws the hollow stroke once per sub-sampled
                       copy and unions it to ~3.5x the set width (2026-09-17) */
}
/* figure plates (en-bar / en-line render a figure.en-diagram in light DOM) */
.en-content en-bar,
.en-content en-line {
  display: block;
  margin: 52px 0 60px;
}
/* Figures stay inside the article text column at every viewport
   (andryo, 2026-09-10: no full-bleed breakout — figures wider than
   the 780px column read as off-grid). Consequence: in-figure text
   scales with the column (~0.65x at 780px); the 12px SVG-unit font
   floor still applies, and authored fonts can be boosted if a
   figure looks dense at column width. */
.en-article-head { margin: 44px 0 60px; }
.en-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--en-ui);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--en-ink2);
}
.en-article-date { color: var(--en-accent); }
.en-article-title {
  margin: 30px 0 18px;
  font-family: var(--en-disp);
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 0.98;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.en-article-desc {
  margin: 0;
  font-family: var(--en-ui);
  font-size: 19px;
  line-height: 1.5;
  color: var(--en-ink2);
}
.en-article-tags { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.en-article-cover {
  display: block;
  width: 100%;
  margin-top: 44px;
  border: 1px solid var(--en-line);
  box-shadow: var(--en-sh-4);
}
.en-rule { border: none; border-top: 1px solid var(--en-line); margin: 88px 0 40px; }

/* ---------- article body typography ---------- */

.en-content {
  font-family: var(--en-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--en-ink);
}
.en-content h2 {
  margin: 80px 0 20px;
  font-family: var(--en-disp);
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.en-content h3 { margin: 56px 0 14px; font-family: var(--en-ui); font-weight: 700; font-size: 20px; }
.en-content p { margin: 0 0 28px; }
.en-content a { color: var(--en-accent); text-underline-offset: 3px; }
.en-content ul, .en-content ol { margin: 0 0 28px; padding-left: 26px; }
.en-content li { margin: 10px 0; }
.en-content li::marker { color: var(--en-accent); }
.en-content blockquote {
  margin: 44px 0;
  padding: 14px 22px;
  border-left: 3px solid var(--en-accent);
  background: var(--en-paper2);
  font-style: italic;
}
/* Softened 2026-09-17 (andryo: the 1px border made it read as a tag) -
   tinted chip, no outline. */
.en-content code {
  font-family: var(--en-mono);
  font-size: 0.88em;
  padding: 2px 5px;
  background: var(--en-paper2);
  border-radius: 2px;
}
.en-content pre {
  margin: 0 0 36px;
  padding: 18px 20px;
  border: 1px solid var(--en-line);
  box-shadow: var(--en-sh-3);
  background: var(--en-ink);
  color: var(--en-paper);
  overflow-x: auto;
}
.en-content pre code { padding: 0; border: none; background: none; color: inherit; }
.en-content table { width: 100%; margin: 0 0 24px; border-collapse: collapse; font-size: 15px; }
.en-content th {
  font-family: var(--en-ui);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  background: var(--en-paper2);
}
.en-content th, .en-content td { border: 1px solid var(--en-line); padding: 10px 12px; }
.en-content img { max-width: 100%; margin: 10px 0 4px; border: 1px solid var(--en-line); }
.en-content img.about-avatar { display: block; margin: 0 auto 24px; border-radius: 50%; }
.en-content figure { margin: 0 0 26px; }
.en-content figcaption {
  margin-top: 8px;
  text-align: center;
  font-family: var(--en-ui);
  font-size: 12px;
  color: var(--en-ink2);
}
.en-content hr { border: none; border-top: 1px solid var(--en-line); margin: 44px 0; }
.en-content strong { font-weight: 700; }

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  .en-feed-item { grid-template-columns: 1fr; gap: 6px; }
  .en-feed-when { order: -1; }
  .en-feed-item en-icon { display: none; }
  .en-feed-title { font-size: 22px; }
  /* Wide data tables scroll sideways instead of crushing columns. */
  .en-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}
