﻿@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800&family=Inter:wght@200;300;400;500&family=JetBrains+Mono:wght@200;300;400;700&display=swap');

/* ==========================================
   GLOBAL CORE VARIABLES & BASE VOID
   ========================================== */
::selection {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}
::-moz-selection {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}

:root {
    --bg-base: #020203;
    --quant-crimson: #8A0303;
    --quant-pearl: #f8fafc;
    --quant-slate: #64748b;
    --spatial-x: 2.5rem; /* The Universal Structural Constant */
}

html, body, .quarto-container, #quarto-content, main {
    background-color: transparent !important;
    color: var(--quant-pearl);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    overflow-x: hidden !important;
    width: 100%;
    margin: 0;
    padding: 0;
    text-rendering: geometricPrecision !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

html {
    background-color: var(--bg-base) !important;
}

/* Elegant, Ultra-Subtle Atmospheric Grain */
body::after {
    content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
    background-size: 100% 4px; z-index: 9998; pointer-events: none; opacity: 0.25;
}

/* High-End Minimalist Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* ==========================================
   APEX COMMAND VISOR - THE HARDWARE ACCELERATED MATRIX
   ========================================== */
body #quarto-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    background: rgba(12, 12, 16, 0.4) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    border: none !important;
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.12), 
        inset 0 -1px 1px rgba(0, 0, 0, 0.3), 
        0 20px 40px rgba(0, 0, 0, 0.8) !important;
    z-index: 999999 !important;
    perspective: 1200px !important;
    transform: translate3d(0, 0, 0) !important;
    backface-visibility: hidden !important;
    will-change: backdrop-filter, box-shadow !important;
}

/* THE SOUL: PURE WHITE DIAMOND RESONANCE */
body #quarto-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    height: 2px; 
    background: radial-gradient(ellipse 50% 100% at 50% 50%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 1px 15px rgba(255, 255, 255, 0.2);
    animation: diamondPulse 4s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

@keyframes diamondPulse {
    0% { width: 60%; opacity: 0.4; }
    100% { width: 85%; opacity: 1; box-shadow: 0 1px 25px rgba(255, 255, 255, 0.5); }
}

/* ANNIHILATE QUARTO'S INNER CONTAINER RESTRAINTS */
body #quarto-header .navbar > .container-fluid, 
body #quarto-header .navbar > .navbar-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body #quarto-header .navbar {
    background: transparent !important;
    padding: 1.5rem 4rem !important; 
    position: relative !important;
    overflow: visible !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    transform-style: preserve-3d !important;
}

/* 1. ABSOLUTE LEFT SHIFT FOR BRAND */
body #quarto-header .navbar-brand-container {
    display: flex !important;
    align-items: center !important;
    margin-right: auto !important; 
    margin-left: -1.5rem !important; 
}

body #quarto-header .navbar-brand {
    font-family: 'Cinzel', serif !important;
    font-weight: 600 !important;
    font-size: 1.45rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    position: relative;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: linear-gradient(
        110deg, 
        rgba(248, 250, 252, 0.5) 0%, 
        rgba(248, 250, 252, 0.5) 40%, 
        rgba(255, 255, 255, 1) 48%, 
        rgba(0, 229, 255, 0.9) 50%, 
        rgba(255, 255, 255, 1) 52%, 
        rgba(248, 250, 252, 0.5) 60%, 
        rgba(248, 250, 252, 0.5) 100%
    );
    background-size: 250% auto;
    color: transparent !important;
    -webkit-background-clip: text;
    background-clip: text;
    animation: specularGlint 6s cubic-bezier(0.25, 1, 0.5, 1) infinite;
    will-change: transform, filter; 
}

@keyframes specularGlint {
    0% { background-position: 250% center; filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.05)); }
    15% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 30px rgba(0, 229, 255, 0.3)); }
    30%, 100% { background-position: -50% center; filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.05)); }
}

body #quarto-header .navbar-brand:hover {
    letter-spacing: 0.22em !important;
    text-shadow: 0 0 35px rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.02) translateZ(10px) !important;
}

/* Kinetic Absorption on Click */
body #quarto-header .navbar-brand:active {
    transform: scale(0.96) translateZ(0) !important;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 2. OPTICAL LEFT-SHIFT CORRECTION FOR TABS */
body #quarto-header #navbarCollapse, 
body #quarto-header .navbar-collapse {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    width: 100% !important;
    align-items: center !important;
}

body #quarto-header ul.navbar-nav:not(.ms-auto) {
    position: absolute !important;
    left: 50% !important;
    /* THE APEX OPTICAL CORRECTION SCALAR: Perfectly shifts tabs to counterweight the right icons */
    transform: translateX(calc(-50% - 4.5rem)) !important; 
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 3.5rem !important; 
    transform-style: preserve-3d !important;
}

body #quarto-header .nav-item {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* KINETIC NAV LINKS - VOLUMETRIC TYPOGRAPHY */
body #quarto-header .nav-link {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 300 !important;
    color: rgba(248, 250, 252, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3em !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
    position: relative;
    z-index: 1;
    will-change: transform, text-shadow; 
}

/* THE AFFINE TRANSFORMATION: TRUE GEOMETRIC DIAMOND */
body #quarto-header .nav-link::after {
    content: ''; 
    position: absolute; 
    bottom: -10px; 
    left: 50%; 
    transform: translateX(-50%) scaleX(0) scaleY(0) rotate(45deg) translateZ(0);
    width: 10px; 
    height: 10px;
    background: #ffffff;
    box-shadow: 0 0 10px #ffffff, 0 0 20px #ffffff;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
    opacity: 0;
    border-radius: 1px;
}

body #quarto-header .nav-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(6) scaleY(0.15) rotate(45deg) translateZ(0);
}

body #quarto-header .nav-link:hover {
    color: #ffffff !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8) !important;
    letter-spacing: 0.35em !important;
    transform: translateY(-2px) scale(1.05) translateZ(15px) !important;
}

/* Kinetic Absorption on Click */
body #quarto-header .nav-link:active {
    transform: scale(0.96) translateZ(0) !important;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4) !important;
}

/* THE ACTIVE NODE: PULSING GEOMETRIC BREATH */
body #quarto-header .nav-link.active {
    color: #ffffff !important;
    font-weight: 400 !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8) !important;
    letter-spacing: 0.35em !important;
    transform: scale(1.05) translateZ(10px) !important;
}

body #quarto-header .nav-link.active::after {
    opacity: 1;
    animation: trueDiamondBreath 3s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes trueDiamondBreath {
    0% { 
        transform: translateX(-50%) scaleX(5) scaleY(0.12) rotate(45deg) translateZ(0); 
        opacity: 0.6; 
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.4); 
    }
    100% { 
        transform: translateX(-50%) scaleX(8) scaleY(0.18) rotate(45deg) translateZ(0); 
        opacity: 1; 
        box-shadow: 0 0 20px #ffffff, 0 0 35px rgba(255, 255, 255, 0.8); 
    }
}

/* ==========================================
   3. ISOMORPHIC SEARCH & SOCIAL CLUSTER
   ========================================== */
body #quarto-header ul.navbar-nav.ms-auto {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin: 0 !important;
    margin-left: auto !important;
    padding: 0 !important;
    gap: var(--spatial-x) !important; 
    transform-style: preserve-3d !important;
}

/* Strict Euclidean Equivalence */
body #quarto-header #quarto-search {
    margin: 0 0 0 var(--spatial-x) !important; 
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body #quarto-header #quarto-search-trigger {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: transparent !important;
}

/* Unified Icon Topology */
body #quarto-header .navbar-nav .bi,
body #quarto-header #quarto-search-trigger .bi-search {
    color: rgba(248, 250, 252, 0.4) !important;
    font-size: 1.15rem !important; 
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
    transform-origin: center center !important;
    will-change: transform, filter; 
}

/* Spatial Z-Axis Depth Injection on Hover */
body #quarto-header .navbar-nav .bi:hover,
body #quarto-header #quarto-search-trigger:hover .bi-search {
    color: #ffffff !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.15) translateY(-2px) translateZ(20px) !important;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* Kinetic Absorption on Click */
body #quarto-header .navbar-nav .bi:active,
body #quarto-header #quarto-search-trigger .bi-search:active {
    transform: scale(0.9) translateY(-1px) translateZ(0) !important;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ==========================================
   INSTITUTIONAL AFFILIATION PANEL
   ========================================== */
.usd-sponsor-panel {
    position: fixed; bottom: 40px; right: 40px; width: 240px;
    background: rgba(5, 5, 8, 0.6); border: 1px solid rgba(255, 255, 255, 0.03); 
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem; border-radius: 2px; backdrop-filter: blur(20px); z-index: 100;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); text-decoration: none; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.usd-sponsor-panel:hover { 
    border-left-color: var(--quant-pearl); transform: translateX(-5px); 
    background: rgba(10, 10, 15, 0.8); 
}
.usd-text-main { 
    color: #ffffff; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; 
    margin: 0 0 0.5rem 0; letter-spacing: 0.15em; font-family: 'Cinzel', serif; 
}
.usd-text-sub { 
    color: var(--quant-slate); font-size: 0.65rem; text-transform: uppercase; 
    margin: 0; font-family: 'Inter', sans-serif; letter-spacing: 0.2em; font-weight: 400;
}

/* ==========================================
   HOME PAGE (INDEX.QMD) CORE MATRICES
   ========================================== */
.hero-container { 
    text-align: center; 
    max-width: 1000px; 
    margin: 14rem auto 4rem; 
    position: relative; 
    z-index: 10; 
    pointer-events: none; 
}
.hero-container h1 { 
    font-family: 'Cinzel', serif; font-weight: 700; font-size: 5rem; 
    letter-spacing: 0.05em; color: #ffffff; text-transform: uppercase; 
    margin-bottom: 1.5rem; text-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 40px rgba(255,255,255,0.1); 
}
.hero-container h2 { 
    font-family: 'Inter', sans-serif; color: var(--quant-slate); font-size: 1.2rem; 
    font-weight: 300; letter-spacing: 0.3em; text-transform: uppercase; margin-top: 0; 
}
.hero-container p { 
    font-family: 'Inter', sans-serif; font-size: 1.15rem; font-weight: 300; 
    color: #94a3b8; line-height: 2; margin-top: 3rem; pointer-events: auto; 
    max-width: 800px; margin-left: auto; margin-right: auto;
}

/* ==========================================
   HOME PAGE: TELEMETRY & STACK
   ========================================== */
.telemetry-panel {
    max-width: 1100px; margin: 0 auto 6rem; padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05); border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--quant-slate); font-weight: 400;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 4rem; letter-spacing: 0.2em;
    position: relative; z-index: 10; background: transparent;
}
.telemetry-node { color: #ffffff; font-weight: 400; margin-left: 0.8rem; }

.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 3rem; max-width: 1300px; margin: 0 auto 8rem; position: relative; z-index: 10; pointer-events: auto;}

.card-quant {
    background: rgba(5, 5, 8, 0.4); border: 1px solid rgba(255, 255, 255, 0.03); border-radius: 2px; padding: 4rem 3.5rem;
    backdrop-filter: blur(30px); box-shadow: 0 20px 50px rgba(0,0,0,0.5); 
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-quant:hover { 
    transform: translateY(-10px); 
    background: rgba(10, 10, 15, 0.6);
    border-color: rgba(255, 255, 255, 0.1); 
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 255, 255, 0.05); 
}
.card-quant h3 { font-family: 'Cinzel', serif; font-size: 1.4rem; letter-spacing: 0.1em; font-weight: 600; color: #ffffff; text-transform: uppercase; margin-top: 0; }
.card-quant p { font-family: 'Inter', sans-serif; font-weight: 300; color: #94a3b8; line-height: 1.9; margin: 2rem 0 3rem; font-size: 1rem; }

.btn-quant {
    display: inline-block; background: transparent; color: #ffffff !important; border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.2rem 2.5rem; border-radius: 2px; font-weight: 400; text-decoration: none; text-transform: uppercase; 
    letter-spacing: 0.25em; font-size: 0.75rem; transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); font-family: 'Inter', sans-serif;
}
.btn-quant:hover { background: #ffffff; color: #000000 !important; box-shadow: 0 0 30px rgba(255, 255, 255, 0.3); transform: scale(1.02); }

/* ==========================================
   THEORETICAL CORE COMPETENCIES MATRIX
   ========================================== */
.stack-matrix {
    max-width: 1300px; margin: 0 auto 10rem; position: relative; z-index: 10;
    background: rgba(4, 4, 6, 0.5); border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 6rem 5rem;
    backdrop-filter: blur(40px); box-shadow: 0 30px 80px rgba(0,0,0,0.6); border-radius: 2px;
}

.stack-matrix h3 {
    font-family: 'Cinzel', serif; font-size: 1.8rem; font-weight: 600; color: #ffffff;
    text-transform: uppercase; margin-top: 0; margin-bottom: 5rem; letter-spacing: 0.15em; text-align: center;
}

.stack-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 5rem 4rem;
}

.stack-item {
    border-left: 1px solid rgba(255, 255, 255, 0.1); padding-left: 2.5rem; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stack-item:hover { border-left-color: rgba(255, 255, 255, 0.5); transform: translateX(5px); }

.stack-item h4 {
    color: #ffffff; font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 500;
    margin: 0 0 1.5rem 0; text-transform: uppercase; letter-spacing: 0.2em; line-height: 1.6;
}

.stack-item p { font-family: 'Inter', sans-serif; font-weight: 300; color: #64748b; font-size: 1rem; line-height: 1.9; margin: 0 0 2rem 0; }

.stack-item .definition {
    background: rgba(255, 255, 255, 0.02); padding: 2rem; border-radius: 2px;
    font-family: 'Inter', sans-serif; font-weight: 300; color: #94a3b8; font-size: 0.95rem;
    line-height: 1.8; margin-top: 2rem; border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.stack-item .def-title {
    color: #ffffff; font-weight: 500; font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem; display: block; margin-bottom: 1rem; letter-spacing: 0.15em; text-transform: uppercase;
}