/* ==========================================================================
   Stránky Honzy Vrbaty – hlavní styl
   Barvy a písma se mění na jednom místě v :root níže.
   ========================================================================== */

:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --ink: #1f1d17;
  --muted: #6b6558;
  --line: #e7e2d6;
  --accent: #a8690f;        /* zlatá – odkaz na původní šablonu „gold“ */
  --accent-soft: #f6ead3;
  --accent-ink: #ffffff;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 52rem;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(31 29 23 / 0.04), 0 8px 24px rgb(31 29 23 / 0.06);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16150f;
    --surface: #1f1d17;
    --ink: #ece7db;
    --muted: #a39c8b;
    --line: #322f26;
    --accent: #e0a83c;
    --accent-soft: #2e2715;
    --accent-ink: #16150f;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

/* ---------- Základ ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--ink); color: var(--bg); padding: 0.5rem 1rem; border-radius: 8px;
}
.skip:focus { left: 0.5rem; z-index: 10; }

/* ---------- Hlavička a menu ---------- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 68rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem; flex-wrap: wrap;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none; font-weight: 650;
}
.brand-mark {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem; border-radius: 9px;
  background: var(--ink); color: var(--accent);
  font-family: var(--font-serif); font-size: 0.95rem; font-weight: 700;
}

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 0.25rem;
}
.site-nav a {
  display: block; padding: 0.4rem 0.75rem; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 0.95rem; white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); font-weight: 600; }

@media (max-width: 52rem) {
  .header-inner { padding-block: 0.6rem 0; }
  .site-nav { width: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: -1.25rem; padding-inline: 1.25rem; width: calc(100% + 2.5rem); }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { padding-bottom: 0.6rem; }
}

/* ---------- Úvodní hero ---------- */

.hero { padding-block: clamp(3rem, 8vw, 5.5rem) 2.5rem; }

.hero-inner {
  display: grid; grid-template-columns: auto 1fr; gap: 2.25rem; align-items: center;
}
.hero-photo {
  width: 150px; height: 185px; object-fit: cover;
  border-radius: 18px; box-shadow: var(--shadow);
  outline: 1px solid var(--line); outline-offset: 4px;
  rotate: -2deg;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.05; margin: 0.1em 0 0.3em; letter-spacing: -0.01em;
}

@media (max-width: 36rem) {
  .hero-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-photo { width: 120px; height: 148px; }
}

.eyebrow {
  margin: 0; color: var(--accent);
  font-size: 0.8rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
}
.eyebrow a { text-decoration: none; }

.lead { margin: 0; font-size: 1.2rem; color: var(--muted); max-width: 38rem; }

/* ---------- Karty (rozcestník) ---------- */

.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 1rem; margin-bottom: 3rem;
}
.card {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1.35rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.card h2 { margin: 0.4rem 0 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; flex: 1; }
.card-icon {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent);
}
.card-more { margin-top: 0.5rem; color: var(--accent); font-size: 0.9rem; font-weight: 600; }

/* ---------- Záhlaví podstránky ---------- */

.page-header { padding-block: clamp(2.5rem, 7vw, 4.5rem) 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1;
  margin: 0.2em 0 0.35em; letter-spacing: -0.01em;
}

/* ---------- Obsah (Markdown) ---------- */

.prose { padding-bottom: 4rem; }
.prose::after { content: ""; display: table; clear: both; }

.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.65rem; line-height: 1.25; margin: 2.5rem 0 0.75rem;
}
.prose h3 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 650; }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--accent-soft); padding: 0.1em 0.35em; border-radius: 5px; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.2rem; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* Obrázky v textu: <img class="float-right" ...> nebo class="float-left" */
.float-right, .float-left {
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.float-right { float: right; margin-left: 2rem; }
.float-left  { float: left;  margin-right: 2rem; }
@media (max-width: 36rem) {
  .float-right, .float-left { float: none; display: block; margin: 0 auto 1.5rem; max-width: 60%; }
}

/* Tlačítka: <a class="button" href="..."> */
.button {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border: 1px solid var(--accent);
}
.button:hover { filter: brightness(1.08); }
.button-ghost { background: transparent; color: var(--accent); }
.button-ghost:hover { background: var(--accent-soft); filter: none; }

.downloads { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0 1.5rem; }
.downloads .button::before { content: "↓"; }
.cta { margin-top: 2.5rem; }

/* Seznam publikací */
.publications ul { list-style: none; padding: 0; counter-reset: pub; }
.publications li {
  position: relative; padding: 0.9rem 0 0.9rem 2.6rem; margin: 0;
  border-top: 1px solid var(--line); font-size: 0.97rem;
  counter-increment: pub;
}
.publications li::before {
  content: counter(pub); position: absolute; left: 0; top: 0.95rem;
  width: 1.8rem; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.85rem;
}
.publications strong { display: block; color: var(--ink); }

/* Časová osa (kapely) */
.timeline { border-left: 2px solid var(--line); padding-left: 1.5rem; margin-left: 0.4rem; }
.timeline h3 { position: relative; margin-top: 1.75rem; }
.timeline h3::before {
  content: ""; position: absolute; left: calc(-1.5rem - 7px); top: 0.35em;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.when { margin-left: 0.5rem; color: var(--muted); font-weight: 400; font-size: 0.9rem; }

/* ---------- Patička ---------- */

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-block: 1.5rem; }
.footer-inner p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
