/* =========================================
   kowalczykmarcin.info — shared styles
   ========================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0c0c0c;
  --fg: #f4f4f0;
  --fg-dim: rgba(244, 244, 240, 0.55);
  --fg-faint: rgba(244, 244, 240, 0.35);
  --line: rgba(244, 244, 240, 0.12);
  --accent: #f4f4f0;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Layout */
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}
.wrap-wide {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ────────────────────────────────────────
   Nav
   ──────────────────────────────────────── */
nav.top {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
}
nav.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.nav-links a {
  color: var(--fg-dim);
  transition: color 0.2s, transform 0.2s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.active {
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 2px;
}
.nav-ig {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-dim);
}
.nav-ig:hover { color: var(--fg); }
.nav-ig svg { width: 20px; height: 20px; }
.nav-ig.nav-yt svg { width: 23px; height: 23px; }

/* ────────────────────────────────────────
   Sections
   ──────────────────────────────────────── */
section {
  padding: 120px 0 112px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
section:last-of-type { border-bottom: none; }
/* Tick mark on dividers — film leader accent */
section:not(:last-of-type)::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: var(--fg);
  opacity: 0.7;
}

/* Editorial section header */
.sec-head {
  margin-bottom: 72px;
  max-width: 100%;
}
.sec-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.sec-num {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.sec-cat {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sec-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.sec-title {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-wrap: balance;
}
.sec-sub {
  margin-top: 18px;
  font-size: 16px;
  color: var(--fg-dim);
  max-width: 560px;
  line-height: 1.5;
}

/* ────────────────────────────────────────
   Hero
   ──────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-bottom: 1px solid var(--line);
  padding: 96px 0 80px;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 16/9;
  z-index: 1;
  pointer-events: none;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.hero-bg-img.active { opacity: 0.38; }
.hero-bg-img.initial { opacity: 0.38; transition: none; }
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg) 100%),
              linear-gradient(90deg, transparent 0%, transparent 50%, var(--bg) 110%);
}
.hero-name {
  font-size: clamp(44px, 5.8vw, 76px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 0.98;
  margin-bottom: 20px;
}
.hero-desc {
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.4;
  color: var(--fg-dim);
  max-width: 640px;
  font-weight: 400;
  margin-bottom: 28px;
}
.hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 15px;
}
.hero-contact .primary {
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 2px;
  transition: opacity 0.15s;
}
.hero-contact .primary:hover { opacity: 0.7; }
.hero-contact .secondary { color: var(--fg-dim); }
.hero-meta {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--fg-faint);
}

/* ────────────────────────────────────────
   Project cards (grid + carousel)
   ──────────────────────────────────────── */
.proj-grid-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 28px;
}
.proj-grid-1 {
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.proj-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 0.2s;
}
.proj-card.linkable { cursor: pointer; }
.proj-card.linkable:hover { opacity: 0.85; }
.proj-card.linkable:hover .proj-name { color: var(--fg); }
.proj-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1a1a;
  overflow: hidden;
}
.proj-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: filter 0.35s ease, transform 0.5s ease;
}
.proj-card.linkable:hover .proj-thumb img {
  transform: scale(1.015);
}
.proj-meta { display: flex; flex-direction: column; gap: 2px; }
.proj-eyebrow {
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.proj-name {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--fg-dim);
  transition: color 0.2s;
}
.proj-role {
  font-size: 13px;
  color: var(--fg-faint);
}
.proj-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-dim);
  max-width: 680px;
  margin-top: 4px;
}
.proj-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 2px;
  align-self: flex-start;
  margin-top: 4px;
  transition: opacity 0.15s;
}
.proj-link:hover { opacity: 0.7; }
.proj-links { display: flex; flex-wrap: wrap; gap: 20px; }
.proj-stills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.proj-stills img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #1a1a1a;
  cursor: pointer;
  transition: opacity 0.15s;
}
.proj-stills img:hover { opacity: 0.85; }

/* Horizontal carousel (used on /portfolio.html) */
.proj-row-wrap {
  position: relative;
  margin: 0 -48px;
}
.proj-row {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 48px 12px 48px;
  scrollbar-width: none;
}
.proj-row::-webkit-scrollbar { display: none; }
.proj-row > .proj-card {
  flex: 0 0 calc((100% - 56px - 96px) / 3);
  min-width: 280px;
  scroll-snap-align: start;
}
.proj-fade {
  position: absolute;
  top: 0;
  bottom: 12px;
  width: 96px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 3;
}
.proj-fade.left {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 30%, transparent 100%);
}
.proj-fade.right {
  right: 0;
  background: linear-gradient(270deg, var(--bg) 0%, var(--bg) 30%, transparent 100%);
}
.proj-fade.show { opacity: 1; }
.proj-row-arrows {
  position: absolute;
  top: -52px;
  right: 48px;
  display: flex;
  gap: 8px;
  z-index: 4;
}
.proj-arrow {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-dim);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.proj-arrow:hover { border-color: var(--fg); color: var(--fg); }

/* TV broadcasters strip */
.tv-broadcasters {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 28px;
  margin-top: -24px;
  margin-bottom: 56px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-dim);
}
.tv-broadcasters .label {
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ────────────────────────────────────────
   "Wybrane prace" (main page lean grid)
   ──────────────────────────────────────── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.featured-cta {
  margin-top: 56px;
  display: flex;
  justify-content: flex-start;
}
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 4px;
  transition: opacity 0.15s, gap 0.2s;
}
.btn-line:hover { opacity: 0.7; gap: 14px; }

/* ────────────────────────────────────────
   About (O mnie) + Zaufali strip inside it
   ──────────────────────────────────────── */
.about-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: start;
}
.about-text p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-dim);
  margin-bottom: 18px;
  max-width: 620px;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong {
  color: var(--fg);
  font-weight: 500;
}
.about-photo {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 360px;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #1a1a1a;
  border-radius: 50%;
  z-index: 2;
}
.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 70% 80%;
  filter: grayscale(0.1);
}

/* Zaufali strip — as a sub-block inside About */
.about-clients {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.about-clients-label {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.about-clients-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}
.about-clients-list .client {
  padding: 8px 28px;
  font-size: 16px;
  color: var(--fg-dim);
  letter-spacing: 0.01em;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s, transform 0.2s;
}
.about-clients-list .client:first-child { padding-left: 0; }
.about-clients-list .client:hover { color: var(--fg); transform: scale(1.08); }
.about-clients-list .client + .client::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background: var(--line);
}

/* ────────────────────────────────────────
   Z planu — blog list (used on main & /blog)
   ──────────────────────────────────────── */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1400px;
}
.post-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.15s;
}
.post-item:last-child { border-bottom: none; padding-bottom: 0; }
.post-item:hover { opacity: 0.78; }
.post-item.draft { cursor: default; }
.post-item.draft:hover { opacity: 1; }
.post-item.draft .post-title { color: var(--fg-dim); }
.post-item.draft .post-read {
  color: var(--fg-faint);
  border-bottom: 1px dashed var(--fg-faint);
}
.post-meta {
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.post-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--fg);
}
.post-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-dim);
}
.post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  margin-top: 4px;
}
.post-read {
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 2px;
}
.post-tags {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.post-tag {
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.post-tag::before { content: '#'; opacity: 0.5; margin-right: 1px; }

.posts-cta {
  margin-top: 48px;
}

/* Z planu — split layout on main page */
.zplanu-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 80px;
  align-items: start;
}
.zplanu-photo {
  position: sticky;
  top: 88px;
  aspect-ratio: 4/5;
  background: #1a1a1a;
  overflow: hidden;
}
.zplanu-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.zplanu-photo:hover img { transform: scale(1.02); }
.zplanu-photo-caption {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
}

/* ────────────────────────────────────────
   Single article (blog post page)
   ──────────────────────────────────────── */
.article-wrap {
  max-width: none;
  margin: 0 auto;
  padding: 96px 24px 120px;
}
.article-meta {
  font-size: 12px;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
}
.article-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: balance;
  margin-bottom: 32px;
}
.article-lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--fg);
  margin-bottom: 56px;
  max-width: 640px;
}
.article-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--fg);
}
.article-body p {
  margin-bottom: 22px;
  color: var(--fg);
}
.article-body h2 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-top: 56px;
  margin-bottom: 16px;
}
.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 10px;
}
.article-body ul, .article-body ol {
  margin: 0 0 22px 1.4em;
}
.article-body li { margin-bottom: 8px; }
.article-body figure {
  margin: 40px -56px;
}
.article-body figure img {
  width: 100%;
  display: block;
}
.article-body figcaption {
  font-size: 13px;
  color: var(--fg-faint);
  margin-top: 10px;
  text-align: center;
}
.article-body strong { font-weight: 600; }
.article-body em { color: var(--fg-dim); }
.article-body a {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s;
}
.article-body a:hover { border-color: var(--fg); }
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 56px;
  transition: color 0.2s, transform 0.2s;
}
.article-back:hover { color: var(--fg); }
.article-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--fg-dim);
}

/* ────────────────────────────────────────
   Contact
   ──────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 16px;
}
.contact-info .label {
  font-size: 13px;
  color: var(--fg-faint);
  margin-bottom: 4px;
}
.contact-info a {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color 0.15s;
}
.contact-info a:hover { border-color: var(--fg); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; color: var(--fg-faint); }
.form-input, .form-textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--fg); }
.form-textarea { resize: vertical; min-height: 110px; }
.form-submit {
  background: transparent;
  border: 1px solid var(--fg);
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 24px;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 12px;
  transition: background 0.15s, color 0.15s;
}
.form-submit:hover { background: var(--fg); color: var(--bg); }
.form-success {
  font-size: 16px;
  color: var(--fg);
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ────────────────────────────────────────
   Footer
   ──────────────────────────────────────── */

/* Light page (blog list, single article) — no hero, header has its own spacing */
.page-header {
  padding: 96px 0 48px;
}
.page-header .sec-meta { margin-bottom: 20px; }
.page-header h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-wrap: balance;
}
.page-header .lede {
  margin-top: 18px;
  font-size: 17px;
  color: var(--fg-dim);
  max-width: 620px;
  line-height: 1.5;
}
.page-header--image {
  padding: 0;
  line-height: 0;
}
.page-header-wrap + section {
  padding-top: 60px;
}
.page-header-img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0.65);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 32px;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ────────────────────────────────────────
   Mobile
   ──────────────────────────────────────── */
@media (max-width: 768px) {
  .wrap, .wrap-wide { padding: 0 24px; }
  .nav-links { width: 100%; justify-content: center; gap: 2px; font-size: 15px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: auto; margin-right: auto; }
  .nav-ig { display: none; }
  .nav-links a { white-space: nowrap; padding: 8px 4px; text-align: center; flex: 1; }
  .brand { display: none; }
  nav.top .wrap { padding-top: 12px; padding-bottom: 12px; justify-content: center; }
  section { padding: 72px 0 64px; }
  .sec-head { position: relative; margin-bottom: 32px; }
  .about-layout { display: grid !important; grid-template-columns: 1fr; gap: 0; }
  .about-photo { position: static; width: 150px; height: 150px; border-radius: 50%; overflow: hidden; margin: 0 auto 30px; transform: none; top: auto; }
  .about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
  .sec-num { font-size: 20px; }
  .sec-meta { gap: 12px; margin-bottom: 18px; }
  .hero { min-height: 0; padding: 0; justify-content: flex-start; flex-direction: column; }
  section.hero { padding-top: 0 !important; }
  .hero-bg { position: relative; inset: auto; aspect-ratio: 16/9; width: 100%; flex-shrink: 0; }
  .hero .wrap { padding: 24px; }
  .hero-bg-img.active { opacity: 0.75; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.25) 70%, var(--bg) 100%) !important; }
  .hero-name { font-size: 40px; }
  .hero-desc { font-size: 16px; }
  .hero-meta { flex-direction: column; gap: 6px; }
  .proj-grid-2 { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .proj-grid-1 { gap: 56px; }
  .proj-name { font-size: 17px; }
  .proj-stills { grid-template-columns: 1fr 1fr; }
  .tv-broadcasters { gap: 18px; font-size: 12px; }
  .about-layout { grid-template-columns: 1fr; gap: 0; }
  .about-photo { width: 150px; height: 150px; margin: 0 auto 30px; transform: none; top: auto; }
  .about-clients { margin-top: 56px; padding-top: 28px; }
  .about-clients-list { justify-content: center; }
  .featured-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .proj-row-wrap { margin: 0 -24px; }
  .proj-row { padding: 0 24px 12px 24px; gap: 20px; }
  .proj-row > .proj-card { flex: 0 0 78%; min-width: 240px; }
  .proj-fade { width: 48px; }
  .proj-row-arrows { display: none; }
  .article-body figure { margin: 32px 0; }
  .zplanu-layout { grid-template-columns: 1fr; gap: 40px; }
  .zplanu-photo { position: static; aspect-ratio: 16/10; max-width: 100%; }
  .page-header { padding-top: 32px; padding-bottom: 24px; }
  .page-excerpt { font-size: 16px !important; line-height: 1.6 !important; color: var(--fg-dim) !important; }
  .article-footer p { margin: 0; }
  .sidebar-title { text-align: left !important; }
  .article-sidebar { margin-top: 10px !important; }
  .sidebar-posts { align-items: flex-start; }
  .sidebar-post { text-align: left !important; }
  .sidebar-share { text-align: left !important; }
  .article-social .nav-ig { display: inline-flex !important; }
  .share-links { justify-content: flex-start !important; }

  /* Single post mobile */
  .article-wrap { padding: 0 0 64px !important; }
  .article-figure-wrap { padding: 0 !important; margin-bottom: 24px; max-width: none !important; }
  .article-figure { height: auto !important; aspect-ratio: 16/9 !important; }
  .article-layout { flex-direction: column !important; gap: 0 !important; padding: 0 24px !important; }
  .article-sidebar { width: 100%; text-align: left !important; }
  .article-footer { margin-top: 0 !important; padding-top: 8px !important; display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; }
  .article-tags { margin-bottom: 12px !important; }
  ul.page-numbers { margin: 24px 0 !important; }
  section { padding: 20px 0 24px !important; }
  .page-header-wrap + section { padding-top: 0 !important; }
  .page-header--image { padding: 0 !important; }
  .page-header { padding: 8px 0 !important; }
  .page-header h1 { font-size: 24px !important; font-weight: 500 !important; letter-spacing: -0.015em !important; line-height: 1.25 !important; }
  .page-excerpt { font-size: 16px !important; line-height: 1.6 !important; color: var(--fg-dim) !important; }
  .article-footer p { margin: 0; }
  .sidebar-title { text-align: left !important; }
  .article-sidebar { margin-top: 10px !important; }
  .sidebar-posts { align-items: flex-start; }
  .sidebar-post { text-align: left !important; }
  .sidebar-share { text-align: left !important; }
  .article-social .nav-ig { display: inline-flex !important; }
  .share-links { justify-content: flex-start !important; }
  /* Ukryj blog header image na mobile */
  .page-header-img { display: none !important; }
}

@media (max-width: 640px) {
  .featured-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-clients-list { justify-content: center; }
  .about-clients-list .client { padding: 6px 16px; font-size: 14px; }
  .footer-inner { align-items: flex-start; text-align: left; }
  .footer-left { align-items: flex-start; }
  .footer-contact { align-items: flex-end; }
}

/* LIGHT MODE */
/* LIGHT MODE */
[data-theme=light] { --bg: #fafaf8; --fg: #1a1a18; --fg-dim: rgba(26,26,24,0.55); --fg-faint: rgba(26,26,24,0.35); --line: rgba(26,26,24,0.12); --accent: #1a1a18; }
[data-theme=light] body { background: var(--bg); color: var(--fg); }
[data-theme=light] nav.top { border-bottom-color: var(--line); background: rgba(250,250,248,0.9); }
[data-theme=light] .nav-links a { color: var(--fg-dim); }
[data-theme=light] .hero-name, [data-theme=light] .hero-desc { color: var(--fg); }
[data-theme=light] .hero-contact a.primary { color: var(--fg); border-color: var(--line); }
[data-theme=light] .hero-bg::after { content: ''; position: absolute; inset: 0; background: rgba(250,250,248,0.6); z-index: 1; }
[data-theme=light] .hero > .wrap { position: relative; z-index: 2; }
[data-theme=light] .sec-num, [data-theme=light] .sec-cat { color: var(--fg-dim); }
[data-theme=light] .sec-rule { background: var(--line); }
[data-theme=light] .sec-title { color: var(--fg); }
[data-theme=light] .about-text p { color: var(--fg); }
[data-theme=light] .client { color: var(--fg-faint); border-color: var(--line); }
[data-theme=light] .proj-card { background: #fff; border-color: var(--line); }
[data-theme=light] .proj-name { color: var(--fg); }
[data-theme=light] .post-item { border-color: var(--line); }
[data-theme=light] .post-meta { color: var(--fg-dim); }
[data-theme=light] .post-title { color: var(--fg); }
[data-theme=light] .post-excerpt { color: var(--fg-dim); }
[data-theme=light] .post-read { color: var(--fg); }
[data-theme=light] .post-tag { background: rgba(26,26,24,0.05); color: var(--fg-dim); }
[data-theme=light] .contact-info .label { color: var(--fg-dim); }
[data-theme=light] .contact-info a { color: var(--fg); }
[data-theme=light] .form-input, [data-theme=light] .form-textarea { background: #fff; border-color: var(--line); color: var(--fg); }
[data-theme=light] .form-submit { background: var(--fg); color: var(--bg); }
[data-theme=light] footer span { color: var(--fg-dim); }
[data-theme=light] .hero-bg-img.active { opacity: 0.65; }
body, nav.top, .hero, section, footer, .proj-card, .post-item { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.theme-toggle { background: none !important; border: none !important; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--fg-dim); margin-left: 8px; }
.theme-toggle:hover { color: var(--fg); }
.theme-toggle svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.brand { margin-right: 12px; }
.theme-toggle { margin-left: 12px; }

/* SINGLE ARTICLE */
.article-wrap { margin: 0 auto !important; width: 100%; padding: 64px 0 80px; }
.article-figure-wrap { max-width: 1400px; margin: 0 auto 48px; padding: 0 48px; }
.article-figure { margin: 0; width: 100%; height: 600px; overflow: hidden; }
.article-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-layout { display: flex; gap: 120px; max-width: 1400px; margin: 0 auto; padding: 0 48px; }
.article-main { flex: 1; min-width: 0; padding: 0; }
.article-sidebar { width: 300px; flex-shrink: 0; text-align: right; padding: 0; }
.article-back { display: inline-block; font-size: 14px; color: var(--fg-dim); margin-bottom: 24px; }
.article-back:hover { color: var(--fg); }
.article-meta { display: flex; gap: 12px; font-size: 13px; color: var(--fg-dim); margin-bottom: 16px; }
.article-title { font-size: clamp(28px, 3.5vw, 44px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 32px; }
.article-body { font-size: 17px; line-height: 1.7; color: var(--fg); }
.article-body p { margin-bottom: 1.2em; }
.article-body h2 { font-size: 24px; font-weight: 500; margin: 40px 0 16px; }
.article-footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-dim); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.article-tag { font-size: 12px; color: var(--fg-dim); padding: 4px 12px; border: 1px solid var(--line); border-radius: 4px; }
.article-tag:hover { color: var(--fg); border-color: var(--fg); }
.article-social { display: flex; gap: 12px; margin-top: 8px; }
.article-social .nav-ig svg { width: 18px; height: 18px; }

/* SIDEBAR */
.sidebar-title { font-size: 16px; font-weight: 600; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); text-align: right; }
.sidebar-posts { display: flex; flex-direction: column; gap: 14px; }
.sidebar-post { font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--fg-dim); display: block; }
.sidebar-post:hover { color: var(--fg); }
.sidebar-share { margin-top: 40px; }
.share-links { display: flex; gap: 12px; justify-content: flex-end; }
.share-link { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; color: var(--fg-dim); }
.share-link:hover { color: var(--fg); border-color: var(--fg); }

/* BLOG LISTING */
.post-item.has-thumb { display: flex; flex-direction: row-reverse; gap: 28px; align-items: flex-start; padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-media { display: flex; flex-direction: column; flex-shrink: 0; width: 240px; }
.post-thumb { width: 100%; height: 150px; overflow: hidden; border-radius: 4px; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-body { flex: 1; min-width: 0; }
.post-item.has-thumb .post-title { margin: 6px 0 10px; }
.post-item.has-thumb .post-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
.post-tags-under { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 0 0; }
.post-tags-under .post-tag { background: rgba(244,244,240,0.1); color: var(--fg-dim); font-size: 10px; padding: 2px 8px; border-radius: 3px; letter-spacing: 0.05em; text-transform: uppercase; }
[data-theme=light] .post-tags-under .post-tag { background: rgba(26,26,24,0.05); color: var(--fg-dim); }

/* PAGINATION */
ul.page-numbers {
  display: flex;
  gap: 8px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  justify-content: center;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 14px;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: all 0.2s;
}
.page-numbers a { color: inherit; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.page-numbers:hover,
.page-numbers a:hover {
  color: var(--fg);
  border-color: var(--fg);
}
.page-numbers.current {
  color: var(--bg);
  background: var(--fg);
  border-color: var(--fg);
}
.page-numbers.prev,
.page-numbers.next {
  font-size: 16px;
}

/* FOOTER */
footer {
  padding: 40px 0 56px;
  font-size: 13px;
  color: var(--fg-dim);
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-copy {
  color: var(--fg-faint);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.footer-contact a { color: var(--fg-dim); transition: color 0.2s; }
.footer-contact a:hover { color: var(--fg); }
.footer-privacy {
  opacity: 0.55;
  transition: opacity 0.2s;
}
.footer-privacy:hover {
  opacity: 1;
  color: var(--fg) !important;
}

/* MOBILE */
.article-sidebar { width: 300px; flex-shrink: 0; text-align: right; padding: 0; }
@media (max-width: 600px) { .post-item.has-thumb { flex-direction: column; gap: 16px; } .post-media { width: 100%; } .post-thumb { width: 100%; height: 180px; } }
