/**
 * IonixOS Project Hub & Showcase Studio Stylesheet
 * Phase 6E (ionix.ckatplay.com)
 *
 * Implements Milestones M4-M6:
 * - Desktop Theme Engine: Cyber Obsidian (Default), Catppuccin Mocha, Nord Frost
 * - High-Fidelity Glassmorphic Surfaces (backdrop-filter: blur(16px))
 * - Floating Navigation HUD with quick section jumping
 * - Public Stealth Teaser Landing Splash with glowing [IX-01] hex core
 * - Owner CMS Studio Toolbar, Draft/Live switches, and Editor Dialog Modal
 * - Responsive Multi-Grid & Monospace Tabular Telemetry
 */

/* ==========================================================================
   1. Theme Colorways & CSS Custom Properties
   ========================================================================== */

:root,
body.theme-cyber-obsidian {
    --theme-name: 'cyber-obsidian';
    --bg-canvas: #0a0b10;
    --bg-surface: rgba(16, 18, 27, 0.72);
    --bg-surface-elevated: rgba(22, 25, 38, 0.85);
    --bg-card-header: rgba(26, 30, 46, 0.60);
    --bg-code: rgba(10, 11, 16, 0.85);
    
    --accent-primary: #00f0ff;
    --accent-secondary: #a855f7;
    --accent-glow: rgba(0, 240, 255, 0.35);
    --accent-border: rgba(0, 240, 255, 0.22);
    
    --text-primary: #e0f7fa;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #00f0ff;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-card: rgba(0, 240, 255, 0.18);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 24px rgba(0, 240, 255, 0.25);
    
    --badge-live-bg: rgba(16, 185, 129, 0.15);
    --badge-live-text: #10b981;
    --badge-live-border: rgba(16, 185, 129, 0.4);
    
    --badge-draft-bg: rgba(245, 158, 11, 0.15);
    --badge-draft-text: #f59e0b;
    --badge-draft-border: rgba(245, 158, 11, 0.4);
}

body.theme-catppuccin-mocha {
    --theme-name: 'catppuccin-mocha';
    --bg-canvas: #1e1e2e;
    --bg-surface: rgba(30, 30, 46, 0.75);
    --bg-surface-elevated: rgba(40, 40, 60, 0.88);
    --bg-card-header: rgba(49, 50, 68, 0.65);
    --bg-code: rgba(24, 24, 37, 0.90);
    
    --accent-primary: #cba6f7;
    --accent-secondary: #f5e0dc;
    --accent-glow: rgba(203, 166, 247, 0.35);
    --accent-border: rgba(203, 166, 247, 0.25);
    
    --text-primary: #cdd6f4;
    --text-secondary: #a6adc8;
    --text-muted: #9399b2;
    --text-accent: #cba6f7;
    
    --border-subtle: rgba(205, 214, 244, 0.10);
    --border-card: rgba(203, 166, 247, 0.22);
    --shadow-glass: 0 8px 32px 0 rgba(17, 17, 27, 0.65);
    --shadow-glow: 0 0 24px rgba(203, 166, 247, 0.25);
    
    --badge-live-bg: rgba(166, 227, 161, 0.18);
    --badge-live-text: #a6e3a1;
    --badge-live-border: rgba(166, 227, 161, 0.4);
    
    --badge-draft-bg: rgba(250, 179, 135, 0.18);
    --badge-draft-text: #fab387;
    --badge-draft-border: rgba(250, 179, 135, 0.4);
}

body.theme-nord-frost {
    --theme-name: 'nord-frost';
    --bg-canvas: #2e3440;
    --bg-surface: rgba(46, 52, 64, 0.78);
    --bg-surface-elevated: rgba(59, 66, 82, 0.90);
    --bg-card-header: rgba(67, 76, 94, 0.65);
    --bg-code: rgba(36, 41, 51, 0.92);
    
    --accent-primary: #88c0d0;
    --accent-secondary: #8fbcbb;
    --accent-glow: rgba(136, 192, 208, 0.35);
    --accent-border: rgba(136, 192, 208, 0.25);
    
    --text-primary: #eceff4;
    --text-secondary: #d8dee9;
    --text-muted: #e5e9f0;
    --text-accent: #88c0d0;
    
    --border-subtle: rgba(236, 239, 244, 0.10);
    --border-card: rgba(136, 192, 208, 0.22);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.50);
    --shadow-glow: 0 0 24px rgba(136, 192, 208, 0.25);
    
    --badge-live-bg: rgba(163, 190, 140, 0.18);
    --badge-live-text: #a3be8c;
    --badge-live-border: rgba(163, 190, 140, 0.4);
    
    --badge-draft-bg: rgba(235, 203, 139, 0.18);
    --badge-draft-text: #ebcb8b;
    --badge-draft-border: rgba(235, 203, 139, 0.4);
}

/* ==========================================================================
   2. Global Typography & Reset
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-canvas);
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.35s ease, color 0.35s ease;
}

code, pre, .font-mono, .section-key-badge, .section-order-badge, .brand-hex-code, .hud-version-tag, .stealth-mono-badge {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, 'Courier New', monospace;
    font-variant-ligatures: none;
}

/* ==========================================================================
   3. Background Cyber Grid Canvas
   ========================================================================== */

.cyber-grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
}

/* ==========================================================================
   4. Glassmorphism Utilities
   ========================================================================== */

.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    box-shadow: var(--shadow-glass);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
    border-color: var(--accent-primary);
}

/* ==========================================================================
   5. Root Layout
   ========================================================================== */

.ionix-hub-root {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ionix-main-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* ==========================================================================
   6. Floating Navigation HUD (.ionix-nav-hud)
   ========================================================================== */

.ionix-nav-hud {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1200px;
    z-index: 100;
    border-radius: 12px;
    padding: 10px 20px;
}

.hud-inner-cluster {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hud-brand-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hud-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid var(--accent-border);
    padding: 3px 8px;
    border-radius: 6px;
}

.brand-hex-code {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.05em;
}

.hud-titles-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.hud-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.hud-brand-title:hover {
    color: var(--accent-primary);
}

.hud-version-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.hud-nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hud-link {
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.hud-link:hover, .hud-link.active {
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.hud-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-hud {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-hud:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.theme-icon-glyph {
    font-size: 1.05rem;
    line-height: 1;
}

.hud-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.25);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
}

.discreet-signin-link {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    transition: all 0.2s;
}

.discreet-signin-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.06);
}

/* Pulsing Dots */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.pulse-green {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.pulse-cyan {
    background-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

.pulse-amber {
    background-color: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

/* ==========================================================================
   7. Public Stealth Teaser Landing Splash
   ========================================================================== */

.stealth-teaser-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    min-height: 85vh;
}

.stealth-teaser-card {
    max-width: 760px;
    width: 100%;
    padding: 48px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-glow);
}

.stealth-hex-graphic {
    position: relative;
    width: 88px;
    height: 88px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-inner-core {
    width: 72px;
    height: 72px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(10, 11, 16, 0.8) 70%);
    border: 2px solid var(--accent-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 28px var(--accent-glow);
    animation: corePulse 3s infinite ease-in-out;
}

.hex-core-id {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--accent-primary);
    letter-spacing: 0.08em;
}

@keyframes corePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px var(--accent-glow); }
    50% { transform: scale(1.05); box-shadow: 0 0 35px var(--accent-primary); }
}

.stealth-mono-badge {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid var(--accent-border);
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.08em;
}

.stealth-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stealth-vision-statement {
    font-size: 1.12rem;
    color: var(--text-secondary);
    max-width: 620px;
    line-height: 1.65;
}

.stealth-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    margin-top: 10px;
}

.stealth-spec-item {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border-subtle);
    padding: 12px 16px;
    border-radius: 8px;
    text-align: left;
}

.spec-item-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.spec-item-val {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stealth-status-banner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid var(--accent-border);
    padding: 10px 20px;
    border-radius: 30px;
    margin-top: 10px;
}

.status-msg-text {
    font-size: 0.88rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.terminal-blink-cursor {
    font-weight: 800;
    color: var(--accent-primary);
    animation: blink 1s infinite step-start;
}

@keyframes blink {
    50% { opacity: 0; }
}

.stealth-footer-entry {
    margin-top: 10px;
}

.stealth-auth-link {
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.stealth-auth-link:hover {
    color: var(--accent-primary);
}

/* ==========================================================================
   8. Owner CMS Studio Toolbar
   ========================================================================== */

.owner-toolbar {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-left: 4px solid var(--accent-primary);
}

.toolbar-left-cluster {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toolbar-icon {
    font-size: 1.5rem;
}

.toolbar-heading {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-primary);
}

.toolbar-subheading {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.toolbar-right-cluster {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-metrics-pills {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-pill {
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.25);
}

.pill-live {
    color: var(--badge-live-text);
    border-color: var(--badge-live-border);
}

.pill-draft {
    color: var(--badge-draft-text);
    border-color: var(--badge-draft-border);
}

/* ==========================================================================
   9. Showcase Section Cards
   ========================================================================== */

.sections-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.section-card {
    position: relative;
    padding: 36px 36px 40px;
    overflow: hidden;
    scroll-margin-top: 100px;
    border-left: 3px solid var(--accent-color, var(--accent-primary));
}

.section-accent-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color, var(--accent-primary)) 0%, transparent 100%);
    opacity: 0.65;
}

.section-card-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.section-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-key-badge {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--accent-color, var(--accent-primary));
    background: rgba(0, 0, 0, 0.35);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}

.section-order-badge {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: auto;
}

.badge-live {
    background: var(--badge-live-bg);
    color: var(--badge-live-text);
    border: 1px solid var(--badge-live-border);
}

.badge-draft {
    background: var(--badge-draft-bg);
    color: var(--badge-draft-text);
    border: 1px solid var(--badge-draft-border);
}

.section-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-tagline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Card Owner Controls */
.card-owner-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 4px;
}

.btn-cms {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cms:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-cms.btn-toggle-public.btn-live {
    border-color: var(--badge-live-border);
    color: var(--badge-live-text);
}

.btn-cms.btn-toggle-public.btn-draft {
    border-color: var(--badge-draft-border);
    color: var(--badge-draft-text);
}

.btn-cms.btn-reorder {
    padding: 6px 10px;
}

.color-picker-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.btn-cms-color-input {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    background: none;
}

.btn-cms-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.btn-cms-color-input::-webkit-color-swatch {
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
}

/* ==========================================================================
   10. Section Body & Markdown Formatting
   ========================================================================== */

.section-card-body {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.markdown-prose {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: var(--text-secondary);
}

.markdown-prose h2, .markdown-prose h3, .markdown-prose h4 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 10px;
}

.markdown-prose .md-h2 { font-size: 1.45rem; }
.markdown-prose .md-h3 { font-size: 1.22rem; }
.markdown-prose .md-h4 { font-size: 1.05rem; }

.markdown-prose p {
    line-height: 1.7;
}

.markdown-prose .md-ul {
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inline-code {
    background: var(--bg-code);
    color: var(--accent-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    border: 1px solid var(--border-subtle);
}

.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
}

.code-block code {
    color: var(--text-primary);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ==========================================================================
   11. Specialized Structured Visualizers
   ========================================================================== */

/* Hero Stats */
.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-pill-card {
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border-subtle);
}

.stat-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 4px;
}

.stat-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Architecture Layers */
.arch-layers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.arch-layer-card {
    padding: 20px 24px;
    border: 1px solid var(--border-subtle);
}

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

.layer-index-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
}

.layer-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.layer-components-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.component-chip {
    font-size: 0.82rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    border-radius: 6px;
    color: var(--text-secondary);
}

/* Downloads Table */
.downloads-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
}

.downloads-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.downloads-table th {
    background: var(--bg-card-header);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.downloads-table td {
    padding: 14px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-subtle);
}

.artifact-name-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.artifact-size-cell {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}

.artifact-sha-cell code {
    background: var(--bg-code);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-download-artifact {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid var(--accent-border);
    color: var(--accent-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-download-artifact:hover {
    background: var(--accent-primary);
    color: #000;
}

/* ABI Functions Grid */
.abi-functions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.abi-card {
    padding: 20px;
    border: 1px solid var(--border-subtle);
}

.abi-signature code {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: block;
    margin-bottom: 10px;
}

.abi-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.abi-params-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.abi-params-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 4px;
}

.abi-params-list {
    padding-left: 20px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.abi-returns-box {
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

/* Devlog Timeline */
.devlog-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.devlog-card {
    padding: 20px;
    border: 1px solid var(--border-subtle);
}

.devlog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.devlog-category-badge {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.devlog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.devlog-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.devlog-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-card {
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.gallery-image-wrap {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.04);
}

.gallery-caption {
    padding: 14px 16px;
}

.gallery-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.gallery-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Roadmap Timeline */
.roadmap-timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.roadmap-milestone-card {
    padding: 22px;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.roadmap-milestone-card.status-completed {
    border-left: 3px solid #10b981;
}

.roadmap-milestone-card.status-in_progress {
    border-left: 3px solid var(--accent-primary);
}

.roadmap-milestone-card.status-planned {
    border-left: 3px solid var(--text-muted);
}

.milestone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.milestone-phase {
    font-size: 0.74rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-primary);
}

.milestone-status-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
}

.milestone-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.milestone-timeline-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.milestone-deliverables-list {
    padding-left: 20px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ==========================================================================
   12. In-Browser Editor Modal (.ionix-editor-modal)
   ========================================================================== */

.ionix-editor-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), var(--shadow-glow);
    padding: 0;
    z-index: 1000;
    color: var(--text-primary);
}

.ionix-editor-modal::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.modal-inner-content {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-key-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 10px;
}

.btn-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row-split {
    align-items: flex-end;
}

.flex-1 { flex: 1; }
.flex-3 { flex: 3; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    background: var(--bg-code);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--accent-primary);
}

.form-input-color {
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    height: 42px;
    width: 100%;
    cursor: pointer;
}

.editor-tabs-bar {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.editor-textarea {
    width: 100%;
    background: var(--bg-code);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
    outline: none;
    resize: vertical;
}

.editor-textarea:focus {
    border-color: var(--accent-primary);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.modal-save-status {
    font-size: 0.82rem;
    color: var(--accent-primary);
    margin-right: auto;
}

.btn-modal-cancel {
    background: transparent;
}

.btn-modal-save {
    background: var(--accent-primary);
    color: #000;
    border: none;
    font-weight: 700;
}

.btn-modal-save:hover {
    background: #fff;
    color: #000;
}

/* ==========================================================================
   13. Footer
   ========================================================================== */

.ionix-footer {
    margin-top: auto;
    border-radius: 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    padding: 24px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-attest-badge {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.05em;
}

/* ==========================================================================
   14. Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
    .hud-nav-links {
        display: none;
    }
    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .roadmap-timeline {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ionix-main-container {
        padding: 90px 16px 40px;
    }
    .stealth-hero-title {
        font-size: 2.1rem;
    }
    .stealth-spec-grid {
        grid-template-columns: 1fr;
    }
    .hero-stats-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .owner-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
