/*--------------------------------------------------------------
# Antifikce — blogová rubrika (/af/)
# Samostatný minimalistický layout. Nezávisí na main.css ani bootstrapu,
# ale drží fonty a barvy zbytku webu (Space Grotesk / JetBrains Mono, #000 akcent).
--------------------------------------------------------------*/

:root {
  --af-background: #ffffff;
  --af-text: #2e2e2e;
  --af-heading: #111111;
  --af-muted: #8a8a8a;
  --af-rule: #e6e6e6;
  --af-accent: #000000;
  --af-body-font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --af-mono-font: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --af-measure: 43.2rem;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--af-background);
  color: var(--af-text);
  font-family: var(--af-body-font);
  font-size: 1.0625rem;
  line-height: 1.72;
  font-weight: 350;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.af-wrap {
  max-width: var(--af-measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--af-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--af-rule);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

a:hover { text-decoration-color: var(--af-accent); }

/*--------------------------------------------------------------
# Hlavička
--------------------------------------------------------------*/
.af-header {
  padding: 3.25rem 0 0;
}

.af-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 2.75rem;
}

.af-sitename {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.af-sitename img {
  display: block;
  height: 15px;
  width: auto;
}

.af-back {
  font-family: var(--af-mono-font);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--af-muted);
  text-decoration: none;
}

.af-back:hover { color: var(--af-accent); }

/* Titulní blok rubriky (jen na indexu) */
.af-masthead {
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--af-rule);
}

.af-masthead img {
  display: block;
  width: 100%;
  max-width: 15rem;
  height: auto;
  margin: 0 auto 1.75rem;
}

.af-masthead p {
  margin: 0;
  color: var(--af-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.af-masthead p + p { margin-top: 0.85rem; }

.af-masthead strong { font-weight: 500; color: var(--af-text); }

/*--------------------------------------------------------------
# Archiv
--------------------------------------------------------------*/
.af-archive { padding: 1rem 0 0; }

.af-year {
  margin: 2.5rem 0 0.25rem;
  font-family: var(--af-mono-font);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--af-muted);
}

.af-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.af-list li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--af-rule);
}

.af-entry-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.af-date {
  flex: 0 0 auto;
  font-family: var(--af-mono-font);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--af-muted);
  white-space: nowrap;
}

.af-entry-title {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--af-heading);
  text-decoration: none;
}

.af-entry-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.af-entry-lead {
  margin: 0.4rem 0 0;
  padding-left: calc(4.5rem + 1rem);
  color: var(--af-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

@media (max-width: 34rem) {
  .af-entry-head { flex-direction: column; gap: 0.2rem; }
  .af-entry-lead { padding-left: 0; }
}

/*--------------------------------------------------------------
# Post
--------------------------------------------------------------*/
.af-post { padding: 0 0 1rem; }

.af-post-header {
  padding-bottom: 2.25rem;
}

.af-post-meta {
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--af-mono-font);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--af-muted);
}

.af-post-meta .af-sep { padding: 0 0.5rem; opacity: 0.5; }

.af-post h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--af-heading);
}

.af-standfirst {
  margin: 1.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--af-rule);
  color: var(--af-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.af-standfirst em { font-style: italic; }

.af-body > p:first-child { margin-top: 0; }

.af-body p {
  margin: 0 0 1.5rem;
  text-indent: 1.5em;
}

.af-body strong { font-weight: 600; color: var(--af-heading); }

.af-body em { font-style: italic; }

.af-body h2 {
  margin: 2.75rem 0 1rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--af-heading);
}

.af-rule {
  width: 100%;
  height: 1px;
  margin: 2.75rem 0;
  border: 0;
  background: var(--af-rule);
}

/* Můstek na povídku — pointa textu */
.af-bridge {
  margin: 2.75rem 0 0;
  padding: 1.35rem 0 0;
  border-top: 1px solid var(--af-rule);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--af-text);
}

/* Zdroje */
.af-sources {
  margin: 2.75rem 0 0;
  padding-top: 1.35rem;
  border-top: 1px solid var(--af-rule);
}

.af-sources h2 {
  margin: 0 0 0.85rem;
  font-family: var(--af-mono-font);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--af-muted);
}

.af-sources ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.af-sources li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.af-sources a { color: var(--af-text); }

/*--------------------------------------------------------------
# Patička
--------------------------------------------------------------*/
.af-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 4rem;
  border-top: 1px solid var(--af-rule);
}

.af-footer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  font-family: var(--af-mono-font);
  font-size: 0.75rem;
  color: var(--af-muted);
}

.af-footer-row > :last-child { text-align: right; }

.af-footer-row a { color: var(--af-muted); text-decoration: none; }

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

.af-footer-row p { margin: 0; }

/* Střed patičky: ikony + přepínač jazyků */
.af-footer-mid {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.af-social {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.af-social a {
  display: inline-flex;
  align-items: center;
  color: var(--af-muted);
  text-decoration: none;
}

.af-social a:hover { color: var(--af-accent); }

.af-social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.af-lang {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--af-rule);
  border-radius: 2px;
  overflow: hidden;
  font-family: var(--af-mono-font);
  font-size: 0.6875rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.af-lang-item {
  padding: 0.32rem 0.42rem 0.28rem;
  color: var(--af-muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.af-lang-item.is-active {
  background: #f2f2f2;
  color: #5f5f5f;
}

.af-lang:hover { border-color: #d5d5d5; }

.af-lang:hover .af-lang-item:not(.is-active) {
  background: #fafafa;
  color: var(--af-accent);
}

@media (max-width: 34rem) {
  .af-header { padding-top: 2.25rem; }
  .af-post h1 { font-size: 1.5rem; }
  .af-footer-row { grid-template-columns: 1fr; justify-items: center; gap: 0.85rem; text-align: center; }
  .af-footer-row > :last-child { text-align: center; }
}
