/* Wspólny styl dla index.html (PL) i en.html (EN). Wersja 3.
   Layout: strona osobista, nie agencja. Duże imię i zdjęcie, oś czasu, mało ozdobników.
   Celowo jeden ciemny motyw: czarne tło, zielone akcenty (wybór Tomasza). */
:root {
  --bg: #060807;
  --surface: #0c110e;
  --surface-2: #111813;
  --line: #1b241f;
  --line-strong: #2a3830;
  --fg: #ecf2ee;
  --fg-soft: #c7d2cb;
  --muted: #8fa097;
  --green: #48d688;
  --green-hover: #63e29c;
  --green-deep: #133d27;
  --green-ink: #04150b;
  --green-glow: rgba(72, 214, 136, 0.13);
  --nav-bg: rgba(6, 8, 7, 0.86);
  --todo: #e8c25a;
  --todo-bg: #1a1608;
  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 14px;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[hidden] { display: none !important; }
img { max-width: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 20; background: var(--bg);
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Pola do potwierdzenia (tylko w podglądzie) */
.todo { color: var(--todo); border-bottom: 1px dashed var(--todo); font-style: normal; }
.draft-bar { background: var(--todo-bg); color: var(--todo); font-family: var(--f-mono); font-size: 12.5px; }
.draft-bar .container { padding-block: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* Nawigacja */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { font-family: var(--f-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--muted); white-space: nowrap; transition: color 0.15s; }
.nav-links a:hover { color: var(--fg); }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang {
  font-family: var(--f-mono); font-size: 12.5px; line-height: 1; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 11px;
  transition: color 0.15s, border-color 0.15s;
}
.lang:hover { color: var(--fg); border-color: var(--green); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-body); font-weight: 600; font-size: 15.5px;
  padding: 12px 20px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--green); color: var(--green-ink); }
.btn-primary:hover { transform: translateY(-1px); background: var(--green-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--green); }
.btn-sm { padding: 9px 16px; font-size: 14.5px; }
.cta-short { display: none; }

/* Sekcje */
section { scroll-margin-top: 76px; }
.band { padding-block: clamp(64px, 9vw, 112px); }
.band + .band { border-top: 1px solid var(--line); }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; }
h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }
.section-head { margin-bottom: clamp(32px, 5vw, 52px); max-width: 640px; }
.section-head p:not(.kicker) { color: var(--muted); margin: 14px 0 0; font-size: 18px; }

/* Hero */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(48px, 7vw, 88px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 60%; height: 120%;
  background: radial-gradient(closest-side, var(--green-glow), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
h1 { font-size: clamp(44px, 7.4vw, 92px); font-weight: 700; line-height: 0.95; letter-spacing: -0.04em; }
.hero-lead { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.5; color: var(--fg-soft); max-width: 34ch; margin: 26px 0 0; }
.hero-lead strong { color: var(--fg); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { list-style: none; margin: 40px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; }
.hero-facts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-facts b { font-family: var(--f-display); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.hero-facts span { color: var(--muted); font-size: 14.5px; }
.portrait { position: relative; min-width: 0; }
.portrait img {
  display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 28%;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-strong);
}
.portrait::after {
  content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--green-deep); border-radius: var(--radius); z-index: -1;
}

/* W czym mogę pomóc */
.help { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.help-card {
  min-width: 0; display: flex; flex-direction: column; gap: 10px;
  padding: clamp(22px, 2.6vw, 30px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.2s;
}
.help-card:hover { border-color: var(--green-deep); }
.help-card .who { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.help-card h3 { font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.help-card p { margin: 0; color: var(--muted); font-size: 16px; }
.help-card a { margin-top: auto; padding-top: 6px; color: var(--fg); font-weight: 600; font-size: 15.5px; text-decoration: none; }
.help-card a:hover { color: var(--green); }

/* Doświadczenie: oś czasu */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 1px; background: var(--line-strong); }
.job { position: relative; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 40px; padding: 0 0 40px 40px; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong);
}
.job.now::before { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 5px var(--green-glow); }
.job-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.job-time { font-family: var(--f-mono); font-size: 13px; color: var(--green); }
.job:not(.now) .job-time { color: var(--muted); }
.job-sector { color: var(--muted); font-size: 14.5px; }
.job-body { min-width: 0; }
.job-body h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.job-body .role { margin: 4px 0 10px; color: var(--fg-soft); font-weight: 500; }
.job-body p { margin: 0; color: var(--muted); max-width: 62ch; }
.job.earlier .job-body h3 { font-size: 19px; }

/* Projekty */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project {
  min-width: 0; display: flex; flex-direction: column; gap: 12px;
  padding: clamp(22px, 2.6vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.project h3 { font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.project p { margin: 0; color: var(--muted); font-size: 16px; }
.project p strong { color: var(--fg-soft); font-weight: 600; }
.project p.flow { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.7; color: var(--green); background: var(--green-glow); border-radius: 8px; padding: 8px 12px; }
.project .where { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.project .where b { color: var(--fg-soft); font-weight: 600; }

/* Prelekcje */
.talks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.talk { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) auto; gap: 8px 32px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); }
.talk-when { display: flex; flex-direction: column; gap: 2px; }
.talk-when .date { font-family: var(--f-mono); font-size: 13.5px; color: var(--green); }
.talk.past .talk-when .date { color: var(--muted); }
.talk-when .place { color: var(--muted); font-size: 14.5px; }
.talk h3 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.talk .event { margin: 6px 0 0; color: var(--fg-soft); }
.badge { font-family: var(--f-mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.talk.next .badge { color: var(--green); border-color: var(--green-deep); }
.talks-cta { margin-top: 26px; }

/* O mnie */
.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.about-text p { margin: 0 0 18px; max-width: 60ch; color: var(--fg-soft); }
.about-text p.intro { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.5; color: var(--fg); }
.facts-list { display: flex; flex-direction: column; gap: 26px; margin: 0; }
.facts-list > div { min-width: 0; }
.facts-list dt { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.facts-list dd { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { font-size: 14.5px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; color: var(--fg-soft); }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--fg-soft); }
.plain b { color: var(--fg); font-weight: 600; }

/* Pasek certyfikatów w hero */
.cert-strip { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cert-strip li {
  font-family: var(--f-mono); font-size: 12.5px; color: var(--green);
  border: 1px solid var(--green-deep); background: var(--green-glow); border-radius: 6px; padding: 4px 10px;
}

/* Kompetencje: certyfikaty, szkolenia, narzędzia */
.creds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.cred-col { min-width: 0; padding: clamp(22px, 2.6vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cred-col h3, .skill-group h3 { font-size: 13px; font-family: var(--f-body); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.cred-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cred-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; }
.cred-list li::before { content: "✓"; grid-row: 1 / 3; color: var(--green); font-family: var(--f-mono); font-size: 13px; line-height: 1.7; }
.cred-list b { font-weight: 600; font-size: 17px; }
.cred-list span { grid-column: 2; color: var(--muted); font-size: 14.5px; }
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.skill-group { min-width: 0; padding: clamp(20px, 2.4vw, 26px); border: 1px solid var(--line); border-radius: var(--radius); }

/* Kontakt */
.contact-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: end; }
.contact h2 { font-size: clamp(34px, 5vw, 58px); }
.contact-lead { color: var(--muted); font-size: 18px; margin: 16px 0 0; max-width: 46ch; }
.contact-box { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.contact-item { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.contact-item .label { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.contact-value { font-size: clamp(16px, 4.6vw, 19px); font-weight: 500; overflow-wrap: anywhere; }
.copy { font-family: var(--f-mono); font-size: 12.5px; background: transparent; color: var(--green); border: 1px solid var(--green-deep); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.copy:hover { border-color: var(--green); }

footer { border-top: 1px solid var(--line); }
footer .container { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--fg); }

/* Responsywność */
@media (max-width: 1060px) {
  .nav-links { gap: 18px; font-size: 14.5px; }
}
@media (max-width: 980px) {
  .nav-links { display: none; }
}
@media (max-width: 920px) {
  .help, .projects { grid-template-columns: minmax(0, 1fr); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .creds, .skills { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { order: -1; max-width: 260px; }
  .portrait img { aspect-ratio: 1 / 1; }
  .portrait::after { inset: 10px -10px -10px 10px; }
  .about, .contact-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .job { grid-template-columns: minmax(0, 1fr); padding-left: 34px; }
  .talk { grid-template-columns: minmax(0, 1fr); }
  .talk .badge { justify-self: start; }
}
@media (max-width: 480px) {
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .brand { font-size: 17px; }
  .nav .container { gap: 10px; }
  .nav-right { gap: 8px; }
  .hero-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .contact-item { padding: 18px 16px; }
}
@media (max-width: 360px) {
  .brand { font-size: 15px; }
  .container { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .btn-sm { padding: 8px 12px; }
  .lang { padding: 8px 9px; }
  .contact-value { font-size: 15px; }
}
