@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #f4fafc;
  --bg-elev: #ffffff;
  --bg-soft: #e6f4f8;
  --text: #0c1b24;
  --text-muted: #4a6674;
  --border: #c8e0e8;
  --accent: #e11d48;
  --accent-hover: #be123c;
  --accent-soft: rgba(225, 29, 72, 0.1);
  --tech: #0d9488;
  --tech-soft: rgba(13, 148, 136, 0.12);
  --sky: #0284c7;
  --code-bg: #0f1c24;
  --code-text: #e2e8f0;
  --shadow: 0 20px 48px rgba(12, 74, 110, 0.08);
  --nav-h: 64px;
  --radius: 12px;
  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Outfit', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --max: 1180px;
  --content: 720px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #08141c;
  --bg-elev: #0f1f2a;
  --bg-soft: #163040;
  --text: #e8f4f8;
  --text-muted: #8aadb8;
  --border: #234556;
  --accent: #fb7185;
  --accent-hover: #fda4af;
  --accent-soft: rgba(251, 113, 133, 0.14);
  --tech: #2dd4bf;
  --tech-soft: rgba(45, 212, 191, 0.14);
  --sky: #38bdf8;
  --code-bg: #040c12;
  --code-text: #e2e8f0;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(45, 212, 191, 0.14), transparent 55%),
    radial-gradient(900px 480px at 96% 0%, rgba(56, 189, 248, 0.12), transparent 50%),
    radial-gradient(700px 400px at 70% 100%, rgba(225, 29, 72, 0.05), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; font-family: var(--font-display); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.35);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; gap: 1rem;
  width: min(100% - 1.5rem, var(--max)); margin-inline: auto;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700; color: var(--text); font-size: 0.95rem;
  letter-spacing: -0.02em; white-space: nowrap; flex-shrink: 0;
}
.logo span { color: var(--accent); }
.nav-main { display: flex; gap: 0.15rem; flex: 1; overflow-x: auto; }
.nav-main a {
  color: var(--text-muted); font-size: 0.875rem; font-weight: 500;
  padding: 0.4rem 0.55rem; border-radius: 8px; white-space: nowrap;
}
.nav-main a:hover, .nav-main a.active { color: var(--text); background: var(--bg-soft); }
.header-actions { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; }
.icon-btn, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  border-radius: var(--radius); cursor: pointer; font: inherit; font-weight: 500;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.icon-btn { width: 36px; height: 36px; padding: 0; }
.icon-btn:hover, .btn:hover { border-color: var(--tech); }
.btn { padding: 0.55rem 1rem; font-size: 0.9rem; }
.btn-primary {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 45%, #0d9488 160%);
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 28px rgba(225, 29, 72, 0.22);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #e11d48 100%);
  border-color: transparent; color: #fff;
  transform: translateY(-1px);
}
.btn-ghost { background: transparent; }
.btn-lg { padding: 0.8rem 1.35rem; font-family: var(--font-display); font-weight: 600; }
.menu-toggle { display: none; }

@media (max-width: 960px) {
  .nav-main { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-main.open {
    display: flex; flex-direction: column; position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--border);
    padding: 0.75rem; gap: 0.25rem; max-height: calc(100vh - var(--nav-h)); overflow: auto;
  }
}

/* Hero — luminous tech future, no black bars */
.hero {
  position: relative; overflow: hidden;
  min-height: min(88vh, 760px);
  display: grid; align-items: end;
  background: #e8f7ff;
  color: var(--text);
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 1;
  animation: heroDrift 32s ease-in-out infinite alternate;
}
.hero-aurora {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(244, 250, 252, 0.92) 0%, rgba(244, 250, 252, 0.55) 42%, rgba(244, 250, 252, 0.18) 72%, transparent 100%),
    linear-gradient(180deg, transparent 0%, transparent 48%, rgba(244, 250, 252, 0.75) 78%, rgba(244, 250, 252, 0.97) 100%);
  pointer-events: none;
}
.hero-aurora::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  right: 8%; top: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.28), transparent 68%);
  animation: auroraPulse 8s ease-in-out infinite;
  pointer-events: none;
}
.hero-aurora::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  left: 18%; top: 28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22), transparent 70%);
  animation: auroraPulse 10s ease-in-out infinite reverse;
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 1;
  width: min(100% - 2rem, var(--max)); margin: 0 auto;
  padding: 5rem 0 3.75rem;
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero h1 {
  color: var(--text); margin: 0 0 1rem; max-width: 14ch;
  font-family: 'Outfit', var(--font-display), sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.hero h1 span {
  background: linear-gradient(105deg, #0d9488 0%, #0284c7 50%, #e11d48 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead { font-size: 1.18rem; color: var(--text-muted); max-width: 38rem; margin-bottom: 0.65rem; }
.hero-author {
  color: var(--text-muted); margin-bottom: 1.85rem; font-family: var(--font-mono); font-size: 0.92rem;
}
.hero-author a { color: var(--accent); font-weight: 500; }
.hero-author a:hover { color: var(--tech); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-actions .btn:not(.btn-primary) {
  background: color-mix(in srgb, var(--bg-elev) 75%, transparent);
  color: var(--text);
  border-color: color-mix(in srgb, var(--tech) 35%, var(--border));
  backdrop-filter: blur(10px);
}
.hero-actions .btn:not(.btn-primary):hover {
  border-color: var(--tech);
  color: var(--tech);
  background: var(--tech-soft);
}
[data-theme="dark"] .hero { background: #08141c; }
[data-theme="dark"] .hero-aurora {
  background:
    linear-gradient(105deg, rgba(8, 20, 28, 0.88) 0%, rgba(8, 20, 28, 0.45) 45%, transparent 78%),
    linear-gradient(180deg, transparent 0%, rgba(8, 20, 28, 0.55) 70%, rgba(8, 20, 28, 0.95) 100%);
}
[data-theme="dark"] .hero h1 { color: #f0f9ff; }
[data-theme="dark"] .hero-lead { color: #9ec4d4; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes heroDrift { from { transform: scale(1.02) translateY(0); } to { transform: scale(1.06) translateY(-1%); } }
@keyframes auroraPulse {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.85; }
  50% { transform: scale(1.12) translate(12px, -16px); opacity: 1; }
}

/* ACE credentials band */
.ace-band {
  position: relative;
  padding: 0;
  margin-top: -2.25rem;
  z-index: 2;
}
.ace-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--bg-elev) 88%, #5eead4) 0%, var(--bg-elev) 55%),
    var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise 0.9s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ace-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(360px 160px at 100% 100%, rgba(225, 29, 72, 0.08), transparent 55%);
  pointer-events: none;
}
.ace-mark {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #ecfeff, #ccfbf1);
  border: 1px solid color-mix(in srgb, var(--tech) 45%, var(--border));
  color: var(--tech);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.15;
  flex-shrink: 0;
}
.ace-mark span { display: block; color: var(--accent); font-size: 0.62rem; margin-top: 0.15rem; }
[data-theme="dark"] .ace-mark {
  background: linear-gradient(145deg, #0f2a32, #12353f);
}
.ace-copy, .ace-actions { position: relative; }
.ace-copy h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.ace-copy p { margin: 0; color: var(--text-muted); font-size: 0.95rem; max-width: 46rem; }
.ace-meta {
  display: flex; flex-wrap: wrap; gap: 0.45rem 0.85rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ace-meta strong { color: var(--text); font-weight: 500; }
.ace-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: stretch; }
@media (max-width: 820px) {
  .ace-panel { grid-template-columns: 1fr; }
  .ace-actions { flex-direction: row; flex-wrap: wrap; }
}

/* Expertise chips */
.expertise-row {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin-top: 1rem;
}
.expertise-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--tech);
  background: var(--tech-soft);
  border: 1px solid color-mix(in srgb, var(--tech) 35%, var(--border));
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
}

/* Sections */
.section { padding: 3.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-sub { color: var(--text-muted); margin: 0.35rem 0 0; max-width: 40rem; }

/* Featured */
.featured {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 0;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.featured:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tech) 45%, var(--border)); }
.featured-media { min-height: 280px; background: var(--bg-soft); position: relative; }
.featured-media::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(transparent, color-mix(in srgb, var(--bg-elev) 55%, transparent));
  pointer-events: none;
}
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 800px) { .featured { grid-template-columns: 1fr; } }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.article-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.2s, transform 0.25s ease, box-shadow 0.25s ease;
}
.article-card:hover {
  border-color: color-mix(in srgb, var(--tech) 50%, var(--border));
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.article-card .thumb { aspect-ratio: 16/10; background: var(--bg-soft); overflow: hidden; }
.article-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.45s ease;
}
.article-card:hover .thumb img { transform: scale(1.04); }
.article-card .body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.article-card h3 { margin: 0; font-size: 1.05rem; }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--accent); }
.article-card .excerpt { color: var(--text-muted); font-size: 0.92rem; flex: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.85rem; color: var(--text-muted); font-size: 0.8rem; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: 0.2rem 0.5rem; border-radius: 4px;
  font-family: var(--font-mono);
}
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  font-size: 0.75rem; color: var(--text-muted); border: 1px solid var(--border);
  padding: 0.15rem 0.45rem; border-radius: 6px;
}
.tag:hover { color: var(--accent); border-color: var(--accent); }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.cat-card {
  padding: 1.5rem 1.25rem; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: "";
  position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--tech), var(--sky), var(--accent));
}
.cat-card::after {
  content: "";
  position: absolute; right: -20px; top: -20px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, var(--tech-soft), transparent 70%);
  pointer-events: none;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--tech) 40%, var(--border)); }
.cat-card h3 { margin: 0 0 0.5rem; color: var(--text); }
.cat-card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* Page hero */
.page-hero {
  padding: 3rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(45, 212, 191, 0.14), transparent 60%),
    radial-gradient(600px 240px at 90% 20%, rgba(56, 189, 248, 0.12), transparent 55%),
    var(--bg-elev);
  position: relative;
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin: 0 0 0.5rem; }
.page-hero p { color: var(--text-muted); max-width: 40rem; margin: 0; }

/* About ACE block */
.ace-profile {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--bg-elev) 88%, var(--tech)), var(--bg-elev));
  box-shadow: var(--shadow);
}
.ace-profile-head {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.ace-profile-head h2 { margin: 0; }
.ace-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}
.ace-stat {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
}
.ace-stat .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.ace-stat .value { font-weight: 600; font-size: 0.95rem; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0; align-items: center; }
.filters input, .filters select, .form-control {
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 0.6rem 0.75rem; font: inherit;
}
.filters input[type="search"] { flex: 1; min-width: 200px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-muted);
  padding: 0.35rem 0.7rem; border-radius: 6px; font-size: 0.85rem; cursor: pointer;
}
.chip.active, .chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Article layout */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 2.5rem;
  width: min(100% - 2rem, 1100px); margin: 2rem auto 4rem;
}
.article-main { min-width: 0; }
.article-header { margin-bottom: 1.75rem; }
.article-header h1 { margin: 0.5rem 0 0.75rem; }
.article-lead { font-size: 1.15rem; color: var(--text-muted); }
.article-cover { margin: 1.5rem 0 2rem; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.article-cover img { width: 100%; }
.article-body { font-size: 1.05rem; }
.article-body h2, .article-body h3 {
  margin-top: 2rem; scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.article-body pre, .code-block {
  background: var(--code-bg); color: var(--code-text); border-radius: 8px;
  padding: 1rem 1.1rem; overflow-x: auto; margin: 1.25rem 0; position: relative;
  border: 1px solid #30363d; font-family: var(--font-mono); font-size: 0.88rem; line-height: 1.55;
}
.article-body code { background: var(--bg-soft); padding: 0.1em 0.35em; border-radius: 3px; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.code-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  background: #161b22; color: #8b949e; font-size: 0.75rem; padding: 0.35rem 0.75rem;
  border-radius: 8px 8px 0 0; border: 1px solid #30363d; border-bottom: 0;
  font-family: var(--font-mono);
}
.code-toolbar + pre { margin-top: 0; border-radius: 0 0 8px 8px; }
.copy-btn { background: transparent; border: 0; color: #c9d1d9; cursor: pointer; font: inherit; font-size: 0.75rem; }
.copy-btn:hover { color: #fff; }
.article-body table {
  width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.95rem; overflow-x: auto; display: block;
}
.article-body th, .article-body td { border: 1px solid var(--border); padding: 0.6rem 0.75rem; text-align: left; }
.article-body th { background: var(--bg-soft); }
.article-body figure { margin: 1.5rem 0; }
.article-body figure img {
  border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; width: 100%;
}
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 0.9rem 1rem; margin: 1.25rem 0; border-radius: 0 6px 6px 0;
}
.callout.info { border-color: #58a6ff; background: rgba(88,166,255,0.1); }
.callout.tip { border-color: #3fb950; background: rgba(63,185,80,0.1); }
.callout.warning, .callout.important { border-color: #d29922; background: rgba(210,153,34,0.12); }
.callout .label { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.25rem; }

.toc {
  position: sticky; top: calc(var(--nav-h) + 1rem);
  border: 1px solid var(--border); border-radius: 8px; padding: 1rem;
  background: var(--bg-elev); font-size: 0.88rem;
}
.toc h4 { margin: 0 0 0.75rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc a { color: var(--text-muted); display: block; padding: 0.25rem 0; }
.toc a:hover, .toc a.active { color: var(--accent); }
.toc-mobile { display: none; margin-bottom: 1.25rem; }
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc-desktop { display: none; }
  .toc-mobile { display: block; }
}

.series-nav {
  border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.15rem;
  background: var(--bg-elev); margin: 1.5rem 0;
}
.series-nav .progress {
  height: 6px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; margin: 0.6rem 0 1rem;
}
.series-nav .progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--tech)); }
.series-links { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; }

.article-footer-actions {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.share, .feedback { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.share button, .feedback button {
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  border-radius: 6px; padding: 0.4rem 0.7rem; cursor: pointer; font: inherit; font-size: 0.85rem;
}

/* Forms */
.form { max-width: 560px; display: grid; gap: 1rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 500; font-size: 0.92rem; }
.form input, .form select, .form textarea {
  width: 100%; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius); padding: 0.7rem 0.8rem; font: inherit;
}
.form textarea { min-height: 140px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* Subscribe band */
.subscribe-band {
  background:
    radial-gradient(800px 300px at 15% 0%, rgba(45, 212, 191, 0.22), transparent 60%),
    radial-gradient(600px 280px at 90% 100%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(500px 220px at 50% 80%, rgba(225, 29, 72, 0.08), transparent 50%),
    linear-gradient(180deg, #ecfeff, #e0f2fe);
  color: var(--text); padding: 3.25rem 0; margin-top: 2rem;
  border-top: 1px solid var(--border);
}
.subscribe-band h2 { color: var(--text); margin: 0 0 0.5rem; }
.subscribe-band p { color: var(--text-muted); }
.subscribe-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; max-width: 480px; }
.subscribe-form input {
  flex: 1; min-width: 200px; padding: 0.75rem 0.9rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font: inherit;
}
[data-theme="dark"] .subscribe-band {
  background:
    radial-gradient(800px 300px at 15% 0%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(600px 280px at 90% 100%, rgba(56, 189, 248, 0.12), transparent 55%),
    linear-gradient(180deg, #0a1a22, #0c2230);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-elev);
  padding: 3rem 0 2rem; margin-top: 2rem; font-size: 0.92rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; margin-bottom: 2rem;
}
.footer-grid h4 { margin: 0 0 0.75rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.footer-grid a { display: block; color: var(--text-muted); padding: 0.2rem 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-brand { font-family: var(--font-display); font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.footer-brand span { color: var(--accent); }
.footer-ace {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--tech);
}
.footer-ace:hover { color: var(--accent); }
.disclaimer {
  color: var(--text-muted); font-size: 0.8rem; line-height: 1.5;
  border-top: 1px solid var(--border); padding-top: 1.25rem;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.9);
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 0.75rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(96vw, 1200px); max-height: 82vh; object-fit: contain; transition: transform 0.2s; }
.lightbox-toolbar { display: flex; gap: 0.5rem; }
.lightbox-toolbar button {
  background: #21262d; color: #fff; border: 1px solid #30363d; border-radius: 6px;
  padding: 0.5rem 0.85rem; cursor: pointer; font: inherit;
}

/* Search modal */
.search-modal {
  position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,0.5);
  display: none; align-items: flex-start; justify-content: center; padding: 10vh 1rem;
}
.search-modal.open { display: flex; }
.search-panel {
  width: min(100%, 640px); background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
}
.search-panel input {
  width: 100%; border: 0; border-bottom: 1px solid var(--border); padding: 1rem 1.1rem;
  font: inherit; font-size: 1.05rem; background: transparent; color: var(--text); outline: none;
}
.search-results { max-height: 50vh; overflow: auto; }
.search-results a {
  display: block; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text);
}
.search-results a:hover { background: var(--bg-soft); }
.search-results .muted { color: var(--text-muted); font-size: 0.85rem; }

/* Admin */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-nav { background: #0d1117; color: #c9d1d9; padding: 1.25rem 0.75rem; }
.admin-nav a { display: block; color: #c9d1d9; padding: 0.55rem 0.75rem; border-radius: 6px; font-size: 0.92rem; }
.admin-nav a:hover, .admin-nav a.active { background: #21262d; color: #fff; }
.admin-nav .brand { color: #fff; font-weight: 700; padding: 0.5rem 0.75rem 1.25rem; }
.admin-main { padding: 1.5rem; background: var(--bg); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.stat {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 1rem;
}
.stat .n { font-size: 1.6rem; font-weight: 700; }
.stat .l { color: var(--text-muted); font-size: 0.8rem; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--bg-elev); font-size: 0.9rem; }
.admin-table th, .admin-table td { border: 1px solid var(--border); padding: 0.65rem 0.75rem; text-align: left; }
.editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.5rem; border: 1px solid var(--border);
  border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--bg-soft);
}
.editor-toolbar button {
  border: 1px solid var(--border); background: var(--bg-elev); border-radius: 4px;
  padding: 0.3rem 0.5rem; cursor: pointer; font-size: 0.8rem;
}
#editor {
  min-height: 420px; border: 1px solid var(--border); border-radius: 0 0 8px 8px;
  padding: 1rem; background: var(--bg-elev); outline: none;
}
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: radial-gradient(ellipse at top, #1a222d, #0d1117);
}
.login-card {
  width: min(100%, 400px); background: #161b22; color: #e6edf3; border: 1px solid #30363d;
  border-radius: 12px; padding: 2rem;
}
.login-card input {
  width: 100%; margin: 0.35rem 0 0.85rem; padding: 0.7rem; border-radius: 6px;
  border: 1px solid #30363d; background: #0d1117; color: #fff; font: inherit;
}
@media (max-width: 800px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
}

/* Series cards */
.series-card {
  display: grid; grid-template-columns: 160px 1fr; gap: 1.25rem;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.series-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--tech) 40%, var(--border));
  box-shadow: var(--shadow);
}
.series-card img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; }
@media (max-width: 600px) { .series-card { grid-template-columns: 1fr; } }

.muted { color: var(--text-muted); }
.empty { padding: 2rem; text-align: center; color: var(--text-muted); border: 1px dashed var(--border); border-radius: 8px; }

/* ===== Who / About page — luminous tech future ===== */
.who-page {
  --who-cyan: #14b8a6;
  --who-lime: #38bdf8;
  --who-coral: #e11d48;
  --who-amber: #0ea5e9;
  --who-magenta: #f43f5e;
  --who-ink: #ecfeff;
  --font-who: 'Outfit', var(--font-display), sans-serif;
}
.who-page .site-header {
  border-bottom-color: transparent;
  background: color-mix(in srgb, var(--bg-elev) 72%, transparent);
}

.who-hero {
  position: relative;
  overflow: hidden;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  padding: 5.5rem 0 3.5rem;
  color: var(--text);
  background: #e8f7ff;
}
.who-hero-mesh {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 12% 20%, rgba(45, 212, 191, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 55% at 88% 15%, rgba(56, 189, 248, 0.32), transparent 50%),
    radial-gradient(ellipse 65% 50% at 55% 90%, rgba(225, 29, 72, 0.12), transparent 55%),
    linear-gradient(160deg, #f0fdfa 0%, #e0f2fe 45%, #ecfeff 100%);
  animation: whoMesh 14s ease-in-out infinite alternate;
}
.who-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
.who-hero-orb--a {
  width: 220px; height: 220px; top: 12%; left: 8%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.45), transparent 70%);
  animation: whoFloat 9s ease-in-out infinite;
}
.who-hero-orb--b {
  width: 280px; height: 280px; top: 8%; right: 5%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.4), transparent 70%);
  animation: whoFloat 11s ease-in-out infinite reverse;
}
.who-hero-orb--c {
  width: 180px; height: 180px; bottom: 18%; right: 28%;
  background: radial-gradient(circle, rgba(251, 113, 133, 0.28), transparent 70%);
  animation: whoFloat 8s 1s ease-in-out infinite;
}
.who-hero-inner {
  position: relative; z-index: 1;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.who-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tech);
  margin: 0 0 1rem;
}
.who-name {
  font-family: var(--font-who);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
  color: var(--text);
}
.who-name span {
  background: linear-gradient(105deg, #0d9488 0%, #0284c7 45%, #e11d48 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.who-tagline {
  font-family: var(--font-who);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--text);
  margin: 0 0 0.85rem;
  max-width: 36rem;
}
.who-lead {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 0 1.75rem;
}
.who-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.who-btn-glow {
  background: linear-gradient(135deg, #0d9488, #0284c7 55%, #e11d48) !important;
  border: 0 !important;
  color: #fff !important;
  font-family: var(--font-who);
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.28) !important;
}
.who-btn-glow:hover {
  color: #fff !important;
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.who-btn-outline {
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent) !important;
  border-color: color-mix(in srgb, var(--tech) 40%, var(--border)) !important;
  color: var(--text) !important;
  font-family: var(--font-who);
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.who-btn-outline:hover {
  border-color: var(--tech) !important;
  color: var(--tech) !important;
  background: var(--tech-soft) !important;
}

[data-theme="dark"] .who-hero {
  background: #08141c;
  color: #e8f4f8;
}
[data-theme="dark"] .who-hero-mesh {
  background:
    radial-gradient(ellipse 80% 60% at 12% 20%, rgba(45, 212, 191, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 55% at 88% 15%, rgba(56, 189, 248, 0.22), transparent 50%),
    radial-gradient(ellipse 65% 50% at 55% 90%, rgba(225, 29, 72, 0.12), transparent 55%),
    linear-gradient(160deg, #061018 0%, #0a1a28 45%, #0c1620 100%);
}
[data-theme="dark"] .who-name { color: #f0f9ff; }
[data-theme="dark"] .who-tagline { color: #d7f6ff; }
[data-theme="dark"] .who-lead { color: #9ec4d4; }
[data-theme="dark"] .who-btn-outline {
  background: rgba(8, 20, 28, 0.45) !important;
  color: #fff !important;
}

.who-section { padding: 3.25rem 0 4rem; }
.who-wrap { max-width: 920px; }

.who-ace {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.75rem;
  border-radius: 18px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box,
    linear-gradient(120deg, var(--who-cyan), var(--who-lime), var(--who-coral), var(--who-magenta)) border-box;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.12);
  margin-bottom: 2.5rem;
  animation: rise 0.85s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.who-ace-badge {
  width: 76px; height: 76px;
  border-radius: 16px;
  display: grid; place-content: center;
  background: linear-gradient(145deg, #ecfeff, #ccfbf1);
  border: 2px solid var(--who-cyan);
  font-family: var(--font-who);
  font-weight: 800;
  text-align: center;
  line-height: 1.05;
  flex-shrink: 0;
}
.who-ace-badge-top { color: var(--who-cyan); font-size: 0.95rem; letter-spacing: 0.08em; }
.who-ace-badge-bot { color: var(--who-coral); font-size: 0.72rem; letter-spacing: 0.14em; margin-top: 0.15rem; }
[data-theme="dark"] .who-ace-badge {
  background: linear-gradient(145deg, #0f2a32, #12353f);
}
.who-ace-body h2 {
  font-family: var(--font-who);
  font-weight: 800;
  margin: 0 0 0.4rem;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
}
.who-ace-body > p { color: var(--text-muted); margin: 0 0 1.25rem; max-width: 40rem; }

.who-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.who-stat {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left-width: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.who-stat:hover { transform: translateY(-2px); }
.who-stat--cyan { border-left-color: var(--who-cyan); }
.who-stat--lime { border-left-color: var(--who-lime); }
.who-stat--coral { border-left-color: var(--who-coral); }
.who-stat--amber { border-left-color: var(--who-amber); }
.who-stat--magenta { border-left-color: var(--who-magenta); }
.who-stat .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.who-stat .value {
  font-family: var(--font-who);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.who-chips {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.who-chip {
  font-family: var(--font-who);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  color: #0c1b24;
  background: linear-gradient(135deg, #99f6e4, #5eead4);
  border: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.who-chip:nth-child(3n) { background: linear-gradient(135deg, #bae6fd, #7dd3fc); }
.who-chip:nth-child(3n+1) { background: linear-gradient(135deg, #fecdd3, #fb7185); color: #fff; }
.who-chip:nth-child(4n) { background: linear-gradient(135deg, #a5f3fc, #22d3ee); }
.who-chip:nth-child(5n) { background: linear-gradient(135deg, #fda4af, #e11d48); color: #fff; }
.who-chip:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.05); }

.who-story, .who-why {
  margin-bottom: 2.5rem;
  animation: rise 0.85s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.who-story h2, .who-core h2, .who-why h2 {
  font-family: var(--font-who);
  font-weight: 800;
  margin: 0 0 1rem;
  position: relative;
  display: inline-block;
}
.who-story h2::after, .who-core h2::after, .who-why h2::after {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  margin-top: 0.4rem;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--who-cyan), var(--who-lime), var(--who-coral));
}
.who-note {
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--who-cyan) 50%, var(--border));
  background: color-mix(in srgb, var(--who-cyan) 8%, var(--bg-elev));
  color: var(--text-muted);
  font-size: 0.95rem;
}

.who-core { margin-bottom: 2.5rem; animation: rise 0.85s 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }
.who-core-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.who-core-grid li {
  font-family: var(--font-who);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.who-core-grid li::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--who-cyan), var(--who-magenta));
}
.who-core-grid li:nth-child(2n)::before { background: linear-gradient(180deg, var(--who-lime), var(--who-amber)); }
.who-core-grid li:nth-child(3n)::before { background: linear-gradient(180deg, var(--who-coral), var(--who-magenta)); }
.who-core-grid li:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--who-cyan) 45%, var(--border));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.1);
}

@keyframes whoMesh {
  from { transform: scale(1) translate(0, 0); filter: hue-rotate(0deg); }
  to { transform: scale(1.06) translate(-1.5%, 1%); filter: hue-rotate(18deg); }
}
@keyframes whoFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(18px, -22px); }
}

@media (max-width: 700px) {
  .who-ace { grid-template-columns: 1fr; }
  .who-hero { min-height: auto; padding-top: 4.5rem; }
}

/* Homepage ACE band — luminous tech strip */
.ace-band .ace-panel {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box,
    linear-gradient(120deg, #14b8a6, #38bdf8, #e11d48) border-box;
}
.ace-band .ace-mark {
  border-color: #14b8a6;
  background: linear-gradient(145deg, #ecfeff, #ccfbf1);
  color: #0d9488;
}
[data-theme="dark"] .ace-band .ace-mark {
  background: linear-gradient(145deg, #0f2a32, #12353f);
  color: #2dd4bf;
}
.ace-band .expertise-chip:nth-child(odd) {
  color: #0c1b24;
  background: linear-gradient(135deg, #99f6e4, #5eead4);
  border-color: transparent;
}
.ace-band .expertise-chip:nth-child(even) {
  color: #0c1b24;
  background: linear-gradient(135deg, #bae6fd, #7dd3fc);
  border-color: transparent;
}
.ace-band .expertise-chip:nth-child(3n) {
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #e11d48);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
