/* ============================================================
   KUDEL - portfolio
   Kolory, czcionki i odstępy zmieniasz w sekcji :root poniżej.
   ============================================================ */

/* ---------- czcionki (hostowane razem ze stroną) ---------- */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-latin-wdth-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/space-mono-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/space-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/space-mono-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/space-mono-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #030304;
  --ink2: #0b0b0d;
  --bone: #ebe7df;
  --red: #e10600;
  --redt: #ff4a3d; /* jaśniejszy odcień czerwieni dla małego tekstu (kontrast > 4,5:1) */
  --acid: #d4ff00;
  --line: rgba(235, 231, 223, .28);

  --f: 'Archivo', 'Arial Black', Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, Menlo, monospace;

  --hdr: 64px;
  --pad: clamp(16px, 3.2vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* ---------- tekstura: ziarno + pyłki jak na ksero ---------- */
body::before, body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90; }
body::before {
  opacity: .16; mix-blend-mode: screen;
  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='.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body::after {
  opacity: .55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><filter id='s'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='1' seed='7' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 .92  0 0 0 0 .9  0 0 0 0 .87  2.4 2.4 2.4 0 -5.6'/></filter><rect width='100%' height='100%' filter='url(%23s)'/></svg>");
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--red); color: var(--bone); }
:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }

/* typografia pomocnicza */
.cond { font-stretch: 62%; font-weight: 900; text-transform: uppercase; }
.mono { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.red { color: var(--red); }

/* ---------- menu (przyklejone) ---------- */
.top {
  position: sticky; top: 0; z-index: 80; height: var(--hdr);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(3, 3, 4, .9); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--bone);
}
.logo {
  font-family: var(--f); font-weight: 900; font-stretch: 62%; font-size: 2.3rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .01em; color: var(--bone);
}
.logo i { font-style: normal; color: var(--red); margin-left: .08em; }
.logo:hover { color: var(--red); }
.top nav { display: flex; gap: 8px; }
.top nav a {
  font-weight: 800; font-stretch: 125%; font-size: .78rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .85em 1.1em; border: 2px solid var(--bone);
}
.top nav a:hover, .top nav a[aria-current="page"] { background: var(--red); border-color: var(--red); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 41vw;
  padding: clamp(18px, 2.4vw, 32px) var(--pad) clamp(28px, 4vw, 56px);
  border-bottom: 2px solid var(--bone);
  background:
    radial-gradient(ellipse at 85% 10%, rgba(225, 6, 0, .35), transparent 50%),
    radial-gradient(circle, rgba(235, 231, 223, .09) 1.2px, transparent 1.6px) 0 0 / 14px 14px,
    var(--ink);
}
.hero-meta { text-shadow: 0 0 6px #030304, 0 0 2px #030304; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: relative; z-index: 3; }
.hero-meta span:nth-child(2) { color: var(--redt); }

.kudel {
  position: relative; z-index: 3;
  font-size: clamp(5rem, 18.5vw, 20rem); line-height: .78; letter-spacing: -.015em;
  font-stretch: 62%; font-weight: 900; text-transform: uppercase;
  margin: auto 0 .04em -.025em;
  text-shadow: .018em .018em 0 var(--red);
}
.roles { position: relative; z-index: 3; display: grid; gap: .08em; font-size: clamp(1.6rem, 3.8vw, 4.2rem); line-height: .92; font-weight: 900; margin-bottom: auto; text-transform: uppercase; letter-spacing: -.025em; }
.roles .outline { color: transparent; -webkit-text-stroke: 1.5px var(--bone); }
.roles .outline em { font-style: normal; color: var(--red); -webkit-text-stroke: 0; }

.collage { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.collage img {
  position: absolute; left: var(--l); top: var(--t); width: var(--w); z-index: var(--z);
  aspect-ratio: 4 / 5; object-fit: cover; transform: rotate(var(--r));
  border: 3px solid var(--bone); box-shadow: 6px 6px 0 var(--red);
}
.collage img:nth-child(3n) { box-shadow: 6px 6px 0 var(--bone); }
.collage img:nth-child(4n) { border-color: var(--red); box-shadow: 6px 6px 0 var(--ink2); }

.tape {
  position: absolute; z-index: 4; right: var(--pad); bottom: clamp(70px, 9vw, 120px);
  background: var(--acid); color: var(--ink); font-weight: 900; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(.7rem, 1.3vw, 1rem); padding: .55em 1.1em; transform: rotate(-4deg);
  border: 2px solid var(--ink);
}
.btn {
  display: inline-flex; align-items: center; gap: .6em; cursor: pointer;
  font-family: var(--f); font-weight: 900; font-stretch: 125%; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em;
  background: var(--red); color: var(--bone); border: 2px solid var(--bone);
  padding: 1em 1.4em; box-shadow: 6px 6px 0 var(--bone);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--bone); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--bone); color: var(--ink); }

/* ---------- taśma ---------- */
.band {
  position: relative; z-index: 5; overflow: hidden; white-space: nowrap;
  background: var(--bone); color: var(--ink);
  border-block: 2px solid var(--bone);
  padding: .55em 0;
  font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: clamp(1.4rem, 3vw, 2.6rem); line-height: 1;
}
.band.bone { background: var(--bone); }
.band .track { display: inline-block; animation: slide 45s linear infinite; }
.band:not(.bone) .track { animation-duration: 49.5s; }
.band span { margin: 0 .6em; }
.band span.o { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- krótkie bio na głównej ---------- */
.intro {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 64px); align-items: center;
  padding: clamp(26px, 3.6vw, 56px) var(--pad); border-bottom: 2px solid var(--bone); overflow: hidden;
}
.intro-art { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 24px); width: 100%; padding: 0 8px 8px 0; }
.frame {
  position: relative; overflow: hidden; background: #000; aspect-ratio: 4 / 5;
  border: 3px solid var(--bone); box-shadow: 6px 6px 0 var(--red);
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .18s; }
.frame img.off { opacity: 0; }
.intro-in { text-align: left; hyphens: none; -webkit-hyphens: none; container-type: inline-size; }
.intro-h {
  margin: 0 0 .5em; color: var(--red); font-weight: 900; font-size: clamp(1.5rem, 2.6vw, 2.6rem);
  font-size: clamp(1.4rem, 7.6cqw, 3.6rem); /* dopasowane do szerokości kolumny: pierwsza linia wypełnia ją bez dziur */
  line-height: 1.08; letter-spacing: -.012em; text-align: left; hyphens: manual; -webkit-hyphens: manual;
}
.intro-p { font-size: clamp(1.02rem, 1.4vw, 1.5rem); font-weight: 700; line-height: 1.34; letter-spacing: -.005em; }
.intro .actions { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: clamp(24px, 3vw, 40px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(20px, 2.4vw, 30px); }
.chip {
  font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em;
  border: 2px solid var(--red); color: var(--redt); padding: .45em .8em;
}


/* ---------- prace: nagłówek + filtry ---------- */
.works-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px 30px;
  padding: clamp(28px, 4vw, 60px) var(--pad) 26px;
}
.works-head h2 {
  font-size: calc((100vw - 2 * var(--pad) - 3 * clamp(16px, 2.2vw, 32px)) / 4 / 3.79); line-height: .76; letter-spacing: -.021em; margin-left: -.035em; margin-bottom: -.043em; position: relative; z-index: 2;
  font-stretch: 62%; font-weight: 900; text-transform: uppercase;
}
.works-head h2 .gap { letter-spacing: .004em; }
.works-head h2 sup { font-family: var(--mono); font-weight: 400; font-stretch: 100%; font-size: .09em; letter-spacing: 0; color: var(--redt); vertical-align: top; margin-left: .4em; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; max-width: 80rem; justify-content: flex-end; margin-left: auto; }
.filters button {
  font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  background: transparent; color: var(--bone); border: 2px solid var(--bone); padding: .52em .78em;
}
.filters button:hover { border-color: var(--red); color: var(--red); }
.filters button.on { background: var(--bone); color: var(--ink); }

/* ---------- siatka kafelków (wszystkie jednakowej wielkości) ---------- */
.grid {
  display: grid; gap: clamp(16px, 2.2vw, 32px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 var(--pad) clamp(50px, 8vw, 110px);
}
.tile { border: 2px solid var(--bone); background: var(--ink2); transition: transform .15s, box-shadow .15s; }
.tile[hidden] { display: none; }
.tile:hover { transform: translate(-5px, -5px); box-shadow: 9px 9px 0 var(--red); }

.tile-img { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #000; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1), filter .3s; }
.tile:hover .tile-img img { transform: scale(1.05); filter: contrast(1.1); }

/* po najechaniu: przycisk otwarcia i tagi (tagi są klikalne i filtrują prace) */
.tile-media { position: relative; }
.tile-img::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: linear-gradient(180deg, rgba(3, 3, 4, .7), rgba(3, 3, 4, .1) 45%, rgba(3, 3, 4, .9));
}
.tile:hover .tile-img::after { opacity: 1; }
.tile-img .open {
  position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--red); font-weight: 900; font-stretch: 125%;
  font-size: .7rem; text-transform: uppercase; padding: .55em .9em; opacity: 0; transition: opacity .25s;
}
.tile:hover .tile-img .open { opacity: 1; }
.cats {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px;
  pointer-events: none; opacity: 0; transition: opacity .25s;
}
.tile:hover .cats, .cats:focus-within { opacity: 1; }
.cat {
  pointer-events: auto; cursor: pointer; border: 0; background: rgba(235, 231, 223, .6); color: var(--ink);
  font-family: var(--mono); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  padding: .4em .7em; transition: background .15s;
}
.cat:hover, .cat:focus-visible, .cat:active { background: var(--bone); }

/* tytuł jako osobna część kafelka (stała wysokość = równe kafelki) */
.tile-title {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px;
  height: 4.6rem; padding: 0 14px; border-top: 2px solid var(--bone);
}
.tile-title:hover { background: var(--red); }
.tile-title .yr { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; }
.tile-title .t {
  font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: 1.7rem; line-height: .95;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- podstrony: nagłówek ---------- */
.page-head {
  position: relative; overflow: hidden;
  padding: clamp(24px, 3.4vw, 48px) var(--pad) clamp(26px, 3.4vw, 48px);
  border-bottom: 2px solid var(--bone);
  background:
    radial-gradient(ellipse at 90% 0%, rgba(225, 6, 0, .32), transparent 55%),
    radial-gradient(circle, rgba(235, 231, 223, .09) 1.2px, transparent 1.6px) 0 0 / 14px 14px,
    var(--ink);
}
.page-head h1 {
  font-size: clamp(3.6rem, 14vw, 15rem); line-height: .78; letter-spacing: -.015em; margin-top: .12em;
  font-stretch: 62%; font-weight: 900; text-transform: uppercase; text-shadow: .018em .018em 0 var(--red);
}
.page-head p { max-width: 40rem; margin-top: 1.4rem; }

.section { padding: clamp(32px, 5vw, 70px) var(--pad); }

/* ---------- strona projektu ---------- */
.crumbs { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px var(--pad); border-bottom: 2px solid var(--bone); }
.crumbs a:hover { color: var(--red); }

.p-grid {
  display: grid; gap: clamp(18px, 2.6vw, 40px); align-items: start;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 128px;
  grid-template-areas: "main text thumbs";
  padding: clamp(14px, 1.8vw, 26px) var(--pad) clamp(40px, 6vw, 80px);
}
.p-main { grid-area: main; position: sticky; top: calc(var(--hdr) + 18px); }
/* --ar = proporcje aktualnego zdjęcia (ustawia je skrypt); ramka dopasowuje się do zdjęcia */
.p-stage {
  --ar: .8; --maxh: calc(100vh - var(--hdr) - 108px);
  width: min(100%, max(300px, calc(var(--maxh) * var(--ar)))); transition: width .3s cubic-bezier(.2, .7, .2, 1);
}
.p-frame {
  position: relative; width: 100%; aspect-ratio: var(--ar); background: #000; border: 2px solid var(--bone); box-shadow: 10px 10px 0 var(--red);
  touch-action: pan-y;
}
.p-frame img { width: 100%; height: 100%; object-fit: contain; transition: opacity .2s, transform .2s; }
.p-frame img.fade { opacity: 0; }
.p-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; width: 100%; }
.p-bar .arrows { display: flex; gap: 8px; }
.p-bar button {
  width: 44px; height: 44px; cursor: pointer; background: transparent; color: var(--bone);
  border: 2px solid var(--bone); font-size: 1.2rem; font-family: var(--f); font-weight: 900;
}
.p-bar button:hover { background: var(--red); border-color: var(--red); }

.p-text { grid-area: text; min-width: 0; }
.p-text h1 {
  font-size: clamp(3.2rem, 7.4vw, 8rem); line-height: .82; letter-spacing: -.01em;
  font-stretch: 62%; font-weight: 900; text-transform: uppercase; text-shadow: .02em .02em 0 var(--red);
  overflow-wrap: anywhere;
}
.p-text h1.long { font-size: clamp(2.3rem, 5.6vw, 6.4rem); overflow-wrap: break-word; }
.facts { margin: clamp(20px, 2.4vw, 34px) 0; border-top: 2px solid var(--bone); }
.facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 14px; padding: .8em 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--redt); padding-top: .25em; }
.facts dd { font-weight: 700; }
.p-text h2 {
  font-size: 2.6rem; line-height: .9; font-stretch: 62%; font-weight: 900; text-transform: uppercase;
  margin: 1.4em 0 .5em; display: flex; align-items: baseline; gap: .5em;
}
.p-text h2 small { font-family: var(--mono); font-size: .8rem; font-stretch: 100%; font-weight: 400; color: var(--redt); letter-spacing: .06em; }
.p-text p { margin-bottom: 1em; max-width: 36rem; }

.p-thumbs {
  grid-area: thumbs; position: sticky; top: calc(var(--hdr) + 18px);
  display: grid; gap: 12px; list-style: none; max-height: calc(100vh - var(--hdr) - 40px); overflow-y: auto; padding: 4px 6px 10px 0;
  scrollbar-width: thin; scrollbar-color: var(--red) transparent;
}
.p-thumbs button {
  display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; cursor: pointer; background: #000;
  border: 2px solid var(--line); transition: transform .12s, border-color .12s, box-shadow .12s;
}
.p-thumbs button img { width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: opacity .15s; }
.p-thumbs button:hover img { opacity: 1; }
.p-thumbs button:hover { border-color: var(--bone); }
.p-thumbs button[aria-current="true"] { border-color: var(--red); box-shadow: 5px 5px 0 var(--red); transform: translate(-2px, -2px); }
.p-thumbs button[aria-current="true"] img { opacity: 1; }

.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--bone); }
.pager a { display: grid; gap: .3em; padding: clamp(18px, 3vw, 38px) var(--pad); }
.pager a + a { border-left: 2px solid var(--bone); text-align: right; }
.pager a:hover { background: var(--red); }
.pager .t { font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: clamp(1.6rem, 4vw, 3.4rem); line-height: .95; }

/* ---------- O mnie ---------- */
.bio { display: grid; grid-template-columns: minmax(260px, .85fr) 1.7fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.portrait-wrap { position: sticky; top: calc(var(--hdr) + 22px); }
.portrait { border: 2px solid var(--bone); box-shadow: 12px 12px 0 var(--red); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto; background: #000; }
.portrait-wrap .tape { position: absolute; right: -10px; bottom: 28px; }
.sec { border-top: 2px solid var(--bone); padding: clamp(22px, 3vw, 40px) 0 clamp(26px, 3.4vw, 46px); display: grid; grid-template-columns: 4.4rem 1fr; gap: 18px; }
.sec:first-child { border-top: 0; padding-top: 0; }
.sec .no {
  font-size: 4.4rem; line-height: .8; font-stretch: 62%; font-weight: 900; color: transparent; -webkit-text-stroke: 1.5px var(--red);
}
.sec h2 { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: .85; font-stretch: 62%; font-weight: 900; text-transform: uppercase; margin-bottom: .45em; }
.sec p { max-width: 38rem; margin-bottom: 1em; }
.sec h3 { font-family: var(--mono); font-weight: 400; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--redt); margin: 2.2em 0 .4em; }
.sec p.lead { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.sec .chips { margin-top: 0; }

.skills { list-style: none; display: grid; gap: 0; max-width: 38rem; }
.skills li { display: flex; justify-content: space-between; gap: 16px; padding: .6em 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.skills li span { font-family: var(--mono); font-weight: 400; font-size: .76rem; color: var(--redt); text-transform: uppercase; letter-spacing: .06em; align-self: center; }

.xp { list-style: none; display: grid; max-width: 44rem; }
.xp li { display: grid; grid-template-columns: 7rem 1fr; gap: 14px; padding: 1em 0; border-bottom: 1px solid var(--line); }
.xp .yr { font-family: var(--mono); font-size: .8rem; color: var(--redt); letter-spacing: .04em; padding-top: .2em; }
.xp b { font-weight: 900; font-size: 1.15rem; display: block; }
.xp small { color: rgba(235, 231, 223, .65); display: block; margin-top: .2em; font-size: .92rem; }

/* ---------- kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.mail {
  display: block; font-weight: 900; font-stretch: 62%; text-transform: uppercase; line-height: .9; letter-spacing: -.005em;
  font-size: clamp(1.9rem, 4.3vw, 4.6rem); overflow-wrap: anywhere; margin: .2em 0 .5em;
}
.mail:hover { color: var(--red); }
.social { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 30px; }
.social a {
  display: grid; justify-items: center; align-content: center; gap: 8px; width: 88px; height: 88px;
  border: 2px solid var(--bone); font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.social a svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.social a:hover { background: var(--red); border-color: var(--red); transform: translate(-4px, -4px); box-shadow: 7px 7px 0 var(--bone); }

form { display: grid; gap: 18px; border: 2px solid var(--bone); padding: clamp(18px, 3vw, 36px); background: var(--ink2); box-shadow: 10px 10px 0 var(--red); }
form h2 { font-size: 3rem; line-height: .85; font-stretch: 62%; font-weight: 900; text-transform: uppercase; }
label { display: grid; gap: 8px; font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--redt); }
input, textarea, select {
  font: inherit; font-family: var(--f); font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--bone);
  background: var(--ink); border: 2px solid var(--bone); border-radius: 0; padding: .85em 1em; width: 100%;
}
select { appearance: none; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--acid); box-shadow: 5px 5px 0 var(--red); }
textarea { min-height: 11rem; resize: vertical; }
form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }

/* ---------- 404 / dziękuję ---------- */
.lost { min-height: 62vh; display: grid; place-content: center; gap: 18px; padding: var(--pad); text-align: left; }
.lost h1 { font-size: clamp(7rem, 34vw, 30rem); line-height: .78; font-stretch: 62%; font-weight: 900; text-shadow: .018em .018em 0 var(--red); }
.lost p { max-width: 30rem; font-size: 1.1rem; }

/* ---------- stopka ---------- */
footer { position: relative; overflow: hidden; border-top: 2px solid var(--bone); background: var(--ink2); }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 18px 30px; flex-wrap: wrap; padding: 22px var(--pad); position: relative; z-index: 2; }
.foot-row a:hover { color: var(--red); }
.foot-social { display: flex; gap: 10px; }
.foot-social a { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--bone); }
.foot-social a:hover { background: var(--red); border-color: var(--red); color: var(--bone); }
.foot-social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.foot-giant {
  display: block; text-align: center; white-space: nowrap; line-height: .72; margin-bottom: -.06em;
  font-size: clamp(5rem, 28vw, 30rem); font-stretch: 62%; font-weight: 900; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 2px rgba(235, 231, 223, .55); user-select: none;
}

/* ---------- ekrany mniejsze ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "main text" "thumbs thumbs"; }
  .p-thumbs {
    position: static; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); max-height: none; overflow: visible; padding: 0;
  }
  .p-main { position: static; }
  .p-stage { --maxh: 9999px; width: 100%; }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bio, .contact-grid { grid-template-columns: 1fr; }
  .portrait-wrap { position: relative; top: 0; max-width: 520px; margin-bottom: 14px; }
  .portrait { aspect-ratio: 1 / 1; object-position: 50% 20%; }
}
@media (max-width: 760px) {
  :root { --hdr: 56px; }
  .logo { font-size: 2rem; }
  .top nav a { padding: .8em .9em; font-size: .7rem; }
  .p-grid { grid-template-columns: 1fr; grid-template-areas: "main" "thumbs" "text"; }
  .facts div { grid-template-columns: 6.5rem 1fr; }
  .filters { justify-content: flex-start; }
  .tile-title { height: 4.1rem; gap: 10px; padding: 0 10px; }
  .tile-title .t { font-size: 1.35rem; }
  .tile-title .yr { display: none; }
  .grid { gap: 19px; }
  .cats { left: 8px; right: 8px; bottom: 8px; gap: 4px; }
  .cat { font-size: .58rem; padding: .3em .5em; background: rgba(235, 231, 223, .5); }
  .sec { grid-template-columns: 1fr; gap: 6px; }
  .sec .no { font-size: 3rem; }
  .xp li { grid-template-columns: 1fr; gap: 2px; }
  .pager .t { font-size: 1.5rem; }
  .tape { position: relative; right: auto; bottom: auto; display: inline-block; align-self: flex-start; width: max-content; margin-top: 12px; }
  .filters button { font-size: .72rem; padding: .5em .8em; }
  .filters { gap: 7px; }
  .hero { padding-bottom: 18px; min-height: 0; }
  .kudel { margin-top: .1em; font-size: clamp(4.8rem, 24.5vw, 8rem); }
  .roles { margin-bottom: 0; font-size: clamp(1.5rem, 6.3vw, 2.3rem); }
  .collage { position: relative; inset: auto; height: 76vw; margin-top: 28px; }
  .collage img { left: calc((var(--l) - 50%) * 1.8); top: calc(var(--t) - 10%); width: calc(var(--w) * 2.35); border-width: 2px; box-shadow: 4px 4px 0 var(--red); }
  .portrait { aspect-ratio: 4 / 3; }
  .sec h2 { font-size: 2.4rem; }
}

/* dotyk: tagi widoczne zawsze (lekko przezroczyste, pełne po dotknięciu) */
@media (hover: none) {
  .tile-img::after { opacity: 1; background: linear-gradient(180deg, transparent 60%, rgba(3, 3, 4, .8)); }
  .tile-img .open { display: none; }
  .cats { opacity: 1; }
}

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

.empty { padding: 0 var(--pad) clamp(50px, 8vw, 110px); font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--redt); }
.form-msg { font-size: .95rem; }
.form-msg a { color: var(--red); text-decoration: underline; }
a.tape { cursor: pointer; transition: transform .12s, box-shadow .12s; }
a.tape:hover { transform: rotate(-2deg) scale(1.06); box-shadow: 5px 5px 0 var(--red); }
@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .intro-art { max-width: 420px; margin: 0; }
  .intro-p { font-size: clamp(1.02rem, 4vw, 1.3rem); }
  .works-head h2 { font-size: clamp(4rem, 17vw, 9rem); }
}

a.band { display: block; color: var(--ink); text-decoration: none; cursor: pointer; }

/* podpowiedzi przy kwalifikacjach */
.tip { position: relative; cursor: help; border-bottom: 1px dotted currentColor; width: max-content; }
.tip::after {
  content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: min(300px, 80vw);
  background: #000; color: var(--bone); border: 2px solid var(--red); padding: .7em .9em;
  font-family: var(--f); font-size: .85rem; line-height: 1.35; letter-spacing: 0; text-transform: none; font-weight: 400;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s; pointer-events: none;
}
.tip:hover::after, .tip:focus::after { opacity: 1; visibility: visible; transform: none; }

@media (min-width: 901px) {
  .page-head { padding-top: clamp(16px, 2.3vw, 32px); padding-bottom: clamp(20px, 2.7vw, 38px); }
  .page-head h1 { margin-top: .04em; }
}

.p-links { margin: clamp(22px, 3vw, 40px) 0 0; display: flex; flex-wrap: wrap; gap: 14px; }
.p-text h1.long { font-size: clamp(2.3rem, 5.4vw, 6.2rem); }
@media (max-width: 480px) { .crumbs .more { display: none; } }

/* tytuły projektów na komputerze: większy odstęp między linijkami (ogonki i kreski nie zlewają się) */
@media (min-width: 901px) {
  .p-text h1 { line-height: 1.04; }
}

/* wideo: znaczek na kafelku, ramka z filmem, miniatura z ikoną play */
.vbadge {
  position: absolute; left: 10px; top: 10px; z-index: 2; background: var(--red); color: var(--bone);
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: .35em .6em;
  border: 2px solid var(--bone);
}
.p-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.p-frame iframe[hidden], .p-frame img[hidden] { display: none; }
.p-thumbs button { position: relative; }
.p-thumbs .play {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--bone); font-size: 1.4rem;
  text-shadow: 0 0 8px #000, 0 0 3px #000; pointer-events: none;
}

/* telefon: miniatury w jednym poziomym pasku */
@media (max-width: 700px) {
  .p-thumbs {
    display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 10px; padding: 4px 4px 12px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  }
  .p-thumbs li { flex: 0 0 74px; scroll-snap-align: start; }
}
.privacy { font-size: .8rem; line-height: 1.5; opacity: .75; margin: 14px 0 0; }

/* typografia: bez wdów i sierot */
p, li, dd, h1, h2, h3 { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }

.page-head h1 .kt { margin-left: .04em; }

/* filtry nie wchodzą pod napis „Projekty”: na węższych ekranach schodzą pod niego z odstępem */
@media (max-width: 1360px) {
  .works-head { display: block; }
  .works-head h2 { margin-bottom: 0; }
  .filters { justify-content: flex-start; margin: 26px 0 0; max-width: none; }
}

/* powiększenie zdjęcia (lightbox) */
.p-frame img:not([hidden]) { cursor: zoom-in; }
.lb-lock { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(3, 3, 4, .96); display: none; align-items: center; justify-content: center; }
.lb.open { display: flex; }
.lb > img { max-width: 96vw; max-height: 94vh; width: auto; height: auto; object-fit: contain; cursor: zoom-out; }
.lb-x, .lb-n { position: absolute; background: var(--ink); color: var(--bone); border: 2px solid var(--bone); font: 700 1.1rem var(--mono); width: 48px; height: 48px; cursor: pointer; display: grid; place-items: center; }
.lb-x:hover, .lb-n:hover { background: var(--red); border-color: var(--red); }
.lb-x { top: 16px; right: 16px; }
.lb-n { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-count { position: absolute; left: 16px; bottom: 14px; font-size: .8rem; letter-spacing: .08em; color: var(--bone); }
@media (max-width: 700px) { .lb-n { top: auto; bottom: 14px; transform: none; } .lb-prev { left: auto; right: 74px; } .lb-next { right: 16px; } }

/* ---------- przełącznik języka PL / EN ---------- */
.top nav .lang {
  font-family: inherit; font-weight: 800; font-stretch: 125%; font-size: .78rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .06em; color: var(--acid); background: transparent; cursor: pointer;
  padding: .85em .9em; border: 2px solid var(--acid);
}
.top nav .lang:hover, .top nav .lang:focus-visible { background: var(--acid); color: var(--ink); }
@media (max-width: 700px) { .top nav { gap: 6px; } .top nav .lang { padding: .8em .7em; font-size: .7rem; } }

/* angielski: dłuższe napisy ("About me"), więc przyciski w nagłówku są zmniejszone tak, by zajmowały tyle miejsca co po polsku */
html[lang="en"] .top nav a,
html[lang="en"] .top nav .lang { font-size: .7rem; letter-spacing: .04em; padding: 11.3px .95em; white-space: nowrap; }
@media (max-width: 760px) {
  html[lang="en"] .top nav a,
  html[lang="en"] .top nav .lang { font-size: .62rem; letter-spacing: .03em; padding: 9.7px .8em; }
}
