:root {
  --bg: #f8fafc;
  --bg-soft: #eef2f7;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-dark: #1e3a8a;
  --border: #e2e8f0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-soft: #131f35;
    --card: #1e293b;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --accent: #60a5fa;
    --accent-dark: #93c5fd;
    --border: #334155;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.6;
}
.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 56px 24px 80px 24px;
}

/* nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 64px;
  font-size: 14px;
}
nav .brand {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
  text-decoration: none;
  color: var(--text);
}
nav .links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 24px;
  font-weight: 600;
}
nav .links a:hover { color: var(--accent); }

/* hero */
header.hero { margin-bottom: 72px; max-width: 640px; }
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
h1 {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 14px 0;
  letter-spacing: -0.6px;
}
.tagline {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
}

section { margin-bottom: 72px; }
h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 24px 0;
}
.about p { font-size: 16px; margin: 0 0 14px 0; max-width: 640px; }

/* featured project */
.project-featured {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 28px;
}
.project-featured .project-name { font-size: 22px; font-weight: 800; margin: 0 0 8px 0; }
.project-featured .project-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(37,99,235,0.1);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.project-featured .project-desc { font-size: 15px; color: var(--muted); margin: 0 0 22px 0; max-width: 620px; }

/* gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.shot {
  aspect-ratio: 16/10;
  border-radius: 12px;
  border: 1.5px dashed var(--border);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 12px;
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.shot .icon { font-size: 22px; opacity: 0.5; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
}
.btn-secondary {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 12px 4px;
}

/* other projects */
.other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.project-card .project-name { font-size: 17px; font-weight: 700; margin: 0 0 6px 0; }
.status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-soft);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.project-card .project-desc { font-size: 14px; color: var(--muted); margin: 0; }
.mini-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 4px 0 14px 0;
}
.mini-gallery img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s;
}
.mini-gallery img:hover { opacity: 0.85; }
.shot img { cursor: pointer; transition: opacity 0.15s; }
.shot img:hover { opacity: 0.85; }
.project-card .btn-secondary { padding-left: 0; margin-top: 10px; }

/* realizacje stron inside featured block */
.project-featured .other-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.project-featured .other-grid .project-card {
  background: var(--bg-soft);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.project-featured .other-grid .project-card .project-desc { flex: 1; }
.card-shot {
  aspect-ratio: 16/10;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 4px 0 14px 0;
  background: var(--bg);
}
.card-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  cursor: pointer;
  transition: opacity 0.15s;
}
.card-shot img:hover { opacity: 0.85; }
.shot img[src*="-mobile"] { object-position: top; }

/* wizytówki demos */
.wizytowka-demos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.wizytowka-demo .demo-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px 0;
}
.demo-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.demo-gallery .shot { margin-bottom: 0; }

.contact p { font-size: 16px; margin: 0 0 8px 0; }
.contact a { color: var(--accent); font-weight: 600; text-decoration: none; }

footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

/* lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ============ BLOG ============ */

.blog-teaser-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.blog-list {
  display: grid;
  gap: 16px;
}
.blog-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.blog-card:hover { border-color: var(--accent); }
.blog-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.blog-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: var(--text);
}
.blog-excerpt {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--accent); }

.article-header { margin-bottom: 48px; max-width: 680px; }
.post-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.prose { font-size: 16px; max-width: 680px; }
.prose h2 {
  font-size: 21px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  margin: 40px 0 14px 0;
}
.prose p { margin: 0 0 18px 0; }
.prose ul, .prose ol { margin: 0 0 18px 0; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }

.cta-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-top: 48px;
  max-width: 680px;
}
.cta-box p.project-name { font-size: 17px; font-weight: 800; margin: 0 0 8px 0; }
.cta-box p.project-desc { font-size: 14px; color: var(--muted); margin: 0 0 18px 0; }
