.page-head {
  padding: 60px 32px 40px;
  border-bottom: 1px solid var(--ink);
}
.page-head .eyebrow {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.3em; color: var(--accent);
  margin-bottom: 14px;
}
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(60px, 11vw, 180px);
  letter-spacing: -0.04em;
  line-height: 0.85;
  margin: 0 0 20px;
  font-weight: 900;
}
.page-head h1 em { color: var(--accent); font-style: italic; font-family: 'Space Grotesk'; font-weight: 700; }
.page-head .crumb {
  display: flex; gap: 14px;
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.2em;
}

/* Project hero */
.proj-hero {
  padding: 80px 32px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.proj-hero-info .tag {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.3em; color: var(--accent);
  margin-bottom: 16px;
}
.proj-hero-info h2 {
  font-family: var(--display);
  font-size: clamp(60px, 10vw, 140px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
  font-weight: 900;
}
.proj-hero-info .tagline {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--accent);
  margin: 0 0 30px;
  max-width: 500px;
}
.proj-hero-info .meta-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-bottom: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--dim);
}
.proj-hero-info .meta-row .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.25em; color: var(--dim); margin-bottom: 4px; }
.proj-hero-info .meta-row .v { font-family: var(--display); font-size: 18px; }

/* Architecture visual */
.arch-vis {
  aspect-ratio: 1/1;
  border: 1px solid var(--bg);
  position: relative;
  overflow: hidden;
}
.arch-vis svg { width: 100%; height: 100%; }

.arch-interactive {
  padding: 80px 32px;
  border-bottom: 1px solid var(--ink);
}
.arch-interactive h3 {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 900;
}
.arch-interactive h3 em { font-style: italic; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; }
.arch-interactive > p {
  font-family: var(--serif); font-size: 16px;
  color: var(--muted); max-width: 700px;
  margin: 0 0 40px;
}
.agents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--ink);
}
.agent {
  padding: 28px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}
.agent:nth-child(3n) { border-right: none; }
.agent:nth-last-child(-n+3) { border-bottom: none; }
.agent:hover { background: var(--ink); color: var(--bg); }
.agent:hover .agent-num { color: var(--accent); }
.agent-num {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.3em; color: var(--muted);
  margin-bottom: 12px;
  transition: color 0.3s;
}
.agent h4 {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  font-weight: 900;
}
.agent p {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  opacity: 0.8;
}

/* Deep dive */
.deep {
  padding: 100px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.deep-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 50px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}
.deep-head h2 {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 0.9;
  font-weight: 900;
}
.deep-head h2 em { font-style: italic; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; }

.deep-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}
.deep-card {
  border: 1px solid var(--ink);
  padding: 40px;
  background: var(--bg);
}
.deep-card .n {
  font-family: var(--display);
  font-size: 60px;
  color: var(--accent);
  line-height: 0.9;
  margin-bottom: 16px;
  font-weight: 900;
}
.deep-card h4 {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  font-weight: 900;
}
.deep-card p {
  font-family: var(--serif); font-size: 15px;
  line-height: 1.6; color: var(--ink-soft);
  margin: 0;
}

/* DEV-only enrichments */
.dev-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-top: 18px;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  display: inline-block;
}
.agent-mod {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
  word-break: break-all;
}
.agent:hover .agent-mod { color: var(--accent); }

/* SPEC.01 — Tech metrics */
.specs-section {
  padding: 100px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
}
.specs-section h3 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  font-weight: 900;
}
.specs-section h3 em { font-style: italic; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; }
.specs-intro {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--muted);
  max-width: 700px;
  margin: 0 0 50px;
}
.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--ink);
}
.spec {
  padding: 28px 24px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  transition: background 0.25s, color 0.25s;
}
.spec:hover { background: var(--ink); color: var(--bg); }
.spec:hover .spec-num { color: var(--accent); }
.specs-grid .spec:nth-child(4n) { border-right: none; }
.specs-grid .spec:nth-last-child(-n+4) { border-bottom: none; }
.spec-num {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1;
}
.spec-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  line-height: 1.5;
}

/* SPEC.02 — Module map */
.modules-section {
  padding: 100px 32px;
  background: var(--ink);
  color: var(--bg);
  border-bottom: 1px solid var(--ink);
}
.modules-section h3 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  font-weight: 900;
}
.modules-section h3 em { font-style: italic; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; }
.mod-intro {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--dim);
  max-width: 700px;
  margin: 0 0 40px;
}
.module-tree {
  border: 1px solid var(--dim);
  background: #050505;
  padding: 24px 28px;
  overflow-x: auto;
}
.module-tree pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--bg);
  white-space: pre;
}
.module-tree .tk-dir { color: var(--accent); font-weight: 700; }
.module-tree .tk-accent { color: var(--accent); font-weight: 700; }
.module-tree .tk-cm { color: #777; font-style: italic; }
.module-tree .tk-num { color: #c9e265; }
.module-tree .tk-str { color: #c9e265; }

/* SPEC.03 — Models & Relay */
.mr-section {
  padding: 100px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.mr-section h3 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.03em;
  margin: 0 0 40px;
  font-weight: 900;
}
.mr-section h3 em { font-style: italic; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; }

.vsx-section {
  padding: 100px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
}
.vsx-section h3 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.03em;
  margin: 0 0 40px;
  font-weight: 900;
}
.vsx-section h3 em { font-style: italic; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; }
.vsx-section .specs-grid {
  margin-top: 36px;
  grid-template-columns: repeat(3, 1fr);
}
.vsx-section .specs-grid .spec:nth-child(4n) { border-right: 1px solid var(--ink); }
.vsx-section .specs-grid .spec:nth-child(3n) { border-right: none; }
.vsx-section .specs-grid .spec:nth-last-child(-n+4) { border-bottom: 1px solid var(--ink); }
.vsx-section .specs-grid .spec:nth-last-child(-n+3) { border-bottom: none; }

.voice-section {
  padding: 100px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.voice-section h3 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.03em;
  margin: 0 0 40px;
  font-weight: 900;
}
.voice-section h3 em { font-style: italic; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; }
.voice-section .specs-grid {
  margin-top: 36px;
  grid-template-columns: repeat(3, 1fr);
}
.voice-section .specs-grid .spec:nth-child(4n) { border-right: 1px solid var(--ink); }
.voice-section .specs-grid .spec:nth-child(3n) { border-right: none; }
.voice-section .specs-grid .spec:nth-last-child(-n+4) { border-bottom: 1px solid var(--ink); }
.voice-section .specs-grid .spec:nth-last-child(-n+3) { border-bottom: none; }

.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.dual-col {
  border: 1px solid var(--ink);
  padding: 32px;
  background: var(--bg);
}
.dual-head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}
.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
}
.kv-table th, .kv-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px dashed var(--line-soft);
}
.kv-table th {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--ink);
}
.kv-table tr:hover td { background: var(--paper); }
.dual-foot {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 18px 0 0;
}
.config-block {
  margin: 0 0 18px;
  padding: 16px 18px;
  background: #050505;
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  border: 1px solid var(--ink);
  white-space: pre;
  overflow-x: auto;
}
.config-block .tk-cm { color: #777; font-style: italic; }
.config-block .tk-num { color: #c9e265; }
.config-block .tk-str { color: #c9e265; }
.dual-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.dual-list li {
  padding: 10px 0 10px 22px;
  position: relative;
  border-bottom: 1px dashed var(--line-soft);
}
.dual-list li:last-child { border-bottom: none; }
.dual-list li::before {
  content: '◼';
  position: absolute;
  left: 0; top: 10px;
  color: var(--accent);
  font-size: 10px;
}
.release-note {
  margin-top: 30px;
  padding: 14px 18px;
  border: 1px dashed var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.release-tag {
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

/* Code snippet */
.code-section {
  padding: 80px 32px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.code-section h3 {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.02em;
  margin: 0 0 30px;
  font-weight: 900;
}
.code-section h3 em { font-style: italic; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; }
.code-box {
  border: 1px solid var(--dim);
  background: #050505;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow: auto;
}
.code-box-head {
  display: flex; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--dim);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--dim);
}
.code-box-head .dots { display: flex; gap: 6px; }
.code-box-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); }
.code-box-head .dot.red { background: #ff5f56; }
.code-box-head .dot.yellow { background: #ffbd2e; }
.code-box-head .dot.green { background: var(--accent); }
.code-body {
  padding: 20px 24px;
  overflow-x: auto;
  white-space: pre;
}
.code-body .kw { color: var(--accent); }
.code-body .str { color: #c9e265; }
.code-body .cm { color: #666; font-style: italic; }
.code-body .fn { color: #8ec4ff; }

/* Other projects teaser */
.other-proj {
  padding: 100px 32px;
  border-bottom: 1px solid var(--ink);
}
.other-proj h2 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 80px);
  letter-spacing: -0.03em;
  margin: 0 0 40px;
  font-weight: 900;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}
.other-proj h2 em { font-style: italic; color: var(--accent); font-family: 'Space Grotesk'; font-weight: 700; }

.coming-soon {
  border: 1px dashed var(--line-soft);
  padding: 80px 40px;
  text-align: center;
  background: var(--paper);
}
.coming-soon .blink {
  display: inline-block;
  width: 12px; height: 12px; background: var(--accent);
  margin-right: 10px; vertical-align: middle;
  animation: blink 1.4s step-end infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }
.coming-soon h4 {
  font-family: var(--display);
  font-size: 36px;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.coming-soon p {
  font-family: var(--serif);
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 20px;
}
.coming-soon .btn {
  margin-top: 10px;
}

/* Mini CTA */
.mini-cta {
  padding: 100px 32px;
  background: var(--accent);
  text-align: center;
  border-bottom: 1px solid var(--ink);
}
.mini-cta h2 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 80px);
  margin: 0 0 20px;
  letter-spacing: -0.03em;
  font-weight: 900;
}
.mini-cta .btn-primary { background: var(--ink); color: var(--accent); }
.mini-cta .btn-primary:hover { background: var(--bg); color: var(--ink); }

@media (max-width: 900px) {
  .proj-hero { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: 1fr; }
  .agent,
  .agent:nth-child(3n) { border-right: none; }
  .agent:nth-last-child(-n+3) { border-bottom: 1px solid var(--ink); }
  .agent:last-child { border-bottom: none; }
  .deep-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .specs-grid .spec:nth-child(4n) { border-right: 1px solid var(--ink); }
  .specs-grid .spec:nth-child(2n) { border-right: none; }
  .specs-grid .spec:nth-last-child(-n+4) { border-bottom: 1px solid var(--ink); }
  .specs-grid .spec:nth-last-child(-n+2) { border-bottom: none; }
  .vsx-section .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .vsx-section .specs-grid .spec:nth-child(3n) { border-right: 1px solid var(--ink); }
  .vsx-section .specs-grid .spec:nth-child(2n) { border-right: none; }
  .vsx-section .specs-grid .spec:nth-last-child(-n+3) { border-bottom: 1px solid var(--ink); }
  .vsx-section .specs-grid .spec:nth-last-child(-n+2) { border-bottom: none; }
  .voice-section .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .voice-section .specs-grid .spec:nth-child(3n) { border-right: 1px solid var(--ink); }
  .voice-section .specs-grid .spec:nth-child(2n) { border-right: none; }
  .voice-section .specs-grid .spec:nth-last-child(-n+3) { border-bottom: 1px solid var(--ink); }
  .voice-section .specs-grid .spec:nth-last-child(-n+2) { border-bottom: none; }
  .dual { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .page-head { padding: 36px 16px 24px; }
  .page-head h1 { font-size: clamp(48px, 16vw, 96px); }
  .page-head .crumb { font-size: 10px; gap: 10px; flex-wrap: wrap; }

  .proj-hero { padding: 50px 16px; gap: 30px; }
  .proj-hero-info h2 { font-size: clamp(48px, 16vw, 96px); }
  .proj-hero-info .tagline { font-size: 17px; margin-bottom: 22px; }
  .proj-hero-info .meta-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding-top: 16px;
    margin-bottom: 22px;
  }
  .proj-hero-info .meta-row .v { font-size: 16px; }

  .arch-interactive { padding: 60px 16px; }
  .arch-interactive > p { font-size: 14px; margin-bottom: 28px; }
  .agent {
    padding: 22px 18px;
    border-right: none;
  }
  .agent:last-child { border-bottom: none; }
  .agent h4 { font-size: 19px; }
  .agent p { font-size: 12px; }

  .deep { padding: 60px 16px; }
  .deep-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 14px;
  }
  .deep-grid { gap: 18px; }
  .deep-card { padding: 24px 22px; }
  .deep-card .n { font-size: 44px; margin-bottom: 12px; }
  .deep-card h4 { font-size: 21px; }
  .deep-card p { font-size: 14px; }

  .code-section { padding: 50px 16px; }
  .code-section h3 { margin-bottom: 22px; }
  .code-box-head { padding: 8px 12px; font-size: 9px; letter-spacing: 0.18em; }
  .code-body { padding: 16px; font-size: 11px; line-height: 1.6; }

  .specs-section,
  .modules-section,
  .mr-section,
  .vsx-section,
  .voice-section { padding: 60px 16px; }
  .specs-section h3,
  .modules-section h3,
  .mr-section h3,
  .vsx-section h3,
  .voice-section h3 { font-size: clamp(30px, 9vw, 48px); margin-bottom: 20px; }
  .voice-section .specs-grid { grid-template-columns: 1fr; }
  .voice-section .specs-grid .spec,
  .voice-section .specs-grid .spec:nth-child(4n),
  .voice-section .specs-grid .spec:nth-child(3n) { border-right: none; }
  .voice-section .specs-grid .spec,
  .voice-section .specs-grid .spec:nth-last-child(-n+4),
  .voice-section .specs-grid .spec:nth-last-child(-n+3) { border-bottom: 1px solid var(--ink); }
  .voice-section .specs-grid .spec:last-child { border-bottom: none; }
  .specs-grid { grid-template-columns: 1fr; }
  .specs-grid .spec,
  .specs-grid .spec:nth-child(4n),
  .specs-grid .spec:nth-child(2n) { border-right: none; }
  .specs-grid .spec,
  .specs-grid .spec:nth-last-child(-n+4),
  .specs-grid .spec:nth-last-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .specs-grid .spec:last-child { border-bottom: none; }
  .vsx-section .specs-grid { grid-template-columns: 1fr; }
  .vsx-section .specs-grid .spec,
  .vsx-section .specs-grid .spec:nth-child(4n),
  .vsx-section .specs-grid .spec:nth-child(3n),
  .vsx-section .specs-grid .spec:nth-child(2n) { border-right: none; }
  .vsx-section .specs-grid .spec,
  .vsx-section .specs-grid .spec:nth-last-child(-n+4),
  .vsx-section .specs-grid .spec:nth-last-child(-n+3),
  .vsx-section .specs-grid .spec:nth-last-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .vsx-section .specs-grid .spec:last-child { border-bottom: none; }
  .spec { padding: 22px 18px; }
  .spec-num { font-size: 26px; }
  .module-tree { padding: 14px; }
  .module-tree pre { font-size: 10.5px; line-height: 1.6; }
  .dual { gap: 18px; }
  .dual-col { padding: 18px 14px; min-width: 0; overflow: hidden; }
  .kv-table { font-size: 10.5px; table-layout: fixed; }
  .kv-table th, .kv-table td {
    padding: 8px 4px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .kv-table th:nth-child(1), .kv-table td:nth-child(1) { width: 44%; }
  .kv-table th:nth-child(2), .kv-table td:nth-child(2) { width: 22%; }
  .kv-table th:nth-child(3), .kv-table td:nth-child(3) { width: 34%; }
  .config-block {
    font-size: 10.5px;
    padding: 12px 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
  }
  .dual-list { font-size: 13px; }
  .dual-list li { padding-left: 18px; }
  .dual-foot { font-size: 12px; }
  .release-note {
    font-size: 10px;
    letter-spacing: 0.08em;
    padding: 12px 14px;
    gap: 10px;
  }
  .release-tag { padding: 3px 8px; }

  .other-proj { padding: 60px 16px; }
  .other-proj h2 { margin-bottom: 28px; padding-bottom: 14px; }
  .coming-soon { padding: 50px 24px; }
  .coming-soon h4 { font-size: 26px; }
  .coming-soon p { font-size: 14px; }

  .mini-cta { padding: 60px 16px; }
}
