    html { scroll-behavior: smooth; }
    body { background: #030712; overflow-x: hidden; }
    ::selection { background: rgba(99,102,241,.5); color: #fff; }

    .gradient-text {
      background: linear-gradient(90deg, #6366f1, #22d3ee, #f472b6, #6366f1);
      background-size: 300% 100%;
      -webkit-background-clip: text; background-clip: text;
      -webkit-text-fill-color: transparent; color: transparent;
      animation: gradShift 6s linear infinite;
    }
    @keyframes gradShift { to { background-position: 300% 0; } }

    /* Scroll reveal */
    [data-reveal] {
      opacity: 0; transform: translateY(40px) scale(.98);
      transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
      transition-delay: var(--d, 0ms);
      will-change: opacity, transform;
    }
    [data-reveal="left"]  { transform: translateX(-50px); }
    [data-reveal="right"] { transform: translateX(50px); }
    [data-reveal="zoom"]  { transform: scale(.85); }
    [data-reveal].is-visible { opacity: 1; transform: none; }

    /* Hero headline words */
    .word { display: inline-block; overflow: hidden; vertical-align: bottom; }
    .word > span { display: inline-block; transform: translateY(110%); transition: transform 1s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
    .hero-ready .word > span { transform: none; }

    /* Cursor glow */
    #cursor-glow {
      position: fixed; top: 0; left: 0; width: 500px; height: 500px; border-radius: 50%;
      background: radial-gradient(circle, rgba(99,102,241,.14), transparent 65%);
      pointer-events: none; z-index: 1; transform: translate(-50%, -50%);
    }
    #cursor-dot {
      position: fixed; top: 0; left: 0; width: 10px; height: 10px; border-radius: 50%;
      background: #22d3ee; pointer-events: none; z-index: 100; transform: translate(-50%, -50%);
      transition: width .25s, height .25s, background .25s, opacity .25s; mix-blend-mode: screen;
    }
    #cursor-dot.big { width: 44px; height: 44px; background: rgba(99,102,241,.35); }
    @media (hover: none) { #cursor-glow, #cursor-dot { display: none; } }

    /* Card spotlight */
    .spot { position: relative; overflow: hidden; }
    .spot::before {
      content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
      background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(99,102,241,.22), transparent 70%);
      pointer-events: none;
    }
    .spot:hover::before { opacity: 1; }

    /* Tilt */
    .tilt { transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; }

    /* Rotating ring */
    .ring { animation: spin 14s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .float { animation: floaty 4s ease-in-out infinite; }
    @keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

    /* Marquee */
    .marquee { display: flex; width: max-content; animation: marq 28s linear infinite; }
    .marquee:hover { animation-play-state: paused; }
    @keyframes marq { to { transform: translateX(-50%); } }

    /* Typed caret */
    .caret::after { content: "|"; margin-left: 2px; color: #22d3ee; animation: blink 1s steps(1) infinite; }
    @keyframes blink { 50% { opacity: 0; } }

    /* Preloader */
    #preloader { position: fixed; inset: 0; z-index: 200; background: #030712; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 24px; transition: transform .9s cubic-bezier(.8,0,.2,1), opacity .4s .7s; }
    #preloader.done { transform: translateY(-100%); opacity: 0; pointer-events: none; }
    .loader-bar { width: 180px; height: 2px; background: rgba(255,255,255,.1); overflow: hidden; border-radius: 2px; }
    .loader-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#6366f1,#22d3ee); animation: load 1.1s ease forwards; }
    @keyframes load { to { width: 100%; } }

    /* Nav active */
    .nav-link { position: relative; padding-bottom: 4px; }
    .nav-link::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: linear-gradient(90deg,#6366f1,#22d3ee); transition: width .3s; }
    .nav-link:hover::after, .nav-link.active::after { width: 100%; }
    .nav-link.active { color: #fff; }

    /* Section heading underline */
    .h-line { position: relative; display: inline-block; padding-bottom: 12px; }
    .h-line::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 0; border-radius: 4px; background: linear-gradient(90deg,#6366f1,#22d3ee); transition: width 1s .3s cubic-bezier(.2,.8,.2,1); }
    .is-visible .h-line::after, .h-line.is-visible::after { width: 100%; }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
      [data-reveal] { opacity: 1; transform: none; }
      .word > span { transform: none; }
    }