/* ==========================================================================
   23 DESIGN — brutalistický vstup
   ========================================================================== */
:root {
  --red: #D91E1E;
  --red-glow: rgba(217, 30, 30, .85);
  --ink: #ECECEC;
  --ink-dim: rgba(236, 236, 236, .55);
  --bg: #050505;
  --line: rgba(236, 236, 236, .18);
  --mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  --pad: clamp(14px, 2.2vw, 30px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--red); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ POZADÍ -- */
.bg { position: fixed; inset: 0; overflow: hidden; background: var(--bg); z-index: 0; }
.bg-layer {
  position: absolute; inset: -7%;
  background: #0a0a0a url("../assets/brand/bg-concrete.jpg") center / cover no-repeat;
  filter: grayscale(1) contrast(1.08) brightness(.78);
  will-change: transform;
}
.bg-slice { opacity: 0; filter: grayscale(1) contrast(1.4) brightness(1.15); }

/* video pozadí — BAREVNÉ */
.bg-video {
  position: absolute; left: -7%; top: -7%; width: 114%; height: 114%;
  object-fit: cover; pointer-events: none;
  background: transparent;
  filter: contrast(1.06);
  opacity: 0; transition: opacity 1.6s ease;
  will-change: transform;
}
.bg--video .bg-video.is-playing { opacity: var(--bg-video-opacity, .45); }
.bg--video #bgMain { opacity: 0; }
.bg--image .bg-video { display: none; }
.bg--video .bg-slice { background: rgba(232, 232, 232, .16); mix-blend-mode: screen; filter: none; }
.bg--video .bg-slice#bgSliceB { background: rgba(217, 30, 30, .14); }
.bg-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.88) 100%),
    rgba(0, 0, 0, .34);
  transition: background .8s ease;
}
body[data-view]:not([data-view="home"]) .bg-shade {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.45) 0%, rgba(0,0,0,.8) 70%, rgba(0,0,0,.94) 100%),
    rgba(0, 0, 0, .55);
}
.bg-scan {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.028) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.bg-grain {
  position: absolute; inset: -60px; pointer-events: none; opacity: .2; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  1.4 0 0 0 -.4'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain .9s steps(1) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  17%  { transform: translate(-31px, 17px); }
  33%  { transform: translate(24px, -38px); }
  50%  { transform: translate(-12px, 44px); }
  67%  { transform: translate(40px, 9px); }
  83%  { transform: translate(-46px, -22px); }
}

/* --------------------------------------------------------- OVLÁDÁNÍ -- */
.controls {
  position: fixed; z-index: 60;
  top: max(var(--pad), env(safe-area-inset-top)); right: max(var(--pad), env(safe-area-inset-right));
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-dim); white-space: nowrap;
  text-shadow: 0 0 8px #000;
}
.ctl { color: var(--ink-dim); transition: color .2s; }
.ctl:hover { color: var(--ink); }
.ctl b { font-weight: 400; opacity: .4; transition: opacity .2s, color .2s; }
.ctl b.is-on { opacity: 1; color: var(--ink); }
.ctl.lang .lang-opt { color: inherit; opacity: .4; transition: opacity .2s, color .2s; }
.ctl.lang .lang-opt:hover { opacity: .9; }
.ctl.lang .lang-opt.is-on { opacity: 1; color: var(--ink); }
.controls[data-audio="hidden"] #audioBtn, .controls[data-audio="hidden"] .ctl-gap { display: none; }
#audioBtn.is-on b[data-state="on"] { color: var(--red); opacity: 1; }
#audioBtn.is-on b[data-state="off"] { opacity: .4; color: inherit; }

/* ---------------------------------------------------------- HLAVNÍ STRÁNKA */
.stage {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, .7, .1, 1), filter .7s ease;
}
body[data-view]:not([data-view="home"]) .stage {
  opacity: 0; transform: scale(1.07); filter: blur(5px); pointer-events: none;
}
body.is-locked .stage { opacity: 0; }

.logo-svg {
  width: min(96vw, calc(80vh * 880 / 660));
  height: auto; display: block; overflow: visible;
  user-select: none; -webkit-user-select: none;
  will-change: transform;
}
.ghost { opacity: 0; pointer-events: none; }
#logoBase { will-change: transform; }
#ghostRed { mix-blend-mode: screen; }

.wing { transition: fill .6s ease-out, filter .6s ease-out; }
.wing.lit {
  fill: var(--red);
  filter: drop-shadow(0 0 4px var(--red-glow)) drop-shadow(0 0 13px rgba(217, 30, 30, .6));
  transition: fill .3s ease-in, filter .3s ease-in;
}

.dot { fill: var(--red); animation: dotPulse 3.4s ease-in-out infinite; transition: opacity .3s; }
.dot-ring { fill: none; stroke: var(--red); stroke-width: .8; transform-box: fill-box; transform-origin: center; animation: dotRing 3.4s ease-out infinite; }
@keyframes dotPulse { 0%,100% { opacity: .35; } 45% { opacity: 1; } }
@keyframes dotRing { 0% { transform: scale(1); opacity: .7; } 70%,100% { transform: scale(4.2); opacity: 0; } }
.dotg.active .dot, .dotg.active .dot-ring { opacity: 0; animation: none; }

.zone { cursor: pointer; outline: none; }
.zone .hit { fill: transparent; pointer-events: all; }
body.debug .zone .hit { fill: rgba(217, 30, 30, .12); stroke: rgba(217, 30, 30, .5); stroke-dasharray: 3 3; }
.zone:focus-visible .hit { stroke: var(--red); stroke-width: 1; fill: rgba(217, 30, 30, .06); }

.callout { opacity: 0; pointer-events: none; transition: opacity .12s linear; }
.callout.active { opacity: 1; pointer-events: all; transition: opacity .12s linear .1s; }
.callout .leader { fill: none; stroke: var(--red); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .3s cubic-bezier(.6, 0, .2, 1); }
.callout.active .leader { stroke-dashoffset: 0; }
.callout .btn { clip-path: inset(0 100% 0 0); transition: clip-path .22s cubic-bezier(.7, 0, .2, 1) .16s; }
.callout[data-side="left"] .btn { clip-path: inset(0 0 0 100%); }
.callout.active .btn { clip-path: inset(0 0 0 0); }
.callout .btn-bg { fill: rgba(6, 6, 6, .82); stroke: var(--red); stroke-width: 1; transition: fill .15s; }
.callout .btn-mark { fill: var(--red); }
.callout .btn-txt { fill: var(--ink); font-family: var(--mono); font-size: 13px; letter-spacing: .1em; transition: fill .15s; }
.callout:hover .btn-bg, .callout.kb .btn-bg { fill: var(--red); }
.callout:hover .btn-txt, .callout.kb .btn-txt { fill: #fff; }
.callout:hover .btn-mark { fill: #fff; }

.m-nav { display: none; }

/* --------------------------------------------------- VSTUPNÍ OVERLAY -- */
.enter {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(18px, 3.4vh, 34px);
  transition: opacity .9s ease, visibility 0s linear .9s;
}
.enter.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
.enter-logo { height: clamp(120px, 24vh, 240px); width: auto; opacity: .92; animation: enterIn 1.6s ease both; }
@keyframes enterIn { from { opacity: 0; filter: blur(6px); } to { opacity: .92; filter: none; } }
.enter-btns { display: flex; flex-direction: column; align-items: center; gap: 14px; animation: enterIn 1.6s ease .3s both; }
.enter-btn { padding: 12px 22px; font-size: 14px; letter-spacing: .16em; border: 1px solid transparent; transition: color .2s, background .2s, border-color .2s; }
.enter-btn.primary { color: var(--ink); border-color: var(--red); }
.enter-btn.primary:hover, .enter-btn.primary:focus-visible { background: var(--red); color: #fff; }
.enter-btn.quiet { font-size: 11px; color: var(--ink-dim); padding: 6px 12px; }
.enter-btn.quiet:hover { color: var(--ink); }
.enter-hint { margin: 0; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: rgba(236,236,236,.3); animation: enterIn 1.6s ease .5s both; }

/* ----------------------------------------------- SEKCE (kompaktní lišta) -- */
.topbar {
  position: fixed; z-index: 50; left: 0; right: 0; top: 0;
  padding: max(var(--pad), env(safe-area-inset-top)) var(--pad) 14px max(var(--pad), env(safe-area-inset-left));
  padding-right: 340px;
  display: flex; align-items: center; gap: clamp(14px, 3vw, 44px); flex-wrap: wrap;
  background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,0));
  opacity: 0; transform: translateY(-12px); pointer-events: none;
  transition: opacity .5s ease .2s, transform .6s cubic-bezier(.2, .7, .1, 1) .2s;
}
body[data-view]:not([data-view="home"]):not(.is-locked) .topbar { opacity: 1; transform: none; pointer-events: auto; }
.back { font-size: 12px; color: var(--ink); padding: 6px 0; white-space: nowrap; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.back:hover { color: var(--red); border-color: var(--red); }
.tabs { display: flex; gap: clamp(12px, 2.4vw, 34px); flex-wrap: wrap; font-size: 11px; }
.tabs a { color: var(--ink-dim); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.tabs a i { font-style: normal; color: var(--red); margin-right: .6em; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--red); }

.panel {
  position: fixed; inset: 0; z-index: 20; overflow-y: auto; overflow-x: hidden;
  padding: 0;
  background: rgba(5, 5, 5, .78);
  opacity: 0; visibility: hidden; transform: translateY(26px);
  transition: opacity .6s ease, transform .8s cubic-bezier(.2, .7, .1, 1), visibility 0s linear .6s;
  outline: none;
}
body[data-view]:not([data-view="home"]):not(.is-locked) .panel { opacity: 1; visibility: visible; transform: none; transition-delay: .25s, .25s, 0s; }
.panel-inner { max-width: 1120px; margin: 0; }
.kicker { margin: 0 0 10px; font-size: 11px; color: var(--red); letter-spacing: .24em; }
.panel h1 { margin: 0 0 clamp(28px, 5vh, 54px); font-weight: 400; font-size: clamp(30px, 6vw, 72px); line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.panel p { max-width: 62ch; line-height: 1.75; color: rgba(236,236,236,.82); }
.note { color: var(--ink-dim); border-left: 1px solid var(--red); padding-left: 14px; }

.folder { margin: 0 0 34px; }
.folder h2 { margin: 0 0 8px; font-weight: 400; font-size: 12px; letter-spacing: .22em; color: var(--ink-dim); text-transform: uppercase; }
.row { display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background .2s, padding .2s; }
.row:last-child { border-bottom: 1px solid var(--line); }
a.row:hover { background: rgba(217,30,30,.08); padding-left: 10px; }
.row .no { color: var(--red); }
.row .meta { color: var(--ink-dim); }

.module { border: 1px solid var(--line); padding: clamp(18px, 3vw, 30px); max-width: 640px; margin-bottom: 18px; position: relative; }
.module h2 { margin: 0 0 10px; font-weight: 400; font-size: clamp(18px, 2.6vw, 26px); letter-spacing: .12em; }
.module p { margin: 0 0 18px; }
.module .status { font-size: 11px; letter-spacing: .2em; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 10px; }
.module .status::before { content: ""; width: 7px; height: 7px; background: var(--ink-dim); opacity: .5; }
.module.is-on { border-color: var(--red); }
.module.is-on .status { color: var(--red); }
.module.is-on .status::before { background: var(--red); opacity: 1; }
.module:not(.is-on) { opacity: .62; background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(255,255,255,.025) 9px 10px); }

/* ------------------------------------------- SPLIT LAYOUT + VIDEO PANEL */
.panel-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 27vw);
  min-height: 100%;
  align-items: start;
}
.panel-main {
  padding: clamp(104px, 14vh, 148px) clamp(18px, 3.6vw, 52px) 84px;
  min-width: 0;
}
.panel-aside {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  border-left: 1px solid #242424;
  background: #060606;
  overflow: hidden;
}
.aside-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
/* postranní video — BAREVNÉ */
.aside-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) brightness(.88);
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}
.aside-video.is-playing { opacity: .94; }
.aside-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.68) 0%, rgba(0,0,0,.08) 22%, rgba(0,0,0,.14) 78%, rgba(0,0,0,.84) 100%);
}
.aside-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(236, 236, 236, .32);
  font-size: 11px;
  letter-spacing: .22em;
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(255,255,255,.02) 11px 12px),
    #070707;
  transition: opacity .5s ease;
}
.aside-frame.has-video .aside-fallback { opacity: 0; pointer-events: none; }
.aside-hud {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: .2em;
  color: rgba(236, 236, 236, .72);
  text-shadow: 0 1px 6px #000;
  pointer-events: none;
}
.aside-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  box-shadow: 0 0 8px var(--red-glow);
  animation: dotPulse 2.4s ease-in-out infinite;
}

/* ------------------------------------------- PORTFOLIO FILTRY + MŘÍŽKA */
.ig-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}
.ig-filter {
  padding: 7px 12px;
  font-size: 11px;
  letter-spacing: .16em;
  border: 1px solid #242424;
  color: var(--ink-dim);
  background: rgba(10, 10, 10, .85);
  transition: color .18s, border-color .18s, background .18s;
}
.ig-filter:hover { color: var(--ink); border-color: rgba(236, 236, 236, .45); }
.ig-filter.is-on { color: #fff; border-color: var(--red); background: var(--red); }

.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 16px;
}
.ig-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #242424;
  background: #080808;
  text-align: left;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.ig-card:hover, .ig-card:focus-visible { border-color: var(--red); outline: none; }
.ig-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #1d1d1d;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--ink-dim);
  background: #0b0b0b;
}
.ig-card-idx { color: var(--ink); }
.ig-card:hover .ig-card-idx { color: var(--red); }

.ig-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #050505;
  overflow: hidden;
}
.ig-card-media img, .ig-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s cubic-bezier(.2, .7, .1, 1), filter .3s ease;
}
.ig-card:hover .ig-card-media img, .ig-card:hover .ig-card-media video { transform: scale(1.045); }
.ig-card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 12px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.62) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
}
.ig-card:hover .ig-card-overlay, .ig-card:focus-visible .ig-card-overlay { opacity: 1; transform: none; }
.ig-card-snippet {
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ig-card-open { font-size: 10px; letter-spacing: .18em; color: var(--red); }

/* ----------------------------------------------- DETAIL PROJEKTU MODAL */
.ig-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(4, 4, 4, .94);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.6vw, 32px);
}
.ig-modal-box {
  width: min(1240px, 100%);
  height: min(86vh, 780px);
  border: 1px solid #2a2a2a;
  background: #080808;
  display: grid;
  grid-template-columns: 65% 35%;
  overflow: hidden;
}
.ig-modal-media {
  position: relative;
  background: #030303;
  border-right: 1px solid #242424;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}
.ig-modal-media img, .ig-modal-media video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #030303;
}
.ig-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid #2c2c2c;
  background: rgba(5, 5, 5, .84);
  color: var(--ink);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}
.ig-nav-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.ig-nav-btn.prev { left: 12px; }
.ig-nav-btn.next { right: 12px; }
.ig-counter {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  font-size: 11px;
  letter-spacing: .18em;
  background: rgba(5, 5, 5, .86);
  border: 1px solid #242424;
  color: var(--ink);
}
.ig-modal-info { display: flex; flex-direction: column; min-height: 0; background: #080808; }
.ig-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #242424;
  font-size: 11px;
  letter-spacing: .16em;
}
.ig-modal-meta { color: var(--red); }
.ig-modal-close {
  color: var(--ink-dim);
  padding: 4px 6px;
  border: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.ig-modal-close:hover { color: var(--ink); border-color: var(--red); }
.ig-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ig-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--ink);
  text-transform: uppercase;
}
.ig-modal-caption {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(236, 236, 236, .88);
  white-space: pre-line;
  word-break: break-word;
}
.ig-modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ig-tag {
  font-size: 10px;
  letter-spacing: .12em;
  padding: 4px 8px;
  border: 1px solid #242424;
  color: var(--ink-dim);
  background: #0d0d0d;
}
.ig-modal-foot {
  padding: 14px 18px;
  border-top: 1px solid #242424;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}
.ig-modal-date { color: var(--ink-dim); }
.ig-modal-link {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--red);
  transition: background .15s, color .15s;
}
.ig-modal-link:hover { background: var(--red); color: #fff; }

/* ---------------------------------------------------------- MOBIL ---- */
@media (hover: none), (max-width: 820px) {
  .stage { justify-content: flex-start; padding-top: max(52px, calc(env(safe-area-inset-top) + 44px)); gap: clamp(10px, 2.2vh, 22px); }
  .logo-svg { width: min(84vw, calc(44dvh * 420 / 660)); height: auto; }
  .callout, .dotg { display: none; }
  .m-nav {
    display: flex; flex-direction: column; width: min(88vw, 420px);
    border-top: 1px solid var(--line);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .m-nav a {
    display: grid; grid-template-columns: 34px 1fr auto; align-items: center;
    padding: clamp(11px, 1.9dvh, 15px) 4px; border-bottom: 1px solid var(--line);
    color: var(--ink); text-decoration: none; font-size: 13px; letter-spacing: .16em;
    background: rgba(0,0,0,.35); transition: background .15s, padding .15s;
  }
  .m-nav a i { font-style: normal; color: var(--red); font-size: 11px; }
  .m-nav a span.arr { color: var(--ink-dim); }
  .m-nav a:active, .m-nav a:focus-visible { background: var(--red); padding-left: 10px; }
  .topbar { padding-right: var(--pad); padding-top: calc(max(var(--pad), env(safe-area-inset-top)) + 28px); }
  .row { grid-template-columns: 44px 1fr; }
  .row .meta { grid-column: 2; }
}
@media (max-width: 900px) {
  .panel-split { grid-template-columns: 1fr; }
  .panel-aside {
    order: -1;
    position: relative;
    height: 175px;
    border-left: 0;
    border-bottom: 1px solid #242424;
    margin-top: calc(max(var(--pad), env(safe-area-inset-top)) + 68px);
  }
  .panel-main { padding: 28px var(--pad) 72px; }
  .ig-card-overlay { opacity: 1; transform: none; }
  .ig-modal-box {
    grid-template-columns: 1fr;
    grid-template-rows: 46% 54%;
    height: 92vh;
    height: 92dvh;
  }
  .ig-modal-media { border-right: 0; border-bottom: 1px solid #242424; }
}
@media (max-width: 520px) {
  .controls { font-size: 11px; gap: 6px; }
}
@media (hover: none) and (min-width: 821px) {
  .logo-svg { width: min(60vw, calc(40dvh * 420 / 660)); }
}


/* ---------------------------------------------- SEKCE O MNĚ (DOSSIER) */
.about-wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4.5vh, 46px);
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  gap: clamp(20px, 3.2vw, 40px);
  align-items: start;
}

/* Interaktivní portrét s glitch / chromatickou aberací a červeným HUD */
.about-portrait {
  position: relative;
  border: 1px solid #262626;
  background: #070707;
  overflow: hidden;
  cursor: crosshair;
  transition: border-color .22s ease, box-shadow .22s ease;
}
.about-portrait:hover,
.about-portrait.is-active {
  border-color: var(--red);
  box-shadow: 0 0 22px rgba(217, 30, 30, .24);
}

.about-portrait-stage {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #050505;
}

.about-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
}

.about-img--base {
  opacity: 1;
  transition: opacity .28s ease, transform .35s cubic-bezier(.2, .7, .1, 1);
}

.about-img--hover {
  opacity: 0;
  transition: opacity .26s ease, transform .35s cubic-bezier(.2, .7, .1, 1);
}

/* Chromatická aberace (červený posunutý kanál při najetí) */
.about-img--chroma {
  opacity: 0;
  mix-blend-mode: screen;
  filter: sepia(1) saturate(6) hue-rotate(-50deg) contrast(1.25);
  pointer-events: none;
}

.about-portrait:hover .about-img--base,
.about-portrait.is-active .about-img--base {
  opacity: 0;
  transform: scale(1.025);
}
.about-portrait:hover .about-img--hover,
.about-portrait.is-active .about-img--hover {
  opacity: 1;
  transform: scale(1.025);
  animation: aboutGlitchIn .32s steps(2) both;
}
.about-portrait:hover .about-img--chroma,
.about-portrait.is-active .about-img--chroma {
  animation: aboutChroma .38s steps(2) both;
}

@keyframes aboutGlitchIn {
  0%   { clip-path: inset(12% 0 65% 0); transform: translate(-5px, 0) scale(1.04); }
  25%  { clip-path: inset(58% 0 18% 0); transform: translate(5px, 0) scale(1.03); }
  55%  { clip-path: inset(0 0 0 0);     transform: translate(-2px, 0) scale(1.025); }
  100% { clip-path: inset(0 0 0 0);     transform: translate(0, 0) scale(1.025); }
}

@keyframes aboutChroma {
  0%   { opacity: .75; transform: translate(-6px, 0) scale(1.03); }
  35%  { opacity: .55; transform: translate(5px, -1px) scale(1.03); }
  70%  { opacity: .28; transform: translate(-3px, 1px) scale(1.025); }
  100% { opacity: 0;   transform: translate(0, 0) scale(1.025); }
}

/* Červené zaměřovací rohy (HUD) */
.about-hud-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  opacity: .25;
  transition: opacity .2s ease, transform .22s ease, border-color .2s ease;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0;
  z-index: 3;
}
.about-hud-corner.tl { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.about-hud-corner.tr { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.about-hud-corner.bl { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.about-hud-corner.br { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }

.about-portrait:hover .about-hud-corner,
.about-portrait.is-active .about-hud-corner {
  opacity: 1;
  border-color: var(--red);
}
.about-portrait:hover .about-hud-corner.tl, .about-portrait.is-active .about-hud-corner.tl { transform: translate(-2px, -2px); }
.about-portrait:hover .about-hud-corner.tr, .about-portrait.is-active .about-hud-corner.tr { transform: translate(2px, -2px); }
.about-portrait:hover .about-hud-corner.bl, .about-portrait.is-active .about-hud-corner.bl { transform: translate(-2px, 2px); }
.about-portrait:hover .about-hud-corner.br, .about-portrait.is-active .about-hud-corner.br { transform: translate(2px, 2px); }

/* Červený scanline pruh při najetí */
.about-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: -12%;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}
.about-portrait:hover .about-scanline,
.about-portrait.is-active .about-scanline {
  opacity: .85;
  animation: aboutScan 2.2s linear infinite;
}
@keyframes aboutScan {
  0%   { top: -4%; }
  100% { top: 104%; }
}

.about-portrait-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #222;
  background: #0a0a0a;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--ink-dim);
}
.about-portrait-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  transition: color .2s ease;
}
.about-portrait-status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--ink-dim);
  transition: background .2s ease, box-shadow .2s ease;
}
.about-portrait:hover .about-portrait-status,
.about-portrait.is-active .about-portrait-status {
  color: var(--red);
}
.about-portrait:hover .about-portrait-status::before,
.about-portrait.is-active .about-portrait-status::before {
  background: var(--red);
  box-shadow: 0 0 8px var(--red-glow);
}

/* Pravá část hlavičky: jméno, status, bio */
.about-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .18em;
}
.about-badge {
  padding: 5px 9px;
  border: 1px solid #262626;
  background: #0a0a0a;
  color: var(--ink-dim);
}
.about-badge.is-red {
  border-color: var(--red);
  color: var(--ink);
}
.about-lead {
  margin: 0;
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.55;
  color: var(--ink) !important;
  max-width: 58ch;
  border-left: 2px solid var(--red);
  padding-left: 16px;
}
.about-story {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-story p {
  margin: 0;
  color: rgba(236, 236, 236, .78);
}

/* Sekční nadpisy uvnitř O MNĚ */
.about-sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--red);
  text-transform: uppercase;
}
.about-sec-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Interaktivní karty dovedností s lehkým glitch/aberací při najetí */
.about-skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.about-card {
  position: relative;
  border: 1px solid #242424;
  background: rgba(10, 10, 10, .86);
  padding: 18px 18px 16px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.about-card:hover {
  border-color: var(--red);
  background: rgba(217, 30, 30, .06);
  transform: translateY(-2px);
}
.about-card-no {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--red);
  margin-bottom: 8px;
}
.about-card h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--ink);
  transition: text-shadow .16s ease;
}
.about-card:hover h3 {
  text-shadow: -1.5px 0 rgba(217, 30, 30, .9), 1.5px 0 rgba(236, 236, 236, .45);
}
.about-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-dim);
}

/* Tech stack + Jazyky */
.about-split-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.about-tag {
  padding: 7px 11px;
  border: 1px solid #262626;
  background: #090909;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ink);
  transition: border-color .15s ease, color .15s ease, background .15s ease, text-shadow .15s ease;
}
.about-tag:hover {
  border-color: var(--red);
  background: rgba(217, 30, 30, .14);
  text-shadow: -1px 0 rgba(217, 30, 30, .85);
}

.about-langs {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.about-lang-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.about-lang-code { color: var(--red); letter-spacing: .16em; }
.about-lang-lvl { color: var(--ink-dim); }

/* Off-screen / Příběhové bloky */
.about-offscreen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.about-off-card {
  border: 1px solid #222;
  background: rgba(8, 8, 8, .82);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .18s ease;
}
.about-off-card:hover {
  border-color: var(--red);
}
.about-off-tag {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--red);
}
.about-off-card h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.about-off-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-dim);
}

@media (max-width: 980px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-portrait { max-width: 300px; }
  .about-skills { grid-template-columns: 1fr; }
  .about-split-meta { grid-template-columns: 1fr; }
  .about-offscreen { grid-template-columns: 1fr; }
}


/* ---------------------------------------- VESPER HOSTIS // ERROR TEASER */
.module.is-teaser {
  cursor: pointer;
  transition: border-color .18s ease, opacity .18s ease, transform .12s ease, box-shadow .2s ease;
}
.module.is-teaser:hover,
.module.is-teaser:focus-visible {
  opacity: .92;
  border-color: var(--red);
  box-shadow: 0 0 18px rgba(217, 30, 30, .2);
  outline: none;
}
.module.is-teaser:hover h2 {
  text-shadow: -2px 0 rgba(217, 30, 30, .95), 2px 0 rgba(236, 236, 236, .45);
  animation: vhJitter .16s steps(2) 2;
}
.module.is-teaser:hover .status {
  color: var(--red);
}
.module.is-teaser:hover .status::before {
  background: var(--red);
  opacity: 1;
  box-shadow: 0 0 8px var(--red-glow);
}

@keyframes vhJitter {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2px, 1px); }
  50%  { transform: translate(2px, -1px); }
  75%  { transform: translate(-1px, 0); }
  100% { transform: translate(0, 0); }
}

/* Brutální glitch celé stránky při spuštění ERROR fáze */
body.is-vesper-glitch .panel,
body.is-vesper-glitch .topbar,
body.is-vesper-glitch .controls {
  animation: vhPageTear .11s steps(2) infinite;
  color: var(--red) !important;
  text-shadow: -3px 0 rgba(217, 30, 30, .95), 3px 0 rgba(255, 255, 255, .65);
}
body.is-vesper-glitch .panel * {
  border-color: var(--red) !important;
}
body.is-vesper-glitch::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 190;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(217, 30, 30, .18) 0 2px, transparent 2px 6px),
    rgba(217, 30, 30, .12);
  mix-blend-mode: hard-light;
  animation: vhFlash .14s steps(2) infinite;
}

@keyframes vhPageTear {
  0%   { transform: translate(0, 0) skewX(0deg); filter: contrast(1.6) saturate(2); }
  25%  { transform: translate(-8px, 3px) skewX(-3deg); filter: contrast(2.1) hue-rotate(-10deg); }
  50%  { transform: translate(9px, -4px) skewX(4deg); filter: invert(.08) contrast(2.4); }
  75%  { transform: translate(-5px, -2px) skewX(-2deg); filter: contrast(1.8); }
  100% { transform: translate(6px, 2px) skewX(1deg); filter: contrast(2); }
}
@keyframes vhFlash {
  0%, 100% { opacity: .9; }
  50%      { opacity: .25; }
}

/* Fullscreen takeover overlay (video + glitching cross + #youbeenwarned) */
.vh-takeover {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vh-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transition: opacity .12s linear;
}
.vh-video.is-on { opacity: 1; }

/* Glitchující kříž VESPER HOSTIS (přes video i přes černou) */
.vh-cross-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  mix-blend-mode: screen;
}
.vh-cross-wrap.is-flash {
  opacity: 1;
  animation: vhCrossTear .14s steps(2) infinite;
}
.vh-cross-wrap.is-solo {
  mix-blend-mode: normal;
  background: #000;
}
.vh-cross-img {
  position: absolute;
  max-width: min(86vw, 960px);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
}
.vh-cross-img.ghost-l {
  opacity: .75;
  transform: translate(-10px, 2px);
  filter: drop-shadow(0 0 18px rgba(217, 30, 30, .95)) contrast(1.4);
  mix-blend-mode: screen;
}
.vh-cross-img.ghost-r {
  opacity: .55;
  transform: translate(11px, -3px);
  filter: hue-rotate(15deg) brightness(1.3);
  mix-blend-mode: screen;
}

@keyframes vhCrossTear {
  0%   { transform: translate(-7px, 2px) scale(1.03); filter: contrast(1.6) brightness(1.25); }
  25%  { transform: translate(8px, -3px) scale(1.06); clip-path: inset(12% 0 22% 0); }
  50%  { transform: translate(-4px, 0) scale(1.01); clip-path: inset(0 0 0 0); filter: contrast(2) brightness(1.4); }
  75%  { transform: translate(6px, 3px) scale(1.04); clip-path: inset(38% 0 8% 0); }
  100% { transform: translate(0, 0) scale(1); clip-path: inset(0 0 0 0); }
}

/* Scanlines přes takeover */
.vh-scan {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: .42;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 3px);
}

/* Finální černá obrazovka s červeným #youbeenwarned */
.vh-warn {
  position: relative;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.vh-warn.is-on {
  opacity: 1;
  pointer-events: auto;
}
.vh-hashtag {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(28px, 8.2vw, 118px);
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--red);
  text-decoration: none;
  text-transform: lowercase;
  line-height: 1.05;
  text-shadow:
    0 0 18px rgba(217, 30, 30, .85),
    0 0 46px rgba(217, 30, 30, .45),
    -2px 0 rgba(255, 255, 255, .28);
  animation: vhWarnPulse 2.4s steps(2) infinite;
  transition: transform .18s ease, text-shadow .18s ease, color .18s ease;
}
.vh-hashtag:hover,
.vh-hashtag:focus-visible {
  color: #ff2b2b;
  transform: scale(1.04);
  text-shadow:
    0 0 24px rgba(255, 35, 35, 1),
    0 0 70px rgba(217, 30, 30, .85),
    -4px 0 rgba(255, 255, 255, .55),
    4px 0 rgba(217, 30, 30, .9);
  outline: none;
}

@keyframes vhWarnPulse {
  0%, 92%, 100% { transform: translate(0, 0); opacity: 1; }
  94%           { transform: translate(-4px, 1px); opacity: .82; }
  96%           { transform: translate(4px, -1px); opacity: .95; }
  98%           { transform: translate(-2px, 0); opacity: .7; }
}

.vh-exit {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 10;
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(236, 236, 236, .35);
  padding: 6px 10px;
  border: 1px solid rgba(236, 236, 236, .15);
  background: rgba(0, 0, 0, .75);
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease, color .15s ease, border-color .15s ease;
}
.vh-exit.is-on {
  opacity: 1;
  pointer-events: auto;
}
.vh-exit:hover {
  color: var(--red);
  border-color: var(--red);
}
