/* MyBlog — jednotný design pro MyEgo.cz / MyAndroid.cz / MyWindows.cz
   Tmavě fialový brand dle MyInvoice, light + dark téma (data-theme na <html>). */

/* ---------- fonty (lokální, OFL) ---------- */
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/SourceSans3-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/SourceSans3-Bold.ttf') format('truetype');
  font-weight: 600 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/SourceSans3-It.ttf') format('truetype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Cascadia Mono';
  src: url('/assets/fonts/CascadiaMono.ttf') format('truetype');
  font-weight: 350 700; font-style: normal; font-display: swap;
}

/* ---------- tokeny ---------- */
:root {
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Mono', Consolas, 'Courier New', monospace;

  --primary: #6753AE;
  --primary-dark: #3B2D83;
  --primary-deep: #2A2060;
  --primary-soft: #efeafd;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --link: #5C45A0;

  --bg: #f6f4fb;
  --bg-glow: #e7e0f6;
  --panel: #ffffff;
  --panel-soft: #faf8fe;
  --border: #e7e3f2;
  --text: #26222f;
  --heading: #16131f;
  --muted: #5d5775;
  --nav: #3c3653;
  --mark: #fde68a;

  --code-bg: #1b1726;
  --code-text: #e2dcf3;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(59, 45, 131, .06);
  --shadow: 0 8px 26px rgba(59, 45, 131, .09);
  --shadow-lg: 0 18px 48px rgba(59, 45, 131, .14);
  --header-bg: rgba(246, 244, 251, .82);
}

[data-theme="dark"] {
  --primary: #8b78d8;
  --primary-dark: #c4b5fd;
  --primary-deep: #221a4d;
  --primary-soft: rgba(124, 108, 210, .18);
  --accent: #fbbf24;
  --accent-soft: rgba(245, 158, 11, .14);
  --link: #a795e8;

  --bg: #131019;
  --bg-glow: #251d3e;
  --panel: #1c1827;
  --panel-soft: #211c2e;
  --border: #2c2640;
  --text: #d9d4e6;
  --heading: #f3f0fa;
  --muted: #9a93b3;
  --nav: #c5beda;
  --mark: #7c5e0b;

  --code-bg: #161221;
  --code-text: #ddd7ee;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow: 0 8px 26px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
  --header-bg: rgba(19, 16, 25, .82);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1100px 520px at 75% -120px, var(--bg-glow) 0%, transparent 68%),
    radial-gradient(700px 420px at -10% 30%, color-mix(in srgb, var(--bg-glow) 55%, transparent) 0%, transparent 70%);
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
.main { flex: 1; width: 100%; padding-top: 34px; padding-bottom: 70px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* ---------- topline (elegantní pás: tmavý fialový nádech, zlaté detaily) ---------- */
.topline {
  position: relative;
  background: linear-gradient(115deg, #110d1f 0%, #181230 55%, #221a45 100%);
  color: rgba(255, 255, 255, .9);
  font-size: 13.5px;
  border-bottom: 1px solid rgba(212, 175, 106, .28);
}
.topline-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; padding-top: 7px; padding-bottom: 7px; }
.site-switch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-link {
  color: rgba(255, 255, 255, .68); text-decoration: none;
  font-size: 14.5px; letter-spacing: .01em; line-height: 1.7; font-weight: 400;
  padding: 3px 13px; border-radius: 999px;
  transition: color .15s, background .15s;
}
.site-link b { font-weight: 700; }
.site-link.current b { color: #cdbdf7; }
[data-theme="light"] .site-link.current b { color: var(--primary); }
.site-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.site-link.current {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 106, .4);
}
.site-link.current::before {
  content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: #d4af6a; margin-right: 8px; vertical-align: 2.5px;
  box-shadow: 0 0 6px rgba(212, 175, 106, .8);
}
.topline-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tl-link {
  color: rgba(255, 255, 255, .78); text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  transition: color .15s;
}
.tl-link:hover { color: #f3cd8d; }
.tl-sep { width: 1px; height: 14px; background: rgba(255, 255, 255, .22); }
.tl-cv {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 14px 3px 4px; border-radius: 999px;
  color: #f7e3bb; text-decoration: none; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(115deg, rgba(212, 175, 106, .28), rgba(212, 175, 106, .08));
  border: 1px solid rgba(212, 175, 106, .55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  transition: box-shadow .15s, border-color .15s, color .15s;
}
.tl-cv img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px rgba(212, 175, 106, .7); }
.tl-cv:hover { color: #ffe9c2; border-color: rgba(212, 175, 106, .9); box-shadow: 0 0 14px rgba(212, 175, 106, .35); }
.tl-cv-static { cursor: default; }
.tl-cv-current { box-shadow: 0 0 16px rgba(212, 175, 106, .5); border-color: rgba(212, 175, 106, .95); color: #ffe9c2; }

/* CV-only doména (radekhulan.cz): foto v hlavičce, bez menu */
.brand-photo { border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--accent); }
.site-header-cv .header-row { padding-bottom: 18px; }
.site-header-cv .brand-name { font-size: 21px; font-weight: 700; color: var(--heading); letter-spacing: -.01em; }

/* světlá varianta toplinu (dark zůstává výchozí výše) */
[data-theme="light"] .topline {
  background: linear-gradient(115deg, #f6f2fb 0%, #efe9f9 55%, #e9e1f7 100%);
  color: rgba(22, 19, 31, .85);
  border-bottom-color: rgba(176, 138, 64, .35);
}
[data-theme="light"] .site-link { color: rgba(22, 19, 31, .82); }
[data-theme="light"] .site-link:hover { color: var(--heading); background: rgba(59, 45, 131, .07); }
[data-theme="light"] .site-link.current {
  color: var(--heading);
  background: rgba(59, 45, 131, .08);
  box-shadow: inset 0 0 0 1px rgba(176, 138, 64, .5);
}
[data-theme="light"] .site-link.current::before { background: #b8893a; box-shadow: 0 0 6px rgba(184, 137, 58, .7); }
[data-theme="light"] .tl-link { color: rgba(22, 19, 31, .82); }
[data-theme="light"] .tl-link:hover { color: #a8762a; }
[data-theme="light"] .tl-sep { background: rgba(22, 19, 31, .18); }
[data-theme="light"] .tl-cv {
  color: #7a5417;
  background: linear-gradient(115deg, rgba(212, 175, 106, .3), rgba(212, 175, 106, .1));
  border-color: rgba(176, 138, 64, .6);
  box-shadow: 0 2px 10px rgba(59, 45, 131, .08);
}
[data-theme="light"] .tl-cv:hover { color: #5c3d0e; border-color: rgba(176, 138, 64, .9); box-shadow: 0 0 14px rgba(212, 175, 106, .45); }
[data-theme="light"] .tl-cv img { box-shadow: 0 0 0 1.5px rgba(176, 138, 64, .8); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 24px; padding-bottom: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 17px; text-decoration: none; color: var(--text); }
.brand-logo { width: 48px; height: 48px; border-radius: 11px; box-shadow: var(--shadow-sm); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: 23px; font-weight: 700; letter-spacing: -.02em; color: var(--heading); }
.brand-name b { color: var(--primary); }
.brand-name i { font-style: normal; color: var(--muted); font-weight: 600; }
.brand-claim { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.header-tools { display: flex; align-items: center; gap: 10px; }

.search-mini {
  display: flex; align-items: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 13px; color: var(--muted); transition: box-shadow .15s, border-color .15s;
}
.search-mini:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-mini input { border: 0; background: transparent; outline: 0; color: var(--text); font: inherit; font-size: 14.5px; width: 130px; }

.theme-switch { display: flex; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.theme-switch button {
  display: grid; place-items: center; width: 30px; height: 27px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
}
.theme-switch button:hover { color: var(--primary); }
.theme-switch button.active { background: var(--primary-soft); color: var(--primary); }

.nav-row { padding-bottom: 0; }
.main-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  white-space: nowrap; text-decoration: none; color: var(--nav);
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  padding: 8px 12px 10px; border-bottom: 2.5px solid transparent;
}
.main-nav a:hover { color: var(--heading); }
.main-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.nav-rss { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }

/* ---------- nadpisy stránek, chips ---------- */
.page-head { margin: 6px 0 26px; }
.page-head h1 { font-size: clamp(28px, 4.6vw, 38px); line-height: 1.12; letter-spacing: -.025em; color: var(--heading); margin: 0 0 6px; }
.page-sub { color: var(--muted); margin: 0; font-size: 16.5px; }
.chip {
  display: inline-block; padding: 1px 11px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 600; text-decoration: none; letter-spacing: .01em;
}
.chip:hover { background: var(--primary); color: #fff; }
.chip-tag { background: var(--accent-soft); color: var(--accent); }
.chip-tag:hover { background: var(--accent); color: #fff; }
.chip-edit { background: transparent; box-shadow: inset 0 0 0 1px var(--primary); }
.chip-edit:hover { background: var(--primary); color: #fff; }
.empty-note { color: var(--muted); }
.crumb-current { color: var(--heading); font-weight: 600; }
.cat-strip { display: flex; gap: 8px; flex-wrap: wrap; margin: -10px 0 24px; }
.cat-strip .chip { padding: 4px 14px; font-size: 13.5px; }
.chip-count { opacity: .65; font-weight: 400; margin-left: 3px; }

/* ---------- výpis článků ---------- */
.post-list { display: flex; flex-direction: column; gap: 22px; }
.post-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 30px 20px; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.post-meta { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.post-meta time { letter-spacing: .02em; }
.post-title { margin: 7px 0 10px; font-size: clamp(21px, 3vw, 27px); line-height: 1.22; letter-spacing: -.02em; }
.post-title a { color: var(--heading); text-decoration: none; }
.post-title a:hover { color: var(--primary); }
.post-detail-title { margin: 10px 0 0; font-size: clamp(29px, 5vw, 42px); line-height: 1.1; letter-spacing: -.03em; color: var(--heading); }
.post-author { font-weight: 600; }
.post-perex { color: var(--text); margin: 4px 0 10px; }
.post-foot { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--border); font-size: 14.5px; }
.readmore { font-weight: 700; text-decoration: none; }
.post-comments { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; }
.post-comments:hover { color: var(--primary); }

/* ---------- detail článku ---------- */
.post-detail {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 34px 38px 28px; box-shadow: var(--shadow-sm);
}
.post-head { margin-bottom: 18px; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--border); }

/* ---------- tělo článku (itembody) ---------- */
.itembody { font-size: 17.5px; overflow-wrap: break-word; }
.itembody > :first-child { margin-top: 0; }
.itembody p { margin: 0 0 1em; }
.itembody h2, .itembody h3, .itembody h4 { color: var(--heading); letter-spacing: -.015em; line-height: 1.25; margin: 1.5em 0 .55em; }
.itembody h2 { font-size: 24px; }
.itembody h3 { font-size: 20px; }
.itembody h4 { font-size: 17.5px; }
.itembody blockquote {
  margin: 1.2em 0; padding: 10px 20px;
  border-left: 3px solid var(--primary); background: var(--panel-soft);
  border-radius: 0 10px 10px 0; color: var(--muted); font-style: italic;
}
.itembody ul, .itembody ol { padding-left: 1.4em; margin: 0 0 1em; }
.itembody img { border-radius: 10px; }
.itembody table { border-collapse: collapse; margin: 1em 0; max-width: 100%; display: block; overflow-x: auto; }
.itembody td, .itembody th { border: 1px solid var(--border); padding: 6px 12px; }
.itembody iframe { max-width: 100%; border: 0; }
.itembody hr { border: 0; border-top: 1px dashed var(--border); margin: 1.6em 0; }

/* embed (video, pdf) */
.embed { margin: 1.3em 0; }
.embed-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.embed-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.embed-pdf object { width: 100%; height: 740px; border-radius: 12px; border: 1px solid var(--border); }
.embed-fallback { color: var(--muted); }
.legacy-flash { color: var(--muted); font-size: 14.5px; }

/* album vložené do článku + mřížky galerie */
.album-embed { margin: 1.4em 0; }
.album-embed-title { font-weight: 700; color: var(--heading); margin-bottom: 10px; font-size: 17px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.album-grid a { display: block; border-radius: 10px; overflow: hidden; line-height: 0; border: 1px solid var(--border); background: var(--panel-soft); }
.album-grid img { width: 100%; height: 132px; object-fit: cover; transition: transform .25s ease; }
.album-grid a:hover img { transform: scale(1.06); }
.album-grid-page { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.album-grid-page img { height: 170px; }
.album-grid-page a { position: relative; }
.foto-label { display: none; }

/* ---------- LEGACY třídy ze starých článků (musí fungovat) ---------- */
.itembody .box { margin: .9em auto 22px; text-align: center; clear: both; }
.itembody .box img, .itembody .box object, .itembody .box iframe { display: block; margin: 0 auto 6px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.leftbox { float: left; margin: 4px 18px 10px 0; max-width: 48%; }
.rightbox { float: right; margin: 4px 0 10px 18px; max-width: 48%; }
.leftbox img, .rightbox img { border-radius: 10px; box-shadow: var(--shadow-sm); }
.itembody .center, .itembody p.center, div.center { text-align: center; }
div.center iframe { margin: 5px auto; }
.itembody .left, .itembody p.left { text-align: left; }
.itembody .right, .itembody p.right { text-align: right; }
.b { font-weight: 700; }
.i { font-style: italic; }
.z { font-style: normal; font-variant: small-caps; }
.u, .underline { text-decoration: underline; }
.c, .r { color: #c2410c; }
[data-theme="dark"] .c, [data-theme="dark"] .r { color: #fb923c; }
.m, .l { color: var(--primary); }
.strikethrough { text-decoration: line-through; }
.skip, .none, .displaynone { display: none; }
div.mainimage { margin: 8px auto; text-align: center; }
a.wp { padding-left: 20px; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="15" height="15"><path fill="%236753AE" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 1.8a8.2 8.2 0 1 1 0 16.4 8.2 8.2 0 0 1 0-16.4zM6 8l2.6 8h.1l1.8-5.3L12.3 16h.1L15 8h-1.4l-1.6 5.4L10.3 8h-.9L7.7 13.4 6.2 8H6z"/></svg>') left center no-repeat; }
.clearer, .splitter1, .splitter5, .splitter10, .splitter15 { clear: both; display: block; height: 1px; line-height: 1px; }
.hand { cursor: pointer; }

/* staré kódové bloky .codetop/.codemain + nové .codeblock */
.codetop {
  background: linear-gradient(115deg, var(--primary-deep), var(--primary-dark));
  color: #d9d2f5; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 12px 12px 0 0; margin-top: 1.3em;
}
.codetop + .codemain, .codetop + pre.codeblock, .codetop + .codemain pre { margin-top: 0 !important; border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.codemain, pre.codeblock {
  background: var(--code-bg); color: var(--code-text);
  font-family: var(--font-mono); font-size: 14px; line-height: 1.6;
  padding: 16px 20px; border-radius: 12px; overflow-x: auto; margin: 1.3em 0;
  box-shadow: var(--shadow-sm);
}
.codemain { white-space: pre-wrap; }
pre.codeblock { position: relative; }
pre.codeblock[data-lang]::after {
  content: attr(data-lang);
  position: absolute; top: 8px; right: 12px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8d86a3;
}
pre.codeblock code { font-family: inherit; background: transparent; padding: 0; }
.itembody code { font-family: var(--font-mono); font-size: .88em; background: var(--primary-soft); color: var(--primary); padding: 1px 6px; border-radius: 6px; }
pre .tok-kw { color: #c4b5fd; font-weight: 600; }
pre .tok-str { color: #fcd34d; }
pre .tok-com { color: #7d7596; font-style: italic; }
pre .tok-num { color: #6ee7b7; }
pre .tok-tag { color: #93c5fd; }

/* ---------- sdílení článku ---------- */
.share-row { display: flex; align-items: center; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); flex-wrap: wrap; }
.share-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-right: 4px; }
.share-btn {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--panel-soft);
  color: var(--muted); text-decoration: none; cursor: pointer; font: inherit;
  transition: transform .14s ease, color .14s, border-color .14s, background .14s, box-shadow .14s;
}
.share-btn:hover { transform: translateY(-2px); color: #fff; box-shadow: var(--shadow-sm); }
.share-fb:hover { background: #1877f2; border-color: #1877f2; }
.share-x:hover { background: #111; border-color: #111; }
.share-li:hover { background: #0a66c2; border-color: #0a66c2; }
.share-wa:hover { background: #25d366; border-color: #25d366; }
.share-mail:hover { background: var(--primary); border-color: var(--primary); }
.share-copy:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.share-copy.copied { background: #16a34a; border-color: #16a34a; color: #fff; }

/* ---------- komentáře ---------- */
.comments { margin-top: 30px; }
.comments-title { font-size: 24px; letter-spacing: -.02em; color: var(--heading); display: flex; align-items: center; gap: 10px; }
.comments-count {
  font-size: 14px; background: var(--primary-soft); color: var(--primary);
  border-radius: 999px; padding: 1px 11px; font-weight: 700;
}
.comments-empty { color: var(--muted); }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.comment {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 20px 10px; box-shadow: var(--shadow-sm);
}
.comment-admin { border-left: 3px solid var(--primary); background: var(--panel-soft); }
.comment-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.comment-num { color: var(--muted); text-decoration: none; font-family: var(--font-mono); font-size: 12px; }
.comment-num:hover { color: var(--primary); }
.comment-author { color: var(--heading); font-size: 14.5px; }
.comment-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--primary); color: #fff; border-radius: 999px; padding: 1px 8px;
}
.comment-karma { font-size: 12px; }
.comment-body { font-size: 15.5px; }
.comment-body p { margin: .5em 0; }
.comment-body img { max-width: 100%; }
.comment:target { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.comment { scroll-margin-top: 130px; position: relative; }
.comment-anchor { position: absolute; top: -130px; }
.comment:has(.comment-anchor:target) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.comment-ref { font-family: var(--font-mono); font-size: .86em; text-decoration: none; color: var(--primary); background: var(--primary-soft); border-radius: 5px; padding: 0 4px; }
.comment-ref:hover { background: var(--primary); color: #fff; }
.comments-more { text-align: center; margin-top: 18px; }
.btn-load-comments {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  background: linear-gradient(115deg, var(--primary), var(--primary-dark)); color: #fff;
  border: 0; border-radius: 999px; padding: 10px 26px; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.btn-load-comments:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-load-comments[disabled] { opacity: .6; cursor: wait; transform: none; }
.load-rest { font-weight: 400; opacity: .85; }

/* ---------- stránkování ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 30px; }
.pager-link {
  display: inline-block; padding: 8px 18px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 14.5px;
  background: var(--panel); border: 1px solid var(--border); color: var(--link); box-shadow: var(--shadow-sm);
}
.pager-link:hover { border-color: var(--primary); color: var(--primary); }
.pager-link.disabled { opacity: .4; pointer-events: none; box-shadow: none; }
.pager-info { color: var(--muted); font-size: 13.5px; letter-spacing: .03em; }

/* ---------- hledání ---------- */
.search-big {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1.5px solid var(--border); border-radius: 999px;
  padding: 8px 10px 8px 20px; box-shadow: var(--shadow-sm); margin-bottom: 26px; color: var(--muted);
}
.search-big:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-big input { flex: 1; border: 0; background: transparent; outline: 0; font: inherit; font-size: 17px; color: var(--text); min-width: 0; }
.btn {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
  background: linear-gradient(115deg, var(--primary), var(--primary-dark)); color: #fff;
  border: 0; border-radius: 999px; padding: 8px 22px;
}
.btn:hover { filter: brightness(1.08); color: #fff; }
.search-note { color: var(--muted); }

/* ---------- fotogalerie ---------- */
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.gallery-section { margin-bottom: 38px; }
.gallery-section-title { font-size: 22px; letter-spacing: -.02em; margin: 0 0 14px; }
.gallery-section-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gallery-section-title a { color: var(--heading); text-decoration: none; }
.gallery-section-title a:hover { color: var(--primary); }
.gallery-section-count { font-size: 13px; font-weight: 400; color: var(--muted); }
.gallery-section-more { margin-top: 12px; }
.gallery-section-more a { font-weight: 700; text-decoration: none; color: var(--link); }
.gallery-section-more a:hover { color: var(--primary); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 16px; }
.gallery-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.gallery-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gallery-card-img { width: 100%; height: 160px; object-fit: cover; background: var(--panel-soft); }
.gallery-card-body { display: flex; flex-direction: column; gap: 1px; padding: 11px 15px 13px; }
.gallery-card-title { color: var(--heading); font-size: 15.5px; line-height: 1.3; }
.gallery-card-meta { color: var(--muted); font-size: 12.5px; }
.gallery-more { margin-top: 12px; font-size: 14.5px; }
.album-desc { margin: 4px 0 20px; color: var(--muted); }
.foto-stage { margin: 0 0 16px; text-align: center; }
.foto-stage a { display: inline-block; line-height: 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.foto-stage img { max-height: 72vh; width: auto; max-width: 100%; }
.foto-caption { margin-top: 12px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.foto-nav { display: flex; justify-content: center; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.foto-nav a, .foto-nav span {
  display: inline-block; padding: 7px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14.5px;
  background: var(--panel); border: 1px solid var(--border); color: var(--link);
}
.foto-nav a:hover { border-color: var(--primary); color: var(--primary); }
.foto-nav span { opacity: .4; }

/* ---------- CV rozcestník ---------- */
.cv { max-width: 860px; margin: 0 auto; }
.cv-hero {
  text-align: center; padding: 44px 30px 38px; margin-bottom: 34px;
  background:
    radial-gradient(640px 300px at 50% -80px, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%),
    var(--panel);
  border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow);
}
.cv-photo-ring {
  width: 160px; height: 160px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark) 60%, #f59e0b);
  padding: 5px; box-shadow: var(--shadow);
}
.cv-photo-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.cv-name { font-size: clamp(34px, 6vw, 46px); letter-spacing: -.03em; margin: 0 0 4px; color: var(--heading); }
.cv-role { color: var(--muted); margin: 0 0 14px; font-size: 17px; }
.cv-bio { max-width: 560px; margin: 0 auto; color: var(--text); }
.cv-stats { display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; margin-top: 26px; }
.cv-stat { display: flex; flex-direction: column; line-height: 1.3; }
.cv-stat strong {
  font-size: 26px; letter-spacing: -.02em;
  background: linear-gradient(115deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="dark"] .cv-stat strong { background: linear-gradient(115deg, #a795e8, #d6c9ff); -webkit-background-clip: text; background-clip: text; }
.cv-stat span { font-size: 12.5px; color: var(--muted); letter-spacing: .03em; }
.cv-icon-star { font-size: 12.5px; font-weight: 700; width: 52px; }
.cv-section-title { font-size: 15px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 30px 0 14px; }
.cv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 13px; }
.cv-card {
  display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 18px; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.cv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }
.cv-card-wide { grid-column: span 1; }
.cv-grid-projects { grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .cv-grid-projects { grid-template-columns: 1fr; } }

/* zlaté zvýraznění projektových karet — ladí s fialovou, jemně svítí */
.cv-grid-projects .cv-card {
  background:
    radial-gradient(420px 120px at 18% 0, color-mix(in srgb, var(--accent) 10%, transparent), transparent 72%),
    var(--panel);
  border-color: color-mix(in srgb, var(--accent) 36%, var(--border));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 10%, transparent);
}
.cv-grid-projects .cv-card:hover {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 8px 22px color-mix(in srgb, var(--accent) 18%, transparent);
}
.cv-grid-projects .cv-icon { background: var(--accent-soft); }
.cv-grid-projects .cv-card-text strong { color: var(--accent); }
.cv-section-motto { margin: -8px 0 14px; color: var(--muted); font-style: italic; }
.cv-section-motto b { color: var(--accent); font-style: normal; font-weight: 700; }
.cv-icon {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 12px; background: var(--primary-soft); color: var(--primary);
}
.cv-icon-logo { background: transparent; }
.cv-card-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.cv-card-text strong { color: var(--heading); font-size: 15.5px; }
.cv-card-text span { color: var(--muted); font-size: 13px; }

/* ---------- 404 ---------- */
.error-page { max-width: 560px; margin: 30px auto; text-align: center; }
.error-code {
  font-size: clamp(80px, 18vw, 130px); font-weight: 800; line-height: 1; margin: 0;
  background: linear-gradient(115deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.04em;
}
.error-page h1 { margin: 6px 0 8px; color: var(--heading); }

/* ---------- lightbox ---------- */
.lb-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(12, 9, 20, .92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .18s ease; padding: 30px;
}
.lb-overlay.open { opacity: 1; }
.lb-overlay img { max-width: min(94vw, 1500px); max-height: 84vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lb-caption { color: #cfc6f2; font-size: 14.5px; text-align: center; max-width: 80vw; }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 26px; line-height: 1;
}
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- patička ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 34px; text-align: center; color: var(--muted); font-size: 14px;
  background: color-mix(in srgb, var(--panel) 55%, transparent);
}
.site-footer a { color: var(--link); font-weight: 600; }

/* ---------- responsivní ---------- */
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .post-card { padding: 20px 18px 16px; }
  .post-detail { padding: 24px 18px 20px; }
  .leftbox, .rightbox { float: none; margin: 10px auto; max-width: 100%; display: block; text-align: center; }
  .header-row { gap: 10px; }
  .brand-claim { display: none; }
  .search-mini input { width: 84px; }
  .topline-links { display: none; }
  .embed-pdf object { height: 480px; }
}
@media (max-width: 460px) {
  .search-mini { display: none; }
}
@media print {
  .topline, .site-header, .site-footer, .pager, .comments-more, .theme-switch { display: none !important; }
}
