/* Self-hosted OFL fonts (Syne, Space Mono). Latin subset only; the homepage is English. */
@font-face {
  font-family: 'Syne';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/mosaic/fonts/syne-700-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/mosaic/fonts/space-mono-400-latin.woff2') format('woff2');
}

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

    :root {
      --bg: #0a0a0a;
      --text: #e8e8e8;
      --dim: #2a2a2a;
      --muted: #6a6a6a;
      --glow: rgba(200, 200, 200, 0.06);
    }

    html, body {
      height: 100%;
      width: 100%;
      background: var(--bg);
      color: var(--text);
      font-family: 'Space Mono', monospace;
      overflow: hidden;
      cursor: none;
    }

    /* Noise texture overlay */
    body::before {
      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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 100;
      opacity: 0.5;
    }

    /* Custom cursor */
    #cursor {
      position: fixed;
      width: 6px;
      height: 6px;
      background: var(--text);
      border-radius: 50%;
      pointer-events: none;
      z-index: 9999;
      transform: translate(-50%, -50%);
      transition: transform 0.1s ease, opacity 0.3s ease;
      mix-blend-mode: difference;
    }

    /* Cursor glow — larger, softer halo */
    #cursor-glow {
      position: fixed;
      width: 320px;
      height: 320px;
      border-radius: 50%;
      pointer-events: none;
      z-index: 0;
      transform: translate(-50%, -50%);
      background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
      transition: transform 0.08s linear;
      will-change: transform;
    }

    /* Stage */
    #stage {
      position: relative;
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 1.25rem;
      z-index: 1;
    }

    /* Wordmark */
    #wordmark {
      position: relative;
      display: flex;
      align-items: baseline;
      gap: 0;
      opacity: 0;
      animation: fadeIn 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
      user-select: none;
    }

    @keyframes fadeIn {
      from { opacity: 0; letter-spacing: 0.3em; }
      to   { opacity: 1; letter-spacing: 0em; }
    }

    #name {
      font-family: 'Syne', sans-serif;
      font-size: clamp(2.5rem, 8vw, 5.5rem);
      font-weight: 700;
      letter-spacing: -0.03em;
      color: var(--text);
      line-height: 1;
      position: relative;
    }

    #tld {
      font-family: 'Space Mono', monospace;
      font-size: clamp(0.9rem, 2.5vw, 1.7rem);
      font-weight: 400;
      color: var(--dim);
      letter-spacing: 0;
      align-self: flex-end;
      padding-bottom: 0.15em;
      transition: color 0.6s ease;
      position: relative;
    }

    #wordmark:hover #tld {
      color: #555;
    }

    /* Blinking cursor after .com */
    #tld::after {
      content: '_';
      color: var(--text);
      opacity: 0;
      animation: blink 1.2s step-end infinite 2.4s, blinkIn 0.1s ease 2.4s forwards;
      margin-left: 2px;
    }

    @keyframes blinkIn {
      to { opacity: 1; }
    }

    @keyframes blink {
      0%, 100% { opacity: 1; }
      50%       { opacity: 0; }
    }

    #tagline {
      font-family: 'Space Mono', monospace;
      font-size: clamp(0.7rem, 1.8vw, 0.95rem);
      color: var(--muted);
      letter-spacing: 0.04em;
      text-align: center;
      opacity: 0;
      animation: fadeInSoft 1.4s ease 1.2s forwards;
      user-select: none;
    }

    @keyframes fadeInSoft {
      from { opacity: 0; transform: translateY(6px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* Thin horizontal rule — barely visible */
    #rule {
      position: fixed;
      bottom: 2.5rem;
      left: 50%;
      transform: translateX(-50%);
      width: 1px;
      height: 40px;
      background: linear-gradient(to bottom, transparent, var(--dim));
      opacity: 0;
      animation: fadeIn 1s ease 2s forwards;
    }

    @media (prefers-reduced-motion: reduce) {
      html, body {
        cursor: auto;
      }

      #cursor,
      #cursor-glow {
        display: none !important;
      }

      #wordmark,
      #tagline,
      #rule {
        opacity: 1;
        animation: none;
        letter-spacing: 0;
        transform: none;
      }

      #tld::after {
        animation: none;
        opacity: 1;
      }
    }

    @media (hover: none), (pointer: coarse) {
      html, body {
        cursor: auto;
      }

      #cursor,
      #cursor-glow {
        display: none !important;
      }
    }
