:root{
  --bg:#f7f8fc;--card:#fff;--fg:#1b1f2e;--muted:#667085;--line:#e6e8f0;
  --accent:#5b5fc7;--accent2:#0b8cff;--accent-soft:#eceefe;--code:#f1f2f9;
  --shadow:0 1px 2px rgba(20,24,50,.06),0 8px 24px rgba(20,24,50,.06);
  --grad:linear-gradient(135deg,#5b5fc7 0%,#0b8cff 100%);
}
@media(prefers-color-scheme:dark){:root{
  --bg:#0e1118;--card:#171b26;--fg:#e8eaf2;--muted:#9aa3b8;--line:#262c3b;
  --accent:#8b90ff;--accent2:#5db4ff;--accent-soft:#222645;--code:#1d2232;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.35);
}}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--fg);font:17px/1.75 Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}
a{color:var(--accent);text-decoration-thickness:1px;text-underline-offset:3px}
a:hover{color:var(--accent2)}
.wrap{max-width:1040px;margin:0 auto;padding:0 22px}

/* header */
.site-header{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.site-header .wrap{display:flex;justify-content:space-between;align-items:center;height:64px}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:1.25rem;letter-spacing:-.02em;text-decoration:none;color:var(--fg)}
.brand .logo{width:32px;height:32px;border-radius:9px;background:var(--grad);display:grid;place-items:center;color:#fff;font-size:.95rem;font-weight:800}
.brand b{color:var(--accent)}
.site-header nav a{margin-left:6px;padding:7px 14px;border-radius:999px;text-decoration:none;color:var(--muted);font-weight:600;font-size:.95rem}
.site-header nav a:hover{background:var(--accent-soft);color:var(--accent)}

/* hero */
.hero{background:var(--grad);color:#fff;padding:64px 0 76px;position:relative;overflow:hidden}
.hero::after{content:"";position:absolute;right:-120px;top:-120px;width:420px;height:420px;border-radius:50%;background:rgba(255,255,255,.1)}
.hero::before{content:"";position:absolute;left:-80px;bottom:-160px;width:340px;height:340px;border-radius:50%;background:rgba(255,255,255,.07)}
.hero .wrap{position:relative;z-index:1}
.hero .eyebrow{display:inline-block;font-size:.8rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;background:rgba(255,255,255,.18);padding:5px 12px;border-radius:999px}
.hero h1{font-size:clamp(2rem,5vw,3.2rem);line-height:1.12;letter-spacing:-.03em;margin:16px 0 12px;max-width:680px}
.hero p{font-size:1.15rem;opacity:.92;max-width:600px;margin:0}
.hero .tags{margin-top:22px;display:flex;flex-wrap:wrap;gap:8px}
.hero .tags span{background:rgba(255,255,255,.16);padding:5px 12px;border-radius:999px;font-size:.85rem;font-weight:600}

/* cards */
.section-title{font-size:1.4rem;letter-spacing:-.02em;margin:0 0 20px}
.home-main{margin-top:-40px;position:relative;z-index:2;padding-bottom:56px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:22px}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column;transition:transform .18s ease,box-shadow .18s ease}
.card:hover{transform:translateY(-4px)}
.card .thumb{height:170px;background:var(--grad);display:block;position:relative;overflow:hidden}
.card .thumb img{width:100%;height:100%;object-fit:cover;border-radius:0;display:block}
.card .thumb.ph{display:grid;place-items:center;color:rgba(255,255,255,.85);font-size:2.4rem;font-weight:800}
.card .body{padding:18px 20px 20px;display:flex;flex-direction:column;gap:8px;flex:1}
.card h3{margin:0;font-size:1.15rem;line-height:1.35;letter-spacing:-.01em}
.card h3 a{color:var(--fg);text-decoration:none}
.card h3 a:hover{color:var(--accent)}
.card p{margin:0;color:var(--muted);font-size:.95rem;line-height:1.6}
.card.featured{grid-column:1/-1;flex-direction:row}
.card.featured .thumb{height:auto;min-height:260px;width:44%;flex:none}
.card.featured h3{font-size:1.6rem}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{font-size:.74rem;font-weight:700;color:var(--accent);background:var(--accent-soft);padding:3px 10px;border-radius:999px;letter-spacing:.02em}
.meta{color:var(--muted);font-size:.85rem;margin-top:auto}
.pager{display:flex;justify-content:space-between;margin-top:28px}
.pager a{background:var(--card);border:1px solid var(--line);padding:9px 18px;border-radius:999px;text-decoration:none;font-weight:600}

/* article */
.page-main{max-width:760px;margin:0 auto;padding:44px 22px 64px}
.post-head{margin-bottom:28px}
.post-head h1{font-size:clamp(1.9rem,4vw,2.6rem);line-height:1.15;letter-spacing:-.03em;margin:12px 0 10px}
.post-head .meta{margin:0}
.post-body{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:32px 34px;box-shadow:var(--shadow)}
.post-body>*:first-child{margin-top:0}
.post-body h2{font-size:1.5rem;margin:1.8em 0 .5em;letter-spacing:-.02em}
.post-body h3{font-size:1.2rem;margin:1.6em 0 .4em}
.post-body ul,.post-body ol{padding-left:1.4em}
.post-body li{margin:.25em 0}
.post-body hr{border:0;border-top:1px solid var(--line);margin:2em 0}
.post-body blockquote{margin:1.2em 0;padding:.6em 1.1em;border-left:4px solid var(--accent);background:var(--accent-soft);border-radius:0 10px 10px 0;color:var(--fg)}
.post-body table{border-collapse:collapse;width:100%;display:block;overflow:auto;font-size:.95rem}
.post-body td,.post-body th{border:1px solid var(--line);padding:8px 12px}
.post-body th{background:var(--accent-soft)}
pre,code{background:var(--code);border-radius:8px;font:.88em ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
code{padding:.15em .4em}pre{padding:16px;overflow:auto;line-height:1.55}pre code{padding:0;background:none}

/* images: capped size, click to enlarge */
.post-body img{display:block;max-width:min(100%,620px);max-height:380px;width:auto;height:auto;margin:1.4em auto;border-radius:10px;border:1px solid var(--line);box-shadow:var(--shadow);cursor:zoom-in;transition:transform .15s}
.post-body img:hover{transform:scale(1.01)}
.post-body li img{margin:.8em 0}
.post-body img[src$=".gif"]{max-height:340px}
.post-body p>img:only-child{margin-left:auto;margin-right:auto}
.lightbox{position:fixed;inset:0;background:rgba(8,10,18,.88);display:none;align-items:center;justify-content:center;z-index:100;padding:24px;cursor:zoom-out}
.lightbox.open{display:flex}
.lightbox img{max-width:96vw;max-height:92vh;border-radius:10px;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.embed{position:relative;padding-top:56.25%;margin:1.4em 0;border-radius:12px;overflow:hidden;box-shadow:var(--shadow)}
.embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.back{display:inline-block;margin-bottom:14px;text-decoration:none;font-weight:600;color:var(--muted)}

/* footer */
.site-footer{border-top:1px solid var(--line);color:var(--muted);font-size:.9rem;padding:28px 0 44px}
.site-footer .wrap{display:flex;flex-wrap:wrap;gap:8px 22px;align-items:center}
.site-footer .sp{flex:1}
.site-footer a{color:var(--muted);text-decoration:none}.site-footer a:hover{color:var(--accent)}

@media(max-width:700px){
  .card.featured{flex-direction:column}.card.featured .thumb{width:100%;min-height:180px}
  .post-body{padding:22px 18px}.hero{padding:44px 0 60px}
}
