/* =========================================================================
   CyberJuly - design system
   Ciemny motyw, czerwony akcent z logo, technicznie ale bez neonowego kiczu.
   Zero zewnętrznych zasobów: fonty systemowe, tła generowane gradientami.
   ========================================================================= */

:root {
  /* Powierzchnie - każda warstwa realnie różni się od poprzedniej.
     Poprzednia wersja miała #080a06 vs #0a0b07 i kafelki znikały w tle. */
  --bg:            #0a0a0c;
  --bg-soft:       #0e0e12;
  --surface:       #141419;
  --surface-hi:    #1b1b22;
  --line:          rgba(255, 255, 255, 0.09);
  --line-strong:   rgba(255, 255, 255, 0.16);

  /* Tekst */
  --text:          #ececed;
  --text-dim:      #a3a3ad;
  --text-faint:    #74747f;

  /* Akcent - czerwień z logo, rozpisana na skalę */
  --red:           #de2b2b;
  --red-bright:    #f4494b;
  --red-light:     #ff7b7d;
  --red-wash:      rgba(222, 43, 43, 0.12);
  --red-glow:      rgba(222, 43, 43, 0.32);

  /* Poziomy zagrożeń */
  --sev-critical:  #ff4d4f;
  --sev-high:      #ff8f3d;
  --sev-medium:    #f2c14b;
  --sev-low:       #7aa7e8;

  /* Typografia */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  /* Rytm */
  --sp-1: 0.5rem;  --sp-2: 0.75rem; --sp-3: 1rem;   --sp-4: 1.5rem;
  --sp-5: 2rem;    --sp-6: 3rem;    --sp-7: 4.5rem; --sp-8: 7rem;

  --radius:    14px;
  --radius-sm: 9px;
  --container: 1180px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* ---------- Reset ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.022em; font-weight: 650; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-hi);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}

/* Dostępność: nawigacja klawiaturą musi być widoczna (błąd B-20). */
:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--red);
  color: #fff;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- Odsłanianie przy przewijaniu ----------

   Stany początkowe wiszą pod ".js", którą ustawia boot.js przed pierwszym
   malowaniem. Bez JavaScriptu reguły nie obowiązują i cała treść jest
   normalnie widoczna - animacja jest dodatkiem, nie warunkiem dostępu.       */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
  /* Kolejne elementy w grupie wchodzą z opóźnieniem - stąd wrażenie, że
     sekcja składa się w całość, a nie przeskakuje jednym cięciem. */
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Układ ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
.container.narrow { max-width: 780px; }

.section { padding-block: var(--sp-7); }
.section-alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section-head { max-width: 660px; margin-bottom: var(--sp-5); }
.section-head h2 { font-size: clamp(1.65rem, 3.2vw, 2.3rem); margin-bottom: var(--sp-2); }
.section-intro { color: var(--text-dim); font-size: 1.075rem; }

/* Nadlinia sekcji - mono, wersalik, myślnik. Element rozpoznawczy marki. */
.kicker, .eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-light);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.kicker::before, .eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--red);
  flex: none;
}

/* ---------- Nagłówek ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  flex: none;
}
.brand img { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.0625rem;
}
.brand-role {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.site-nav { display: flex; align-items: center; gap: var(--sp-4); }
.site-nav ul { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--red-wash); }

.lang-switch {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  text-decoration: none;
  color: var(--text-dim);
  transition: all 0.18s var(--ease);
}
.lang-switch:hover { color: var(--text); border-color: var(--red); }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 50%;
  width: 18px; height: 1.5px;
  background: var(--text);
  transform: translateX(-50%);
  transition: transform 0.25s var(--ease), opacity 0.15s linear;
}
.nav-toggle-bar { top: 50%; margin-top: -0.75px; }
.nav-toggle-bar::before { content: ""; top: -6px; }
.nav-toggle-bar::after  { content: ""; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: var(--sp-7) var(--sp-6);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-lg { padding-block: var(--sp-8) var(--sp-7); }

/* Siatka techniczna + poświata - czysty CSS, zero pobierania obrazów. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 75%);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  top: -55%;
  left: 50%;
  width: min(1100px, 130%);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 62%);
  opacity: 0.7;
  pointer-events: none;
}
/* Deszcz zer i jedynek. Canvas leży pod treścią, jest wygaszony maską
   i ma niską nieprzezroczystość - ma być wyczuwalny kątem oka, nie czytelny.
   Rysowanie zatrzymuje się, gdy hero wyjedzie z ekranu (patrz site.js). */
.hero-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  pointer-events: none;
  /* Dwie maski naraz: pionowa wygasza deszcz przy dolnej krawędzi, pozioma
     przyciemnia go po lewej, gdzie leży nagłówek. Bez tej drugiej cyfry
     przechodzą przez tekst i utrudniają czytanie. */
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 45%, transparent 88%),
    linear-gradient(to right, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.35) 45%, #000 85%);
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 45%, transparent 88%),
    linear-gradient(to right, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.35) 45%, #000 85%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* Sylwetka w kapturze - kadr z własnego banera marki. Wtapia się w tło
   podwójną maską, żeby czytać się jako atmosfera, a nie wklejone zdjęcie. */
.hero-figure {
  position: absolute;
  top: 0;
  right: 0;
  width: min(46%, 620px);
  height: 100%;
  background-image: url("/assets/img/figure.webp");
  background-size: cover;
  background-position: center 18%;
  opacity: 0.5;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to left, #000 8%, transparent 92%),
    linear-gradient(to bottom, #000 55%, transparent 95%);
  mask-image:
    linear-gradient(to left, #000 8%, transparent 92%),
    linear-gradient(to bottom, #000 55%, transparent 95%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.hero-inner { position: relative; }
/* Treść nie może wejść pod sylwetkę - inaczej nagłówek traci kontrast. */
.hero-lg .hero-text { max-width: min(100%, 660px); }

/* Hero z portretem: tekst po lewej, zdjęcie po prawej. */
.hero-split .hero-inner {
  display: grid;
  grid-template-columns: 1fr minmax(0, 300px);
  gap: var(--sp-6);
  align-items: center;
}
.hero-portrait img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}

.hero h1 {
  font-size: clamp(2.35rem, 5.6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin-bottom: var(--sp-3);
}
.hero-lg h1 { max-width: 19ch; }
.hero h1 strong {
  font-weight: 700;
  color: var(--red-bright);
}
.hero .lead {
  color: var(--text-dim);
  font-size: clamp(1.0625rem, 1.6vw, 1.2rem);
  max-width: 60ch;
}

/* ---------- Przyciski ---------- */

.actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn .icon-sm { transition: transform 0.22s var(--ease); }
.btn:hover .icon-sm { transform: translateX(3px); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 22px -8px var(--red-glow);
}
.btn-primary:hover { background: var(--red-bright); transform: translateY(-1px); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: var(--text-faint); background: rgba(255, 255, 255, 0.06); }

/* ---------- Statystyki ---------- */

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-value {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--text-faint);
  max-width: 20ch;
  line-height: 1.4;
}

/* ---------- Siatka i karty ---------- */

.grid { display: grid; gap: var(--sp-3); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
              background 0.2s var(--ease);
}
/* Włos świetlny na górnej krawędzi - zapala się przy najechaniu. */
.card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-link { text-decoration: none; cursor: pointer; }
.card-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-hi);
  transform: translateY(-2px);
}
.card-link:hover::before { opacity: 1; }

.card h3 { font-size: 1.0625rem; }
.card p { color: var(--text-dim); font-size: 0.9375rem; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--red-wash);
  border: 1px solid rgba(222, 43, 43, 0.24);
  color: var(--red-light);
  flex: none;
}
.icon { width: 20px; height: 20px; }
.icon-sm { width: 15px; height: 15px; }

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: var(--sp-2);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--red-light);
  letter-spacing: 0.02em;
}
.card-more.muted { color: var(--text-faint); }

/* ---------- Usługi ---------- */

.services { gap: var(--sp-3); }
.service {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.service-head { display: flex; align-items: center; gap: var(--sp-2); }
.service-head h3 { font-size: 1.2rem; }
.service-text { color: var(--text-dim); }
.service-meta { font-size: 0.875rem; color: var(--text-dim); }
.service-meta .label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-right: 0.5rem;
}

.checklist { display: flex; flex-direction: column; gap: 0.55rem; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9375rem;
  color: var(--text-dim);
}
.checklist .icon-sm { color: var(--red-bright); margin-top: 0.4rem; flex: none; }

/* ---------- Projekty ---------- */

.project-top { display: flex; align-items: center; justify-content: space-between; }
.project.is-placeholder {
  border-style: dashed;
  background: transparent;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--sp-1); }
.tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text-faint);
}
.badge {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-faint);
}
.badge-live { color: #5ad19a; border-color: rgba(90, 209, 154, 0.35); background: rgba(90, 209, 154, 0.08); }
.badge-wip  { color: var(--sev-medium); border-color: rgba(242, 193, 75, 0.35); background: rgba(242, 193, 75, 0.08); }

/* ---------- Terminal ---------- */

.term {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #08080a;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  max-width: 820px;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}
.term-dot:first-child { background: rgba(222, 43, 43, 0.55); }
.term-title {
  margin-left: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.term-body {
  margin: 0;
  padding: var(--sp-4);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.term-line {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.term-line.is-typed { opacity: 1; transform: none; }
/* Bez JavaScriptu i przy ograniczonych animacjach cała sesja jest widoczna. */
html:not(.js) .term-line { opacity: 1; transform: none; }

.term-cmd { color: var(--text); margin-top: 0.4rem; }
.term-cmd:first-child { margin-top: 0; }
.term-prompt { color: var(--red-bright); user-select: none; }
.term-out { color: var(--text-dim); }
.term-mark { font-weight: 700; }
.term-mark-info { color: var(--sev-low); }
.term-mark-warn { color: var(--sev-high); }
.term-mark-ok   { color: #5ad19a; }

/* Kursor mruga tylko na ostatniej linii, po zakończeniu wypisywania. */
.term-line:last-child.is-typed::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 4px;
  background: var(--red-bright);
  vertical-align: text-bottom;
  animation: term-blink 1.1s steps(2, start) infinite;
}
@keyframes term-blink { to { visibility: hidden; } }

.term-caption {
  margin-top: var(--sp-3);
  max-width: 820px;
  font-size: 0.875rem;
  color: var(--text-faint);
}

/* ---------- Zapowiedź alertów na stronie głównej ---------- */

.teaser-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.teaser-row {
  display: grid;
  grid-template-columns: 90px 128px 1fr auto;
  align-items: baseline;
  gap: var(--sp-3);
  padding: 0.85rem var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.teaser-list .teaser-row:last-child { border-bottom: none; }
.teaser-row:hover { background: rgba(255, 255, 255, 0.022); }

.teaser-sev { justify-self: start; }
.teaser-id { font-family: var(--mono); font-size: 0.8125rem; white-space: nowrap; }
.teaser-id a { color: var(--red-light); text-decoration: none; }
.teaser-id a:hover { text-decoration: underline; }
.teaser-title { font-size: 0.9375rem; color: var(--text); }
.teaser-vendor {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 860px) {
  /* Na węższym ekranie kolumny nie mieszczą się obok siebie - wiersz staje się
     dwupoziomowy: identyfikator i poziom na górze, nazwa podatności pod nimi. */
  .teaser-row {
    grid-template-columns: auto 1fr;
    row-gap: 0.3rem;
  }
  .teaser-title { grid-column: 1 / -1; }
  .teaser-vendor { grid-column: 1 / -1; text-align: left; }
}

/* ---------- Doświadczenie ---------- */

.exp-grid {
  display: grid;
  /* 300px wymusza trzy kolumny w kontenerze 1180px, a nie cztery. Przy czterech
     dłuższe nazwy ("Cyber Rada Akademicka") łamały się na dwie linie i karty
     w rzędzie miały różną wysokość. */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-2);
}

.exp-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
              transform 0.2s var(--ease);
}
a.exp-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-hi);
  transform: translateY(-2px);
}

.exp-logo {
  display: flex;
  align-items: center;
  width: 72px;
  flex: none;
}
.exp-logo img {
  max-width: 100%;
  height: 26px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  /* Ten sam zabieg co przy ścianie logotypów: monochromatycznie i przygaszone,
     żeby kilka firmowych palet obok siebie nie rozbijało ciemnego tła. */
  filter: grayscale(100%) brightness(1.8);
  opacity: 0.6;
  transition: opacity 0.22s var(--ease), filter 0.22s var(--ease);
}
a.exp-item:hover .exp-logo img,
a.exp-item:focus-visible .exp-logo img { opacity: 1; filter: grayscale(0%) brightness(1); }

.exp-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.exp-org { font-weight: 600; font-size: 0.9375rem; }
.exp-role { color: var(--text-dim); font-size: 0.875rem; }
.exp-period {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-top: 2px;
}
.exp-link { margin-left: auto; color: var(--text-faint); flex: none; }
a.exp-item:hover .exp-link { color: var(--red-light); }

@media (max-width: 640px) {
  .exp-logo { width: 58px; }
  .exp-logo img { height: 22px; }
}

/* ---------- Ściana logotypów ---------- */

.logo-band {
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.logo-wall {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-7);
}

.logo-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
}
.logo-item img {
  height: 34px;
  width: auto;
  /* Logotypy w oryginalnych kolorach rozbijają ciemną kolorystykę i czytają
     się jak baner reklamowy. Monochromatyczne i przygaszone czytają się jako
     dowód doświadczenia. Pełny kontrast dopiero przy najechaniu. */
  filter: grayscale(100%) brightness(1.7);
  opacity: 0.55;
  transition: opacity 0.22s var(--ease), filter 0.22s var(--ease);
}
.logo-item:hover img,
.logo-item:focus-visible img { opacity: 1; filter: grayscale(0%) brightness(1); }

.logo-note {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

/* ---------- Wystąpienia ---------- */

.talk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  /* Karty w rzędzie mają równą wysokość. Działa to dobrze, dopóki każda ma
     grafikę - przy karcie kompaktowej (bez zdjęcia i logo) rozciąganie
     zostawiałoby pod treścią pustą przestrzeń, więc taka wraca do "start". */
  align-items: stretch;
}
.talk-grid > .talk-compact { align-self: start; }
/* Pojedynczy wpis w sekcji zajmuje pelna szerokosc - inaczej wisialby
   samotnie w lewej kolumnie i wygladal jak brakujaca druga karta. */
.talk-grid > .talk:only-child { grid-column: 1 / -1; }

.talk {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
              background 0.2s var(--ease);
}
a.talk:hover {
  border-color: var(--line-strong);
  background: var(--surface-hi);
  transform: translateY(-2px);
}

.talk-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.talk-media img { width: 100%; height: 100%; object-fit: cover; }
a.talk:hover .talk-media img { transform: scale(1.02); }
.talk-media img { transition: transform 0.35s var(--ease); }

/* Karta bez zdjęcia: zamiast pustego kadru 16:9 dostaje włos świetlny
   u góry. Wygląda na decyzję projektową, a nie na brakującą grafikę. */
.talk-compact { position: relative; }
.talk-compact::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--red), transparent 60%);
  opacity: 0.7;
}
.talk-compact .talk-body { padding-top: var(--sp-4); }

.talk-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: var(--sp-4);
}
.talk-meta { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.talk-kind {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--red-light);
  background: var(--red-wash);
  border: 1px solid rgba(222, 43, 43, 0.24);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.talk-when { font-family: var(--mono); font-size: 0.75rem; color: var(--text-faint); }
.talk-body h3 { font-size: 1.125rem; }
.talk-topic { color: var(--text); font-size: 0.9375rem; font-weight: 550; }
.talk-body p { color: var(--text-dim); font-size: 0.9375rem; }

/* ---------- Proza i oś czasu ---------- */

.prose { display: flex; flex-direction: column; gap: var(--sp-3); }
.prose p { color: var(--text-dim); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--red-light); text-decoration-color: rgba(255, 123, 125, 0.4); }
.prose a:hover { text-decoration-color: currentColor; }

.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-top: 1px solid var(--line);
}
.tl-item:last-child { border-bottom: 1px solid var(--line); }
.tl-year {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--red-light);
  padding-top: 0.15rem;
}
.tl-body h3 { font-size: 1.0625rem; margin-bottom: 0.25rem; }
.tl-body p { color: var(--text-dim); font-size: 0.9375rem; }

/* ---------- Kontakt ---------- */

.contact-grid { display: flex; flex-direction: column; gap: var(--sp-2); }
.contact-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
              transform 0.2s var(--ease);
}
.contact-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-hi);
  transform: translateX(3px);
}
/* Karta z osobnym przyciskiem kopiowania: link zajmuje resztę szerokości,
   przycisk stoi po prawej i nie wchodzi w obszar klikalny linku. */
.contact-card-split { padding: 0; gap: 0; }
.contact-card-split:hover { transform: none; }
.contact-main {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--sp-3) var(--sp-4);
  text-decoration: none;
  border-radius: var(--radius) 0 0 var(--radius);
}
.contact-main:hover { background: rgba(255, 255, 255, 0.03); }
.contact-hint {
  margin-left: auto;
  padding-left: var(--sp-3);
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: right;
}

.copy-btn {
  flex: none;
  align-self: stretch;
  padding: 0 var(--sp-4);
  background: transparent;
  border: none;
  border-left: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--mono);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.copy-btn:hover { background: var(--red-wash); color: var(--red-light); }
.copy-btn.is-done { color: #5ad19a; background: rgba(90, 209, 154, 0.1); }

.contact-body { display: flex; flex-direction: column; min-width: 0; }
.contact-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}
.contact-value { font-weight: 550; word-break: break-word; }
.contact-arrow { margin-left: auto; color: var(--text-faint); flex: none; }
.contact-card:hover .contact-arrow { color: var(--red-light); }

.note {
  margin-top: var(--sp-4);
  font-size: 0.9375rem;
  color: var(--text-faint);
  border-left: 2px solid var(--line-strong);
  padding-left: var(--sp-3);
}
.note a { color: var(--text-dim); }

/* ---------- Pas CTA ---------- */

.cta-band {
  background:
    radial-gradient(ellipse 70% 140% at 50% 100%, var(--red-wash), transparent 70%),
    var(--bg-soft);
  border-block: 1px solid var(--line);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.cta-inner h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--sp-1); }
.cta-inner p { color: var(--text-dim); max-width: 52ch; }
.cta-inner .actions { margin-top: 0; }

/* ---------- Alerty ---------- */

.updated {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
  margin-bottom: var(--sp-4);
}

.filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.filters input, .filters select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font: inherit;
  font-size: 0.9375rem;
}
.filters input { flex: 1 1 260px; min-width: 0; }
.filters input::placeholder { color: var(--text-faint); }
.filters input:focus, .filters select:focus { border-color: var(--red); outline: none; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table.table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 0.9375rem; }
table.table th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.table tbody tr:last-child td { border-bottom: none; }
table.table tbody tr:hover { background: rgba(255, 255, 255, 0.022); }

.col-date, .col-id { font-family: var(--mono); font-size: 0.8125rem; white-space: nowrap; }
.col-date { color: var(--text-faint); }
.col-id a { color: var(--red-light); text-decoration: none; }
.col-id a:hover { text-decoration: underline; }
.col-title { min-width: 260px; }
.row-vendor { display: block; font-size: 0.8125rem; color: var(--text-faint); }
.col-src { color: var(--text-faint); font-size: 0.8125rem; white-space: nowrap; }

.sev {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
}
.sev-critical { color: var(--sev-critical); background: rgba(255, 77, 79, 0.13); }
.sev-high     { color: var(--sev-high);     background: rgba(255, 143, 61, 0.13); }
.sev-medium   { color: var(--sev-medium);   background: rgba(242, 193, 75, 0.13); }
.sev-low      { color: var(--sev-low);      background: rgba(122, 167, 232, 0.13); }
.cvss { display: block; font-family: var(--mono); font-size: 0.75rem; color: var(--text-faint); margin-top: 0.25rem; }

.empty {
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* ---------- Stopka ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding-block: var(--sp-5);
  margin-top: var(--sp-2);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-4);
  align-items: start;
}
.footer-brand p { color: var(--text-faint); font-size: 0.875rem; max-width: 46ch; margin-top: 0.35rem; }
.footer-brand a { color: var(--text-dim); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.875rem;
}
.footer-links a:hover { color: var(--red-light); }
.footer-copy {
  grid-column: 1 / -1;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--text-faint);
  font-family: var(--mono);
}

/* ---------- Responsywność ---------- */

/* Menu chowa się już przy 940px - sześć pozycji przestaje się mieścić
   wcześniej niż przy 640px, gdzie robiła to poprzednia wersja (błąd B-23). */
@media (max-width: 940px) {
  .nav-toggle { display: block; order: 3; }
  .site-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
    padding-block: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .header-inner { flex-wrap: wrap; padding-block: var(--sp-2); }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 0.7rem 0.85rem; font-size: 1rem; }
  .lang-switch { align-self: flex-start; }
}

@media (max-width: 860px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Podtytuł przy logo zajmuje ~245 px i na wąskich ekranach spycha hamburger
   do drugiej linii, przez co nagłówek robi się dwa razy wyższy. */
@media (max-width: 620px) {
  .brand-role { display: none; }
}

@media (max-width: 860px) {
  /* Na węższym ekranie sylwetka wchodziłaby pod tekst. Przenosimy ją na
     spód kadru i mocno wygaszamy - zostaje klimat, znika problem czytelności. */
  .hero-figure {
    width: 78%;
    opacity: 0.26;
    background-position: center 12%;
  }
  .hero-lg .hero-text { max-width: 100%; }
  /* Portret pod tekstem i węższy - obok zabrakłoby miejsca na oba. */
  .hero-split .hero-inner { grid-template-columns: 1fr; gap: var(--sp-4); }
  .hero-portrait { max-width: 260px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .section { padding-block: var(--sp-6); }
  .term-body { font-size: 0.75rem; padding: var(--sp-3); }
  .hero { padding-block: var(--sp-6) var(--sp-5); }
  .hero-lg { padding-block: var(--sp-7) var(--sp-6); }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .talk-grid { grid-template-columns: 1fr; }
  .logo-wall { gap: var(--sp-4) var(--sp-5); }
  .logo-item img { height: 26px; }
  .stats { gap: var(--sp-4); }
  .stat-value { font-size: 1.35rem; }
  .service { padding: var(--sp-4); }
  .tl-item { grid-template-columns: 1fr; gap: var(--sp-1); }
  .footer-inner { grid-template-columns: 1fr; }
  .btn { flex: 1 1 auto; justify-content: center; }

  /* Na wąskim ekranie przycisk kopiowania ląduje pod adresem - obok
     zabrakłoby miejsca i wartość e-maila zaczęłaby się łamać. */
  .contact-card-split { flex-wrap: wrap; }
  .contact-main { border-radius: var(--radius) var(--radius) 0 0; width: 100%; }
  .contact-hint { display: none; }
  .copy-btn {
    width: 100%;
    padding: var(--sp-2) var(--sp-4);
    border-left: none;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
  }
}

/* ---------- Preferencje użytkownika ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  /* Ruchome tło znika całkowicie: wygaszenie animacji nie wystarcza, bo
     canvas i tak byłby przerysowywany. JS też go nie uruchamia. */
  .hero-rain { display: none; }
  /* Elementy muszą być widoczne mimo wyłączonych przejść - inaczej strona
     zostałaby pusta, gdyby obserwator nie zdążył dodać klasy. */
  .js [data-reveal] { opacity: 1; transform: none; }
  .term-line { opacity: 1; transform: none; }
  .term-line:last-child.is-typed::after { animation: none; }
}

@media print {
  .site-header, .site-footer, .actions, .hero-glow, .filters { display: none; }
  body { background: #fff; color: #000; }
}

/* Logotyp zamiast fotografii w karcie inicjatywy. Kadr jest ten sam co przy
   zdjeciach, ale znak jest wyśrodkowany i widoczny w całości. */
.talk-media-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(255, 255, 255, 0.04), transparent 70%),
    var(--bg-soft);
}
.talk-media-logo img {
  width: auto;
  height: 62%;
  max-width: 60%;
  object-fit: contain;
  border-radius: 12px;
}
a.talk:hover .talk-media-logo img { transform: none; }

/* Zdjęcie odbarwione. Fotografie ze sceny bywają skąpane w kolorowym świetle,
   które kłóci się z resztą siatki - czerń i biel to porządkuje. */
.talk-media-mono img { filter: grayscale(1) contrast(1.06) brightness(1.04); }
