/* ============================================
   OBLITERATUS — Terminal Research Aesthetic
   Acid Green × Void Black × Industrial Brutalism
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,600;0,700;1,400&family=Barlow:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary:      #070708;
    --bg-secondary:    #0c0c0e;
    --bg-tertiary:     #111114;
    --bg-card:         #0a0a0c;
    --accent-primary:  #b8ff35;
    --accent-dim:      rgba(184, 255, 53, 0.12);
    --accent-glow:     rgba(184, 255, 53, 0.22);
    --accent-border:   rgba(184, 255, 53, 0.55);
    --danger:          #ff2525;
    --danger-dim:      rgba(255, 37, 37, 0.1);
    --success:         #2de87e;
    --success-dim:     rgba(45, 232, 126, 0.1);
    --warning:         #ffaa00;
    --text-primary:    #f0f0ee;
    --text-secondary:  #949490;
    --text-muted:      #545450;
    --border:          rgba(255,255,255,0.06);
    --border-light:    rgba(255,255,255,0.09);
    --font-display:    'Oswald', sans-serif;
    --font-body:       'Barlow', system-ui, sans-serif;
    --font-mono:       'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
}

/* ── Dot-grid background texture ── */
body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#three-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.55;
    pointer-events: none;
}

[data-lucide] {
    width: 1em; height: 1em;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    vertical-align: middle;
    display: inline-block;
}

.nav-toggle [data-lucide] {
    width: 22px; height: 22px;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover { opacity: 0.75; }

code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 0.1em 0.45em;
    border-radius: 2px;
    font-size: 0.875em;
    color: var(--accent-primary);
}

pre {
    background: var(--bg-secondary);
    border-radius: 0;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5rem;
    height: 56px;
    background: rgba(7, 7, 8, 0.97);
    border-bottom: 1px solid var(--border);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-primary);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--text-primary);
    text-transform: uppercase;
}

.brand-icon {
    color: var(--accent-primary);
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-links a {
    display: block;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 1.1rem;
    height: 56px;
    line-height: 56px;
    position: relative;
    transition: color 0.2s;
}

.nav-links a [data-lucide] {
    display: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    opacity: 1;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 2px;
    cursor: pointer;
    padding: 0.45rem;
    color: var(--text-primary);
    transition: border-color 0.2s, color 0.2s;
}

.nav-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ============================================
   SECTIONS — Base
   ============================================ */
section {
    padding: 9rem 3rem 7rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(7, 7, 8, 0.85) !important;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    width: 100%;
    max-width: 800px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-header::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent-primary);
    margin: 1rem auto 0;
}

.section-desc {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 7vw;
    text-align: left;
    background: transparent;
    overflow: hidden;
    min-height: 100vh;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(184,255,53,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    left: 5vw;
    top: 20%;
    height: 60%;
    width: 2px;
    background: var(--accent-primary);
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 1.75rem;
    opacity: 0;
    transform: translateY(16px);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 0.9;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    filter: none;
    animation: none;
}

.hero h1 span.accent {
    color: var(--accent-primary);
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    opacity: 0;
    transform: translateY(16px);
}

.hero-quote {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(16px);
    padding-left: 1rem;
    border-left: 2px solid var(--border-light);
    font-style: italic;
}

.hero-repos {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(16px);
}

.repo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-light);
    transition: border-color 0.2s, background 0.2s;
}

.repo-link:hover {
    opacity: 1;
    border-color: var(--accent-primary);
    background: var(--accent-dim);
}

.repo-icon { font-size: 1.25rem; color: var(--accent-primary); }
.repo-link strong { display: block; font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-primary); font-weight: 600; }
.repo-link small { font-family: var(--font-mono); color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ============================================
   PARADOX SECTION
   ============================================ */
.paradox-section { background: var(--bg-secondary); }

.paradox-diagram {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    margin-bottom: 3rem;
    max-width: 900px;
    width: 100%;
}

.paradox-element {
    padding: 2.5rem 2rem;
    width: 340px;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.paradox-element::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--accent-primary);
}

.paradox-element.guardrail::before {
    background: var(--danger);
}

.element-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.guardrail .element-icon { color: var(--danger); }

.paradox-element h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.paradox-element p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.capability-bar {
    height: 4px;
    background: var(--border);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.capability-fill {
    height: 100%;
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.llm .capability-fill         { background: var(--accent-primary); }
.guardrail .capability-fill   { background: var(--danger); }

.capability-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.paradox-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    gap: 0.5rem;
    color: var(--text-muted);
    min-width: 60px;
}

.connector-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--accent-primary), var(--danger));
}

.connector-icon {
    font-size: 1.1rem;
    color: var(--text-muted);
    animation: pulseIcon 2s ease-in-out infinite;
}

.paradox-diagram:not(.vertical) .connector-icon [data-lucide] {
    transform: none;
}

@keyframes pulseIcon {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.paradox-conclusion {
    max-width: 700px;
    width: 100%;
}

.conclusion-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0;
    padding: 1.5rem 2rem;
    text-align: left;
}

.conclusion-card h4 {
    font-family: var(--font-display);
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.conclusion-card p { color: var(--text-secondary); font-size: 0.925rem; }
.conclusion-card strong { color: var(--text-primary); font-weight: 600; }

/* ============================================
   THEORY SECTION
   ============================================ */
.theory-section { background: var(--bg-primary); }

.theory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr));
    gap: 1.5px;
    max-width: 1200px;
    width: 100%;
    margin-bottom: 4rem;
    background: var(--border);
}

.theory-card {
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: background 0.2s;
}

.theory-card:hover { background: var(--bg-tertiary); }

.card-header {
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.paper-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--accent-primary);
    color: #070708;
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.card-header h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.card-content {
    padding: 1.5rem 1.75rem;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    line-height: 1.7;
}

.evidence-table {
    border: 1px solid var(--border);
    overflow: hidden;
    font-size: 0.82rem;
}

.table-header,
.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0;
    padding: 0.65rem 1rem;
}

.table-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-light);
}

.table-header span {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table-row {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.table-row:last-child { border-bottom: none; }
.table-row:hover      { background: rgba(255,255,255,0.02); }

.baseline   { color: var(--danger); font-family: var(--font-mono); font-size: 0.8rem; }
.isomorphic { color: var(--success); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; }
.delta      { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; }
.delta.positive { color: var(--success); }

.math-block {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-primary);
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.formula-desc { font-size: 0.875rem; color: var(--text-secondary); }

.models-evidence {
    max-width: 800px;
    width: 100%;
}

.models-evidence h3 {
    font-family: var(--font-display);
    text-align: left;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.models-chart {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 2rem;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bar-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bar {
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    border-radius: 0;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar[data-model="Gemini 2.5 Pro"] .bar-fill    { background: var(--danger); }
.bar[data-model="DeepSeek-Chat"] .bar-fill      { background: var(--warning); }
.bar[data-model="Claude Haiku 4.5"] .bar-fill   { background: var(--success); }
.bar[data-model="GPT-5 Nano"] .bar-fill         { background: var(--accent-primary); }

.bar-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chart-note {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 1.5rem;
    font-style: italic;
    font-family: var(--font-mono);
}

/* ============================================
   IDS-V4 SECTION
   ============================================ */
.idsv4-section { background: var(--bg-secondary); }

.mapping-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    margin-bottom: 4rem;
}

.mapping-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1.5rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.mapping-row:last-child { border-bottom: none; }
.mapping-row:hover      { background: rgba(255,255,255,0.025); }

.mapping-row.header {
    background: var(--bg-tertiary);
    cursor: default;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.mapping-row.header:hover { background: var(--bg-tertiary); }
.mapping-row::before      { content: attr(data-original); color: var(--danger); font-family: var(--font-mono); font-size: 0.85rem; }
.mapping-row::after       { content: attr(data-domain); color: var(--text-muted); font-family: var(--font-mono); font-size: 0.78rem; text-align: right; text-transform: uppercase; letter-spacing: 0.06em; }
.mapping-row span:not([class]) { color: var(--success); font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; }

.agents-swarm { max-width: 900px; width: 100%; }

.agents-swarm h3 {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.agents-diagram {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.agent {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0;
    text-align: left;
    padding: 1.5rem 2rem;
    transition: border-color 0.2s;
    width: 100%;
    max-width: 360px;
}

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

.ultra-agent {
    border-left-color: var(--accent-primary);
    border-color: var(--accent-border);
}

.agent-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--accent-primary);
}

.agent h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.agent-role     { font-family: var(--font-mono); color: var(--accent-primary); font-size: 0.78rem; margin-bottom: 0.4rem; }
.agent-mechanism { color: var(--text-muted); font-size: 0.8rem; font-weight: 300; }

.agents-branch {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branch-line {
    width: 1px;
    height: 100%;
    background: var(--accent-primary);
    opacity: 0.4;
    position: relative;
}

.branch-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: rgba(184, 255, 53, 0.2);
}

.agents-row { display: flex; gap: 2rem; }
.tactic-bard, .ejecutor { min-width: 250px; }

/* ============================================
   PIPELINE SECTION
   ============================================ */
.pipeline-section { background: transparent !important; }

.pipeline-flow {
    display: flex;
    align-items: stretch;
    gap: 1.5px;
    flex-wrap: nowrap;
    justify-content: center;
    max-width: 1300px;
    width: 100%;
    background: var(--border);
}

.pipeline-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.25rem;
    transition: background 0.2s;
    cursor: pointer;
    flex: 1 1 0;
    min-width: 160px;
    min-height: 130px;
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.pipeline-step::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.pipeline-step:hover { background: var(--bg-tertiary); }
.pipeline-step:hover::after { transform: scaleX(1); }

.step-number {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-primary);
    color: #070708;
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.step-name {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-primary);
    margin: 0.25rem 0;
    font-weight: 500;
}

.step-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.5;
}

.pipeline-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    width: 28px;
    flex-shrink: 0;
    background: var(--bg-primary);
}

/* ============================================
   SIMULATION SECTION
   ============================================ */
.simulation-section { background: var(--bg-primary); }

.simulator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5px;
    max-width: 1200px;
    width: 100%;
    margin-bottom: 3rem;
    background: var(--border);
}

.sim-panel {
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    padding: 1.75rem;
}

.sim-panel h4 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

#raw-input {
    width: 100%;
    height: 150px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    resize: none;
    transition: border-color 0.2s;
}

#raw-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.input-controls {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

#domain-select {
    flex: 1;
    padding: 0.7rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

#domain-select:focus { outline: none; border-color: var(--accent-primary); }

.btn-primary {
    padding: 0.7rem 1.5rem;
    background: var(--accent-primary);
    border: none;
    border-radius: 0;
    color: #070708;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.85; transform: none; }

.output-content {
    min-height: 150px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.8;
}

.output-content .placeholder { color: var(--text-muted); font-style: italic; }
.output-content .tag         { color: var(--accent-primary); font-weight: 600; }
.output-content .code-inline { background: var(--bg-tertiary); padding: 0.1em 0.3em; color: var(--success); }

.transform-stats {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat { display: flex; align-items: center; gap: 1rem; }

.stat-label {
    width: 120px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    width: 0;
    background: var(--accent-primary);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tag-explorer {
    max-width: 800px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 2rem;
}

.tag-explorer h3 {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tag-grid {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tag-btn {
    padding: 0.45rem 0.9rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-btn:hover,
.tag-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #070708;
}

.tag-explanation {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-primary);
    padding: 1.5rem;
}

.tag-explanation h4 {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.tag-explanation p    { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.7; font-weight: 300; }

.tag-example {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-left: 2px solid var(--border-light);
}

.tag-example strong  { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.tag-example code    { display: block; margin-top: 0.5rem; color: var(--success); }

/* ============================================
   CASES SECTION
   ============================================ */
.cases-section { background: var(--bg-secondary); }

.case-card {
    max-width: 1100px;
    width: 100%;
    margin-bottom: 1.5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
}

.case-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-tertiary);
}

.case-label {
    padding: 0.2rem 0.6rem;
    background: var(--accent-primary);
    color: #070708;
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.case-header h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.case-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: stretch;
    background: var(--border);
}

.case-before, .case-after {
    padding: 1.5rem;
    border-radius: 0;
    background: var(--bg-card);
}

.case-before { border-left: 3px solid var(--danger); }
.case-after  { border-left: 3px solid var(--success); }

.case-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 0;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.case-status.blocked  { background: var(--danger); color: white; }
.case-status.approved { background: var(--success); color: #070708; }

.case-before h4, .case-after h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.case-before p        { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; }

.block-reason {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--danger-dim);
}

.reason-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.block-reason code {
    font-size: 0.8rem;
    color: var(--danger);
    background: var(--danger-dim);
}

.translation-content p     { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.7; margin-bottom: 0.75rem; font-weight: 300; }
.translation-content strong { color: var(--success); font-weight: 600; }
.translation-content code   { color: var(--success); background: var(--success-dim); }

.case-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-height: 100%;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: var(--bg-primary);
}

/* ============================================
   CODE SECTION
   ============================================ */
.code-section { background: var(--bg-primary); }

.code-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    margin-bottom: 3rem;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.file-name {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.file-name::before {
    content: '● ';
    color: var(--accent-primary);
    font-size: 0.6rem;
}

.copy-btn {
    padding: 0.35rem 0.85rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.copy-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    max-height: 500px;
    overflow: auto;
    background: var(--bg-secondary);
}

.defense-paradigm { max-width: 900px; width: 100%; }

.defense-paradigm h3 {
    font-family: var(--font-display);
    text-align: left;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.defense-paradigm > p {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.defense-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
}

.defense-row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.defense-row:last-child { border-bottom: none; }

.defense-row.header {
    background: var(--bg-tertiary);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.defense-row span:first-child { font-weight: 500; }

.ineffective { color: var(--danger); font-weight: 600; }
.partial     { color: var(--warning); font-weight: 600; }
.effective   { color: var(--success); font-weight: 600; }

.defense-row.highlight {
    background: rgba(45, 232, 126, 0.04);
    border-left: 3px solid var(--success);
}

/* ============================================
   STRUCTURE SECTION
   ============================================ */
.structure-section { background: var(--bg-secondary); }

.project-tree {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5px;
    max-width: 1000px;
    width: 100%;
    background: var(--border);
}

.tree-section {
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    padding: 1.75rem;
}

.tree-section h4 {
    font-family: var(--font-display);
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tree-content {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin: 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-left: 2px solid var(--border-light);
    overflow-x: auto;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 4rem 3rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-primary);
    opacity: 0.35;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}

.footer-quote p:first-child {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: flex-end;
}

.footer-links a {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.78rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
    opacity: 1;
}

/* ============================================
   LOADER
   ============================================ */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content { text-align: center; width: 300px; }

.loader-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 2rem;
    filter: drop-shadow(0 0 12px var(--accent-glow));
    animation: loaderPulse 2.5s infinite ease-in-out;
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.08); opacity: 0.75; }
}

.loader-icon svg { width: 100%; height: 100%; }

.loader-icon svg path:first-child  { stroke: var(--accent-primary) !important; }
.loader-icon svg path:nth-child(2) { fill: rgba(184, 255, 53, 0.15) !important; }
.loader-icon svg circle            { fill: var(--accent-primary) !important; }

.loader-bar-container {
    height: 1px;
    width: 100%;
    background: var(--border);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-glow);
    animation: loaderProgress 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes loaderProgress {
    0%   { width: 0%; }
    50%  { width: 65%; }
    100% { width: 100%; }
}

.loader-status {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }

/* ============================================
   RESPONSIVE — 900px
   ============================================ */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 56px; left: 0; right: 0;
        background: rgba(7, 7, 8, 0.98);
        flex-direction: column;
        padding: 0.5rem 0;
        gap: 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active { display: flex; }
    .nav-links a { height: auto; line-height: 1; padding: 0.85rem 1.5rem; }
    .nav-links a [data-lucide] { display: inline-block; margin-right: 0.5rem; }
    .nav-links a::after { display: none; }
    .nav-toggle { display: flex; }

    .hero { padding-left: 5vw; }
    .hero h1 { font-size: clamp(3rem, 12vw, 6rem); }

    .paradox-diagram {
        flex-direction: column;
        align-items: center;
    }
    .paradox-connector {
        transform: none;
        padding: 0.5rem 0;
        min-width: unset;
        width: 60px;
    }
    .paradox-connector .connector-icon svg {
        transform: rotate(90deg);
    }
    .connector-line {
        width: 1px;
        height: 40px;
    }
    .paradox-element { width: 100%; max-width: 500px; }

    .theory-grid { grid-template-columns: 1fr; }

    .agents-row { flex-direction: column; gap: 1px; }
    .tactic-bard, .ejecutor { min-width: unset; width: 100%; }

    .pipeline-flow {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
    }
    .pipeline-step {
        width: 100%;
        min-height: auto;
        flex: none;
    }
    .pipeline-connector {
        transform: none;
        width: 100%;
        height: 28px;
        justify-content: center;
    }
    .pipeline-connector svg {
        transform: rotate(90deg);
    }

    .simulator { grid-template-columns: 1fr; }

    .case-comparison {
        grid-template-columns: 1fr;
    }
    .case-arrow {
        width: 100%;
        height: 44px;
        min-height: unset;
    }
    .case-arrow svg {
        transform: rotate(90deg);
    }

    .project-tree { grid-template-columns: 1fr; }
    .defense-row  { grid-template-columns: 1fr; gap: 0.25rem; }

    .bar-item    { grid-template-columns: 1fr auto; }
    .bar-label   { grid-column: 1 / -1; }
    .mapping-row { grid-template-columns: 1fr 1.5fr; }
    .mapping-row::after { display: none; }

    .table-header,
    .table-row          { grid-template-columns: 2fr 1fr 1fr; font-size: 0.78rem; }
    .table-header span:last-child,
    .table-row .delta   { display: none; }

    .footer-content { grid-template-columns: 1fr; }
    .footer-links   { align-items: flex-start; }
}

/* ============================================
   RESPONSIVE — 768px
   ============================================ */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }

    section {
        padding: 5rem 1.25rem;
        min-height: auto;
    }

    .hero {
        min-height: 100vh;
        padding: 5rem 1.25rem;
        justify-content: center;
        text-align: center;
    }

    .hero::before { display: none; }
    .hero-badge   { margin: 0 auto 1.5rem; }
    .hero-repos   { justify-content: center; }

    .section-header        { margin-bottom: 2.5rem; }
    .section-header h2     { font-size: 2rem; }
    .hero-quote            { text-align: left; }

    .agents-diagram { padding: 1.5rem; }
    .models-chart   { padding: 1.25rem; }

    .mapping-row        { grid-template-columns: 1fr; gap: 0.25rem; }
    .mapping-row.header { display: none; }
    .mapping-row::after { display: none; }
    .mapping-row span   { font-size: 0.82rem; }

    .case-card    { margin-bottom: 1.5px; }
    .case-header  { padding: 1rem; }
    .case-before,
    .case-after   { padding: 1rem; }

    .code-block pre       { max-height: 350px; }
    .defense-row          { font-size: 0.82rem; }
    .tag-grid             { gap: 0.4rem; }
    .tag-btn              { padding: 0.4rem 0.75rem; font-size: 0.7rem; }
    .footer-links         { gap: 0.75rem; }

    /* FIX: árbol de directorios responsivo */
    .tree-content {
        white-space: pre-wrap;
        word-break: break-all;
        font-size: 0.72rem;
    }

    .tree-section {
        padding: 1rem;
    }
}

/* ============================================
   RESPONSIVE — 480px
   ============================================ */
@media (max-width: 480px) {
    section { padding: 4.5rem 1rem; }
    .hero   { padding: 4.5rem 1rem; }

    .section-header h2 { font-size: 1.6rem; }
    .section-desc      { font-size: 0.875rem; }
    .hero h1           { font-size: 2.4rem; letter-spacing: 0.06em; }
    .hero-subtitle     { font-size: 0.7rem; letter-spacing: 0.12em; }

    .hero-repos { flex-direction: column; align-items: center; }
    .repo-link  { width: 100%; max-width: 280px; justify-content: center; }

    .paradox-connector {
        transform: none;
        padding: 0.25rem 0;
    }
    .paradox-connector .connector-icon svg {
        transform: rotate(90deg);
    }

    .pipeline-step     { padding: 1rem; min-height: auto; }
    .step-number       { flex-shrink: 0; }

    .table-header { display: none; }
    .table-row    {
        grid-template-columns: 1fr;
        gap: 0.15rem;
        padding: 0.75rem 1rem;
    }
    .table-row span:not(:first-child) { font-size: 0.78rem; color: var(--text-muted); }
    .evidence-table { font-size: 0.78rem; }

    .bar-item   { grid-template-columns: 1fr; gap: 0.4rem; }
    .bar-label  { font-weight: 600; }
    .bar        { height: 22px; }
    .bar-value  { font-size: 0.72rem; }

    .input-controls { flex-direction: column; }
    #domain-select,
    .btn-primary    { width: 100%; }
    .sim-panel      { padding: 1rem; }
    .stat-label     { width: 100px; font-size: 0.7rem; }

    .defense-row        {
        grid-template-columns: 1fr;
        gap: 0.2rem;
        padding: 0.75rem 1rem;
        font-size: 0.78rem;
    }
    .defense-row.header { display: none; }

    .tree-content  { font-size: 0.7rem; }
    .math-block    { font-size: 0.75rem; }
    .conclusion-card { padding: 1rem; }
    .agents-diagram  { padding: 1rem; }
    .agent           { padding: 1rem; }
    .code-block pre  { max-height: 280px; padding: 1rem; }
}

/* ============================================
   RESPONSIVE — 360px
   ============================================ */
@media (max-width: 360px) {
    .hero h1           { font-size: 1.9rem; }
    .nav-brand span    { font-size: 0.95rem; }
    .section-header h2 { font-size: 1.4rem; }
    .pipeline-step     { gap: 0.6rem; padding: 0.75rem; }
    .mapping-row       { padding: 0.75rem; }
}
