/* ============================================================
   article.css — Aurora Monitor: Nauka o Zorzach
   Spójny wizualnie z dashboard.css aurora3
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Crimson+Pro:ital,wght@0,400;0,600;1,400&display=swap');

/* ── Zmienne — identyczne z dashboard.css ── */
:root {
  --bg:         #0b1220;
  --bg2:        #111827;
  --card:       #131f35;
  --card2:      #1a2540;
  --text:       #eef2ff;
  --muted:      rgba(238,242,255,.65);
  --line:       rgba(255,255,255,.08);
  --shadow:     0 10px 32px rgba(0,0,0,.4);
  --radius:     16px;
  --ok:         #18d66b;
  --warn:       #ffb020;
  --bad:        #ff4d6d;
  --ext:        #b56cff;
  --accent:     #3b82f6;
  --accent2:    #60a5fa;
  --glow-green: rgba(24,214,107,.15);
  --glow-blue:  rgba(59,130,246,.12);

  --font-head:  'Space Grotesk', system-ui, sans-serif;
  --font-body:  'Crimson Pro', Georgia, serif;
  --font-mono:  'Space Grotesk', system-ui, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Body ── */
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(ellipse 1400px 700px at 15% -5%,  rgba(59,130,246,.10), transparent 55%),
    radial-gradient(ellipse 1000px 600px at 85% 20%,  rgba(181,108,255,.08), transparent 55%),
    radial-gradient(ellipse 800px  800px at 50% 80%,  rgba(24,214,107,.05), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,.4); border-radius: 3px; }

/* ── Layout ── */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   NAWIGACJA
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,18,32,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-logo {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--ok);
  white-space: nowrap;
  letter-spacing: .5px;
  text-decoration: none;
  margin-right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-logo::before {
  content: '🌌';
  font-size: 16px;
}

.nav-link {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  letter-spacing: .3px;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(59,130,246,.15);
}
/* ── Mini-KPI Bz w navbarze ── */
.nav-kpi {
  display: flex;
  align-items: baseline;
  gap: 4px;
  background: rgba(59,130,246,.10);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 20px;
  padding: 3px 12px 3px 10px;
  margin-left: 4px;
  cursor: default;
  transition: background .2s;
  white-space: nowrap;
}
.nav-kpi:hover { background: rgba(59,130,246,.18); }

.nav-kpi-label {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .7;
}
.nav-kpi-value {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  transition: color .4s;
  line-height: 1;
}
.nav-kpi-unit {
  font-family: var(--font-head);
  font-size: 10px;
  color: var(--muted);
  opacity: .6;
}


/* ============================================================
   HERO / KPI HEADER
   ============================================================ */
.hero {
  padding: 64px 20px 48px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}
/* Hero content max-width wyśrodkowany */
.hero-eyebrow,
.hero-title,
.hero-sub {
  max-width: 860px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--ok);
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: .85;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, rgba(147,197,253,.8) 60%, var(--ok) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* ── KPI strip ── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.kpi-card:hover {
  border-color: rgba(59,130,246,.3);
  transform: translateY(-2px);
}
.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,.06), transparent 60%);
  pointer-events: none;
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}
.kpi-value .unit {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 2px;
}

.kpi-bar-bg {
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
}
.kpi-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .6s ease;
}

.kpi-source {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
  opacity: .6;
}

.kpi-live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 4px;
  animation: pulse-dot 2s infinite;
  vertical-align: middle;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(24,214,107,.5); }
  50% { opacity: .7; box-shadow: 0 0 0 4px rgba(24,214,107,0); }
}

/* ============================================================
   ARTYKUŁ
   ============================================================ */
.article-wrap {
  padding-bottom: 80px;
}

/* ── Chapter ── */
.chapter {
  padding: 80px 0 20px;
}

.chapter-number {
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 10px;
  opacity: .8;
}

.chapter-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: -.3px;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--text);
}

.chapter-divider {
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(59,130,246,0) 100%);
  border: none;
  margin: 20px 0 36px;
  border-radius: 1px;
}

/* ── Section ── */
.section {
  margin-bottom: 56px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.section-num {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent2);
  opacity: .85;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -.3px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.2px;
}

/* ── Image block ── */
.section-img {
  float: right;
  width: min(340px, 45%);
  margin: 0 0 20px 28px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
}
.section-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.section-img figcaption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  padding: 8px 12px;
  line-height: 1.4;
  opacity: .75;
  border-top: 1px solid var(--line);
}
.clearfix::after { content: ''; display: table; clear: both; }

/* ── Placeholder image ── */
.img-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(181,108,255,.06));
  color: var(--muted);
}
.img-placeholder .ph-icon { font-size: 28px; opacity: .5; }
.img-placeholder .ph-text { font-family: var(--font-mono); font-size: 10px; opacity: .5; }

/* ── Prose ── */
.prose p {
  margin-bottom: 16px;
  color: rgba(238,242,255,.88);
}
.prose p:last-child { margin-bottom: 0; }

/* ── Callout bullets ── */
.prose ul {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}
.prose ul li {
  padding: 10px 14px 10px 42px;
  position: relative;
  border-left: 2px solid rgba(59,130,246,.2);
  margin-bottom: 8px;
  border-radius: 0 8px 8px 0;
  background: rgba(59,130,246,.04);
  color: rgba(238,242,255,.85);
  font-size: 17px;
}
.prose ul li::before {
  content: '›';
  position: absolute;
  left: 14px;
  color: var(--accent2);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.5;
}
.prose ul li strong {
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 600;
  font-style: normal;
}

/* ── Highlight box ── */
.highlight-box {
  background: linear-gradient(135deg, rgba(24,214,107,.07), rgba(24,214,107,.03));
  border: 1px solid rgba(24,214,107,.2);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0;
  position: relative;
}
.highlight-box::before {
  content: '⚡';
  position: absolute;
  top: -11px;
  left: 20px;
  background: var(--bg);
  padding: 0 8px;
  font-size: 16px;
}
.highlight-box p {
  margin: 0;
  font-family: var(--font-head);
  font-size: 15px;
  color: rgba(238,242,255,.9);
  line-height: 1.6;
}
.highlight-box strong {
  color: var(--ok);
}

/* ── Parametr callout ── */
.param-callout {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
}
.param-callout .param-sym {
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--accent2);
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}
/* Wzory matematyczne — zawijają się, nie mają stałej szerokości */
.param-callout .param-sym.formula {
  font-size: 13px;
  width: auto;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
  padding: 4px 0;
  max-width: 220px;
}
.param-callout .param-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}
.param-callout .param-desc strong {
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
  font-style: normal;
}

/* ── Quick tip ── */
.quick-tip {
  background: linear-gradient(135deg, rgba(255,176,32,.07), rgba(255,176,32,.03));
  border-left: 3px solid var(--warn);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-family: var(--font-head);
  font-size: 15px;
  color: rgba(238,242,255,.85);
  line-height: 1.6;
}
.quick-tip::before {
  content: '💡 ';
}

/* ── Gear list (equipment) ── */
.gear-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.gear-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.gear-block h4 {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gear-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.gear-block ul li {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--muted);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  display: flex;
  justify-content: space-between;
  border-left: none;
  border-radius: 0;
  background: none;
  margin: 0;
}
.gear-block ul li::before { display: none; }
.gear-block ul li:last-child { border-bottom: none; }
.gear-block ul li span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ok);
}

/* ── Bz legend ── */
.bz-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.bz-item {
  background: var(--card);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
  border: 1px solid var(--line);
}
.bz-item .bz-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.bz-item .bz-desc {
  font-family: var(--font-head);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1.5;
}
.bz-desc small {
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
  display: block;
  margin-top: 2px;
}
.bz-north .bz-val { color: var(--ok); }
.bz-mid   .bz-val { color: var(--warn); }
.bz-south .bz-val { color: var(--bad); }

/* ── Aurora color palette ── */
.aurora-colors {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}
.aurora-color-chip {
  flex: 1;
  min-width: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.aurora-color-chip .chip-swatch {
  height: 70px;
}
.aurora-color-chip .chip-label {
  padding: 10px 12px;
  background: var(--card);
}
.aurora-color-chip .chip-name {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  display: block;
}
.aurora-color-chip .chip-alt {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.chip-green  .chip-swatch { background: linear-gradient(160deg, #18d66b, #0d9b4d); }
.chip-red    .chip-swatch { background: linear-gradient(160deg, #ff4d6d, #c0253d); }
.chip-purple .chip-swatch { background: linear-gradient(160deg, #b56cff, #7c3aed); }

/* ── Bibliography ── */
.bibliography {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 40px;
}
.bibliography h4 {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 14px;
  opacity: .8;
}
.bibliography ol {
  padding-left: 20px;
  margin: 0;
}
.bibliography li {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 6px;
}
.bibliography li:last-child { margin-bottom: 0; }

/* ── Chapter nav (in-article) ── */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.chapter-nav a {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent2);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}
.chapter-nav a:hover { color: var(--text); }
.chapter-nav .nav-prev::before { content: '←'; }
.chapter-nav .nav-next::after  { content: '→'; }

/* ── Scroll progress ── */
.scroll-progress {
  position: fixed;
  top: 54px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,.06);
  z-index: 99;
}
.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ok), var(--accent));
  width: 0%;
  transition: width .1s linear;
}

/* ── Table of contents (sidebar-like) ── */
.toc-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 48px;
}
.toc-box h3 {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}
.toc-list li a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.toc-list li a:hover {
  color: var(--text);
  background: rgba(59,130,246,.1);
}
.toc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent2);
  opacity: .6;
  flex-shrink: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  margin-top: 80px;
  padding: 48px 20px 32px;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}

.footer-about .footer-logo {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--ok);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-about p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 420px;
}

.footer-meta {
  text-align: right;
}
.footer-author {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.footer-date, .footer-contact {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.footer-contact a {
  color: var(--accent2);
  text-decoration: none;
}
.footer-contact a:hover { text-decoration: underline; }

.footer-bottom {
  max-width: 860px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  opacity: .6;
}
.footer-dashboard-link {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent2);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid rgba(59,130,246,.3);
  border-radius: 20px;
  transition: all .2s;
}
.footer-dashboard-link:hover {
  background: rgba(59,130,246,.1);
  border-color: var(--accent2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  .hero { padding: 40px 16px 32px; }
  .wrap { padding: 0 16px; }

  .section-img {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
  }

  .gear-grid { grid-template-columns: 1fr; }
  .bz-legend { grid-template-columns: 1fr; }
  .aurora-colors { flex-direction: column; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-meta { text-align: left; }

  .kpi-strip { grid-template-columns: repeat(2, 1fr); }

  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .chapter { padding: 48px 0 16px; }
  .chapter-nav { flex-direction: column; gap: 12px; }
}

@media (max-width: 380px) {
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 24px; }
}

/* ── Animations on load ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow  { animation: fadeUp .5s ease both; }
.hero-title    { animation: fadeUp .5s .1s ease both; }
.hero-sub      { animation: fadeUp .5s .2s ease both; }
.kpi-strip     { animation: fadeUp .5s .3s ease both; }
.toc-box       { animation: fadeUp .5s .4s ease both; }
