:root {
      --bg: #FAFAFA;
      --surface: #FFFFFF;
      --text: #111827;
      --text-muted: #6B7280;
      --border: #E5E7EB;
      --border-hover: #D1D5DB;
      --accent: #000000;
      --modal-bg: rgba(255, 255, 255, 0.8);
      --spotlight: rgba(0, 0, 0, 0.05);
      --search-bg: rgba(0, 0, 0, 0.04);
      
      --font-sans: 'Inter', system-ui, sans-serif;
      --font-mono: 'JetBrains Mono', monospace;
    }

    :root[data-theme="dark"], body[data-theme="dark"], [data-theme="dark"] {
      --bg: #0A0A0A;
      --surface: #121212;
      --text: #F3F4F6;
      --text-muted: #9CA3AF;
      --border: #262626;
      --border-hover: #404040;
      --accent: #FFFFFF;
      --modal-bg: rgba(18, 18, 18, 0.8);
      --spotlight: rgba(255, 255, 255, 0.1);
      --search-bg: rgba(255, 255, 255, 0.03);
    }

    /* ── RETRO CRT HACKER MODE (EASTER EGG) ── */
    body.crt-mode {
      --bg: transparent; --surface: rgba(0,17,0,0.5); --text: #00FF41; --text-muted: #008F11;
      --border: #00FF41; --border-hover: #00FF41; --accent: #00FF41;
      --modal-bg: rgba(0, 17, 0, 0.9); --font-sans: var(--font-mono);
      text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    }
    body.crt-mode::after {
      content: " "; display: block; position: fixed; top: 0; left: 0; bottom: 0; right: 0;
      background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
      z-index: 99999; background-size: 100% 2px, 3px 100%; pointer-events: none;
    }
    #matrixCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; background: #000; display: none; }
    body.crt-mode #matrixCanvas { display: block; }

    * { margin: 0; padding: 0; box-sizing: border-box; cursor: none !important; }
    
    ::selection { background: var(--accent); color: var(--bg); }
    ::-moz-selection { background: var(--accent); color: var(--bg); }
    
    html { cursor: none; }
    
    body {
      background-color: var(--bg);
      color: var(--text);
      font-family: var(--font-sans);
      cursor: none;
      min-height: 100vh;
      overflow-x: hidden;
    }
    
    a, button, .magnetic, .cmd-item, input { cursor: none !important; }
    
    .theme-transition, .theme-transition * {
      transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), fill 0.5s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    ::view-transition-old(root),
    ::view-transition-new(root) {
      animation: none;
      mix-blend-mode: normal;
    }
    ::view-transition-old(root) { z-index: 1; }
    ::view-transition-new(root) { z-index: 9999; }
    
    /* Hide default scrollbar because we use a custom one (Lenis) */
    ::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }
    * { -ms-overflow-style: none !important; scrollbar-width: none !important; }

    /* Center sections in viewport when navigating via hash */
    #about, #metrics, #projects, #securePanel, #contributions, .article-content h2, .article-content h3 {
      scroll-margin-top: calc(50vh - 100px);
    }

    /* ── SELECTION ── */
    ::selection { background: var(--text); color: var(--bg); }
    ::-moz-selection { background: var(--text); color: var(--bg); }
    
    #matrixCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; background: #000; display: none; }
    body.crt-mode #matrixCanvas { display: block; }

    /* ── CONTEXT MENU ── */
    .context-menu {
      position: fixed; background: rgba(20,20,20,0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      border: 1px solid var(--border); border-radius: 8px; padding: 8px; width: 220px;
      box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 9999999;
      transform: scale(0.95); opacity: 0; pointer-events: none; transition: 0.1s;
    }
    .context-menu.active { transform: scale(1); opacity: 1; pointer-events: auto; }
    .ctx-item {
      padding: 10px 12px; border-radius: 6px; display: flex; align-items: center; gap: 8px;
      font-size: 13px; color: var(--text); cursor: none !important; transition: background 0.1s;
    }
    .ctx-item:hover { background: rgba(255,255,255,0.1); }
    .ctx-kbd { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }

    /* ── COMMAND PALETTE MODAL ── */
    .cmd-overlay {
      position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
      display: flex; justify-content: center; align-items: flex-start; padding-top: 15vh; z-index: 100000;
      opacity: 0; pointer-events: none; transition: opacity 0.2s;
    }
    .cmd-overlay.active { opacity: 1; pointer-events: auto; }
    .cmd-palette {
      width: 100%; max-width: 600px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.4); transform: scale(0.95) translateY(-10px); opacity: 0; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex; flex-direction: column; overflow: hidden;
    }
    .cmd-overlay.active .cmd-palette { transform: scale(1) translateY(0); opacity: 1; }
    .cmd-header {
      display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 12px;
    }
    .cmd-header svg { color: var(--text-muted); }
    .cmd-header input {
      flex: 1; background: transparent; border: none; color: var(--text); font-size: 16px; outline: none; font-family: var(--font-sans);
    }
    .cmd-esc { font-family: var(--font-mono); font-size: 10px; padding: 4px 8px; background: rgba(255,255,255,0.1); border-radius: 4px; color: var(--text-muted); }
    .cmd-body { max-height: 400px; overflow-y: auto; padding: 8px; }
    .cmd-group { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; padding: 12px 12px 4px 12px; letter-spacing: 0.05em; }
    .cmd-item {
      display: flex; align-items: center; padding: 12px; border-radius: 8px; color: var(--text); font-size: 14px; text-decoration: none; cursor: none; gap: 12px; transition: background 0.2s;
    }
    .cmd-item:hover, .cmd-item.selected { background: rgba(255,255,255,0.05); }
    .cmd-item svg { color: var(--text-muted); }
    body[data-theme="light"] .cmd-item:hover, body[data-theme="light"] .cmd-item.selected { background: rgba(0,0,0,0.05); }
    body[data-theme="light"] .cmd-esc { background: rgba(0,0,0,0.1); }

    /* ── SYSTEM DIAGNOSTICS PANEL ── */
    .diag-panel {
      position: fixed; top: 0; right: -400px; width: 380px; height: 100vh; background: var(--surface);
      border-left: 1px solid var(--border); box-shadow: -10px 0 30px rgba(0,0,0,0.3); z-index: 100000;
      transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column;
    }
    .diag-panel.active { right: 0; }
    .diag-header {
      padding: 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;
    }
    .diag-close {
      background: none; border: none; color: var(--text-muted); cursor: none; transition: color 0.2s; padding: 8px; margin: -8px;
    }
    .diag-close:hover { color: var(--text); }
    .diag-body { padding: 24px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; }
    .metric-value { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; color: var(--text); }
    .metric-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

    /* ── CUSTOM BAR CHART ── */
    .chart-container { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding: 24px; background: rgba(0,0,0,0.2); border-radius: 16px; border: 1px solid var(--border); box-shadow: inset 0 0 20px rgba(0,0,0,0.2); margin-top: 40px; }
    body[data-theme="light"] .chart-container { background: rgba(255,255,255,0.5); box-shadow: inset 0 0 20px rgba(0,0,0,0.05); }
    .chart-bar-wrapper { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; position: relative; }
    .chart-bar { width: 100%; background: linear-gradient(to top, rgba(16, 185, 129, 0.2), var(--accent)); border-radius: 4px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; transition: height 1s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; cursor: crosshair; }
    .chart-bar:hover { filter: brightness(1.3); }
    .chart-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
    .chart-tooltip { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); padding: 4px 8px; border-radius: 4px; font-family: var(--font-mono); font-size: 11px; opacity: 0; pointer-events: none; transition: opacity 0.2s; white-space: nowrap; z-index: 10; color: var(--accent); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
    .chart-bar:hover .chart-tooltip { opacity: 1; }

    .diag-metric { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .diag-metric-label { width: 100%; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
    .diag-bar-container { flex: 1; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
    body[data-theme="light"] .diag-bar-container { background: rgba(0,0,0,0.1); }
    .diag-bar { height: 100%; background: var(--accent); transition: width 0.5s ease-out; }
    .diag-val { font-family: var(--font-mono); font-size: 14px; font-weight: 700; width: 48px; text-align: right; }
    .diag-log {
      margin-top: auto; background: #000; border: 1px solid var(--border); border-radius: 8px; padding: 16px;
      font-family: var(--font-mono); font-size: 11px; color: #10B981; max-height: 200px; overflow-y: auto;
      display: flex; flex-direction: column; gap: 4px; box-shadow: inset 0 0 20px rgba(16,185,129,0.1);
    }
    body[data-theme="light"] .diag-log { background: #111; color: #10B981; border-color: rgba(255,255,255,0.1); }

    /* ── FAB BUTTON ── */
    .fab-btn {
      position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px; border-radius: 50%;
      background: var(--text); color: var(--bg); border: none; font-size: 20px;
      display: flex; justify-content: center; align-items: center; z-index: 9999;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3); opacity: 0; transform: translateY(20px); pointer-events: none;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .fab-btn.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .fab-btn:hover { background: var(--text-muted); }

    /* ── RIPPLE EFFECT ── */
    .ripple {
      position: fixed; border-radius: 50%; border: 1px solid var(--accent); z-index: 99999;
      pointer-events: none; opacity: 1; transform: translate(-50%, -50%) scale(0);
      animation: rippleAnim 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    body[data-theme="light"] .ripple { border-color: var(--text); }
    @keyframes rippleAnim {
      100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
    }

    /* ── PAGE TRANSITION LOADER ── */
    #pageTransition {
      position: fixed; top: 0; left: 0; width: 100vw; height: 3px;
      background: linear-gradient(90deg, #10B981, #3B82F6, #10B981); background-size: 200%;
      z-index: 999999; transform-origin: left; transform: scaleX(0); opacity: 0;
      transition: opacity 0.3s, transform 0.1s; pointer-events: none;
      animation: gradientShift 2s linear infinite;
    }
    @keyframes gradientShift { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

    /* ── CUSTOM CURSOR ── */
    #cursor-dot, #cursor-ring {
      position: fixed; top: 0; left: 0; transform: translate(-50%, -50%);
      border-radius: 50%; pointer-events: none; z-index: 9999999;
    }
    #cursor-dot {
      width: 6px; height: 6px; background: var(--accent);
      box-shadow: 0 0 10px var(--accent);
      transition: width 0.2s, height 0.2s, background-color 0.2s;
    }
    #cursor-ring {
      display: none !important;
    }
    body.hover-active #cursor-dot { width: 40px; height: 40px; background: rgba(16, 185, 129, 0.1); }
    body.hover-active #cursor-ring { width: 50px; height: 50px; border-color: rgba(16, 185, 129, 0.8); }
    
    @media (hover: none) { #cursor-dot, #cursor-ring { display: none; } }
    
    html { cursor: none; }
    a, button, .magnetic, .cmd-item { cursor: none; }

    /* ── TRANSMISSION PING ── */
    .comms-ping {
      position: fixed; bottom: 120px; left: -300px; width: 280px; background: rgba(0,0,0,0.8);
      border: 1px solid var(--accent); border-left: 4px solid var(--accent); border-radius: 8px;
      padding: 16px; display: flex; align-items: flex-start; gap: 12px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 15px rgba(16,185,129,0.2);
      backdrop-filter: blur(10px); z-index: 99999;
      transition: left 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    body[data-theme="light"] .comms-ping { background: rgba(255,255,255,0.9); }
    .comms-ping.show { left: 20px; }
    .comms-icon { width: 32px; height: 32px; flex-shrink: 0; color: var(--accent); animation: pulse 2s infinite; }
    .comms-content { flex: 1; }
    .comms-title { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 4px; display: flex; justify-content: space-between; }
    .comms-title span.time { color: var(--text-muted); }
    .comms-text { font-size: 13px; color: var(--text); line-height: 1.4; font-family: var(--font-sans); }

    .container { width: 100%; min-height: 100vh; position: relative; transition: opacity 0.5s; }
    .container.hidden { opacity: 0; pointer-events: none; }
    
    /* ── CRAZY ANIMATIONS ── */
    @keyframes glitch {
      0% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 2px); }
      20% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
      40% { clip-path: inset(30% 0 20% 0); transform: translate(-2px, 0); }
      60% { clip-path: inset(50% 0 30% 0); transform: translate(2px, 2px); }
      80% { clip-path: inset(10% 0 60% 0); transform: translate(-1px, -1px); }
      100% { clip-path: inset(40% 0 10% 0); transform: translate(1px, 1px); }
    }
    .glitch-hover { position: relative; display: inline-block; }
    .glitch-hover::before, .glitch-hover::after {
      content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
      background: var(--bg); opacity: 0; pointer-events: none;
    }
    .glitch-hover:hover::before {
      left: 2px; text-shadow: -1px 0 red; opacity: 1; animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    }
    .glitch-hover:hover::after {
      left: -2px; text-shadow: -1px 0 blue; opacity: 1; animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite reverse;
    }
    
    /* ── SMOOTH SCROLL REVEAL ── */
    .reveal-on-scroll {
      transform: translateY(20px);
      transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    .reveal-visible {
      transform: translateY(0) !important;
      opacity: 1;
    }

    .noise-bg {
      position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.4; mix-blend-mode: overlay;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    }

    /* Old cursor elements removed */

    /* ── MAGNETIC EFFECT ── */
    .magnetic { display: inline-block; transition: transform 0.1s cubic-bezier(0.1, 0.5, 0.1, 1); }

    /* ── SCROLL TO TOP FAB ── */
    #fabTop {
      position: fixed; bottom: 40px; right: 40px; width: 48px; height: 48px;
      border-radius: 50%; background: var(--modal-bg); border: 1px solid var(--border);
      color: var(--text); display: flex; align-items: center; justify-content: center;
      box-shadow: 0 10px 20px rgba(0,0,0,0.1); backdrop-filter: blur(10px);
      z-index: 900; opacity: 0; pointer-events: none; transform: translateY(20px); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #fabTop.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
    #fabTop:hover { background: var(--text); color: var(--bg); transform: translateY(-4px); }

    /* ── PROGRESS BAR ── */
    #progressBar {
      position: fixed; top: 0; left: 0; height: 3px; background: var(--text); z-index: 1000;
      width: 0%; transition: width 0.1s ease-out, opacity 0.3s; opacity: 0;
    }

    /* ── TOAST NOTIFICATION ── */
    #toast {
      position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-100px) scale(0.9);
      background: var(--text); color: var(--bg); padding: 12px 24px; border-radius: 100px;
      font-family: var(--font-sans); font-size: 14px; font-weight: 500;
      display: flex; align-items: center; gap: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.2);
      z-index: 9999; opacity: 0; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: none;
    }
    #toast.show { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }

    /* ── CUSTOM CONTEXT MENU ── */
    #contextMenu {
      position: absolute; background: var(--modal-bg); border: 1px solid var(--border);
      border-radius: 12px; padding: 8px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); backdrop-filter: blur(20px);
      z-index: 9999; opacity: 0; pointer-events: none; transform: scale(0.95); transition: opacity 0.1s, transform 0.1s;
      min-width: 200px;
    }
    #contextMenu.active { opacity: 1; pointer-events: auto; transform: scale(1); }
    .ctx-item {
      padding: 10px 12px; border-radius: 6px; display: flex; align-items: center; gap: 12px;
      font-size: 13px; color: var(--text); transition: background 0.2s;
    }
    .ctx-item:hover { background: rgba(128,128,128,0.15); }
    .ctx-kbd { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }

    .brand-base { font-family: var(--font-mono); font-weight: 700; color: var(--text); }
    .brand-accent { color: var(--text-muted); }

    /* ── PARALLAX BACKGROUND ── */
    .parallax-bg {
      position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none;
      background: radial-gradient(circle at 50% 50%, rgba(30,58,138,0.05), transparent 60%);
      opacity: 0.5; transition: transform 0.1s ease-out;
    }
    body[data-theme="light"] .parallax-bg {
      background: radial-gradient(circle at 50% 50%, rgba(37,99,235,0.08), transparent 60%);
    }

    @keyframes glitch {
      0% { transform: translate(0) }
      20% { transform: translate(-5px, 5px) }
      40% { transform: translate(-5px, -5px) }
      60% { transform: translate(5px, 5px) }
      80% { transform: translate(5px, -5px) }
      100% { transform: translate(0) }
    }

    /* ── STARTUP LOADER ── */
    .startup-loader {
      position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #000; z-index: 99999;
      display: flex; justify-content: center; align-items: center; transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.8s;
    }
    .startup-loader.hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
    .startup-content { width: 300px; display: flex; flex-direction: column; gap: 12px; }
    .startup-brand { font-family: var(--font-mono); font-weight: 700; font-size: 24px; color: #fff; letter-spacing: 0.1em; }
    .startup-progress-bar { width: 100%; height: 2px; background: #333; overflow: hidden; position: relative; }
    .startup-progress-fill { position: absolute; top: 0; left: 0; height: 100%; background: #10B981; width: 0%; transition: width 0.1s linear; }
    .startup-text { font-family: var(--font-mono); font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.05em; }

    /* ── CRT HACKER MODE ── */
    body.crt-mode {
      animation: crtFlicker 0.15s infinite;
      text-shadow: 2px 0 0 red, -2px 0 0 blue;
    }
    body.crt-mode::after {
      content: "";
      position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
      background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
      background-size: 100% 2px, 3px 100%;
      pointer-events: none; z-index: 999999;
    }
    @keyframes crtFlicker {
      0% { opacity: 1; }
      50% { opacity: 0.95; }
      100% { opacity: 1; }
    }

    /* ── FILM GRAIN / NOISE ── */
    body::before {
      content: "";
      position: fixed;
      top: 0; left: 0; width: 100vw; height: 100vh;
      pointer-events: none; z-index: 9999;
      opacity: 0.04;
      background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    }
    body[data-theme="light"]::before { opacity: 0.08; }

    /* ── UTILITIES ── */
    .container { max-width: 1200px; margin: 0 auto; padding: 40px 32px; transition: opacity 0.3s; }
    .container.hidden { opacity: 0; pointer-events: none; }

    header { margin-bottom: 32px; display: flex; flex-direction: column; gap: 12px; }
    .nav-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
    @keyframes shine { to { background-position: 200% center; } }
    .brand { display: flex; align-items: baseline; font-family: var(--font-mono); font-size: 16px; letter-spacing: -0.05em; position: relative; z-index: 2; flex-wrap: wrap; }
    .brand-base { 
      color: var(--text);
      font-weight: 700;
    }
    .brand-sep { color: var(--text-muted); font-weight: 300; }
    .brand-path { color: #3b82f6; font-weight: 600; }
    
    .header-actions { display: flex; gap: 12px; align-items: center; }
    
    /* ── TOP NAV BUTTONS ── */
    .top-nav-btn {
      display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px;
      padding: 6px 12px; border-radius: 6px; border: 1px solid var(--border); background: transparent;
      color: var(--text-muted); text-decoration: none; transition: all 0.2s; cursor: pointer;
    }
    .top-nav-btn:hover { border-color: var(--text); color: var(--text); }
    .top-nav-btn.primary { border-color: rgba(59, 130, 246, 0.3); color: #3b82f6; }
    .top-nav-btn.primary:hover { border-color: #3b82f6; box-shadow: 0 0 15px rgba(59, 130, 246, 0.15); }
    .secure-transmission { border-color: rgba(16, 185, 129, 0.3) !important; color: #10B981 !important; text-shadow: 0 0 8px rgba(16, 185, 129, 0.4); text-transform: uppercase !important; font-weight: 600; letter-spacing: 0.05em; }
    .secure-transmission:hover { border-color: #10B981 !important; box-shadow: 0 0 15px rgba(16, 185, 129, 0.3); color: #34d399 !important; }
    .top-nav-btn svg { width: 14px; height: 14px; }
    
    @keyframes pulseBar {
      0%, 100% { opacity: 0.5; box-shadow: 0 0 10px #8b5cf6; background: #8b5cf6; }
      50% { opacity: 1; box-shadow: 0 0 40px #3b82f6, 0 0 80px #3b82f6; background: #3b82f6; }
    }
    .top-glow-bar {
      position: fixed; top: 0; left: 0; width: 0%; height: 2px;
      z-index: 999999;
      animation: pulseBar 3s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* ── WIKI HERO MONOLITHS ── */
    .hero-wiki-wrapper { margin: 20px 0 60px 0; perspective: 1000px; display: flex; flex-direction: column; align-items: center; }
    .hero-wiki { display: flex; justify-content: center; align-items: center; height: 460px; width: 100%; max-width: 800px; gap: 0; }
    .wiki-box {
      flex: 1; height: 320px; position: relative;
      background: #050505; border: 1px solid #1a1a1a;
      display: flex; justify-content: center; align-items: center;
      transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
      cursor: none; overflow: hidden;
    }
    .wiki-box:nth-child(odd) { margin-top: 80px; }
    .wiki-box:nth-child(even) { margin-top: -80px; }
    .wiki-box:not(:last-child) { border-right: none; }
    body[data-theme="light"] .wiki-box { background: #ffffff; border-color: #cbd5e1; box-shadow: 0 8px 16px rgba(0,0,0,0.06); }
    
    .wiki-box:hover {
      scale: 1.1 1.08;
      z-index: 10 !important; box-shadow: 0 40px 80px rgba(0,0,0,0.6); border: 1px solid #333;
    }
    body[data-theme="light"] .wiki-box:hover { box-shadow: 0 40px 80px rgba(0,0,0,0.1); border-color: #ccc; }

    .wiki-letter {
      font-size: 110px; font-weight: 700; line-height: 1; color: #fff; opacity: 0.8;
      font-family: var(--font-sans); transition: all 0.5s; z-index: 2; pointer-events: none;
    }
    body[data-theme="light"] .wiki-letter { color: #000; }
    
    .wiki-box:hover .wiki-letter {
      transform: scale(1.15) translateY(-5px); opacity: 1; text-shadow: 0 10px 30px rgba(255,255,255,0.4);
    }
    @keyframes wikiGlitch {
      0%, 100% { transform: translate(0); text-shadow: 0 10px 30px rgba(255,255,255,0.4); }
      25% { transform: translate(-3px, 2px); text-shadow: -3px 0 red, 3px 0 cyan; }
      50% { transform: translate(3px, -2px); text-shadow: 3px 0 cyan, -3px 0 red; }
      75% { transform: translate(-3px, -2px); text-shadow: -3px 0 red, 3px 0 cyan; }
    }
    .wiki-box:hover .wiki-letter { 
      transform: scale(1.15) translateY(-5px); opacity: 1;
      animation: wikiGlitch 0.2s infinite;
    }
    body[data-theme="light"] .wiki-box:hover .wiki-letter { animation: wikiGlitch 0.2s infinite; }

    .wiki-box-bg {
      position: absolute; inset: 0; opacity: 0.2; z-index: 1; pointer-events: none; transition: opacity 0.5s;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
      mix-blend-mode: overlay;
    }
    .wiki-box:hover .wiki-box-bg { opacity: 0.5; }
    
    @keyframes floatZeroG {
      0%, 100% { transform: translateY(0) rotate(0deg); }
      25% { transform: translateY(-5px) rotate(1deg); }
      75% { transform: translateY(5px) rotate(-1deg); }
    }
    
    .wiki-box { animation: floatZeroG 6s ease-in-out infinite; }
    .wiki-box:nth-child(1) { animation-delay: 0s; }
    .wiki-box:nth-child(2) { animation-delay: 1.5s; }
    .wiki-box:nth-child(3) { animation-delay: 3s; }
    .wiki-box:nth-child(4) { animation-delay: 4.5s; }

    .lead { font-size: 16px; color: var(--text-muted); max-width: 600px; text-align: center; margin-top: 40px; }

    /* ── SEARCH TRIGGER BUTTON ── */
    .search-trigger {
      width: 100%; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
      border-radius: 8px; color: var(--text-muted); font-family: var(--font-sans); font-size: 14px;
      text-align: left; display: flex; align-items: center; gap: 12px;
      transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.02); margin-bottom: 40px;
    }
    .search-trigger:hover { border-color: var(--text); color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
    .search-trigger .kbd { margin-left: auto; font-family: var(--font-mono); font-size: 11px; background: var(--bg); border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; }

    /* ── FILTERS ── */
    .filters { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
    .filter-btn {
      background: none; border: 1px solid var(--border); color: var(--text-muted); padding: 6px 12px;
      border-radius: 100px; font-size: 13px; font-weight: 500; transition: all 0.2s;
    }
    .filter-btn:hover { border-color: var(--text-muted); color: var(--text); }
    .filter-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }
    .filter-animate { transform: translateY(-20px); }
    .filters.reveal-visible .filter-animate { animation: dropMetric 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

    /* ── GRID SYSTEM WITH 3D TILT CARDS ── */
    .grid { 
      display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px;
      position: relative; perspective: 1000px;
    }
    .grid::before {
      display: none !important;
    }
    
    /* ── ENHANCED ANIMATIONS ── */
    @keyframes floatWiki {
      0%, 100% { transform: translateY(0) rotateX(0) rotateY(0); }
      25% { transform: translateY(-10px) rotateX(5deg) rotateY(2deg); }
      75% { transform: translateY(10px) rotateX(-5deg) rotateY(-2deg); }
    }
    .wiki-box:nth-child(1) { animation: floatWiki 6s ease-in-out infinite; }
    .wiki-box:nth-child(2) { animation: floatWiki 7s ease-in-out infinite 0.5s; }
    .wiki-box:nth-child(3) { animation: floatWiki 6.5s ease-in-out infinite 1s; }
    .wiki-box:nth-child(4) { animation: floatWiki 7.5s ease-in-out infinite 1.5s; }

    @keyframes borderPulse {
      0%, 100% { border-color: var(--border); box-shadow: 0 0 0 rgba(0,0,0,0); }
      50% { border-color: rgba(99, 102, 241, 0.4); box-shadow: 0 0 20px rgba(99, 102, 241, 0.1); }
    }
    
    .card {
      position: relative; background: var(--surface); border: 1px solid var(--border);
      border-radius: 12px; padding: 24px; display: flex; flex-direction: column;
      text-decoration: none; color: var(--text); overflow: hidden;
      transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
      transform-style: preserve-3d;
      will-change: transform;
    }
    .card:hover { 
      border-color: var(--border-hover); 
    }
    
    /* Handled by GSAP now */
    @keyframes fadeUp { 
      0% { opacity: 0; transform: translateY(60px) scale(0.9) rotateX(-20deg); filter: blur(10px); }
      100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0); filter: blur(0); }
    }
    
    .card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
    .card-title { font-size: 16px; font-weight: 500; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); letter-spacing: -0.02em; }
    .card-arrow { transition: transform 0.2s; opacity: 0; transform: translateX(-10px); color: var(--text-muted); }
    .card:hover .card-arrow { opacity: 1; transform: translateX(0); }
    .badge {
      font-family: var(--font-mono); font-size: 11px; padding: 4px 8px; border-radius: 4px;
      background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); text-transform: capitalize;
    }
    .card-desc {
      font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px;
      display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
      transform: translateZ(20px);
    }
    .card-footer { margin-top: auto; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); transform: translateZ(10px); }

    /* Quick Peek Hover Modal */
    .peek-modal {
      position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%) translateY(10px) translateZ(50px);
      width: 320px; background: var(--modal-bg); border: 1px solid var(--border); border-radius: 8px;
      padding: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); backdrop-filter: blur(20px);
      opacity: 0; pointer-events: none; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 10; font-size: 13px; color: var(--text);
    }
    .card:hover .peek-modal.active { opacity: 1; transform: translateX(-50%) translateY(0) translateZ(50px); }
    .peek-title { font-weight: 600; margin-bottom: 8px; font-size: 14px; }
    .peek-content { color: var(--text-muted); line-height: 1.5; }

    /* ── COMMAND PALETTE (MODAL) ── */
    #cmdkModal {
      position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
      display: none; align-items: flex-start; justify-content: center; padding-top: 10vh; opacity: 0; transition: opacity 0.2s;
    }
    #cmdkModal.active { display: flex; opacity: 1; }
    .cmdk-content {
      width: 100%; max-width: 600px; background: var(--modal-bg); border: 1px solid var(--border);
      border-radius: 12px; box-shadow: 0 24px 48px rgba(0,0,0,0.2); overflow: hidden; backdrop-filter: blur(20px);
      transform: scale(0.95); transition: transform 0.2s;
    }
    #cmdkModal.active .cmdk-content { transform: scale(1); }
    .cmdk-input-wrapper { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
    .cmdk-input-wrapper svg { color: var(--text-muted); margin-right: 12px; }
    .cmdk-input-wrapper input { flex: 1; background: transparent; border: none; outline: none; font-size: 16px; color: var(--text); font-family: var(--font-sans); }
    .cmdk-results { max-height: 400px; overflow-y: auto; padding: 8px; }
    .cmdk-group-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; padding: 8px 16px; margin-top: 8px; letter-spacing: 0.05em; }
    .cmdk-item {
      display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 8px; text-decoration: none; color: inherit;
    }
    .cmdk-item.selected, .cmdk-item:hover { background: rgba(128,128,128,0.15); }
    .cmdk-item-title { font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 8px; }
    .cmdk-item-badge { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
    
    .fake-ai-log { padding: 12px 16px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); line-height: 1.8; }
    .fake-ai-log span { display: block; opacity: 0; animation: fadeUp 0.3s forwards; }

    /* ── ARTICLE SPA VIEWER ── */
    #articleView {
      position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 50; background: var(--bg); overflow-y: auto; overflow-x: hidden;
      transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #articleView.active { transform: translateX(0); }
    
    .article-layout {
      max-width: 1100px; margin: 0 auto; padding: 40px 16px;
      display: grid; grid-template-columns: 240px 1fr; gap: 32px;
    }
    @media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } .article-sidebar { display: none; } }
    
    .article-back {
      background: none; border: none; color: var(--text-muted); font-family: var(--font-sans); font-size: 14px;
      display: flex; align-items: center; gap: 8px; margin-bottom: 24px; transition: color 0.2s;
    }
    .article-back:hover { color: var(--text); }
    
    .breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; display: flex; gap: 8px; }
    .breadcrumbs span { color: var(--text); font-weight: 500; }
    
    .article-title { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 16px; font-variant-numeric: tabular-nums; }
    .article-meta { display: flex; gap: 12px; margin-bottom: 48px; border-bottom: 1px solid var(--border); padding-bottom: 24px; align-items: center; }
    
    .read-time { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-left: auto; }

    .article-content { font-size: 14px; color: var(--text); line-height: 1.8; position: relative; }
    .article-content p { margin-bottom: 24px; }
    .article-content h2 { margin-top: 48px; margin-bottom: 16px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; padding-top: 20px; }
    
    /* Highlight Share Tooltip */
    #shareTooltip {
      position: absolute; background: var(--text); color: var(--bg); font-family: var(--font-sans);
      font-size: 13px; font-weight: 500; padding: 8px 12px; border-radius: 6px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 100;
      transform: translate(-50%, -100%); margin-top: -10px; display: flex; align-items: center; gap: 6px;
    }
    #shareTooltip.active { opacity: 1; pointer-events: auto; }
    #shareTooltip::after {
      content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
      border-width: 6px; border-style: solid; border-color: var(--text) transparent transparent transparent;
    }

    /* Image Zoom Brick */
    .article-image {
      width: 100%; border-radius: 12px; border: 1px solid var(--border); margin: 32px 0;
      transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .article-image.zoomed {
      position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1.5);
      z-index: 2000; box-shadow: 0 40px 100px rgba(0,0,0,0.5);
      max-width: 80vw; max-height: 80vh; object-fit: contain;
    }
    .zoom-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 1999; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
    .zoom-overlay.active { opacity: 1; pointer-events: auto; }

    /* Code Blocks */
    .code-block-wrapper { position: relative; margin-bottom: 24px; }
    .code-block-wrapper pre {
      font-family: var(--font-mono); background: var(--surface); padding: 16px; border-radius: 8px;
      border: 1px solid var(--border); font-size: 13.5px; overflow-x: auto; margin: 0; color: var(--text);
    }
    .copy-btn {
      position: absolute; top: 8px; right: 8px; background: var(--bg); border: 1px solid var(--border);
      color: var(--text-muted); border-radius: 4px; padding: 4px 8px; font-size: 11px; font-family: var(--font-sans);
      opacity: 0; transition: opacity 0.2s, color 0.2s;
    }
    .code-block-wrapper:hover .copy-btn { opacity: 1; }
    .copy-btn:hover { color: var(--text); border-color: var(--text-muted); }

    /* Syntax Highlighting Colors */
    .hl-string { color: #10B981; }
    .hl-keyword { color: #3B82F6; font-weight: 500; }
    .hl-comment { color: #9CA3AF; font-style: italic; }
    .hl-punct { color: #EF4444; }

    /* Related Systems Brick */
    .related-systems { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); }
    .related-title { font-size: 18px; font-weight: 600; margin-bottom: 24px; }
    .related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

    /* Sticky TOC Sidebar - Cybernetic Style */
    .article-sidebar { position: sticky; top: 80px; height: max-content; padding-top: 10px; }
    .toc-title { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 16px; }
    .toc-divider { height: 1px; background: var(--border); margin-bottom: 32px; width: 100%; opacity: 0.5; }
    .toc-list { list-style: none; display: flex; flex-direction: column; gap: 20px; border-left: none; }
    .toc-link {
      font-family: var(--font-mono); color: var(--text-muted); text-decoration: none; font-size: 13px; transition: all 0.2s;
      display: flex; align-items: center; gap: 16px;
    }
    .toc-link::before {
      content: ''; display: block; height: 1px; width: 16px; background: var(--text-muted); transition: all 0.2s; opacity: 0.5;
    }
    .toc-link:hover { color: var(--text); }
    .toc-link:hover::before { width: 20px; background: var(--text); opacity: 0.8; }
    .toc-link.active { color: #3b82f6; font-weight: 400; }
    .toc-link.active::before { width: 32px; background: #3b82f6; opacity: 1; }

    /* Home Page Layout */
    .home-layout { display: flex; justify-content: space-between; width: 100%; align-items: flex-start; }
    @media (max-width: 900px) { .home-layout { flex-direction: column; } .home-sidebar { display: none; } }
    .home-sidebar { position: sticky; top: 120px; height: max-content; padding-top: 10px; width: 200px; transform: translateX(-40px); }
    .home-content { flex: 1; max-width: 800px; margin-left: 32px; }
    @media (max-width: 900px) { .home-content { margin-left: 0; } }
    .toc-link.active::before { width: 32px; background: #3b82f6; opacity: 1; }
    
    #about, #metrics, #projects, #research { scroll-margin-top: 40vh; }

    /* ── ACTIVITY GRAPH ── */
    .activity-section { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
    .activity-title { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 24px; }
    .activity-graph { display: grid; grid-template-columns: repeat(52, 1fr); gap: 4px; max-width: 100%; overflow-x: auto; padding-bottom: 16px; }
    .activity-col { display: flex; flex-direction: column; gap: 4px; }
    .activity-box { width: 10px; height: 10px; border-radius: 2px; background: var(--surface); border: 1px solid var(--border); }
    /* Handled by GSAP now */
    @keyframes dropBrick { 0% { transform: translateY(-20px) scale(0); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
    .activity-box.level-1 { background: #1e3a8a; border-color: #1e3a8a; } 
    .activity-box.level-2 { background: #2563eb; border-color: #2563eb; }
    .activity-box.level-3 { background: #60a5fa; border-color: #60a5fa; }
    .activity-box.level-4 { background: #93c5fd; border-color: #93c5fd; }
    
    [data-theme="light"] .activity-box.level-1 { background: #dbeafe; border-color: #dbeafe; }
    [data-theme="light"] .activity-box.level-2 { background: #93c5fd; border-color: #93c5fd; }
    [data-theme="light"] .activity-box.level-3 { background: #3b82f6; border-color: #3b82f6; }
    [data-theme="light"] .activity-box.level-4 { background: #1d4ed8; border-color: #1d4ed8; }

    /* ── METRICS SECTION ── */
    .metrics-section { display: grid; grid-template-columns: 240px 1fr; gap: 32px; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
    @media (max-width: 900px) { .metrics-section { grid-template-columns: 1fr; gap: 32px; } }
    .metrics-sidebar { display: flex; flex-direction: column; gap: 16px; }
    
    .metrics-profile { display: flex; align-items: center; gap: 24px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
    .metrics-profile::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: #3b82f6; }
    .metrics-avatar { position: relative; }
    .metrics-avatar img { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--border); object-fit: cover; }
    .metrics-info { flex: 1; min-width: 200px; }
    .metrics-name { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
    .metrics-name svg { color: #10B981; width: 16px; height: 16px; }
    .metrics-title-badge { font-family: var(--font-mono); font-size: 12px; color: #3b82f6; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
    
    .metrics-rating { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; }
    .rating-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 6px; }
    .rating-score { font-size: 24px; font-weight: 700; font-family: var(--font-mono); display: flex; align-items: center; gap: 12px; }
    .rating-score .tier { width: 32px; height: 32px; border-radius: 50%; background: #FEF08A; color: #854D0E; display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 0 15px rgba(253, 224, 71, 0.4); }
    body[data-theme="dark"] .rating-score .tier { background: #CA8A04; color: #FEF08A; }

    .metrics-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
    @media (max-width: 600px) { .metrics-stats-grid { grid-template-columns: 1fr; } }
    
    .metric-item { display: flex; flex-direction: column; gap: 8px; }
    .metric-animate { transform: translateY(-20px); }
    .metrics-section.reveal-visible .metric-animate { animation: dropMetric 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
    @keyframes dropMetric { 0% { transform: translateY(-30px) scale(0.95); opacity: 0; filter: blur(10px); } 100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); } }
    .metric-header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; }
    .metric-name { color: var(--text); }
    .metric-score { font-family: var(--font-mono); color: var(--text-muted); font-size: 12px; }
    .metric-bar { width: 100%; height: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
    .metric-fill { height: 100%; border-radius: 3px; }
    .metrics-section.reveal-visible .metric-fill { animation: fillBar 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
    @keyframes fillBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(0); } }

    /* ── ABOUT SECTION ── */
    .about-section { display: grid; grid-template-columns: 240px 1fr; gap: 32px; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
    @media (max-width: 900px) { .about-section { grid-template-columns: 1fr; gap: 32px; } }
    .about-label-wrapper { display: flex; flex-direction: column; gap: 16px; }
    .about-line { height: 2px; width: 64px; background: #3b82f6; }
    .about-title { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.15em; }
    .about-content { font-size: 13px; color: var(--text-muted); line-height: 1.8; }
    .about-content p { margin-bottom: 24px; }
    
    .about-animate { transform: translateY(-20px); }
    .about-section.reveal-visible .about-animate { animation: dropMetric 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

    /* ── FOOTER ── */
    .site-footer {
      margin-top: 120px; padding-bottom: 40px; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
    }
    .footer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
    .footer-tagline { margin-left: 12px; font-weight: 400; opacity: 0.6; color: var(--text-muted); }
    .footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
    .footer-link { color: var(--text-muted); text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color 0.2s; }
    .footer-link:hover { color: var(--text); }
    .footer-animate { transform: translateY(-20px); }
    .site-footer.reveal-visible .footer-animate { animation: dropMetric 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
    .footer-link svg { width: 12px; height: 12px; }
    .footer-divider { height: 1px; background: var(--border); margin-bottom: 24px; opacity: 0.5; }
    .footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; padding-right: 60px; }
    .footer-legal { display: flex; gap: 24px; flex-wrap: wrap; }
    .footer-copyright { max-width: 100%; word-wrap: break-word; line-height: 1.6; }

    /* ── TRANSMIT BUTTON ── */
    .transmit-btn {
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--border);
      color: var(--text);
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.25em;
      padding: 14px 40px;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
      position: relative;
      overflow: hidden;
      display: inline-block;
      text-transform: uppercase;
    }
    .transmit-btn::before {
      content: '';
      position: absolute;
      top: 0; left: 0; width: 100%; height: 100%;
      background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
      opacity: 0;
      transition: opacity 0.4s;
      z-index: -1;
    }
    .transmit-btn:hover {
      border-color: rgba(255, 255, 255, 0.5);
      color: #fff;
      transform: translateY(-2px);
      box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
    }
    .transmit-btn:hover::before {
      opacity: 1;
    }
    .transmit-btn:active {
      transform: translateY(1px);
    }
/* =========================================
   GLOBAL MOBILE RESPONSIVENESS FIXES
   ========================================= */
@media (max-width: 768px) {
  /* Container Padding */
  .container {
    padding: 20px 16px !important;
  }
  
  /* Navigation Wrapping */
  .nav-top {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }
  .brand {
    font-size: 20px !important;
  }
  .header-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* Grid Layouts */
  .related-grid, .metrics-stats-grid, .about-section, .metrics-section, .article-layout, .home-layout {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }
  
  /* Typography */
  h1 { font-size: 32px !important; }
  h2 { font-size: 24px !important; }
  
  /* Hide sidebars totally on small screens */
  .home-sidebar, .article-sidebar {
    display: none !important;
  }
  
  /* Make all panels max 100% width */
  .diag-panel {
    width: 100% !important;
    right: -100% !important;
  }
  .diag-panel.active {
    right: 0 !important;
  }
  
  /* Fix Chart overflows */
  .chart-container {
    overflow-x: auto;
    padding: 12px !important;
  }
  
  /* Ensure images never overflow */
  img, canvas {
    max-width: 100% !important;
  }
}
\n
/* --- KOKONUT CARD FLIP ANIMATION --- */
.kokonut-card-flip {
  perspective: 2000px;
  width: 100%;
  height: 320px;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.kokonut-card-flip:hover {
  border: none !important;
  box-shadow: none !important;
}
.kokonut-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}
.kokonut-card-flip:hover .kokonut-flip-inner {
  transform: rotateY(180deg);
}
.kokonut-flip-front, .kokonut-flip-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: box-shadow 0.5s ease;
  overflow: hidden;
}
.kokonut-card-flip:hover .kokonut-flip-front,
.kokonut-card-flip:hover .kokonut-flip-back {
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.kokonut-flip-back {
  transform: rotateY(180deg);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.kokonut-flip-feature {
  transform: translateX(-10px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
}
.kokonut-card-flip:hover .kokonut-flip-feature {
  transform: translateX(0);
  opacity: 1;
}

/* ── MOBILE RESPONSIVENESS FIXES ── */
@media (max-width: 768px) {
  .hero-wiki { height: auto; max-height: 250px; }
  .wiki-box { height: 180px; }
  .wiki-letter { font-size: 60px !important; }
  .wiki-box:nth-child(odd) { margin-top: 40px; }
  .wiki-box:nth-child(even) { margin-top: -40px; }
  
  .nav-top { flex-direction: column; gap: 16px; align-items: flex-start; padding-top: 20px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-start; }
  
  .grid { grid-template-columns: 1fr; }
  
  .metrics-profile { padding: 16px; flex-direction: column; align-items: flex-start; }
  .metrics-avatar img { width: 48px; height: 48px; }
  .metrics-rating { margin-left: 0; align-items: flex-start; margin-top: 16px; }
  
  .diag-panel { width: 100vw; right: -100vw; }
  
  .container { padding: 20px 16px; }
}

.kokonut-ring-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent);
}
.kokonut-ring {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 30px rgba(255, 165, 0, 0.5);
  animation: kokonutScale 3s linear infinite;
}
.kokonut-card-flip:hover .kokonut-ring {
  animation-duration: 2s;
}
@keyframes kokonutScale {
  0% { transform: scale(2); opacity: 0; box-shadow: 0 0 50px rgba(255, 165, 0, 0.5); }
  50% { transform: translateY(-5px) scale(1); opacity: 1; box-shadow: 0 8px 20px rgba(255, 165, 0, 0.5); }
  100% { transform: translateY(5px) scale(0.1); opacity: 0; box-shadow: 0 10px 20px rgba(255, 165, 0, 0); }
}
.kokonut-flip-front-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 24px;
}
.kokonut-flip-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  transition: transform 0.5s ease-out;
}
.kokonut-card-flip:hover .kokonut-flip-title { transform: translateY(-4px); }
.kokonut-flip-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: transform 0.5s ease-out 0.05s;
}
.kokonut-card-flip:hover .kokonut-flip-subtitle { transform: translateY(-4px); }
.kokonut-back-title { font-weight: 600; font-size: 1.125rem; color: var(--text); margin-bottom: 8px; }
.kokonut-back-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kokonut-start-btn {
  margin-top: auto;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  cursor: pointer;
}
.kokonut-start-btn:hover {
  background: rgba(255, 165, 0, 0.1);
  color: #f97316;
  border-color: rgba(255, 165, 0, 0.3);
  transform: scale(1.02);
}
