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

    :root {
      --bg:        #0b0c0e;
      --surface:   #111316;
      --surface2:  #161820;
      --border:    #1e2128;
      --border-hi: #2e3340;
      --text:      #c8cdd8;
      --muted:     #50566a;
      --muted2:    #393e4e;
      --accent:    #d4a038;
      --accent-lo: #d4a03820;
      --accent-hi: #f5d98e;
      --accent-dk: #b8892a;
      --green:     #3ecf8e;
      --green-lo:  #3ecf8e15;
      --blue:      #5b9cf6;
      --blue-lo:   #5b9cf615;
      --amber:     #f0b429;
      --amber-lo:  #f0b42915;
      --red:       #f16060;
      --red-lo:    #f1606015;
      --purple:    #a78bfa;
      --purple-lo: #a78bfa15;
      --pink:      #f472b6;
      --pink-lo:   #f472b615;
      --font-mono: 'IBM Plex Mono', monospace;
      --font-head: 'Syne', sans-serif;
      --skill-glow-intensity: 1;
      --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    }

    html, body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--font-mono);
      min-height: 100vh;
      overflow-x: hidden;
    }
    .wrapper { will-change: transform; overflow: visible; }
    canvas { will-change: contents; }
    .card, .skill-card, .dash-stat { will-change: transform; }

    /* ─── AMBIENT BG ──────────────────────────────────────────────────── */
    body::before {
      content: '';
      position: fixed; inset: 0;
      background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-lo), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, var(--purple-lo), transparent),
        radial-gradient(ellipse 50% 30% at 10% 80%, var(--blue-lo), transparent);
      pointer-events: none;
      z-index: 0;
    }

    /* ─── NOISE TEXTURE OVERLAY ──────────────────────────────────────── */
    body::after {
      content: '';
      position: fixed; inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 0;
      opacity: 0.4;
    }

    /* ─── THREE.JS 3D CANVAS ─────────────────────────────────────────── */
    #three-canvas {
      position: fixed; inset: 0;
      pointer-events: none;
      z-index: 0;
      opacity: 0.35;
    }

    /* ─── GOLD PARTICLES CANVAS ───────────────────────────────────────── */
    #particles-canvas {
      position: fixed; inset: 0;
      pointer-events: none;
      z-index: 0;
      opacity: 0.6;
    }

    /* ─── CURSOR GLOW ─────────────────────────────────────────────────── */
    #cursor-glow {
      position: fixed;
      width: 300px; height: 300px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(212,160,56,0.07) 0%, transparent 70%);
      pointer-events: none;
      z-index: 0;
      transform: translate(-50%, -50%);
      transition: opacity 0.3s;
      opacity: 0;
    }
    body:hover #cursor-glow { opacity: 1; }

    /* ─── 3D TILT CARDS ───────────────────────────────────────────────── */
    .card, .skill-card, .dash-stat, .quicklink {
      transform-style: preserve-3d;
      perspective: 800px;
    }
    .card .card-icon, .skill-card .skill-icon, .dash-stat-icon {
      transform: translateZ(20px);
    }
    .card .card-title, .skill-card .skill-name {
      transform: translateZ(10px);
    }

    body.editor-mode .wrapper {
      margin-left: 540px;
    }

    /* ─── HEADER ───────────────────────────────────────────────────────── */
    .header {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 20px;
      flex-wrap: wrap; gap: 16px;
      animation: fadeInDown 0.6s var(--ease-out);
    }
    .header-left { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
    .logo {
      font-family: var(--font-head);
      font-size: 1.8rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: var(--text);
    }
    .logo span {
      background: linear-gradient(135deg, var(--accent-hi), var(--accent), var(--accent-dk), var(--accent-hi));
      background-size: 300% auto;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      animation: goldShimmer 4s ease-in-out infinite;
      filter: drop-shadow(0 0 12px rgba(212,160,56,0.3));
    }
    .tagline {
      font-size: 0.75rem;
      color: var(--muted);
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    /* ─── ANIMATIONS ──────────────────────────────────────────────────── */
    @keyframes goldShimmer {
      0%, 100% { background-position: 0% center; }
      50% { background-position: 200% center; }
    }
    @keyframes fadeInDown {
      from { opacity: 0; transform: translateY(-12px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(16px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes cardIn {
      from { opacity: 0; transform: translateY(20px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }
    @keyframes dotBounce {
      0%, 80%, 100% { transform: translateY(0); }
      40% { transform: translateY(-5px); }
    }
    @keyframes slideUp {
      from { opacity: 0; transform: translateY(20px) scale(0.95); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }
    @keyframes goldPulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(212,160,56,0.3); }
      50% { box-shadow: 0 0 16px 4px rgba(212,160,56,0.15); }
    }
    @keyframes borderGlow {
      0%, 100% { border-color: rgba(212,160,56,0.2); }
      50% { border-color: rgba(212,160,56,0.45); }
    }
    @keyframes floatGlow {
      0%, 100% { filter: drop-shadow(0 0 8px rgba(212,160,56,0.15)); }
      50% { filter: drop-shadow(0 0 16px rgba(212,160,56,0.3)); }
    }
    @keyframes shimmerLine {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(200%); }
    }

    /* ─── KI LOGOS ─────────────────────────────────────────────────────── */
    .ki-bar {
      display: flex; gap: 8px; align-items: center;
    }
    .ki-btn {
      width: 38px; height: 38px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: linear-gradient(135deg, var(--surface), var(--surface2));
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.1rem;
      transition: all 0.3s var(--ease-out);
      position: relative;
      overflow: hidden;
      padding: 0;
    }
    .ki-btn::after {
      content: '';
      position: absolute; inset: 0;
      border-radius: 10px;
      background: radial-gradient(circle at 50% 50%, rgba(212,160,56,0.15), transparent 70%);
      opacity: 0;
      transition: opacity 0.3s;
    }
    .ki-btn:hover::after { opacity: 1; }
    .ki-btn:hover {
      transform: translateY(-3px) scale(1.05);
      border-color: var(--accent-dk);
      box-shadow: 0 6px 20px rgba(212,160,56,0.25);
    }
    .ki-btn:active { transform: translateY(0) scale(0.93); }
    .ki-btn img {
      width: 22px; height: 22px;
      object-fit: contain;
      position: relative; z-index: 1;
    }
    .ki-btn.active {
      border-color: var(--accent);
      box-shadow: 0 0 16px rgba(212,160,56,0.35);
      animation: goldPulse 2s ease-in-out infinite;
    }

    .header-right {
      display: flex; align-items: center; gap: 16px;
    }
    .sys-label {
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--muted);
    }
    .sys-date {
      font-size: 0.8rem;
      color: var(--text);
    }
    .sys-status {
      display: flex; align-items: center; gap: 6px;
      font-size: 0.75rem;
      color: var(--green);
    }
    .sys-status .dot {
      width: 6px; height: 6px;
      background: var(--green);
      border-radius: 50%;
      animation: pulse 2s infinite;
    }

    /* ─── SIDEBAR (Desktop) ──────────────────────────────────────────── */
    .sidebar {
      position: fixed; top: 0; left: 0; bottom: 0;
      width: 220px; z-index: 100;
      background: var(--surface);
      border-right: 1px solid var(--border);
      display: flex; flex-direction: column;
      padding-top: 20px;
      transition: width 0.25s ease, transform 0.25s ease;
      animation: fadeInDown 0.4s var(--ease-out) backwards;
    }
    .sidebar.collapsed { width: 56px; }
    .sidebar.collapsed .tab span,
    .sidebar.collapsed .tab-count,
    .sidebar.collapsed .tab::after { display: none; }
    .sidebar.collapsed .tab { justify-content: center; padding: 10px 0; font-size: 0; }
    .sidebar.collapsed .tab::before { font-size: 16px; margin: 0; }

    .sidebar-collapse {
      position: absolute; top: 8px; right: -12px;
      width: 24px; height: 24px; border-radius: 50%;
      background: var(--surface); border: 1px solid var(--border);
      color: var(--muted); cursor: pointer; font-size: 10px;
      display: flex; align-items: center; justify-content: center;
      transition: all 0.2s; z-index: 101;
    }
    .sidebar-collapse:hover { color: var(--accent); border-color: var(--accent); }
    .sidebar.collapsed .sidebar-collapse { transform: rotate(180deg); }

    .sidebar-nav {
      display: flex; flex-direction: column; gap: 2px;
      padding: 0 8px; overflow-y: auto; flex: 1;
    }

    .wrapper {
      position: relative; z-index: 1;
      max-width: 1400px;
      margin-left: 220px;
      margin-right: auto;
      padding: 24px 24px 24px 28px;
      transition: margin-left 0.25s ease;
    }
    body.sidebar-collapsed .wrapper { margin-left: 56px; }

    .tab {
      padding: 9px 14px;
      font-size: 0.82rem;
      font-weight: 500;
      color: var(--muted);
      background: transparent;
      border: none; border-radius: 8px;
      cursor: pointer;
      position: relative;
      white-space: nowrap;
      transition: all 0.2s ease;
      text-align: left;
      display: flex; align-items: center; gap: 8px;
    }
    .tab::before {
      content: attr(data-icon);
      font-size: 14px; min-width: 20px; text-align: center;
    }
    .tab:hover { color: var(--text); background: rgba(255,255,255,.04); }
    .tab.active {
      color: var(--accent);
      background: rgba(212,160,56,.08);
    }
    .tab.active::after {
      content: '';
      position: absolute;
      left: 0; top: 4px; bottom: 4px;
      width: 3px;
      background: linear-gradient(180deg, var(--accent-dk), var(--accent), var(--accent-hi));
      border-radius: 0 3px 3px 0;
      box-shadow: 0 0 8px rgba(212,160,56,0.3);
    }
    .tab-count {
      font-size: 0.65rem;
      background: var(--surface2);
      padding: 2px 6px;
      border-radius: 10px;
      margin-left: auto;
      color: var(--muted);
    }

    /* ─── STATS BAR ────────────────────────────────────────────────────── */
    .stats-bar {
      display: flex; gap: 24px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }
    .stat { display: flex; align-items: center; gap: 10px; }
    .stat-dot { width: 8px; height: 8px; border-radius: 50%; }
    .stat-num { font-size: 1.1rem; font-weight: 600; color: var(--text); }
    .stat-label {
      font-size: 0.7rem; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.05em;
    }

    /* ─── SEARCH ──────────────────────────────────────────────────────── */
    .search-wrap {
      position: relative;
      margin-bottom: 20px;
      animation: fadeInUp 0.5s var(--ease-out) 0.2s backwards;
    }
    .search-input {
      width: 100%;
      padding: 14px 20px 14px 44px;
      background: rgba(17,19,22,0.7);
      backdrop-filter: blur(8px);
      border: 1px solid var(--border);
      border-radius: 10px;
      color: var(--text);
      font-family: var(--font-mono);
      font-size: 0.9rem;
      transition: border-color 0.3s, box-shadow 0.3s;
    }
    .search-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-lo), 0 0 30px rgba(212,160,56,0.12), inset 0 0 20px rgba(212,160,56,0.03);
    }
    .search-input::placeholder { color: var(--muted); }
    .search-icon {
      position: absolute; left: 16px; top: 50%;
      transform: translateY(-50%);
      color: var(--muted);
      pointer-events: none;
    }

    /* ─── KEYBOARD HINTS ──────────────────────────────────────────────── */
    .kbd-panel {
      display: flex; gap: 16px; align-items: center;
      margin-bottom: 24px;
      flex-wrap: wrap;
      font-size: 0.7rem;
      color: var(--muted);
      animation: fadeInUp 0.5s var(--ease-out) 0.3s backwards;
    }
    .kbd-group { display: flex; align-items: center; gap: 6px; }
    .kbd-sep { width: 1px; height: 12px; background: var(--border); }
    kbd {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 2px 6px;
      font-family: var(--font-mono);
      font-size: 0.65rem;
      color: var(--text);
    }
