/* About page */

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px max(24px, 4vw) 80px;
  min-width: 0;
}

.hero {
  margin-bottom: 40px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.35rem);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.12;
}

.hero p {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 600px;
}

.stack {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-layer {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 24px;
  position: relative;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--motion-med) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    border-color var(--motion-med) var(--ease-out);
}

.stack-layer:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
  .stack-layer:hover {
    transform: none;
  }
}

.stack-layer.proprietary {
  background: linear-gradient(135deg, rgba(99, 91, 255, 0.06) 0%, rgba(10, 37, 64, 0.04) 100%);
  border-color: rgba(99, 91, 255, 0.18);
  box-shadow: var(--shadow-sm);
}

.stack-layer.proprietary:hover {
  border-color: rgba(99, 91, 255, 0.32);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .stack-layer.proprietary {
  background: linear-gradient(135deg, rgba(99, 91, 255, 0.14) 0%, rgba(10, 37, 64, 0.2) 100%);
  border-color: rgba(129, 140, 248, 0.24);
}

[data-theme="dark"] .stack-layer.proprietary:hover {
  border-color: rgba(129, 140, 248, 0.38);
  box-shadow: var(--shadow-md);
}

.stack-layer.oss {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.06) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-color: rgba(22, 163, 74, 0.18);
}

[data-theme="dark"] .stack-layer.oss {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.08) 0%, rgba(52, 211, 153, 0.06) 100%);
  border-color: rgba(74, 222, 128, 0.22);
}

.stack-layer.foundation {
  background: var(--surface-muted);
  border-color: var(--border);
}

.layer-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.stack-layer.proprietary .layer-label { color: var(--purple); }
.stack-layer.oss .layer-label { color: var(--green); }
.stack-layer.foundation .layer-label { color: var(--text-3); }

.layer-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.layer-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--motion-med) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    border-color var(--motion-med) var(--ease-out);
}

.about-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: reduce) {
  .about-card:hover {
    transform: none;
  }
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon.blue { background: var(--blue-bg); }
.card-icon.purple { background: var(--purple-bg); }
.card-icon.green { background: var(--green-bg); }
.card-icon.warning { background: var(--amber-bg); }

.card-icon svg {
  width: 17px;
  height: 17px;
}

.card-icon.blue svg { fill: var(--blue); }
.card-icon.purple svg { fill: var(--purple); }
.card-icon.green svg { fill: var(--green); }
.card-icon.warning svg { fill: var(--amber); }

.about-card h2 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.about-card p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 10px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 520px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.feature-list li::before {
  content: '✦';
  font-size: 10px;
  color: var(--purple);
  margin-top: 3px;
  flex-shrink: 0;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.agent-chip {
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  transition:
    border-color var(--motion-med) var(--ease-out),
    box-shadow var(--motion-med) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

.agent-chip:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .agent-chip:hover {
    transform: none;
  }
}

.agent-chip strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.agent-chip span {
  color: var(--text-3);
}

.oss-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--motion-med) var(--ease-out),
    background var(--motion-med) var(--ease-out),
    transform var(--motion-fast) var(--ease-spring),
    box-shadow var(--motion-med) var(--ease-out);
}

.oss-link:hover {
  border-color: rgba(99, 91, 255, 0.32);
  background: var(--blue-bg);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

[data-theme="dark"] .oss-link:hover {
  border-color: rgba(129, 140, 248, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .oss-link:hover {
    transform: none;
  }
}

.oss-link svg {
  width: 19px;
  height: 19px;
  fill: var(--text-2);
  flex-shrink: 0;
}

/* ── Citation ─────────────────────────────────────────────────────── */
.citation-block {
  margin: 16px 0 0;
  padding: 14px 18px;
  border-left: 3px solid var(--blue);
  background: var(--chip-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
}

.citation-bib {
  margin-top: 14px;
}

.citation-bib summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.02em;
  user-select: none;
}

.citation-bib summary:hover {
  color: var(--text-2);
}

.citation-bib pre {
  margin-top: 10px;
  padding: 14px 16px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
}

.citation-bib code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* ── Mobile ───────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  main {
    padding: 28px max(14px, 4vw) 56px;
  }

  .hero {
    margin-bottom: 28px;
  }

  .stack-layer {
    padding: 16px max(14px, 4vw);
  }

  .about-card {
    padding: 20px max(14px, 4vw);
  }

  .card-header {
    align-items: flex-start;
  }

  .about-card h2 {
    font-size: 14px;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: break-word;
  }

  .citation-block {
    overflow-wrap: break-word;
    word-break: break-word;
    padding: 12px 14px;
    font-size: 13px;
  }

  .citation-bib pre {
    padding: 12px max(10px, 3vw);
    font-size: 11px;
    line-height: 1.65;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .oss-link {
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 440px) {
  .agent-grid {
    grid-template-columns: 1fr;
  }
}
