@font-face{font-family:"Sora Variable";font-style:normal;font-display:swap;font-weight: 100 800;src:url(../fonts/sora-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:"Sora Variable";font-style:normal;font-display:swap;font-weight: 100 800;src:url(../fonts/sora-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:"Instrument Sans Variable";font-style:normal;font-display:swap;font-weight: 400 700;src:url(../fonts/instrument-sans-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:"Instrument Sans Variable";font-style:normal;font-display:swap;font-weight: 400 700;src:url(../fonts/instrument-sans-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;}

/* ---------- Kolory i fonty: zmień tutaj, żeby przemalować całą stronę ---------- */
/* Motyw jasny */
:root {
  --bg: #f3f3f3;
  --solid: #fafafa;                      /* nieprzezroczysty odpowiednik powierzchni */
  --surface: rgb(255 255 255 / .66);     /* szklane panele */
  --surface-2: rgb(0 0 0 / .05);
  --veil: rgb(243 243 243 / .8);         /* zasłona sekcji nad animowanym tłem */
  --border: rgb(0 0 0 / .12);
  --text: #0a0a0a;
  --muted: #5e5e5e;
  --accent: #0a0a0a;
  --accent-fg: #ffffff;
  --btn: linear-gradient(180deg, #2b2b2b, #0a0a0a);
  --btn-fg: #ffffff;
  --bubble: linear-gradient(135deg, #111111, #3a3a3a);
  --bubble-fg: #ffffff;
  --glow: rgb(0 0 0 / .22);
  --star: #0a0a0a;
  --like: #e11d48;                       /* polubienie: jedyny mocny kolor na stronie */
  --like-rgb: 225 29 72;
  --online: #12925a;
  --danger: #c2313b;
  --font-sans: "Instrument Sans Variable", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Sora Variable", var(--font-sans);
  --nav-h: 5rem;
  --radius: 1.25rem;
  color-scheme: light;
}
/* Motyw ciemny (domyślny) */
.dark {
  --bg: #050505;
  --solid: #111111;
  --surface: rgb(20 20 20 / .58);
  --surface-2: rgb(255 255 255 / .07);
  --veil: rgb(5 5 5 / .74);
  --border: rgb(255 255 255 / .13);
  --text: #f5f5f5;
  --muted: #a1a1a1;
  --accent: #ffffff;
  --accent-fg: #0a0a0a;
  --btn: linear-gradient(180deg, #ffffff, #d4d4d4);
  --btn-fg: #0a0a0a;
  --bubble: linear-gradient(135deg, #f5f5f5, #cfcfcf);
  --bubble-fg: #0a0a0a;
  --glow: rgb(255 255 255 / .2);
  --star: #f5f5f5;
  --like: #ff4d6d;
  --like-rgb: 255 77 109;
  --online: #4ade80;
  --danger: #ff8597;
  color-scheme: dark;
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: .35em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-fg); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.container { max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
.muted { color: var(--muted); }
.display { font-family: var(--font-display); letter-spacing: -.02em; }
.icon { width: 1.125rem; height: 1.125rem; flex: none; fill: none; }

/* ---------- Przyciski i pola ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: 999px; padding: .625rem 1.25rem; font-size: .875rem; font-weight: 600;
  border: 1px solid transparent; transition: background-color .15s, filter .15s, border-color .15s;
}
.btn:disabled { cursor: not-allowed; opacity: .6; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-secondary { background: var(--surface); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-block { width: 100%; }
.btn .icon { width: 1rem; height: 1rem; }
.field {
  width: 100%; border-radius: .75rem; border: 1px solid var(--border); background: var(--surface);
  padding: .625rem .875rem; font-size: .9375rem;
}
.field::placeholder { color: var(--muted); }
.field[aria-invalid="true"] { border-color: var(--danger); }
.form-row + .form-row { margin-top: 1rem; }
.form-row label { display: block; margin-bottom: .375rem; font-size: .875rem; font-weight: 500; }
.form-hint, .form-error { margin-top: .375rem; font-size: .875rem; color: var(--muted); }
.form-error { color: var(--danger); }
.alert {
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger); border-radius: .75rem; padding: .625rem .875rem; font-size: .875rem; margin-bottom: 1rem;
}

/* ---------- Avatar ---------- */
.avatar { position: relative; display: inline-block; flex: none; }
.avatar img, .avatar-initial { border-radius: 50%; width: 2.5rem; height: 2.5rem; object-fit: cover; }
.avatar-initial {
  display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: .875rem;
}
.avatar-sm img, .avatar-sm .avatar-initial { width: 2rem; height: 2rem; font-size: .75rem; }
.avatar-lg img, .avatar-lg .avatar-initial { width: 6rem; height: 6rem; font-size: 1.875rem; }
.status-dot {
  position: absolute; right: 0; bottom: 0; width: .75rem; height: .75rem; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--muted);
}
.status-dot.is-online { background: var(--online); }

/* ---------- Nawigacja ---------- */
.navbar {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h); border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px);
}
.navbar .container { display: flex; align-items: center; gap: 1rem; height: 100%; }
.brand { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; }
.nav-sections { display: none; margin-left: 1rem; gap: .25rem; }
@media (min-width: 1024px) { .nav-sections { display: flex; } }
.nav-link { border-radius: 999px; padding: .375rem .75rem; font-size: .875rem; color: var(--muted); transition: background-color .15s, color .15s; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: .375rem; }
.icon-btn {
  position: relative; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  color: var(--muted); transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle .i-moon, .dark .theme-toggle .i-sun { display: block; }
.theme-toggle .i-sun, .dark .theme-toggle .i-moon { display: none; }
.badge {
  display: grid; place-items: center; min-width: 1.125rem; height: 1.125rem; padding-inline: .25rem;
  border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: .6875rem; font-weight: 700; line-height: 1;
}
.icon-btn .badge { position: absolute; top: -2px; right: -2px; }
.nav-user { display: flex; align-items: center; gap: .5rem; border-radius: 999px; padding: .25rem; margin-left: .25rem; }
.nav-user:hover { background: var(--surface-2); }
.nav-user-name { display: none; max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; font-weight: 500; }
.nav-logout { display: flex; align-items: center; gap: .5rem; height: 2.25rem; padding-inline: .625rem; border-radius: 999px; font-size: .875rem; color: var(--muted); }
.nav-logout:hover { background: var(--surface-2); color: var(--text); }
.nav-logout span { display: none; }
.nav-login { border-radius: 999px; padding: .5rem .75rem; font-size: .875rem; font-weight: 500; }
.nav-login:hover { background: var(--surface-2); }
.navbar .btn { padding: .5rem 1rem; }
@media (min-width: 640px) {
  .nav-user { padding-right: .75rem; }
  .nav-user-name, .nav-logout span { display: block; }
}

/* ---------- Strona główna ---------- */
.section { border-top: 1px solid var(--border); }
.section > .container { padding-block: 5rem; }
.section-alt { background: var(--surface); }
.section-title { font-family: var(--font-display); font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }

.hero { display: grid; gap: 3rem; align-items: center; padding-block: 3.5rem 5rem; }
@media (min-width: 1024px) { .hero { grid-template-columns: 1.1fr .9fr; padding-block: 6rem 7rem; } }
.hero-role { font-size: 1.125rem; font-weight: 500; color: var(--muted); }
.hero-name {
  margin-top: .75rem; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3.25rem, 11vw, 7rem); line-height: .92; letter-spacing: -.035em;
}
.hero-intro { margin-top: 1.5rem; max-width: 34rem; font-size: 1.125rem; line-height: 1.65; color: var(--muted); }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-chat {
  width: 100%; max-width: 28rem; margin-inline: auto; border: 1px solid var(--border); border-radius: 1.5rem;
  background: var(--surface); box-shadow: 0 20px 40px -12px rgb(0 0 0 / .18);
}
@media (min-width: 1024px) { .hero-chat { margin-right: 0; } }
.hero-chat-head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.hero-chat-head strong { display: block; font-weight: 600; }
.hero-chat-head span.muted { font-size: .875rem; }
.hero-chat-body { display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem; min-height: 14rem; padding: 1.25rem; }
.hero-chat-foot { border-top: 1px solid var(--border); padding: .75rem; }
.hero-chat-input {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--bg); padding: .375rem .375rem .375rem 1rem; font-size: .9375rem; color: var(--muted);
  transition: border-color .15s;
}
.hero-chat-input:hover { border-color: var(--accent); }
.hero-chat-input span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--accent-fg); }
.hero-chat-input .icon { width: 1rem; height: 1rem; }

.bubble {
  width: fit-content; max-width: 85%; border-radius: 1rem; padding: .5rem .875rem; font-size: .9375rem; line-height: 1.4;
  background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere;
}
.bubble-tail-left { border-bottom-left-radius: .375rem; }
.bubble-tail-right { border-bottom-right-radius: .375rem; }
.bubble-mine { background: var(--accent); color: var(--accent-fg); }

/* Sekwencja powitalna w hero: wiadomości pojawiają się jedna po drugiej. */
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.hero-chat .bubble { animation: bubble-in .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes typing-dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.typing-dots { display: flex; align-items: center; gap: .25rem; padding: .75rem .875rem; }
.typing-dots i { width: .375rem; height: .375rem; border-radius: 50%; background: var(--muted); animation: typing-dot 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }

.about { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .about { grid-template-columns: 1fr 2fr; } }
.about-text { max-width: 40rem; font-size: 1.125rem; line-height: 1.65; }
.about-text p + p { margin-top: 1rem; }
.facts { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts dt { font-size: .875rem; color: var(--muted); }
.facts dd { margin-top: .25rem; font-weight: 600; }

.skill-groups { margin-top: 3rem; display: grid; gap: 2.5rem; }
.skill-group { display: grid; gap: 1rem; }
@media (min-width: 1024px) { .skill-group { grid-template-columns: 1fr 4fr; } }
.skill-group h3 { padding-top: .25rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .skills { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .skills { grid-template-columns: repeat(4, 1fr); } }
.skill { border: 1px solid var(--border); border-radius: 1rem; background: var(--bg); padding: .875rem 1rem; }
.skill strong { display: block; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; }
.skill span { font-size: .875rem; color: var(--muted); }

.projects { margin-top: 3rem; display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .projects { grid-template-columns: repeat(2, 1fr); } }
.project { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 1.5rem; background: var(--surface); }
.project-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb span {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(5rem, 9vw, 7rem); line-height: 1; letter-spacing: -.05em;
  white-space: nowrap; color: color-mix(in srgb, var(--text) 10%, transparent);
}
.project-body { display: flex; flex: 1; flex-direction: column; padding: 1.5rem; }
.project-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.project-head h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.project-head time { font-size: .875rem; color: var(--muted); }
.project-desc { margin-top: .75rem; line-height: 1.65; color: var(--muted); }
.tags { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { border-radius: 999px; background: var(--surface-2); padding: .25rem .75rem; font-size: .875rem; }
.project-links { margin-top: auto; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; }

.contact { background: var(--accent); color: var(--accent-fg); }
.contact > .container { display: flex; flex-direction: column; align-items: flex-start; gap: 2rem; }
@media (min-width: 1024px) { .contact > .container { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.contact h2 { max-width: 48rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.25rem, 6vw, 3.75rem); line-height: 1.05; letter-spacing: -.025em; }
.contact .btn { flex: none; background: var(--accent-fg); color: var(--accent); padding: .875rem 1.75rem; font-size: 1rem; }
.contact .btn:hover { opacity: .9; }
.footer { border-top: 1px solid var(--border); }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-block: 1.5rem; font-size: .875rem; color: var(--muted); }

/* ---------- Logowanie, profil, komunikaty ---------- */
.narrow { max-width: 28rem; margin-inline: auto; padding: 3rem 1rem; min-height: calc(100dvh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center; }
.page-title { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.narrow .lead { margin: .5rem 0 2rem; color: var(--muted); }
.form-foot { margin-top: 1rem; text-align: center; font-size: .875rem; color: var(--muted); }
.form-foot a { color: var(--text); font-weight: 500; text-decoration: underline; }
.center-page { min-height: calc(100dvh - var(--nav-h)); display: grid; place-items: center; padding: 2rem 1rem; text-align: center; }
.center-page p { margin-top: .75rem; color: var(--muted); max-width: 26rem; }
.center-page .btn { margin-top: 1.5rem; }

.profile { max-width: 42rem; margin-inline: auto; padding: 3rem 1rem; }
.card { margin-top: 1.5rem; border: 1px solid var(--border); border-radius: 1.5rem; background: var(--surface); padding: 1.5rem; }
.card h2 { margin-bottom: 1.25rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.avatar-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.avatar-editor .buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.avatar-editor p { margin-top: .5rem; font-size: .875rem; color: var(--muted); }
.profile-facts { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .profile-facts { grid-template-columns: repeat(3, 1fr); } }
.profile-facts div { min-width: 0; }
.profile-facts dt { font-size: .875rem; color: var(--muted); }
.profile-facts dd { margin-top: .25rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-label { display: flex; align-items: center; gap: .5rem; }
.online-label::before { content: ""; width: .625rem; height: .625rem; border-radius: 50%; background: var(--online); }
.form-actions { margin-top: 1.25rem; display: flex; align-items: center; gap: 1rem; }
textarea.field { resize: vertical; }

/* ---------- Wiadomości ---------- */
.messages-page { max-width: 72rem; margin-inline: auto; height: calc(100dvh - var(--nav-h)); display: flex; }
.messages-shell { display: flex; width: 100%; min-height: 0; overflow: hidden; background: var(--surface); }
.conv-pane, .chat-pane { min-height: 0; min-width: 0; flex-direction: column; }
.conv-pane { display: flex; width: 100%; }
.chat-pane { display: none; flex: 1; }
.in-chat .conv-pane { display: none; }
.in-chat .chat-pane { display: flex; }
@media (min-width: 768px) {
  .messages-page { padding: 1.5rem; }
  .messages-shell { border: 1px solid var(--border); border-radius: 1.5rem; }
  .conv-pane, .in-chat .conv-pane { display: flex; width: 20rem; flex: none; border-right: 1px solid var(--border); }
  .chat-pane { display: flex; }
  .chat-back { display: none !important; }
}
.conv-pane h1 { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.conv-list { flex: 1; min-height: 0; overflow-y: auto; padding: .5rem; }
.conv-empty { padding: 2rem 1.25rem; color: var(--muted); }
.conv-empty .btn { margin-top: 1rem; }
.conv { display: flex; align-items: center; gap: .75rem; border-radius: 1rem; padding: .75rem; transition: background-color .15s; }
.conv:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.conv[aria-current="page"] { background: var(--surface-2); }
.conv-main { min-width: 0; flex: 1; }
.conv-row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.conv-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { flex: none; font-size: .75rem; color: var(--muted); }
.conv-row + .conv-row { align-items: center; }
.conv-preview { font-size: .875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.is-unread .conv-name { font-weight: 700; }
.conv.is-unread .conv-preview { color: var(--text); font-weight: 500; }
.conv .badge { min-width: 1.25rem; height: 1.25rem; font-size: .75rem; padding-inline: .375rem; flex: none; }

.chat-head { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-bottom: 1px solid var(--border); }
.chat-head h2 { font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head p { font-size: .875rem; color: var(--muted); }
.chat-head > div { min-width: 0; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem .75rem; }
.chat-older { margin-bottom: 1rem; text-align: center; }
.chat-older .btn { padding-block: .375rem; }
.chat-start { height: 100%; display: grid; place-items: center; text-align: center; }
.chat-start > div { max-width: 20rem; }
.chat-start strong { display: block; margin-top: 1rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.chat-start p { margin-top: .25rem; font-size: .875rem; color: var(--muted); }
.chat-start p:last-child { margin-top: 1rem; font-size: 1rem; }
.msgs { display: flex; flex-direction: column; gap: .25rem; }
.day { margin: .75rem 0; text-align: center; font-size: .75rem; font-weight: 500; color: var(--muted); }
.msg { display: flex; align-items: flex-end; gap: .5rem; }
.msg.group-start { margin-top: .5rem; }
.msg.mine { justify-content: flex-end; }
.msg-col { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.msg.mine .msg-col { align-items: flex-end; }
.msg .bubble { max-width: 100%; }
.msg-spacer { width: 2rem; flex: none; }
.msg-meta { margin-top: .25rem; height: 1rem; display: flex; align-items: center; gap: .25rem; padding-inline: .25rem; font-size: .75rem; color: var(--muted); }
.msg-meta .icon { width: .875rem; height: .875rem; }
.msg-meta .is-read { color: var(--online); }
.typing-row { margin-top: .75rem; display: flex; align-items: flex-end; gap: .5rem; }
.composer { border-top: 1px solid var(--border); padding: .75rem; }
.composer form { display: flex; align-items: flex-end; gap: .5rem; }
.composer textarea { flex: 1; resize: none; min-height: 2.875rem; max-height: 10rem; border-radius: 1.5rem; }
.composer .btn { height: 2.875rem; padding-inline: 1rem; flex: none; }
.composer .btn span { display: none; }
.composer-hint { display: none; margin-top: .375rem; padding-inline: .25rem; font-size: .75rem; color: var(--muted); }
.composer .form-error { margin: 0 0 .5rem; padding-inline: .25rem; }
.chat-empty { height: 100%; display: grid; place-items: center; padding: 2rem; text-align: center; }
.chat-empty .icon { width: 2.5rem; height: 2.5rem; color: var(--muted); margin-inline: auto; }
.chat-empty strong { display: block; margin-top: 1rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
@media (min-width: 640px) {
  .chat-head, .composer { padding-inline: 1.25rem; }
  .chat-scroll { padding-inline: 1.25rem; }
  .msg-col { max-width: 65%; }
  .composer .btn span, .composer-hint { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-chat .bubble, .typing-dots i { animation: none; }
}

/* ---------- Dodatki wersji PHP ---------- */
.avatar-editor form { display: inline; }
.notice { border: 1px solid var(--border); background: var(--surface-2); border-radius: .75rem; padding: .625rem .875rem; font-size: .875rem; margin-bottom: 1rem; }

/* ====================================================================
   Wersja 2: nowe elementy
   ==================================================================== */

/* ---------- Nawigacja: menu mobilne i aktywna sekcja ---------- */
.nav-link[aria-current="true"] { color: var(--text); background: var(--surface-2); }
.nav-menu .i-x, .nav-menu[aria-expanded="true"] .i-menu { display: none; }
.nav-menu[aria-expanded="true"] .i-x { display: block; }
@media (max-width: 1023px) {
  .nav-sections.is-open {
    display: flex; flex-direction: column; gap: .125rem; position: absolute; top: var(--nav-h); left: 0; right: 0; margin: 0;
    padding: .75rem 1rem 1rem; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: 0 16px 24px -16px rgb(0 0 0 / .35);
  }
  .nav-sections.is-open .nav-link { padding: .625rem .75rem; font-size: 1rem; }
}
@media (min-width: 1024px) { .nav-menu { display: none; } }

/* ---------- Hero ---------- */
.hero-wrap { position: relative; }
.hero-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 14%, transparent) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.hero { position: relative; }
.hero-name { margin-top: 1.25rem; }
.hero-role { margin-top: 1rem; font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; color: var(--text); }
.hero-intro { margin-top: .75rem; }
.availability {
  display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: .375rem .875rem .375rem .75rem; font-size: .875rem; font-weight: 500;
}
.availability span { width: .5rem; height: .5rem; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 0 var(--online); animation: pulse 2s infinite; }
.availability.is-busy span { background: var(--accent); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--online) 60%, transparent); }
  70%, 100% { box-shadow: 0 0 0 .5rem transparent; }
}

/* ---------- Projekty: filtry, polubienia, hover ---------- */
.filters { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .375rem .875rem;
  font-size: .875rem; font-weight: 500; transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--muted); }
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
.filters + .muted + .projects, .filters + .projects { margin-top: 1.5rem; }
.project { transition: transform .2s, border-color .2s, box-shadow .2s; }
.project:hover { transform: translateY(-3px); border-color: var(--muted); box-shadow: 0 18px 30px -18px rgb(0 0 0 / .4); }
.project-thumb img { transition: transform .4s; }
.project:hover .project-thumb img { transform: scale(1.04); }
.project-links { align-items: center; }
.like-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: .375rem; border-radius: 999px; padding: .5rem .75rem;
  font-size: .875rem; font-weight: 600; color: var(--muted); transition: background-color .15s, color .15s;
}
.like-btn:hover { background: var(--surface-2); color: var(--text); }
.like-btn.is-liked { color: var(--danger); }
.like-btn.is-liked .icon { fill: currentColor; }
.like-btn.pop .icon { animation: like-pop .35s; }
@keyframes like-pop { 40% { transform: scale(1.35); } }
.skill { transition: border-color .15s; }
.skill:hover { border-color: var(--accent); }

/* ---------- Jak pracuję ---------- */
.process { margin-top: 3rem; display: grid; gap: 1.5rem; counter-reset: none; }
@media (min-width: 640px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .process { grid-template-columns: repeat(4, 1fr); } }
.process li { border-top: 2px solid var(--border); padding-top: 1.25rem; }
.process-num {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--accent); color: var(--accent-fg);
  font-family: var(--font-display); font-weight: 700; margin-top: -2.4rem; margin-bottom: 1rem; outline: 6px solid var(--surface);
}
.process h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.process p { margin-top: .375rem; color: var(--muted); line-height: 1.6; }

/* ---------- Opinie ---------- */
.reviews { margin-top: 3rem; display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .reviews { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .reviews { grid-template-columns: repeat(3, 1fr); } }
.review { display: flex; flex-direction: column; gap: 1rem; border: 1px solid var(--border); border-radius: 1.5rem; background: var(--surface); padding: 1.5rem; }
.review blockquote { margin: 0; flex: 1; font-size: 1.0625rem; line-height: 1.6; }
.review-author { display: flex; align-items: center; gap: .625rem; font-weight: 600; flex-wrap: wrap; }
.stars { display: inline-flex; gap: .125rem; color: var(--border); }
.stars .icon { width: 1rem; height: 1rem; fill: currentColor; }
.stars .is-on { color: var(--accent); }

/* ---------- Kontakt ---------- */
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; flex: none; }
.contact .btn.btn-outline { background: transparent; color: var(--accent-fg); border-color: var(--accent-fg); }
.contact .btn.btn-outline:hover { background: color-mix(in srgb, var(--accent-fg) 10%, transparent); opacity: 1; }

/* ---------- Formularze ---------- */
.narrow-wide { max-width: 36rem; }
select.field { appearance: auto; }
.btn-danger { background: var(--danger); color: #fff; }
.dark .btn-danger { color: #1c0606; }
.btn-danger:hover { filter: brightness(1.06); }
.form-grid { display: grid; gap: 0 1rem; margin-top: 1rem; }
.form-grid .form-row { margin-top: 0; margin-bottom: 1rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.check { display: flex !important; align-items: center; gap: .5rem; font-weight: 400 !important; margin: .5rem 0; }
.thumb-preview { width: 12rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .75rem; border: 1px solid var(--border); }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.rating-input { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .25rem; }
.rating-input legend { float: left; width: 100%; margin-bottom: .375rem; font-size: .875rem; font-weight: 500; }
.rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input label { cursor: pointer; color: var(--border); border-radius: .375rem; }
.rating-input label .icon { width: 1.75rem; height: 1.75rem; fill: currentColor; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--accent); }
.rating-input input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Powiadomienia ---------- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; max-width: min(22rem, calc(100vw - 2rem)); }
.toast {
  display: flex; align-items: center; gap: .75rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface);
  padding: .75rem 1rem; box-shadow: 0 16px 32px -12px rgb(0 0 0 / .45); animation: bubble-in .3s both;
}
.toast strong { display: block; font-size: .875rem; }
.toast span.toast-text { display: block; font-size: .875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 15rem; }
.toast > div { min-width: 0; }

/* ---------- Czat: zdjęcia, usuwanie, emoji, podpowiedzi ---------- */
.msg-image { display: block; max-width: min(18rem, 100%); max-height: 18rem; border-radius: 1rem; border: 1px solid var(--border); margin-bottom: .25rem; }
.bubble-deleted { background: transparent !important; border: 1px dashed var(--border); color: var(--muted) !important; font-style: italic; }
.msg-line { display: flex; align-items: center; gap: .25rem; max-width: 100%; }
.msg.mine .msg-line { flex-direction: row-reverse; }
.msg-delete { opacity: 0; width: 1.75rem; height: 1.75rem; flex: none; }
.msg-delete .icon { width: .9375rem; height: .9375rem; }
.msg:hover .msg-delete, .msg-delete:focus-visible { opacity: 1; }
@media (hover: none) { .msg-delete { opacity: .6; } }
.composer form { align-items: flex-end; gap: .25rem; }
.composer form .icon-btn { height: 2.875rem; flex: none; }
.composer form textarea { margin-inline: .25rem; }
.attachment-preview { position: relative; display: inline-block; margin-bottom: .5rem; }
.attachment-preview img { height: 5rem; border-radius: .75rem; border: 1px solid var(--border); }
.attachment-preview .icon-btn { position: absolute; top: -.5rem; right: -.5rem; width: 1.5rem; height: 1.5rem; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.attachment-preview .icon { width: .875rem; height: .875rem; }
.emoji-panel { display: flex; flex-wrap: wrap; gap: .125rem; margin-bottom: .5rem; padding: .375rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--bg); width: fit-content; max-width: 100%; }
.emoji-panel button { width: 2.25rem; height: 2.25rem; border-radius: .5rem; font-size: 1.25rem; line-height: 1; }
.emoji-panel button:hover { background: var(--surface-2); }
.suggestions { margin-top: 1.25rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.suggestions .chip { background: var(--bg); }

/* ---------- Panel właściciela ---------- */
.admin { padding-block: 3rem; }
.tabs { margin: 1.5rem 0; display: flex; gap: .25rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.admin .card { margin-top: 0; margin-bottom: 1.5rem; }
.availability-form { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.availability-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.availability-form legend { float: left; margin-right: 1rem; font-weight: 600; }
.availability-form label { display: flex; align-items: center; gap: .375rem; }
.availability-form .field { flex: 1; min-width: 14rem; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { border: 1px solid var(--border); border-radius: 1.25rem; background: var(--surface); padding: 1.125rem 1.25rem; }
.stat dt { font-size: .875rem; color: var(--muted); }
.stat dd { margin-top: .25rem; font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat p { margin-top: .25rem; font-size: .8125rem; color: var(--muted); }
.chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: .375rem; height: 12rem; align-items: end; }
.chart li { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.chart-bar { width: 100%; max-width: 2.5rem; min-height: 2px; border-radius: .375rem .375rem 0 0; background: var(--accent); }
.chart-value { font-size: .75rem; font-weight: 600; margin-bottom: .25rem; font-variant-numeric: tabular-nums; }
.chart-label { margin-top: .375rem; font-size: .6875rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) { .chart li:nth-child(odd) .chart-label { visibility: hidden; } }
.admin-cols { display: grid; gap: 0 1.5rem; }
@media (min-width: 900px) { .admin-cols { grid-template-columns: 1fr 1fr; } }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th, .table td { padding: .625rem .5rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.table tr:last-child > * { border-bottom: 0; }
.table th[scope="row"] { font-weight: 600; }
.table td { font-variant-numeric: tabular-nums; }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; align-items: center; }
.row-actions .btn { padding: .375rem .875rem; }
.user-list li { display: flex; align-items: center; gap: .625rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.user-list li:last-child { border-bottom: 0; }
.user-list span { font-weight: 600; }
.user-list time { margin-left: auto; font-size: .875rem; }
.review-admin li { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.review-admin li:first-child { padding-top: 0; }
.review-admin li:last-child { border-bottom: 0; padding-bottom: 0; }
.review-admin li > div { flex: 1; min-width: 16rem; display: grid; gap: .5rem; }
.pill { border-radius: 999px; padding: .125rem .625rem; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.pill.is-ok { background: color-mix(in srgb, var(--online) 18%, transparent); color: var(--online); }

@media (prefers-reduced-motion: reduce) {
  .availability span, .toast, .like-btn.pop .icon { animation: none; }
  .project, .project-thumb img { transition: none; }
  .project:hover { transform: none; }
  .project:hover .project-thumb img { transform: none; }
}

/* Wąskie ekrany: nazwa i przyciski w nawigacji w jednej linii. */
.brand, .nav-login, .navbar .btn { white-space: nowrap; }
@media (max-width: 479px) {
  .navbar .container { gap: .5rem; }
  .navbar .btn-primary { display: none; }
}

/* ====================================================================
   Wersja 3: motyw „aurora”
   Animowane tło (assets/js/aurora.js), szklane panele, nowa typografia.
   ==================================================================== */

/* ---------- Tło ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; display: block;
  /* Widoczne, zanim ruszy animacja, i wtedy, gdy przeglądarka nie obsługuje WebGL. */
  background: var(--bg) url(../img/aurora.jpg) center / cover no-repeat;
  filter: grayscale(1);
  transition: opacity .6s;
}
:root:not(.dark) .aurora { background-image: radial-gradient(60% 50% at 50% 35%, #c9c9c9, transparent 70%), radial-gradient(40% 40% at 80% 20%, #e2e2e2, transparent 70%); }
/* Drobny raster, jak na ilustracji. */
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgb(0 0 0 / .55) .55px, transparent .8px); background-size: 3px 3px;
}
:root:not(.dark) .grain { opacity: .12; }
/* Na podstronach tło jest spokojniejsze, żeby nie konkurowało z treścią. */
body:not([data-page="home"]) .aurora { opacity: .55; }

/* ---------- Typografia ---------- */
body { letter-spacing: .005em; }
.page-title, .section-title, .hero-name, .contact h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.035em; }
.section-title { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 500; }
.brand, .skill strong, .project-head h3, .process h3, .skill-group h3, .card h2, .stat dd, .conv-pane h1,
.chat-start strong, .chat-empty strong, .avatar-initial, .process-num { font-family: var(--font-display); letter-spacing: -.02em; }
.brand { font-weight: 600; }

/* ---------- Szkło ---------- */
.card, .hero-chat, .project, .review, .stat, .messages-shell, .toast, .skill, .availability {
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 24px 48px -28px rgb(0 0 0 / .55);
}
.card, .hero-chat, .project, .review, .stat, .messages-shell, .toast {
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
}
.card, .project, .review, .hero-chat { border-radius: var(--radius); }
.stat, .skill { border-radius: 1rem; }
.field { background: var(--surface-2); border-color: var(--border); transition: border-color .15s, box-shadow .15s; }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
select.field option { background: var(--solid); color: var(--text); }
code { background: var(--surface-2); }
.status-dot { border-color: var(--solid); }

/* ---------- Przyciski ---------- */
.btn { padding: .6875rem 1.375rem; letter-spacing: 0; transition: transform .15s, box-shadow .2s, background-color .15s, border-color .15s, filter .15s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary { background: var(--btn); color: var(--btn-fg); box-shadow: 0 10px 30px -10px var(--glow); }
.btn-primary:hover:not(:disabled) { filter: none; box-shadow: 0 14px 36px -8px var(--glow); transform: translateY(-1px); }
.btn-secondary { background: var(--surface-2); border-color: var(--border); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-secondary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge { background: var(--accent); color: var(--accent-fg); }

/* ---------- Nawigacja: pływająca szklana belka ---------- */
.navbar { top: .75rem; height: auto; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding-inline: 1rem; margin-top: .75rem; }
.navbar .container {
  height: 3.5rem; max-width: 70rem; padding-inline: 1.25rem .5rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), 0 16px 40px -20px rgb(0 0 0 / .6);
}
.nav-link:hover, .nav-link[aria-current="true"], .icon-btn:hover, .nav-user:hover, .nav-logout:hover, .nav-login:hover { background: var(--surface-2); }
@media (max-width: 1023px) {
  .nav-sections.is-open {
    top: calc(100% + .5rem); left: 1rem; right: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--solid);
    padding: .5rem; box-shadow: 0 24px 48px -20px rgb(0 0 0 / .6);
  }
}

/* ---------- Hero: wyśrodkowany, nad żywym tłem ---------- */
.hero-wrap::before { display: none; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0; padding-block: clamp(3.5rem, 9vw, 7rem) 4rem; }
.hero::before {
  content: ""; position: absolute; inset: 0 -10% 30%; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 55% at 50% 45%, color-mix(in srgb, var(--bg) 62%, transparent), transparent 75%);
}
.hero-name {
  margin-top: 1.5rem; font-size: clamp(3rem, 10.5vw, 7.25rem); line-height: .98; font-weight: 600;
  background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--accent) 75%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .08em;
}
.hero-role { margin-top: 1.25rem; font-size: clamp(1.125rem, 2.2vw, 1.5rem); font-weight: 400; color: var(--accent); }
.hero-intro { max-width: 36rem; margin-inline: auto; color: color-mix(in srgb, var(--text) 80%, transparent); }
.hero-actions { justify-content: center; }
.availability { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: none; }
.hero-chat { margin: 3.5rem auto 0; max-width: 30rem; text-align: left; }
@media (min-width: 1024px) { .hero-chat { margin-right: auto; } }
.hero-chat-input { background: var(--surface-2); }
.hero-chat-input span { background: var(--btn); color: var(--btn-fg); }
.bubble { background: var(--surface-2); }
.bubble-mine { background: var(--bubble); color: var(--bubble-fg); }

/* ---------- Sekcje ---------- */
.section { border-top: 1px solid var(--border); background: var(--veil); }
.section-alt { background: color-mix(in srgb, var(--veil) 78%, transparent); }
.section > .container { padding-block: clamp(4rem, 8vw, 6.5rem); }
.facts dd, .profile-facts dd { font-family: var(--font-display); font-weight: 500; }
.skill { background: var(--surface-2); box-shadow: none; }
.skill:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.skill strong { font-size: 1.0625rem; font-weight: 500; }
.tags li, .chip { background: var(--surface-2); border: 1px solid var(--border); }
.tags li { padding: .1875rem .6875rem; font-size: .8125rem; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.chip:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

/* Projekty */
.project:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 30px 60px -30px var(--glow); }
.project-thumb { background: none; position: relative; }
/* Miniatura zastępcza: własna czarno-biała „aurora”; jasność plam zależy od nazwy projektu. */
.thumb-art {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 1.25rem 1.5rem; color: #fff;
  background:
    radial-gradient(60% 80% at 20% 15%, rgb(255 255 255 / calc(.32 + (var(--h) - 195) / 260)), transparent 70%),
    radial-gradient(55% 70% at 85% 30%, rgb(255 255 255 / .2), transparent 70%),
    radial-gradient(70% 70% at 55% 110%, rgb(255 255 255 / calc(.38 - (var(--h) - 195) / 300)), transparent 70%),
    #0b0b0b;
}
.show-thumb .thumb-art span { color: #fff; text-shadow: 0 2px 30px rgb(0 0 0 / .5); }
.thumb-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(0 0 0 / .5) .55px, transparent .8px); background-size: 3px 3px; opacity: .55; }
.project-thumb .thumb-art span {
  position: relative; z-index: 1; font-family: var(--font-display); font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 600; letter-spacing: -.03em;
  line-height: 1; color: #fff; white-space: normal; text-shadow: 0 2px 24px rgb(0 0 0 / .35);
}
.project-head h3 { font-weight: 600; }
.like-btn.is-liked { color: var(--like); }

/* Jak pracuję */
.process li { border-top-color: var(--border); }
.process-num { background: var(--btn); color: var(--btn-fg); outline-color: var(--solid); font-weight: 600; box-shadow: 0 0 24px -4px var(--glow); }

/* Opinie */
.stars { color: color-mix(in srgb, var(--muted) 35%, transparent); }
.stars .is-on, .rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--star); }
.rating-input label { color: color-mix(in srgb, var(--muted) 35%, transparent); }
.review blockquote { font-size: 1.0625rem; }

/* Kontakt: szklany panel z poświatą */
.contact { background: var(--veil); color: var(--text); }
.contact > .container { padding-block: clamp(3rem, 6vw, 5rem); }
.contact > .container {
  position: relative; overflow: hidden; margin-block: clamp(3rem, 7vw, 5.5rem); padding-inline: clamp(1.5rem, 5vw, 4rem);
  max-width: 69rem; border: 1px solid var(--border); border-radius: 2rem;
  background:
    radial-gradient(60% 120% at 0% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%),
    radial-gradient(50% 120% at 100% 100%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 40px 80px -40px var(--glow);
}
@media (max-width: 1151px) { .contact > .container { margin-inline: 1rem; } }
.contact h2 { font-weight: 500; font-size: clamp(2rem, 5vw, 3.25rem); }
.contact .btn { background: var(--btn); color: var(--btn-fg); box-shadow: 0 10px 30px -10px var(--glow); }
.contact .btn.btn-outline { background: var(--surface-2); color: var(--text); border-color: var(--border); box-shadow: none; }
.contact .btn.btn-outline:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.footer { background: var(--veil); border-top: 0; }

/* ---------- Logowanie i formularze w szklanej karcie ---------- */
.narrow { max-width: 30rem; }
.narrow > form, .narrow-wide > form { padding: 1.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); box-shadow: 0 24px 48px -28px rgb(0 0 0 / .55); }
.narrow-wide { max-width: 38rem; }
.notice { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-danger { background: var(--danger); box-shadow: none; }

/* ---------- Wiadomości ---------- */
.messages-shell { border-radius: 0; box-shadow: none; }
@media (min-width: 768px) { .messages-shell { border-radius: 1.75rem; box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 40px 80px -40px rgb(0 0 0 / .7); } }
.conv:hover { background: var(--surface-2); }
.conv[aria-current="page"] { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.composer textarea { background: var(--surface-2); }
.emoji-panel, .suggestions .chip { background: var(--surface-2); }
.attachment-preview .icon-btn { background: var(--solid); }
.toast { background: var(--solid); }

/* ---------- Panel właściciela ---------- */
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); }
.stat dd { font-weight: 500; font-size: 2.5rem; }
.chart-bar { background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 35%, transparent)); box-shadow: 0 0 24px -6px var(--glow); border-radius: .5rem .5rem .125rem .125rem; }
.pill { background: var(--surface-2); }
.thumb-preview { border-color: var(--border); }

/* ---------- Wejście elementów przy przewijaniu ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-primary:hover:not(:disabled) { transform: none; }
}
/* Bez przezroczystości tam, gdzie przeglądarka nie umie rozmywać tła. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .hero-chat, .project, .review, .stat, .messages-shell, .navbar .container, .narrow > form { background: var(--solid); }
}

/* Drobne poprawki motywu */
.contact { display: flow-root; }
.contact h2 { flex: 1; max-width: none; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); }
.contact h2 { font-size: clamp(1.875rem, 4vw, 2.75rem); }

/* ====================================================================
   Wersja 4: nowa strona główna
   Góra strony z dużym nagłówkiem, pasek technologii, kafelki, wizytówki
   projektów, mocne zakończenie.
   ==================================================================== */

.btn-lg { padding: .875rem 1.75rem; font-size: 1rem; }

/* ---------- Kafelek: wspólna baza wszystkich paneli na stronie głównej ---------- */
.tile {
  position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 1.75rem; padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), 0 30px 60px -34px rgb(0 0 0 / .6);
  transition: border-color .3s, opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}
/* Poświata w miejscu kursora (pozycję ustawia app.js). */
.tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%);
}
.tile:hover { border-color: color-mix(in srgb, var(--accent) 42%, transparent); }
.tile:hover::before { opacity: 1; }
.tile > * { position: relative; }
.tile h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; }

/* ---------- Góra strony ---------- */
.h-hero {
  display: grid; gap: 3rem; align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
  min-height: calc(100svh - var(--nav-h) - 4.5rem);
}
@media (min-width: 1024px) { .h-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 4rem; } }
.h-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.h-who { font-family: var(--font-display); font-size: .9375rem; font-weight: 500; color: var(--accent); }
.h-title {
  margin-top: 1.75rem; font-family: var(--font-display); font-weight: 500; font-size: clamp(2.5rem, 5.4vw, 4.75rem);
  line-height: 1.04; letter-spacing: -.045em; text-wrap: balance;
  background: linear-gradient(175deg, var(--text) 40%, color-mix(in srgb, var(--accent) 80%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .1em;
}
.h-lead { margin-top: 1.5rem; max-width: 34rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.65; color: color-mix(in srgb, var(--text) 78%, transparent); }
.h-hero .hero-actions { margin-top: 2.25rem; justify-content: flex-start; }
.h-hero-chat { margin: 0 auto; max-width: 26rem; width: 100%; border-radius: 1.75rem; box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 50px 90px -40px var(--glow), 0 30px 60px -30px rgb(0 0 0 / .7); }
@media (min-width: 1024px) { .h-hero-chat { margin: 0 0 0 auto; } }

/* ---------- Pasek technologii ---------- */
.marquee {
  display: flex; overflow: hidden; border-block: 1px solid var(--border); padding-block: 1.125rem; user-select: none;
  background: color-mix(in srgb, var(--bg) 35%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; flex: none; align-items: center; gap: 3.5rem; padding-right: 3.5rem; min-width: 100%; justify-content: space-around; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li { font-family: var(--font-display); font-size: 1.125rem; font-weight: 500; letter-spacing: -.01em; color: color-mix(in srgb, var(--text) 62%, transparent); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Sekcje ---------- */
/* Zasłona wygasza tło pod treścią i znika przed zakończeniem strony. */
.home-veil { background: linear-gradient(to bottom, transparent, var(--veil) 14rem, var(--veil) calc(100% - 16rem), transparent); padding-bottom: 4rem; }
.h-section { padding-top: clamp(5rem, 10vw, 8.5rem); }
.h-heading { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.05; letter-spacing: -.04em; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.h-heading-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.h-heading-row .h-heading { margin-bottom: 0; }
.h-heading-row .filters { margin-top: 0; }

/* O mnie: siatka kafelków */
.bento { display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tile-about { grid-column: span 7; grid-row: span 2; }
  .tile-id, .tile-facts { grid-column: span 5; }
}
.tile-about { display: flex; flex-direction: column; justify-content: center; gap: 1.125rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.65; }
.tile-about p:first-child { font-family: var(--font-display); font-size: 1.2em; line-height: 1.45; letter-spacing: -.02em; color: var(--text); }
.tile-about p { color: color-mix(in srgb, var(--text) 78%, transparent); }
.tile-id { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.tile-id > div { flex: 1; min-width: 9rem; }
.tile-id h3 { font-size: 1.5rem; }
.tile-id .avatar-lg img, .tile-id .avatar-lg .avatar-initial { width: 5rem; height: 5rem; font-size: 1.75rem; }
.tile-id .status-dot { width: 1rem; height: 1rem; right: .125rem; bottom: .125rem; }
.tile-facts { display: grid; gap: 0; margin: 0; padding-block: .75rem; }
.tile-facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--border); }
.tile-facts div:last-child { border-bottom: 0; }
.tile-facts dt { color: var(--muted); }
.tile-facts dd { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; text-align: right; }

/* Umiejętności */
.stack { display: grid; gap: 1rem; }
@media (min-width: 900px) { .stack { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stack h3 { font-size: 1.375rem; margin-bottom: .75rem; color: var(--accent); }
.stack-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: .8125rem; border-bottom: 1px solid var(--border); }
.stack-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.stack-list strong { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; }
.stack-list span { font-size: .875rem; color: var(--muted); text-align: right; }

/* Projekty: duże wizytówki, na przemian zdjęcie z lewej i z prawej */
.showcase { display: grid; gap: 1.25rem; }
.show { display: grid; padding: 0; }
.show-thumb { position: relative; min-height: 15rem; overflow: hidden; }
.show-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.show:hover .show-thumb img { transform: scale(1.04); }
.show-thumb .thumb-art span { font-size: clamp(2rem, 4vw, 3.25rem); }
.show-body { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.5rem, 3.5vw, 3rem); }
.show-body time { font-size: .875rem; color: var(--accent); }
.show-body h3 { margin-top: .5rem; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -.035em; }
.show-body > p { margin-top: 1rem; max-width: 34rem; font-size: 1.0625rem; line-height: 1.65; color: color-mix(in srgb, var(--text) 75%, transparent); }
.show-body .tags { margin-top: 1.25rem; }
.show-links { margin-top: auto; padding-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; width: 100%; }
@media (min-width: 900px) {
  .show { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 24rem; }
  #projects > li:nth-child(even) .show-thumb { order: 2; }
}

/* Jak pracuję */
.steps { display: grid; gap: 1rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step-num { display: block; font-family: var(--font-display); font-size: 3.5rem; font-weight: 600; line-height: 1; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 70%, transparent); }
.step h3 { margin-top: 1.75rem; font-size: 1.375rem; }
.step p { margin-top: .5rem; line-height: 1.6; color: var(--muted); }

/* Opinie: rząd przewijany w bok */
.quotes { display: grid; grid-auto-flow: column; grid-auto-columns: min(26rem, 86vw); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .75rem; scrollbar-width: thin; }
.quote { display: flex; flex-direction: column; gap: 1.25rem; scroll-snap-align: start; }
.quote blockquote { margin: 0; flex: 1; font-family: var(--font-display); font-size: 1.1875rem; line-height: 1.5; letter-spacing: -.015em; }

/* Zakończenie */
.h-cta { position: relative; text-align: center; padding-block: clamp(5rem, 12vw, 10rem); }
.h-cta::before {
  content: ""; position: absolute; inset: 10% 5%; z-index: -1; pointer-events: none;
  background: radial-gradient(45% 55% at 50% 50%, color-mix(in srgb, var(--bg) 55%, transparent), transparent 75%);
}
.h-cta h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.5rem, 7.2vw, 6rem); line-height: 1; letter-spacing: -.05em; text-wrap: balance; }
.h-cta h2 span { display: block; color: var(--accent); }
.h-cta p { margin: 1.75rem auto 0; max-width: 30rem; font-size: 1.125rem; color: color-mix(in srgb, var(--text) 78%, transparent); }
.h-cta-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

.h-footer { border-top: 1px solid var(--border); background: var(--veil); }
.h-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; padding-block: 2.25rem; font-size: .9375rem; color: var(--muted); }
.h-footer strong { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: var(--text); }
.h-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.h-footer nav a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
  .marquee-track[aria-hidden="true"] { display: none; }
  .show:hover .show-thumb img { transform: none; }
}

/* Góra strony: proporcje kolumn i czytelność tekstu nad jasnym fragmentem tła. */
.h-title { font-size: clamp(2.5rem, 5vw, 4.125rem); }
@media (min-width: 1024px) { .h-hero { grid-template-columns: minmax(0, 1fr) 26rem; } }
.h-hero { position: relative; }
.h-hero::before {
  content: ""; position: absolute; inset: 0 30% 0 -15%; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 60% at 40% 50%, color-mix(in srgb, var(--bg) 60%, transparent), transparent 78%);
}

/* ====================================================================
   Wersja 5: przyciski „liquid”
   Szkło jak kropla cieczy: delikatne wypełnienie, wewnętrzne cienie dające
   wypukłość i cienka obwódka, która łapie światło u góry i u dołu.
   Wartości wypełnienia i obwódki są zmiennymi, więc najechanie myszką
   płynnie je rozjaśnia.
   ==================================================================== */

@property --liquid-fill-strong { syntax: "<number>"; inherits: true; initial-value: .075; }
@property --liquid-fill-soft { syntax: "<number>"; inherits: true; initial-value: .04; }
@property --liquid-edge-top { syntax: "<number>"; inherits: true; initial-value: .34; }
@property --liquid-edge-bottom { syntax: "<number>"; inherits: true; initial-value: .27; }

:root {
  --accent-rgb: 10 10 10;
  --liquid-color: 255 255 255;
  --liquid-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 10px 24px -8px rgb(0 0 0 / .2), 0 0 0 1px rgb(0 0 0 / .07);
  --btn: radial-gradient(ellipse 80% 140% at 50% 0%, #444444, #0a0a0a);
  --btn-inset: inset 0 2px 3px rgb(255 255 255 / .28), inset 0 -3px 8px rgb(0 0 0 / .45);
}
.dark {
  --accent-rgb: 255 255 255;
  --liquid-shadow: 0 2px 8px rgb(255 255 255 / .025), 0 10px 24px rgb(0 0 0 / .22);
  --btn: radial-gradient(ellipse 80% 140% at 50% 0%, #ffffff, #c8c8c8);
  --btn-inset: inset 0 2px 3px #fff, inset 0 -3px 9px rgb(0 0 0 / .22);
}

/* ---------- Baza: przezroczysta kropla ---------- */
.btn:not(.btn-ghost), .chip, .like-btn, .availability, .hero-chat-input {
  --liquid-fill-strong: .075; --liquid-fill-soft: .04; --liquid-edge-top: .34; --liquid-edge-bottom: .27;
  position: relative; isolation: isolate; border: 1px solid transparent;
  background: radial-gradient(ellipse 58% 115% at 50% 50%, rgb(var(--liquid-color) / var(--liquid-fill-strong)), rgb(var(--liquid-color) / var(--liquid-fill-soft)));
  box-shadow: var(--liquid-shadow),
    inset 0 -2px 8px rgb(var(--liquid-color) / .1), inset 0 2px 8px rgb(var(--liquid-color) / .045),
    inset 0 1px 1px rgb(var(--liquid-color) / .075), inset 0 -1px 1px rgb(var(--liquid-color) / .06);
  -webkit-backdrop-filter: blur(6px) saturate(1.4); backdrop-filter: blur(6px) saturate(1.4);
  transition-property: color, box-shadow, opacity, transform, filter, --liquid-fill-strong, --liquid-fill-soft, --liquid-edge-top, --liquid-edge-bottom;
  transition-duration: .26s; transition-timing-function: cubic-bezier(.22, 1, .36, 1);
}
:root:not(.dark) :is(.btn:not(.btn-ghost), .chip, .like-btn, .availability, .hero-chat-input) {
  --liquid-fill-strong: .78; --liquid-fill-soft: .5; --liquid-edge-top: .95; --liquid-edge-bottom: .7;
}

/* Obwódka: dwie warstwy przycięte maską do samej krawędzi. */
:is(.btn:not(.btn-ghost), .chip, .like-btn, .availability, .hero-chat-input)::before,
:is(.btn:not(.btn-ghost), .chip, .like-btn, .availability, .hero-chat-input)::after {
  content: ""; position: absolute; inset: -1px; z-index: -1; padding: 1px; border-radius: inherit; pointer-events: none;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box exclude, linear-gradient(#fff 0 0);
}
:is(.btn:not(.btn-ghost), .chip, .like-btn, .availability, .hero-chat-input)::before {
  background: radial-gradient(circle at 70% 0%, rgb(var(--liquid-color) / var(--liquid-edge-top)), transparent 42%);
}
:is(.btn:not(.btn-ghost), .chip, .like-btn, .availability, .hero-chat-input)::after {
  background: radial-gradient(circle at 30% 100%, rgb(var(--liquid-color) / var(--liquid-edge-bottom)), transparent 42%);
}

/* Najechanie i wciśnięcie */
:is(.btn-secondary, .chip, .like-btn, .hero-chat-input):hover:not(:disabled) {
  --liquid-fill-strong: .13; --liquid-fill-soft: .075; --liquid-edge-top: .5; --liquid-edge-bottom: .4;
  background: radial-gradient(ellipse 58% 115% at 50% 50%, rgb(var(--liquid-color) / var(--liquid-fill-strong)), rgb(var(--liquid-color) / var(--liquid-fill-soft)));
  border-color: transparent;
}
:root:not(.dark) :is(.btn-secondary, .chip, .like-btn, .hero-chat-input):hover:not(:disabled) {
  --liquid-fill-strong: .95; --liquid-fill-soft: .72; --liquid-edge-top: 1; --liquid-edge-bottom: .85;
}
:is(.btn:not(.btn-ghost), .chip, .like-btn):active:not(:disabled) { transition-duration: 90ms; transform: scale(.97); --liquid-edge-top: .72; }

/* ---------- Główny przycisk: kropla wypełniona światłem ---------- */
.btn.btn-primary {
  background: var(--btn); color: var(--btn-fg);
  box-shadow: 0 12px 32px -10px var(--glow), 0 2px 6px rgb(0 0 0 / .25), var(--btn-inset);
  --liquid-edge-top: .95; --liquid-edge-bottom: .55;
}
.btn.btn-primary::after { background: radial-gradient(circle at 30% 100%, rgb(var(--accent-rgb) / var(--liquid-edge-bottom)), transparent 48%); }
.btn.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px); filter: brightness(1.04);
  box-shadow: 0 18px 40px -10px var(--glow), 0 2px 6px rgb(0 0 0 / .25), var(--btn-inset);
}
.btn.btn-primary:active:not(:disabled) { transform: scale(.97); }

/* ---------- Odmiany barwione ---------- */
/* Wybrany filtr: kropla w kolorze akcentu. */
.chip.is-active, .chip.is-active:hover:not(:disabled) {
  --liquid-color: var(--accent-rgb); --liquid-fill-strong: .95; --liquid-fill-soft: .82; --liquid-edge-top: .9; --liquid-edge-bottom: .6;
  background: radial-gradient(ellipse 58% 115% at 50% 50%, rgb(var(--liquid-color) / var(--liquid-fill-strong)), rgb(var(--liquid-color) / var(--liquid-fill-soft)));
  color: var(--accent-fg); border-color: transparent;
}
.like-btn { padding: .5rem .875rem; color: var(--muted); }
.like-btn.is-liked, .like-btn.is-liked:hover:not(:disabled) { --liquid-color: var(--like-rgb); --liquid-fill-strong: .26; --liquid-fill-soft: .12; --liquid-edge-top: .8; --liquid-edge-bottom: .5; color: var(--like); }
.btn.btn-danger { --liquid-color: 255 110 130; --liquid-fill-strong: .42; --liquid-fill-soft: .24; --liquid-edge-top: .85; --liquid-edge-bottom: .55; color: #fff; }
.dark .btn-danger { color: #fff; }
.btn.btn-danger:hover:not(:disabled) { --liquid-fill-strong: .55; --liquid-fill-soft: .34; filter: none; }
.availability { box-shadow: var(--liquid-shadow), inset 0 1px 1px rgb(var(--liquid-color) / .075); }
.hero-chat-input span { box-shadow: var(--btn-inset); }

@media (prefers-reduced-motion: reduce) {
  :is(.btn, .chip, .like-btn):active:not(:disabled), .btn-primary:hover:not(:disabled) { transform: none; }
}

/* ====================================================================
   Wersja 6: animacje (assets/js/motion.js)
   Wszystko poniżej działa tylko przy klasie „motion” na <html>, którą
   theme.js ustawia, gdy system nie prosi o ograniczenie ruchu.
   Pozycję i przechylenie ustawiamy osobnymi właściwościami (translate,
   scale, transform), dzięki czemu efekty się nie nadpisują.
   ==================================================================== */

:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in-out: cubic-bezier(.76, 0, .24, 1); }

/* ---------- Przejścia między podstronami (Chrome, Edge, Safari 18+) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out .38s cubic-bezier(.4, 0, .2, 1) both; }
  ::view-transition-new(root) { animation: vt-in .65s var(--ease-out) both; }
}
@keyframes vt-out { to { opacity: 0; scale: .985; filter: blur(8px); } }
@keyframes vt-in { from { opacity: 0; scale: 1.015; } }

/* ---------- Ekran powitalny ---------- */
.intro-screen {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 50%, color-mix(in srgb, var(--accent) 9%, var(--bg)), var(--bg));
  color: var(--text); clip-path: inset(0 0 0 0); transition: clip-path 1s var(--ease-in-out);
  animation: intro-safety .6s 5s forwards;
}
html:not(.intro) .intro-screen:not(.is-done) { display: none; }
.intro-screen.is-done { clip-path: inset(0 0 100% 0); }
.intro-inner { text-align: center; padding-inline: 1.5rem; transition: opacity .5s, translate .9s var(--ease-in-out); }
.intro-screen.is-done .intro-inner { opacity: 0; translate: 0 -70px; }
.intro-name { margin: 0; overflow: hidden; padding-bottom: .1em; font-family: var(--font-display); font-weight: 500; font-size: clamp(2.75rem, 9vw, 7.5rem); line-height: 1; letter-spacing: -.055em; }
.intro-name span { display: inline-block; translate: 0 115%; animation: rise-in 1.1s var(--ease-out) calc(.15s + var(--i) * 45ms) forwards; }
.intro-role { margin: 1.25rem 0 0; font-family: var(--font-display); font-size: .8125rem; letter-spacing: .32em; text-transform: uppercase; color: var(--accent); opacity: 0; animation: fade-in .9s .75s forwards; }
.intro-foot {
  position: absolute; left: clamp(1.25rem, 4vw, 3rem); right: clamp(1.25rem, 4vw, 3rem); bottom: clamp(1.5rem, 4vw, 2.75rem);
  display: flex; align-items: flex-end; justify-content: space-between; font-size: .75rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  transition: opacity .4s;
}
.intro-screen.is-done .intro-foot { opacity: 0; }
.intro-count { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 6.5rem); line-height: .8; letter-spacing: -.05em; color: var(--text); font-variant-numeric: tabular-nums; }
.intro-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--border); }
.intro-bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 24px var(--glow); }
@keyframes rise-in { to { translate: 0 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes intro-safety { to { opacity: 0; visibility: hidden; } }

/* ---------- Pasek postępu przewijania ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 90; height: 2px; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, transparent, var(--accent)); box-shadow: 0 0 12px var(--glow); }
html:not(.motion) .scroll-progress { display: none; }

/* ---------- Nawigacja ---------- */
html.motion .navbar { transition: translate .7s var(--ease-out); }
html.motion .navbar.is-hidden { translate: 0 calc(-100% - 1.5rem); }
html.motion .navbar .container { transition: max-width .7s var(--ease-out), box-shadow .5s; animation: nav-in 1.1s var(--ease-out) .15s both; }
html.motion .navbar.is-scrolled .container { max-width: 64rem; box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 24px 50px -20px rgb(0 0 0 / .75); }
html.intro .navbar .container { animation-play-state: paused; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-28px) scale(.96); } }

/* Tekst, który przy najechaniu przewija się w górę. */
.roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.3; }
.roll > span, .roll::after { display: block; transition: translate .55s var(--ease-in-out); }
.roll::after { content: attr(data-text); position: absolute; left: 0; top: 100%; width: 100%; }
:is(a, button):hover > .roll > span, :is(a, button):hover > .roll::after { translate: 0 -100%; }

/* ---------- Własny kursor ---------- */
/* Kropka i cienki pierścień w kolorze tekstu. Bez mieszania kolorów, żeby nad zdjęciami
   i filmami nie powstawały kolorowe plamy. */
.cursor { display: none; }
html.has-cursor .cursor { display: block; position: fixed; inset: 0 auto auto 0; z-index: 400; pointer-events: none; opacity: 0; transition: opacity .3s; }
html.has-cursor .cursor.is-visible { opacity: 1; }
html.has-cursor .cursor.is-text { opacity: 0; }
html.has-cursor .cursor.is-hidden { opacity: 0; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; border-radius: 50%; }
.cursor-dot {
  width: 6px; height: 6px; background: var(--text); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--bg) 60%, transparent);
  transform: translate(var(--x), var(--y)) translate(-50%, -50%); transition: width .3s var(--ease-out), height .3s var(--ease-out), opacity .3s;
}
.cursor-ring {
  display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid color-mix(in srgb, var(--text) 55%, transparent);
  transform: translate(var(--rx), var(--ry)) translate(-50%, -50%);
  transition: width .45s var(--ease-out), height .45s var(--ease-out), background-color .3s, border-color .3s;
}
/* Nad linkiem i przyciskiem: większy pierścień z lekkim wypełnieniem. */
.cursor.is-link .cursor-ring { width: 54px; height: 54px; border-color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.cursor.is-link .cursor-dot { opacity: 0; }
/* Nad dużą kartą lub miniaturą: duży, cienki pierścień — nie zasłania tego, co pod spodem. */
.cursor.is-lg .cursor-ring { width: 80px; height: 80px; border-color: color-mix(in srgb, var(--text) 40%, transparent); }
.cursor.is-down .cursor-ring { width: 26px; height: 26px; }
/* Z napisem (np. „Przeciągnij” nad opiniami). */
.cursor.is-label .cursor-ring { width: 88px; height: 88px; background: var(--text); border-color: transparent; }
.cursor.is-label .cursor-dot { opacity: 0; }
.cursor-label { font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--bg); opacity: 0; scale: .6; transition: opacity .25s, scale .4s var(--ease-out); }
.cursor.is-label .cursor-label { opacity: 1; scale: 1; }
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor :is(input, textarea, [contenteditable]) { cursor: text !important; }
html.has-cursor :is(select, input[type="file"], input[type="checkbox"], input[type="radio"]) { cursor: pointer !important; }

/* ---------- Magnes i przechylanie 3D ---------- */
html.motion .magnetic {
  transition-property: color, background-color, border-color, box-shadow, opacity, transform, filter, translate, --liquid-fill-strong, --liquid-fill-soft, --liquid-edge-top, --liquid-edge-bottom;
  transition-duration: .26s, .26s, .26s, .26s, .26s, .26s, .26s, .7s, .26s, .26s, .26s, .26s;
  transition-timing-function: var(--ease-out);
}
html.motion .tilt { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
html.motion .home .tile {
  transition: border-color .3s, box-shadow .4s, transform .8s var(--ease-out),
    opacity 1s var(--ease-out) var(--d, 0ms), translate 1.2s var(--ease-out) var(--d, 0ms), scale 1.2s var(--ease-out) var(--d, 0ms);
}
html.motion .tilt.is-tilting { transition-duration: .3s, .4s, .2s, 1s, 1.2s, 1.2s; }
html.motion .h-hero-chat.tilt.is-tilting { transition: opacity 1.1s var(--ease-out), scale 1.4s var(--ease-out), filter 1.1s, transform .2s; }

/* ---------- Wejście elementów przy przewijaniu ---------- */
html.motion .rv { transition: opacity 1s var(--ease-out) var(--d, 0ms), translate 1.2s var(--ease-out) var(--d, 0ms), scale 1.2s var(--ease-out) var(--d, 0ms); }
html.motion .rv-up:not(.is-in) { opacity: 0; translate: 0 52px; }
html.motion .rv-fade:not(.is-in) { opacity: 0; }
html.motion .rv-card:not(.is-in) { opacity: 0; translate: 0 90px; scale: .95; }

/* Słowa wysuwają się spod maski. */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.split .w-in { display: inline-block; translate: 0 108%; rotate: 5deg; transform-origin: 0 100%; transition: translate 1.15s var(--ease-out), rotate 1.15s var(--ease-out); transition-delay: calc(var(--wd, 0ms) + var(--i) * 42ms); }
.split.is-in .w-in, .hero-in .h-title .w-in { translate: 0 0; rotate: 0deg; }

/* Kafelki: wiersze list wchodzą kolejno po kafelku. */
html.motion .tile.rv :is(.stack-list li, .tile-facts > div) {
  transition: opacity .8s var(--ease-out), translate .9s var(--ease-out);
  transition-delay: calc(var(--d, 0ms) + 280ms + var(--j, 0) * 70ms);
}
html.motion .tile.rv:not(.is-in) :is(.stack-list li, .tile-facts > div) { opacity: 0; translate: -18px 0; }

/* Numer sekcji nad nagłówkiem. */
.home-veil { counter-reset: section; }
.home-veil .h-section { counter-increment: section; }
.home-veil .h-heading::before {
  content: "(" counter(section, decimal-leading-zero) ")"; display: block; margin-bottom: 1rem;
  font-family: var(--font-sans); font-size: .8125rem; font-weight: 500; letter-spacing: .2em; color: var(--accent);
}
html.motion .h-heading.rv::before { transition: opacity .8s var(--ease-out) .1s, translate .9s var(--ease-out) .1s; }
html.motion .h-heading.rv:not(.is-in)::before { opacity: 0; translate: -14px 0; }

/* ---------- Góra strony ---------- */
html.motion .h-hero :is(.h-hero-meta, .h-lead, .hero-actions, .scroll-hint) {
  opacity: 0; translate: 0 28px; transition: opacity 1s var(--ease-out) var(--hd, 0s), translate 1.2s var(--ease-out) var(--hd, 0s);
}
html.motion .h-hero .h-title { opacity: 0; }
html.motion .h-hero .h-hero-chat { opacity: 0; scale: .9; filter: blur(14px); transition: opacity 1.1s var(--ease-out) .55s, scale 1.4s var(--ease-out) .55s, filter 1.1s var(--ease-out) .55s, transform .8s var(--ease-out); }
html.motion .h-hero.hero-in :is(.h-hero-meta, .h-lead, .hero-actions, .scroll-hint) { opacity: 1; translate: 0 0; }
html.motion .h-hero.hero-in .h-title { opacity: 1; --wd: 120ms; }
html.motion .h-hero.hero-in .h-hero-chat { opacity: 1; scale: 1; filter: none; }
html.motion .h-lead { --hd: .7s; }
html.motion .h-hero .hero-actions { --hd: .85s; }
html.motion .scroll-hint { --hd: 1.5s; }
/* Wiadomości w okienku czekają, aż okienko się pokaże. */
html.motion .h-hero:not(.hero-in) .hero-chat .bubble { animation-play-state: paused; }
/* Gdyby skrypt się nie wczytał, treść i tak pojawi się po chwili. */
html.motion .h-hero:not(.hero-in) :is(.h-hero-meta, .h-title, .h-lead, .hero-actions, .scroll-hint, .h-hero-chat) { animation: motion-safety .6s 5s forwards; }
@keyframes motion-safety { to { opacity: 1; translate: none; scale: none; filter: none; } }

/* Nagłówek: ostatnie słowa w kolorze akcentu z przesuwającym się połyskiem. */
.h-title.split { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text); }
.h-title.split .w:nth-last-of-type(-n+3) .w-in, .h-cta h2.split > span:not(.w) .w-in {
  background: linear-gradient(100deg, color-mix(in srgb, var(--text) 42%, transparent) 30%, var(--text) 48%, var(--text) 52%, color-mix(in srgb, var(--text) 42%, transparent) 70%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* Wskazówka „przewiń” na dole pierwszego ekranu. */
.scroll-hint {
  display: none; position: absolute; left: 0; right: 0; bottom: 1.25rem; width: max-content; margin-inline: auto;
  flex-direction: column; align-items: center; gap: .75rem; font-size: .6875rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--muted);
}
.scroll-hint:hover { color: var(--text); }
.scroll-hint i { position: relative; display: block; width: 1px; height: 3.25rem; overflow: hidden; background: color-mix(in srgb, var(--muted) 30%, transparent); }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 45%; background: var(--text); animation: scroll-line 2.2s var(--ease-in-out) infinite; }
@keyframes scroll-line { from { translate: 0 -100%; } to { translate: 0 230%; } }
@media (min-width: 1024px) and (min-height: 720px) { .scroll-hint { display: flex; } }

/* ---------- Pasek technologii ---------- */
.marquee-track { gap: 0; padding-right: 0; }
.marquee-track li { display: flex; align-items: center; gap: 2.25rem; padding-right: 2.25rem; transform: skewX(var(--skew, 0deg)); }
.marquee-track li::after { content: "✦"; font-size: .75rem; color: var(--accent); opacity: .7; }

/* ---------- Projekty ---------- */
/* Zdjęcie odsłania się z wnętrza ramki, a potem płynie w niej przy przewijaniu. */
html.motion .show.rv .show-thumb { clip-path: inset(10% 10% 10% 10% round 1.5rem); transition: clip-path 1.5s var(--ease-out) calc(var(--d, 0ms) + 120ms); }
html.motion .show.rv.is-in .show-thumb { clip-path: inset(0 0 0 0 round 0); }
html.motion .show.rv .show-thumb :is(img, .thumb-art) { scale: 1.3; transition: scale 1.8s var(--ease-out) calc(var(--d, 0ms) + 120ms), transform .6s var(--ease-out); }
html.motion .show.rv.is-in .show-thumb :is(img, .thumb-art) { scale: 1; }
html.motion .show-thumb img { inset: -8% 0; height: 116%; translate: 0 var(--py, 0); }
/* Miniatury zastępcze: barwne plamy powoli dryfują. */
html.motion .thumb-art { background-size: 170% 170%, 170% 170%, 170% 170%, auto; animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift {
  from { background-position: 0% 0%, 100% 0%, 50% 100%, 0 0; }
  to { background-position: 45% 35%, 55% 45%, 15% 65%, 0 0; }
}
/* Treść karty wchodzi po zdjęciu. */
html.motion .show.rv .show-body > * { transition: opacity .9s var(--ease-out), translate 1s var(--ease-out); }
html.motion .show.rv .show-body > :nth-child(1) { transition-delay: calc(var(--d, 0ms) + 350ms); }
html.motion .show.rv .show-body > :nth-child(2) { transition-delay: calc(var(--d, 0ms) + 420ms); }
html.motion .show.rv .show-body > :nth-child(3) { transition-delay: calc(var(--d, 0ms) + 490ms); }
html.motion .show.rv .show-body > :nth-child(4) { transition-delay: calc(var(--d, 0ms) + 560ms); }
html.motion .show.rv .show-body > :nth-child(5) { transition-delay: calc(var(--d, 0ms) + 630ms); }
html.motion .show.rv:not(.is-in) .show-body > * { opacity: 0; translate: 0 22px; }

/* Polubienie: drobinki rozlatują się od serca. */
.burst {
  position: absolute; z-index: 2; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: var(--like); pointer-events: none; animation: burst .75s var(--ease-out) forwards;
}
.burst:nth-child(odd) { background: color-mix(in srgb, var(--like) 55%, #fff); }
@keyframes burst {
  from { transform: translate(0, 0) scale(var(--s, 1)); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* ---------- Jak pracuję: linia postępu i zapalające się kroki ---------- */
html.motion .steps { position: relative; }
@media (min-width: 1100px) {
  html.motion .steps { padding-top: 2.75rem; }
  html.motion .steps::before, html.motion .steps::after { content: ""; position: absolute; top: .75rem; left: 0; right: 0; height: 2px; border-radius: 2px; }
  html.motion .steps::before { background: var(--border); }
  html.motion .steps::after { background: linear-gradient(90deg, transparent, var(--accent)); transform: scaleX(var(--p, 0)); transform-origin: left; box-shadow: 0 0 18px var(--glow); }
  html.motion .step::after {
    content: ""; position: absolute; top: calc(-2rem - 4px); left: clamp(1.5rem, 3vw, 2.25rem); width: 10px; height: 10px; border-radius: 50%;
    background: var(--solid); border: 2px solid var(--border); transition: background-color .5s, border-color .5s, box-shadow .5s;
  }
  html.motion .step { overflow: visible; }
  html.motion .step::before { border-radius: inherit; }
  html.motion .step.is-lit::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent), 0 0 20px var(--glow); }
}
.step-num { transition: color .6s, -webkit-text-stroke-color .6s, text-shadow .6s; }
html.motion .step.is-lit .step-num { color: var(--accent); -webkit-text-stroke-color: var(--accent); text-shadow: 0 0 34px var(--glow); }

/* ---------- Opinie: przeciąganie ---------- */
.quotes.is-dragging { scroll-snap-type: none; user-select: none; }
.quotes.is-dragging .quote { pointer-events: none; }

/* ---------- Pozostałe podstrony: łagodne wejście treści ---------- */
@keyframes rise { from { opacity: 0; translate: 0 34px; } }
html.motion body:not([data-page="home"]) :is(.card, .narrow > form, .narrow-wide > form, .messages-shell, .stat, .center-page > div > :not(h1), .tabs) {
  animation: rise 1s var(--ease-out) both;
}
html.motion body:not([data-page="home"]) .card:nth-of-type(2), html.motion .stat:nth-child(2) { animation-delay: .08s; }
html.motion body:not([data-page="home"]) .card:nth-of-type(3), html.motion .stat:nth-child(3) { animation-delay: .16s; }
html.motion body:not([data-page="home"]) .card:nth-of-type(n+4), html.motion .stat:nth-child(n+4) { animation-delay: .24s; }

/* Polubiony projekt: czerwone, wypełnione serce. */
.like-btn .icon { transition: fill .25s, color .25s; }
.like-btn.is-liked .icon { fill: currentColor; }
.like-btn.is-liked { box-shadow: var(--liquid-shadow), 0 8px 24px -10px rgb(var(--like-rgb) / .55), inset 0 1px 1px rgb(var(--like-rgb) / .2); }
:root:not(.dark) .like-btn.is-liked, :root:not(.dark) .like-btn.is-liked:hover:not(:disabled) { --liquid-fill-strong: .14; --liquid-fill-soft: .07; --liquid-edge-top: .7; --liquid-edge-bottom: .45; }

/* ====================================================================
   Wersja 7: podgląd filmu z YouTube i link „Zobacz stronę”
   ==================================================================== */

/* Cała miniatura jest klikalna (film albo strona). */
.thumb-action { position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; overflow: hidden; cursor: pointer; }
.thumb-action:focus-visible { outline: 2px solid var(--text); outline-offset: -4px; }
.show-thumb.has-video img { filter: grayscale(.15) brightness(.82); transition: transform .6s var(--ease-out, ease), filter .5s; }
.show:hover .show-thumb.has-video img { filter: none; }

/* Przycisk odtwarzania na środku miniatury: szklane kółko z pulsującym pierścieniem,
   po najechaniu wypełnia się bielą. */
.thumb-play {
  position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem;
  border-radius: 50%; color: #fff; background: rgb(10 10 10 / .38); border: 1px solid rgb(255 255 255 / .55);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 20px 44px -14px rgb(0 0 0 / .75), inset 0 1px 0 rgb(255 255 255 / .25);
  transition: transform .5s var(--ease-out, ease), background-color .3s, color .3s, border-color .3s;
}
.thumb-play .icon { display: block; width: 1.5rem; height: 1.5rem; }
.thumb-play::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .6); animation: play-ring 2.4s var(--ease-out, ease) infinite; pointer-events: none; }
.thumb-action:hover .thumb-play, .thumb-action:focus-visible .thumb-play { transform: scale(1.08); background: #fff; color: #0a0a0a; border-color: #fff; }
@keyframes play-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
.thumb-badge {
  position: absolute; left: 1.25rem; top: 1.25rem; z-index: 2; padding: .3rem .7rem; border-radius: 999px;
  font-size: .6875rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #fff;
  background: rgb(0 0 0 / .45); border: 1px solid rgb(255 255 255 / .2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.show-links { gap: .625rem; }
.show-links .btn { padding: .625rem 1.125rem; font-size: .875rem; gap: .5rem; }
.show-links .btn .icon { width: 1rem; height: 1rem; }

/* Okienko z filmem */
.video-modal {
  width: min(64rem, calc(100vw - 2rem)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--border); border-radius: 1.25rem;
  background: #000; color: #fff; overflow: visible;
  opacity: 0; scale: .94; translate: 0 16px; transition: opacity .3s var(--ease-out, ease), scale .5s var(--ease-out, ease), translate .5s var(--ease-out, ease);
  box-shadow: 0 50px 120px -30px rgb(0 0 0 / .9);
}
.video-modal.is-open { opacity: 1; scale: 1; translate: 0 0; }
.video-modal::backdrop { background: rgb(0 0 0 / .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.video-frame { aspect-ratio: 16 / 9; border-radius: inherit; overflow: hidden; }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-close { position: absolute; top: -3.25rem; right: 0; width: 2.75rem; height: 2.75rem; border-radius: 50%; color: #fff; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .2); }
.video-close:hover { background: rgb(255 255 255 / .22); color: #fff; }
@media (max-width: 640px) { .video-close { top: -3rem; } }

@media (prefers-reduced-motion: reduce) {
  .thumb-play::before { animation: none; }
  .video-modal { transition: none; }
}

/* Na miniaturze z filmem lub stroną: zwykła rączka zamiast własnego kursora. */
html.has-cursor [data-cursor-hide], html.has-cursor [data-cursor-hide] * { cursor: pointer !important; }
