:root {
  --k8-ink: #222;
  --k8-muted: #5f6368;
  --k8-line: #d8dde3;
  --k8-soft: #f5f7f9;
  --k8-blue-soft: #e9f3fb;
  --k8-deep: #1e1e1e;
  --k8-accent: #b5121b;
  --k8-accent-dark: #8f0f16;
  --k8-surface: #fff;
  --k8-radius: 8px;
  --k8-shadow: 0 14px 30px rgba(20, 32, 46, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--k8-ink);
  background: var(--k8-surface);
  font-size: 16px;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.skip-link, .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  z-index: 20;
  left: 16px;
  top: 16px;
  padding: 8px 12px;
  background: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--k8-line);
}
.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border-radius: 6px;
  background: var(--k8-deep);
  color: #fff;
  letter-spacing: 0;
}
.brand-name { white-space: nowrap; }
.primary-nav { margin-left: auto; }
.menu {
  display: flex;
  gap: 4px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 650;
  color: #333;
}
.menu a:hover, .menu a:focus { color: var(--k8-accent); background: #f8f8f8; }
.header-cta, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 750;
}
.header-cta, .button.primary { background: var(--k8-accent); color: #fff; }
.header-cta:hover, .button.primary:hover { background: var(--k8-accent-dark); }
.button.secondary { border: 1px solid rgba(255,255,255,.68); color: #fff; }
.menu-toggle { display: none; }

.home-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--k8-deep);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 20, 25, 0.82), rgba(15, 20, 25, 0.48), rgba(15, 20, 25, 0.2)),
    url("../images/hero-infrastructure.svg") center/cover no-repeat;
}
.hero-content {
  position: relative;
  padding: 98px 0 82px;
}
.hero-kicker {
  margin: 0 0 18px;
  color: #dfe7ec;
  font-weight: 750;
}
h1, h2, h3 { line-height: 1.18; letter-spacing: 0; text-wrap: balance; }
.home-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}
.home-hero p:not(.hero-kicker) {
  max-width: 690px;
  margin: 22px 0 0;
  color: #eef3f6;
  font-size: 1.12rem;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

.section { padding: 78px 0; }
.muted { background: var(--k8-soft); }
.intro-band { background: var(--k8-blue-soft); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr);
  gap: 46px;
  align-items: start;
}
.section-head {
  margin-bottom: 28px;
  max-width: 760px;
}
.section-head.with-link {
  max-width: none;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}
.section h2, .page-hero h1 { margin: 0 0 14px; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.section p, .page-hero p { color: var(--k8-muted); }
.card-grid, .sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.info-card, .post-card, .empty-state, .side-panel {
  border: 1px solid var(--k8-line);
  border-radius: var(--k8-radius);
  background: #fff;
  padding: 24px;
}
.post-card { padding: 0; overflow: hidden; }
.post-card-body { padding: 18px 20px 20px; }
.info-card:hover, .post-card:hover { box-shadow: var(--k8-shadow); transform: translateY(-2px); }
.info-card h2, .post-card h2 { font-size: 1.22rem; margin: 0 0 10px; }
.text-link { color: var(--k8-accent); font-weight: 760; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li {
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid rgba(34,34,34,.14);
  position: relative;
  font-weight: 650;
}
.check-list li::before { content: ""; position: absolute; left: 0; top: 23px; width: 10px; height: 10px; background: var(--k8-accent); border-radius: 50%; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list a, .topic-row a {
  border: 1px solid var(--k8-line);
  border-radius: 6px;
  padding: 9px 13px;
  background: #fff;
  font-weight: 700;
}
.page-hero {
  padding: 58px 0 48px;
  background: linear-gradient(180deg, #f7f9fb, #fff);
  border-bottom: 1px solid var(--k8-line);
}
.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; color: var(--k8-muted); font-size: .92rem; margin-bottom: 18px; }
.detail-layout, .article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: start;
}
.prose { max-width: 74ch; }
.prose a { color: var(--k8-accent); text-decoration: underline; text-underline-offset: 3px; }
.prose h2 { margin-top: 32px; }
.post-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: var(--k8-blue-soft);
  color: var(--k8-deep);
  font-weight: 850;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb-fallback {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--k8-deep);
  color: #fff;
}
.post-meta, .article-meta { color: var(--k8-muted); font-size: .92rem; }
.article-cover { margin: 24px 0; }
.article-cover img { border-radius: var(--k8-radius); }
.pagination { grid-column: 1 / -1; margin-top: 18px; }
.cta-band { background: var(--k8-deep); color: #fff; }
.cta-band p { color: #d8dde3; }
.site-footer {
  background: #171717;
  color: #f5f5f5;
  padding: 58px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr .8fr .8fr 1fr;
  gap: 34px;
}
.site-footer h2 { font-size: 1rem; margin: 0 0 12px; }
.site-footer p, .site-footer a, .footer-bottom { color: #cfd3d6; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 8px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 34px; padding-top: 18px; }

.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--k8-line);
  border-radius: var(--k8-radius);
  background: var(--k8-soft);
}
.contact-form label { display: grid; gap: 8px; font-weight: 760; color: var(--k8-ink); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--k8-line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--k8-ink);
  background: #fff;
  font: inherit;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(181, 18, 27, .22);
  border-color: var(--k8-accent);
}

@media (max-width: 860px) {
  .container { width: min(100% - 28px, 1160px); }
  .header-inner { min-height: 64px; }
  .menu-toggle {
    margin-left: auto;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--k8-line);
    border-radius: 6px;
  }
  .menu-toggle span:not(.screen-reader-text) { width: 20px; height: 2px; background: var(--k8-ink); }
  .primary-nav {
    display: none;
    position: absolute;
    left: 14px;
    right: 14px;
    top: 64px;
    background: #fff;
    border: 1px solid var(--k8-line);
    box-shadow: var(--k8-shadow);
  }
  .primary-nav.is-open { display: block; }
  .menu { display: block; padding: 8px; }
  .menu a { padding: 13px 12px; }
  .header-cta { display: none; }
  .home-hero { min-height: 560px; }
  .split, .detail-layout, .article-layout, .footer-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 56px 0; }
  .section-head.with-link { align-items: start; flex-direction: column; }
}

@media (max-width: 620px) {
  .post-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 18px; }
}

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