/* ═══════════════════════════════════════
   Agentic Infra — GitHub Pages Styles
   ═══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Theme Tokens ── */
:root, html[data-theme="dark"] {
  --bg: #0a0e17; --bg-alt: #0d1220; --bg-card: #111827; --bg-card-hover: #1a2332;
  --bg-nav: rgba(10, 14, 23, .82);
  --border: #1e293b; --border-hover: #334155;
  --text: #e2e8f0; --text-muted: #94a3b8; --text-dim: #64748b;
  --accent: #3b82f6; --accent-hover: #2563eb; --accent-glow: #3b82f640;
  --green: #10b981; --amber: #f59e0b; --rose: #f43f5e; --violet: #8b5cf6; --cyan: #06b6d4;
  --node-bg: #1e293b; --line: #334155; --label: #cbd5e1;
  --shadow: 0 8px 32px rgba(0, 0, 0, .35);
}
html[data-theme="light"] {
  --bg: #f8fafc; --bg-alt: #f1f5f9; --bg-card: #ffffff; --bg-card-hover: #f8fafc;
  --bg-nav: rgba(248, 250, 252, .88);
  --border: #e2e8f0; --border-hover: #cbd5e1;
  --text: #0f172a; --text-muted: #475569; --text-dim: #94a3b8;
  --accent: #2563eb; --accent-hover: #1d4ed8; --accent-glow: #2563eb25;
  --green: #059669; --amber: #d97706; --rose: #e11d48; --violet: #7c3aed; --cyan: #0891b2;
  --node-bg: #f1f5f9; --line: #cbd5e1; --label: #1e293b;
  --shadow: 0 8px 32px rgba(0, 0, 0, .08);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; overflow-x: hidden;
  transition: background .3s, color .3s;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: var(--bg-nav); border-bottom: 1px solid var(--border);
  transition: background .3s;
}
nav .inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
nav .logo {
  font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
nav .logo .mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #fff;
  font-family: 'JetBrains Mono', monospace;
}
nav .nav-links { display: flex; gap: 24px; font-size: .85rem; font-weight: 500; }
nav .nav-links a { color: var(--text-muted); }
nav .nav-links a:hover { color: var(--text); }
nav .nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer; color: var(--text-muted); font-size: .9rem;
  transition: all .2s; line-height: 1;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn {
  width: auto; padding: 0 10px;
  font-size: .75rem; font-weight: 700;
  font-family: 'JetBrains Mono', monospace; letter-spacing: .02em;
}
nav .gh {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: .8rem; font-weight: 600; color: var(--text); transition: all .2s;
}
nav .gh:hover { border-color: var(--accent); box-shadow: 0 0 16px var(--accent-glow); }
nav .gh svg { width: 16px; height: 16px; }

/* ── Hero ── */
.hero { padding: 150px 0 90px; text-align: center; position: relative; }
.hero::before {
  content: ''; position: absolute; top: 60px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none; opacity: .5;
}
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 20px;
  background: linear-gradient(135deg, #3b82f618, #8b5cf618);
  border: 1px solid #3b82f630;
  font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: 24px;
}
.hero .badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1.1; margin-bottom: 18px;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p.sub {
  font-size: 1.1rem; color: var(--text-muted);
  max-width: 620px; margin: 0 auto 36px; line-height: 1.7;
}
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: 10px;
  font-size: .88rem; font-weight: 650; transition: all .25s;
  cursor: pointer; border: none; text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover); color: #fff;
  box-shadow: 0 8px 28px var(--accent-glow); transform: translateY(-1px);
}
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.hero .stats { display: flex; gap: 40px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.hero .stat .num {
  font-size: 1.9rem; font-weight: 800;
  font-family: 'JetBrains Mono', monospace; letter-spacing: -.03em;
}
.hero .stat .num.c1 { color: var(--accent); }
.hero .stat .num.c2 { color: var(--green); }
.hero .stat .num.c3 { color: var(--violet); }
.hero .stat .num.c4 { color: var(--amber); }
.hero .stat .label {
  font-size: .72rem; color: var(--text-dim); margin-top: 4px;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}

/* ── Section Common ── */
section { padding: 90px 0; }
.sec-alt { background: var(--bg-alt); }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent); margin-bottom: 14px;
}
.section-label .line { width: 20px; height: 2px; background: var(--accent); border-radius: 2px; }
section h2 { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 14px; }
section p.desc {
  font-size: 1rem; color: var(--text-muted);
  max-width: 580px; line-height: 1.7; margin-bottom: 44px;
}

/* ── Features Grid ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card {
  padding: 28px 24px; border-radius: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all .3s; overflow: hidden;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-card .icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 16px;
}
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: .84rem; color: var(--text-muted); line-height: 1.65; }
.f1 .icon { background: #3b82f615; color: var(--accent); }
.f2 .icon { background: #10b98115; color: var(--green); }
.f3 .icon { background: #8b5cf615; color: var(--violet); }
.f4 .icon { background: #f59e0b15; color: var(--amber); }
.f5 .icon { background: #f43f5e15; color: var(--rose); }
.f6 .icon { background: #06b6d415; color: var(--cyan); }

/* ── Architecture SVG ── */
.arch-container { max-width: 960px; margin: 0 auto; }
.arch-svg { width: 100%; height: auto; }
.arch-svg text { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.arch-svg .layer-box { fill: var(--bg-card); stroke: var(--border); stroke-width: 1.5; rx: 12; }
.arch-svg .layer-box-inner { fill: var(--node-bg); stroke: var(--border); stroke-width: 1; rx: 8; }
.arch-svg .layer-title { fill: var(--accent); font-weight: 700; font-size: 14px; }
.arch-svg .layer-subtitle { fill: var(--text-dim); font-size: 11px; }
.arch-svg .node-label { fill: var(--label); font-weight: 600; font-size: 11px; }
.arch-svg .node-sub { fill: var(--text-dim); font-size: 9.5px; }
.arch-svg .conn-line { stroke: var(--line); stroke-width: 1.5; fill: none; }
.arch-svg .conn-arrow { fill: var(--line); }
.arch-svg .tool-count {
  fill: var(--green); font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
}

/* ── Agents ── */
.agents-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.agent-card {
  display: flex; gap: 14px; padding: 22px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border); transition: all .3s;
}
.agent-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.agent-card .avatar {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; flex-shrink: 0;
}
.agent-card .info h4 { font-size: .92rem; font-weight: 700; margin-bottom: 3px; }
.agent-card .info .model {
  font-size: .7rem; font-family: 'JetBrains Mono', monospace;
  padding: 2px 8px; border-radius: 4px;
  background: var(--node-bg); color: var(--text-dim); display: inline-block; margin-bottom: 6px;
}
.agent-card .info p { font-size: .8rem; color: var(--text-muted); line-height: 1.55; }
.agent-card .info .tools { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.agent-card .info .tools span {
  font-size: .66rem; font-family: 'JetBrains Mono', monospace;
  padding: 2px 7px; border-radius: 4px;
  background: #3b82f610; color: var(--accent); border: 1px solid #3b82f620;
}

/* ── MCP Table ── */
.mcp-wrap {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-card);
}
.mcp-table { width: 100%; border-collapse: collapse; }
.mcp-table th {
  text-align: left; padding: 12px 16px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim); border-bottom: 1px solid var(--border);
}
.mcp-table td {
  padding: 14px 16px; font-size: .85rem;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.mcp-table tbody tr:last-child td { border-bottom: none; }
.mcp-table tr:hover td { background: var(--bg-card-hover); }
.mcp-table .name {
  font-weight: 700; font-family: 'JetBrains Mono', monospace;
  font-size: .8rem; color: var(--accent);
}
.mcp-table .port { font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: var(--text-dim); }
.mcp-table .count { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--green); }
.code-block {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 24px; font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; line-height: 1.7; color: var(--text-muted);
  overflow-x: auto; white-space: pre; margin-top: 24px;
}
.code-block .hl-key { color: var(--accent); font-weight: 600; }
.code-block .hl-val { color: var(--green); }
.code-block .hl-cmt { color: var(--text-dim); }

/* ── Skills ── */
.skills-flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.skills-flow .step {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.skills-flow .arrow { color: var(--text-dim); font-size: 1.1rem; flex-shrink: 0; }
.skill-tree {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 24px; font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; line-height: 1.75; color: var(--text-muted);
  overflow-x: auto; white-space: pre;
}
.skill-tree .t-dir { color: var(--accent); font-weight: 600; }
.skill-tree .t-file { color: var(--green); }
.skill-tree .t-cmt { color: var(--text-dim); }
.skill-tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  padding: 8px 16px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: .82rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px; transition: all .2s;
}
.skill-tag:hover { border-color: var(--accent); }
.skill-tag .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── Workflows ── */
.wf-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 32px; margin-bottom: 18px;
}
.wf-card h4 {
  font-size: .92rem; font-weight: 700; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.wf-card h4 .tag {
  font-size: .66rem; padding: 3px 10px; border-radius: 6px;
  background: var(--accent); color: #fff; font-weight: 600;
}
.wf-steps { display: flex; align-items: center; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.wf-step { flex: 1; min-width: 100px; text-align: center; padding: 0 6px; }
.wf-step .node {
  padding: 10px 6px; border-radius: 8px;
  background: var(--node-bg); border: 1px solid var(--border);
  font-size: .76rem; font-weight: 600; transition: all .3s;
}
.wf-step:hover .node { border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.wf-step .approval {
  font-size: .62rem; color: var(--amber); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; margin-top: 6px;
}
.wf-arrow { flex-shrink: 0; color: var(--text-dim); font-size: .9rem; padding: 0 2px; }

/* ── Tech Stack ── */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tech-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border); transition: all .2s;
}
.tech-item:hover { border-color: var(--accent); }
.tech-item .layer {
  font-size: .66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-dim); min-width: 76px;
}
.tech-item .tech { font-size: .85rem; font-weight: 600; }

/* ── Developer ── */
.dev-card {
  max-width: 640px; margin: 0 auto;
  padding: 36px 40px; border-radius: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  text-align: center; transition: all .3s;
}
.dev-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.dev-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin: 0 auto 16px; color: #fff;
}
.dev-card .dev-name { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.dev-card .dev-role {
  font-size: .82rem; color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace; margin-bottom: 16px;
}
.dev-card .dev-bio {
  font-size: .88rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px;
}
.dev-highlights {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px;
}
.dev-highlights .tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 6px;
  background: var(--node-bg); border: 1px solid var(--border);
  font-size: .76rem; font-weight: 600; color: var(--text-muted);
}
.dev-links { display: flex; gap: 12px; justify-content: center; }
.dev-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px;
  background: var(--node-bg); border: 1px solid var(--border);
  font-size: .8rem; font-weight: 600; color: var(--text-muted); transition: all .2s;
}
.dev-links a:hover { border-color: var(--accent); color: var(--accent); }
.dev-links a svg { width: 14px; height: 14px; }

/* ── Footer ── */
footer {
  padding: 48px 0 32px; border-top: 1px solid var(--border);
  text-align: center; color: var(--text-dim); font-size: .8rem;
}
footer .f-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; }
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .features-grid, .tech-grid { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: 1fr; }
  nav .nav-links { display: none; }
  .hero { padding: 110px 0 60px; }
  .hero h1 { font-size: 2rem; }
  .hero .stats { gap: 20px; }
  .hero .stat .num { font-size: 1.4rem; }
  .wf-steps { flex-direction: column; align-items: stretch; }
  .wf-arrow { transform: rotate(90deg); text-align: center; padding: 4px 0; }
  .wf-step { min-width: auto; }
  .mcp-table td, .mcp-table th { padding: 10px 12px; font-size: .76rem; }
  .arch-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim { opacity: 0; animation: fadeUp .5s ease-out forwards; }
.anim.d1 { animation-delay: .08s; }
.anim.d2 { animation-delay: .16s; }
.anim.d3 { animation-delay: .24s; }
.anim.d4 { animation-delay: .32s; }
.anim.d5 { animation-delay: .4s; }
