:root {
  --bg: #08080a;
  --text: #f4f4f0;
  --muted: rgba(244, 244, 240, 0.62);
  --line: rgba(255, 255, 255, 0.13);
  --accent: #c6ff4a;
  --ink: #0b0d05;
  --display: "Bricolage Grotesque", Manrope, "Segoe UI", sans-serif;
  --wrap: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--bg); }
html, body { min-height: 100%; }
body.locked { overflow: hidden; }

body {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--ink); }

a { color: inherit; }

/* ---------- background layers ---------- */

.bg { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }

.bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  filter: saturate(0.7) brightness(0.8);
}

body.locked .bg video { filter: blur(18px) brightness(0.45); transform: scale(1.08); }

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(8, 8, 10, 0.7) 100%),
    rgba(8, 8, 10, calc(0.5 + var(--sc, 0) * 0.38));
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 8;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- fixed controls ---------- */

.audio[hidden], .sound[hidden], .topnav[hidden] { display: none; }

.audio {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding-right: 12px;
  border-radius: 999px;
  background: rgba(14, 14, 16, 0.6);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.sound {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.sound i { font-size: 16px; line-height: 1; }

.volume {
  -webkit-appearance: none;
  appearance: none;
  width: 84px;
  height: 4px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  outline: none;
  cursor: pointer;
}

.volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

.volume::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--accent); }

.lang {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 7;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(14, 14, 16, 0.6);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.lang button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font: 800 0.72rem/1 Manrope, "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  padding: 9px 11px;
  border-radius: 999px;
  cursor: pointer;
}

.lang button.on,
.lang button:focus-visible { color: var(--ink); background: var(--accent); outline: none; }

.topnav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 2px;
  max-width: calc(100% - 300px);
  padding: 4px;
  border-radius: 999px;
  background: rgba(14, 14, 16, 0.6);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar { display: none; }

.topnav a {
  flex: none;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.topnav a:hover,
.topnav a:focus-visible { color: #fff; outline: none; }
.topnav a.on { color: var(--ink); background: var(--accent); }

.views {
  position: fixed;
  left: 18px;
  bottom: 16px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  mix-blend-mode: difference;
}

.views svg { width: 19px; height: 19px; }

.enter {
  position: fixed;
  inset: 0;
  z-index: 9;
  border: 0;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font: 500 16px/1 Manrope, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.enter[hidden] { display: none; }

/* ---------- page ---------- */

.page { position: relative; z-index: 2; overflow-x: clip; }

body.locked .page {
  filter: blur(16px) brightness(0.55);
  pointer-events: none;
  user-select: none;
}

.idx {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 8, 10, 0.35);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover { transform: translateY(-2px); background: #fff; color: #000; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn.primary:hover { background: #fff; border-color: #fff; }

/* ---------- hero ---------- */

.hero {
  width: var(--wrap);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 76px 0 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.loc { display: inline-flex; align-items: center; gap: 8px; }

.flag {
  display: inline-flex;
  width: 18px;
  height: 12px;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.flag i { flex: 1; }
.flag.pl { flex-direction: column; }
.flag.pl i:first-child { background: #fff; }
.flag.pl i:last-child { background: #dc143c; }
.flag.be i:nth-child(1) { background: #111; }
.flag.be i:nth-child(2) { background: #fdda24; }
.flag.be i:nth-child(3) { background: #c8102e; }

.hero-main { padding: 28px 0; }

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 42%;
  border: 2px solid var(--accent);
  background: #0c0c0e;
}

h1 {
  margin-top: 18px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(5.5rem, 26vw, 20rem);
  line-height: 0.82;
  letter-spacing: -0.055em;
}

.word { display: inline-flex; overflow: hidden; padding-bottom: 0.06em; }

.word span {
  display: inline-block;
  transform: translateY(105%);
}

body:not(.locked) .word span {
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--i) * 70ms + 120ms);
}

@keyframes rise { to { transform: translateY(0); } }

.roles {
  margin-top: 22px;
  max-width: 42ch;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
}

.hero-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.code { color: var(--muted); font-size: 0.9rem; }
.code strong { color: var(--accent); font-weight: 800; letter-spacing: 0.03em; }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.scroll-cue i { animation: bob 1.6s ease-in-out infinite; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.social { display: flex; gap: 6px; list-style: none; }

.social a {
  width: 42px;
  height: 42px;
  display: block;
  color: rgba(255, 255, 255, 0.9);
  background: currentColor;
  border-radius: 12px;
  -webkit-mask: var(--ico) center / 22px 22px no-repeat;
  mask: var(--ico) center / 22px 22px no-repeat;
  transition: color 0.15s ease, transform 0.15s ease;
}

.social a:hover { color: var(--accent); transform: translateY(-2px); }
.social a.x { --ico: url("icons/x.svg"); }
.social a.twitch { --ico: url("icons/twitch.svg"); }
.social a.discord { --ico: url("icons/discord.svg"); }
.social a.instagram { --ico: url("icons/instagram.svg"); }
.social a.tiktok { --ico: url("icons/tiktok.svg"); }
.social a.youtube { --ico: url("icons/youtube.svg"); }
.social a:focus-visible { outline: none; color: var(--accent); }

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  margin-top: 40px;
  padding: 18px 0;
  background: var(--accent);
  color: var(--ink);
  transform: rotate(-1.4deg);
  width: 104%;
  margin-left: -2%;
}

.marquee-track { display: flex; width: max-content; animation: scrollx 38s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: 26px; padding-right: 26px; }

.marquee-group span {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.marquee-group b { font-size: 1rem; }

@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---------- blocks ---------- */

.block {
  width: var(--wrap);
  margin: 0 auto;
  padding: 130px 0 0;
  scroll-margin-top: 10px;
}

.block-head { margin-bottom: 44px; }

.kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.block h2 {
  margin-top: 12px;
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.sub { margin-top: 16px; max-width: 58ch; color: var(--muted); font-size: 1.02rem; line-height: 1.6; }

.sub-title {
  margin: 72px 0 24px;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.rv { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.rv.in { opacity: 1; transform: none; }

/* about */

.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: start; }

.lead {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.about-side p { color: var(--muted); line-height: 1.7; }
.about-side p + p { margin-top: 14px; }

.facts { margin-top: 28px; border-top: 1px solid var(--line); }

.fact {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.fact dt { color: var(--muted); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; align-self: center; }
.fact dd { font-weight: 700; line-height: 1.4; }

.stats {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.stat { padding: 28px 20px 0 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }

.stat .num {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 0.88rem; font-weight: 600; }

/* skills */

.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }

.skill { padding: 28px 24px 8px 0; }
.skill + .skill { padding-left: 24px; border-left: 1px solid var(--line); }

.skill h3 { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.skill ul { margin-top: 20px; list-style: none; display: grid; gap: 11px; }
.skill li { color: rgba(255, 255, 255, 0.82); font-weight: 600; font-size: 0.97rem; }
.skill li::before { content: "↳"; margin-right: 10px; color: var(--accent); }

/* portfolio */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }

.filters button {
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 8, 10, 0.4);
  color: rgba(255, 255, 255, 0.75);
  font: 800 0.85rem/1 Manrope, "Segoe UI", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.filters button sup { margin-left: 6px; font-size: 0.65rem; opacity: 0.7; }
.filters button:hover { color: #fff; border-color: #fff; }
.filters button.on { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.filters button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.work-list { border-bottom: 1px solid var(--line); }

.row {
  display: grid;
  grid-template-columns: 44px minmax(290px, 1.3fr) 2fr 1.1fr 28px;
  gap: 26px;
  align-items: start;
  padding: 28px 12px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.2s ease, padding 0.25s ease;
}

a.row:hover { background: rgba(198, 255, 74, 0.07); padding-left: 22px; }
a.row:hover h3 { color: var(--accent); }
a.row:hover .go { transform: translate(3px, -3px); color: var(--accent); }

.row .idx { padding-top: 6px; }
.row h3 { font-family: var(--display); font-size: clamp(1.3rem, 2.1vw, 1.7rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: break-word; transition: color 0.2s ease; }
.row .desc { color: var(--muted); line-height: 1.6; font-size: 0.97rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.badge {
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

.badge.free { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.badge.off { border-color: rgba(255, 110, 110, 0.6); color: #ff9c9c; }
.row.offline h3, .row.offline .desc { opacity: 0.55; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.78); font-size: 0.75rem; font-weight: 600; }
.go { padding-top: 4px; font-size: 1.1rem; color: rgba(255, 255, 255, 0.45); transition: transform 0.2s ease, color 0.2s ease; }

/* services */

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }

.service { padding: 30px 28px 38px 0; border-bottom: 1px solid var(--line); }
.service:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }

.service-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.service-top i { font-size: 1.5rem; color: var(--accent); }
.service h3 { font-family: var(--display); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; }
.service p { margin-top: 12px; color: var(--muted); line-height: 1.6; font-size: 0.95rem; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }

.step { position: relative; padding-top: 26px; border-top: 3px solid var(--line); }
.step::before { content: ""; position: absolute; top: -3px; left: 0; width: 44px; height: 3px; background: var(--accent); }
.step-n { display: block; color: var(--accent); font-family: var(--display); font-size: 2.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.step h3 { margin-top: 14px; font-family: var(--display); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.step p { margin-top: 8px; color: var(--muted); line-height: 1.6; font-size: 0.92rem; }

/* faq */

.faq { max-width: 900px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  padding: 24px 0;
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.8rem; line-height: 1; transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 0 26px; max-width: 64ch; color: var(--muted); line-height: 1.7; }

/* contact */

.contact { text-align: left; }
.contact .mega { font-size: clamp(3rem, 10vw, 8.5rem); line-height: 0.9; }

.big-links { margin: 36px 0 52px; border-top: 1px solid var(--line); }

.big-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, padding 0.25s ease;
}

.big-links a i { font-size: 0.5em; opacity: 0.6; }
.big-links a:hover { background: var(--accent); color: var(--ink); padding-left: 26px; padding-right: 26px; }
.contact .social { margin-top: 18px; }

.footer {
  width: var(--wrap);
  margin: 110px auto 0;
  padding: 24px 0 64px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer a { color: #fff; font-weight: 800; text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skill:nth-child(3) { padding-left: 0; border-left: 0; }
  .skill:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 20px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .service:nth-child(2n) { padding-left: 28px; border-left: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 40px 1fr 28px; gap: 8px 18px; }
  .row .name { grid-column: 2; }
  .row .go { grid-column: 3; grid-row: 1; }
  .row .desc, .row .tags { grid-column: 2 / 4; }
  .row .tags { margin-top: 4px; }
}

@media (max-width: 720px) {
  .topnav { top: 66px; max-width: calc(100% - 32px); }
  .hero { padding-top: 120px; }
  .block { padding-top: 90px; scroll-margin-top: 110px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { margin-top: 24px; border-top: 1px solid var(--line); }
  .skills-grid, .services-grid, .steps { grid-template-columns: 1fr; }
  .skill, .skill + .skill, .skill:nth-child(3) { padding-left: 0; border-left: 0; }
  .skill + .skill { border-top: 1px solid var(--line); margin-top: 20px; }
  .service, .service:nth-child(2n), .service:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .fact { grid-template-columns: 100px 1fr; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .footer { flex-direction: column; align-items: flex-start; }
  .marquee { transform: rotate(-1deg); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .marquee-track, .scroll-cue i { animation: none; }
  .word span { transform: none; animation: none !important; }
  .rv { opacity: 1; transform: none; transition: none; }
  body.locked .bg video { filter: none; transform: none; }
}
