/* ═══════════════════════════════════════════════════════════════════════════
   devsecops.io — Modern Tech blog
   Aesthetic: Vercel / Linear / Resend territory, with engineer-flavoured
   monospace metadata and decorative real-code blocks.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Palette */
  --ink:           #0B1220;
  --ink-2:        #0F1828;
  --surface:      #131C2E;
  --surface-2:    #1B2640;
  --surface-3:    #23304F;
  --border:       #2D3A5C;
  --border-soft:  #1F2B45;
  --text:         #E5E7EB;
  --text-2:       #C7CBD4;
  --muted:        #6E7280;
  --dim:          #4C5874;

  --violet:       #1E40AF;
  --violet-2:     #60A5FA;
  --cyan:         #A4B36A;
  --cyan-2:       #C4CC8E;
  --pink:         #F472B6;
  --success:      #10B981;
  --warn:         #F59E0B;
  --danger:       #F43F5E;

  --grad:         linear-gradient(135deg, #1E40AF 0%, #4338CA 45%, #A4B36A 100%);
  --grad-soft:    linear-gradient(135deg, rgba(30,64,175,.16), rgba(164,179,106,.10));
  --grad-text:    linear-gradient(96deg, #93C5FD 0%, #C4CC8E 100%);

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --max:       1280px;
  --gutter:    clamp(20px, 4vw, 56px);
  --section:   clamp(24px, 3vw, 40px);
  --hero-top:  clamp(28px, 4vw, 56px);
  --hero-bot:  clamp(24px, 3.5vw, 48px);

  --font-display: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-body:    "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "JetBrains Mono", Consolas, monospace;
  --font-serif:   "Instrument Serif", "Times New Roman", serif;

  --shadow-soft:  0 1px 0 rgba(255,255,255,.04) inset,
                  0 24px 60px -20px rgba(30,64,175,.18),
                  0 12px 32px -16px rgba(0,0,0,.5);
  --shadow-card:  0 1px 0 rgba(255,255,255,.03) inset,
                  0 16px 40px -16px rgba(0,0,0,.45);

  --glow-violet:  rgba(30,64,175,.35);
  --glow-cyan:    rgba(164,179,106,.22);
  --grid-dot:     rgba(255,255,255,.045);
  --topbar-bg:    rgba(11,18,32,.65);
  --noise-blend:  overlay;
  --noise-opacity: .35;
}

/* ── Light theme tokens ────────────────────────────────────────────────── */
body[data-theme="light"] {
  --ink:           #FAFAF8;
  --ink-2:         #F5F4EE;
  --surface:       #FFFFFF;
  --surface-2:     #F8F8F4;
  --surface-3:     #F1F1ED;
  --border:        #E4E4E8;
  --border-soft:   #ECECEE;
  --text:          #0B1220;
  --text-2:        #4C5874;
  --muted:         #757582;
  --dim:           #B6B6BE;

  --grad-text:     linear-gradient(96deg, #1E40AF 0%, #6B7C32 100%);

  --shadow-soft:   0 1px 0 rgba(255,255,255,.7) inset,
                   0 20px 56px -24px rgba(30,64,175,.20),
                   0 6px 24px -14px rgba(0,0,0,.10);
  --shadow-card:   0 1px 0 rgba(255,255,255,.6) inset,
                   0 12px 32px -18px rgba(0,0,0,.12);

  --glow-violet:   rgba(30,64,175,.16);
  --glow-cyan:     rgba(164,179,106,.10);
  --grid-dot:      rgba(11,18,32,.06);
  --topbar-bg:     rgba(255,255,255,.78);
  --noise-blend:   multiply;
  --noise-opacity: .12;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.08; font-weight: 600; }

.mono       { font-family: var(--font-mono); letter-spacing: 0; font-variant-ligatures: none; }
.mono-inline{ font-family: var(--font-mono); font-size: .92em; padding: .08em .35em; border-radius: 4px;
              background: rgba(30,64,175,.10); color: var(--cyan-2); }
.ital       { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.ital-amp   { font-family: var(--font-mono); font-style: normal; font-weight: 400; font-size: 0.78em; color: var(--cyan); vertical-align: 0.08em; margin: 0 0.12em; letter-spacing: 0; }
.dim        { color: var(--dim); }
.grad       { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-inline{ background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Container ─────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Ambient background ────────────────────────────────────────────────── */
.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  overflow: hidden;
}
.bg-grid {
  position: absolute; inset: -20%;
  background-image:
    radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 70%);
  opacity: .9;
}
.bg-glow {
  position: absolute; width: 1000px; height: 1000px; border-radius: 50%;
  filter: blur(160px);
  will-change: transform;
}
.bg-glow-1 {
  background: radial-gradient(circle, var(--glow-violet) 0%, transparent 70%);
  top: -320px; left: -280px;
}
.bg-glow-2 {
  background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 70%);
  top: -200px; right: -340px;
}
.bg-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: var(--noise-opacity); mix-blend-mode: var(--noise-blend);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* TOPBAR                                                                  */
/* ═══════════════════════════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: var(--topbar-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}

.brand {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.brand-text {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0;
}
.brand-slash {
  color: var(--violet-2);
  margin-right: 1px;
  font-weight: 600;
}
.brand:hover .brand-slash {
  color: var(--cyan-2);
  transition: color .2s ease;
}

.topnav {
  display: flex; gap: 4px; justify-self: center;
  padding: 4px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
}
.topnav a {
  font-size: 13px; padding: 7px 14px; border-radius: 999px;
  color: var(--text-2); transition: all .18s ease;
  font-family: var(--font-mono); letter-spacing: 0;
}
.topnav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.topnav a.is-on { color: var(--text); background: rgba(30,64,175,.14); box-shadow: inset 0 0 0 1px rgba(30,64,175,.35); }

.topbar-side { display: inline-flex; align-items: center; gap: 14px; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2);
  padding: 6px 10px; border-radius: 999px;
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.22);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(16,185,129,.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.langswitch {
  display: inline-flex; gap: 2px;
  padding: 3px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}
.lang {
  background: transparent; border: 0; color: var(--text-2);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  padding: 4px 8px; border-radius: 6px;
}
.lang-on { background: rgba(255,255,255,.07); color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════ */
/* ROUTES — page-as-section switching                                      */
/* ═══════════════════════════════════════════════════════════════════════ */
.route { display: none; }
.route.is-active { display: block; animation: routeIn .45s ease both; }
@keyframes routeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* HERO                                                                    */
/* ═══════════════════════════════════════════════════════════════════════ */
.hero {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(40px, 6vw, 80px);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text-2);
  margin-bottom: 28px;
}
.eyebrow-line {
  width: 36px; height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

.hero-title {
  font-size: clamp(44px, 6.5vw, 84px);
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero-title .ital {
  color: var(--violet-2);
  font-size: .88em;
  margin: 0 .08em;
  letter-spacing: -.01em;
}
.hero-title .grad {
  display: inline-block;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-2);
  max-width: 560px;
  margin: 0 0 36px;
  line-height: 1.65;
}

.hero-cta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 56px;
}
.cta-meta { color: var(--muted); font-size: 12px; margin-left: 8px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 40px);
  border-top: 1px solid var(--border-soft);
  padding-top: 28px;
  max-width: 540px;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.02em; color: var(--text);
}
.stat-plus { color: var(--cyan); font-weight: 500; }
.stat-lbl  { font-size: 11px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 500;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .25s ease, background .2s ease;
  line-height: 1;
  letter-spacing: -0.005em;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,0) 40%),
    linear-gradient(135deg, #1E40AF, #5B21B6);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.16) inset,
              0 10px 32px -8px rgba(30,64,175,.55),
              0 0 0 1px rgba(30,64,175,.4);
}
.btn-primary:hover {
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset,
              0 18px 44px -10px rgba(30,64,175,.7),
              0 0 0 1px rgba(30,64,175,.55);
}
.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,.025);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(30,64,175,.4);
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-2); transition: color .15s ease;
  letter-spacing: 0;
}
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover { color: var(--violet-2); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ── Hero code window ──────────────────────────────────────────────────── */
.hero-code { position: relative; }
.code-window {
  background: linear-gradient(180deg, #14141B 0%, #0F1828 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  position: relative;
  transform: rotate(.4deg);
}
.code-window::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: 14px;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
          mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .3;
  pointer-events: none;
}
.code-titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255,255,255,.015);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot.d-r { background: #ff5f57; }
.dot.d-y { background: #ffbd2e; }
.dot.d-g { background: #28c840; }
.code-path { margin-left: 8px; font-size: 12px; color: var(--text-2); }
.code-badge {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em;
  padding: 3px 7px; border-radius: 4px;
  background: rgba(30,64,175,.14); color: var(--violet-2);
  border: 1px solid rgba(30,64,175,.28);
}
.code-body {
  padding: 18px 20px 22px;
  font-size: 13px; line-height: 1.7;
  color: var(--text);
  white-space: pre; overflow-x: auto;
}
.cm { color: #c4b5fd; }  /* config key */
.vs { color: #67e8f9; }  /* string */
.vh { color: #fb7185; }  /* number / highlight */
.cf { color: #fbbf24; }  /* control */
.cp { color: var(--success); font-weight: 500; }  /* prompt */

.float-chip {
  position: absolute; bottom: -18px; right: -10px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: rgba(14,14,20,.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px; color: var(--text-2);
  box-shadow: var(--shadow-card);
  transform: rotate(-1deg);
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan); animation: pulse 2s infinite; }

/* ── Logstrip ──────────────────────────────────────────────────────────── */
.logstrip {
  margin-top: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, transparent, rgba(30,64,175,.03), transparent);
  padding: 18px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logstrip-track {
  display: inline-flex; gap: 22px;
  white-space: nowrap; color: var(--muted);
  font-size: 12px;
  animation: marquee 48s linear infinite;
}
.logstrip-track .sep { color: var(--violet); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* SECTION HEAD                                                            */
/* ═══════════════════════════════════════════════════════════════════════ */
.section {
  padding-block: var(--section);
}
.section-after-hero {
  padding-top: clamp(16px, 2.5vw, 32px);
}

.section-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 24px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 16px;
}
.section-head .eyebrow {
  margin-bottom: 8px;
  font-family: var(--font-mono); color: var(--muted);
}
.section-title {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.025em;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* FEED (changelog-style)                                                  */
/* ═══════════════════════════════════════════════════════════════════════ */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  grid-template-rows: auto auto;
  column-gap: 40px;
  row-gap: 12px;
  padding: 32px 0;
  border-top: 1px solid var(--border-soft);
  transition: background .2s ease;
}
.feed-item:first-child { border-top: 0; padding-top: 0; }
.feed-item:hover { background: rgba(255,255,255,.012); }

.feed-meta {
  display: flex; flex-direction: column; gap: 10px;
  align-items: flex-start;
  padding-top: 4px;
  grid-column: 1;
  grid-row: 1 / span 2;
}
.feed-meta time { font-size: 13px; color: var(--text-2); letter-spacing: 0; }

.feed-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.02em;
  font-weight: 500;
  transition: color .2s ease;
  grid-column: 2;
  grid-row: 1;
}
.feed-title:hover {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feed-desc {
  margin: 0;
  color: var(--text-2); font-size: 15px; line-height: 1.7;
  max-width: 70ch;
  grid-column: 2;
  grid-row: 2;
}

/* Pills */
.pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .05em;
  border-radius: 6px;
  border: 1px solid transparent;
}
.pill-siem    { background: rgba(30,64,175,.12); color: var(--violet-2); border-color: rgba(30,64,175,.3); }
.pill-devops  { background: rgba(164,179,106,.10);  color: var(--cyan-2);   border-color: rgba(164,179,106,.28); }
.pill-career  { background: rgba(244,114,182,.10); color: #F9A8D4;         border-color: rgba(244,114,182,.28); }

/* ═══════════════════════════════════════════════════════════════════════ */
/* CATEGORIES                                                              */
/* ═══════════════════════════════════════════════════════════════════════ */
.cats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.cat {
  position: relative;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .35s ease;
}
.cat::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 100% 0%, rgba(30,64,175,.13), transparent 60%);
  pointer-events: none; transition: opacity .3s ease;
}
.cat-devops::before {
  background: radial-gradient(60% 80% at 100% 0%, rgba(164,179,106,.13), transparent 60%);
}
.cat:hover {
  transform: translateY(-3px);
  border-color: rgba(30,64,175,.4);
  box-shadow: var(--shadow-soft);
}
.cat-devops:hover { border-color: rgba(164,179,106,.4); }

.cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.cat-title {
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}
.cat-desc { color: var(--text-2); font-size: 15px; margin-bottom: 24px; max-width: 56ch; }
.cat-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-tags span {
  font-size: 11px; padding: 4px 8px; border-radius: 4px;
  background: rgba(255,255,255,.04); color: var(--text-2);
  border: 1px solid var(--border-soft);
}
.cat-arrow {
  position: absolute; top: 28px; right: 32px;
  font-size: 22px; color: var(--muted);
  transition: transform .25s ease, color .2s ease;
}
.cat:hover .cat-arrow { transform: translate(3px, -3px); color: var(--violet-2); }
.cat-devops:hover .cat-arrow { color: var(--cyan-2); }

/* ═══════════════════════════════════════════════════════════════════════ */
/* CHANNELS                                                                */
/* ═══════════════════════════════════════════════════════════════════════ */
.channels {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px;
}
.channel {
  padding: 32px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .2s ease, transform .2s ease;
}
.channel:hover { transform: translateY(-2px); border-color: var(--border); }
.channel-primary {
  background:
    linear-gradient(180deg, rgba(30,64,175,.08), transparent 70%),
    var(--surface);
  border-color: rgba(30,64,175,.35);
}
.channel-head { display: flex; align-items: center; justify-content: space-between; }
.channel-tag {
  font-size: 11px; letter-spacing: .08em;
  padding: 4px 8px; border-radius: 4px;
  background: rgba(255,255,255,.04);
  color: var(--text-2);
}
.channel-primary .channel-tag {
  background: rgba(30,64,175,.18); color: var(--violet-2);
}
.channel-rate { font-size: 11px; }
.channel-title {
  font-size: 24px; letter-spacing: -0.02em; color: var(--text);
}
.channel-desc { color: var(--text-2); font-size: 14.5px; line-height: 1.65; margin: 0; }
.channel-list { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); }

/* ═══════════════════════════════════════════════════════════════════════ */
/* ABOUT TEASER                                                            */
/* ═══════════════════════════════════════════════════════════════════════ */
.about-teaser {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  padding: 56px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(30,64,175,.10), transparent 50%),
    radial-gradient(120% 80% at 100% 100%, rgba(164,179,106,.07), transparent 50%),
    var(--surface);
  border: 1px solid var(--border-soft);
}
.about-teaser-copy .section-title { margin-bottom: 16px; }
.about-teaser-text {
  color: var(--text-2); font-size: 16px; line-height: 1.7;
  max-width: 56ch; margin: 0 0 28px;
}

.about-teaser-card {
  display: flex; flex-direction: column; gap: 28px;
  padding: 28px;
  background: var(--ink-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* Avatar */
.avatar { position: relative; width: 84px; height: 84px; }
.avatar-inner {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 500;
  color: #fff; letter-spacing: -0.02em;
  background: var(--grad);
  box-shadow: 0 8px 28px -8px rgba(30,64,175,.6);
}
.avatar-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 1px dashed rgba(30,64,175,.4);
  animation: spin 16s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.about-meta {
  margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px;
}
.about-meta > div { display: flex; flex-direction: column; gap: 2px; }
.about-meta dt { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.about-meta dd { margin: 0; font-size: 14px; color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════ */
/* ARTICLE                                                                 */
/* ═══════════════════════════════════════════════════════════════════════ */
.article-header {
  padding-top: var(--hero-top);
  padding-bottom: var(--hero-bot);
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}
.article-meta-top {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--muted);
}
.article-title {
  font-size: clamp(32px, 4.5vw, 60px);
  letter-spacing: -0.028em;
  max-width: none;
  margin-bottom: 20px;
  line-height: 1.1;
}
.article-lede {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: none;
  margin: 0 0 32px;
  font-style: italic;
}

.article-byline {
  display: flex; align-items: center; gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.byline-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
}
.byline-info { display: flex; flex-direction: column; gap: 2px; }
.byline-name { font-weight: 500; font-size: 14px; color: var(--text); }
.byline-role { font-size: 12px; color: var(--muted); }
.byline-actions { margin-left: auto; display: inline-flex; gap: 6px; }
.iconbtn {
  width: 36px; height: 36px; border-radius: 8px;
  background: transparent; border: 1px solid var(--border-soft);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.iconbtn:hover { color: var(--text); border-color: rgba(30,64,175,.45); background: rgba(30,64,175,.06); }

.article-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 64px;
  padding-top: 56px; padding-bottom: var(--section);
}
/* Narrow / text-only article — no TOC sidebar, centered body */
.article-layout-narrow {
  display: block;
  padding-top: 40px;
}
.article-body-prose {
  max-width: 70ch;
  margin-inline: auto;
  font-size: 18px;
  line-height: 1.8;
}
.article-body-prose h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--text);
}
.article-body-prose p { margin: 0 0 18px; }

/* TOC */
.article-toc {
  position: sticky; top: 96px;
  align-self: start;
  font-size: 13px;
}
.article-toc .eyebrow { color: var(--muted); margin-bottom: 16px; }
.toc { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.toc a {
  display: flex; gap: 10px; padding: 6px 0;
  color: var(--text-2);
  border-left: 1px solid var(--border-soft);
  padding-left: 14px;
  transition: all .15s ease;
  letter-spacing: -0.005em;
}
.toc a .mono { color: var(--muted); font-size: 11px; line-height: 1.6; }
.toc a:hover { color: var(--text); border-left-color: var(--violet); }
.toc-meta { display: flex; flex-direction: column; gap: 2px; font-size: 11px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.toc-meta p { margin: 0; }

/* Body typography */
.article-body { max-width: 70ch; font-size: 17px; line-height: 1.78; color: var(--text-2); }
.article-body h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  color: var(--text);
  margin: 56px 0 18px;
  display: flex; align-items: baseline; gap: 14px;
  scroll-margin-top: 96px;
}
.article-body-prose h2 { scroll-margin-top: 96px; }
:target { scroll-margin-top: 96px; }
.article-body h2 .num {
  font-size: 14px; color: var(--violet-2);
  font-family: var(--font-mono); font-weight: 500;
  padding-top: 2px;
}
.article-body p { margin: 0 0 18px; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body .link { color: var(--cyan-2); text-decoration: underline; text-decoration-color: rgba(164,179,106,.4); text-underline-offset: 3px; }
.article-body .link:hover { color: var(--text); }

.dlist {
  display: flex; flex-direction: column; gap: 8px;
  margin: 8px 0 20px; padding-left: 0;
}
.dlist li {
  position: relative; padding-left: 22px;
}
.dlist li::before {
  content: "▸"; position: absolute; left: 0; top: 0;
  color: var(--violet); font-size: 12px;
}
ol.dlist {
  counter-reset: dlist; padding-left: 0;
}
ol.dlist li {
  counter-increment: dlist; padding-left: 32px;
}
ol.dlist li::before {
  content: counter(dlist, decimal-leading-zero);
  color: var(--muted); font-size: 11px;
}

/* Callout */
.callout {
  position: relative;
  margin: 28px 0;
  padding: 22px 24px;
  border-left: 2px solid var(--violet);
  background: linear-gradient(90deg, rgba(30,64,175,.07), transparent 60%);
  border-radius: 8px;
  color: var(--text-2);
}
.callout-tag {
  font-size: 11px; color: var(--violet-2); margin-bottom: 6px;
}
.callout p { margin: 0; }
.callout ul { margin: 0; display: flex; flex-direction: column; gap: 6px; padding-left: 18px; list-style: disc; color: var(--text-2); }
.callout-warn {
  border-left-color: var(--warn);
  background: linear-gradient(90deg, rgba(245,158,11,.07), transparent 60%);
}
.callout-warn .callout-tag { color: var(--warn); }

/* Code block (body) */
.codeblock {
  margin: 28px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--ink-2);
  overflow: hidden;
}
.codeblock-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.codeblock pre {
  margin: 0; padding: 18px 20px;
  font-family: var(--font-mono); font-size: 13.5px;
  line-height: 1.7; color: var(--text);
  white-space: pre; overflow-x: auto;
}

/* Table */
.ctable-wrap { margin: 28px 0; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.ctable { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.ctable th, .ctable td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.ctable thead th {
  background: rgba(30,64,175,.10); color: var(--text);
  font-family: var(--font-display); font-weight: 500; font-size: 13px;
  letter-spacing: -0.005em;
}
.ctable tbody tr:hover { background: rgba(255,255,255,.015); }
.ctable .num { text-align: right; }
.ctable .trow-total td { background: rgba(164,179,106,.06); color: var(--text); border-bottom: 0; }

/* Article footer card */
.article-footer-card {
  margin-top: 48px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
}
.footer-card-head { color: var(--muted); }
.article-footer-card p { margin: 0; color: var(--text); font-size: 16px; }

/* Related */
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rel-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 14px;
  transition: all .2s ease;
}
.rel-card:hover { transform: translateY(-3px); border-color: rgba(30,64,175,.45); }
.rel-card h3 { font-size: 18px; line-height: 1.3; color: var(--text); font-weight: 500; letter-spacing: -0.015em; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* ABOUT PAGE                                                              */
/* ═══════════════════════════════════════════════════════════════════════ */
.about-hero {
  padding-top: var(--hero-top);
  padding-bottom: var(--hero-bot);
}
.about-title {
  font-size: clamp(30px, 4.2vw, 52px);
  letter-spacing: -0.03em;
  font-weight: 500;
  max-width: 22ch;
  line-height: 1.12;
}
.about-title .ital { color: var(--violet-2); font-size: .55em; vertical-align: 0.4em; margin: 0 .12em; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }

.about-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}
.about-hero-text { max-width: 700px; }
.about-hero .about-side { width: 100%; }

@media (max-width: 980px) {
  .about-hero-grid { grid-template-columns: 1fr; }
}

.about-bio { font-size: 17px; line-height: 1.75; color: var(--text-2); }
.about-bio .lede { font-size: 19px; color: var(--text); margin: 0 0 20px; }
.about-bio .dropcap { color: var(--violet); font-family: var(--font-mono); }
.about-bio p { margin: 0 0 16px; }
.about-bio p strong { color: var(--text); font-weight: 600; }

.kv-list {
  margin-top: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 12px;
}
.kv-row {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px;
  font-size: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-key { color: var(--muted); font-size: 12px; }
.kv-val { color: var(--text); }

.about-side .about-card {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
}
.big-avatar { position: relative; width: 120px; height: 120px; }
.big-avatar-inner {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 500; color: #fff;
  background: var(--grad);
  box-shadow: 0 12px 36px -8px rgba(30,64,175,.6);
}
.big-avatar-ring {
  position: absolute; inset: -10px; border-radius: 50%;
  border: 1px dashed rgba(30,64,175,.35);
  animation: spin 20s linear infinite;
}
.about-card-name { font-size: 22px; letter-spacing: -0.015em; color: var(--text); }
.about-card-role { font-size: 12px; color: var(--muted); }

.card-socials {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%;
}
.card-social {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink-2);
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all .2s ease;
}
.card-social:hover {
  border-color: rgba(30,64,175,.45);
  background: rgba(30,64,175,.07);
  transform: translateY(-1px);
}
.card-social svg { color: var(--violet-2); transition: color .2s ease; }
.card-social:hover svg { color: var(--cyan-2); }
body[data-theme="light"] .card-social {
  background: var(--surface-2);
  border-color: var(--border);
}
body[data-theme="light"] .card-social:hover {
  background: rgba(30,64,175,.06);
}

.cert-list { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cert-list li {
  display: flex; justify-content: space-between; padding: 10px 14px;
  background: var(--ink-2); border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 13px; color: var(--text);
}
.cert-state { color: var(--muted); font-size: 12px; }

/* STACK */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stack-col {
  padding: 28px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}
.stack-title { font-size: 16px; color: var(--text); margin-bottom: 16px; font-weight: 500; letter-spacing: -0.01em; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-list li {
  padding: 5px 10px; border-radius: 6px; font-size: 12px;
  background: rgba(255,255,255,.04); color: var(--text-2);
  border: 1px solid var(--border-soft);
  transition: all .15s ease;
}
.chip-list li:hover { background: rgba(30,64,175,.12); color: var(--violet-2); border-color: rgba(30,64,175,.3); }

/* PROJECTS */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.proj {
  padding: 28px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 14px;
  transition: all .2s ease;
  position: relative;
}
.proj:hover { transform: translateY(-2px); border-color: rgba(30,64,175,.35); }
.proj-head { display: flex; justify-content: space-between; align-items: center; }
.proj-type {
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  background: rgba(164,179,106,.08); color: var(--cyan-2);
  border: 1px solid rgba(164,179,106,.22);
}
.proj-stars { font-size: 12px; color: var(--muted); }
.proj-title {
  font-family: var(--font-mono);
  font-size: 18px; font-weight: 500;
  color: var(--text); letter-spacing: -0.01em;
}
.proj-desc { color: var(--text-2); font-size: 14px; line-height: 1.6; margin: 0; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.proj-tags span {
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  background: rgba(255,255,255,.04); color: var(--text-2);
  border: 1px solid var(--border-soft);
}

/* SPEAKING */
.speak-list { display: flex; flex-direction: column; }
.speak-item {
  border-top: 1px solid var(--border-soft);
}
.speak-item:first-child { border-top: 0; }
.speak-link {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 8px;
  margin: 0 -8px;
  border-radius: 10px;
  transition: background .2s ease, padding-left .25s ease;
  color: var(--text);
}
.speak-link:hover {
  background: rgba(30,64,175,.05);
  padding-left: 16px;
}
.speak-date { font-size: 13px; color: var(--muted); align-self: center; }
.speak-body h3 { font-size: 17px; color: var(--text); margin-bottom: 4px; font-weight: 500; letter-spacing: -0.01em; }
.speak-source {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text-2);
  transition: all .2s ease;
}
.speak-source svg { color: var(--violet-2); transition: color .2s ease; }
.speak-link:hover .speak-source {
  border-color: rgba(30,64,175,.45);
  color: var(--text);
}
.speak-link:hover .speak-source svg { color: var(--cyan-2); }
body[data-theme="light"] .speak-link:hover {
  background: rgba(30,64,175,.04);
}

/* CONTACT */
.contact-cta {
  padding: 56px;
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 40px; align-items: center;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(30,64,175,.12), transparent 60%),
    radial-gradient(120% 80% at 100% 100%, rgba(164,179,106,.10), transparent 50%),
    var(--surface);
  border: 1px solid var(--border-soft);
}
.cta-title { font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.025em; color: var(--text); margin: 12px 0 8px; }
.cta-text { color: var(--text-2); margin: 0; max-width: 48ch; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* FOOTER                                                                  */
/* ═══════════════════════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding-block: 64px 24px;
  margin-top: 64px;
  background: linear-gradient(180deg, transparent, rgba(30,64,175,.04));
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-soft);
}
.footer-title { font-size: 11px; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 14px; color: var(--text-2); transition: color .15s ease; }
.footer-col a:hover { color: var(--violet-2); }
.footer-bottom {
  margin-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                              */
/* ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-code { order: 2; }
  .channels { grid-template-columns: 1fr 1fr; }
  .channel-primary { grid-column: 1 / -1; }
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .article-toc { position: static; }
  .rel-grid { grid-template-columns: 1fr 1fr; }
  .about-teaser { grid-template-columns: 1fr; padding: 40px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-side .about-card { position: static; }
  .stack-grid, .proj-grid { grid-template-columns: 1fr 1fr; }
  .contact-cta { grid-template-columns: 1fr; }
  .contact-actions { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .hero-2col { grid-template-columns: 1fr; gap: 40px; }
  .hero-nav { padding-top: 4px; }
}
@media (max-width: 760px) {
  .topbar { gap: 12px; padding: 12px clamp(16px, 4vw, 32px); }
  .brand-text { font-size: 14px; }

  .hero-title { font-size: clamp(36px, 8vw, 56px); }
  .hero-cta { gap: 10px; }
  .cta-meta { width: 100%; margin: 0; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 18px; }

  .section-head { flex-direction: column; align-items: flex-start; }

  .feed-item { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 12px; padding: 24px 0; }
  .feed-meta { flex-direction: row; flex-wrap: wrap; gap: 10px; align-items: center; grid-column: 1; grid-row: 1; }
  .feed-title { grid-column: 1; grid-row: 2; }
  .feed-desc  { grid-column: 1; grid-row: 3; }

  .cats, .channels, .rel-grid, .stack-grid, .proj-grid { grid-template-columns: 1fr; }
  /* Footer: brand full-width on top, categories | elsewhere side by side */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; padding-bottom: 32px; }
  .footer-grid > :first-child { grid-column: 1 / -1; margin-bottom: 4px; }
  /* Trim excess vertical whitespace on mobile */
  .site-footer { margin-top: 36px; padding-block: 36px 20px; }
  .article-footer-card { margin-top: 32px; }
  .article-layout-narrow { padding-top: 28px; }

  .about-teaser { padding: 28px; gap: 28px; }
  .contact-cta { padding: 32px; }

  .article-title { font-size: clamp(28px, 7vw, 44px); }
  .article-body h2 { margin-top: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* SCROLL ANCHOR OFFSET — universal under sticky topbar                     */
/* ═══════════════════════════════════════════════════════════════════════ */
[id] { scroll-margin-top: 96px; }
.route[id] { scroll-margin-top: 0; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* READING PROGRESS BAR                                                    */
/* ═══════════════════════════════════════════════════════════════════════ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #60A5FA 0%, #1E40AF 40%, #A4B36A 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 60; /* above sticky topbar (z:50) */
  opacity: 0;
  transition: opacity .25s ease, transform .08s linear;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(30,64,175,.6);
}
.reading-progress.is-visible { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* BACK-TO-TOP                                                             */
/* ═══════════════════════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 55;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(.92);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.2,.7,.2,1), background .2s ease, border-color .2s ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 14px 36px -16px rgba(0,0,0,.5),
    0 0 0 1px rgba(30,64,175,.18);
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  transform: translateY(-2px) scale(1);
}
body[data-theme="light"] .back-to-top {
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 12px 28px -14px rgba(0,0,0,.18),
    0 0 0 1px rgba(30,64,175,.14);
}

@media (max-width: 760px) {
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
  .toast { bottom: 80px; right: 16px; left: 16px; max-width: none; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* ACTIVE TOC HIGHLIGHT                                                    */
/* ═══════════════════════════════════════════════════════════════════════ */
.toc a.is-current {
  color: var(--text);
  border-left-color: var(--violet);
  background: linear-gradient(90deg, rgba(30,64,175,.08), transparent 80%);
}
.toc a.is-current .mono {
  color: var(--violet-2);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* KV-LINK — clickable contacts in About                                   */
/* ═══════════════════════════════════════════════════════════════════════ */
.kv-link {
  color: var(--text);
  border-bottom: 1px dashed rgba(30,64,175,.4);
  padding-bottom: 1px;
  transition: color .15s ease, border-color .15s ease;
}
.kv-link:hover {
  color: var(--violet-2);
  border-bottom-color: var(--violet-2);
  border-bottom-style: solid;
}
.kv-sep {
  color: var(--dim);
  margin: 0 6px;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* i18n — UA / EN toggle                                                   */
/* ═══════════════════════════════════════════════════════════════════════ */
.t-ua, .t-en { display: contents; }
body[data-lang="uk"] .t-en { display: none !important; }
body[data-lang="en"] .t-ua { display: none !important; }
/* Block-level language visibility (preserves element display, unlike .t-ua/.t-en) */
body[data-lang="en"] .lang-ua { display: none !important; }
body[data-lang="uk"] .lang-en { display: none !important; }

/* ── Selection ─────────────────────────────────────────────────────────── */
::selection { background: rgba(30,64,175,.5); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* SKIP-TO-CONTENT (a11y)                                                  */
/* ═══════════════════════════════════════════════════════════════════════ */
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 100;
  padding: 10px 16px;
  background: var(--violet);
  color: #fff;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  transition: top .2s ease;
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* FOCUS-VISIBLE — uniform across interactive elements                     */
/* ═══════════════════════════════════════════════════════════════════════ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--violet-2);
  outline-offset: 2px;
  border-radius: 4px;
}
.search:focus-within input:focus-visible { outline: 0; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* TOAST                                                                   */
/* ═══════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 18px 48px -16px rgba(0,0,0,.5),
    0 0 0 1px rgba(16,185,129,.15);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.2,.7,.2,1);
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast[data-variant="error"] {
  border-left-color: var(--danger);
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 18px 48px -16px rgba(0,0,0,.5),
    0 0 0 1px rgba(244,63,94,.18);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* SHARE MENU                                                              */
/* ═══════════════════════════════════════════════════════════════════════ */
.share-menu {
  position: absolute;
  z-index: 60;
  width: 220px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 24px 48px -16px rgba(0,0,0,.5),
    0 0 0 1px rgba(30,64,175,.18);
  opacity: 0;
  transform: translateY(-4px) scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s cubic-bezier(.2,.7,.2,1);
}
.share-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.share-opt {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.share-opt:hover { background: rgba(30,64,175,.08); }
.share-opt svg { color: var(--violet-2); flex-shrink: 0; }
.share-opt:hover svg { color: var(--cyan-2); }

body[data-theme="light"] .share-opt:hover { background: rgba(30,64,175,.06); }

/* ═══════════════════════════════════════════════════════════════════════ */
/* CODE BLOCK COPY BUTTON                                                  */
/* ═══════════════════════════════════════════════════════════════════════ */
.codeblock, .code-window { position: relative; }
.code-copy {
  position: absolute;
  top: 52px; right: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px;
  background: rgba(15,15,22,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 6px;
  color: #C7CBD4;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  z-index: 2;
}
.codeblock:hover .code-copy,
.code-window:hover .code-copy,
.code-copy:focus-visible {
  opacity: 1;
}
.code-copy:hover {
  background: rgba(30,64,175,.18);
  border-color: rgba(30,64,175,.4);
  color: #fff;
}
.code-copy.is-copied {
  background: rgba(16,185,129,.18);
  border-color: rgba(16,185,129,.4);
  color: #6EE7B7;
}
.code-copy svg { opacity: .8; }

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* THEME TOGGLE                                                            */
/* ═══════════════════════════════════════════════════════════════════════ */
.themetoggle {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-soft);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.themetoggle:hover {
  color: var(--text);
  border-color: rgba(30,64,175,.4);
  background: rgba(30,64,175,.08);
}
.themetoggle .icon-sun,
.themetoggle .icon-moon {
  position: absolute; inset: 0; margin: auto;
  transition: opacity .25s ease, transform .35s cubic-bezier(.5,.1,.3,1);
}
body[data-theme="dark"]  .themetoggle .icon-sun  { opacity: 1; transform: rotate(0);     }
body[data-theme="dark"]  .themetoggle .icon-moon { opacity: 0; transform: rotate(-90deg); }
body[data-theme="light"] .themetoggle .icon-sun  { opacity: 0; transform: rotate(90deg); }
body[data-theme="light"] .themetoggle .icon-moon { opacity: 1; transform: rotate(0);     }

/* ═══════════════════════════════════════════════════════════════════════ */
/* HERO — editorial split: title-left + nav-right                          */
/* ═══════════════════════════════════════════════════════════════════════ */
.hero { padding-top: 0; padding-bottom: 0; }
.hero-2col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
  padding-block: var(--hero-top) var(--hero-bot);
}
.hero-text {
  max-width: 660px;
}
.hero-text .hero-title {
  font-size: clamp(44px, 6.6vw, 88px);
  margin-bottom: 24px;
}
.hero-text .hero-title .grad { display: inline; }
.hero-text .hero-sub {
  margin-bottom: 32px;
  max-width: 560px;
}
.hero-text .hero-cta { margin-bottom: 0; }

/* Mobile: collapse the editorial 2-col hero into one column. Canon .hero-2col
   above is defined after the earlier 980px breakpoint, so the stack rule must
   come after it to win the cascade. */
@media (max-width: 980px) {
  .hero-2col { grid-template-columns: 1fr; gap: 40px; }
  .hero-text, .hero-text .hero-sub { max-width: none; }
  .hero-nav { padding-top: 0; }
}

/* Vertical editorial nav on the right */
.hero-nav {
  display: flex;
  flex-direction: column;
  padding-top: 14px;
}
.hnav-eyebrow {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .06em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 0;
}
.hnav-link {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  transition: color .2s ease, padding-left .25s ease;
  position: relative;
}
.hnav-link::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--violet), var(--cyan));
  opacity: 0; transform: scaleY(.4);
  transform-origin: center;
  transition: opacity .25s ease, transform .25s ease;
}
.hnav-link:hover {
  color: var(--text);
  padding-left: 14px;
}
.hnav-link:hover::before {
  opacity: 1; transform: scaleY(1);
}
.hnav-num {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .08em;
  line-height: 1;
  align-self: center;
}
.hnav-name {
  align-self: center;
}
.hnav-arrow {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 18px;
  align-self: center;
  transition: transform .25s ease, color .2s ease;
}
.hnav-link:hover .hnav-arrow {
  color: var(--violet-2);
  transform: translateX(6px);
}
.hnav-link:hover .hnav-num {
  color: var(--violet-2);
}
.hnav-link.is-on {
  color: var(--text);
  padding-left: 14px;
}
.hnav-link.is-on::before {
  opacity: 1; transform: scaleY(1);
}
.hnav-link.is-on .hnav-num,
.hnav-link.is-on .hnav-arrow {
  color: var(--violet-2);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* CATEGORY HERO (SIEM / DevOps pages)                                     */
/* ═══════════════════════════════════════════════════════════════════════ */
.cat-hero {
  padding-block: var(--hero-top) var(--hero-bot);
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
}
.cat-hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(40% 60% at 80% 0%, rgba(30,64,175,.10), transparent 60%);
  pointer-events: none;
}
.cat-hero-devops::before {
  background: radial-gradient(40% 60% at 80% 0%, rgba(164,179,106,.10), transparent 60%);
}

.breadcrumb {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--muted);
  margin-bottom: 28px;
}
.bc-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text-2);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.bc-back:hover {
  color: var(--text);
  border-color: rgba(30,64,175,.5);
  background: rgba(30,64,175,.08);
  transform: translateX(-3px);
}
.bc-back .bc-arrow { transition: transform .2s ease; }
.bc-back:hover .bc-arrow { transform: translateX(-2px); }
.bc-trail {
  display: inline-flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.bc-trail a { color: var(--text-2); transition: color .15s ease; }
.bc-trail a:hover { color: var(--violet-2); }
.bc-trail .bc-sep { color: var(--dim); }
.bc-trail [aria-current="page"] { color: var(--text); }

body[data-theme="light"] .bc-back {
  background: var(--surface);
  border-color: var(--border);
}
body[data-theme="light"] .bc-back:hover {
  background: rgba(30,64,175,.06);
}

.cat-hero-body { max-width: 880px; }
.cat-hero-title {
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  line-height: 1.08;
}
.cat-hero-title .ital { color: var(--violet-2); margin: 0 .12em; }
.cat-hero-devops .cat-hero-title .ital { color: var(--cyan-2); }
.grad-cyan {
  background: linear-gradient(96deg, #C4CC8E 0%, #38BDF8 60%, #818CF8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body[data-theme="light"] .grad-cyan {
  background: linear-gradient(96deg, #6B7C32 0%, #0369A1 60%, #4338CA 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.cat-hero-sub {
  color: var(--text-2);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.65;
  max-width: 62ch;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* TOPICS row                                                              */
/* ═══════════════════════════════════════════════════════════════════════ */
.section-tight { padding-block: clamp(40px, 5vw, 64px); }
.section-tight .eyebrow { margin-bottom: 20px; }

.topics {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.topic-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all .18s ease;
}
.topic-chip:hover {
  border-color: rgba(30,64,175,.45);
  background: rgba(30,64,175,.05);
  transform: translateY(-1px);
}
.topic-chip.topic-cyan:hover {
  border-color: rgba(164,179,106,.45);
  background: rgba(164,179,106,.05);
}
.topic-chip .t-count {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 6px;
  background: rgba(255,255,255,.04);
  border-radius: 4px;
  border: 1px solid var(--border-soft);
}
body[data-theme="light"] .topic-chip .t-count {
  background: var(--surface-3);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* STARTING POINTS (3-card editorial)                                      */
/* ═══════════════════════════════════════════════════════════════════════ */
.starters {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.starter {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 12px;
  transition: all .22s ease;
  overflow: hidden;
}
.starter::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--violet), transparent);
  opacity: 0; transition: opacity .25s ease;
}
.starters-cyan .starter::before {
  background: linear-gradient(180deg, var(--cyan), transparent);
}
.starter:hover {
  border-color: rgba(30,64,175,.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.starters-cyan .starter:hover { border-color: rgba(164,179,106,.4); }
.starter:hover::before { opacity: 1; }

.starter-step {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.starter h3 {
  font-size: 18px;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.015em;
  font-weight: 500;
}
.starter p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.55;
}
.starter-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* FEED-CAT (per-category archive — same structure as .feed)               */
/* ═══════════════════════════════════════════════════════════════════════ */
.feed-cat .feed-item { padding: 28px 0; }

/* ── "Показати ще" button ──────────────────────────────────────────── */
.feed-more {
  display: flex; justify-content: center;
  margin-top: 32px;
  padding-top: 36px;
  border-top: 1px solid var(--border-soft);
}
.show-more {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all .22s ease;
}
.show-more svg { color: var(--muted); transition: transform .22s ease, color .2s ease; }
.show-more:hover {
  border-color: rgba(30,64,175,.5);
  background: rgba(30,64,175,.06);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px rgba(30,64,175,.4);
}
.show-more:hover svg { color: var(--violet-2); transform: translateY(2px); }
.show-more:active { transform: translateY(0); }
body[data-theme="light"] .show-more {
  background: var(--surface);
  border-color: var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* LIGHT THEME — component overrides for places that hardcoded rgba/white  */
/* ═══════════════════════════════════════════════════════════════════════ */
body[data-theme="light"] {
  color-scheme: light;
}

body[data-theme="light"] .topnav {
  background: var(--surface);
  border-color: var(--border-soft);
}
body[data-theme="light"] .topnav a:hover {
  background: var(--surface-3);
}
body[data-theme="light"] .topnav a.is-on {
  background: rgba(30,64,175,.10);
  box-shadow: inset 0 0 0 1px rgba(30,64,175,.30);
}

body[data-theme="light"] .langswitch {
  background: var(--surface);
  border-color: var(--border-soft);
}
body[data-theme="light"] .lang-on {
  background: var(--surface-3);
}

body[data-theme="light"] .themetoggle {
  background: var(--surface);
  border-color: var(--border);
}
body[data-theme="light"] .themetoggle:hover {
  background: rgba(30,64,175,.06);
}

body[data-theme="light"] .topic-chip {
  background: var(--surface);
}
body[data-theme="light"] .topic-chip:hover {
  background: rgba(30,64,175,.06);
}
body[data-theme="light"] .topic-chip.topic-cyan:hover {
  background: rgba(164,179,106,.07);
}

body[data-theme="light"] .cta-meta { color: var(--muted); }
body[data-theme="light"] .btn-ghost {
  background: var(--surface);
  border-color: var(--border);
}
body[data-theme="light"] .btn-ghost:hover {
  background: var(--surface-3);
  border-color: rgba(30,64,175,.4);
}

body[data-theme="light"] .feed-item:hover {
  background: rgba(30,64,175,.025);
}

body[data-theme="light"] .cat,
body[data-theme="light"] .channel,
body[data-theme="light"] .about-teaser,
body[data-theme="light"] .stack-col,
body[data-theme="light"] .proj,
body[data-theme="light"] .rel-card,
body[data-theme="light"] .article-footer-card,
body[data-theme="light"] .about-side .about-card,
body[data-theme="light"] .kv-list,
body[data-theme="light"] .contact-cta {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(11,18,32,.025), 0 8px 24px -16px rgba(11,18,32,.06);
}

body[data-theme="light"] .cat::before {
  background: radial-gradient(60% 80% at 100% 0%, rgba(30,64,175,.08), transparent 60%);
}
body[data-theme="light"] .cat-devops::before {
  background: radial-gradient(60% 80% at 100% 0%, rgba(164,179,106,.10), transparent 60%);
}

body[data-theme="light"] .cat-tags span,
body[data-theme="light"] .proj-tags span {
  background: var(--surface-2);
  border-color: var(--border-soft);
}
body[data-theme="light"] .chip-list li {
  background: var(--surface-2);
}
body[data-theme="light"] .chip-list li:hover {
  background: rgba(30,64,175,.08);
}

body[data-theme="light"] .channel-tag,
body[data-theme="light"] .channel-rate {
  background: var(--surface-2);
}
body[data-theme="light"] .channel-primary {
  background:
    linear-gradient(180deg, rgba(30,64,175,.06), transparent 70%),
    var(--surface);
}

body[data-theme="light"] .cert-list li {
  background: var(--surface-2);
}

body[data-theme="light"] .iconbtn {
  border-color: var(--border);
}
body[data-theme="light"] .iconbtn:hover {
  background: rgba(30,64,175,.05);
}

body[data-theme="light"] .callout {
  background: linear-gradient(90deg, rgba(30,64,175,.05), transparent 60%);
}
body[data-theme="light"] .callout-warn {
  background: linear-gradient(90deg, rgba(245,158,11,.07), transparent 60%);
}

body[data-theme="light"] .codeblock,
body[data-theme="light"] .ctable-wrap,
body[data-theme="light"] .ctable {
  background: var(--surface);
  border-color: var(--border);
}
body[data-theme="light"] .codeblock { /* keep code dark for contrast */
  background: #0F1828;
  border-color: #23304F;
}
body[data-theme="light"] .codeblock pre { color: #E5E7EB; }
body[data-theme="light"] .codeblock-head { background: rgba(255,255,255,.025); border-color: #23304F; }
body[data-theme="light"] .codeblock-head .code-path { color: #C7CBD4; }

body[data-theme="light"] .ctable thead th {
  background: rgba(30,64,175,.08);
  color: var(--text);
}
body[data-theme="light"] .ctable tbody tr:hover { background: rgba(30,64,175,.03); }
body[data-theme="light"] .ctable .trow-total td { background: rgba(164,179,106,.06); }

body[data-theme="light"] .article-body .link {
  color: #6B7C32;
  text-decoration-color: rgba(14,116,144,.4);
}
body[data-theme="light"] .article-body .link:hover { color: var(--text); }

body[data-theme="light"] .pill-siem {
  background: rgba(30,64,175,.10);
  color: #1E40AF;
  border-color: rgba(30,64,175,.28);
}
body[data-theme="light"] .pill-devops {
  background: rgba(8,145,178,.08);
  color: #6B7C32;
  border-color: rgba(8,145,178,.28);
}
body[data-theme="light"] .pill-career {
  background: rgba(219,39,119,.06);
  color: #BE185D;
  border-color: rgba(219,39,119,.25);
}

body[data-theme="light"] .feed-title:hover,
body[data-theme="light"] .hero-title .grad,
body[data-theme="light"] .channel-title .grad-inline,
body[data-theme="light"] .grad,
body[data-theme="light"] .grad-inline {
  background: linear-gradient(96deg, #1E40AF 0%, #6B7C32 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

body[data-theme="light"] .status {
  background: rgba(16,185,129,.08);
  border-color: rgba(16,185,129,.30);
  color: #047857;
}

body[data-theme="light"] .logstrip {
  background: linear-gradient(180deg, transparent, rgba(30,64,175,.04), transparent);
}
body[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, transparent, rgba(30,64,175,.03));
}

body[data-theme="light"] .mono-inline {
  background: rgba(30,64,175,.07);
  color: #1E40AF;
}

body[data-theme="light"] .toc a { border-left-color: var(--border-soft); }
body[data-theme="light"] .toc a:hover { border-left-color: var(--violet); }

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

body[data-theme="light"] .topbar {
  border-bottom-color: var(--border);
}

body[data-theme="light"] ::selection {
  background: rgba(30,64,175,.22);
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE — extend                                                     */
/* ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .starters { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* CONTACT MODAL                                                            */
/* ═══════════════════════════════════════════════════════════════════════ */
.modal {
  border: 0; padding: 0; margin: auto;
  background: transparent;
  max-width: 540px; width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  color: var(--text);
}
.modal::backdrop {
  background: rgba(5, 5, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body[data-theme="light"] .modal::backdrop {
  background: rgba(20, 20, 30, 0.45);
}
.modal[open] { animation: modalIn .35s cubic-bezier(.2,.7,.2,1) both; }
.modal[open]::backdrop { animation: backdropIn .35s ease both; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  position: relative;
  padding: 36px 32px 24px;
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(30,64,175,.12), transparent 55%),
    radial-gradient(120% 80% at 100% 100%, rgba(164,179,106,.10), transparent 55%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 32px 80px -20px rgba(0,0,0,.6),
    0 0 0 1px rgba(30,64,175,.18);
}
body[data-theme="light"] .modal-card {
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 24px 60px -16px rgba(10,10,30,.18),
    0 0 0 1px rgba(30,64,175,.12);
}

.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .18s ease;
}
.modal-close:hover {
  color: var(--text);
  border-color: rgba(30,64,175,.45);
  background: rgba(30,64,175,.07);
}

.modal-title {
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--text);
  max-width: 18ch;
}
.modal-sub {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

.contact-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 22px;
}
.contact-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 12px;
  background: var(--ink-2);
  border: 1px solid var(--border-soft);
  color: var(--text);
  transition: all .18s ease;
}
body[data-theme="light"] .contact-row {
  background: var(--surface-2);
}
.contact-row:hover {
  border-color: rgba(30,64,175,.4);
  background: rgba(30,64,175,.06);
  transform: translateX(2px);
}
.contact-row-accent {
  background:
    linear-gradient(135deg, rgba(30,64,175,.10), rgba(164,179,106,.05));
  border-color: rgba(30,64,175,.32);
}
.contact-row-accent:hover { transform: translateX(2px); }

.contact-ico {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(30,64,175,.10);
  color: var(--violet-2);
  border: 1px solid rgba(30,64,175,.22);
}
.contact-row-accent .contact-ico {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px -4px rgba(30,64,175,.5);
}
.contact-body { display: flex; flex-direction: column; gap: 2px; }
.contact-name { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.contact-meta { font-size: 12px; color: var(--muted); }
.contact-arrow {
  color: var(--muted);
  font-family: var(--font-mono);
  transition: transform .2s ease, color .2s ease;
}
.contact-row:hover .contact-arrow {
  color: var(--violet-2);
  transform: translateX(4px);
}

.modal-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--muted);
}
.modal-foot kbd {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 10px;
}
body[data-theme="light"] .modal-foot kbd {
  background: var(--surface-3);
}

.about-hero-cta {
  margin-top: 28px;
}

@media (max-width: 600px) {
  .modal-card { padding: 28px 20px 18px; }
  .contact-row { padding: 12px; gap: 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════ */
/* TITLE PILL — highlighted key word + inline icon                          */
/* ═══════════════════════════════════════════════════════════════════════ */
.title-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  padding: 0.06em 0.4em 0.06em 0.5em;
  background:
    linear-gradient(135deg, rgba(30,64,175,.22), rgba(164,179,106,.12));
  border: 1px solid rgba(30,64,175,.36);
  border-radius: 0.45em;
  color: var(--text);
  line-height: 1.04;
  white-space: nowrap;
  vertical-align: baseline;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 6px 24px -10px rgba(30,64,175,.4);
}
.title-pill.pill-cyan {
  background:
    linear-gradient(135deg, rgba(164,179,106,.18), rgba(30,64,175,.10));
  border-color: rgba(164,179,106,.4);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 6px 24px -10px rgba(164,179,106,.45);
}
.pill-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 0.78em; height: 0.78em;
  border-radius: 50%;
  background: #fff;
  color: var(--violet);
  flex-shrink: 0;
  box-shadow: 0 2px 8px -2px rgba(30,64,175,.5);
}
.pill-cyan .pill-icon { color: var(--cyan); box-shadow: 0 2px 8px -2px rgba(164,179,106,.5); }
.pill-icon svg { width: 62%; height: 62%; }

body[data-theme="light"] .title-pill {
  background: linear-gradient(135deg, rgba(30,64,175,.14), rgba(164,179,106,.08));
  border-color: rgba(30,64,175,.30);
}
body[data-theme="light"] .title-pill.pill-cyan {
  background: linear-gradient(135deg, rgba(164,179,106,.14), rgba(30,64,175,.08));
}
body[data-theme="light"] .pill-icon {
  background: var(--violet);
  color: #fff;
}
body[data-theme="light"] .pill-cyan .pill-icon { background: var(--cyan); }

/* ═══════════════════════════════════════════════════════════════════════ */
/* SEARCH                                                                  */
/* ═══════════════════════════════════════════════════════════════════════ */
.search {
  display: inline-flex; align-items: center; gap: 10px;
  width: 100%; max-width: 340px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .25s ease, background .2s ease;
  position: relative;
}
.search:focus-within {
  border-color: rgba(30,64,175,.55);
  box-shadow: 0 0 0 4px rgba(30,64,175,.10);
}
.search-icon { color: var(--muted); flex-shrink: 0; }
.search:focus-within .search-icon { color: var(--violet-2); }
.search-input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: 0;
  color: var(--text);
  font-family: inherit; font-size: 14px;
  letter-spacing: -0.005em;
}
.search-input::placeholder { color: var(--muted); }
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px;
  background: var(--muted);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 6l12 12M18 6L6 18' stroke='black' stroke-width='2.5' stroke-linecap='round'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 6l12 12M18 6L6 18' stroke='black' stroke-width='2.5' stroke-linecap='round'/></svg>") center / contain no-repeat;
  cursor: pointer;
}
.search-empty {
  position: absolute; top: calc(100% + 8px); right: 0;
  font-size: 11px; color: var(--muted);
  font-family: var(--font-mono);
}

body[data-theme="light"] .search {
  background: var(--surface);
  border-color: var(--border);
}
body[data-theme="light"] .search:focus-within {
  box-shadow: 0 0 0 4px rgba(30,64,175,.08);
}

@media (max-width: 760px) {
  .search { max-width: 100%; }
}
@media (max-width: 760px) {
  .topbar { gap: 8px; }
  .themetoggle { width: 32px; height: 32px; }
  .cat-hero-title { font-size: clamp(36px, 9vw, 60px); }
  .breadcrumb { margin-bottom: 20px; }
}

/* ============================================================
   Empty states (added in cleanup commit)
   ============================================================ */
.feed-empty,
.proj-empty,
.speak-empty {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-2);
  font-style: italic;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
}

.feed-empty-text {
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.feed-empty-text .link {
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 3px;
}
