/* WIJACC mockup — shared design system */

:root {
    --bg: #0b0f17;
    --panel: #111827;
    --panel-2: #0f172a;
    --muted: #94a3b8;
    --text: #e5e7eb;
    --accent: #6366f1;
    --accent-2: #22d3ee;
    --accent-3: #a78bfa;
    --border: rgba(148, 163, 184, 0.12);
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

code, pre, .mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; }

/* Ambient backgrounds */
.mesh { position: relative; }
.mesh::before {
    content: "";
    position: absolute; inset: 0;
    background:
      radial-gradient(60% 50% at 15% 10%, rgba(99,102,241,0.25), transparent 60%),
      radial-gradient(50% 40% at 85% 20%, rgba(34,211,238,0.18), transparent 60%),
      radial-gradient(40% 35% at 50% 90%, rgba(167,139,250,0.18), transparent 60%);
    filter: blur(10px);
    pointer-events: none;
}
.grid-overlay { position: relative; }
.grid-overlay::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
      linear-gradient(rgba(148,163,184,0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(148,163,184,0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    pointer-events: none;
}

/* Slim hero used on subpages */
.subhero {
    position: relative;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(99,102,241,0.06), transparent 90%);
    overflow: hidden;
}
.subhero::before {
    content: "";
    position: absolute; inset: 0;
    background:
      radial-gradient(50% 60% at 20% 30%, rgba(99,102,241,0.18), transparent 70%),
      radial-gradient(40% 70% at 80% 50%, rgba(34,211,238,0.12), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

.glass {
    background: linear-gradient(180deg, rgba(17,24,39,0.7), rgba(17,24,39,0.45));
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card {
    background: linear-gradient(180deg, rgba(17,24,39,0.65), rgba(15,23,42,0.65));
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
    transform: translateY(-2px);
    border-color: rgba(99,102,241,0.45);
    box-shadow: 0 10px 30px -10px rgba(99,102,241,0.25);
}
.card.flat { background: rgba(17,24,39,0.5); }
.card.flat:hover { transform: none; border-color: var(--border); box-shadow: none; }

.pill {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .35rem .7rem; border-radius: 999px;
    font-size: .75rem; font-weight: 500;
    border: 1px solid var(--border);
    background: rgba(99,102,241,0.08);
    color: #c7d2fe;
}
.pill .dot { width: .45rem; height: .45rem; border-radius: 999px; background: #22d3ee; box-shadow: 0 0 0 4px rgba(34,211,238,0.15); }

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white; font-weight: 600;
    padding: .7rem 1.15rem; border-radius: 10px;
    display: inline-flex; align-items: center; gap: .5rem;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    box-shadow: 0 8px 24px -8px rgba(99,102,241,0.6);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }

.btn-ghost {
    color: var(--text); font-weight: 500;
    padding: .7rem 1.15rem; border-radius: 10px;
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid var(--border);
    background: rgba(148,163,184,0.04);
    transition: background .2s ease, border-color .2s ease;
}
.btn-ghost:hover { background: rgba(148,163,184,0.08); border-color: rgba(148,163,184,0.25); }

.btn-icon {
    width: 36px; height: 36px;
    display: inline-grid; place-items: center;
    border-radius: 10px; border: 1px solid var(--border);
    background: rgba(148,163,184,0.04); color: #cbd5e1;
    transition: background .15s ease, color .15s ease;
}
.btn-icon:hover { background: rgba(148,163,184,0.10); color: white; }

.gradient-text {
    background: linear-gradient(135deg, #e5e7eb 0%, #a5b4fc 40%, #67e8f9 80%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.ring-soft {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 0 rgba(0,0,0,0.4);
}

/* Tags */
.tag {
    font-size: .7rem; letter-spacing: .02em;
    padding: .2rem .55rem; border-radius: 6px;
    background: rgba(99,102,241,0.12); color: #c7d2fe;
    border: 1px solid rgba(99,102,241,0.25);
    display: inline-flex; align-items: center; gap: .35rem;
}
.tag.cyan    { background: rgba(34,211,238,0.12);  color: #a5f3fc; border-color: rgba(34,211,238,0.25); }
.tag.violet  { background: rgba(167,139,250,0.12); color: #ddd6fe; border-color: rgba(167,139,250,0.30); }
.tag.emerald { background: rgba(16,185,129,0.12);  color: #a7f3d0; border-color: rgba(16,185,129,0.30); }
.tag.amber   { background: rgba(245,158,11,0.12);  color: #fde68a; border-color: rgba(245,158,11,0.30); }
.tag.pink    { background: rgba(236,72,153,0.12);  color: #fbcfe8; border-color: rgba(236,72,153,0.30); }
.tag.slate   { background: rgba(148,163,184,0.10); color: #cbd5e1; border-color: rgba(148,163,184,0.20); }

.divider {
    height: 1px; width: 100%;
    background: linear-gradient(90deg, transparent, rgba(148,163,184,0.25), transparent);
}

/* Nav */
.nav-link {
    color: #cbd5e1;
    padding: .5rem .85rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
}
.nav-link:hover { color: #fff; background: rgba(148,163,184,0.08); }
.nav-link.active { color: #fff; background: rgba(99,102,241,0.18); border: 1px solid rgba(99,102,241,0.35); }

/* Terminal block */
.terminal {
    background: linear-gradient(180deg, #0a0f1c, #0b1224);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .85rem;
}
.terminal .dot-r { background: #ef4444; }
.terminal .dot-y { background: #eab308; }
.terminal .dot-g { background: #22c55e; }

/* Avatar gradients */
.avatar {
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}
.av-indigo { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.av-cyan   { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.av-violet { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.av-emerald{ background: linear-gradient(135deg, #10b981, #22d3ee); }
.av-amber  { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.av-pink   { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.av-slate  { background: linear-gradient(135deg, #475569, #1e293b); }

/* Prose for article-style content */
.prose-w {
    color: #cbd5e1;
    font-size: 1.0625rem;
    line-height: 1.75;
}
.prose-w h2 {
    color: white; font-weight: 700;
    font-size: 1.6rem;
    margin-top: 2.5rem; margin-bottom: 1rem;
    letter-spacing: -0.01em;
}
.prose-w h3 {
    color: white; font-weight: 600;
    font-size: 1.25rem;
    margin-top: 2rem; margin-bottom: .75rem;
}
.prose-w p { margin-bottom: 1.25rem; }
.prose-w a { color: #a5b4fc; text-decoration: underline; text-decoration-color: rgba(165,180,252,0.35); text-underline-offset: 3px; }
.prose-w a:hover { color: #c7d2fe; }
.prose-w ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose-w ul li { margin-bottom: .4rem; }
.prose-w ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose-w ol li { margin-bottom: .4rem; }
.prose-w strong { color: white; font-weight: 600; }
.prose-w code {
    background: rgba(99,102,241,0.12); color: #c7d2fe;
    padding: .1rem .4rem; border-radius: 6px;
    font-size: .9em;
    border: 1px solid rgba(99,102,241,0.2);
}
.prose-w pre {
    background: #0a0f1c;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    font-size: .85rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.prose-w pre code {
    background: none;
    border: none;
    color: #cbd5e1;
    padding: 0;
}
.prose-w blockquote {
    border-left: 3px solid #6366f1;
    padding: .25rem 1.25rem;
    color: #cbd5e1; font-style: italic;
    background: rgba(99,102,241,0.05);
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}
.prose-w .lead {
    font-size: 1.2rem;
    color: #e2e8f0;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Syntax tokens for hand-highlighted pre blocks */
.tok-k  { color: #c4b5fd; }   /* keyword */
.tok-s  { color: #86efac; }   /* string */
.tok-n  { color: #fcd34d; }   /* number */
.tok-c  { color: #64748b; font-style: italic; }
.tok-f  { color: #93c5fd; }   /* function */
.tok-p  { color: #cbd5e1; }   /* punctuation */
.tok-t  { color: #f0abfc; }   /* type */

/* Table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
    text-align: left;
    font-size: .7rem; letter-spacing: .12em;
    text-transform: uppercase;
    color: #64748b; font-weight: 600;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
}
.tbl tbody td {
    padding: 1rem;
    border-bottom: 1px solid rgba(148,163,184,0.07);
    color: #cbd5e1;
    font-size: .9rem;
    vertical-align: middle;
}
.tbl tbody tr:hover td { background: rgba(99,102,241,0.04); }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* Inputs */
.input {
    width: 100%;
    background: rgba(15,23,42,0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .65rem .9rem;
    color: var(--text);
    font-size: .9rem;
    outline: none;
    transition: border-color .15s ease, background .15s ease;
}
.input::placeholder { color: #64748b; }
.input:focus { border-color: rgba(99,102,241,0.55); background: rgba(15,23,42,0.85); }

textarea.input {
    font-family: 'JetBrains Mono', monospace;
    font-size: .85rem;
    line-height: 1.6;
    resize: vertical;
}

.chip {
    padding: .4rem .85rem;
    border-radius: 999px;
    font-size: .8rem; font-weight: 500;
    color: #cbd5e1;
    background: rgba(148,163,184,0.05);
    border: 1px solid var(--border);
    transition: all .15s ease;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: .4rem;
}
.chip:hover { color: white; background: rgba(148,163,184,0.10); }
.chip.active {
    color: white;
    background: rgba(99,102,241,0.18);
    border-color: rgba(99,102,241,0.45);
}

/* Sidebar TOC */
.toc a {
    display: block;
    padding: .4rem .75rem;
    border-left: 2px solid transparent;
    color: #94a3b8;
    font-size: .85rem;
    transition: color .15s ease, border-color .15s ease;
}
.toc a:hover { color: white; }
.toc a.active { color: white; border-left-color: #6366f1; background: rgba(99,102,241,0.06); }
.toc a.sub { padding-left: 1.75rem; font-size: .8rem; }

/* Fade-in */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .7s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* Reactions */
.react {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    color: #cbd5e1;
    background: rgba(148,163,184,0.06);
    border: 1px solid var(--border);
    transition: all .15s ease;
    cursor: pointer;
}
.react:hover { background: rgba(99,102,241,0.10); border-color: rgba(99,102,241,0.30); color: white; }
.react.on { background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.45); color: #c7d2fe; }
