:root {
  --bg: #050508; --bg-2: #0b0b16; --card: #0d0d1a; --line: rgba(255,255,255,.08);
  --ink: #f0efff; --muted: rgba(240,239,255,.62); --dim: rgba(240,239,255,.45);
  --accent: #6366f1; --cyan: #22d3ee; --link: #8b8df8;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.7; }
a { color: var(--link); }
img { max-width: 100%; height: auto; display: block; }
.bwrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* nav */
.bnav { position: sticky; top: 0; z-index: 10; background: rgba(5,5,8,.85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bnav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.logo-i { width: 32px; height: 32px; filter: drop-shadow(0 0 10px rgba(99,102,241,.35)); }
.bnav nav { display: flex; align-items: center; gap: 22px; }
.bnav nav a { color: var(--muted); text-decoration: none; font-size: .925rem; font-weight: 500; }
.bnav nav a:hover { color: var(--ink); }
.btn { display: inline-block; background: var(--accent); color: #fff !important; text-decoration: none; font-weight: 600; padding: .7rem 1.2rem; border-radius: 999px; box-shadow: 0 0 24px rgba(99,102,241,.35); }

/* index */
.bhero { text-align: center; padding: 80px 0 48px; }
.kicker { font-family: var(--mono); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); }
.bhero h1 { font-family: var(--display); font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.05; letter-spacing: -.035em; margin: .6rem 0 1rem; }
.bhero h1 em, .gradient { font-style: italic; background: linear-gradient(90deg, #818cf8, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bhero p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 1.0625rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.post:hover { transform: translateY(-4px); border-color: rgba(99,102,241,.5); }
.post img { aspect-ratio: 16/11; object-fit: cover; object-position: top; }
.post .ph { aspect-ratio: 16/11; display: grid; place-items: center; border-bottom: 1px solid var(--line);
  background: radial-gradient(400px 220px at 70% 0%, rgba(99,102,241,.35), transparent 70%), linear-gradient(160deg, #11112a, #07070f); }
.post .ph span { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); opacity: .9; }
.post::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #6366f1, #22d3ee); opacity: .8; }
.post-b { padding: 28px 26px 30px; display: flex; flex-direction: column; height: 100%; }
.post .read { margin-top: auto; padding-top: 1.25rem; font-weight: 600; font-size: .9rem; color: var(--link); }
.post h2 { font-family: var(--display); font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em; margin: .6rem 0 .5rem; }
.post p { color: var(--muted); font-size: .9rem; margin: 0; }
.meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--dim); }
.tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); border: 1px solid rgba(34,211,238,.3); padding: .2rem .55rem; border-radius: 999px; }

/* article */
.art { max-width: 760px; padding-top: 40px; }
.back { display: inline-block; margin-bottom: 28px; text-decoration: none; font-weight: 600; font-size: .925rem; }
.art h1 { font-family: var(--display); font-size: clamp(2rem, 5.5vw, 2.9rem); line-height: 1.1; letter-spacing: -.03em; margin: .9rem 0 1rem; overflow-wrap: anywhere; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 2rem; }
.content h2 { font-family: var(--display); font-size: 1.35rem; letter-spacing: -.01em; margin: 2.2rem 0 .6rem; }
.content p, .content li { color: rgba(240,239,255,.82); font-size: 1.0625rem; }
.content ul { padding-left: 1.2rem; }
.content li { margin: .35rem 0; }
.content li::marker { color: var(--accent); }
code { font-family: var(--mono); font-size: .9em; background: rgba(99,102,241,.14); border-radius: 6px; padding: .1em .35em; overflow-wrap: anywhere; }
pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; overflow-x: auto; }
pre code { background: none; padding: 0; white-space: pre-wrap; word-break: break-all; }
.sources { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.sources h2 { font-size: 1rem; margin-top: 0; }
.sources li { font-size: .95rem; }
.shot { margin: 0 0 2.25rem; }
.shot-frame { position: relative; border-radius: 18px; padding: 1px; background: linear-gradient(135deg, rgba(99,102,241,.9), rgba(34,211,238,.6) 50%, rgba(99,102,241,.25));
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 60px rgba(99,102,241,.18); }
.shot-bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; background: #10101f; border-radius: 17px 17px 0 0; border-bottom: 1px solid var(--line); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a55; display: block; }
.shot-bar i:nth-child(1) { background: #ff5f57; } .shot-bar i:nth-child(2) { background: #febc2e; } .shot-bar i:nth-child(3) { background: #28c840; }
.shot-bar span { margin-left: 10px; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.shot-body { background: radial-gradient(500px 260px at 50% 0%, rgba(99,102,241,.22), transparent 70%), #0b0b18; border-radius: 0 0 17px 17px; padding: clamp(16px, 4vw, 36px); }
.shot-body img { margin: 0 auto; max-height: 620px; width: auto; border-radius: 10px; background: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.shot figcaption { text-align: center; font-size: .85rem; color: var(--dim); margin-top: .8rem; }
.author { display: flex; gap: 16px; align-items: center; margin-top: 2.5rem; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); flex-shrink: 0; }
.author strong { display: block; font-family: var(--display); font-size: 1.05rem; }
.author span { color: var(--muted); font-size: .9rem; line-height: 1.5; display: block; }
.more { margin-top: 3rem; }
.more h2 { font-family: var(--display); font-size: 1.25rem; }
.more-item { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.more-item .tag { margin-right: 10px; }
.more-item:hover { color: var(--link); }

/* cta + footer */
.bcta { text-align: center; margin: 64px 0 0; padding: 48px 24px; border-radius: 26px; border: 1px solid var(--line);
  background: radial-gradient(600px 240px at 50% 0%, rgba(99,102,241,.25), transparent 70%), var(--bg-2); }
.bcta h2 { font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.02em; margin: 0 0 .5rem; }
.bcta p { color: var(--muted); margin: 0 auto 1.5rem; max-width: 460px; }
.bfoot { margin-top: 72px; border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .85rem; color: var(--dim); }
.bfoot .bwrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bfoot a { color: var(--muted); text-decoration: none; }

@media (min-width: 901px) { .post { min-height: 300px; } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .bnav nav { gap: 14px; }
  .bnav nav a[href="/#about"] { display: none; }
  .btn { padding: .6rem 1rem; font-size: .875rem; }
  .bhero { padding: 56px 0 36px; }
  .author { align-items: flex-start; }
}

/* takeaways, tables, faq */
.takeaways { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 16px; padding: 18px 22px; margin: 0 0 2rem; }
.takeaways h2 { font-family: var(--mono); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin: 0 0 .5rem; }
.takeaways ul { margin: 0; padding-left: 1.1rem; }
.takeaways li { color: rgba(240,239,255,.85); margin: .3rem 0; }
.takeaways li::marker { color: var(--accent); }
.content ol { padding-left: 1.3rem; }
.content ol li::marker { color: var(--cyan); font-weight: 600; }
.tbl { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--line); border-radius: 14px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; color: var(--cyan); background: var(--bg-2); font-weight: 500; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td { color: rgba(240,239,255,.82); }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: .6rem 0; background: var(--card); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.faq details p { margin: .6rem 0 0; }
.meta span:not(.tag) { white-space: nowrap; }

/* light reading mode for blog */
body.light { background: #f7f7fb; color: #12121c; }
body.light .bnav { background: rgba(8,8,16,.92); }
body.light main { --ink: #12121c; --muted: #4b4f5e; --dim: #6b7080; --line: rgba(18,18,28,.10); --card: #ffffff; --bg-2: #f0f0f7; --link: #4f46e5; --cyan: #0e7490; }
body.light .art, body.light .art h1, body.light .content h2 { color: #12121c; }
body.light .content p, body.light .content li { color: #2b2e3a; }
body.light .lede { color: #4b4f5e; }
body.light code { background: rgba(79,70,229,.09); color: #3730a3; }
body.light pre { background: #12121c; border-color: #12121c; }
body.light pre code { color: #e6e6f5; }
body.light .tag { color: #0e7490; border-color: rgba(14,116,144,.35); }
body.light .takeaways { background: #fff; box-shadow: 0 6px 24px rgba(18,18,28,.06); }
body.light .takeaways li { color: #2b2e3a; }
body.light .tbl { background: #fff; }
body.light .tbl th { background: #f0f0f7; color: #0e7490; }
body.light .tbl td { color: #2b2e3a; }
body.light .faq details { background: #fff; }
body.light .faq summary { color: #12121c; }
body.light .author { background: #fff; }
body.light .author strong { color: #12121c; }
body.light .bcta { background: radial-gradient(600px 240px at 50% 0%, rgba(99,102,241,.35), transparent 70%), #0d0d1f; border-color: #0d0d1f; }
body.light .bcta h2 { color: #f0efff; } body.light .bcta p { color: rgba(240,239,255,.7); }
body.light .more-item { color: #12121c; }
body.light .bfoot { background: #0a0a12; margin-top: 72px; }
body.light .bhero h1 { color: #12121c; }
body.light .bhero p { color: #4b4f5e; }
body.light .kicker { color: #0e7490; }
body.light .post { background: #fff; color: #12121c; border-color: rgba(18,18,28,.10); box-shadow: 0 6px 24px rgba(18,18,28,.05); }
body.light .post h2 { color: #12121c; }
body.light .post p { color: #4b4f5e; }
body.light .post .read { color: #4f46e5; }
body.light .post:hover { border-color: rgba(79,70,229,.45); }
body.light .meta { color: #6b7080; }
body.light .back { color: #4f46e5; }
body.light .sources a, body.light .content a { color: #4f46e5; }
body.light .shot figcaption { color: #6b7080; }

/* channel (service) pages — dark */
.svc-hero { padding: 80px 0 40px; max-width: 760px; }
.svc-hero h1 { font-family: var(--display); font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.05; letter-spacing: -.035em; margin: .6rem 0 1rem; }
.svc-hero h1 em { font-style: italic; background: linear-gradient(90deg, #818cf8, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.svc-hero p { color: var(--muted); font-size: 1.125rem; margin: 0 0 1.75rem; }
.svc-sec { margin-top: 64px; }
.svc-sec h2 { font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.02em; margin: 0 0 1.25rem; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 24px; }
.svc-card h3 { font-family: var(--display); font-size: 1.1rem; margin: 0 0 .5rem; }
.svc-card p { color: var(--muted); font-size: .95rem; margin: 0; line-height: 1.6; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 2px solid var(--accent); padding-top: 14px; }
.steps li::before { content: "0" counter(s); font-family: var(--mono); font-size: .75rem; color: var(--cyan); display: block; margin-bottom: .4rem; }
.steps strong { display: block; font-family: var(--display); font-size: 1.1rem; margin-bottom: .3rem; }
.steps span { color: var(--muted); font-size: .95rem; }
.news .more-item time { display: block; font-size: .8rem; color: var(--dim); font-weight: 400; margin-bottom: .2rem; }
.news .empty { color: var(--muted); }
.svcp .all { display: inline-block; margin-top: 1rem; font-weight: 600; text-decoration: none; }
.svcp .faq details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: .6rem 0; background: var(--card); }
.svcp .faq summary { cursor: pointer; font-weight: 600; }
.svcp .faq p { color: var(--muted); margin: .6rem 0 0; }
.svcp .other { margin-top: 2.5rem; color: var(--dim); font-size: .95rem; text-align: center; }
.svcp .other a { color: var(--muted); }
.svc-link { display: block; margin-top: 2.5rem; padding: 16px 20px; border-radius: 14px; border: 1px solid rgba(79,70,229,.35); background: rgba(99,102,241,.07); font-weight: 600; text-decoration: none; }
@media (max-width: 900px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .svc-grid, .steps { grid-template-columns: 1fr; } .svc-hero { padding: 56px 0 24px; } }
