/* ------------------------------------------------------------------
   Strona główna — sekcje: O mnie, Doświadczenie, Projekty, Stack, Edukacja, Agentic flow, Kontakt.
   Tokeny i komponenty: css/style.css · film w hero: css/film.css · ilustracje (.spot): js/art.js
------------------------------------------------------------------ */

/* Linia podziału nad każdą sekcją (siatka szwajcarska) */
.home .section { border-top: 1px solid var(--border-strong); }

/* ---------- ilustracje z bohaterem filmu (Art.spot) ---------- */
.spot { margin: 0; }
.spot__svg { display: block; width: 100%; height: auto; border-radius: 22px; }
.no-js .spot { display: none; }

/* ---------- 01 O mnie ---------- */
.about__grid { display: grid; gap: 28px; align-items: center; margin-bottom: 56px; }
.about__lead {
  font-size: clamp(21px, 2.3vw, 29px);
  font-stretch: 104%;
  line-height: 1.34;
  letter-spacing: -0.018em;
  text-wrap: pretty;
}

.stats { display: grid; margin: 0; border-top: 1px solid var(--border-strong); }
.stat { display: flex; flex-direction: column-reverse; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.stat dd {
  margin: 0;
  font-size: clamp(76px, 11vw, 172px);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.055em;
  line-height: .8;
  font-variant-numeric: tabular-nums;
}
.stat__u { color: var(--hot-text); }
.stat dt {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat dt .arw { width: 1.3em; }

/* ---------- 02 Doświadczenie ---------- */
.jobs { border-top: 1px solid var(--border-strong); }
.job { border-bottom: 1px solid var(--border-strong); }
.job__h { font: inherit; letter-spacing: normal; }
.job__head {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
  width: 100%;
  padding: 24px 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .3s;
}
/* wypełnienie Signal wjeżdża od lewej (motyw strzałki) */
.job__head::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  z-index: -1;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .6s var(--ease);
}
.job__head:hover::before { transform: scaleX(1); }
.job__head:hover, .job__head:hover .job__dates { color: var(--ink); }
.job__head:hover .arw { --arw: var(--ink); }
.job__dates {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color .3s;
}
.job__company {
  font-size: clamp(34px, 5.6vw, 84px);
  font-weight: 800;
  font-stretch: 122%;
  letter-spacing: -0.045em;
  line-height: .92;
}
.job__tag {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.job__role { grid-column: 1; font-size: 16px; font-weight: 600; font-stretch: 105%; }
.job__sum { grid-column: 1; max-width: 68ch; font-size: 15px; line-height: 1.45; color: var(--text-muted); transition: color .3s; }
.job__head:hover .job__sum { color: var(--ink); }
.job__toggle {
  grid-column: 2;
  grid-row: 2 / 5;
  position: relative;
  width: 42px;
  height: 42px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.job__toggle::before, .job__toggle::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 2px;
  margin: -1px 0 0 -7px;
  background: currentColor;
  transition: transform .45s var(--ease);
}
.job__toggle::after { transform: rotate(90deg); }
.job.is-open .job__toggle::after { transform: rotate(0deg); }

.job__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.job.is-open .job__body, .no-js .job__body { grid-template-rows: 1fr; }
.job__inner { overflow: hidden; min-height: 0; }
.job__content { display: grid; gap: 20px; padding: 6px 0 34px; }
.job__points { display: grid; gap: 8px; max-width: 62ch; color: var(--text-muted); }
.job__points li { position: relative; padding-left: 22px; }
.job__points li::before {
  content: "";
  position: absolute;
  left: 0; top: .78em;
  width: 11px; height: 2px;
  background: var(--hot);
}
.job__chips { align-content: start; }

/* ---------- 03 Projekty ---------- */
.cases { display: grid; gap: 80px; }
.case { display: grid; gap: 28px; }
.case__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--klein);
}
.case--signal .case__media { background: var(--signal); }
.case--ink .case__media { background: var(--ink); box-shadow: inset 0 0 0 1px var(--border-strong); }
/* siatka w tle pola — jak w filmie */
.case__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(243, 241, 236, .12) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}
.case--signal .case__media::before { background-image: linear-gradient(to right, rgba(14, 14, 17, .12) 1px, transparent 1px); }
.case__win {
  position: absolute;
  left: 7%;
  top: 12%;
  width: 78%;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .08);
  transition: transform .9s var(--ease);
}
.case__win--solo { left: 9%; width: 82%; top: 13%; }
.case__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 10px;
  background: #EDEBE6;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.case__bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(14, 14, 17, .22); }
.case__bar span {
  margin-left: 8px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(14, 14, 17, .55);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.case__win img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.case__phone {
  position: absolute;
  right: 5%;
  bottom: -14%;
  width: 21%;
  overflow: hidden;
  border: 5px solid var(--ink);
  border-radius: 16px;
  background: var(--ink);
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .7);
  transition: transform .9s var(--ease);
}
.case__phone img { width: 100%; }
.case__media:hover .case__win { transform: translateY(-8px); }
.case__media:hover .case__phone { transform: translateY(-18px); }

.case__body { display: grid; gap: 16px; align-content: start; justify-items: start; }
.case__meta { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.case__title {
  font-size: clamp(44px, 5.6vw, 80px);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.05em;
  line-height: .88;
}
.case__desc { max-width: 52ch; color: var(--text-muted); text-wrap: pretty; }
.case .link { overflow-wrap: anywhere; }

/* ---------- 04 Stack ---------- */
.marquee {
  overflow: hidden;
  margin: 0 0 48px;
  padding: 18px 0;
  border-block: 1px solid var(--border-strong);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: .45em;
  width: max-content;
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  animation: marquee 48s linear infinite;
}
.marquee__track span:nth-of-type(even) { color: transparent; -webkit-text-stroke: max(1px, .016em) var(--text); }
.marquee__track i { flex: none; width: .2em; height: .2em; background: var(--signal); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.skills { border-top: 1px solid var(--border-strong); }
.srow { display: grid; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.srow__name { font-size: 24px; font-weight: 800; font-stretch: 118%; letter-spacing: -0.025em; }
.srow__lvl {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.lvl { display: inline-flex; gap: 3px; }
.lvl i { width: 16px; height: 6px; background: var(--border-strong); }
.lvl--3 i, .lvl--2 i:nth-child(-n+2), .lvl--grow i:nth-child(-n+2) { background: var(--text); }
.lvl--grow i:last-child { background: var(--signal); }

/* ---------- 05 Edukacja ---------- */
.edu__grid { display: grid; border-top: 1px solid var(--border-strong); }
.edu__col { display: grid; gap: 12px; align-content: start; padding: 28px 0; }
.edu__col + .edu__col { border-top: 1px solid var(--border); }
.edu__dates {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.edu__name { font-size: clamp(28px, 3.2vw, 44px); font-stretch: 118%; letter-spacing: -0.035em; line-height: 1; }
.edu__degree { font-weight: 600; }
.edu__points { display: grid; gap: 6px; color: var(--text-muted); }
.edu__points li { position: relative; padding-left: 22px; }
.edu__points li::before { content: ""; position: absolute; left: 0; top: .78em; width: 11px; height: 2px; background: var(--hot); }
.certs { display: grid; }
.certs li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--border); }
.certs li:first-child { padding-top: 4px; }
.certs strong { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.certs span { font-size: 18px; font-weight: 600; }

/* ---------- Agentic flow → /ai/ ---------- */
.flow {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background: var(--klein);
  color: var(--paper);
}
.flow::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(243, 241, 236, .12) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}
.flow__inner { position: relative; display: grid; gap: 18px; }
.flow__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, .78);
}
.flow__title {
  display: block;
  font-size: clamp(40px, 7vw, 108px);
  font-weight: 800;
  font-stretch: 122%;
  letter-spacing: -0.045em;
  line-height: .92;
  text-wrap: balance;
}
.flow__title .arw { --arw: var(--signal); width: .95em; height: .56em; transition: transform .6s var(--ease); }
.flow:hover .flow__title .arw { transform: translateX(.2em); }
.flow__lead { display: block; max-width: 62ch; color: rgba(243, 241, 236, .84); }
.flow:focus-visible { outline-offset: -6px; outline-color: var(--signal); }

/* ---------- 06 Kontakt ---------- */
.talk__title { font-size: clamp(34px, 9.6vw, 132px); }   /* „Porozmawiajmy.” to jedno słowo (~8,9 em) — musi się zmieścić w kontenerze, od 320 px */
.talk__grid { display: grid; gap: 32px; align-items: center; }
.talk__body { display: grid; gap: 28px; min-width: 0; }
.spot--talk { max-width: 460px; }
.talk__mail {
  --arw: var(--hot);
  justify-self: start;
  font-size: clamp(26px, 5.4vw, 84px);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.04em;
  line-height: 1.02;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--hot), var(--hot)) 0 100% / 0 .08em no-repeat;
  transition: background-size .6s var(--ease);
}
.talk__mail:hover { background-size: 100% .08em; }
.talk__mail .arw { width: .9em; height: .54em; transition: transform .5s var(--ease); }
.talk__mail:hover .arw { transform: translateX(.15em); }
.talk__lead { max-width: 60ch; font-size: 18px; color: var(--text-muted); text-wrap: pretty; }
.talk__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- ruch ograniczony ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .job__body, .job__head::before, .case__win, .case__phone { transition: none; }
}

/* ---------- responsywność ---------- */
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 28px 20px 24px 0; border-bottom: 0; }
  .stat + .stat { padding-left: 20px; border-left: 1px solid var(--border); }
}
@media (min-width: 900px) {
  .about__grid { grid-template-columns: 3fr 5fr 4fr; gap: 32px; }
  .about__lead { grid-column: 2; }
  .about .spot { grid-column: 3; }
  .sec-head--spot { grid-template-columns: 3fr 5fr 4fr; align-items: center; }
  .sec-head--spot .sec-head__meta { align-self: start; }

  .job__head { grid-template-columns: 200px 1fr auto 42px; gap: 10px 24px; padding: 30px 0; }
  .job__dates { grid-column: 1; }
  .job__company { grid-column: 2; }
  .job__role { grid-column: 3; text-align: right; }
  .job__sum { grid-column: 2 / 4; grid-row: 2; }
  .job__toggle { grid-column: 4; grid-row: 1; }
  .job__content { grid-template-columns: 200px minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; padding-bottom: 44px; }
  .job__points { grid-column: 2; }

  .case { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
  .case:nth-child(even) .case__media { order: 2; }

  .srow { grid-template-columns: 3fr 7fr 2fr; gap: 24px; align-items: baseline; }
  .srow__lvl { justify-self: end; }

  .edu__grid { grid-template-columns: 1fr 1fr; }
  .edu__col + .edu__col { border-top: 0; border-left: 1px solid var(--border); padding-left: 32px; }

  .flow { padding: 104px 0; }
  .talk__grid { grid-template-columns: 5fr 7fr; gap: 48px; }
  .talk .sec-head { grid-template-columns: 1fr; }            /* w kolumnie 9fr słowo się nie mieści → tytuł na całą szerokość */
  .talk .sec-head__meta { padding-top: 0; }
  .talk__title { font-size: min(9.2vw, 132px); }
}
