/* ---------- tokeny ---------- */
:root {
  --bg: #fafaf7;
  --ink: #0a0a0a;
  --text: rgba(10, 10, 10, 0.72);
  --muted: rgba(10, 10, 10, 0.45);
  --line: rgba(10, 10, 10, 0.1);
  --todo: rgba(255, 196, 0, 0.28);
  --ok: #2fae5f;
  --frame: #efeee8;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0c;
    --ink: #f4f4f0;
    --text: rgba(244, 244, 240, 0.72);
    --muted: rgba(244, 244, 240, 0.45);
    --line: rgba(244, 244, 240, 0.12);
    --todo: rgba(255, 196, 0, 0.22);
    --frame: #191918;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0d0c;
  --ink: #f4f4f0;
  --text: rgba(244, 244, 240, 0.72);
  --muted: rgba(244, 244, 240, 0.45);
  --line: rgba(244, 244, 240, 0.12);
  --todo: rgba(255, 196, 0, 0.22);
  --frame: #191918;
}

/* ---------- baza ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-color 0.2s; }
a:hover { text-decoration-color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--bg); }

.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- górny pasek ---------- */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 36px 0 0;
  font-size: 15px;
  line-height: 1.35;
}
.mono {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.tools { display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.status[hidden] { display: none; }
.status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
.tool { transition: color 0.2s; }
.tool:hover { color: var(--ink); }
.tool b { color: var(--ink); font-weight: 500; }

/* ---------- układ ---------- */
main {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
  gap: 72px;
  padding: 120px 0 96px;
}
.col { min-width: 0; }
.side { justify-self: end; width: 100%; max-width: 340px; }
.photo { margin: 0; position: sticky; top: 36px; }
.photo-frame {
  aspect-ratio: 3 / 4;
  background: var(--frame);
  border-radius: 4px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}
.photo-frame:has(img) { padding: 0; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }
.photo figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- hero ---------- */
.hello {
  margin: 0 0 72px;
  color: var(--ink);
  font-weight: 600;
  font-size: clamp(40px, 6.2vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hello span { display: block; }
.hello strong { font-weight: 800; letter-spacing: -0.035em; }
.hello .soft { color: var(--muted); }

/* ---------- bloki treści ---------- */
.block { margin: 0 0 30px; }
.block p { margin: 0 0 14px; text-wrap: pretty; }
.block p:last-child { margin-bottom: 0; }
.label { color: var(--ink); font-weight: 600; }
.block--wide { margin: 56px 0; }
.block--wide > .label { display: block; margin-bottom: 10px; }
.block--wide > .intro { margin: 0 0 14px; }

mark.todo {
  background: var(--todo);
  color: inherit;
  border-radius: 3px;
  padding: 0 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* wiersze: firmy i projekty */
.rows, .steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.rows .r-name { color: var(--ink); font-weight: 500; }
.rows .r-name a { text-decoration: none; }
.rows .r-name a::after { content: " ↗"; color: var(--muted); font-size: 0.85em; transition: color 0.2s; }
.rows .r-name a:hover::after { color: var(--ink); }
.rows .r-meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted); align-self: center; white-space: nowrap; }
.rows .r-desc { grid-column: 1 / -1; font-size: 15px; }

/* kroki: jak ze mną pracować */
.steps { counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 0.42em;
}

/* historia: zwijana */
.story-more { display: none; }
.story.open .story-more { display: block; }
.more {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s;
}
.more:hover { color: var(--ink); }

/* kontakt */
.contact .mail {
  display: inline-block;
  margin-top: 14px;
  color: var(--ink);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  word-break: break-word;
}

/* ---------- stopka ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: baseline;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.quote {
  margin: 0;
  color: var(--text);
  font-size: inherit;
  line-height: 1.45;
}
.quote[hidden] { display: none; }
.quote-by { color: var(--muted); font-weight: 400; white-space: nowrap; }
.socials { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.socials a { color: var(--text); text-decoration: none; }
.socials a:hover { color: var(--ink); }
.hint { margin-left: auto; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }
.hint kbd {
  font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 6px; margin: 0 2px;
}

.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  padding: 10px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- ruch ---------- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }

@media (prefers-reduced-motion: reduce) {
  .rise, .status::before { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- mniejsze ekrany ---------- */
@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 72px 0 72px; }
  .col { display: contents; }
  .hello { order: 1; margin-bottom: 40px; }
  .side { order: 2; justify-self: start; max-width: 260px; margin-bottom: 48px; }
  .blocks { order: 3; }
  .photo { position: static; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .page { padding: 0 16px; }
  .top { padding-top: 24px; }
  .tools { gap: 14px; }
  .status span { display: none; }
  .hint { display: none; }
  .steps li { grid-template-columns: 36px minmax(0, 1fr); }
}

/* ---------- ikony sociali w górnym pasku ---------- */
.top-socials { display: flex; align-items: center; gap: 14px; }
.tool.icon { display: inline-flex; color: var(--muted); }
.tool.icon:hover { color: var(--ink); }
.tool.icon svg { width: 14px; height: 14px; fill: currentColor; display: block; }

/* ---------- e-mail: odsłanianie i ikona obrysowa ---------- */
.reveal, .mail-shown {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
  transition: color 0.2s;
}
.reveal:hover, .mail-shown:hover { color: var(--ink); }
.reveal svg, .mail-shown svg { width: 18px; height: 18px; flex: none; }
.mail-shown { text-decoration: none; }
svg.stroke {
  fill: none !important;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
