@font-face {
  font-family: "Space Grotesk";
  src: url("../../fonts/space-grotesk-latin-ext.woff2") format("woff2-variations");
  font-weight: 300 700;
  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: "Space Grotesk";
  src: url("../../fonts/space-grotesk-latin.woff2") format("woff2-variations");
  font-weight: 300 700;
  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;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../../fonts/jetbrains-mono-latin-ext.woff2") format("woff2-variations");
  font-weight: 100 800;
  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: "JetBrains Mono";
  src: url("../../fonts/jetbrains-mono-latin.woff2") format("woff2-variations");
  font-weight: 100 800;
  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: #0a0b1d;
  --bg-2: #0f1129;
  --panel: #13163a;
  --line: rgba(196, 202, 255, 0.11);
  --line-2: rgba(196, 202, 255, 0.22);
  --ink: #f3f4fb;
  --muted: #a0a5c4;
  --dim: #6c7194;
  --accent: #a493ff;
  --accent-2: #7d68ff;
  --accent-ink: #0a0b1d;
  --danger: #ff5468;
  --sans: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --pad: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
.live { scroll-behavior: auto; }
body {
  margin: 0;
  font: 400 1rem/1.65 var(--sans);
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(125, 104, 255, 0.16), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
p { margin: 0; }
em { font-style: normal; color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--pad); }
.mono, .label, .eyebrow, .step__tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* Nawigacja */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background 0.4s, border-color 0.4s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(10, 11, 29, 0.82); border-color: var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav__in { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); height: 72px; }
.brand { margin-right: auto; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; font-size: 1.05rem; }
.nav__links { display: flex; gap: clamp(16px, 2.4vw, 34px); margin: 0; padding: 0; list-style: none; }
.nav__links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--ink); }
.lang { display: flex; gap: 6px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; color: var(--dim); }
.lang a { text-decoration: none; }
.lang a:hover { color: var(--ink); }
.lang [aria-current] { color: var(--accent); }
.lang > * + *::before { content: "/"; margin-right: 6px; color: var(--dim); }

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 10px 16px; font-size: 0.68rem; }

/* Historia ataku */
.story { position: relative; }
.story__stage { position: relative; }
.story__canvas, .leader, .rail, .scroll-cue { display: none; }

.step { padding: clamp(56px, 9vw, 110px) 0; border-bottom: 1px solid var(--line); }
.step--hero { padding-top: 150px; }
.step__in { max-width: 640px; }
.step--hero .step__in { max-width: 800px; }

.eyebrow, .label, .step__tag { display: flex; align-items: center; gap: 14px; color: var(--accent); margin-bottom: 22px; }
.eyebrow::before, .label::before, .step__tag::before { content: ""; width: 32px; height: 1px; background: currentColor; flex: none; }

h1 { font-size: clamp(56px, 12.4vw, 176px); line-height: 0.88; letter-spacing: -0.045em; text-transform: uppercase; }
h1 .row { display: block; white-space: nowrap; }
h1 .row--b { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.hero__lead { margin-top: 32px; max-width: 34em; font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.step h2 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); margin-bottom: 20px; }
.step p { color: var(--muted); font-size: 1.05rem; }
.step__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.step__meta li { padding: 6px 12px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }

/* Tryb sceny: plansza przyklejona, kroki pojawiają się nad trójwymiarem */
.live .story { height: 900vh; }
.live .story__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.live .story__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.live .story__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 11, 29, 0.92) 0%, rgba(10, 11, 29, 0.55) 34%, transparent 58%);
}
.live .step {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 72px 0 0;
  border: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.live .step .wrap { padding-left: max(var(--pad), 120px); }
.live .step .step__in { max-width: 440px; transform: translateY(24px); transition: transform 0.8s var(--ease); }
.live .step--hero .step__in { max-width: 800px; }
.live .step.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.live .step.is-active .step__in { transform: none; }

.live .leader {
  display: block;
  visibility: hidden;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, rgba(164, 147, 255, 0.1), var(--accent));
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
}
.leader i { position: absolute; right: -5px; top: -4.5px; width: 10px; height: 10px; border: 1px solid var(--accent); border-radius: 50%; background: var(--bg); }

.live .rail {
  display: flex;
  position: absolute;
  left: 30px;
  top: 50%;
  z-index: 3;
  flex-direction: column;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.rail::before, .rail::after { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--line-2); }
.rail::after { background: var(--accent); transform: scaleY(var(--p, 0)); transform-origin: 50% 0; }
.rail li { position: relative; padding-left: 22px; transition: color 0.3s; }
.rail li::before { content: ""; position: absolute; left: 0; top: 50%; z-index: 1; width: 9px; height: 9px; margin-top: -4.5px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--bg); transition: background 0.3s, border-color 0.3s; }
.rail li.is-done { color: var(--muted); }
.rail li.is-done::before { border-color: var(--accent); }
.rail li.is-on { color: var(--ink); }
.rail li.is-on::before { border-color: var(--accent); background: var(--accent); }

.live .scroll-cue {
  display: flex;
  position: absolute;
  right: var(--pad);
  bottom: 28px;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue::after { content: ""; width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); animation: cue 2.2s var(--ease) infinite; transform-origin: 50% 0; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Pasek norm */
.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; background: var(--bg-2); }
.ticker__track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker ul { display: flex; gap: 56px; margin: 0; padding: 0 28px; list-style: none; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ticker li::before { content: "/"; margin-right: 56px; color: var(--accent); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Sekcje */
.section { position: relative; padding: clamp(88px, 12vw, 160px) 0; overflow-x: clip; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: clamp(40px, 5vw, 64px); }
.section h2 { font-size: clamp(1.7rem, 5vw, 4.2rem); max-width: 18ch; overflow-wrap: break-word; hyphens: auto; }
.intro { max-width: 60ch; margin-top: 22px; color: var(--muted); font-size: 1.08rem; }

.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.about__text { display: grid; gap: 20px; color: var(--muted); font-size: 1.1rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 12px; padding: 28px 24px; background: var(--bg); }
.stat dt { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.stat dd { margin: 0; font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--ink); }

.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.project { display: flex; flex-direction: column; background: var(--bg); text-decoration: none; transition: background 0.3s; }
.project:hover { background: var(--bg-2); }
.project__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px clamp(22px, 2.6vw, 34px) 0; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.project__bar svg { width: 18px; height: 18px; color: var(--muted); transition: transform 0.3s var(--ease), color 0.3s; }
.project:hover .project__bar svg { transform: translate(3px, -3px); color: var(--accent); }
.project__body { display: flex; flex: 1; flex-direction: column; padding: 28px clamp(22px, 2.6vw, 34px) clamp(26px, 3vw, 36px); }
.project__lang { color: var(--accent); margin-bottom: 14px; }
.project h3 { margin-bottom: 14px; font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.project p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding: 26px 0 0; list-style: none; }
.tags li { padding: 5px 10px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.note { margin-top: 28px; color: var(--muted); }

.web { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.web .intro { margin-top: 0; }
.checks { display: grid; gap: 14px; margin: 32px 0 40px; padding: 0; list-style: none; }
.checks li { display: flex; gap: 14px; align-items: baseline; }
.checks li::before { content: ""; width: 8px; height: 8px; flex: none; transform: translateY(-1px) rotate(45deg); border: 1px solid var(--accent); }
.sites { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.site { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 24px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding 0.3s var(--ease), background 0.3s; }
.site:hover { padding-left: 14px; background: var(--bg-2); }
.site__n { color: var(--accent); }
.site__name { display: block; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.site__desc { display: block; color: var(--muted); font-size: 0.94rem; }
.site svg { width: 18px; height: 18px; color: var(--muted); }
.sites__self { margin-top: 22px; color: var(--dim); font-size: 0.92rem; }

.exp { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.timeline { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line-2); }
.timeline li { position: relative; padding: 0 0 44px 32px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 5px; width: 9px; height: 9px; border: 1px solid var(--accent); border-radius: 50%; background: var(--bg); }
.timeline li:first-child::before { background: var(--accent); }
.when { display: block; color: var(--dim); margin-bottom: 10px; }
.when b { color: var(--accent); font-weight: 600; }
.timeline h3 { font-size: 1.45rem; letter-spacing: -0.02em; }
.where { margin: 6px 0 12px; color: var(--accent); font-size: 0.95rem; }
.timeline p:not(.where) { color: var(--muted); }
.side { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); background: var(--bg-2); }
.side h3 { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.side h3:not(:first-child) { margin-top: 32px; }
.side p { color: var(--muted); }
.certs { margin: 0 0 20px; padding: 0; list-style: none; }
.certs li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.certs strong { display: block; font-weight: 600; }
.certs li > span > span { color: var(--dim); font-size: 0.9rem; }
.certs time { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }

.contact { background: radial-gradient(900px 500px at 15% 100%, rgba(125, 104, 255, 0.16), transparent 70%); }
.contact h2 { font-size: clamp(1.6rem, 8.6vw, 7.6rem); text-transform: uppercase; letter-spacing: -0.045em; }
.mail { display: inline-block; margin-bottom: 36px; font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -0.02em; text-decoration: none; overflow-wrap: anywhere; border-bottom: 1px solid var(--accent); transition: color 0.25s; }
.mail:hover { color: var(--accent); }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; }

.footer { padding: 30px 0; border-top: 1px solid var(--line); color: var(--dim); }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer a { color: var(--muted); }

/* Pojawianie się przy przewijaniu, tylko z JS */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal--l { transform: translateX(-28px); }
.js .reveal--r { transform: translateX(28px); }
.js .reveal.is-in { opacity: 1; transform: none; }

.lost { display: grid; min-height: 100vh; place-items: center; padding: 24px; text-align: center; }
.lost h1 { margin: 18px 0; color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.lost p { color: var(--muted); }
.lost .mono { color: var(--accent); }
.lost .btn { margin-top: 32px; }

@media (max-width: 980px) {
  .nav__links { display: none; }
  .about, .web, .exp { grid-template-columns: minmax(0, 1fr); }
  .live .rail { display: none; }
  .live .step .wrap { padding-left: var(--pad); }
}
@media (max-width: 760px) {
  .projects { grid-template-columns: 1fr; }
  .live .story__stage::before { background: linear-gradient(0deg, rgba(10, 11, 29, 0.95) 0%, rgba(10, 11, 29, 0.6) 38%, transparent 62%); }
  .live .step { align-items: flex-end; padding: 0 0 28px; }
  .live .step--hero { align-items: flex-start; padding-top: 104px; }
  .live .step--hero::after { content: ""; position: absolute; inset: 0 0 auto; height: 58%; z-index: -1; background: linear-gradient(180deg, rgba(10, 11, 29, 0.95) 40%, transparent); }
  .live .step h2 { font-size: 1.6rem; margin-bottom: 12px; }
  .live .step p { font-size: 0.98rem; }
  .live .step__meta { display: none; }
  .live .scroll-cue { display: none; }
  .live .hero__lead { margin-top: 20px; }
  .live .hero__cta { margin-top: 26px; }
}
@media (max-width: 560px) {
  .lang { display: none; }
  .stats { grid-template-columns: 1fr; }
  .site { grid-template-columns: 1fr auto; }
  .site__n { display: none; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .btn { white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track, .scroll-cue::after { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
