/* ==========================================================
   Karol Maliński — Portfolio — Style CSS
   ========================================================== */

:root {
  --bg: #07080d;
  --card: #0f121b;
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.18);
  --text: #eef0f6;
  --muted: #9ea4b8;
  --accent: #c4f542;
  --accent-2: #5eead4;
  --accent-ink: #0a0d05;
  --head: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 20px;
  --header-h: 68px;
}

/* ---------- Baza ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* Przełączanie języka: widoczny jest tylko język zgodny z <html lang> */
html[lang="pl"] span[lang="en"],
html[lang="en"] span[lang="pl"] { display: none; }

/* Tło */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(600px 420px at 85% -5%, rgba(196, 245, 66, 0.1), transparent 70%),
    radial-gradient(700px 500px at -10% 30%, rgba(94, 234, 212, 0.08), transparent 70%);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}

/* Pasek postępu */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  pointer-events: none;
}

/* Skip link */
.skip {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* Gradientowy tekst */
.grad { color: var(--accent); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad {
    background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -8px rgba(196, 245, 66, 0.45);
}
.btn-accent:hover { box-shadow: 0 14px 36px -8px rgba(196, 245, 66, 0.65); }
.btn-ghost {
  border-color: var(--line-hi);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}
.btn-sm { padding: 10px 18px; font-size: 14px; }

.arr { display: inline-block; transition: transform 0.2s; }
.btn:hover .arr,
.text-link:hover .arr,
.socials a:hover .arr,
.cta-socials a:hover .arr,
.project-link:hover .arr { transform: translate(2px, -2px); }

.text-link {
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid rgba(196, 245, 66, 0.3);
  transition: border-color 0.2s;
}
.text-link:hover { border-color: var(--accent); }

/* ---------- Nagłówek ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 8, 13, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.header.scrolled { background: rgba(7, 8, 13, 0.9); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--head);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 14px/1 var(--mono);
  letter-spacing: -0.04em;
}

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav a.active { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.nav-contact { display: none; }

.actions { display: flex; align-items: center; gap: 10px; }

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: 500 12px/1 var(--mono);
}
.lang span {
  padding: 7px 10px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
html[lang="pl"] .l-pl,
html[lang="en"] .l-en {
  background: var(--accent);
  color: var(--accent-ink);
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-hi);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s;
}
.menu-btn.open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn.open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Animacje wejścia ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.js .rise {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

.js .reveal { opacity: 0; }
.js .reveal.in {
  opacity: 1;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
  padding: 96px 0 80px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid rgba(196, 245, 66, 0.28);
  border-radius: 999px;
  background: rgba(196, 245, 66, 0.06);
  color: #dcf59a;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.02em;
}
.pulse {
  position: relative;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: ping 2s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3.2); opacity: 0; }
}

.hello { margin: 36px 0 0; color: var(--muted); font-size: 19px; }

.hero h1 {
  margin: 6px 0 0;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(46px, 8.4vw, 104px);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.role {
  margin: 22px 0 0;
  color: var(--muted);
  font: 500 15px/1.5 var(--mono);
}
.role i { padding: 0 0.5ch; color: var(--accent); font-style: normal; }

.lead {
  max-width: 540px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.socials { display: flex; gap: 24px; margin-top: 32px; }
.socials a {
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}
.socials a:hover { color: var(--accent); }

/* Terminal */
.hero-visual { position: relative; padding: 18px 0; }

.term {
  overflow: hidden;
  border: 1px solid var(--line-hi);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 24, 38, 0.92), rgba(11, 13, 21, 0.96));
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 80px -30px rgba(196, 245, 66, 0.25);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; color: var(--muted); font: 400 12px/1 var(--mono); }

.term-body { padding: 22px 24px 26px; color: #cdd2e3; font: 400 14px/2 var(--mono); }
.term-body p { margin: 0; }
.term-body .row { display: flex; justify-content: space-between; gap: 16px; color: var(--text); }
.term-body .ok { color: var(--accent); }
.pr { color: var(--accent-2); }
.caret {
  display: inline-block;
  width: 9px;
  height: 17px;
  background: var(--accent);
  vertical-align: -3px;
  animation: blink 1.1s linear infinite;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.chip {
  position: absolute;
  padding: 9px 14px;
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  background: rgba(15, 18, 27, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7);
  font: 500 12px/1 var(--mono);
  animation: float 6s ease-in-out infinite;
}
.chip::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}
.chip-1 { top: -2px; right: 20px; }
.chip-2 { bottom: -2px; left: 20px; animation-delay: -3s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---------- Pasek technologii ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: scroll 42s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-list {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.marquee-list li {
  display: flex;
  align-items: center;
  padding: 18px 0;
  color: var(--muted);
  font: 500 15px/1 var(--mono);
  white-space: nowrap;
}
.marquee-list li::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 28px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* ---------- Sekcje ---------- */
.section { padding-top: 112px; }
.section-head { margin-bottom: 44px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--muted);
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow b {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(196, 245, 66, 0.3);
  border-radius: 10px;
  background: rgba(196, 245, 66, 0.08);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0;
}
.eyebrow.center { justify-content: center; }

h2 {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}
.aside { max-width: 320px; margin: 0 0 8px; color: var(--muted); font-size: 16px; }
.head-row > .text-link { flex-shrink: 0; margin-bottom: 10px; }

/* Karty */
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--card);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(196, 245, 66, 0.1), transparent 60%);
  transition: opacity 0.3s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-hi); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #c9cddc;
  font: 500 12px/1.3 var(--mono);
}

/* ---------- O mnie (bento) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.bento-main {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px;
}
.bento-main p { margin: 0 0 18px; color: var(--muted); font-size: 18px; }
.bento-main .text-link { align-self: flex-start; }

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 190px;
  padding: 24px;
}
.tile small {
  color: var(--accent);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tile strong {
  display: block;
  font-family: var(--head);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.tile p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ---------- Technologie ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.skill { padding: 26px; }
.skill-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(196, 245, 66, 0.25);
  border-radius: 14px;
  background: rgba(196, 245, 66, 0.07);
  color: var(--accent);
}
.skill-ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skill h3 {
  margin: 24px 0 8px;
  font-family: var(--head);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.skill p { margin: 0 0 20px; color: var(--muted); font-size: 15px; }

.footnote {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.footnote i {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Projekty ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.project { display: flex; flex-direction: column; }
.project-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.project-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 32px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(260px 180px at 50% 50%, rgba(var(--tint, 196, 245, 66), 0.14), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 24px 24px,
    rgba(255, 255, 255, 0.015);
}
.project-wide .project-art {
  min-height: 300px;
  border-bottom: 0;
  border-right: 1px solid var(--line);
}
.art-tag {
  position: absolute;
  left: 20px;
  bottom: 16px;
  color: var(--muted);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.1em;
}

.rack { display: grid; gap: 10px; width: min(240px, 80%); }
.unit {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-hi);
  border-radius: 10px;
  background: linear-gradient(90deg, #171b2b, #0f121c);
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.6);
}
.unit i { width: 28px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); }
.unit i + i { width: 16px; background: var(--accent-2); opacity: 0.7; }
.unit b {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.flow { display: flex; flex-direction: column; align-items: center; }
.flow span {
  padding: 9px 16px;
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  background: rgba(15, 18, 27, 0.92);
  font: 500 12px/1 var(--mono);
  white-space: nowrap;
}
.flow span:last-child { border-color: rgba(196, 245, 66, 0.5); color: var(--accent); }
.flow em {
  width: 1px;
  height: 22px;
  background: repeating-linear-gradient(to bottom, var(--accent-2) 0 4px, transparent 4px 8px);
}

.browser {
  width: min(230px, 80%);
  overflow: hidden;
  border: 1px solid var(--line-hi);
  border-radius: 12px;
  background: #0c0f18;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.8);
}
.browser-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.browser-body { display: grid; gap: 10px; padding: 18px; }
.browser-body span { display: block; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.14); }
.browser-body span:nth-child(1) { width: 65%; background: rgba(var(--tint), 0.55); }
.browser-body span:nth-child(2) { width: 92%; }
.browser-body span:nth-child(3) { width: 48%; }
.browser-body b { margin-top: 6px; color: rgb(var(--tint)); font: 500 24px/1 var(--mono); }

.project-body { display: flex; flex-direction: column; flex: 1; padding: 28px; }
.project-wide .project-body { justify-content: center; padding: 36px; }
.project-kicker {
  color: var(--accent);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-body h3 {
  margin: 12px 0 10px;
  font-family: var(--head);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.project-body p { margin: 0 0 20px; color: var(--muted); font-size: 16px; }
.project-body .tags { margin-bottom: 24px; }
.project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}
.project-link .arr { color: var(--accent); font-size: 18px; }
.project-link:hover { color: var(--accent); }

/* ---------- Oś czasu ---------- */
.timeline { --col: 160px; }
.entry {
  position: relative;
  display: grid;
  grid-template-columns: var(--col) minmax(0, 1fr);
  padding-bottom: 44px;
}
.entry:last-child { padding-bottom: 0; }
.entry::before {
  content: "";
  position: absolute;
  top: 9px;
  left: calc(var(--col) - 5px);
  z-index: 1;
  width: 11px;
  height: 11px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}
.entry::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 0;
  left: var(--col);
  width: 1px;
  background: var(--line-hi);
}
.entry:last-child::after { display: none; }

.entry-date {
  padding: 2px 32px 0 0;
  color: var(--accent);
  font: 500 14px/1.7 var(--mono);
  text-align: right;
}
.entry-body { max-width: 720px; padding-left: 32px; }
.entry-cat {
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.entry-body h3 {
  margin: 8px 0;
  font-family: var(--head);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.entry-body p { margin: 0; color: var(--muted); font-size: 16px; }
.entry-meta {
  display: inline-block;
  margin-top: 12px;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
}

/* ---------- Kontakt ---------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: 88px 32px;
  border: 1px solid var(--line-hi);
  border-radius: 32px;
  text-align: center;
  background:
    radial-gradient(640px 320px at 50% 0%, rgba(196, 245, 66, 0.14), transparent 70%),
    linear-gradient(180deg, #10131e, #0a0c14);
}
.cta-lead { margin: 0; color: var(--muted); font-size: 17px; }
.cta h2 {
  margin: 12px 0 20px;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}
.cta-text { max-width: 520px; margin: 0 auto 32px; color: var(--muted); font-size: 17px; }
.cta-mail { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
.cta-socials { display: flex; justify-content: center; gap: 28px; margin-top: 28px; }
.cta-socials a {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}
.cta-socials a:hover { color: var(--accent); }

/* ---------- Stopka ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 96px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
}
.footer .brand { font-size: 16px; }
.footer .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.footer p { margin: 0; color: var(--muted); font-size: 14px; }
.copy { color: var(--muted); font: 400 12px/1 var(--mono); letter-spacing: 0.04em; }

/* ==========================================================
   Responsywność (Media Queries)
   ========================================================== */

@media (max-width: 960px) {
  /* Menu mobilne */
  .menu-btn { display: flex; }
  .header-cta { display: none; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 8, 13, 0.97);
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 18px;
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a:hover,
  .nav a.active { background: none; }
  .nav a.active { color: var(--accent); }
  .nav-contact { display: block; }

  /* Układ */
  .hero { grid-template-columns: 1fr; gap: 56px; padding: 64px 0 56px; }
  .hero h1 { font-size: clamp(52px, 13vw, 96px); }
  .hero-visual { width: 100%; max-width: 480px; }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-main { grid-column: 1 / -1; grid-row: auto; }

  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .project-wide { grid-template-columns: 1fr; }
  .project-wide .project-art {
    min-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .project-wide .project-body { padding: 28px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 36px); }
  .nav { padding-inline: 18px; }

  .section { padding-top: 80px; }
  .section-head,
  .head-row { margin-bottom: 32px; }
  .head-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .head-row > .text-link { margin-bottom: 0; }
  .aside { max-width: none; }

  .lead,
  .bento-main p { font-size: 16px; }
  .bento-main { padding: 26px; }

  /* Oś czasu: data nad treścią */
  .timeline { --col: 5px; }
  .entry { display: block; padding-bottom: 36px; }
  .entry-date { padding: 0 0 4px 28px; text-align: left; }
  .entry-body { padding-left: 28px; }
  .entry-body h3 { font-size: 20px; }

  .cta { padding: 64px 20px; border-radius: 26px; }
  .footer { margin-top: 72px; }
}

@media (max-width: 560px) {
  .bento,
  .skills,
  .projects { grid-template-columns: 1fr; }
  .tile { min-height: 0; }

  .hero-buttons { flex-direction: column; align-items: stretch; }
  .project-body,
  .project-wide .project-body { padding: 24px; }
}

@media (max-width: 480px) {
  .brand-name { display: none; }
  .footer .brand-name { display: inline; }
  .status { font-size: 11px; }
  .cta-mail { padding-inline: 18px; font-size: 14px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ---------- Dostępność i druk ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; }

  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { width: auto; animation: none; }
  .marquee-list { flex-wrap: wrap; justify-content: center; }
  .marquee-list + .marquee-list { display: none; }
}

@media print {
  .js .reveal,
  .js .rise { opacity: 1 !important; animation: none !important; }
  .header, .bg, .progress { display: none; }
}