:root {
  --bg: #07100d;
  --ink: #eef7f1;
  --muted: #9ab3a7;
  --panel: rgba(14, 25, 21, 0.82);
  --panel-strong: #101c18;
  --line: rgba(202, 255, 217, 0.14);
  --green: #76b900;
  --green-soft: rgba(118, 185, 0, 0.18);
  --cyan: #60d6c8;
  --amber: #f2c14e;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(118, 185, 0, 0.12), transparent 34%),
    linear-gradient(180deg, #06100c 0%, #0a1411 44%, #08100d 100%);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 18px;
  height: 18px;
  background: var(--green);
  box-shadow: 0 0 24px rgba(118, 185, 0, 0.7);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav a {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
}

.nav-user {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  padding: 8px 10px;
}

.nav a:hover {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: 48px;
  min-height: calc(100vh - 76px);
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 790px;
  margin-bottom: 22px;
  font-size: clamp(38px, 5vw, 76px);
  line-height: 1.04;
}

.lead {
  max-width: 680px;
  color: #c6d8cf;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.view-counter {
  display: inline-flex;
  border: 1px solid rgba(118, 185, 0, 0.3);
  border-radius: 6px;
  background: rgba(118, 185, 0, 0.1);
  color: #d9e8df;
  font-size: 14px;
  font-weight: 800;
  padding: 7px 10px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  font-weight: 800;
  padding: 0 18px;
}

.button.primary {
  background: var(--green);
  color: #06100c;
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.hero-visual {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 35% 30%, rgba(96, 214, 200, 0.2), transparent 36%),
    linear-gradient(160deg, rgba(20, 36, 31, 0.96), rgba(6, 16, 12, 0.92));
  background-size: 40px 40px, 40px 40px, auto, auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.45);
}

.rack {
  position: absolute;
  display: grid;
  gap: 12px;
  width: 175px;
  padding: 14px;
  border: 1px solid rgba(238, 247, 241, 0.14);
  background: rgba(5, 12, 10, 0.78);
}

.rack-a {
  top: 72px;
  left: 54px;
}

.rack-b {
  right: 48px;
  bottom: 86px;
}

.rack span {
  height: 42px;
  border-left: 4px solid var(--green);
  background:
    linear-gradient(90deg, rgba(118, 185, 0, 0.18), transparent),
    #15221d;
}

.fabric-lines {
  position: absolute;
  inset: 0;
}

.fabric-lines i {
  position: absolute;
  height: 2px;
  width: 58%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: rotate(28deg);
  opacity: 0.65;
}

.fabric-lines i:nth-child(1) { top: 28%; left: 18%; }
.fabric-lines i:nth-child(2) { top: 39%; left: 16%; }
.fabric-lines i:nth-child(3) { top: 50%; left: 20%; }
.fabric-lines i:nth-child(4) { top: 61%; left: 16%; }
.fabric-lines i:nth-child(5) { top: 72%; left: 19%; }

.telemetry {
  position: absolute;
  right: 26px;
  top: 28px;
  display: grid;
  gap: 4px;
  width: 190px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 16, 13, 0.84);
  padding: 14px;
}

.telemetry b {
  color: var(--green);
}

.telemetry em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.metric-band,
.section,
.contact-section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 152px;
  background: var(--panel-strong);
  padding: 22px;
}

.metric strong {
  color: var(--green);
  font-size: 38px;
  line-height: 1;
}

.metric span {
  font-weight: 800;
}

.metric small {
  color: var(--muted);
  line-height: 1.5;
}

.section {
  padding: 92px 0 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.section-heading h2,
.contact-section h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.15;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.case-grid,
.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.case-card,
.capability-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
}

.case-index {
  color: var(--green);
  font-weight: 900;
}

.case-card h3,
.capability-card h3 {
  margin: 14px 0 20px;
  font-size: 21px;
}

dl {
  margin: 0;
}

dt {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

dd {
  margin: 6px 0 18px;
  color: #c5d6ce;
  line-height: 1.7;
}

dd:last-child {
  margin-bottom: 0;
}

.capability-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span,
.article-list a {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #d9e8df;
  font-size: 14px;
  padding: 8px 10px;
}

.tag-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(118, 185, 0, 0.34);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(118, 185, 0, 0.13), rgba(255, 255, 255, 0.035));
  color: #ecf8ef;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 11px;
  box-shadow: inset 0 -1px 0 rgba(118, 185, 0, 0.22);
}

.tag-list a::after {
  content: ">";
  color: var(--green);
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.timeline li {
  display: grid;
  gap: 18px;
  min-height: 138px;
  background: var(--panel-strong);
  padding: 18px;
}

.timeline span {
  color: var(--green);
  font-weight: 900;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.article-list a {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 76px;
  line-height: 1.55;
}

.article-list strong {
  font-size: 15px;
}

.article-list small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.case-card h3 a:hover,
.tag-list a:hover,
.article-list a:hover {
  border-color: rgba(118, 185, 0, 0.55);
  color: var(--ink);
  background: rgba(118, 185, 0, 0.1);
}

.tag-list a:hover {
  border-color: var(--green);
  background: rgba(118, 185, 0, 0.2);
  box-shadow: 0 0 0 3px rgba(118, 185, 0, 0.08), inset 0 -1px 0 rgba(118, 185, 0, 0.38);
  transform: translateY(-1px);
}

.detail-hero,
.detail-body {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
}

.detail-hero {
  padding: 96px 0 34px;
}

.detail-hero h1 {
  max-width: 860px;
  font-size: clamp(34px, 5vw, 64px);
}

.detail-body {
  padding-bottom: 86px;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
}

.detail-panel p {
  color: #c5d6ce;
  line-height: 1.85;
}

.detail-slug {
  display: inline-flex;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  padding: 6px 10px;
}

.auth-hero {
  padding-bottom: 18px;
}

.auth-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
}

.auth-form p {
  display: grid;
  gap: 8px;
  margin: 0;
}

.auth-form label {
  color: var(--green);
  font-weight: 900;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: inherit;
  padding: 12px;
}

.auth-form .helptext,
.auth-form ul {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-form ul {
  margin: 0;
  padding-left: 18px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding: 52px 0 70px;
}

.contact-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--green-soft);
  padding: 20px;
}

.contact-panel span {
  color: var(--muted);
}

.contact-panel a {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .hero,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    order: -1;
    min-height: 360px;
  }

  .metric-band,
  .case-grid,
  .capability-grid,
  .timeline,
  .article-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 32px;
  }

  h1 {
    font-size: 38px;
  }

  .hero-visual {
    min-height: 300px;
  }

  .rack {
    width: 138px;
  }

  .rack-a {
    left: 18px;
    top: 66px;
  }

  .rack-b {
    right: 18px;
    bottom: 44px;
  }

  .telemetry {
    right: 16px;
    top: 16px;
    width: 164px;
  }

  .metric-band,
  .case-grid,
  .capability-grid,
  .timeline,
  .article-list {
    grid-template-columns: 1fr;
  }
}
