/* ==========================================================================
   michaldurlak.pl — nowoczesny minimal, jasny / ciemny motyw
   ========================================================================== */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/fonts/mono/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/fonts/mono/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokeny ---------- */

:root {
  --font: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono Variable', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #fbfbfd;
  --bg-alt: #f4f4f9;
  --surface: #ffffff;
  --surface-2: #f5f5fa;
  --border: #e6e6ef;
  --border-strong: #d3d3e0;
  --text: #0d0f1f;
  --text-2: #393d55;
  --muted: #676c85;

  --accent-1: #7c3aed;
  --accent-2: #2563eb;
  --accent: #5b45e8;
  --accent-text: #4f3bd6;
  --accent-soft: rgb(91 69 232 / 0.08);
  --accent-border: rgb(91 69 232 / 0.32);
  --grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --success: #0b8f63;
  --dot: rgb(13 15 31 / 0.09);

  --shadow-sm: 0 1px 2px rgb(16 18 40 / 0.05);
  --shadow: 0 1px 2px rgb(16 18 40 / 0.04), 0 12px 32px -12px rgb(16 18 40 / 0.16);
  --shadow-accent: 0 18px 40px -18px rgb(91 69 232 / 0.55);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-h: 68px;
  --container: 1160px;

  --when-light: inline-block;
  --when-dark: none;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0a0b12;
    --bg-alt: #0e1019;
    --surface: #12141f;
    --surface-2: #181b29;
    --border: #232739;
    --border-strong: #31364e;
    --text: #eceef8;
    --text-2: #c4c8dc;
    --muted: #8d93ad;
    --accent-1: #a78bfa;
    --accent-2: #60a5fa;
    --accent: #8f86fb;
    --accent-text: #a8a2ff;
    --accent-soft: rgb(143 134 251 / 0.1);
    --accent-border: rgb(143 134 251 / 0.38);
    --success: #34d399;
    --dot: rgb(236 238 248 / 0.07);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.6);
    --shadow-accent: 0 18px 44px -18px rgb(124 92 250 / 0.6);
    --when-light: none;
    --when-dark: inline-block;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0a0b12;
  --bg-alt: #0e1019;
  --surface: #12141f;
  --surface-2: #181b29;
  --border: #232739;
  --border-strong: #31364e;
  --text: #eceef8;
  --text-2: #c4c8dc;
  --muted: #8d93ad;
  --accent-1: #a78bfa;
  --accent-2: #60a5fa;
  --accent: #8f86fb;
  --accent-text: #a8a2ff;
  --accent-soft: rgb(143 134 251 / 0.1);
  --accent-border: rgb(143 134 251 / 0.38);
  --success: #34d399;
  --dot: rgb(236 238 248 / 0.07);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.6);
  --shadow-accent: 0 18px 44px -18px rgb(124 92 250 / 0.6);
  --when-light: none;
  --when-dark: inline-block;
  color-scheme: dark;
}

/* ---------- Baza ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }
.when-light { display: var(--when-light); }
.when-dark { display: var(--when-dark); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--text); color: var(--bg); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Przyciski i drobne elementy ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  height: 46px; padding: 0 20px; border-radius: 12px;
  border: 1px solid transparent; font-weight: 600; font-size: 0.95rem; white-space: nowrap;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; filter: grayscale(1); cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost:disabled:hover { border-color: var(--border); background: var(--surface); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 0.875rem; border-radius: 10px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover { filter: brightness(1.08) saturate(1.05); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-light { background: #fff; color: #1b1640; }
.btn-light:hover { background: #f1efff; }
.btn-outline-light { border-color: rgb(255 255 255 / 0.45); color: #fff; }
.btn-outline-light:hover { background: rgb(255 255 255 / 0.12); }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn .icon { width: 18px; height: 18px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.8125rem; line-height: 1; padding: 7px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

.eyebrow {
  font: 600 0.78rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 12px;
}
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent-text); }
.link-arrow .icon { transition: transform 0.18s ease; }
.link-arrow:hover .icon, .card-hover:hover .link-arrow .icon { transform: translateX(3px); }
.link-muted { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--muted); }
.link-muted:hover { color: var(--text); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card-hover:hover, .card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent-border); }
.stretched::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }

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

.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad); color: #fff; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: var(--shadow-accent);
}
.brand-name { white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
  padding: 8px 13px; border-radius: 10px; font-size: 0.94rem; font-weight: 500; color: var(--text-2); white-space: nowrap;
  transition: color 0.15s, background-color 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a.active { color: var(--text); background: var(--accent-soft); }
.site-nav .nav-cv { display: none; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch {
  display: inline-flex; padding: 3px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  font: 600 0.75rem/1 var(--mono);
}
.lang-switch span { padding: 8px 9px; border-radius: 8px; color: var(--muted); transition: color 0.15s, background-color 0.15s; }
.lang-switch span.on { background: var(--text); color: var(--bg); }
.lang-switch:hover span:not(.on) { color: var(--text); }
.menu-toggle { display: none; }
.menu-toggle .when-open { display: none; }
.menu-open .menu-toggle .when-open { display: inline-block; }
.menu-open .menu-toggle .when-closed { display: none; }

/* Średnie ekrany: przy logo zostają inicjały, żeby całe menu zmieściło się w jednej linii */
@media (min-width: 901px) and (max-width: 1080px) {
  .brand-name { display: none; }
  .header-inner { gap: 16px; }
  .site-nav a { padding: 8px 10px; }
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .header-cv { display: none; }
  .header-inner { gap: 12px; }
  .header-actions { margin-left: auto; }
  .site-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); display: none;
  }
  .menu-open .site-nav { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 1rem; }
  .site-nav .nav-cv { display: flex; align-items: center; gap: 8px; color: var(--accent-text); }
}
@media (max-width: 420px) {
  .brand-name { display: none; }
}

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

.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 9vw, 112px); }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(640px 420px at 12% 8%, color-mix(in srgb, var(--accent-1) 16%, transparent), transparent 70%),
    radial-gradient(560px 420px at 88% 24%, color-mix(in srgb, var(--accent-2) 15%, transparent), transparent 70%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 25%, transparent 75%);
}
.hero-bg-soft { opacity: 0.75; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.eyebrow-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  padding: 7px 14px 7px 11px; border-radius: 999px; border: 1px solid var(--accent-border); background: var(--accent-soft);
  color: var(--accent-text); font-size: 0.85rem; font-weight: 600;
}
.hero-title { font-size: clamp(2.3rem, 5.6vw, 4.25rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: 780; max-width: 15ch; }
.hero-intro { margin-top: 24px; max-width: 60ch; color: var(--text-2); font-size: clamp(1.02rem, 1.4vw, 1.14rem); line-height: 1.75; }
.hero-intro p + p { margin-top: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.profile-card {
  position: relative; padding: 32px 28px 26px; border-radius: var(--radius-lg); text-align: center;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(140deg, color-mix(in srgb, var(--accent-1) 55%, var(--border)), var(--border) 45%, color-mix(in srgb, var(--accent-2) 55%, var(--border))) border-box;
  border: 1px solid transparent; box-shadow: var(--shadow);
}
.avatar { width: 112px; height: 112px; margin: 0 auto 18px; padding: 3px; border-radius: 50%; background: var(--grad); }
.avatar img, .avatar span { width: 100%; height: 100%; border-radius: 50%; border: 4px solid var(--surface); object-fit: cover; }
.avatar span { display: grid; place-items: center; background: var(--surface-2); font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.profile-name { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.profile-role { margin-top: 4px; color: var(--muted); font-size: 0.92rem; }
.profile-loc { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--text-2); font-size: 0.9rem; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.profile-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 22px; border-top: 1px solid var(--border); padding-top: 18px; }
.profile-stats a { display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 10px; transition: background-color 0.15s; }
.profile-stats a + a { border-left: 1px solid var(--border); border-radius: 0; }
.profile-stats a:hover strong { filter: brightness(1.15); }
.profile-stats strong { font-size: 1.6rem; font-weight: 750; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.profile-stats span { font-size: 0.78rem; color: var(--muted); }
.profile-social { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.profile-social:empty { display: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .profile-card { max-width: 420px; width: 100%; }
}

/* ---------- Sekcje ---------- */

.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-tight { padding-top: 8px; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { margin-bottom: clamp(28px, 4vw, 44px); max-width: 720px; }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.03em; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; max-width: none; }

.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); }
.page-title { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.035em; line-height: 1.08; max-width: 22ch; }
.page-lead { margin-top: 16px; max-width: 64ch; color: var(--text-2); font-size: clamp(1.02rem, 1.4vw, 1.15rem); }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; color: var(--muted); font-weight: 500; font-size: 0.92rem; }
.back-link:hover { color: var(--text); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.detail-actions:empty { display: none; }
.page-hero-detail .chips { margin-top: 22px; }

.empty-state {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 56px 24px; text-align: center;
  border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted);
}
.notice {
  margin-bottom: 24px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.92rem;
  background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--text-2);
}

/* ---------- Umiejętności ---------- */

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.skill-card { padding: 26px; }
.skill-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-border);
}
.skill-icon .icon { width: 22px; height: 22px; }
.skill-card h3 { font-size: 1.12rem; margin-bottom: 16px; }

/* ---------- Oś czasu ---------- */

.timeline { list-style: none; position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 24px; bottom: 24px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--accent-1), var(--accent-2) 70%, transparent); opacity: 0.4;
}
.tl-item { position: relative; padding-left: 40px; }
.tl-item + .tl-item { margin-top: 18px; }
.tl-item::before {
  content: ''; position: absolute; left: 0; top: 26px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 4px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
}
.tl-card { padding: 22px 24px; }
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 6px 20px; }
.tl-head h3 { font-size: 1.12rem; }
.tl-company { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: var(--muted); font-size: 0.92rem; }
.tl-date { font: 500 0.8rem/1.6 var(--mono); color: var(--accent-text); white-space: nowrap; padding: 3px 10px; border-radius: 8px; background: var(--accent-soft); }
.tl-card .prose { margin-top: 14px; }

/* ---------- Certyfikaty ---------- */

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.cert-card { display: flex; flex-direction: column; padding: 24px; }
.cert-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.cert-logo {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-text);
}
.cert-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cert-logo .icon { width: 28px; height: 28px; }
.cert-name { font-size: 1.06rem; line-height: 1.35; }
.cert-issuer { margin-top: 4px; color: var(--muted); font-size: 0.92rem; }
.cert-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 16px 0 0; }
.cert-meta div { display: flex; flex-direction: column; }
.cert-meta dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cert-meta dd { margin: 2px 0 0; font-size: 0.9rem; font-weight: 500; }
.cert-id { margin-top: 12px; font: 0.76rem/1.5 var(--mono); color: var(--muted); word-break: break-all; }
.cert-verify { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 18px; font-weight: 600; font-size: 0.92rem; color: var(--accent-text); }

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

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.project-card { display: flex; flex-direction: column; overflow: hidden; }
.project-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.project-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.5s ease; }
.project-card:hover .project-media img { transform: scale(1.03); }
.project-media-empty { display: grid; place-items: center; height: 100%; color: var(--muted); }
.project-media-empty .icon { width: 40px; height: 40px; }
.project-body { display: flex; flex-direction: column; gap: 14px; padding: 24px; flex: 1; }
.project-title { font-size: 1.25rem; letter-spacing: -0.02em; }
.project-title a:hover { color: var(--accent-text); }
.project-summary { color: var(--text-2); }
.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: auto; padding-top: 6px; }

/* Jeden projekt: duży, poziomy kafelek */
@media (min-width: 900px) {
  .project-grid-single { grid-template-columns: 1fr; }
  .project-grid-single .project-card { flex-direction: row; }
  .project-grid-single .project-media { flex: 0 0 58%; aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--border); }
  .project-grid-single .project-body { padding: 36px; justify-content: center; }
  .project-grid-single .project-title { font-size: 1.6rem; }
}

/* Galeria */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-item { margin: 0; }
.gallery-item a { display: block; overflow: hidden; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); aspect-ratio: 16 / 10; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.4s ease; }
.gallery-item a:hover img { transform: scale(1.03); }
.gallery-item figcaption { margin-top: 8px; font-size: 0.82rem; color: var(--muted); }
.gallery-main { grid-column: 1 / -1; }
.gallery-main a { aspect-ratio: 16 / 9; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery-main figcaption { font-size: 0.9rem; text-align: center; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Blog ---------- */

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; }
.post-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-body { display: flex; flex-direction: column; gap: 10px; padding: 24px; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font: 0.8rem/1.5 var(--mono); color: var(--muted); }
.post-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.post-title { font-size: 1.18rem; line-height: 1.35; }
.post-card:hover .post-title { color: var(--accent-text); }
.post-excerpt { color: var(--text-2); font-size: 0.96rem; }
.post-body .link-arrow { margin-top: auto; padding-top: 6px; font-size: 0.92rem; }
.post-heading { max-width: none; }
.page-hero-detail .post-meta { margin-top: 18px; font-size: 0.85rem; }
.post-cover { margin: 0 0 32px; }
.post-cover a { display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 40px; font: 0.9rem var(--mono); color: var(--muted); }

/* ---------- Treść wpisów (Markdown) ---------- */

.prose { color: var(--text-2); font-size: 1.04rem; line-height: 1.8; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: 1.6rem; color: var(--text); letter-spacing: -0.025em; }
.prose h3 { margin-top: 1.7em; font-size: 1.25rem; color: var(--text); }
.prose h4 { margin-top: 1.5em; font-size: 1.05rem; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--accent-border); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin-left: 0; margin-right: 0; padding: 14px 20px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-2);
}
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose :not(pre) > code {
  font: 0.86em var(--mono); padding: 0.15em 0.45em; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
}
.prose-sm { font-size: 0.95rem; line-height: 1.7; }
.prose-sm > * + * { margin-top: 0.6em; }
.md-figure { margin-left: 0; margin-right: 0; }
.md-figure a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); cursor: zoom-in; }
.md-figure figcaption { margin-top: 8px; text-align: center; font-size: 0.86rem; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }

/* Bloki kodu — ciemne w obu motywach */
.code { margin: 1.5em 0; border-radius: 12px; overflow: hidden; background: #0d0f1c; border: 1px solid #22263b; box-shadow: var(--shadow-sm); }
.code figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 16px;
  background: #13162a; border-bottom: 1px solid #22263b; font: 500 0.74rem/1 var(--mono); color: #8f95b2; text-transform: lowercase;
}
.code-copy {
  height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid #2c3150; background: transparent;
  color: #c6cae0; font: 500 0.74rem var(--mono); cursor: pointer;
}
.code-copy:hover { background: #1d2140; }
.code-copy.done { color: #6ee7b7; border-color: #2f6b55; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 0.86rem/1.7 var(--mono); color: #e4e7f5; tab-size: 4; }
.hljs-comment, .hljs-quote { color: #6b7396; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-section, .hljs-doctag, .hljs-name { color: #c4a2ff; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-selector-attr { color: #a5e3a0; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #ffad7a; }
.hljs-title, .hljs-title.function_, .hljs-function .hljs-title { color: #82b4ff; }
.hljs-built_in, .hljs-type, .hljs-title.class_ { color: #ffd479; }
.hljs-variable, .hljs-template-variable, .hljs-params { color: #ff8fa3; }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-meta, .hljs-selector-class, .hljs-selector-id { color: #7fdbff; }
.hljs-deletion { color: #ff6b81; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

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

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 30px; }
.contact-card .eyebrow { margin: 8px 0 4px; }
.contact-main { grid-row: span 2; justify-content: center; background:
  radial-gradient(400px 260px at 100% 0%, var(--accent-soft), transparent 70%), var(--surface); }
.contact-icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--grad); color: #fff; box-shadow: var(--shadow-accent);
}
.contact-icon .icon { width: 22px; height: 22px; }
.contact-email { font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; word-break: break-all; }
.contact-email:hover { color: var(--accent-text); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.contact-phone { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--text-2); }
.company-name { font-size: 1.15rem; font-weight: 650; }
.company-ids { display: grid; gap: 6px; margin: 12px 0 0; }
.company-ids div { display: flex; gap: 10px; }
.company-ids dt { min-width: 110px; color: var(--muted); font-size: 0.9rem; }
.company-ids dd { margin: 0; font: 500 0.92rem var(--mono); }
.contact-card .btn { margin-top: 12px; }
.contact-card p:not(.eyebrow) { color: var(--text-2); }
.contact-profiles { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: 20px 40px; }
.contact-profiles-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.contact-card p.contact-profiles-text { font-size: 1.18rem; font-weight: 650; letter-spacing: -0.01em; color: var(--text); }
.profile-links { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.profile-link {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface-2);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.profile-link:hover { transform: translateY(-2px); border-color: var(--accent-border); box-shadow: var(--shadow); }
.profile-link-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--grad); color: #fff; }
.profile-link-icon .icon { width: 20px; height: 20px; }
.profile-link-text { min-width: 0; }
.profile-link strong { display: block; font-size: 0.98rem; }
.profile-link small { display: block; color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-link > .icon-external { margin-left: auto; color: var(--muted); }
.profile-link:hover > .icon-external { color: var(--accent-text); }
@media (max-width: 760px) {
  .contact-profiles { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-main { grid-row: auto; }
}

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

.section:not(.section-alt) + .section-cta { padding-top: 0; }
.cta-band {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px 40px;
  padding: clamp(32px, 5vw, 56px); border-radius: var(--radius-lg); color: #fff;
  background: radial-gradient(500px 300px at 90% 0%, rgb(255 255 255 / 0.18), transparent 70%), linear-gradient(120deg, #6d28d9, #2563eb);
  box-shadow: var(--shadow-accent);
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; max-width: 24ch; }
.cta-band p { margin-top: 10px; max-width: 56ch; color: rgb(255 255 255 / 0.85); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

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

.site-footer { margin-top: auto; padding: 40px 0 28px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand .muted { margin-top: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-nav a { color: var(--text-2); font-size: 0.94rem; }
.footer-nav a:hover { color: var(--text); }
.footer-social { display: flex; gap: 8px; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.82rem; }

/* ---------- Strona błędu ---------- */

.error-page { text-align: center; padding: clamp(80px, 14vw, 160px) 0; }
.error-page .page-title, .error-page .page-lead { margin-left: auto; margin-right: auto; }
.error-page .btn { margin-top: 32px; }
.error-code { font: 800 clamp(4rem, 12vw, 7rem)/1 var(--mono); letter-spacing: -0.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 56px 72px 32px; background: rgb(6 7 14 / 0.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade 0.18s ease;
}
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; border-radius: 10px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.5); }
.lightbox p { color: #d5d8ea; font-size: 0.92rem; text-align: center; min-height: 1.4em; }
.lightbox button {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid rgb(255 255 255 / 0.18); background: rgb(255 255 255 / 0.06); color: #fff; cursor: pointer;
}
.lightbox button:hover { background: rgb(255 255 255 / 0.14); }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox .lb-next { right: 16px; top: 50%; translate: 0 -50%; }
.lightbox button[hidden] { display: none; }
@media (max-width: 640px) {
  .lightbox { padding: 64px 16px 24px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 16px; translate: none; }
}
@keyframes fade { from { opacity: 0; } }
body.no-scroll { overflow: hidden; }

/* ---------- Animacje wejścia ---------- */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
/* Pierwszy ekran: animacja CSS od razu przy wczytaniu (bez czekania na JS) */
.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise:nth-child(2) { animation-delay: 0.06s; }
.rise:nth-child(3) { animation-delay: 0.12s; }
.rise:nth-child(4) { animation-delay: 0.18s; }
.rise:nth-child(n + 5) { animation-delay: 0.24s; }
.profile-card.rise { animation-delay: 0.15s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .project-media img, .gallery-item img { transition: none; }
  .pulse { animation: none; }
}

/* ---------- Telefony ---------- */

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .eyebrow-chip { border-radius: 14px; align-items: flex-start; }
  .eyebrow-chip .icon { margin-top: 0.2em; }
  .hero-actions .btn, .contact-actions .btn { flex: 1 1 auto; }
  .cert-grid, .project-grid, .post-grid { grid-template-columns: 1fr; }
  .tl-item { padding-left: 30px; }
  .tl-card { padding: 18px; }
  .contact-card { padding: 24px; }
}

@media print {
  .site-header, .site-footer, .cta-band, .hero-bg { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
