    :root {
      --bg: #02030a;
      --panel: rgba(8, 10, 22, 0.78);
      --panel-strong: rgba(12, 15, 30, 0.92);
      --border: rgba(255, 255, 255, 0.12);
      --magenta: #ff1f8f;
      --cyan: #18e2ff;
      --violet: #8b5cf6;
      --gold: #f5b642;
      --green: #22e6a8;
      --red: #ff3b5c;
      --blue: #3b82f6;
      --text: #f5f7ff;
      --muted: #a0a7c2;
      --faint: #5f6680;
    }

    * { box-sizing: border-box; }

    body {
      background-color: var(--bg);
      color: var(--text);
      font-family: 'Inter', sans-serif;
      margin: 0;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility;
    }

    .accent-magenta { --ac: var(--magenta); }
    .accent-cyan { --ac: var(--cyan); }
    .accent-violet { --ac: var(--violet); }
    .accent-gold { --ac: var(--gold); }
    .accent-green { --ac: var(--green); }
    .accent-red { --ac: var(--red); }
    .accent-blue { --ac: var(--blue); }
    .accent-faint { --ac: var(--faint); }

    .text-ac { color: var(--ac); }
    .border-ac { border-color: var(--ac); }
    .bg-ac { background-color: var(--ac); }
    .shadow-ac { box-shadow: 0 0 20px rgba(255,31,143,0.15); }
    .glow-ac { box-shadow: 0 0 12px color-mix(in srgb, var(--ac) 40%, transparent); }

    .panel {
      background: var(--panel);
      border: 1px solid var(--border);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    .panel-strong {
      background: var(--panel-strong);
      border: 1px solid var(--border);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    .hero-bg {
      background:
        radial-gradient(ellipse 80% 60% at 70% 40%, rgba(139, 92, 246, 0.15), transparent 60%),
        radial-gradient(ellipse 60% 50% at 30% 70%, rgba(255, 31, 143, 0.1), transparent 60%),
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(24, 226, 168, 0.06), transparent 70%),
        linear-gradient(180deg, #02030a 0%, #050618 50%, #02030a 100%);
    }

    .cosmic-orb {
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
    }

    .orb-1 {
      width: 400px; height: 400px;
      right: -100px; top: -50px;
      background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 70%);
      filter: blur(40px);
      animation: orb-float-1 12s ease-in-out infinite;
    }
    .orb-2 {
      width: 300px; height: 300px;
      left: 10%; bottom: -80px;
      background: radial-gradient(circle, rgba(255, 31, 143, 0.08), transparent 70%);
      filter: blur(35px);
      animation: orb-float-2 10s ease-in-out infinite;
    }

    @keyframes orb-float-1 {
      0%, 100% { transform: translate(0, 0); }
      50% { transform: translate(-20px, 15px); }
    }
    @keyframes orb-float-2 {
      0%, 100% { transform: translate(0, 0); }
      50% { transform: translate(15px, -10px); }
    }

    .card-hover {
      transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }
    .card-hover:hover {
      transform: translateY(-4px);
      border-color: var(--ac, var(--magenta));
      box-shadow: 0 8px 30px color-mix(in srgb, var(--ac, var(--magenta)) 20%, transparent);
    }

    .nav-item {
      transition: background 0.2s ease, color 0.2s ease;
    }
    .nav-item:hover {
      background: rgba(255, 31, 143, 0.08);
    }
    .nav-item.active {
      background: rgba(255, 31, 143, 0.15);
      color: var(--magenta);
    }
    .nav-item.active .nav-icon {
      color: var(--magenta);
    }

    .status-dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      display: inline-block;
      flex-shrink: 0;
    }
    .status-dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
    .status-dot.magenta { background: var(--magenta); box-shadow: 0 0 6px var(--magenta); }
    .status-dot.cyan { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
    .status-dot.gold { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
    .status-dot.violet { background: var(--violet); box-shadow: 0 0 6px var(--violet); }
    .status-dot.blue { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
    .status-dot.red { background: var(--red); box-shadow: 0 0 6px var(--red); }
    .status-dot.faint { background: var(--faint); }

    .wave-bar {
      width: 3px;
      background: var(--green);
      border-radius: 2px;
      animation: wave 1.2s ease-in-out infinite;
    }
    .wave-bar:nth-child(1) { animation-delay: 0s; height: 8px; }
    .wave-bar:nth-child(2) { animation-delay: 0.15s; height: 12px; }
    .wave-bar:nth-child(3) { animation-delay: 0.3s; height: 6px; }
    .wave-bar:nth-child(4) { animation-delay: 0.45s; height: 10px; }

    @keyframes wave {
      0%, 100% { transform: scaleY(0.5); }
      50% { transform: scaleY(1); }
    }

    .live-dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      background: var(--green);
      box-shadow: 0 0 8px var(--green);
      animation: pulse-live 2s ease-in-out infinite;
    }

    @keyframes pulse-live {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.4; }
    }

    .progress-bar {
      height: 4px;
      background: rgba(255,255,255,0.1);
      border-radius: 9999px;
      overflow: hidden;
    }
    .progress-fill {
      height: 100%;
      background: var(--violet);
      border-radius: 9999px;
      transition: width 0.6s ease;
    }

    .img-fallback {
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Orbitron', sans-serif;
      font-weight: 700;
      font-size: 1.5rem;
      color: var(--ac, var(--magenta));
      background: linear-gradient(135deg, color-mix(in srgb, var(--ac, var(--magenta)) 15%, transparent), color-mix(in srgb, var(--ac, var(--magenta)) 5%, transparent));
    }

    .terminal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(2, 3, 10, 0.85);
      backdrop-filter: blur(8px);
      z-index: 100;
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding-top: 15vh;
    }
    .terminal-overlay.open {
      display: flex;
    }

    .terminal-box {
      width: 90%;
      max-width: 560px;
      background: var(--panel-strong);
      border: 1px solid var(--magenta);
      border-radius: 12px;
      box-shadow: 0 0 40px rgba(255, 31, 143, 0.2);
      overflow: hidden;
    }

    .terminal-cmd {
      padding: 12px 16px;
      cursor: pointer;
      transition: background 0.15s ease;
      font-family: 'Fira Code', monospace;
      font-size: 0.875rem;
      color: var(--muted);
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .terminal-cmd:hover {
      background: rgba(255, 31, 143, 0.08);
      color: var(--text);
    }

    .mobile-overlay {
      position: fixed;
      inset: 0;
      background: rgba(2, 3, 10, 0.9);
      backdrop-filter: blur(8px);
      z-index: 90;
      display: none;
    }
    .mobile-overlay.open {
      display: block;
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }

    ::-webkit-scrollbar { width: 8px; }
    ::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
    ::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.4); border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(255, 31, 143, 0.5); }

    .fade-in {
      animation: fadeIn 0.6s ease-out forwards;
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .section-heading {
      font-family: 'Rajdhani', sans-serif;
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .line-clamp-2 {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 8px;
      border-radius: 9999px;
      font-size: 0.625rem;
      font-weight: 600;
      font-family: 'Fira Code', monospace;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    /* ── creatureOS Terminal ── */
    .cos-terminal {
      background: rgba(2, 3, 10, 0.9);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 12px;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      height: 432px;
      transition: border-color 0.3s ease;
    }
    .cos-terminal:hover {
      border-color: rgba(29, 186, 248, 0.3);
    }
    .cos-terminal.cos-paused {
      border-color: rgba(157, 0, 255, 0.6);
      box-shadow: 0 0 40px rgba(157, 0, 255, 0.3);
      animation: cos-pulse 2s ease-in-out infinite;
    }
    @keyframes cos-pulse {
      0%, 100% { box-shadow: 0 0 30px rgba(157, 0, 255, 0.2); }
      50% { box-shadow: 0 0 40px rgba(157, 0, 255, 0.4); }
    }
    .cos-titlebar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 16px;
      background: rgba(255, 255, 255, 0.05);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      cursor: pointer;
      user-select: none;
      flex-shrink: 0;
    }
    .cos-dots {
      display: flex;
      gap: 6px;
    }
    .cos-dot {
      width: 10px; height: 10px;
      border-radius: 50%;
    }
    .cos-dot-red { background: rgba(255, 77, 109, 0.8); }
    .cos-dot-orange { background: rgba(255, 122, 61, 0.8); }
    .cos-dot-green { background: rgba(0, 255, 157, 0.8); }
    .cos-title {
      font-family: 'Fira Code', monospace;
      font-size: 9px;
      color: #6b7280;
      letter-spacing: 0.1em;
      flex: 1;
      text-align: center;
    }
    .cos-status-dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      animation: pulse-live 2s ease-in-out infinite;
    }
    .cos-status-dot.running { background: #00ff9d; }
    .cos-status-dot.paused { background: #ff7a3d; }
    .cos-output {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 8px 12px;
      font-family: 'Fira Code', monospace;
      font-size: 9px;
      line-height: 1.6;
      scrollbar-width: thin;
      scrollbar-color: #333 transparent;
    }
    .cos-output::-webkit-scrollbar { width: 4px; }
    .cos-output::-webkit-scrollbar-track { background: transparent; }
    .cos-output::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
    .cos-line {
      white-space: pre;
      min-height: 1em;
    }
    .cos-system { color: #bfc4d9; }
    .cos-user { color: #ffffff; }
    .cos-error { color: #ff4d6d; }
    .cos-success { color: #00ff9d; }
    .cos-input-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      background: rgba(255, 255, 255, 0.05);
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      flex-shrink: 0;
    }
    .cos-prompt {
      color: #00ff9d;
      font-family: 'Fira Code', monospace;
      font-size: 10px;
    }
    .cos-input {
      flex: 1;
      background: transparent;
      border: none;
      outline: none;
      color: #ffffff;
      font-family: 'Fira Code', monospace;
      font-size: 10px;
      caret-color: #00ff9d;
    }
    .cos-input::placeholder { color: #4b5563; }
    .cos-counter {
      font-family: 'Fira Code', monospace;
      font-size: 8px;
      color: #4b5563;
    }

    /* ── Scroll Reveal Animations ── */
    .reveal {
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.5s ease, transform 0.5s ease;
    }
    .reveal.visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* ── Project Modal ── */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(2, 3, 10, 0.85);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 110;
      display: none;
      align-items: flex-start;
      justify-content: center;
      padding: 5vh 1rem;
      overflow-y: auto;
    }
    .modal-overlay.open {
      display: flex;
      animation: fadeIn 0.2s ease-out;
    }
    .modal-card {
      width: 100%;
      max-width: 600px;
      background: var(--panel-strong);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
      animation: modalScale 0.25s ease-out;
    }
    @keyframes modalScale {
      from { opacity: 0; transform: scale(0.95); }
      to { opacity: 1; transform: scale(1); }
    }

    /* ── Search & Filter ── */
    .filter-chip {
      padding: 4px 12px;
      border-radius: 9999px;
      font-size: 0.75rem;
      font-family: 'Fira Code', monospace;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border: 1px solid var(--border);
      color: var(--muted);
      cursor: pointer;
      transition: all 0.2s ease;
      background: transparent;
    }
    .filter-chip:hover {
      color: var(--text);
      border-color: rgba(255, 255, 255, 0.25);
    }
    .filter-chip.active {
      color: var(--ac, var(--magenta));
      border-color: var(--ac, var(--magenta));
      background: color-mix(in srgb, var(--ac, var(--magenta)) 10%, transparent);
    }

    /* ── Visual Polish ── */
    .modal-dot {
      transition: background 0.2s ease;
      cursor: pointer;
    }

    #system-search:focus {
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--magenta) 30%, transparent);
    }

    .card-hover::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.3s ease;
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac, var(--magenta)) 30%, transparent);
    }
    .card-hover:hover::before {
      opacity: 1;
    }

    @media (max-width: 640px) {
      .hero-bg { padding-left: 1rem; padding-right: 1rem; }
      .cos-terminal { height: 360px; }
      .modal-card { max-width: 100%; border-radius: 12px; }
    }

    @media (max-width: 1024px) {
      #right-rail { border-left: none; border-top: 1px solid var(--border); }
    }

    /* Focus visible for accessibility */
    a:focus-visible, button:focus-visible, input:focus-visible {
      outline: 2px solid var(--magenta);
      outline-offset: 2px;
    }

    /* Smooth image loading */
    img { opacity: 1; transition: opacity 0.3s ease; }
    img[data-loading] { opacity: 0; }
