/* =====================================================
   marekuczy.pl — public site
   Bruno Imbrizi-inspired aesthetic
   ===================================================== */

:root {
  --bg: #15131c;
  --bg-2: #1c1a26;
  --bg-3: #24212f;
  --fg: #eef2ed;
  --fg-dim: #8e8a9a;
  --fg-mute: #5d596b;
  --accent: #7c3aed;
  --accent-2: #a78bfa;
  --accent-warm: #fbbf24;
  --accent-pink: #f472b6;
  --line: rgba(238, 242, 237, 0.08);
  --line-strong: rgba(238, 242, 237, 0.18);
  --grid-size: 56px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  cursor: none;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: none; }
input, textarea, select { font: inherit; }

/* === ANIMATED CANVAS BG === */
#gl-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

/* === CUSTOM CURSOR === */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width .25s ease, height .25s ease, background .25s ease;
}
.cursor.hover { width: 48px; height: 48px; background: var(--accent-2); }

/* === NAV === */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(21, 19, 28, 0.72);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-left .cta-login {
  padding: 8px 16px;
  font-size: 12px;
}
.logo .dot { color: var(--accent); }
.logo em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  margin-left: 4px;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-dim);
  transition: color .2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}
.cta-login {
  background: #000;
  color: var(--fg);
  border: 1px solid var(--line-strong);
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background .2s, border-color .2s, color .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cta-login:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.cta-login::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transition: background .2s;
}
.cta-login:hover::before { background: #000; }

/* === SHARED LAYOUT === */
.page {
  position: relative;
  z-index: 1;
  padding-top: 90px;
}
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}
section { position: relative; z-index: 1; }

/* === HERO === */
.hero {
  position: relative;
  z-index: 1;
  padding: 140px 40px 80px;
  max-width: 1320px;
  margin: 0 auto;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 32px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(238, 242, 237, 0.02);
  position: relative;
  z-index: 2;
}
.hero-tag .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: clamp(60px, 11vw, 180px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;     /* nad floating-imgs */
}
.hero h1 .italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  font-size: 16px;
  color: var(--fg-dim);
  align-items: center;
  margin-top: 28px;
  position: relative;
  z-index: 2;
}
.hero-sub strong {
  color: var(--fg);
  font-weight: 600;
}
.hero-sub .sep { color: var(--fg-mute); }

/* === SECTIONS === */
.section {
  padding: 100px 40px;
  max-width: 1320px;
  margin: 0 auto;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 60px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 32px;
}
.section-head h2 {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 800px;
}
.section-head h2 .italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  white-space: nowrap;
}

/* === CARD GRID (kursy / blog list / polecane) === */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.card {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), border-color .3s, background .3s;
  position: relative;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: var(--bg-3);
}
.card-media {
  aspect-ratio: 4/3;
  background: var(--accent);
  position: relative;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.card:hover .card-media img { transform: scale(1.06); }
.card-media .placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 80px;
  color: rgba(0,0,0,0.25);
  letter-spacing: -0.02em;
}
/* Placeholder z ikoną SVG zamiast litery */
.card-media .placeholder.placeholder-svg {
  font-size: 0;
  color: rgba(0,0,0,0.42);
}
.card-media .placeholder.placeholder-svg svg {
  width: 52%;
  max-width: 200px;
  height: auto;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.card:hover .card-media .placeholder.placeholder-svg svg {
  transform: scale(1.06) rotate(-1deg);
}
/* Cards-strip — niskie pasy zamiast 4/3 (np. baza.php „Co znajdziesz w bazie") */
.cards-strip .card-media {
  aspect-ratio: 4 / 1;
}
.cards-strip .card-media .placeholder {
  font-size: 36px;
}
.card-body {
  padding: 24px 28px 28px;
}
.card-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.card-meta .pill {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.card h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.card h3 .italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.card p {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.5;
}
.card .arrow {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.card .arrow svg {
  transition: transform .3s;
}
.card:hover .arrow svg { transform: translateX(6px); }

/* === COURSE / BLOG DETAIL CONTENT === */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  padding: 80px 40px;
  max-width: 1320px;
  margin: 0 auto;
  align-items: start;
}
.media-col {
  position: sticky;
  top: 110px;
}
.media-block {
  width: 100%;
  aspect-ratio: 3/4;
  background: transparent;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
}
.media-block:not(:has(img)) {
  background: var(--accent);
}
.media-block img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.media-block .placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 140px;
  color: rgba(0,0,0,0.2);
}
.info-block {
  margin-bottom: 60px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.info-block:first-child { border-top: none; padding-top: 0; }
.info-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  margin-bottom: 16px;
}
.info-block h2 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
}
.info-block h2 .italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.info-block p {
  font-size: 18px;
  color: var(--fg-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}
.info-block p strong { color: var(--fg); font-weight: 600; }

/* === BLOG POST SECTIONS (image+text alternating) === */
.post-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 80px 40px;
  max-width: 1320px;
  margin: 0 auto;
  align-items: start;          /* obrazek wyrównany do góry, razem z nagłówkiem */
}
.post-section .post-text {
  padding-top: 8px;            /* drobne odetchnięcie żeby tekst nie wpadał na obrazek */
}
.post-section.image-right .post-text { order: 1; }
.post-section.image-right .post-image { order: 2; }
.post-section.full-width {
  grid-template-columns: 1fr;
  max-width: 900px;
}
.post-image {
  /* Brak wymuszonej proporcji — kontener dopasowuje się do obrazka.
     Limit max-height by portrety nie były przerażająco długie.
     Tło przezroczyste — kolorowa ramka pokazuje się tylko dla placeholderu. */
  background: transparent;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  max-height: 720px;
}
.post-image:not(:has(img)) {
  background: var(--accent);   /* tylko gdy brak obrazka, dla placeholdera */
}
.post-image img {
  width: 100%;
  height: auto;                /* zachowuje naturalny aspect-ratio obrazka */
  max-height: 720px;
  object-fit: contain;         /* nie przycina — pokazuje cały obrazek */
  display: block;
}
.post-image .placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 100px;
  color: rgba(0,0,0,0.2);
  /* Placeholder potrzebuje wysokości — dajemy mu 4/3 ratio gdy nie ma img */
  aspect-ratio: 4/3;
  position: relative;
}
.post-image:has(img) .placeholder { display: none; }
.post-image .caption {
  position: absolute;
  bottom: 16px; left: 16px; right: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
  background: rgba(0,0,0,0.6);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  backdrop-filter: blur(8px);
}
.post-text h3 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.post-text h3 .italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.post-text p {
  font-size: 17px;
  color: var(--fg-dim);
  line-height: 1.65;
  margin-bottom: 14px;
}
.post-section.full-width .post-text {
  text-align: center;
}

/* === FORMS === */
.form-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 40px 100px;
}
.form-row {
  margin-bottom: 24px;
}
.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.form-row label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  margin-bottom: 10px;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--fg);
  font-size: 16px;
  transition: border-color .2s, background .2s;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-3);
}
.form-row textarea {
  resize: vertical;
  min-height: 160px;
  font-family: inherit;
}
.btn-submit {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 18px 40px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform .2s, background .2s;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.btn-submit:hover {
  transform: translateX(4px);
  background: var(--accent-2);
}
.btn-submit svg { transition: transform .2s; }
.btn-submit:hover svg { transform: translateX(4px); }

.alert {
  padding: 16px 20px;
  border-radius: var(--r-md);
  margin-bottom: 24px;
  font-size: 15px;
  border: 1px solid;
}
.alert-success {
  background: rgba(77, 255, 168, 0.08);
  border-color: rgba(77, 255, 168, 0.3);
  color: var(--accent-2);
}
.alert-error {
  background: rgba(255, 92, 208, 0.08);
  border-color: rgba(255, 92, 208, 0.3);
  color: var(--accent-pink);
}

/* === LINK LIST (polecane strony, baza) === */
.link-list {
  list-style: none;
  border-top: 1px solid var(--line);
}
.link-list li {
  border-bottom: 1px solid var(--line);
  transition: background .2s;
}
.link-list li:hover { background: rgba(238, 242, 237, 0.02); }
.link-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 28px 16px;
  position: relative;
}
.link-list .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.06em;
}
.link-list .info h4 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.link-list .info p {
  font-size: 14px;
  color: var(--fg-dim);
}
.link-list .arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  transition: color .2s, transform .3s;
}
.link-list a:hover .arrow {
  color: var(--accent);
  transform: translateX(8px);
}

/* === FOOTER === */
footer.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding: 60px 40px 32px;
  background: var(--bg-2);
}
.footer-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand h3 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.footer-brand h3 em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.footer-brand p {
  color: var(--fg-dim);
  font-size: 15px;
  max-width: 380px;
}
.footer-col h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 15px;
  color: var(--fg);
  transition: color .2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1320px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
}

/* === REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === MARQUEE === */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
  margin: 60px 0;
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
}
.marquee-item {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 56px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 60px;
}
.marquee-item::after {
  content: '✦';
  color: var(--accent);
  font-style: normal;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; gap: 48px; }
  .media-col { position: relative; top: 0; }
  .media-block { aspect-ratio: 16/10; max-width: 600px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor { display: none; }
  nav.site-nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .hero { padding: 110px 20px 60px; }
  .section { padding: 60px 20px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .container { padding: 0 20px; }
  .post-section { grid-template-columns: 1fr; gap: 32px; padding: 40px 20px; }
  .post-section.image-right .post-text { order: 2; }
  .post-section.image-right .post-image { order: 1; }
  .form-row.two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .marquee-item { font-size: 32px; }
}

/* =====================================================
   FLOATING HERO IMAGES (parallax) — v1.9.5
   ===================================================== */
.floating-imgs {
  position: relative;
  height: 0;
  pointer-events: none;
  z-index: 0;     /* pod tekstem hero — kafelki przesuwają się za napisem */
}
.float-img {
  position: absolute;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  will-change: transform;
  background-color: var(--bg-3);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}
.float-img::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(238, 242, 237, 0.55);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
}
/* Etykieta widoczna tylko gdy nie ma obrazka — placeholder */
.float-img[style*="background-image"]::after {
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.55));
  align-items: flex-end;
  padding-bottom: 10px;
  color: rgba(238, 242, 237, 0.85);
}
.float-img.f1 {
  width: 200px; height: 260px;
  top: -360px; right: 6%;
  background-color: var(--accent);
  transform: rotate(-7deg);
}
.float-img.f2 {
  width: 150px; height: 200px;
  top: -180px; left: 4%;
  background-color: var(--accent-2);
  transform: rotate(5deg);
}
.float-img.f3 {
  width: 220px; height: 150px;
  top: -90px; right: 30%;
  background-color: var(--accent-warm);
  transform: rotate(-4deg);
}
@media (max-width: 1100px) {
  .floating-imgs { display: none; }
}

/* =====================================================
   MOBILE-ONLY: 5 KAFELKÓW NAWIGACYJNYCH — v1.9.7
   widoczne tylko ≤768px
   ===================================================== */
.mobile-tiles { display: none; }

@media (max-width: 768px) {
  /* Schowaj desktopowe sekcje TYLKO na stronie głównej (są zastąpione przez .mobile-tiles) */
  body.is-home > .hero,
  body.is-home > section.section,
  body.is-home > .marquee {
    display: none !important;
  }
  /* Chowam linki w navie — kafelki pełnią ich funkcję */
  nav.site-nav .nav-links { display: none; }
  nav.site-nav {
    padding: 14px 18px;
    background: rgba(21, 19, 28, 0.85);
  }
  .nav-left { gap: 14px; }
  .logo { font-size: 19px; }
  .cta-login {
    padding: 8px 14px;
    font-size: 11px;
  }

  /* Schowaj canvas animacji + cursor (mobile bez kursora) */
  #gl-bg { opacity: 0.4 !important; }
  .cursor { display: none !important; }
  body { cursor: auto; }

  /* Pokaż mobilną sekcję kafelków */
  .mobile-tiles {
    display: block;
    position: relative;
    z-index: 2;
    padding: 92px 18px 40px;
    max-width: 100%;
    margin: 0;
  }

  .mobile-header {
    margin-bottom: 28px;
    padding: 0 4px;
  }
  .mobile-header h1 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.92;
    color: var(--fg);
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 1px;
  }
  .mobile-header h1 .dot { color: var(--accent); }
  .mobile-header h1 em {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
    margin-left: 4px;
  }
  .mobile-header p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fg-dim);
    margin: 0;
  }

  .mobile-tiles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .m-tile {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    gap: 6px 14px;
    padding: 22px 22px 24px;
    border-radius: 16px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    min-height: 110px;
    transition: transform .15s cubic-bezier(.2,.8,.2,1),
                opacity .2s ease,
                box-shadow .25s ease;
    border: 1px solid rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    -webkit-tap-highlight-color: transparent;
  }
  .m-tile:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  }

  .m-tile-num {
    grid-column: 1; grid-row: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.65;
    align-self: start;
  }
  .m-tile-label {
    grid-column: 1; grid-row: 2;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -0.025em;
    line-height: 1.05;
    align-self: end;
  }
  .m-tile-label em {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
  }
  .m-tile-arrow {
    grid-column: 2; grid-row: 1 / 3;
    align-self: center;
    color: currentColor;
    opacity: 0.85;
  }

  /* Per-tile palette */
  .m-tile-baza     { background: var(--accent); }       /* fiolet */
  .m-tile-kursy    { background: var(--accent-2); }     /* lawenda */
  .m-tile-kontakt  { background: var(--accent-pink); }  /* fuchsia */
  .m-tile-polecane { background: var(--accent-warm); }  /* bursztyn */
  .m-tile-blog {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 60%, #a78bfa 100%);
    color: var(--fg);
    border-color: rgba(255, 255, 255, 0.12);
  }
  .m-tile-blog .m-tile-num { color: var(--fg); opacity: 0.7; }

  /* Footer kompaktowy na mobile */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 22px;
  }
  .site-footer {
    padding: 40px 18px 24px;
  }
}

/* Tablet: 2 kolumny, blog rozciąga się na pełną szerokość */
@media (min-width: 481px) and (max-width: 768px) {
  .mobile-tiles { padding: 100px 24px 48px; }
  .mobile-tiles-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .m-tile-blog { grid-column: 1 / -1; }
  .mobile-header h1 { font-size: 72px; }
}

/* Wąskie telefony */
@media (max-width: 380px) {
  .mobile-tiles { padding: 86px 14px 30px; }
  .mobile-header h1 { font-size: 46px; }
  .m-tile {
    padding: 18px 18px 20px;
    min-height: 96px;
  }
  .m-tile-label { font-size: 22px; }
}

/* =====================================================
   SPLIT LETTER ANIMATION — uniwersalna (home + blog)
   ===================================================== */
.split-line {
  display: block;
  overflow: hidden;
  line-height: 1;
}
.split-letter {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(.65, 0, .35, 1);
}
.split-letter.in { transform: translateY(0); }
.split-letter.italic {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  .split-letter { transition: none; transform: none; }
}

/* =====================================================
   LESSON LIST — kursy z plikami PDF (1.10.10)
   ===================================================== */
.lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lesson-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.lesson-item:hover {
  transform: translateX(6px);
  border-color: var(--accent);
  background: var(--bg-3);
}
.lesson-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.06em;
  min-width: 40px;
}
.lesson-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.lesson-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lesson-info {
  min-width: 0;
}
.lesson-info h4 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 6px;
  line-height: 1.2;
}
.lesson-info p {
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.lesson-download {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background .2s ease;
  white-space: nowrap;
}
.lesson-download:hover { background: var(--accent-2); }
.lesson-download .download-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}
.lesson-download .download-label small {
  font-size: 10px;
  opacity: 0.8;
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
}

/* Warm theme — terakota zamiast fioletu */
body.theme-warm .lesson-item { background: var(--bg-2); border-color: var(--line); }
body.theme-warm .lesson-item:hover { border-color: var(--accent); background: var(--bg-3); }
body.theme-warm .lesson-num { color: var(--accent); }
body.theme-warm .lesson-info h4 { color: var(--fg); }
body.theme-warm .lesson-info p { color: var(--fg-dim); }
body.theme-warm .lesson-download { background: var(--accent); color: var(--bg); }
body.theme-warm .lesson-download:hover { background: var(--accent-2); }

@media (max-width: 768px) {
  .lesson-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px;
  }
  .lesson-thumb {
    width: 100%;
    height: 140px;
  }
  .lesson-download {
    justify-self: stretch;
    justify-content: center;
  }
}

/* =====================================================
   POST EXCERPT — wyraźniejszy kontrast (1.10.12)
   ===================================================== */
.post-excerpt {
  font-size: 22px;
  color: var(--fg);
  line-height: 1.55;
  font-weight: 400;
}
.post-excerpt p {
  margin-bottom: 14px;
  color: var(--fg);
}
.post-excerpt p:last-child { margin-bottom: 0; }

/* Hero sub na blogu — wyraźniejszy */
body.theme-warm .hero-sub {
  color: var(--fg);
  font-size: 18px;
}
body.theme-warm .hero-sub strong { color: var(--accent); font-weight: 700; }
body.theme-warm .hero-sub .sep { color: var(--fg-mute); }

/* Pływające kafelki bez etykiet — czystsze */
.float-img:not([style*="background-image"]) { opacity: 0.85; }
.float-img[data-label=""]::after { content: none; }


/* ============================================================================
   PATCH dla public.css (v1.12.0)
   ============================================================================
   Dopisać na końcu /assets/css/public.css

   Co naprawia:
   1. NAWIGACJA — wymusza widoczność (była ukrywana przez inny CSS)
   2. Karty blogu/kursów — sztywno max 400px
   3. Tytuły hero (h1) — dzielą wyrazy w długich nagłówkach
   4. split-line — pozwala na wrap zamiast obcinania długiego tekstu
   5. Placeholder okładki gdy brak cover_image — ograniczony do 300px
   ============================================================================ */


/* --- 0. AWARYJNE WYMUSZENIE WIDOCZNOŚCI NAV --- */
/* Bug v1.12.0: nawigacja czasem nie renderuje się wizualnie mimo że jest w HTML.
   Wymuszamy widoczność na poziomie !important żeby przeważyć każdą inną regułę. */

nav.site-nav {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 100 !important;
  pointer-events: auto !important;
}


/* --- 1. KARTY: stała szerokość, brak rozciągania --- */
/* FIX v1.12: było auto-fill + minmax(320px, 400px) — przy gap 24 i kontenerze 1240px
   trzecia kolumna mieściła się dopiero przy 1248px (overflow 8px) i grid spadał do 2 kolumn.
   auto-fit + 1fr pozwala 3 kartom równo wypełnić rząd, a .card max-width:400px
   nadal trzyma górne ograniczenie szerokości pojedynczej karty. */
.cards {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  justify-content: start;
}

.card {
  max-width: 400px;
  width: 100%;
}

@media (min-width: 1400px) {
  .cards {
    justify-content: start;
  }
}

@media (max-width: 700px) {
  .cards {
    grid-template-columns: 1fr;
    justify-content: center;
  }
  .card {
    max-width: 100%;
    margin: 0 auto;
  }
}


/* --- 2. TYTUŁY HERO: dzielenie wyrazów w długich nagłówkach --- */

.hero h1 {
  /* Mniejszy maksymalny rozmiar dla długich tytułów (było 180px) */
  font-size: clamp(48px, 9vw, 120px);
  /* Pozwalamy łamać długie wyrazy gdyby się nie mieściły */
  word-break: break-word;
  overflow-wrap: break-word;
  /* Polskie dzielenie wyrazów (działa w Chrome/Safari/Firefox z fontem mającym hyphens) */
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}


/* --- 3. SPLIT-LINE: pozwala na wrap zamiast cięcia --- */

.split-line {
  /* Domyślnie .split-line ma overflow:hidden + line-height:1, co obcina tekst.
     Dla animacji to działa, ale dla długich linii potrzebujemy elastyczności. */
  overflow: visible;          /* nie obcinaj jeśli tekst się nie mieści */
  line-height: 1.05;           /* trochę więcej miejsca między wierszami */
  white-space: normal;         /* pozwól na łamanie */
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Litery wewnątrz split-line — zachowują animację, ale mogą się łamać */
.split-letter {
  white-space: pre-wrap;       /* spacje zachowane, ale łamanie dozwolone */
}


/* --- 4. PLACEHOLDER OKŁADKI POSTA: ograniczenie do 300px --- */

/* Bug: w post.php gdy post NIE ma cover_image, .media-block renderuje się
   z aspect-ratio 3/4 na pełną szerokość 1fr siatki content-grid (1fr 1.6fr).
   Przy szerokim ekranie daje to 700px+ pomarańczowej plamy zanim widać treść.

   Rozwiązanie: gdy w .media-block NIE MA <img> (czyli pokazuje placeholder),
   ograniczamy szerokość do 300px i centrujemy w kolumnie.

   Używamy :not(:has(img)) zamiast :has(.placeholder) — istniejący CSS już ma
   regułę .media-block:not(:has(img)) w public.css (linia ~412), więc sprawdziliśmy
   że ten selektor działa w tym kontekście. */

.media-block:not(:has(img)) {
  max-width: 300px;
  margin: 0 auto;             /* wyśrodkowanie w kolumnie */
  aspect-ratio: 4/3;          /* zamiast 3/4 — bardziej miniaturkowy proporcjonalnie */
}

/* Sam tekst literki w placeholderze — proporcjonalnie mniejszy */
.media-block .placeholder {
  font-size: 80px;            /* było 140px — za duże dla 300px szerokości */
}

/* Wyrównujemy content-grid do góry, żeby tekst po prawej zaczynał się
   na tej samej linii co zmniejszony placeholder po lewej */
.content-grid {
  align-items: start;
}

/* Dla artykułów HTML — całkiem ukrywamy stary content-grid (okładka + excerpt).
   Artykuł HTML w pliku ma już własne wprowadzenie (TOC + sekcja 00), więc
   drugie "intro" w post.php tworzy tylko 700-870px pustki. */
body.is-html-article .content-grid {
  display: none !important;
}

/* Plus zmniejszamy padding sekcji hero dla artykułów HTML — żeby tytuł
   nie wisiał z gigantycznym paddingiem-bottom (80px to dla post.php z content-grid). */
body.is-html-article .hero {
  padding-bottom: 30px;
}

/* --- 4c. KURSOR DLA ARTYKUŁÓW HTML: biały zamiast czarnego --- */
/* Bug: w motywie theme-warm kursor ma background: var(--fg) (ciemny) z mix-blend-mode: difference.
   To świetnie działa na jasnym tle hero (jasny − ciemny = widoczny ciemny kursor),
   ale ŹLE na ciemnym tle artykułu (ciemny − ciemny ≈ niewidoczny).

   Rozwiązanie: dla artykułów HTML zmieniamy kolor bazowy kursora na biały.
   Z mix-blend-mode: difference:
     - nad ciemnym #0d0f14: biały − ciemny = jasny (widoczny ✓)
     - nad jasnym hero #ebe3d0: biały − jasny = ciemny (też widoczny ✓)
   Biały działa w obu kierunkach. */

body.is-html-article .cursor,
body.is-html-article .cursor.cursor-warm {
  background: #ffffff !important;
}


/* --- 5. ZABEZPIECZENIE: long-form HTML posts nie powinny dziedziczyć
       overflow-hidden ze split-line --- */

.html-article-wrap .split-line {
  overflow: visible;
}
