/* latin-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/SourceSans3-italic-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/SourceSans3-italic-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/SourceSans3-normal-400-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/SourceSans3-normal-400-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* pavelrichter.net – základní vzhled archivu (úvodní stránka se bude dělat zvlášť). Světlý i tmavý režim podle systému. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --fg: #1d1c1a;
  --muted: #6b675f;
  --line: #e4e0d8;
  --accent: #1f5ea8;
  --accent-hover: #164a86;
  --code: #f1eee8;
  --max: 46rem;
  --wide: 64rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151513;
    --surface: #1d1d1b;
    --fg: #ebe8e1;
    --muted: #a19c92;
    --line: #34332f;
    --accent: #8ab8f0;
    --accent-hover: #b3d1f6;
    --code: #262522;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151513;
  --surface: #1d1d1b;
  --fg: #ebe8e1;
  --muted: #a19c92;
  --line: #34332f;
  --accent: #8ab8f0;
  --accent-hover: #b3d1f6;
  --code: #262522;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.65 "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-wrap: break-word;
}
a { color: var(--accent); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }

/* hlavička a patička */
.site-head { border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--fg); text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--fg); }
.nav a[aria-current] { text-decoration: underline; text-underline-offset: 0.35em; }
.site-foot { border-top: 1px solid var(--line); margin-top: 4rem; color: var(--muted); font-size: 0.9rem; }
.site-foot p { margin: 1.25rem 0 2rem; }

/* úvod (dočasný základ) */
.home { min-height: 55vh; display: flex; flex-direction: column; justify-content: center; padding-top: 4rem; padding-bottom: 2rem; }
.home-name { font-size: clamp(2.6rem, 9vw, 5.5rem); margin: 0 0 1.5rem; letter-spacing: -0.03em; }
.home-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 1.15rem; }

/* výpisy */
.list-wrap, .post-wrap, .page-wrap { max-width: var(--max); padding-top: 2rem; }
.list-head h1 { font-size: 2.1rem; margin: 0.2rem 0 0.75rem; }
.kicker { margin: 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.kicker a { color: inherit; text-decoration: none; }
.lead { font-size: 1.15rem; }
.topics { color: var(--muted); font-size: 0.95rem; }
.item { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.item h2 { font-size: 1.35rem; margin: 0.2rem 0 0.4rem; }
.item h2 a { color: var(--fg); text-decoration: none; }
.item h2 a:hover { color: var(--accent); }
.item p { margin: 0.3rem 0; }
.post-meta { color: var(--muted); font-size: 0.92rem; margin: 0; }
.post-meta a { color: inherit; }
.pager { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.pager .newer { margin-left: auto; }
.pager.numbers { justify-content: center; flex-wrap: wrap; }
.pager.numbers a { padding: 0.15rem 0.6rem; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; }
.pager.numbers a[aria-current] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.block { margin-top: 2.5rem; }
.block h2 { font-size: 1.45rem; }
.year { font-size: 1.2rem; margin: 1.75rem 0 0.4rem; color: var(--muted); }
.titles { list-style: none; padding: 0; margin: 0; }
.titles li { padding: 0.3rem 0; border-top: 1px solid var(--line); display: flex; gap: 0.75rem; align-items: baseline; }
.titles time { color: var(--muted); font-size: 0.9rem; min-width: 3.2rem; font-variant-numeric: tabular-nums; }
.titles.dated time { min-width: 8.5rem; }

/* článek */
.post-head h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0.3rem 0 1.25rem; }
.prose { font-size: 1.0625rem; }
.prose h2 { font-size: 1.45rem; margin: 2rem 0 0.6rem; }
.prose h3 { font-size: 1.2rem; margin: 1.6rem 0 0.5rem; }
.prose img { border-radius: 2px; }
.prose figure { margin: 1.25rem 0; }
.prose figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; }
.prose table { border-collapse: collapse; margin: 1.25rem 0; width: 100%; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 0.35rem 0.6rem; vertical-align: top; }
.prose blockquote { margin: 1.25rem 0; padding-left: 1rem; border-left: 3px solid var(--line); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose code, .prose pre { background: var(--code); border-radius: 3px; }
.prose .alignright, .prose .float-r { float: right; margin: 0.3rem 0 1rem 1.25rem; max-width: 45%; }
.prose .alignleft, .prose .float-l { float: left; margin: 0.3rem 1.25rem 1rem 0; max-width: 45%; }
.prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose .float-r img, .prose .float-l img { display: block; }
.prose .clear { clear: both; }
.prose .strike { text-decoration: line-through; }
.prose .framed { border: 1px solid var(--line); }
.prose .perex { font-size: 1.12rem; }
.prose .img-lost { display: inline-block; font-size: 0.85rem; color: var(--muted); border: 1px dashed var(--line); padding: 0.3rem 0.6rem; margin: 0.3rem 0; }
@media (max-width: 34rem) {
  .prose .alignright, .prose .alignleft, .prose .float-r, .prose .float-l { float: none; margin: 1rem 0; max-width: 100%; }
}
.post-tags { color: var(--muted); font-size: 0.92rem; margin-top: 2rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.5rem 0 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.post-nav a { text-decoration: none; display: flex; flex-direction: column; }
.post-nav small { color: var(--muted); }
.post-nav .next { text-align: right; }

/* video a přehrávače: načtou se až po kliknutí */
.video a, .audio a { display: block; position: relative; background: #000; border-radius: 4px; overflow: hidden; color: #fff; text-decoration: none; }
.video img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.85; }
.video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.72); padding: 0.55rem 1rem; border-radius: 4px; white-space: nowrap; }
.audio a { min-height: 5rem; background: #2a2926; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.audio iframe, .audio-frame { width: 100%; height: 450px; border: 0; display: block; }

/* komentáře */
.comments { margin-top: 2.5rem; }
.comments h2 { font-size: 1.3rem; }
.comment { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.comment-head { margin: 0 0 0.3rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.who { font-weight: 600; }
.when { color: var(--muted); font-size: 0.88rem; }
.comment .text p { margin: 0.35rem 0; }
.replies { margin-left: 1.25rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.closed { color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.pings ul { padding-left: 1.2rem; color: var(--muted); }

/* fotoblog */
.photo-wrap { max-width: 52rem; padding-top: 2rem; }
.fb-name { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 0.2rem 0 0.6rem; }
.fb-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.fb-nav a { text-decoration: none; }
.en { color: var(--muted); font-weight: 400; }
.photo-title { font-size: 1.6rem; margin: 0.5rem 0 0.3rem; }
.photo-card .photo-title { font-size: 1.35rem; }
.photo-title a { color: var(--fg); text-decoration: none; }
.photo-frame { margin: 1rem 0; }
.photo-frame img { display: block; border-radius: 2px; }
.photo-desc { margin: 0.3rem 0; }
.photo-desc.en { font-size: 0.95rem; }
.photo-card { padding: 1rem 0 1.5rem; border-bottom: 1px solid var(--line); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.6rem; }
.thumbs img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
dl.links dt { font-weight: 600; margin-top: 1rem; }
dl.links dd { margin: 0.2rem 0 0; }
