/* bialczak.net - arkusz stylów
   Ciemny granat, jeden akcent: elektryczny błękit. Krój: Schibsted Grotesk (zmienny 400-900).
   Zmienne --lvl, --bass i --progress ustawia odtwarzacz (player.js) w każdej klatce. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/static/fonts/schibsted-latin-ext.woff2?v=ee9eeb232c") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/static/fonts/schibsted-latin.woff2?v=4c8b93f431") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #05080f;
  --bg-2: #0b1320;
  --line: #1c2838;
  --text: #e9eef6;
  --soft: #95a5ba;
  --blue: #1f7bff;
  --blue-hi: #5aa9ff;
  --blue-btn: #1565d8;            /* tło przycisków z białym tekstem: kontrast 5:1 */
  --cyan: #8fd8ff;
  --face: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --wrap: 80rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --lvl: 0;
  --bass: 0;
  --progress: 0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--face); font-size: 1.0625rem; line-height: 1.6;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--blue); text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-hi); }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.just, .lead, .prose p, .prose li, .note p, .quote p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.soft { color: var(--soft); }
.ico { width: 1.5rem; height: 1.5rem; flex: none; }
.ico .s { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico .f { fill: currentColor; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--blue); color: #fff; padding: .6rem 1rem; border-radius: 6px; }
.skip:focus { top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); position: relative; z-index: 1; }

/* kosmiczne tło za nagłówkiem i hero (rysuje space.js) */
.space {
  position: absolute; left: 0; top: 0; width: 100%; height: clamp(40rem, 100vh, 58rem); z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 62%, transparent 96%); mask-image: linear-gradient(#000 62%, transparent 96%);
}
@media (max-width: 60rem) { .space { height: 62rem; } }
.page-home .top { border-bottom-color: rgba(90, 169, 255, .22); }
.page-home .hero .role, .page-home .hero .time { text-shadow: 0 1px 10px rgba(0, 0, 0, .95), 0 0 2px rgba(0, 0, 0, .9); }

/* ---------- nagłówek ---------- */
.top {
  position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: .5rem 2rem; padding-block: 1.1rem .9rem; border-bottom: 1px solid var(--line);
}
.top::before { content: ""; position: absolute; left: 0; bottom: -1px; width: 6.5rem; height: 2px; background: var(--blue); }
.top::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px;
  width: calc(var(--progress) * 100%); background: var(--blue-hi);
  box-shadow: 0 0 12px 1px rgba(90, 169, 255, .7);
}
.mark { font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -.01em; }
.mark span { color: var(--blue-hi); }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.top nav a { text-decoration: none; font-weight: 600; font-size: .98rem; padding-block: .2rem; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--blue); }
.top nav a.lang { border: 1px solid var(--line); border-radius: 6px; padding: .15rem .55rem; font-size: .85rem; letter-spacing: .04em; }
.top nav a.lang:hover { border-color: var(--blue); color: var(--blue-hi); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
  gap: 2rem 3rem; padding-block: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}
@media (min-width: 60rem) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.name { font-size: clamp(3.2rem, 8.2vw, 6.9rem); font-weight: 900; line-height: .88; letter-spacing: -.045em; }
.name span { display: block; }
.glow {
  background: linear-gradient(180deg, #ffffff 0%, #cfe4ff 35%, var(--blue-hi) 70%, var(--blue) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 calc(6px + var(--lvl) * 26px) rgba(31, 123, 255, calc(.45 + var(--lvl) * .5)));
  padding-bottom: .06em;
}
.role { font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.35; margin-top: 1.4rem; max-width: 24ch; font-weight: 500; }
.track { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; max-width: 34rem; }
.track .seek { flex: 1; min-width: 0; }
.time { font-size: .9rem; color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }

.btn-round {
  width: 3.2rem; height: 3.2rem; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--blue); color: #fff;
  box-shadow: 0 0 calc(10px + var(--lvl) * 30px) rgba(31, 123, 255, calc(.35 + var(--lvl) * .5));
  transition: background .15s;
}
.btn-round:hover { background: var(--blue-hi); }
.btn-round.small { width: 2.4rem; height: 2.4rem; }
.btn-round .ico { width: 1.3rem; height: 1.3rem; }
.i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }

.seek {
  --p: 0%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 1.2rem; background: transparent; margin: 0; cursor: pointer;
}
.seek::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--blue) var(--p), var(--line) var(--p)); }
.seek::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
.seek::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--blue); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--blue-hi); box-shadow: 0 0 10px rgba(90, 169, 255, .8); border: 0; }
.seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--blue-hi); border: 0; }

.disc { position: relative; width: 100%; max-width: 36rem; aspect-ratio: 1; justify-self: center; }
.disc::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 123, 255, .55) 0%, rgba(31, 123, 255, .12) 45%, transparent 70%);
  opacity: calc(.45 + var(--lvl) * .55); transform: scale(calc(1 + var(--bass) * .12));
}
.disc canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo {
  position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  transform: translate(-50%, -50%) scale(calc(1 + var(--bass) * .05));
  box-shadow: 0 0 0 3px var(--blue), 0 0 calc(20px + var(--lvl) * 50px) rgba(31, 123, 255, calc(.5 + var(--lvl) * .4));
}
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.disc-play {
  position: absolute; left: 50%; top: 71%; transform: translate(-50%, -50%);
  width: clamp(2.8rem, 9%, 3.6rem); aspect-ratio: 1; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: var(--blue);
  border: 3px solid var(--bg);
}
.disc-play:hover { background: var(--blue-hi); }
.disc-play .ico { width: 45%; height: 45%; }

/* terminal pod odtwarzaczem (term.js) */
.term {
  display: block; margin: .9rem 0 0 4.2rem; padding: .45rem .8rem; max-width: min(40rem, calc(100% - 4.2rem));
  height: calc(3em + .9em + 2px); overflow: hidden;            /* stała wysokość: 2 linijki, strona się nie przesuwa */
  font-family: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, "DejaVu Sans Mono", monospace;
  font-size: .86rem; line-height: 1.5; color: #d6e4f7;
  background: rgba(4, 7, 14, .7); border: 1px solid rgba(90, 169, 255, .22); border-radius: 6px;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .9);
}
.t-line, .t-out { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-pr { color: #6ee7a8; }
.t-path { color: #8fd8ff; font-weight: 700; }
.t-out { color: #a9bbd2; }
.t-ok { color: #8ef0bd; }
.t-err { color: #ff7a7a; }
.t-cur { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--blue-hi); box-shadow: 0 0 calc(4px + var(--lvl) * 14px) rgba(90, 169, 255, .9); animation: t-blink 1s steps(1) infinite; }
@keyframes t-blink { 50% { opacity: 0; } }
/* efekt Entera: błysk ramki i wysuwający się wynik */
.t-enter { animation: t-flash .9s ease-out; }
.t-enter-err { animation: t-flash-err .9s ease-out; }
.t-enter .t-out, .t-enter-err .t-out { animation: t-out .45s ease-out; }
@keyframes t-flash { 0% { border-color: #8fd8ff; box-shadow: 0 0 0 1px rgba(143, 216, 255, .8), 0 0 28px rgba(31, 123, 255, .9), inset 0 0 18px rgba(31, 123, 255, .45); } 100% { border-color: rgba(90, 169, 255, .22); box-shadow: none; } }
@keyframes t-flash-err { 0% { border-color: #ff7a7a; box-shadow: 0 0 0 1px rgba(255, 122, 122, .8), 0 0 26px rgba(255, 80, 80, .7), inset 0 0 16px rgba(255, 80, 80, .35); } 100% { border-color: rgba(90, 169, 255, .22); box-shadow: none; } }
@keyframes t-out { from { opacity: 0; transform: translateY(-4px); clip-path: inset(0 100% 0 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
@media (max-width: 34rem) { .term { margin-left: 0; max-width: 100%; font-size: .74rem; } }

/* ---------- sekcje ---------- */
.row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem 2rem;
  padding-block: 2rem; border-top: 1px solid var(--line);
}
.row.first { border-top: 0; padding-top: 2.5rem; }
@media (min-width: 56rem) { .row { grid-template-columns: 12.5rem minmax(0, 1fr); } }
.label { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: .9rem; text-wrap: balance; font-size: 1rem; font-weight: 750; line-height: 1.5; align-self: start; }
.label::before { content: ""; width: 1.6rem; height: 3px; border-radius: 2px; background: var(--blue); flex: none; margin-top: .72em; }
.label small { flex-basis: 100%; padding-left: 2.5rem; font-size: .88rem; font-weight: 500; color: var(--soft); line-height: 1.4; }
.body { min-width: 0; display: grid; gap: 1rem; position: relative; z-index: 1; }
@media (min-width: 56rem) {
  .row .body::before { content: ""; position: absolute; left: -1rem; top: .2rem; width: 1px; height: 5rem; background: linear-gradient(var(--blue), transparent); }
}

/* tło z falami z kropek i ucho przy sekcji Tinnitus (rysuje player.js) */
.row { position: relative; }
.has-waves .waves { position: absolute; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); bottom: -1.5rem; height: 11rem; width: calc(100% + 2 * var(--gutter)); z-index: 0; pointer-events: none; opacity: .9; }
.has-waves { padding-bottom: 4.5rem; }
.ear { display: none; }
@media (min-width: 72rem) {
  .has-ear { grid-template-columns: 12.5rem minmax(0, 1fr) 15rem; }
  .ear { display: block; position: relative; align-self: stretch; min-height: 14rem; }
  .ear-svg { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 7.5rem; height: auto; fill: none; stroke: var(--blue-hi); stroke-width: 1.6; stroke-linecap: round; filter: drop-shadow(0 0 calc(4px + var(--lvl) * 14px) rgba(90, 169, 255, .8)); }
  .ear-svg .faint { stroke: var(--blue); opacity: .45; stroke-dasharray: 1 5; }
  .ear-wave { position: absolute; left: -1rem; right: 5rem; top: 50%; height: 7rem; transform: translateY(-50%); width: calc(100% - 4rem); }
}
.lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); font-weight: 650; line-height: 1.4; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 0; margin: .75rem 0 0; }
.facts > li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .9rem; align-items: center;
  padding-inline: 1.25rem; border-left: 1px solid var(--line);
}
.facts > li:first-child { border-left: 0; padding-left: 0; }
.facts .ico { grid-row: span 2; width: 1.9rem; height: 1.9rem; color: var(--blue-hi); }
.facts .k { font-size: .82rem; color: var(--soft); line-height: 1.3; }
.facts b { display: block; font-weight: 750; line-height: 1.3; }
@media (max-width: 40rem) { .facts > li { border-left: 0; padding-left: 0; } }

.layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: 1.4rem 1.75rem; }
.layers li { border-top: 3px solid var(--blue); padding-top: .75rem; }
.layers b { display: block; font-weight: 750; font-size: 1.05rem; }
.layers span { color: var(--soft); font-size: .95rem; line-height: 1.45; display: block; margin-top: .15rem; }

.timeline { position: relative; display: grid; gap: .55rem; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: .32rem; top: .7rem; bottom: .7rem; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.timeline li::before { content: ""; position: absolute; left: -1.6rem; top: .55rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px var(--bg), 0 0 10px rgba(31, 123, 255, .8); }
.timeline time { font-weight: 850; font-size: 1.45rem; line-height: 1.2; color: var(--blue-hi); font-variant-numeric: tabular-nums; }
.timeline span { font-weight: 650; }

.posts { display: grid; }
.posts li { border-bottom: 1px solid var(--line); }
.posts a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem;
  padding: .7rem .25rem; text-decoration: none; font-weight: 600;
}
.posts a .ico { width: 1.35rem; height: 1.35rem; color: var(--blue-hi); }
.posts a .arr { color: var(--blue); transition: transform .15s; }
.posts a:hover { color: var(--blue-hi); background: linear-gradient(90deg, rgba(31, 123, 255, .08), transparent); }
.posts a:hover .arr { transform: translateX(4px); }
.posts .pt small { display: block; font-weight: 400; color: var(--soft); font-size: .93rem; margin-top: .2rem; }
.posts.big a { padding-block: 1rem; font-size: 1.15rem; }

.quote { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.25rem; border-left: 2px solid var(--blue); padding-left: 1.25rem; max-width: 56rem; }
.quote::before { content: "“"; grid-row: span 2; font-size: 4.6rem; line-height: .8; font-weight: 900; color: var(--blue); }
.quote p { font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.5; }
.quote footer { color: var(--soft); font-size: .85rem; margin-top: .5rem; }

.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; }
.btn-mail {
  font: inherit; font-weight: 700; font-size: 1.05rem; display: inline-flex; align-items: center; gap: .7rem;
  padding: .85rem 1.5rem; border-radius: 8px; border: 0; cursor: pointer; background: var(--blue-btn); color: #fff; text-decoration: none;
  box-shadow: 0 0 24px rgba(31, 123, 255, .35);
}
.btn-mail:hover { background: var(--blue); color: #fff; }
.mail-revealed { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; font-weight: 800; font-size: clamp(1.25rem, 3.4vw, 1.8rem); letter-spacing: -.01em; }
.mail-revealed a { text-decoration: none; border-bottom: 2px solid var(--blue); }
.mail-copy { font: inherit; font-size: .85rem; font-weight: 600; letter-spacing: 0; padding: .35rem .8rem; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; }
.mail-copy:hover { border-color: var(--blue); }
.social { display: flex; flex-wrap: wrap; gap: 1rem 2.25rem; }
.social a { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 650; padding-bottom: .3rem; border-bottom: 2px solid var(--blue); }
.social .ico { width: 1.7rem; height: 1.7rem; color: var(--blue-hi); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: .5rem; }
.text-link { font-weight: 650; }
.notfound { min-height: 45vh; }

/* ---------- inicjatywy ---------- */
.projects { gap: 0; }
.proj-lead { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; padding-bottom: 1.1rem; position: relative; margin-bottom: 1.75rem; }
.proj-lead::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(46rem, 100%); height: 2px; background: linear-gradient(90deg, var(--blue), var(--blue-hi) 45%, transparent); box-shadow: 0 0 12px rgba(31, 123, 255, .6); }
.init { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.5rem; align-items: start; }
.init + .init { border-top: 1px solid var(--line); padding-top: 1.75rem; margin-top: 1.75rem; }
.init-ico { width: 3.6rem; height: 3.6rem; border-radius: 12px; display: grid; place-items: center; color: var(--blue-hi); border: 1px solid rgba(90, 169, 255, .55); background: rgba(31, 123, 255, .08); box-shadow: 0 0 18px rgba(31, 123, 255, .25), inset 0 0 12px rgba(31, 123, 255, .15); }
.init-ico .ico { width: 1.9rem; height: 1.9rem; }
.init-main { display: grid; gap: .6rem; justify-items: start; min-width: 0; max-width: 40rem; }
.init h3 { font-size: 1.4rem; font-weight: 750; line-height: 1.2; }
.init-main p { color: #c9d4e3; }
.go { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--blue-hi); text-decoration: none; font-size: 1.05rem; }
.go .arr, .yt .arr { width: 1.1rem; height: 1.1rem; transition: transform .15s; }
.go:hover .arr, .yt:hover .arr { transform: translateX(4px); }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .4rem; }
.chips li { font-size: .88rem; padding: .3rem .9rem; border-radius: 99px; border: 1px solid rgba(90, 169, 255, .45); color: #cfe0f7; }
.globe { display: none; }
@media (min-width: 72rem) {
  .init-ai { grid-template-columns: auto minmax(0, 1fr) 21rem; }
  .globe { display: block; width: 100%; height: auto; margin-top: -4.5rem; }
}
.globe .orbit { fill: none; stroke: rgba(90, 169, 255, .35); stroke-width: 1; stroke-dasharray: 2 5; }
.globe .sphere { stroke: rgba(90, 169, 255, .8); stroke-width: 1.4; filter: drop-shadow(0 0 calc(10px + var(--lvl) * 24px) rgba(31, 123, 255, .7)); }
.globe .grid { fill: none; stroke: rgba(90, 169, 255, .28); stroke-width: .8; }
.globe .cities { fill: #bfe0ff; opacity: calc(.55 + var(--lvl) * .45); }
.globe .node circle { fill: #071226; stroke: var(--blue-hi); stroke-width: 1.5; filter: drop-shadow(0 0 calc(5px + var(--bass) * 14px) rgba(31, 123, 255, .9)); }
.globe .gi .s { fill: none; stroke: #8fd8ff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.init-video .shorts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.25rem; margin-top: .5rem; }
@media (min-width: 40rem) { .init-video .shorts { grid-column: 2; } }
.short { border: 1px solid rgba(90, 169, 255, .45); border-radius: 14px; padding: .45rem .45rem 1rem; background: rgba(11, 19, 32, .7); box-shadow: 0 0 20px rgba(31, 123, 255, .12); display: grid; gap: .6rem; }
.short:hover { border-color: var(--blue-hi); box-shadow: 0 0 28px rgba(31, 123, 255, .3); }
.short-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 7.5; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bg-2); }
.short-thumb picture, .short-thumb img { display: block; width: 100%; height: 100%; }
.short-thumb img { object-fit: cover; transition: transform .3s; }
.short-thumb:hover img { transform: scale(1.03); }
.short-ico { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 4.2rem; height: 4.2rem; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--blue-btn); box-shadow: 0 0 30px rgba(31, 123, 255, .7); }
.short-ico .ico { width: 1.7rem; height: 1.7rem; }
.ai-badge { position: absolute; left: .6rem; top: .6rem; font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 6px; background: rgba(5, 8, 15, .78); color: #cfe0f7; border: 1px solid rgba(90, 169, 255, .5); }
.short h4 { margin: .2rem .6rem 0; font-size: 1.12rem; font-weight: 750; line-height: 1.3; }
.yt { display: inline-flex; align-items: center; gap: .6rem; margin: 0 .6rem; font-weight: 650; color: var(--blue-hi); text-decoration: none; }
.yt .yt-ico { width: 1.6rem; height: 1.6rem; color: var(--blue-hi); }

/* okno z filmem: pionowy odtwarzacz na środku */
.vmodal { padding: 0; border: 0; background: transparent; overflow: visible; max-width: none; max-height: none; }
.vmodal::backdrop { background: rgba(2, 4, 9, .85); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.vframe { width: min(24rem, calc(100vw - 2rem), calc((100vh - 6rem) * 9 / 16)); aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(90, 169, 255, .5), 0 0 60px rgba(31, 123, 255, .35); }
.vframe iframe { width: 100%; height: 100%; border: 0; display: block; }
.vmodal .modal-close { position: absolute; top: -3.1rem; right: 0; background: var(--bg-2); }

/* ---------- mini-odtwarzacz przy przewijaniu ---------- */
.mini {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 10;
  display: flex; align-items: center; gap: .7rem; padding: .4rem .9rem .4rem .4rem; border-radius: 99px;
  background: rgba(11, 19, 32, .92); border: 1px solid var(--line);
  box-shadow: 0 0 calc(10px + var(--lvl) * 30px) rgba(31, 123, 255, .35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mini[hidden] { display: none; }
.mini canvas { width: 6.5rem; height: 1.8rem; }

/* ---------- artykuł ---------- */
.article { max-width: 46rem; padding-block: 2.5rem 3rem; }
.back { font-size: .95rem; margin-bottom: 1.5rem; }
.back a { color: var(--soft); }
.article h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 850; letter-spacing: -.03em; line-height: 1.05; text-wrap: balance; }
.meta { color: var(--soft); margin: 1rem 0 2rem; font-size: .95rem; }
.prose { font-size: 1.1rem; line-height: 1.7; }
.prose p { margin-bottom: 1em; }
.prose h2 { font-size: 1.45rem; font-weight: 800; margin: 2.2rem 0 .7rem; }
.article .prose h2 { font-size: 1.2rem; font-weight: 750; margin: 1.9rem 0 .35rem; color: var(--blue-hi); }
.prose h3 { font-size: 1.15rem; font-weight: 750; margin: 1.9rem 0 .35rem; color: var(--blue-hi); }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li { margin-bottom: .3em; }
.prose li::marker { color: var(--blue); }
.prose a { color: var(--blue-hi); }
.note { border-left: 3px solid var(--blue); background: var(--bg-2); padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; margin-bottom: 2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.tags li { font-size: .85rem; padding: .25rem .7rem; border-radius: 99px; border: 1px solid var(--line); color: var(--soft); }

/* ---------- okno z wpisem ---------- */
.modal {
  width: min(52rem, calc(100vw - 2rem)); max-height: min(88vh, 60rem); padding: 0;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text);
  box-shadow: 0 0 0 1px rgba(31, 123, 255, .25), 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(31, 123, 255, .18);
  overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(2, 4, 9, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .9rem .7rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.modal-open { font-size: .88rem; color: var(--soft); }
.modal-close { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.modal-close:hover { border-color: var(--blue); color: var(--blue-hi); }
.modal-body { overflow-y: auto; padding: 1.75rem clamp(1.25rem, 4vw, 2.75rem) 2.5rem; overscroll-behavior: contain; }
.modal-body:focus { outline: none; }
.modal-body .article { padding: 0; max-width: none; }
.modal-body .back { display: none; }
.modal-status { color: var(--soft); }
@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modal-in .22s ease-out; }
  @keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
}
body.modal-lock { overflow: hidden; }

/* ---------- stopka ---------- */
.bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  border-top: 1px solid var(--line); padding-block: 1.4rem 2.5rem; font-size: .88rem; color: var(--soft);
}
.bottom ul { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; }
.bottom a { color: var(--text); }

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

/* powiązane wpisy pod artykułem */
.related { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.1rem; font-weight: 750; margin-bottom: .75rem; }
.related .posts a { font-size: 1rem; }
