body.site { background: var(--bg); }
.topbar.sticky { position: sticky; top: 0; backdrop-filter: blur(10px); }
.topbar nav a.cta { color: #0b1320; background: var(--accent); padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.topbar nav a.cta:hover { background: var(--accent2); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.band { padding: 96px 0; border-top: 1px solid var(--line); }
.band.dark { background: var(--bg2); }
.kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; font-weight: 600; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; margin: 0 0 18px; }
h4 { margin: 0 0 6px; font-size: 16px; }
.lede { font-size: 18px; color: var(--muted); max-width: 760px; margin: 0 0 36px; }
.band p { color: #c9d3dd; }
.mt { margin-top: 28px; }
.btn.big { padding: 12px 18px; font-size: 15px; border-radius: 10px; display: inline-block; }
.btn.primary.big { color: #0b1320; }
a.btn:hover { text-decoration: none; }
.math { font-family: var(--serif); font-style: italic; color: var(--accent2); white-space: nowrap; }

/* hero */
.hero { position: relative; min-height: calc(100vh - 52px); display: flex; align-items: center; overflow: hidden;
  background: radial-gradient(900px 600px at 75% 40%, rgba(47, 111, 235, .22), transparent 70%), var(--bg); }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero.hero-narrow { align-items: flex-start; padding-bottom: var(--temple-band, 360px); }
.hero-text { position: relative; max-width: 1160px; margin: 0 auto; padding: 60px 24px; width: 100%; pointer-events: none; }
.hero-text > * { max-width: 600px; }
.hero-text a { pointer-events: auto; }
.hero-text > h1 { max-width: none; }
.hero h1 { font-size: clamp(32px, 6vw, 76px); line-height: 1.02; margin: 0 0 22px; }
.hero h1 em { font-style: italic; color: var(--accent2); white-space: nowrap; }
.hero .lead { font-size: 18.5px; color: #c9d3dd; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.hero-note { font-size: 13px; color: var(--dim); }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gap { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: linear-gradient(180deg, var(--panel), var(--bg)); }
.gap .n { font-family: var(--serif); font-size: 30px; color: var(--accent); opacity: .8; }
.gap p, .mini p { font-size: 14px; color: var(--muted); margin: 0; }
.mini { border-left: 2px solid var(--accent); padding: 4px 0 4px 16px; }

.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.split.rev { grid-template-columns: 1.05fr 1fr; }
.ticks { list-style: none; padding: 0; margin: 18px 0; }
.ticks li { position: relative; padding: 0 0 12px 24px; color: #c9d3dd; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.steps { padding-left: 22px; color: #c9d3dd; }
.steps li { margin-bottom: 10px; }
.fig { margin: 0; }
.fig figcaption { font-size: 13px; color: var(--dim); margin-top: 10px; }
.diagram { width: 100%; height: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.diagram text { font-family: var(--sans); fill: var(--text); font-size: 13px; }
.diagram .lvl { font-size: 10.5px; letter-spacing: .14em; fill: var(--dim); font-weight: 600; }
.diagram .sep { stroke: var(--line); stroke-dasharray: 3 5; }
.diagram .cls rect { fill: rgba(240, 179, 90, .1); stroke: #f0b35a; }
.diagram .cls text, .diagram .obj text { text-anchor: middle; font-size: 12.5px; }
.diagram .obj rect { fill: rgba(86, 211, 100, .08); stroke: #56d364; }
.diagram .e-tax, .diagram .e-type { stroke: #f0b35a; stroke-width: 1.3; fill: none; stroke-dasharray: 4 3; }
.diagram .e-mer { stroke: #56d364; stroke-width: 1.6; fill: none; }
.diagram .e-con { stroke: #58a6ff; stroke-width: 1; fill: none; opacity: .55; }
.diagram .elab { font-size: 11px; }
.diagram .e { stroke: #58a6ff; stroke-width: 1.6; fill: none; }
.nlbox rect { fill: var(--bg2); stroke: var(--line); }
.nlbox rect.q { stroke: var(--accent); fill: var(--accent-soft); }
.nlbox rect.llm { stroke: #bc8cff; fill: rgba(188, 140, 255, .08); }
.nlbox rect.onto { stroke: #f0b35a; fill: rgba(240, 179, 90, .08); }
.nlbox rect.geqb { stroke: #56d364; fill: rgba(86, 211, 100, .07); }
.nlbox rect.sparql { fill: #0b0f14; }
.nlbox .t1 { text-anchor: middle; font-family: var(--serif); font-style: italic; font-size: 16px; }
.t2 { text-anchor: middle; font-weight: 600; font-size: 14px; }
.t3 { text-anchor: middle; font-size: 12px; fill: var(--muted) !important; }
.t3.l { text-anchor: start; }
.nlbox .code { font-family: var(--mono); font-size: 12px; fill: #79c0ff; white-space: pre; }
.arch rect { fill: var(--bg2); stroke: var(--line); }
.arch rect.br { stroke: var(--accent); fill: var(--accent-soft); }
.arch rect.faded { stroke-dasharray: 4 4; }
.arch + path, .diagram path.e { }

.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.flow .node { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--panel); }
.flow .node p { font-size: 13.5px; color: var(--muted); margin: 0; }
.flow .tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--warm); }
.flow .arrow { align-self: center; color: var(--accent); font-size: 22px; }

/* DSS mini demo */
.dss-demo { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.dss-demo .diagram { border: 0; background: none; }
.dss-ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 6px 10px 6px; font-size: 12.5px; color: var(--muted); }
.dss-ctrl label { display: block; }
.d-legend { grid-column: span 2; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text); min-height: 36px; }
.d-legend span { display: inline-flex; gap: 6px; align-items: center; }

/* projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.proj { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); transition: transform .15s, border-color .15s; color: var(--text); }
.proj:hover { transform: translateY(-3px); border-color: var(--accent); text-decoration: none; }
.proj .img { aspect-ratio: 16 / 10; background: #0b0f14 center / cover no-repeat; }
.proj .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.proj .body p { margin: 0; font-size: 13.5px; color: var(--muted); }
.proj .go { margin-top: auto; color: var(--accent2); font-size: 13.5px; font-weight: 600; }
.proj.soon { opacity: .55; }
.proj.soon .img { display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 13px; }

.pubs { list-style: none; padding: 0; margin: 0 0 20px; }
.pubs li { display: grid; grid-template-columns: 64px 1fr; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pubs li span { color: var(--accent); font-variant-numeric: tabular-nums; grid-row: span 2; }
.pubs li em { color: var(--dim); font-style: normal; font-size: 13px; }
.foot { border-top: 1px solid var(--line); padding: 28px 0; font-size: 13px; color: var(--muted); }
.foot .row { justify-content: space-between; display: flex; gap: 16px; flex-wrap: wrap; }
.foot .row > * { flex: none; }

/* guide */
.doc { display: grid; grid-template-columns: 240px 1fr; gap: 48px; max-width: 1160px; margin: 0 auto; padding: 40px 24px 80px; }
.doc nav.toc { position: sticky; top: 72px; align-self: start; font-size: 13.5px; }
.doc nav.toc a { display: block; color: var(--muted); padding: 4px 0; }
.doc nav.toc a:hover { color: var(--text); text-decoration: none; }
.doc article { max-width: 780px; }
.doc article h1 { font-size: 44px; margin: 0 0 8px; }
.doc article h2 { font-size: 28px; margin: 54px 0 14px; padding-top: 10px; }
.doc article h3 { font-size: 18px; margin: 28px 0 8px; }
.doc article p, .doc article li { color: #c9d3dd; }
.doc article pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow: auto; }
.doc article code { color: var(--accent2); }
.doc article table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 12px 0; }
.doc article th, .doc article td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; vertical-align: top; }
.doc article th { color: var(--dim); font-weight: 600; }
.callout { border: 1px solid rgba(88, 166, 255, .4); background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; margin: 16px 0; }
.callout.warn { border-color: rgba(240, 179, 90, .45); background: rgba(240, 179, 90, .09); }
.tut { counter-reset: t; list-style: none; padding: 0; }
.tut > li { counter-increment: t; position: relative; padding: 0 0 18px 46px; }
.tut > li::before { content: counter(t); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #0b1320; font-weight: 700; }
.doc img.shot { width: 100%; border-radius: 12px; border: 1px solid var(--line); margin: 10px 0; }

@media (max-width: 900px) {
  .grid4, .grid3, .projects { grid-template-columns: 1fr; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 28px; }
  .split.rev > figure { order: 2; }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); justify-self: center; }
  .topbar nav a:not(.cta) { display: none; }
  .band { padding: 64px 0; }
  .doc { grid-template-columns: 1fr; }
  .doc nav.toc { position: static; }
  .hero-text > * { max-width: none; }
}

.hero-phase { position: absolute; right: 6%; bottom: 7%; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: flex-end;
  max-width: 420px; opacity: 0; transform: translateY(6px); transition: opacity .5s, transform .5s; pointer-events: none; }
.hero-phase.on { opacity: 1; transform: none; }
.hero-phase b { font-family: var(--serif); font-size: 34px; color: var(--accent); line-height: 1; }
.hero-phase span { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--text); font-weight: 600; }
.hero-phase i { flex-basis: 100%; text-align: right; font-style: normal; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .hero-phase { right: 16px; bottom: 14px; } .hero-phase b { font-size: 26px; } }
