/* Zdrojárna — light theme overrides + toggle */

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="light"] :root,
html[data-theme="light"] {
  --bg: #f5f3ee;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1efe9;
  --line: #d8d3c7;
  --line-hot: #16a34a;
  --text: #14181d;
  --muted: #4a5562;
  --dim: #6b7785;
  --acid: #16a34a;
  --cyan: #0284c7;
  --yellow: #b45309;
}

html[data-theme="light"] body {
  background:
    linear-gradient(90deg, rgba(2, 132, 199, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(22, 163, 74, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 70% 12%, rgba(2, 132, 199, 0.07) 0%, transparent 28%),
    var(--bg);
  background-size: 40px 40px, 40px 40px, auto;
  color: var(--text);
}

html[data-theme="light"] body::before {
  opacity: 0.04;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(20, 24, 29, 0.18) 8px),
    linear-gradient(120deg, transparent 0%, rgba(2, 132, 199, 0.12) 48%, transparent 52%);
  mix-blend-mode: multiply;
}

html[data-theme="light"] .scene {
  display: none;
}

html[data-theme="light"] .topbar,
html[data-theme="light"] .zd-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(22, 163, 74, 0.22);
}

html[data-theme="light"] .nav-links a:hover {
  border-color: rgba(2, 132, 199, 0.32);
  background: rgba(2, 132, 199, 0.08);
  color: var(--text);
}

html[data-theme="light"] .nav-links .hot {
  border-color: rgba(22, 163, 74, 0.55);
  background: rgba(22, 163, 74, 0.12);
  color: var(--acid);
}

html[data-theme="light"] .panel,
html[data-theme="light"] .content,
html[data-theme="light"] .article-content,
html[data-theme="light"] .console,
html[data-theme="light"] .module,
html[data-theme="light"] .equipment-item,
html[data-theme="light"] .contact-tile,
html[data-theme="light"] .archive-item,
html[data-theme="light"] .blog-item,
html[data-theme="light"] .terminal,
html[data-theme="light"] .terminal-lines,
html[data-theme="light"] .chat-input,
html[data-theme="light"] .chat-form,
html[data-theme="light"] .contact-form-shell {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(20, 24, 29, 0.03), 0 12px 32px -28px rgba(20, 24, 29, 0.5);
}

html[data-theme="light"] .panel-head,
html[data-theme="light"] .console-head {
  border-color: var(--line);
}

html[data-theme="light"] .prompt-chip {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="light"] .prompt-chip:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.35);
}

html[data-theme="light"] .message {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="light"] .message p {
  color: var(--text);
}

html[data-theme="light"] .message.agent {
  background: rgba(22, 163, 74, 0.07);
  border-color: rgba(22, 163, 74, 0.28);
}

html[data-theme="light"] .message.agent small {
  color: var(--acid);
}

html[data-theme="light"] .message.user {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.32);
}

html[data-theme="light"] .message.user small {
  color: var(--cyan);
}

html[data-theme="light"] .readout {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.22);
}

html[data-theme="light"] .terminal,
html[data-theme="light"] .terminal-lines {
  color: var(--text);
}

html[data-theme="light"] .terminal span,
html[data-theme="light"] .terminal-lines span {
  background: transparent;
  border-color: transparent;
  color: var(--text);
}

html[data-theme="light"] .terminal b,
html[data-theme="light"] .terminal-lines b {
  color: var(--acid);
}

html[data-theme="light"] .feature-post,
html[data-theme="light"] .post-list {
  background: var(--panel);
  border-color: var(--line);
}

html[data-theme="light"] .feature-post::before {
  background: url("/images/zdrojarna-workshop-dark.png") center / cover no-repeat;
}

html[data-theme="light"] .feature-post h3,
html[data-theme="light"] .feature-post p {
  color: #f6f7f9;
  text-shadow: 0 1px 14px rgba(7, 9, 13, 0.72), 0 0 2px rgba(7, 9, 13, 0.6);
}

html[data-theme="light"] .feature-post .post-meta {
  text-shadow: 0 1px 12px rgba(7, 9, 13, 0.7);
}

html[data-theme="light"] .post-row {
  border-bottom-color: var(--line);
}

html[data-theme="light"] .post-row:hover {
  background: var(--panel-2);
}

html[data-theme="light"] .post-row strong,
html[data-theme="light"] .blog-item strong,
html[data-theme="light"] .archive-item h2 {
  color: var(--text);
}

html[data-theme="light"] .date,
html[data-theme="light"] .post-meta {
  color: var(--acid);
}

html[data-theme="light"] .arrow {
  color: var(--cyan);
}

html[data-theme="light"] .btn.primary,
html[data-theme="light"] .send-button,
html[data-theme="light"] .contact-submit {
  background: var(--acid);
  color: #ffffff;
  border-color: var(--acid);
}

html[data-theme="light"] .btn.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="light"] .btn.secondary:hover {
  background: var(--panel-2);
}

html[data-theme="light"] .kicker,
html[data-theme="light"] .signal {
  color: var(--cyan);
}

html[data-theme="light"] .lede,
html[data-theme="light"] .section-note,
html[data-theme="light"] .hero-note,
html[data-theme="light"] .wordmark span,
html[data-theme="light"] .module-index,
html[data-theme="light"] .blog-meta,
html[data-theme="light"] small,
html[data-theme="light"] time,
html[data-theme="light"] .equipment-index {
  color: var(--muted);
}

html[data-theme="light"] .accent {
  color: var(--acid);
}

html[data-theme="light"] footer,
html[data-theme="light"] .footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
}

html[data-theme="light"] .hero-image {
  filter: brightness(0.95) contrast(1.05);
}

html[data-theme="light"] .tag {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="light"] .article-hero h1,
html[data-theme="light"] .article-content h2,
html[data-theme="light"] .content h2,
html[data-theme="light"] .next-post strong,
html[data-theme="light"] .next strong {
  color: var(--text);
}

html[data-theme="light"] .dek,
html[data-theme="light"] .article-content p,
html[data-theme="light"] .content p,
html[data-theme="light"] .toc a {
  color: #344253;
}

html[data-theme="light"] .article-meta,
html[data-theme="light"] .meta {
  color: var(--muted);
}

html[data-theme="light"] .backlink {
  background: var(--panel);
  border-color: var(--line);
  color: var(--cyan);
}

html[data-theme="light"] .pullquote,
html[data-theme="light"] .next-post,
html[data-theme="light"] .next {
  background: rgba(180, 83, 9, 0.07);
  border-color: rgba(180, 83, 9, 0.24);
}

html[data-theme="light"] .shade {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(245, 243, 238, 0.85) 78%, var(--bg) 100%);
}

/* About section */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.about-media {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(0deg, rgba(7, 9, 13, 0.18), rgba(7, 9, 13, 0.02)),
    url("/images/zdrojarna-lab.png") center / cover no-repeat;
}

.about-copy h2 {
  margin: 16px 0 18px;
  font-size: 44px;
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

.about-copy .lede {
  margin-bottom: 24px;
}

@media (max-width: 880px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-media {
    min-height: 280px;
  }

  .about-copy h2 {
    font-size: 34px;
  }
}

/* Toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  width: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius, 8px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.theme-toggle:hover {
  border-color: rgba(40, 231, 255, 0.32);
  background: rgba(40, 231, 255, 0.08);
  color: var(--text);
}

html[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(2, 132, 199, 0.32);
  background: rgba(2, 132, 199, 0.08);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: inline-block;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}
