:root {
  --bg: #0b0f14;
  --bg-soft: #101821;
  --panel: #141d27;
  --panel-2: #182332;
  --text: #edf3f8;
  --muted: #a9b7c5;
  --subtle: #718191;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #3ec7b8;
  --accent-2: #f0b76a;
  --danger: #e86d7a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(62, 199, 184, 0.16), transparent 31rem),
    radial-gradient(circle at 82% 12%, rgba(240, 183, 106, 0.12), transparent 27rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  background: rgba(11, 15, 20, 0.78);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(20px);
  transition:
    border-color 180ms ease,
    background 180ms ease;
}

.site-header.scrolled {
  background: rgba(11, 15, 20, 0.93);
  border-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(62, 199, 184, 0.45);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(62, 199, 184, 0.24), rgba(240, 183, 106, 0.12));
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  transition: color 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
}

.nav-cta {
  padding: 8px 14px;
  border: 1px solid rgba(62, 199, 184, 0.35);
  border-radius: 8px;
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 128px 5vw 72px;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/security-ai-lab.png");
  background-size: cover;
  background-position: center;
  opacity: 0.66;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(11, 15, 20, 0.96) 0%, rgba(11, 15, 20, 0.83) 38%, rgba(11, 15, 20, 0.34) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 25%);
}

.hero-content {
  position: relative;
  max-width: 760px;
}

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

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

h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.03;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.3;
}

.hero-copy {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: #04110f;
  font-weight: 800;
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.hero-stats {
  display: grid;
  max-width: 620px;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 46px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.hero-stats div {
  padding: 18px;
  background: rgba(16, 24, 33, 0.78);
}

.hero-stats strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.signal-band,
.section,
.lab-section,
.contact-section,
.site-footer {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.signal-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  transform: translateY(-28px);
}

.signal {
  padding: 26px;
  background: rgba(20, 29, 39, 0.96);
}

.signal span {
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.signal strong {
  display: block;
  margin: 10px 0 8px;
}

.signal p,
.section-heading p,
.project-card p,
.case-note,
.research-item p,
.article-card p,
.lab-copy p,
.contact-section p {
  color: var(--muted);
}

.section {
  padding: 76px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading.compact {
  max-width: 520px;
  margin-bottom: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
}

.project-card,
.article-card {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 35, 50, 0.96), rgba(17, 25, 35, 0.96));
  padding: 24px;
  box-shadow: var(--shadow);
}

.project-card.featured {
  background:
    linear-gradient(180deg, rgba(62, 199, 184, 0.13), rgba(24, 35, 50, 0.96)),
    var(--panel);
}

.case-note {
  border-left: 2px solid rgba(62, 199, 184, 0.55);
  margin-top: 18px;
  padding-left: 12px;
  font-size: 14px;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  color: var(--subtle);
  font-size: 12px;
  text-transform: uppercase;
}

.status {
  color: var(--accent-2);
}

.status.live {
  color: var(--accent);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.tech-list li,
.capability-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 42px;
  align-items: start;
}

.research-list {
  display: grid;
  gap: 14px;
}

.research-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 29, 39, 0.72);
  padding: 20px;
}

.research-item > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: rgba(62, 199, 184, 0.11);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  padding: 8px 14px;
}

.filter.active {
  border-color: rgba(62, 199, 184, 0.55);
  color: var(--text);
  background: rgba(62, 199, 184, 0.13);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  box-shadow: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.read-link {
  margin-top: auto;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.article-card:hover {
  transform: translateY(-2px);
  border-color: rgba(62, 199, 184, 0.35);
}

.article-card.is-hidden {
  display: none;
}

.article-card time {
  display: block;
  margin-bottom: 22px;
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.lab-section {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding: 82px 0;
}

.terminal-panel {
  overflow: hidden;
  border: 1px solid rgba(62, 199, 184, 0.24);
  border-radius: 8px;
  background: #05080b;
  box-shadow: var(--shadow);
}

.terminal-bar {
  display: flex;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.terminal-bar span:nth-child(2) {
  background: var(--accent-2);
}

.terminal-bar span:nth-child(3) {
  background: var(--accent);
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 24px;
  color: #d7efe9;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.75;
}

.capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 56px;
  margin-bottom: 80px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(62, 199, 184, 0.14), rgba(240, 183, 106, 0.08)),
    var(--panel);
  padding: 32px;
}

.contact-section h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 26px 0 36px;
  color: var(--subtle);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(62, 199, 184, 0.42);
  border-radius: 8px;
  background: rgba(11, 15, 20, 0.94);
  color: var(--text);
  padding: 12px 14px;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.article-page {
  background:
    radial-gradient(circle at 14% 4%, rgba(62, 199, 184, 0.12), transparent 30rem),
    radial-gradient(circle at 88% 14%, rgba(240, 183, 106, 0.1), transparent 26rem),
    var(--bg);
}

.post-hero,
.post-layout {
  width: min(980px, 90vw);
  margin: 0 auto;
}

.post-hero {
  padding: 138px 0 42px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 32px;
  color: var(--accent);
  font-size: 14px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.post-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
}

.post-hero h1 {
  max-width: 960px;
  font-size: clamp(36px, 5vw, 64px);
}

.post-summary {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.post-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 42px;
  padding-bottom: 92px;
}

.post-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 29, 39, 0.72);
  padding: 18px;
}

.post-toc strong {
  display: block;
  margin-bottom: 12px;
}

.post-toc a {
  display: block;
  border-top: 1px solid var(--line);
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
}

.post-body {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 29, 39, 0.72);
  padding: clamp(24px, 4vw, 44px);
}

.post-body h2 {
  margin-top: 36px;
  font-size: clamp(24px, 3vw, 34px);
}

.post-body h2:first-child {
  margin-top: 0;
}

.post-body p,
.post-body li {
  color: var(--muted);
}

.post-body ul,
.post-body ol {
  padding-left: 22px;
}

.post-body li + li {
  margin-top: 8px;
}

.callout {
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(62, 199, 184, 0.08);
  margin: 24px 0;
  padding: 16px 18px;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.checklist div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

@media (max-width: 960px) {
  .site-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 15, 20, 0.98);
    padding: 12px 5vw 22px;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 0;
  }

  .nav-cta {
    text-align: center;
  }

  .nav-toggle {
    display: block;
  }

  .signal-band,
  .project-grid,
  .split,
  .article-grid,
  .lab-section,
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-toc {
    position: static;
  }

  .section-heading.compact {
    max-width: 760px;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 66px;
  }

  .site-nav {
    top: 66px;
  }

  .hero {
    min-height: auto;
    padding: 118px 5vw 62px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(11, 15, 20, 0.97), rgba(11, 15, 20, 0.78)),
      linear-gradient(0deg, var(--bg) 0%, transparent 30%);
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .signal-band {
    transform: none;
    margin-top: 28px;
  }

  .section,
  .lab-section {
    padding: 54px 0;
  }

  .post-hero {
    padding-top: 118px;
  }

  .research-item {
    grid-template-columns: 1fr;
  }

  .contact-section {
    align-items: stretch;
    flex-direction: column;
    padding: 24px;
  }

  .contact-actions,
  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}
