/* =========================================================
   MAGT / ANOVI UNIFIED THEME SYSTEM
   style.css — standalone, Quarto-compatible

   Usage:
     <link rel="stylesheet" href="style.css">
     <body class="theme-mtp">   — oficjalna / MagT.pro
     <body class="theme-anovi"> — callsign / personal

   Quarto (_quarto.yml):
     format:
       html:
         css: style.css
         body-classes: "theme-mtp"
========================================================= */

/* =========================================================
   GOOGLE FONTS IMPORT
   Usuń jeśli ładujesz czcionki inaczej (np. lokalnie)
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* =========================================================
   ROOT TOKENS — wspólne dla obu motywów
========================================================= */
:root {
  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", monospace;

  --radius-card:   14px;
  --radius-button: 10px;
  --radius-pill:   999px;

  --transition-fast: 0.2s ease;
  --transition-med:  0.35s ease;

  /* TYPE SCALE */
  --text-xs:   0.72rem;
  --text-sm:   0.85rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.35rem;
  --text-xl:   1.7rem;
  --text-2xl:  2.2rem;
  --text-3xl:  3rem;
  --text-hero: clamp(2.8rem, 6vw, 5rem);

  /* SPACING */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-8:  3rem;
  --space-10: 5rem;
}

/* =========================================================
   THEME: MTP / MagT.pro
   Amber executive + malachite / bottle green
========================================================= */
.theme-mtp {
  --bg-main:    #0C1812;
  --bg-section: #122018;
  --bg-panel:   #1A2E22;
  --bg-deep:    #070F0A;

  --text-primary:   #F2EEE5;
  --text-secondary: #D5D0C4;
  --text-muted:     #8FA898;
  --text-faint:     #7B9A8B;  /* ↑ z #4E6358 — WCAG AA 5.92:1 na bg_main */

  /* Amber — akcent główny */
  --accent-primary:   #D98C2B;
  --accent-hover:     #F3C071;

  /* Malachit / butelkowa zieleń — akcent drugorzędny */
  --accent-secondary: #1E6B4A;
  --accent-greenops:  #32AC74;  /* ↑ z #2E9E6B — WCAG AA 5.0:1 na bg_panel */
  --accent-malachite: #1DB874;  /* jasny malachit do podświetleń */

  --accent-wine: #6F2E37;

  --border-subtle: #1E3828;
  --border-strong: #2D5440;
  --border-accent: rgba(217,140,43,0.35);

  /* Glow amber */
  --glow-primary:
    0 0 0 1px rgba(217,140,43,0.3),
    0 0 14px rgba(217,140,43,0.22),
    0 0 32px rgba(217,140,43,0.12);

  /* Glow malachitowy — dla greenops */
  --glow-green:
    0 0 8px rgba(29,184,116,0.45),
    0 0 22px rgba(29,184,116,0.2);

  --shadow-card:
    0 4px 6px rgba(0,0,0,0.45),
    0 12px 32px rgba(0,0,0,0.55);

  /* RGB do obliczeń */
  --accent-rgb: 217,140,43;
  --green-rgb:  29,184,116;
}

/* =========================================================
   THEME: ANOVI / Ano Vimier
   Phosphor olive + oxidized amber
========================================================= */
.theme-anovi {
  --bg-main:    #0B0D0E;
  --bg-section: #111517;
  --bg-panel:   #1E2326;
  --bg-deep:    #050607;

  --text-primary:   #F4F1E8;
  --text-secondary: #D8D2C6;
  --text-muted:     #8A9296;
  --text-faint:     #7E8C96;  /* ↑ z #4A5256 — WCAG AA 5.64:1 na bg_main */

  --accent-primary:   #93A13B;
  --accent-hover:     #B38B3D;
  --accent-secondary: #7B8B4A;
  --accent-greenops:  #769C64;  /* ↑ z #6A8F5A — WCAG AA 5.07:1 na bg_panel */
  --accent-malachite: #7AB87A;

  --accent-wine: #7A2634;

  --border-subtle: #3A4347;
  --border-strong: #596368;
  --border-accent: rgba(147,161,59,0.4);

  --glow-primary:
    0 0 8px rgba(147,161,59,0.42),
    0 0 20px rgba(179,139,61,0.22);

  --glow-green:
    0 0 10px rgba(106,143,90,0.4);

  --shadow-card:
    0 4px 6px rgba(0,0,0,0.5),
    0 12px 32px rgba(0,0,0,0.6);

  --accent-rgb: 147,161,59;
  --green-rgb:  106,143,90;
}

/* =========================================================
   BASE RESET
========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */
h1 {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

h4 {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-secondary);
}

p {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.75;
}

small,
.text-muted {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
  text-shadow: var(--glow-primary);
}

code {
  background: var(--bg-deep);
  color: var(--accent-hover);
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.12rem 0.38rem;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
}

pre {
  background: var(--bg-deep);
  color: var(--accent-hover);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.7;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  padding: var(--space-4);
  overflow-x: auto;
}

/* =========================================================
   LAYOUT BLOCKS
========================================================= */
section {
  background: var(--bg-section);
}

.card,
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover,
.panel:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card), var(--glow-primary);
}

header,
.navbar,
footer {
  background: var(--bg-deep);
  border-color: var(--border-subtle);
}

/* =========================================================
   BUTTONS
   Hover  → żarzenie (glow box-shadow)
   Active → iskra na obwódce (spark keyframe)
========================================================= */
.btn,
button:not(.lang-btn) {
  position: relative;
  overflow: hidden;

  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-button);
  padding: 0.7rem 1.25rem;
  cursor: pointer;

  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.03em;

  transition:
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

/* — HOVER: żarzenie ——————————————————————————————— */
.btn:hover,
button:not(.lang-btn):hover {
  color: var(--accent-hover);
  border-color: var(--accent-primary);
  box-shadow:
    var(--glow-primary),
    inset 0 0 10px rgba(var(--accent-rgb), 0.07);
  transform: translateY(-1px);
}

/* — ACTIVE / CLICK: iskra na obwódce ———————————— */
.btn:active,
button:not(.lang-btn):active {
  transform: translateY(0);
  box-shadow: none;
  animation: sparkBorder 0.45s ease forwards;
  border-color: var(--accent-hover);
}

@keyframes sparkBorder {
  0%   {
    box-shadow:
      0 0 0 0 rgba(var(--accent-rgb), 0),
      inset 0 0 0 0 rgba(var(--accent-rgb), 0);
  }
  15%  {
    box-shadow:
      0 0 0 3px rgba(var(--accent-rgb), 0.7),
      inset 0 0 8px rgba(var(--accent-rgb), 0.25);
  }
  40%  {
    box-shadow:
      0 0 0 6px rgba(var(--accent-rgb), 0.3),
      0 0 18px rgba(var(--accent-rgb), 0.35),
      inset 0 0 12px rgba(var(--accent-rgb), 0.15);
  }
  100% {
    box-shadow:
      0 0 0 10px rgba(var(--accent-rgb), 0),
      0 0 28px rgba(var(--accent-rgb), 0);
  }
}

/* Pseudo-element: iskra-błysk na samej krawędzi */
.btn::after,
button:not(.lang-btn)::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid transparent;
  pointer-events: none;
  opacity: 0;
}

.btn:active::after,
button:not(.lang-btn):active::after {
  animation: sparkRim 0.5s ease forwards;
}

@keyframes sparkRim {
  0%   { border-color: rgba(var(--accent-rgb), 0); opacity: 0; }
  20%  { border-color: rgba(var(--accent-rgb), 0.9); opacity: 1; }
  55%  { border-color: rgba(var(--accent-rgb), 0.4); opacity: 0.7; }
  100% { border-color: rgba(var(--accent-rgb), 0); opacity: 0; }
}

/* — FOCUS ————————————————————————————————————————— */
.btn:focus-visible,
button:not(.lang-btn):focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* — VARIANTS ——————————————————————————————————————— */
.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-deep);
  border-color: transparent;
  font-weight: 600;
  --accent-rgb: var(--accent-rgb); /* dziedziczone z motywu */
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-deep);
  border-color: transparent;
}

.btn-ghost {
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-danger {
  color: #C65A3A;
  border-color: rgba(198,90,58,0.3);
  --accent-rgb: 198,90,58;
}

.btn-danger:hover {
  border-color: #C65A3A;
}

.btn-pill {
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.1rem;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================================
   ANOVI SIGNAL SWEEP — dodatkowy efekt sweepowania na hover
========================================================= */
.theme-anovi .btn-signal::before {
  content: "";
  position: absolute;
  top: -120%; left: -120%;
  width: 250%; height: 250%;
  background: linear-gradient(
    120deg,
    transparent 35%,
    rgba(255,255,255,0.04) 44%,
    rgba(147,161,59,0.65) 50%,
    rgba(179,139,61,0.12) 56%,
    transparent 65%
  );
  transform: translateX(-60%) translateY(-60%) rotate(12deg);
  opacity: 0;
  pointer-events: none;
}

.theme-anovi .btn-signal:hover::before {
  animation: signalSweep 1.1s linear;
  opacity: 1;
}

@keyframes signalSweep {
  0%   { transform: translateX(-60%) translateY(-60%) rotate(12deg); }
  100% { transform: translateX(60%)  translateY(60%)  rotate(12deg); }
}

/* =========================================================
   DEMO LAYOUT (strona podglądu — dwie kolumny)
   W produkcji / Quarto: usuń, użyj jednego motywu na <body>
========================================================= */
.demo-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding-top: 38px;
}

@media (max-width: 900px) {
  .demo-wrapper { grid-template-columns: 1fr; }
}

.demo-col {
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  position: relative;
  overflow: hidden;
}

.demo-col::after {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; opacity: 0.45; z-index: 0;
}

.demo-col > * { position: relative; z-index: 1; }
.demo-wrapper .theme-mtp { border-right: 1px solid #1a1a1a; }

/* =========================================================
   TYPE SCALE
========================================================= */
.type-scale {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.type-row {
  display: flex; align-items: baseline; gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.type-row:last-child { border-bottom: none; }

.type-label {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--text-faint); min-width: 54px; flex-shrink: 0;
}

.type-sample        { line-height: 1.2; }
.type-sample.h1     { font-size: var(--text-3xl); font-weight: 700; color: var(--accent-primary); letter-spacing: -0.02em; }
.type-sample.h2     { font-size: var(--text-2xl); font-weight: 600; color: var(--text-primary);   letter-spacing: -0.01em; }
.type-sample.h3     { font-size: var(--text-xl);  font-weight: 600; color: var(--text-primary); }
.type-sample.h4     { font-size: var(--text-lg);  font-weight: 500; color: var(--text-secondary); }
.type-sample.body   { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.7; }
.type-sample.small  { font-size: var(--text-sm);  color: var(--text-muted); }
.type-sample.mono   { font-size: var(--text-sm);  font-family: var(--font-mono); color: var(--accent-hover); }

/* =========================================================
   BUTTON SHOWCASE
========================================================= */
.btn-showcase {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center;
}

/* =========================================================
   CARDS SECTION
========================================================= */
.cards-section {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: var(--space-4);
}

.card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-3);
}

.card-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--bg-section); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}

.card-title {
  font-size: var(--text-md); font-weight: 600; color: var(--text-primary);
  margin-bottom: var(--space-1); line-height: 1.3;
}

.card-desc {
  font-size: var(--text-sm); color: var(--text-muted); line-height: 1.6;
}

.card-meta {
  display: flex; align-items: center; gap: var(--space-3);
  margin-top: var(--space-4); padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

/* =========================================================
   TAGS SECTION
========================================================= */
.tags-section {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center;
}

/* =========================================================
   CODE BLOCK
========================================================= */
.code-section {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.code-block {
  background: var(--bg-deep); border: 1px solid var(--border-subtle);
  border-radius: 10px; overflow: hidden;
}

.code-header {
  background: var(--bg-panel); padding: 0.55rem var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}

.code-lang {
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--text-faint); letter-spacing: 0.1em;
}

.code-dots { display: flex; gap: 5px; }
.code-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--border-subtle); }

pre.code-body {
  background: transparent; border: none; border-radius: 0;
  margin: 0; padding: var(--space-4);
  overflow-x: auto;
  font-family: var(--font-mono); font-size: var(--text-xs);
  line-height: 1.7; color: var(--accent-hover);
}

/* =========================================================
   MINI NAV SECTION
========================================================= */
.mini-nav {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-icon { font-size: 0.9rem; width: 18px; text-align: center; }

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.05em;
  transition: box-shadow var(--transition-fast);
}

.brand-mark:hover { box-shadow: var(--glow-primary); }

.brand-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  letter-spacing: 0.03em;
  padding: var(--space-1) 0;
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-faint);
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-greenops);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* =========================================================
   HERO
========================================================= */
.hero {
  background: var(--bg-section);
  padding: var(--space-10) var(--space-6) var(--space-8);
  position: relative;
  overflow: hidden;
}

.theme-mtp .hero::before {
  content: "";
  position: absolute; top: -60px; right: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(29,184,116,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.theme-anovi .hero::before {
  content: "";
  position: absolute; top: -60px; right: -60px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(147,161,59,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  display: flex; align-items: center; gap: var(--space-2);
}

.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--accent-primary);
}

.hero-title {
  font-size: var(--text-hero);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.hero-title em {
  font-style: normal;
  color: var(--accent-primary);
}

.hero-sub {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.65;
  margin-bottom: var(--space-6);
}

.hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}

/* =========================================================
   SECTION LABEL
========================================================= */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: var(--space-5);
  display: flex; align-items: center; gap: var(--space-3);
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* =========================================================
   BADGE
========================================================= */
.badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.badge-accent {
  color: var(--accent-primary);
  border-color: var(--border-accent);
  background: transparent;
}

.badge-green {
  color: var(--accent-greenops);
  border-color: rgba(var(--green-rgb), 0.3);
}

/* =========================================================
   SEMANTIC TAGS
========================================================= */
.tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 5px;
  border: 1px solid;
}

.tag-security     { color: #C65A3A; border-color: rgba(198,90,58,0.3);   background: rgba(198,90,58,0.06); }
.tag-resilience   { color: var(--accent-primary); border-color: var(--border-accent); background: transparent; }
.tag-greenops     { color: var(--accent-greenops); border-color: rgba(var(--green-rgb),0.3); background: rgba(var(--green-rgb),0.06); }
.tag-architecture { color: #7C8E95; border-color: rgba(124,142,149,0.3); background: rgba(124,142,149,0.06); }
.tag-wine         { color: var(--accent-wine); border-color: rgba(111,46,55,0.35); background: rgba(111,46,55,0.07); }

/* Semantic color utilities */
.security     { color: #C65A3A; }
.resilience   { color: var(--accent-primary); }
.greenops     { color: var(--accent-greenops); }
.architecture { color: #7C8E95; }
.wine-accent  { color: var(--accent-wine); }
.malachite    { color: var(--accent-malachite); }

/* =========================================================
   PERSONAL LOG — ANOVI
========================================================= */
.theme-anovi .personal-log {
  background:
    linear-gradient(180deg, rgba(147,161,59,0.035), rgba(0,0,0,0)),
    #0D1011;
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 10px 10px 0;
  padding: 1.2rem 1.4rem;
  position: relative;
  box-shadow: inset 0 0 24px rgba(147,161,59,0.035);
}

.theme-anovi .personal-log::before {
  content: attr(data-label);
  position: absolute;
  top: -0.7rem; right: 1rem;
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  color: rgba(179,139,61,0.52);
  background: var(--bg-main);
  padding: 0 0.5rem;
  font-family: var(--font-mono);
}

.log-timestamp {
  color: rgba(179,139,61,0.52);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  margin-bottom: var(--space-3);
  letter-spacing: 0.08em;
}

.log-title {
  color: var(--accent-hover);
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.log-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.log-note {
  color: var(--text-muted);
  font-style: italic;
  border-left: 2px solid rgba(147,161,59,0.28);
  padding-left: 0.8rem;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
}

/* =========================================================
   EXECUTIVE BRIEF — MTP
========================================================= */
.theme-mtp .briefing-block {
  background:
    linear-gradient(180deg, rgba(29,184,116,0.04), rgba(0,0,0,0)),
    #07120D;
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 10px 10px 0;
  padding: 1.2rem 1.4rem;
  position: relative;
}

.theme-mtp .briefing-block::before {
  content: attr(data-label);
  position: absolute;
  top: -0.7rem; right: 1rem;
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  color: rgba(217,140,43,0.45);
  background: var(--bg-main);
  padding: 0 0.5rem;
  font-family: var(--font-mono);
}

.brief-label {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  color: rgba(217,140,43,0.5);
  margin-bottom: var(--space-3);
}

.brief-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.brief-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* =========================================================
   MINI NAVIGATION
========================================================= */
.mini-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.mini-nav-item a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.mini-nav-item a:hover {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.mini-nav-item.active a {
  background: var(--bg-panel);
  color: var(--accent-primary);
  border-left: 2px solid var(--accent-primary);
  padding-left: calc(0.75rem - 2px);
}

/* =========================================================
   FOOTER
========================================================= */
footer.site-footer,
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

.footer-brand span { color: var(--accent-primary); }

.footer-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
}

.footer-links a {
  color: var(--text-faint);
  font-size: var(--text-xs);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--accent-primary); }

/* =========================================================
   LANGUAGE SWITCHER BAR
   Neutralny — nie należy do żadnego motywu
========================================================= */
.lang-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e1e1e;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.5rem;
}

.lang-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: #4a4a4a;
  text-transform: uppercase;
}

.lang-toggle {
  display: flex;
  background: #0e0e0e;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #555;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-btn:hover { color: #999; }

.lang-btn.active {
  background: #1e1e1e;
  color: #e8e8e8;
}

.lang-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 2px;
  border-radius: 2px;
  background: #666;
}

.lang-divider {
  width: 1px;
  background: #2a2a2a;
  align-self: stretch;
}

/* =========================================================
   LANG TRANSITION FLASH
========================================================= */
.lang-flash {
  animation: langFade 0.25s ease both;
}

@keyframes langFade {
  0%   { opacity: 0.25; }
  100% { opacity: 1; }
}

/* =========================================================
   SELECTION
========================================================= */
::selection {
  background: var(--accent-primary);
  color: var(--bg-main);
}

/* =========================================================
   ANIMATIONS
========================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-1 { animation: fadeUp 0.5s 0.0s ease both; }
.anim-2 { animation: fadeUp 0.5s 0.1s ease both; }
.anim-3 { animation: fadeUp 0.5s 0.2s ease both; }
.anim-4 { animation: fadeUp 0.5s 0.3s ease both; }

/* =========================================================
   CODE SYNTAX HIGHLIGHT CLASSES
========================================================= */
.code-comment { color: var(--text-faint); }
.code-key     { color: var(--accent-primary); }
.code-val     { color: var(--text-secondary); }
.code-str     { color: var(--accent-greenops); }


/* =========================================================
   MAGT.OVH ONE-PAGE OVERRIDES
========================================================= */

body.theme-anovi { min-height: 100vh; }

.page-main {
  max-width: 1120px;
  margin: 0 auto;
}

.site-section {
  padding: var(--space-8) var(--space-6);
  background: var(--bg-main);
}

.site-section.alt {
  background: var(--bg-section);
}

.brand-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(179,139,61,0.22));
}

.brand-logo-small {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(179,139,61,0.18));
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.hero-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.hero-brand-main {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-hover);
  text-transform: uppercase;
}

.hero-brand-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-anovi .hero-title em { color: var(--accent-hover); }
.hero-sub.wide { max-width: 720px; }

.question-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.flip-card {
  perspective: 1100px;
  min-height: 250px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  min-height: 250px;
  transition: transform 0.7s ease;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card, 14px);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.flip-card-front {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.flip-card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: var(--border-accent);
}

.flip-label {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.flip-title {
  color: var(--accent-hover);
  font-size: var(--text-lg);
  line-height: 1.25;
  margin-bottom: var(--space-3);
}

.flip-question {
  color: var(--text-primary);
  font-size: var(--text-md);
  line-height: 1.45;
  margin-top: var(--space-4);
}

.flip-body {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.flip-hint {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: var(--text-xs);
  margin-top: var(--space-4);
}

.project-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: stretch;
}

.card.featured { border-color: var(--border-accent); }

.philosophy {
  font-size: var(--text-md);
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 860px;
}

.quote-line {
  border-left: 3px solid var(--accent-primary);
  padding-left: var(--space-5);
  margin: var(--space-5) 0;
  color: var(--text-primary);
  font-size: var(--text-lg);
  line-height: 1.55;
}

.contact-box {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.email-obfuscated {
  font-family: var(--font-mono);
  color: var(--accent-hover);
  letter-spacing: 0.04em;
}

.site-footer { flex-wrap: wrap; }

.footer-note {
  color: var(--text-muted);
  font-size: var(--text-xs);
  max-width: 680px;
}

@media (max-width: 980px) {
  .question-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .navbar { align-items: flex-start; }
  .nav-links { display: none; }
  .hero { padding: var(--space-8) var(--space-5); }
  .hero-brand { align-items: flex-start; }
  .brand-logo { width: 58px; height: 58px; }
  .question-grid { grid-template-columns: 1fr; }
  .site-section { padding: var(--space-6) var(--space-5); }
  footer.site-footer, .site-footer { align-items: flex-start; flex-direction: column; }
}
