:root {
  --bg: #0b0e14;
  --panel: #12161f;
  --text: #e6e9f0;
  --muted: #9aa3b2;
  --accent: #f97316;
  --accent2: #22d3ee;
  --border: #232a38;
  --maxw: 860px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
}

/* ---------- header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 20, 0.92);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  position: relative;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: 0.02em; }
.brand em { font-style: normal; color: var(--accent); }
.brand img { display: block; border-radius: 7px; }
.links { display: flex; align-items: center; }
.links a { color: var(--muted); text-decoration: none; margin-left: 1.4rem; font-size: 0.95rem; transition: color 0.15s; }
.links a:hover { color: var(--text); }
.links a.cta {
  color: #0b0e14; background: var(--accent); font-weight: 700;
  padding: 0.45rem 1rem; border-radius: 999px; margin-left: 1.6rem;
}
.links a.cta:hover { background: #fb923c; color: #0b0e14; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* ---------- breadcrumbs (tight) ---------- */
.crumbs {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0.5rem 1.25rem 0;
  font-size: 0.82rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent2); }
.crumbs .sep { margin: 0 0.45rem; opacity: 0.5; }
.crumbs .here { color: var(--text); }

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 1.4rem 1.25rem 4rem; }

/* ---------- hero (full-bleed image) ---------- */
.hero {
  position: relative;
  margin: 0 calc(50% - 50vw);
  padding: 0;
  min-height: 480px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,14,20,0.96) 8%, rgba(11,14,20,0.55) 45%, rgba(11,14,20,0.25) 100%);
}
.hero-text { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 4rem 1.25rem 3rem; width: 100%; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.2rem); line-height: 1.05; margin: 0 0 1rem; letter-spacing: -0.02em; text-shadow: 0 2px 24px rgba(0,0,0,0.6); }
.hero p.lede { font-size: 1.12rem; color: #c8cfdb; max-width: 620px; text-shadow: 0 1px 12px rgba(0,0,0,0.7); }
.kicker { color: var(--accent2); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; }
.hero-cta { display: flex; gap: 0.9rem; margin-top: 1.7rem; flex-wrap: wrap; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; padding: 0.7rem 1.5rem; border-radius: 999px; font-size: 0.98rem; transition: transform 0.12s, box-shadow 0.12s; }
.btn.primary { background: linear-gradient(100deg, var(--accent), #ea580c); color: #0b0e14; box-shadow: 0 4px 24px rgba(249, 115, 22, 0.4); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(249, 115, 22, 0.5); }
.btn.ghost { border: 1px solid rgba(255,255,255,0.35); color: #fff; background: rgba(11,14,20,0.35); backdrop-filter: blur(4px); }
.btn.ghost:hover { border-color: var(--accent2); color: var(--accent2); }

/* ---------- content blocks ---------- */
section.block { margin: 3.2rem 0; }
section.block h2 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.page-head { margin: 0.6rem 0 1.8rem; }
.page-head h1 { margin: 0 0 0.3rem; }
.tri { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.tri-item { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem 1.3rem; transition: border-color 0.15s, transform 0.15s; }
.tri-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.tri-n { font-size: 0.8rem; font-weight: 800; color: var(--accent); letter-spacing: 0.1em; margin: 0 0 0.5rem; }
.tri-item p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.tri-item strong { color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.25rem; transition: border-color 0.15s; }
.stat:hover { border-color: var(--accent2); }
.stat .n { font-size: 1.7rem; font-weight: 800; color: var(--accent); }
.stat .l { color: var(--muted); font-size: 0.9rem; }

/* ---------- article cards ---------- */
.card-list { list-style: none; padding: 0; display: grid; gap: 1.25rem; }
.card-list a { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.card-list a:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-img { width: 100%; height: 190px; object-fit: cover; display: block; }
.card-body { padding: 1.15rem 1.35rem 1.25rem; }
.card-body h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.meta { color: var(--muted); font-size: 0.85rem; }
.tag { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.65rem; font-size: 0.78rem; color: var(--muted); margin-right: 0.4rem; }

/* ---------- article ---------- */
article.post h1 { font-size: 2.1rem; line-height: 1.25; margin: 0.6rem 0 0.5rem; }
article.post h2 { margin-top: 2.2rem; font-size: 1.4rem; }
.post-cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; margin: 0.4rem 0 1rem; display: block; }
article.post table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: 0.92rem; }
article.post th, article.post td { border: 1px solid var(--border); padding: 0.55rem 0.75rem; text-align: left; }
article.post th { background: var(--panel); }
article.post blockquote { border-left: 3px solid var(--accent); margin: 1.25rem 0; padding: 0.25rem 1rem; color: var(--muted); }
article.post code { background: var(--panel); padding: 0.15rem 0.4rem; border-radius: 5px; font-size: 0.88em; }
article.post pre { background: var(--panel); padding: 1rem; border-radius: 8px; overflow-x: auto; }
article.post pre code { background: none; padding: 0; }
article.post a { color: var(--accent2); }
article.post img:not(.post-cover) { max-width: 100%; border-radius: 8px; }
.back { display: inline-block; margin-top: 2.5rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }

/* ---------- slim footer ---------- */
footer { border-top: 1px solid var(--border); background: #080b10; }
.foot-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--muted);
}
.foot-brand { display: flex; align-items: center; gap: 0.45rem; font-weight: 800; color: var(--text); font-size: 0.95rem; }
.foot-brand em { font-style: normal; color: var(--accent); }
.foot-brand img { border-radius: 5px; display: block; }
.foot-slogan { color: var(--accent2); font-weight: 600; }
.foot-links { display: flex; gap: 1rem; margin-left: auto; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-addr { color: var(--muted); }
.copy { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem 1rem; color: #5b6372; font-size: 0.75rem; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #0d1119; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 0.5rem 1.25rem 1rem;
  }
  .links.open { display: flex; }
  .links a { margin: 0.55rem 0; font-size: 1.05rem; }
  .links a.cta { margin: 0.8rem 0 0; text-align: center; }
  .hero { min-height: 420px; }
  .foot-inner { gap: 0.8rem; }
  .foot-links { margin-left: 0; }
  .card-img { height: 150px; }
}
