/* ============================================================
   Blog.mikr.us — dostosowanie motywu "terminal" do designu PANEL
   (mikr.us, redesign 2026: "Terminal, ktory sie sprzedaje").
   Ladowany automatycznie przez head.html theme'u PO css motywu
   ("Custom CSS to override theme properties" — hak przewidziany
   przez sam theme, zero ingerencji w themes/terminal).
   Zrodlo tokenow/kolorow: PANEL/assets/ng/css/style.css
   ============================================================ */

/* ---------- Fonty (self-hosted, te same pliki co PANEL) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokeny PANEL (nadpisuja zmienne motywu terminal) ---------- */
:root {
  --background: #0b0c0e;
  --foreground: #e9e9ec;
  --accent: #ee7225;
  --radius: 14px;
  --font-size: 17px;
  --line-height: 1.68em;

  /* dodatkowe tokeny (nie ma ich w motywie, ale sa spojne z PANEL) */
  --surface: #15161a;
  --surface-2: #1b1c22;
  --surface-3: #212228;
  --border: #26272e;
  --border-2: #34353d;
  --muted: #9a9aa5;
  --accent-bright: #ff8a3d;
  --accent-soft: rgba(238, 114, 37, 0.12);
  --accent-line: rgba(238, 114, 37, 0.35);
  --green: #21d07a;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 16px 32px -22px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 0 1px var(--accent-line), 0 18px 40px -20px rgba(238, 114, 37, 0.4);
}

/* ---------- Baza: sans zamiast Fira Code, akcentowe tlo jak PANEL ---------- */
html {
  scrollbar-color: var(--accent) var(--background);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 8px; border: 3px solid var(--background); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-bright); }

body {
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}
::selection { background: var(--accent); color: #fff; }

/* Delikatna poswiata + siatka wezlow w tle, jak na PANEL — wygaszona
   nisko, zeby nie przeszkadzac w czytaniu dluzszych tekstow. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(46rem 34rem at 90% -14%, rgba(238, 114, 37, 0.16), transparent 58%),
    radial-gradient(46rem 40rem at -6% 0%, rgba(139, 92, 246, 0.14), transparent 58%),
    var(--background);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url(/img/bg-network.svg);
  background-size: 260px 260px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse 120% 60% at 50% -10%, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 120% 60% at 50% -10%, #000 40%, transparent 85%);
  opacity: 0.7;
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
}

code, kbd, pre, pre code {
  font-family: var(--font-mono) !important;
}

/* ---------- Kontener: szerzej i bez prawej kreski (motyw "terminala z ramka") ---------- */
.container {
  max-width: 1000px;
  border-right: none;
}
.container.full { max-width: 100%; }

/* ---------- Naglowek / logo / menu ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 -40px;
  padding: 0 40px;
  background: rgba(11, 12, 14, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header__inner { height: 64px; }
.header__logo::after { display: none; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  padding: 0;
}
.logo-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.navigation-menu { margin: 0; }
.navigation-menu__inner > li > a,
.navigation-menu__inner > li > .menu__trigger {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.navigation-menu__inner > li > a:hover { color: var(--foreground); background: rgba(255, 255, 255, 0.05); }
.menu__dropdown {
  border-radius: var(--radius-sm, 10px);
  border-color: var(--border-2);
  background: var(--surface-2);
  box-shadow: 0 22px 55px -22px rgba(0, 0, 0, 0.85);
}
.menu--mobile .menu__trigger,
.menu--language-selector .menu__trigger {
  border-color: var(--border-2);
  border-radius: 9px;
  color: var(--foreground);
}

@media print { .header { position: static; } }

/* ---------- Przyciski (jak .btn na PANEL: pigulka, gradient, cien) ---------- */
button,
.button,
a.button {
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--foreground);
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
button:hover,
.button:hover,
a.button:hover {
  background: var(--surface, #15161a);
  border-color: var(--muted);
  transform: translateY(-2px);
}
a.read-more,
a.read-more:hover,
a.read-more:active {
  border-radius: 10px;
  padding: 8px 16px !important;
  background-color: var(--accent);
  background-image: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #fff;
}
a.read-more:hover { transform: translateY(-2px); }
a.read-more.button.inline,
a.read-more.button.inline:hover,
a.read-more.button.inline:active {
  color: #fff;
}
a.button.inline {
  color: var(--accent-bright);
  font-weight: 600;
}

/* ---------- Karty wpisow na liscie (jak "feature"/"plan" na PANEL) ---------- */
.posts { display: flex; flex-direction: column; gap: 18px; margin-top: 0; }
.post.on-list {
  padding: 26px 28px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.post.on-list:hover {
  border-color: var(--accent-line);
  background: var(--surface-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.post.on-list:not(:last-of-type) { border-bottom: 1px solid var(--border); }

.post-title {
  color: var(--foreground);
  border-bottom: none;
  padding-bottom: 0;
}
h2.post-title { font-size: 22px; line-height: normal; margin-top: 0 !important; margin-bottom: 12px !important; }
h1.post-title { font-size: clamp(28px, 4.2vw, 42px); line-height: normal; letter-spacing: -0.03em; margin-bottom: 22px !important; }
.post-title::after { display: none; }
.post-title a:hover { color: var(--accent-bright); }
article.post:not(.on-list) .post-title { color: var(--foreground); }

.post-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.post-meta > *:not(:first-child)::before { color: var(--border-2); }
.post-tags {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.post-tags a {
  color: var(--accent-bright);
  font-weight: 600;
  text-decoration: none;
  transition: color .15s;
}
.post-tags a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Tresc artykulu ---------- */
.post-content { font-size: var(--font-size); }
.post-content a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--accent); }
.post-content h2 { font-size: 26px; margin-top: 44px; }
.post-content h3 { font-size: 20px; margin-top: 34px; }

/* Cytat jako karta z paskiem akcentu po lewej, bez terminalowego ">" */
blockquote {
  border: none;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
  padding: 18px 24px;
}
blockquote::before { content: none; }

table {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
table, th, td { border: 1px solid var(--border); }
th {
  background: var(--surface-2);
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
td { background: var(--surface); }
tr:hover td { background: var(--surface-2); }

/* Obrazki: czysta karta zamiast grubej ramki terminal-css */
img {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  box-shadow: var(--shadow-card);
}
figure { border-radius: var(--radius-sm); overflow: hidden; }
figure img { border-radius: var(--radius-sm) var(--radius-sm) 0 0; box-shadow: none; }
figure figcaption {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 14px;
}
iframe[src*="youtube.com"] {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 0 !important;
  box-shadow: var(--shadow-card);
}

/* ---------- Bloki kodu (jak "terminal" na PANEL: paski z kropkami + ciemna karta) ---------- */
:root { --code-border: var(--border); }
.highlight {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.highlight pre,
pre:not(.chroma) {
  background: var(--surface) !important;
}
pre.chroma { padding: 16px 18px; }

/* Pasek kodu z 3 "lampkami" jak w oknie terminala */
.code-title {
  position: relative;
  padding: 10px 16px 10px 54px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.code-title::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 17px 0 0 #febc2e, 34px 0 0 #28c840;
}
.copy-button {
  border-radius: 7px;
  border-color: var(--border-2);
  background: var(--surface-2);
}
.copy-button:hover { background: var(--surface-3); }
.collapsable-code {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.collapsable-code summary { font-family: var(--font-mono); }
code:not(pre code) {
  background: var(--surface-2);
  border-color: var(--border);
  border-radius: 6px;
}

/* ---------- Spis tresci: zwijana karta ---------- */
.table-of-contents {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 0 22px;
}
.table-of-contents summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--accent-bright);
  text-transform: uppercase;
}
.table-of-contents summary::-webkit-details-marker { display: none; }
.table-of-contents summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform .2s ease;
}
.table-of-contents[open] summary::before { transform: rotate(90deg); }
.table-of-contents nav { margin: 0 0 18px; }
.table-of-contents nav ul { margin: 10px 0 0; }
.table-of-contents nav a { color: var(--muted); text-decoration: none; }
.table-of-contents nav a:hover { color: var(--accent-bright); }

/* ---------- CTA na koncu wpisu ---------- */
.post-cta-box {
  border-color: var(--accent-line) !important;
  border-radius: var(--radius) !important;
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 60%);
  box-shadow: var(--shadow-card);
}
.post-cta-box a {
  color: var(--accent-bright);
  font-weight: 600;
}
.post-cta-box a:hover { color: var(--accent); }

/* Link powrotu do listy wpisow */
.post + p a[href="/"] {
  border-radius: 12px !important;
  border-color: var(--border-2) !important;
  color: var(--foreground) !important;
  background: var(--surface-2);
  transition: transform .15s ease, border-color .15s, background .15s;
}
.post + p a[href="/"]:hover {
  border-color: var(--muted) !important;
  background: var(--surface);
  transform: translateY(-2px);
}

/* ---------- Powiazane / najnowsze wpisy ---------- */
.related-posts {
  margin-top: 40px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.related-posts h2 { font-size: 18px; margin: 0 0 14px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--accent-bright); }
.related-posts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.related-posts ul li a { color: var(--foreground); text-decoration: none; }
.related-posts ul li a:hover { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Paginacja ---------- */
.pagination__title-h {
  background: var(--background);
  color: var(--muted);
  font-family: var(--font-mono);
}
.pagination__buttons a.button {
  border-radius: 12px;
  padding: 0;
  box-shadow: var(--shadow-card);
}

/* ---------- Stopka ---------- */
.footer {
  border-top: 1px solid var(--border);
  opacity: 1;
}
.footer .copyright {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.footer .copyright a:first-child { color: var(--foreground); font-weight: 700; }
.footer a:hover { color: var(--accent-bright); }

/* ---------- Formularze (jesli kiedys pojawia sie w tresci) ---------- */
input, textarea, select {
  border-radius: 10px;
  border-color: var(--border-2);
  background: var(--surface);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  border-color: var(--accent);
}

@media (max-width: 684px) {
  .header { margin: 0 -20px; padding: 0 20px; }
}
