/* 185: şəxsi texniki bloq. Açıq/tünd tema yalnız prefers-color-scheme ilə (JS yoxdur). Şrift: Inter (latin + latin-ext: ə ö ü ş ç ı ğ İ),
   özümüzdən verilir, üçüncü tərəfə sorğu yoxdur. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-latin-ext-v2.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-latin-v2.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; }

:root {
  color-scheme: light;
  --bg: #ffffff; --surface: #f4f6f9; --ink: #1b1f27; --ink-muted: #5a6372; --line: #dfe3ea;
  --accent: #0b57d0; --accent-ink: #ffffff; --code-bg: #f1f3f7;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 44rem;
  --sql-bg: #eef1f6; --sql-bar: #e3e8f0; --sql-k: #7a2bb8; --sql-s: #0b6b3a; --sql-n: #a8420a; --sql-c: #566070; --sql-f: #0f4fb0; --sql-r: #566070;
}
/* 195: tema. Defolt cihaz rejimi (JS-siz də işləyir); seçilmiş tema (data-theme, localStorage) cihaz rejimini üstələyir. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --bg: #0f1318; --surface: #171c23; --ink: #e7eaf0; --ink-muted: #a1a9b6; --line: #2a313b;
    --accent: #8ab4f8; --accent-ink: #0f1318; --code-bg: #1a2029;
    --sql-bg: #161c25; --sql-bar: #1f2733; --sql-k: #c7a4ff; --sql-s: #7fe0a6; --sql-n: #ffb27d; --sql-c: #a6aebb; --sql-f: #8ab4f8; --sql-r: #a6aebb; }
}
:root[data-theme="dark"] { color-scheme: dark; --bg: #0f1318; --surface: #171c23; --ink: #e7eaf0; --ink-muted: #a1a9b6; --line: #2a313b;
  --accent: #8ab4f8; --accent-ink: #0f1318; --code-bg: #1a2029;
  --sql-bg: #161c25; --sql-bar: #1f2733; --sql-k: #c7a4ff; --sql-s: #7fe0a6; --sql-n: #ffb27d; --sql-c: #a6aebb; --sql-f: #8ab4f8; --sql-r: #a6aebb; }
:root[data-theme="light"] { color-scheme: light; --bg: #ffffff; --surface: #f4f6f9; --ink: #1b1f27; --ink-muted: #5a6372; --line: #dfe3ea;
  --accent: #0b57d0; --accent-ink: #ffffff; --code-bg: #f1f3f7;
  --sql-bg: #eef1f6; --sql-bar: #e3e8f0; --sql-k: #7a2bb8; --sql-s: #0b6b3a; --sql-n: #a8420a; --sql-c: #566070; --sql-f: #0f4fb0; --sql-r: #566070; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--font); }
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent); text-underline-offset: 0.18em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.5rem; padding-top: 1rem; padding-bottom: 0.85rem; }
.brand { font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.95rem; }
.nav a { color: var(--ink-muted); text-decoration: none; padding: 0.15rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* 195: tema düyməsi (başlıqda, menyunun sağında; ay/günəş SVG) */
.theme-toggle { order: 3; margin-left: auto; align-self: center; display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent;
  color: var(--ink-muted); cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--ink); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle[data-mode="dark"] .icon-moon, .theme-toggle[data-mode="light"] .icon-sun { display: none; }
@media (max-width: 640px) {
  .brand { order: 1; }
  .theme-toggle { order: 2; width: 2.75rem; height: 2.75rem; }
  .nav { order: 3; flex-basis: 100%; }
}

/* 192/193: qısa təqdimat (sakit, başlıqdan xırda) */
.intro { margin: 0 0 1.5rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.intro p { margin: 0; }
.intro-name { font-weight: 700; font-size: 1.05rem; }
.intro-line { color: var(--ink-muted); font-size: 0.95rem; line-height: 1.5; }
.intro-line a { color: var(--accent); }
.entry .intro { margin: 0; padding: 0; border: 0; }
.entry .intro-name { font-size: 1.1rem; margin-bottom: 0.25rem; }
.entry .intro-line { font-size: 1rem; color: var(--ink); }

/* 196: SQL kod paneli (rənglənmə build zamanıdır; token-lər hər iki temada kontrast >= 4.5:1) */
.sql-panel { margin: 1.1rem 0 1.4rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--sql-bg); overflow: hidden; }
.sql-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.3rem 0.5rem 0.3rem 0.85rem; background: var(--sql-bar); border-bottom: 1px solid var(--line); }
.sql-lang { font: 700 0.72rem/1 var(--font); letter-spacing: 0.08em; color: var(--ink-muted); text-transform: uppercase; }
.sql-copy { font: 600 0.78rem/1 var(--font); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem 0.7rem; min-height: 2rem; cursor: pointer; }
.sql-copy[hidden] { display: none; }
.sql-copy:hover { border-color: var(--accent); color: var(--accent); }
.sql-copy:focus-visible, .sql-panel pre:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sql-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.entry .sql-panel pre { margin: 0; padding: 0.8rem 1rem; background: transparent; border-radius: 0; overflow-x: auto; max-width: 100%;
  font: 400 14.5px/1.55 var(--mono); color: var(--ink); white-space: pre; tab-size: 4; -moz-tab-size: 4; }
.entry .sql-panel code { background: none; padding: 0; font: inherit; color: inherit; }
.sql-k { color: var(--sql-k); font-weight: 600; } .sql-s, .sql-i { color: var(--sql-s); } .sql-n { color: var(--sql-n); }
.sql-c { color: var(--sql-c); font-style: italic; } .sql-f { color: var(--sql-f); } .sql-r { color: var(--sql-r); font-style: italic; }
@media (max-width: 640px) { .sql-panel { margin-left: -0.25rem; margin-right: -0.25rem; } .sql-copy { min-height: 2.25rem; } }

main.wrap { padding-top: 2rem; padding-bottom: 3rem; min-height: 60vh; }
.page-title { font-size: 1.9rem; line-height: 1.25; margin: 0 0 0.5rem; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.meta { color: var(--ink-muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.meta a { color: var(--ink-muted); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1.75rem; }
.chip { display: inline-block; padding: 0.25rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); text-decoration: none; font-size: 0.9rem; }
.chip span { color: var(--ink-muted); margin-left: 0.25rem; }
.chip:hover { border-color: var(--accent); }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.post-list li:first-child { border-top: 0; padding-top: 0; }
.post-list h2 { font-size: 1.25rem; line-height: 1.35; margin: 0 0 0.2rem; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); text-decoration: underline; }
.post-list .meta { margin-bottom: 0.35rem; }
.excerpt { margin: 0; color: var(--ink-muted); }

.entry { overflow-wrap: break-word; }
.entry h2, .entry h3, .entry h4 { line-height: 1.3; margin: 2rem 0 0.75rem; }
.entry h2 { font-size: 1.45rem; } .entry h3 { font-size: 1.2rem; } .entry h4 { font-size: 1.05rem; }
.entry p, .entry ul, .entry ol { margin: 0 0 1rem; }
.entry li { margin: 0.25rem 0; }
.entry img { display: block; max-width: 100%; height: auto; margin: 1.25rem auto; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.entry iframe.video { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; margin: 1.25rem 0; border: 0; border-radius: 8px; background: var(--surface); }
.entry pre, .entry code { font-family: var(--mono); font-size: 0.9em; }
.entry code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
.entry pre { background: var(--code-bg); padding: 0.9rem 1rem; border-radius: 8px; overflow-x: auto; line-height: 1.5; margin: 0 0 1rem; }
.entry pre code { background: none; padding: 0; }
.entry table { border-collapse: collapse; display: block; max-width: 100%; overflow-x: auto; margin: 0 0 1rem; }
.entry td, .entry th { border: 1px solid var(--line); padding: 0.4rem 0.7rem; vertical-align: top; }
.entry blockquote { margin: 0 0 1rem; padding: 0.25rem 1rem; border-left: 3px solid var(--line); color: var(--ink-muted); }
.ta-center { text-align: center; }

.cta { margin: 2.5rem 0 1rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.cta p { margin: 0 0 0.35rem; }
.cta .cta-link { font-weight: 700; }
.back { margin-top: 2rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 0.9rem; padding: 1.25rem 0 2rem; }
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: var(--ink-muted); }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .page-title { font-size: 1.55rem; }
  .brand { font-size: 1.15rem; }
}
