/* 0xKEV — dark glassmorphism personal blog (mockup-aligned) */
:root {
  --bg-deep: #05070f;
  --bg-mid: #0a1020;
  --bg-nebula: #0c1830;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hover: rgba(255, 255, 255, 0.075);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-bright: rgba(148, 163, 184, 0.28);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.28);
  --featured: #38bdf8;
  --featured-glow: rgba(56, 189, 248, 0.35);
  --nav-pill: rgba(15, 23, 42, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --max: 1120px;
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

[data-theme="light"] {
  /* L4 Daytime Soft Nebula */
  --bg-deep: #f4f0fb;
  --bg-mid: #ebe4f7;
  --bg-nebula: #e4dcf4;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-hover: rgba(255, 255, 255, 0.86);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-border-bright: rgba(180, 160, 230, 0.55);
  --text: #1e1b3a;
  --text-muted: #5a5578;
  --text-dim: #7a7498;
  --accent: #8b7cf6;
  --accent-glow: rgba(167, 139, 250, 0.45);
  --featured: #22d3ee;
  --featured-glow: rgba(34, 211, 238, 0.4);
  --nav-pill: rgba(255, 255, 255, 0.72);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Deep-space void — black-violet, quiet so canvas stars/meteors pop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 65% 48% at 82% 28%, rgba(56, 120, 200, 0.14) 0%, transparent 62%),
    radial-gradient(ellipse 48% 38% at 18% 12%, rgba(80, 100, 180, 0.10) 0%, transparent 58%),
    radial-gradient(ellipse 40% 35% at 12% 78%, rgba(30, 50, 100, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 100% 95% at 50% 45%, transparent 30%, rgba(0, 0, 4, 0.78) 100%),
    linear-gradient(168deg, #03060c 0%, #060a12 42%, #080d16 72%, #02040a 100%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  background-repeat: repeat;
  mix-blend-mode: overlay;
  opacity: 0.04;
}

/* Daytime Soft Nebula — periwinkle / pink / creamy white */
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 70% 55% at 20% 15%, rgba(196, 181, 253, 0.55) 0%, transparent 58%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(249, 168, 212, 0.42) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 55% 70%, rgba(165, 180, 252, 0.4) 0%, transparent 58%),
    radial-gradient(ellipse 45% 40% at 10% 75%, rgba(233, 213, 255, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 90% 80%, rgba(254, 205, 211, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 40% 40%, rgba(255, 255, 255, 0.7) 0%, transparent 60%),
    linear-gradient(160deg, #faf8ff 0%, #f0ebfa 35%, #ebe4f6 65%, #f5f0fc 100%);
}

[data-theme="light"] body::after {
  mix-blend-mode: soft-light;
  opacity: 0.05;
}

[data-theme="light"] #starfield {
  opacity: 0 !important;
  visibility: hidden;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #e2e8f0;
}

.logo:hover { opacity: 0.92; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.5rem;
  flex: 1;
  min-width: 0;
}

.nav-links a {
  position: relative;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.nav-links a.is-active {
  color: var(--text);
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.12rem;
  height: 1px;
  border-radius: 1px;
  background: rgba(226, 232, 240, 0.55);
  box-shadow: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
  flex-shrink: 0;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  min-width: 10.5rem;
}

.header-search-icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.header-search input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  outline: none;
}

.header-search input::placeholder { color: var(--text-dim); }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
}

.theme-toggle svg { width: 1rem; height: 1rem; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

[data-theme="light"] .site-header {
  background: rgba(244, 240, 251, 0.78);
  border-bottom-color: rgba(140, 120, 180, 0.15);
}

[data-theme="light"] .nav-links a.is-active::after {
  background: #1e1b3a;
  box-shadow: none;
}

[data-theme="light"] .header-search {
  background: rgba(255,255,255,0.75);
  border-color: rgba(140, 120, 180, 0.25);
}

[data-theme="light"] .theme-toggle {
  border: 1px solid rgba(140, 120, 180, 0.2);
  background: rgba(255, 255, 255, 0.85);
  color: #5a5578;
}

[data-theme="light"] .theme-toggle:hover {
  background: #fff;
  color: #1e1b3a;
}

/* Legacy nav-pill (kept for safety if any fragment remains) */
.nav-pill {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.35rem 0.4rem;
  background: var(--nav-pill);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
}
.nav-pill a {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
}
.nav-pill a.is-active { color: var(--text); }

/* ——— Layout ——— */
.wrap {
  width: min(100% - 2.25rem, var(--max));
  margin-inline: auto;
}

main {
  padding-bottom: 4rem;
}

/* ——— Hero ——— */
.hero-bloom {
  position: absolute;
  top: -8%;
  right: -6%;
  width: min(720px, 62vw);
  height: min(520px, 68vh);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-bloom__core {
  position: absolute;
  inset: 8% 5% 15% 18%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 55% 50% at 48% 42%, rgba(96, 165, 250, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 70% 60% at 62% 55%, rgba(129, 140, 248, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 45% 40% at 35% 60%, rgba(56, 189, 248, 0.10) 0%, transparent 60%);
  filter: blur(2px);
}
.hero-bloom__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 70% 40%, rgba(14, 30, 60, 0.15) 0%, transparent 70%),
    linear-gradient(115deg, transparent 35%, rgba(8, 14, 28, 0.35) 100%);
}
[data-theme="light"] .hero-bloom { opacity: 0.45; }
[data-theme="light"] .hero-bloom__core {
  background:
    radial-gradient(ellipse 55% 50% at 48% 42%, rgba(167, 139, 250, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 70% 60% at 62% 55%, rgba(244, 114, 182, 0.12) 0%, transparent 65%);
}

.hero {
  text-align: left;
  padding: 5rem 0 3.25rem;
  position: relative;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  align-items: center;
}

.hero--home { min-height: 300px; }

.hero-copy { position: relative; z-index: 1; max-width: 36rem; }

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 1.35rem;
}
.hero-eyebrow .dot { opacity: 0.45; color: #64748b; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 6.2vw, 3.85rem);
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.02;
  margin-bottom: 1rem;
  color: #f8fafc;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
  font-synthesis: none;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
  line-height: 1.45;
}

.hero-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 30rem;
  line-height: 1.7;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.hero-motto {
  position: relative;
  z-index: 1;
  justify-self: end;
  align-self: center;
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 400;
  color: #94a3b8;
  opacity: 0.55;
  transform: none;
  letter-spacing: 0.04em;
  text-shadow: none;
  margin: 0 0.5rem 0 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  text-transform: none;
  border-radius: 8px;
  position: relative;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s;
}

.cta--primary,
.cta:not(.cta--ghost) {
  color: #0b1220;
  background: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset;
}

.cta--primary:hover,
.cta:not(.cta--ghost):hover {
  background: #f8fafc;
  color: #020617;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.cta--ghost {
  color: #cbd5e1;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: none;
}
.cta--ghost:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.22);
  color: #f1f5f9;
}

.cta-arrow { width: 1em; height: 1em; }
.cta::before { display: none; content: none; }

[data-theme="light"] .hero-title {
  background: none;
  -webkit-text-fill-color: unset;
  color: #0f172a;
}
[data-theme="light"] .hero-eyebrow { color: #64748b; }
[data-theme="light"] .hero-subtitle { color: #334155; }
[data-theme="light"] .hero-motto { color: #64748b; opacity: 0.7; text-shadow: none; }
[data-theme="light"] .cta--primary,
[data-theme="light"] .cta:not(.cta--ghost) {
  color: #f8fafc;
  background: #0f172a;
  border-color: #0f172a;
}
[data-theme="light"] .cta--ghost {
  color: #334155;
  border-color: rgba(15, 23, 42, 0.18);
}

/* ——— Category strip ——— */
.category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.25rem auto 3rem;
  position: relative;
  z-index: 1;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
  position: relative;
  overflow: hidden;
  min-height: 142px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.cat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 2px; bottom: 0;
  border-radius: 2px 0 0 2px;
  background: var(--cat-accent, #64748b);
  opacity: 0.85;
  box-shadow: none;
}
.cat-card:hover {
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.14);
  box-shadow: var(--shadow-soft);
}
.cat-card--oracle { --cat-accent: #F80000; }
.cat-card--mysql { --cat-accent: #4479A1; }
.cat-card--pg { --cat-accent: #4169E1; }
.cat-card--tools { --cat-accent: #64748b; }
.cat-card--official { --cat-accent: #94a3b8; }

.cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  margin-bottom: 0.45rem;
  color: var(--cat-accent, #94a3b8);
  opacity: 1;
}
.cat-icon img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}
.cat-icon--lucide svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
}
.cat-card--tools .cat-icon { color: #94a3b8; }
.cat-card--official .cat-icon { color: #94a3b8; }
.cat-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
.cat-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.cat-note {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}
.cat-note--soon {
  color: #94a3b8;
  font-weight: 500;
}

[data-theme="light"] .cat-card {
  background: rgba(255,255,255,0.7);
  border-color: rgba(15, 23, 42, 0.08);
}

/* ——— Latest section ——— */
.latest-section {
  position: relative;
  z-index: 1;
  padding-bottom: 3.5rem;
}
.latest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.latest-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #e2e8f0;
}
.latest-title::before {
  content: "";
  width: 2px;
  height: 1em;
  border-radius: 1px;
  background: rgba(148, 163, 184, 0.7);
  box-shadow: none;
}
.latest-all {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.latest-all:hover { color: var(--text); }

.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.latest-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem 1.1rem 1.05rem;
  min-height: 152px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
}
.latest-card::after { display: none; content: none; }
.latest-card:hover {
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.14);
  box-shadow: var(--shadow-soft);
}
.latest-card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.latest-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.45;
  color: var(--text);
  flex: 1;
}
.latest-card-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

.tag--accent {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
.tag--soft {
  color: var(--text-muted);
  background: transparent;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="light"] .latest-card {
  background: rgba(255,255,255,0.7);
  border-color: rgba(15, 23, 42, 0.08);
}

/* libs-strip legacy */
.libs-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.15rem auto 1.85rem;
  position: relative;
  z-index: 1;
}
.libs-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}
.libs-chip--muted { color: var(--text-muted); font-weight: 500; }

/* ——— Cards ——— */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
  padding-bottom: 3.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.65rem 1.55rem 1.4rem;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 12px 40px rgba(0, 0, 0, 0.35),
    0 0 48px rgba(100, 60, 180, 0.08);
  transition: transform 0.25s ease, background 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
  min-height: 248px;
}

/* Subtle colored soft glow at top of each card */
.card::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(160, 140, 255, 0.55),
    rgba(100, 180, 255, 0.45),
    transparent
  );
  box-shadow: 0 0 18px 4px rgba(120, 100, 220, 0.2);
  pointer-events: none;
  opacity: 0.9;
}

.card:nth-child(2)::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 160, 255, 0.5),
    rgba(160, 120, 255, 0.45),
    transparent
  );
}

.card:nth-child(3)::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(180, 120, 255, 0.5),
    rgba(120, 140, 255, 0.4),
    transparent
  );
}

.card:hover {
  transform: translateY(-5px);
  background: var(--glass-hover);
  border-color: var(--glass-border-bright);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 16px 48px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(139, 92, 246, 0.15);
}

.card--featured {
  padding-left: 1.7rem;
}

.card--featured::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #67e8f9 0%, #22d3ee 50%, #06b6d4 100%);
  box-shadow:
    0 0 10px var(--featured-glow),
    0 0 22px var(--featured-glow),
    0 0 36px rgba(34, 211, 238, 0.35);
  z-index: 1;
}

.card-meta {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.35;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.card-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1.2rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  backdrop-filter: none;
}

.card-arrow {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: color 0.2s, transform 0.2s;
}

.card:hover .card-arrow {
  color: var(--text);
  transform: translateX(3px);
}

/* ——— Page headings (blog / about) ——— */
.page-hero {
  padding: 3rem 0 2rem;
  text-align: left;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 36rem;
}

/* Blog list */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-bottom: 3rem;
}

.posts-list .card {
  min-height: auto;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem;
}

.posts-list .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.posts-list .card-footer {
  margin-top: 0.9rem;
}

/* About */
.about-card {
  padding: 2rem 2.25rem;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 12px 40px rgba(0, 0, 0, 0.3);
  max-width: 40rem;
  position: relative;
  overflow: hidden;
}

.about-card::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 140, 255, 0.5), transparent);
  pointer-events: none;
}

.about-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card strong {
  color: var(--text);
  font-weight: 600;
}

/* ——— Article (post pages) ——— */
.article {
  max-width: 42rem;
  margin-inline: auto;
  padding: 2.5rem 0 4rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-meta {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.article-meta .tag {
  text-transform: none;
  letter-spacing: 0;
}

.article h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.article-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.article-body {
  padding: 1.85rem 1.9rem;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  position: relative;
  overflow: hidden;
}

.article-body::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 140, 255, 0.45), transparent);
  pointer-events: none;
}

.article-body p {
  margin-bottom: 1.15rem;
  color: var(--text-muted);
  font-size: 0.975rem;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.75rem 0 0.75rem;
  letter-spacing: -0.02em;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.15rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.975rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: rgba(139, 92, 246, 0.18);
  border-radius: 4px;
  color: var(--text);
}

.article-body pre {
  margin: 0 0 1.15rem;
  padding: 1rem 1.15rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

.article-body pre code {
  padding: 0;
  background: none;
  color: var(--text-muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

/* ——— Footer ——— */
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

.site-footer a:hover {
  color: var(--text-muted);
}

/* ——— Responsive ——— */
@media (max-width: 1100px) {
  .category-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-motto { justify-self: start; margin: 0 0 0.75rem; opacity: 0.45; }
}

@media (max-width: 900px) {
  .posts-grid, .latest-grid {
    grid-template-columns: 1fr;
    max-width: 28rem;
    margin-inline: auto;
  }
  .category-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 3.25rem 0 2.25rem; }
  .hero-bloom { opacity: 0.7; width: 80vw; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.75rem 0.9rem;
    flex-wrap: wrap;
  }
  .header-search { min-width: 0; flex: 1; }
  .header-actions { width: 100%; order: 3; }
  .category-strip { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .hero { padding: 2.75rem 0 1.75rem; }
  .cta { padding: 0.7rem 1.15rem; font-size: 0.88rem; }
  .posts-list .card { flex-direction: column; }
  .article-body { padding: 1.35rem 1.2rem; }
  .about-card { padding: 1.5rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .cta, .card-arrow, .cat-card, .latest-card { transition: none; }
  .card:hover, .cta:hover, .cat-card:hover, .latest-card:hover { transform: none; }
}

/* Light-theme glass polish */
[data-theme="light"] .card,
[data-theme="light"] .latest-card,
[data-theme="light"] .about-card,
[data-theme="light"] .article-body {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(100, 80, 160, 0.1), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
}
[data-theme="light"] .card:hover,
[data-theme="light"] .latest-card:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(147, 197, 253, 0.7);
}
[data-theme="light"] .tag {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(180, 160, 220, 0.35);
  color: #5a5578;
}
[data-theme="light"] .tag--accent {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.9);
  border-color: rgba(248, 113, 113, 0.4);
}
[data-theme="light"] .article-body pre {
  background: rgba(245, 240, 255, 0.9);
  border-color: rgba(180, 160, 220, 0.35);
}
[data-theme="light"] .article-body code {
  background: rgba(196, 181, 253, 0.25);
}
