:root {
  --bg: #101312;
  --panel: #171b19;
  --panel-2: #1c211f;
  --text: #edf1ed;
  --soft: #b3bbb5;
  --muted: #7c8780;
  --line: #303732;
  --teal: #2ee8c4;
  --amber: #ffa94d;
  --purple: #a78bfa;
  --ice: #7dd3fc;
  --pink: #f472b6;
  --lime: #a3e635;
  --blue: #608cff;
  --shell: min(1100px, calc(100% - 40px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
h1, h2, h3, .brand span { font-family: "Montserrat", "Inter", "Segoe UI", Arial, sans-serif; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: "Inter", "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-150%); padding: 8px 12px; color: #07100d; background: var(--teal); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 12px; z-index: 30; margin-top: 12px; padding: 0 14px; }
.header-inner { display: flex; align-items: center; width: var(--shell); max-width: 1100px; min-height: 60px; margin: auto; padding: 0 22px 0 18px; border: 1px solid rgba(255,255,255,.09); border-radius: 16px; background: rgba(16, 19, 18, .52); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 14px 44px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.05); }
.brand { display: flex; align-items: center; gap: 9px; margin-right: auto; font-size: 1.08rem; font-weight: 750; }
.brand img { width: 34px; height: 34px; }
.brand > span > span { color: var(--muted); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: .82rem; font-weight: 650; }
.nav-item { position: relative; display: flex; align-items: center; gap: 4px; }
.site-nav a { position: relative; padding: 20px 0; color: var(--muted); }
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.nav-item > a.active::after { position: absolute; right: 0; bottom: 10px; left: 0; height: 2px; border-radius: 2px; content: ""; background: var(--teal); }
.sub-toggle { display: inline-flex; padding: 0; border: 0; background: none; color: inherit; cursor: default; }
.chev { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease, stroke .2s ease; }
.has-sub:hover > a, .has-sub:focus-within > a { color: var(--teal); }
.has-sub:hover .chev, .has-sub:focus-within .chev { transform: rotate(180deg); stroke: var(--teal); }
.sub-toggle:focus-visible { outline: none; }
.sub { position: absolute; top: calc(100% - 4px); left: -18px; z-index: 40; padding-top: 10px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
.sub-inner { display: grid; gap: 3px; width: 372px; padding: 8px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: linear-gradient(160deg, rgba(20,25,23,.97), rgba(14,18,16,.98)); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.10); }
.sub-item { --ic-rgb: 46,232,196; }
.site-nav a.sub-item, .sub-item { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; padding: 9px 14px 9px 14px; border: 1px solid transparent; border-radius: 11px; color: var(--text); font-weight: 600; white-space: nowrap; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.sub-item.tint-amber { --ic-rgb: 255,169,77; } .sub-item.tint-purple { --ic-rgb: 167,139,250; } .sub-item.tint-ice { --ic-rgb: 125,211,252; } .sub-item.tint-coral { --ic-rgb: 255,122,110; } .sub-item.tint-pink { --ic-rgb: 244,114,182; } .sub-item.tint-lime { --ic-rgb: 163,230,53; } .sub-item.tint-blue { --ic-rgb: 96,140,255; }
.sub-item b { display: block; font-size: .86rem; font-weight: 650; }
.sub-item small { display: block; margin-top: 1px; color: var(--muted); font-size: .74rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-item > span:last-child { min-width: 0; }
.sub-ic { position: relative; display: grid; width: 38px; aspect-ratio: .88; place-items: center; color: rgb(var(--ic-rgb)); clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.12) 50%, rgba(var(--ic-rgb),.30)); font: 750 .56rem "JetBrains Mono", "Cascadia Code", Consolas, monospace; text-shadow: 0 1px 2px rgba(0,0,0,.6); transition: transform .15s ease, filter .15s ease, background .15s ease; }
.sub-ic::before { content: ""; position: absolute; inset: 1px; clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); background: radial-gradient(70% 60% at 100% 0%, rgba(var(--ic-rgb),.26), transparent 70%), linear-gradient(135deg, rgba(255,255,255,.09) 0%, rgba(255,255,255,.03) 45%, rgba(255,255,255,.01) 70%, rgba(var(--ic-rgb),.10) 100%), rgba(12,16,14,.55); backdrop-filter: blur(8px) saturate(160%); -webkit-backdrop-filter: blur(8px) saturate(160%); }
.sub-ic::after { content: ""; position: absolute; inset: 1px; clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.03) 40%, transparent 55%); pointer-events: none; }
.sub-ic > span, .sub-ic { z-index: 0; } .sub-ic::before { z-index: -1; } .sub-ic::after { z-index: 1; }
.sub-ic-text { position: relative; z-index: 2; }
.sub-item:hover, .sub-item:focus-visible { border-color: rgba(255,255,255,.10); background: linear-gradient(135deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.02) 55%, rgba(var(--ic-rgb),.06) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.sub-item:hover .sub-ic, .sub-item.active .sub-ic { transform: translateY(-1px) scale(1.04); background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(var(--ic-rgb),.45) 55%, rgba(var(--ic-rgb),.55)); filter: drop-shadow(0 3px 6px rgba(var(--ic-rgb),.30)); }
.sub-item.active { border-color: rgba(255,255,255,.16); background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 45%, rgba(var(--ic-rgb),.12) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(255,255,255,.03), 0 8px 22px rgba(0,0,0,.28); }
.sub-item.active b { color: rgb(var(--ic-rgb)); }
.site-nav a.sub-more { --ic-rgb: 179,187,181; grid-template-columns: 38px 1fr auto; margin-top: 8px; padding-top: 12px; border-radius: 11px; }
.sub-more::before { content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent); }
.sub-more b { color: var(--soft); }
.sub-more small { color: var(--muted); }
.sub-ic-more svg { position: relative; z-index: 2; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sub-more-arrow { width: 16px; height: 16px; margin-left: 4px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease, stroke .15s ease; }
.site-nav a.sub-more:hover, .site-nav a.sub-more:focus-visible { --ic-rgb: 46,232,196; }
.sub-more:hover b { color: var(--text); }
.sub-more:hover .sub-more-arrow { transform: translateX(3px); stroke: var(--teal); }
.menu-button { display: none; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; background: transparent; font-size: .82rem; font-weight: 650; }
.menu-button .mb-close { display: none; }
.menu-button[aria-expanded="true"] .mb-open { display: none; }
.menu-button[aria-expanded="true"] .mb-close { display: inline; }
body.menu-open { overflow: hidden; }
/* při otevřeném menu je body přišpendlené (app.js), hlavička by odjela s ním: připevnit nahoru */
@media (max-width: 700px) {
  body.menu-open .site-header { position: fixed; top: 8px; left: 0; right: 0; margin-top: 0; }
  /* pruh nad a kolem lišty, jinak tam prosvítá obsah stránky */
  body.menu-open .site-header::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 80px; background: var(--bg); z-index: -1; }
}

.eyebrow { margin: 0 0 12px; color: var(--teal); font: 700 .72rem "JetBrains Mono", "Cascadia Code", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 54px; align-items: center; padding-block: 72px 64px; }
.hero h1 { margin: 0; font-size: clamp(2.8rem, 5vw, 4.8rem); line-height: 1; letter-spacing: -.05em; }
.hero-copy > p:not(.eyebrow) { max-width: 670px; margin: 22px 0 0; color: var(--soft); font-size: 1.12rem; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
/* ===== Tlačítka (jednotný systém pro HP i vnitřní stránky) ===== */
.button { display: inline-flex; min-height: 46px; align-items: center; gap: 10px; padding: 0 20px; border: 1px solid rgba(46,232,196,.55); border-radius: 12px; color: #06110e; font-size: .86rem; font-weight: 750; background: linear-gradient(180deg, #62f1d4 0%, var(--teal) 55%, #24d1b0 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(0,0,0,.12), 0 8px 22px rgba(46,232,196,.20); transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease; }
.button:hover, .button:focus-visible { transform: translateY(-1px); background: linear-gradient(180deg, #86f6df 0%, #46edcb 55%, #2ad8b6 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.10), 0 12px 30px rgba(46,232,196,.32); }
.button > span:last-child, .links .button::after { display: inline-block; transition: transform .18s ease; }
.button:hover > span:last-child, .links .button:hover::after { transform: translateX(3px); }
.links .button::after { content: "→"; font-weight: 700; }
/* diagonální šipky jako SVG (znaky ↗↘ se vykreslují jako emoji) */
svg.arr { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; }
.button svg.arr { width: 15px; height: 15px; }
/* tiché tlačítko = sklo, při najetí nádech v barvě stránky (--tone-rgb, jinak tyrkys) */
.button-quiet { color: var(--text); border-color: rgba(255,255,255,.14); background: linear-gradient(135deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.025) 55%, rgba(var(--tone-rgb, 46,232,196),.06) 100%); backdrop-filter: blur(10px) saturate(160%); -webkit-backdrop-filter: blur(10px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(255,255,255,.03), 0 6px 18px rgba(0,0,0,.25); }
.button-quiet:hover, .button-quiet:focus-visible { color: #fff; border-color: rgba(var(--tone-rgb, 46,232,196),.55); background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.04) 50%, rgba(var(--tone-rgb, 46,232,196),.14) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 10px 26px rgba(0,0,0,.3), 0 0 0 3px rgba(var(--tone-rgb, 46,232,196),.10); }
.plain-link { color: var(--soft); font-size: .86rem; font-weight: 650; border-bottom: 1px solid var(--muted); }
.plain-link:hover { color: var(--teal); border-color: var(--teal); }
.now-box { padding: 24px; border: 1px solid var(--line); border-left: 3px solid var(--amber); background: var(--panel); }
.now-label { color: var(--amber); font: 700 .7rem "JetBrains Mono", "Cascadia Code", Consolas, monospace; text-transform: uppercase; }
.pulse { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--amber); }
.now-box h2 { margin: 12px 0 4px; font-size: 1.8rem; letter-spacing: -.03em; }
.now-box p { margin: 0; color: var(--soft); font-size: .92rem; }
.now-meta { display: flex; justify-content: space-between; margin: 18px 0 12px; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font: 600 .67rem "JetBrains Mono", "Cascadia Code", Consolas, monospace; text-transform: uppercase; }
.now-box a, .project-card a { color: var(--teal); font-size: .82rem; font-weight: 700; }

.topic-nav { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.topic-nav a { position: relative; display: flex; min-height: 112px; flex-direction: column; justify-content: center; padding: 20px; border-right: 1px solid var(--line); background: var(--panel); }
.topic-nav a:last-child { border-right: 0; }
.topic-nav a:hover { background: var(--panel-2); }
.topic-nav span { position: absolute; top: 12px; right: 14px; color: #59635d; font: 600 .65rem "Cascadia Code", monospace; }
.topic-nav strong { font-size: .98rem; }
.topic-nav small { margin-top: 3px; color: var(--muted); font-size: .76rem; }

.content-section { padding-block: 82px; }
.section-head { display: grid; grid-template-columns: 1fr 420px; gap: 50px; align-items: end; margin-bottom: 34px; }
.section-head h2, .principle-grid h2, .about h2, .archive-head h1 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: -.045em; }
.section-head > p { margin: 0; color: var(--soft); }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project-card { display: flex; min-height: 330px; flex-direction: column; padding: 22px; border: 1px solid var(--line); background: var(--panel); }
.project-card:hover { border-color: #59645d; background: var(--panel-2); }
.project-card-wide { grid-column: 1 / -1; display: grid; min-height: 0; grid-template-columns: 360px 1fr; padding: 0; }
.project-image { overflow: hidden; min-height: 260px; }
.project-image img { width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 24px 28px; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.tag { font: 700 .67rem "JetBrains Mono", "Cascadia Code", Consolas, monospace; letter-spacing: .05em; }
.tag.teal { color: var(--teal); }
.tag.amber { color: var(--amber); }
.tag.purple { color: var(--purple); }
.tag.ice { color: var(--ice); }
.tag.coral { color: #ff7a6e; } .tag.pink { color: var(--pink); } .tag.lime { color: var(--lime); } .tag.blue { color: var(--blue); }
.card-number { color: #5d6861; font: 600 .68rem "Cascadia Code", monospace; }
.project-card h3 { margin: 16px 0 8px; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.025em; }
.project-card p { margin: 0 0 18px; color: var(--soft); font-size: .9rem; }
.project-card > a { margin-top: auto; }
.card-symbol { margin-top: 22px; font-size: 2.5rem; font-weight: 800; letter-spacing: -.06em; }
.amber-text { color: var(--amber); }
.purple-text { color: var(--purple); }
.ice-text { color: var(--ice); }
.stats { display: flex; gap: 28px; margin: 18px 0 16px; padding: 14px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: .74rem; }
.stats b { margin-right: 4px; color: var(--text); font-size: 1rem; }
.more-projects { display: flex; justify-content: space-between; margin-top: 14px; padding: 16px 20px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; }
.more-projects:hover { color: var(--teal); border-color: var(--teal); }

.principle-section { padding-block: 68px; color: #09221b; background: var(--teal); }
.principle-section .eyebrow { color: #176551; }
.principle-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 70px; }
.principle-grid p:not(.eyebrow) { margin: 0 0 16px; }
.about { display: grid; grid-template-columns: 104px 1fr auto; gap: 28px; align-items: center; padding-block: 64px; }
.about img { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 50%; }
.about h2 { font-size: 2rem; }
.about p:not(.eyebrow) { max-width: 690px; margin: 8px 0 0; color: var(--soft); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; min-height: 72px; align-items: center; justify-content: space-between; color: var(--muted); font-size: .78rem; }
.footer-inner div { display: flex; gap: 20px; }
.footer-inner a:hover { color: var(--teal); }

.archive { padding-block: 64px 80px; }
.archive-head { display: grid; grid-template-columns: 1fr 420px; gap: 50px; align-items: end; margin-bottom: 32px; }
.archive-head p:last-child { margin: 0; color: var(--soft); }
.filters { display: flex; gap: 8px; margin-bottom: 18px; }
.filter { padding: 8px 14px; color: var(--muted); border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: .8rem; font-weight: 700; }
.filter span { margin-left: 6px; }
.filter.active, .filter:hover { color: #07110e; border-color: var(--teal); background: var(--teal); }
.archive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.archive-card { display: grid; grid-template-columns: 1fr auto; min-height: 210px; padding: 22px; border: 1px solid var(--line); background: var(--panel); }
.archive-card:hover { border-color: #59645d; background: var(--panel-2); }
.archive-card[hidden] { display: none; }
.archive-card .tag { align-self: start; }
.archive-card h2 { grid-column: 1 / -1; margin: 22px 0 4px; font-size: 1.45rem; letter-spacing: -.025em; }
.archive-card p { grid-column: 1 / -1; margin: 0; color: var(--soft); font-size: .9rem; }
.archive-card small { align-self: end; margin-top: 24px; color: var(--muted); font: 600 .67rem "JetBrains Mono", "Cascadia Code", Consolas, monospace; }
.archive-card b { align-self: end; color: var(--teal); font-size: .78rem; }

/* Hex depth layer — signature motif without sacrificing clarity */
body {
  background:
    radial-gradient(circle at 78% 7%, rgba(46, 232, 196, .10), transparent 25rem),
    radial-gradient(circle at 12% 72%, rgba(167, 139, 250, .055), transparent 28rem),
    var(--bg);
  background-attachment: fixed;
}

.hero-visual { position: relative; padding: 34px 20px 30px 36px; }
.hex-cloud { position: absolute; inset: 0; pointer-events: none; }
.hex-cloud span { position: absolute; width: 92px; aspect-ratio: .88; background: rgba(46, 232, 196, .25); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); filter: drop-shadow(0 15px 18px rgba(0, 0, 0, .28)); }
.hex-cloud span::after { position: absolute; inset: 1px; content: ""; background: linear-gradient(145deg, #19211e, #101412); clip-path: inherit; }
.hex-cloud span:nth-child(1) { top: 0; right: 28px; opacity: .8; transform: scale(.66); }
.hex-cloud span:nth-child(2) { top: 32px; left: 0; opacity: .46; transform: scale(.46); }
.hex-cloud span:nth-child(3) { right: 0; bottom: 12px; opacity: .48; transform: scale(.52); }
.hex-cloud span:nth-child(4) { bottom: 0; left: 30px; opacity: .72; transform: scale(.58); }
.hex-cloud span:nth-child(5) { top: -18px; left: 92px; opacity: .3; transform: scale(.32); }
.now-box { position: relative; z-index: 2; border: 1px solid #3a4842; border-left: 3px solid var(--amber); border-radius: 18px; background: linear-gradient(145deg, rgba(28, 35, 32, .98), rgba(19, 23, 21, .98)); box-shadow: 0 24px 55px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .035); }
.topic-nav { gap: 12px; border: 0; }
.topic-nav a { min-height: 132px; padding: 18px 18px 18px 72px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, #1a201d, #141816); box-shadow: 0 14px 28px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .025); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.topic-nav a:last-child { border-right: 1px solid var(--line); }
.topic-nav a:hover { transform: translateY(-4px); border-color: #4a5b53; background: linear-gradient(145deg, #1d2521, #161b18); box-shadow: 0 20px 34px rgba(0, 0, 0, .28); }
.topic-nav i { position: absolute; left: 18px; display: grid; width: 40px; aspect-ratio: .88; place-items: center; color: var(--teal); background: rgba(46, 232, 196, .10); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font: 750 .7rem "JetBrains Mono", "Cascadia Code", Consolas, monospace; font-style: normal; }
.project-card { position: relative; overflow: hidden; border-color: #354039; border-radius: 16px; background: linear-gradient(145deg, #1a201d, #141816); box-shadow: 0 16px 36px rgba(0, 0, 0, .20), inset 0 1px rgba(255, 255, 255, .025); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.project-card::after { position: absolute; top: -38px; right: -32px; width: 100px; aspect-ratio: .88; content: ""; background: rgba(46, 232, 196, .035); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.project-card:hover { transform: translateY(-4px); border-color: #53645b; background: linear-gradient(145deg, #1c2420, #151a17); box-shadow: 0 24px 42px rgba(0, 0, 0, .30); }
.project-card-wide { overflow: hidden; }
.project-image { position: relative; }
.project-image::after { position: absolute; inset: 0; content: ""; box-shadow: inset -22px 0 35px rgba(12, 15, 13, .35); pointer-events: none; }
.project-image img { filter: saturate(.82) contrast(1.03); transition: transform .4s ease, filter .4s ease; }
.project-card-wide:hover .project-image img { transform: scale(1.025); filter: saturate(1); }
.card-symbol { display: grid; width: 62px; aspect-ratio: .88; place-items: center; background: rgba(255, 255, 255, .035); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font-size: 1.45rem; }
.more-projects { border-radius: 13px; background: linear-gradient(145deg, #191f1c, #141816); box-shadow: 0 12px 26px rgba(0, 0, 0, .16); }
.principle-section { position: relative; overflow: hidden; color: var(--text); border-block: 1px solid #29443c; background: radial-gradient(circle at 12% 20%, rgba(46, 232, 196, .1), transparent 24rem), linear-gradient(135deg, #171d1b, #101513); box-shadow: inset 0 18px 45px rgba(0, 0, 0, .22); }
.principle-section::after { position: absolute; right: 5%; bottom: -90px; width: 240px; aspect-ratio: .88; content: ""; border: 1px solid rgba(46, 232, 196, .18); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.principle-section .eyebrow { color: var(--teal); }
.principle-grid > div:last-child { color: var(--soft); }
.about img { border: 0; border-radius: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .35)); }
.archive-card { position: relative; overflow: hidden; border-color: #354039; border-radius: 16px; background: linear-gradient(145deg, #1a201d, #141816); box-shadow: 0 14px 30px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .025); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.archive-card::after { position: absolute; top: -28px; right: -25px; width: 75px; aspect-ratio: .88; content: ""; background: rgba(46, 232, 196, .045); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.archive-card:hover { transform: translateY(-3px); border-color: #53645b; background: linear-gradient(145deg, #1d2521, #151a17); box-shadow: 0 22px 38px rgba(0, 0, 0, .28); }
.filter { border-radius: 999px; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .site-nav { gap: 14px; font-size: .75rem; }
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { max-width: 620px; }
  .topic-nav { grid-template-columns: repeat(2, 1fr); }
  .topic-nav a:nth-child(2) { border-right: 0; }
  .topic-nav a:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .section-head, .archive-head { grid-template-columns: 1fr; gap: 14px; }
  .project-card-wide { grid-template-columns: 280px 1fr; }
  .principle-grid { grid-template-columns: 1fr; gap: 28px; }
  .about { grid-template-columns: 90px 1fr; }
  .about > a { grid-column: 2; }
}

@media (max-width: 700px) {
  :root { --shell: min(100% - 28px, 560px); }
  .brand img { width: 32px; height: 32px; }
  .menu-button { display: inline-block; }
  .site-header { top: 8px; margin-top: 8px; padding: 0 10px; }
  .header-inner { min-height: 54px; padding: 0 8px 0 12px; border-radius: 14px; backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(16, 19, 18, .97); }
  .site-nav { position: fixed; top: 74px; right: 0; bottom: 0; left: 0; z-index: 25; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 40px; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); font-size: 1.02rem; }
  .site-nav.open { display: flex; }
  .nav-item { display: grid; grid-template-columns: 1fr auto; align-items: center; border-bottom: 1px solid var(--line); }
  .nav-item > a { display: block; padding: 15px 0; color: var(--text); }
  .sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; border-radius: 10px; cursor: pointer; }
  .sub-toggle .chev { width: 18px; height: 18px; display: block; transform: none; stroke: var(--muted); }
  .has-sub.open .sub-toggle .chev { transform: rotate(180deg); stroke: var(--teal); }
  .has-sub .sub { display: none; grid-column: 1 / -1; }
  .has-sub.open .sub { display: block; }
  .nav-item > a.active { color: var(--teal); padding-left: 12px; }
  .nav-item > a.active::after { display: block; top: 14px; bottom: 14px; left: 0; right: auto; width: 3px; height: auto; border-radius: 3px; }
  .sub { position: static; padding: 0; opacity: 1; visibility: visible; transform: none; transition: none; }
  .has-sub:hover .sub, .has-sub:focus-within .sub { display: none; } .has-sub.open .sub { display: block !important; }
  .sub-inner { min-width: 0; margin: 0 0 12px; padding: 0 0 0 10px; border: 0; border-left: 2px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
  .site-nav a.sub-item { grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 10px 8px 10px; white-space: normal; }
  /* „Přehled sekce“ má navíc šipku ve třetím sloupci; bez tohohle ji pravidlo výš
     přepíše na dva sloupce a šipka spadne na vlastní řádek pod text. */
  .site-nav a.sub-more { grid-template-columns: 30px 1fr auto; align-items: center; }
  .sub-more-arrow { margin-left: 0; align-self: center; }
  .sub-ic { width: 30px; font-size: .52rem; }
  .sub-item b { font-size: .95rem; color: var(--soft); } .sub-item small { display: none; }
  .hero { padding-block: 52px 44px; }
  .hero-visual { padding: 24px 10px 20px 18px; }
  .hex-cloud span { width: 72px; }
  .hero h1 { font-size: 2.8rem; }
  .hero-copy > p:not(.eyebrow) { font-size: 1rem; }
  .topic-nav { grid-template-columns: 1fr; }
  .topic-nav { gap: 10px; }
  .topic-nav a { min-height: 92px; border: 1px solid var(--line) !important; }
  .content-section { padding-block: 58px; }
  .section-head { margin-bottom: 24px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 270px; }
  .project-card-wide { grid-template-columns: 1fr; }
  .project-image { min-height: 190px; max-height: 230px; }
  .stats { gap: 14px; justify-content: space-between; }
  .principle-section { padding-block: 52px; }
  .about { grid-template-columns: 72px 1fr; gap: 18px; padding-block: 52px; }
  .about img { width: 68px; height: 68px; }
  .about > a { grid-column: 1 / -1; justify-self: start; }
  .archive { padding-block: 48px 64px; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-card { min-height: 200px; }
  .footer-inner { align-items: center; flex-direction: column; justify-content: center; gap: 14px; padding-block: 26px 30px; text-align: center; }
  .footer-inner .social-links { order: 1; justify-content: center; gap: 8px 18px; }
  .footer-inner .visitor-count { order: 2; }
  .footer-inner > span:first-child { order: 3; font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Patička: počítadlo a ikony sociálních sítí (sdílené pro všechny stránky) */
.footer-inner { gap: 20px; }
.visitor-count { display: flex; align-items: center; gap: 7px; color: #66736c; font: 650 .67rem "JetBrains Mono", "Cascadia Code", monospace; }
.visitor-count svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.visitor-count b { color: #a8b3ac; font-weight: 700; }
.social-links { display: flex; gap: 20px; }
.social-links a { display: flex; align-items: center; gap: 6px; }
.social-links svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.social-links a:hover svg { stroke: var(--teal); }
@media (max-width: 700px) { .social-links { flex-wrap: wrap; gap: 14px; } }

/* Oddělovače sekcí: v šířce obsahu, tyrkysový začátek, do ztracena */
.site-footer { border-top: 0; position: relative; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 50%; width: var(--shell); max-width: 1100px; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent); }

/* ===== Skleněné destičky (archiv, přehledy) ===== */
.archive-card, .project-card, .more-projects {
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.018) 40%, rgba(255,255,255,.01) 65%, rgba(46,232,196,.03) 100%);
  backdrop-filter: blur(10px) saturate(160%); -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(255,255,255,.04), inset 1px 0 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.35), 0 40px 90px rgba(0,0,0,.3);
}
.archive-card::after, .project-card::after { display: none; }
.archive-card::before, .project-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 0%, transparent 30%, rgba(255,255,255,.13) 37%, rgba(255,255,255,.03) 45%, transparent 50%), linear-gradient(180deg, rgba(255,255,255,.05), transparent 35%);
}
.archive-card > *, .project-card > * { position: relative; }
/* jemný barevný nádech odlesku podle projektu (tint-* z JSON pole "tint") */
.archive-card.tint-teal::before { background: linear-gradient(115deg, transparent 0%, transparent 30%, rgba(46,232,196,.16) 37%, rgba(46,232,196,.04) 45%, transparent 50%), linear-gradient(180deg, rgba(46,232,196,.06), transparent 35%); }
.archive-card.tint-amber::before { background: linear-gradient(115deg, transparent 0%, transparent 30%, rgba(255,169,77,.16) 37%, rgba(255,169,77,.04) 45%, transparent 50%), linear-gradient(180deg, rgba(255,169,77,.06), transparent 35%); }
.archive-card.tint-purple::before { background: linear-gradient(115deg, transparent 0%, transparent 30%, rgba(167,139,250,.18) 37%, rgba(167,139,250,.05) 45%, transparent 50%), linear-gradient(180deg, rgba(167,139,250,.07), transparent 35%); }
.archive-card.tint-ice::before { background: linear-gradient(115deg, transparent 0%, transparent 30%, rgba(125,211,252,.16) 37%, rgba(125,211,252,.04) 45%, transparent 50%), linear-gradient(180deg, rgba(125,211,252,.06), transparent 35%); }
.archive-card.tint-amber:hover { border-color: rgba(255,169,77,.45); background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 40%, rgba(255,169,77,.07) 100%); }
.archive-card.tint-purple:hover { border-color: rgba(167,139,250,.5); background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 40%, rgba(167,139,250,.08) 100%); }
.archive-card.tint-coral::before { background: linear-gradient(115deg, transparent 0%, transparent 30%, rgba(255,122,110,.16) 37%, rgba(255,122,110,.04) 45%, transparent 50%), linear-gradient(180deg, rgba(255,122,110,.06), transparent 35%); }
.archive-card.tint-coral:hover { border-color: rgba(255,122,110,.5); background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 40%, rgba(255,122,110,.08) 100%); }
.archive-card.tint-pink::before { background: linear-gradient(115deg, transparent 0%, transparent 30%, rgba(244,114,182,.16) 37%, rgba(244,114,182,.04) 45%, transparent 50%), linear-gradient(180deg, rgba(244,114,182,.06), transparent 35%); }
.archive-card.tint-pink:hover { border-color: rgba(244,114,182,.5); background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 40%, rgba(244,114,182,.08) 100%); }
.archive-card.tint-lime::before { background: linear-gradient(115deg, transparent 0%, transparent 30%, rgba(163,230,53,.16) 37%, rgba(163,230,53,.04) 45%, transparent 50%), linear-gradient(180deg, rgba(163,230,53,.06), transparent 35%); }
.archive-card.tint-lime:hover { border-color: rgba(163,230,53,.5); background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 40%, rgba(163,230,53,.08) 100%); }
.archive-card.tint-blue::before { background: linear-gradient(115deg, transparent 0%, transparent 30%, rgba(96,140,255,.16) 37%, rgba(96,140,255,.04) 45%, transparent 50%), linear-gradient(180deg, rgba(96,140,255,.06), transparent 35%); }
.archive-card.tint-blue:hover { border-color: rgba(96,140,255,.5); background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 40%, rgba(96,140,255,.08) 100%); }
.archive-card.tint-ice:hover { border-color: rgba(125,211,252,.45); background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 40%, rgba(125,211,252,.07) 100%); }

.archive-card:hover, .project-card:hover { border-color: rgba(46,232,196,.45); background: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 40%, rgba(46,232,196,.07) 100%); }
.archive { position: relative; }
/* tón stránky (body[data-tone] z generátoru): RGB pro sklo/okraje + barvy záře za sekcemi */
body { --tone-rgb: 46,232,196; --glow-a: rgba(46,232,196,.10); --glow-b: rgba(167,139,250,.08); --glow-c: rgba(255,169,77,.06); }
body[data-tone="amber"] { --tone-rgb: 255,169,77; --glow-a: rgba(255,169,77,.11); --glow-b: rgba(46,232,196,.06); --glow-c: rgba(167,139,250,.05); }
body[data-tone="purple"] { --tone-rgb: 167,139,250; --glow-a: rgba(167,139,250,.13); --glow-b: rgba(46,232,196,.06); --glow-c: rgba(255,169,77,.05); }
body[data-tone="ice"] { --tone-rgb: 125,211,252; --glow-a: rgba(125,211,252,.11); --glow-b: rgba(46,232,196,.06); --glow-c: rgba(167,139,250,.05); }
body[data-tone="coral"] { --tone-rgb: 255,122,110; --glow-a: rgba(255,122,110,.11); --glow-b: rgba(46,232,196,.06); --glow-c: rgba(167,139,250,.05); }
body[data-tone="pink"] { --tone-rgb: 244,114,182; --glow-a: rgba(244,114,182,.11); --glow-b: rgba(46,232,196,.06); --glow-c: rgba(167,139,250,.05); }
body[data-tone="lime"] { --tone-rgb: 163,230,53; --glow-a: rgba(163,230,53,.11); --glow-b: rgba(46,232,196,.06); --glow-c: rgba(167,139,250,.05); }
body[data-tone="blue"] { --tone-rgb: 96,140,255; --glow-a: rgba(96,140,255,.11); --glow-b: rgba(46,232,196,.06); --glow-c: rgba(167,139,250,.05); }
.archive::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; z-index: -1; pointer-events: none; width: calc(var(--shell) + 240px); max-width: 1340px; transform: translateX(-50%); background: radial-gradient(36% 50% at 14% 22%, var(--glow-a), transparent 70%), radial-gradient(28% 40% at 84% 26%, var(--glow-b), transparent 70%), radial-gradient(30% 40% at 60% 88%, var(--glow-c), transparent 70%); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 24%, #000 76%, transparent 100%), linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, transparent 0, #000 24%, #000 76%, transparent 100%), linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%); mask-composite: intersect; }

html, body { overflow-x: clip; }

/* Dotyk: odkazy v patičce a drobečkách jsou textově malé. Zvětšujeme jim
   plochu na klepnutí přes odsazení, záporný okraj drží původní rozestupy.
   Odkazů uvnitř odstavců se to netýká, tam by to rozhodilo řádkování. */
@media (pointer: coarse) {
  .social-links a { padding-block: 11px; }
  .crumbs a { padding: 10px 6px; margin: -10px -6px; }
  .footer-inner .visitor-count { padding-block: 8px; }
  .plain-link { display: inline-flex; align-items: center; min-height: 40px; }
}

/* Klepnutí na dotyku nemá vyrábět modré zvýraznění ani vybírat text.
   Projevovalo se to hlavně u galerie a zvětšení, kde se klepe a táhne. */
html { -webkit-tap-highlight-color: transparent; }
button, .button, a.zoom, .gal, .gal-nav, .lb-nav, .lb-close, .gal-posun, .gal-thumb,
.menu-button, .sub-toggle, .filter, .like-btn { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
::selection { background: rgba(46, 232, 196, .28); color: #fff; }

/* Rozbalovací plachta menu se nesmí vysunout mimo okno; skript jí dopočítá posun. */
.sub { left: calc(-18px + var(--posun, 0px)); }

/* ---- Ikony v hexech (podmenu i mobilní menu) ---- */
.mnav-ico { position: relative; z-index: 2; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mnav-ico .f { fill: currentColor; stroke: none; }
@media (max-width: 700px) { .mnav-ico { width: 17px; height: 17px; } }

/* ---- Mobilní menu: dlaždice + drobečková navigace ---- */
.mnav { display: none; }
.mnav .tint-teal { --ic-rgb: 46,232,196; } .mnav .tint-amber { --ic-rgb: 255,169,77; } .mnav .tint-purple { --ic-rgb: 167,139,250; }
.mnav .tint-ice { --ic-rgb: 125,211,252; } .mnav .tint-coral { --ic-rgb: 255,122,110; } .mnav .tint-pink { --ic-rgb: 244,114,182; } .mnav .tint-lime { --ic-rgb: 163,230,53; } .mnav .tint-blue { --ic-rgb: 96,140,255; } .mnav .tint-soft { --ic-rgb: 179,187,181; }
@media (max-width: 700px) {
  .site-nav > .nav-item { display: none; }
  .site-nav { padding: 14px 16px 32px; }
  .mnav { display: block; }
  .mnav-view[hidden] { display: none; }
  .mnav-view { animation: mnav-in .22s ease both; }
  @media (prefers-reduced-motion: reduce) { .mnav-view { animation: none; } }
  .site-nav .mnav a { padding: 0; }
  .site-nav .mnav a::after { display: none; }

  .mnav-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0 0 14px; padding: 0 2px 12px; border-bottom: 1px solid var(--line); font-size: .86rem; font-weight: 600; }
  .site-nav .mnav .mnav-crumbs a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); }
  .mnav-crumbs i { color: var(--line); font-style: normal; font-size: 1rem; }
  .mnav-crumbs span { color: var(--teal); }
  .mnav-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; }   /* 1fr = všechny řádky stejně vysoké podle nejvyšší dlaždice */
  .mnav-tile { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 11px; align-items: center; min-height: 112px; padding: 12px 12px; border: 1px solid rgba(255,255,255,.10); border-radius: 14px; background: linear-gradient(150deg, rgba(255,255,255,.06), rgba(255,255,255,.01) 60%, rgba(var(--ic-rgb),.06)); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
  .site-nav .mnav a.mnav-tile { display: grid; padding: 10px 12px; color: var(--text); }
  .mnav-tile .sub-ic { width: 38px; font-size: .5rem; }
  .mnav-tile .mnav-ico { width: 19px; height: 19px; }

  .mnav-tile, .mnav-tile > span { min-width: 0; }   /* bez toho sloupec nepustí pod šířku nejdelšího slova a pravá dlaždice přeteče */
  .mnav-tile b { display: block; font-size: .96rem; font-weight: 650; line-height: 1.2; }
  .mnav-tile small { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.25; }
  button.mnav-tile { padding-right: 24px; }
  .mnav-tile .chev { position: absolute; top: 9px; right: 8px; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; transform: rotate(-90deg); }
  .mnav-tile.is-active { border-color: rgba(var(--ic-rgb),.45); box-shadow: inset 0 1px rgba(255,255,255,.10); }
  .mnav-tile.is-active b { color: rgb(var(--ic-rgb)); }
  .mnav-tile:active { transform: scale(.98); }

  .mnav-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; margin: 0 0 10px; }
  .mnav-head p { margin: 0; color: var(--text); font-size: 1.05rem; font-weight: 700; }
  .mnav-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 16px 0 10px; border: 1px solid rgba(46,232,196,.40); border-radius: 12px; background: linear-gradient(135deg, rgba(46,232,196,.10), rgba(255,255,255,.02) 70%); box-shadow: inset 0 1px 0 rgba(255,255,255,.10); color: var(--teal); font-family: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
  .mnav-back:active { transform: scale(.97); border-color: rgba(46,232,196,.65); background: rgba(46,232,196,.16); }
  .mnav-back .chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; transform: rotate(90deg); }
  .site-nav .mnav a.mnav-row { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; min-height: 60px; padding: 8px 12px; border: 1px solid transparent; border-bottom-color: var(--line); color: var(--text); }
  .site-nav .mnav a.mnav-hub { grid-template-columns: 34px 1fr auto; margin-bottom: 6px; border: 1px solid rgba(255,255,255,.10); border-radius: 12px; background: rgba(255,255,255,.03); }
  .mnav-row .sub-ic { width: 34px; font-size: .5rem; }
  .mnav-row b { display: block; font-size: .95rem; font-weight: 650; }
  .mnav-row small { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; font-weight: 500; }
  .site-nav .mnav a.mnav-row[aria-current] { border-color: rgba(var(--ic-rgb),.45); border-radius: 12px; background: rgba(var(--ic-rgb),.10); }
  .site-nav .mnav a.mnav-row[aria-current] b { color: rgb(var(--ic-rgb)); }
}
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  /* otevření: panel se odkryje shora, obsah naskočí postupně; zavření: sroluje se nahoru */
  .site-nav.open { animation: mnav-drop .34s cubic-bezier(.2,.8,.2,1) both; }
  .site-nav.open.zaviram { animation: mnav-up .22s ease-in both; }
  .site-nav.open .mnav-main > .mnav-crumbs, .site-nav.open .mnav-tile { animation: mnav-item .3s ease both; animation-delay: calc(40ms + var(--i, 0) * 25ms); }
  .mnav-tile:nth-child(1) { --i: 1; } .mnav-tile:nth-child(2) { --i: 2; } .mnav-tile:nth-child(3) { --i: 3; } .mnav-tile:nth-child(4) { --i: 4; }
  .mnav-tile:nth-child(5) { --i: 5; } .mnav-tile:nth-child(6) { --i: 6; } .mnav-tile:nth-child(7) { --i: 7; } .mnav-tile:nth-child(8) { --i: 8; }
  .site-nav.open.zaviram .mnav-tile, .site-nav.open.zaviram .mnav-crumbs { animation: none; }
}
@keyframes mnav-drop { from { clip-path: inset(0 0 100% 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes mnav-up { from { clip-path: inset(0 0 0 0); opacity: 1; } to { clip-path: inset(0 0 100% 0); opacity: .4; } }
@keyframes mnav-item { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (max-width: 360px) {
  .site-nav { padding-inline: 12px; }
  .mnav-grid { gap: 8px; }
  .mnav-tile, .site-nav .mnav a.mnav-tile { grid-template-columns: 32px 1fr; gap: 8px; padding: 10px 9px; }
  button.mnav-tile { padding-right: 18px; }
  .mnav-tile .sub-ic { width: 32px; }
  .mnav-tile .mnav-ico { width: 16px; height: 16px; }
  .mnav-tile b { font-size: .9rem; }
  .mnav-tile small { font-size: .7rem; }
  .mnav-tile .chev { right: 5px; }
}
@keyframes mnav-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* Úzký desktop 701–820 px: celé menu se do hlavičky nevejde a názvy se zalamovaly
   do dvou řádků („Home / Assistant“) a lezly přes logo. Schová se text u loga. */
@media (min-width: 701px) and (max-width: 820px) {
  .brand > span { display: none; }
  .site-nav { gap: 11px; }
  .site-nav > .nav-item > a { white-space: nowrap; }
}

/* Značka „AI návod“ na kartách v archivu (projects/ nemá project.css) */
.archive-card .agent-badge { position: relative; z-index: 1; align-self: start; justify-self: end; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid rgba(46,232,196,.45); border-radius: 999px; background: rgba(46,232,196,.10); color: #bff8ea; font: 700 .6rem "JetBrains Mono", "Cascadia Code", monospace; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.archive-card .agent-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
