/* Reachy Bloch — Hugging Face Space landing page styles */
    :root {
      --bg: #07080c;
      --panel: #0f111a;
      --panel-2: #141826;
      --line: #232838;
      --ink: #e7eaf2;
      --muted: #8b93a7;
      --faint: #5b6175;
      /* dual accent: cyan = quantum state, orange = robot motion */
      --quantum: #41e0c8;
      --motion: #ff9d2e;
      --quantum-dim: #1c5b54;
      --radius: 14px;
      --maxw: 1080px;
    }

    * { box-sizing: border-box; }

    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--ink);
      font-family: "Spline Sans", system-ui, sans-serif;
      font-size: 17px;
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
    }

    /* blueprint grid + radial glow atmosphere */
    body::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -2;
      background:
        radial-gradient(1100px 600px at 78% -8%, rgba(65, 224, 200, 0.10), transparent 60%),
        radial-gradient(900px 600px at 10% 8%, rgba(255, 157, 46, 0.07), transparent 55%);
    }
    body::after {
      content: "";
      position: fixed;
      inset: 0;
      z-index: -1;
      background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
      background-size: 46px 46px;
      mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
      opacity: 0.25;
    }

    a { color: var(--quantum); text-decoration: none; }
    a:hover { text-decoration: underline; text-underline-offset: 3px; }

    .wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

    h1, h2, h3 { font-family: "Syne", sans-serif; font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; }

    code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

    .tag {
      display: inline-block;
      font-family: "JetBrains Mono", monospace;
      font-size: 0.72rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--muted);
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px 12px;
    }

    /* ---------- hero ---------- */
    header.hero {
      position: relative;
      padding: 64px 0 36px;
    }
    .hero-grid {
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: 40px;
      align-items: center;
    }
    .eyebrow {
      font-family: "JetBrains Mono", monospace;
      font-size: 0.8rem;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--quantum);
      margin-bottom: 18px;
    }
    .eyebrow .dot {
      display: inline-block; width: 8px; height: 8px; border-radius: 50%;
      background: var(--quantum); margin-right: 9px; vertical-align: middle;
      box-shadow: 0 0 12px var(--quantum);
      animation: pulse 2.4s ease-in-out infinite;
    }
    @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

    h1.title {
      font-size: clamp(2.7rem, 6vw, 4.6rem);
      margin: 0 0 18px;
    }
    h1.title .grad {
      background: linear-gradient(100deg, var(--quantum), var(--motion));
      -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .lede { font-size: 1.2rem; color: var(--muted); max-width: 36ch; margin: 0 0 22px; }
    .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
    .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
    .btn {
      font-family: "JetBrains Mono", monospace;
      font-size: 0.9rem;
      padding: 13px 20px; border-radius: 10px; cursor: pointer;
      border: 1px solid var(--line); color: var(--ink); background: var(--panel);
      transition: transform .15s ease, border-color .15s ease, background .15s ease;
    }
    .btn:hover { transform: translateY(-2px); text-decoration: none; }
    .btn.primary { background: linear-gradient(100deg, var(--quantum), var(--motion)); color: #06121a; border: none; font-weight: 700; }
    .btn.ghost:hover { border-color: var(--quantum); }

    /* animated bloch sphere */
    .bloch-wrap { display: flex; justify-content: center; }
    .bloch { width: min(360px, 80vw); height: auto; filter: drop-shadow(0 18px 50px rgba(65,224,200,0.12)); }
    .bloch .sphere { fill: url(#sheen); stroke: var(--line); stroke-width: 1; }
    .bloch .ring { fill: none; stroke: #2b3346; stroke-width: 1; }
    .bloch .axis { stroke: #39415a; stroke-width: 1; stroke-dasharray: 3 4; }
    .bloch .lbl { fill: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 12px; }
    .bloch .vec { stroke: var(--motion); stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255,157,46,0.6)); }
    .bloch .tip { fill: var(--motion); }
    .precess { transform-origin: 150px 150px; animation: precess 14s linear infinite; }
    @keyframes precess { to { transform: rotate(360deg); } }
    .nutate { animation: nutate 7s ease-in-out infinite; transform-origin: 150px 150px; }
    @keyframes nutate { 0%,100% { transform: scaleX(1); } 50% { transform: scaleX(0.4); } }

    /* ---------- video ---------- */
    section { padding: 46px 0; }
    .section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
    .section-head .num { font-family: "JetBrains Mono", monospace; color: var(--quantum); font-size: 0.85rem; }
    h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0; }
    .section-sub { color: var(--muted); margin: 10px 0 26px; max-width: 64ch; }

    /* Vertical YouTube Short: 9:16, width-capped and centred so it isn't huge. */
    .video-short {
      position: relative; aspect-ratio: 9 / 16;
      width: min(330px, 80vw); margin: 0 auto;
      border: 1px solid var(--line); border-radius: var(--radius);
      overflow: hidden; background: #0a0c13;
      box-shadow: 0 18px 50px rgba(0,0,0,0.45);
    }
    .video-short iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

    /* ---------- cards / mapping ---------- */
    .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
    .map-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: var(--radius); }
    .map-table th, .map-table td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
    .map-table thead th { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); background: var(--panel-2); }
    .map-table tr:last-child td { border-bottom: none; }
    .map-table .chan { color: var(--motion); font-weight: 600; white-space: nowrap; }
    .map-table .qty { color: var(--quantum); font-family: "JetBrains Mono", monospace; }
    .ket { font-family: "JetBrains Mono", monospace; color: var(--ink); }

    .note { border-left: 2px solid var(--motion); background: rgba(255,157,46,0.05); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--muted); margin-top: 22px; }
    .note b { color: var(--ink); }

    /* pipeline */
    .pipe { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 8px; }
    .pipe .stage { flex: 1 1 150px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
    .pipe .stage h4 { margin: 0 0 6px; font-family: "Syne", sans-serif; font-size: 1rem; }
    .pipe .stage .mono { color: var(--quantum); font-size: 0.74rem; }
    .pipe .stage p { margin: 8px 0 0; color: var(--muted); font-size: 0.86rem; }
    .pipe .arrow { align-self: center; color: var(--faint); font-size: 1.4rem; }

    /* code */
    .code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    figure.code { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
    figure.code figcaption { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
    figure.code figcaption .name { font-family: "Syne", sans-serif; font-weight: 700; }
    figure.code figcaption .pill { font-family: "JetBrains Mono", monospace; font-size: 0.68rem; color: var(--quantum); border: 1px solid var(--quantum-dim); border-radius: 999px; padding: 3px 9px; }
    pre { margin: 0; padding: 18px; overflow-x: auto; font-size: 0.82rem; line-height: 1.55; color: #cdd3e1; }
    pre .k { color: var(--motion); } /* keyword */
    pre .f { color: var(--quantum); } /* function/method */
    pre .s { color: #9be6a0; }       /* string */
    pre .c { color: var(--faint); font-style: italic; } /* comment */
    .diagram { background: #070a10; border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; white-space: pre; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.74rem; line-height: 1.2; color: #aeb8cf; margin-top: 16px; }

    /* screenshots */
    .shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    figure.shot { margin: 0; }
    figure.shot .imgbox { position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); }
    figure.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
    figure.shot .ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 18px; color: var(--faint);
      background: repeating-linear-gradient(45deg, #0c0e16 0 14px, #0a0c13 14px 28px); }
    figure.shot .ph .mono { font-size: 0.76rem; }
    figure.shot.has-img .ph { display: none; }
    figure.shot figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 10px; }

    /* env / modes */
    .modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .mode { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
    .mode h3 { font-size: 1.15rem; margin: 0 0 6px; }
    .mode.aer h3 { color: var(--quantum); }
    .mode.ibm h3 { color: var(--motion); }
    .mode ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; }
    .env { margin-top: 22px; }
    .env code { color: var(--quantum); }
    .kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 0.9rem; margin-top: 10px; }
    .kv .mono { color: var(--motion); }
    .kv span { color: var(--muted); }

    /* references */
    .refs { columns: 2; column-gap: 28px; }
    .refs a.ref { display: block; break-inside: avoid; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
    .refs a.ref:hover { text-decoration: none; color: var(--quantum); }
    .refs a.ref .t { font-weight: 600; }
    .refs a.ref .u { display: block; font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--faint); }

    footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0 60px; color: var(--muted); }
    footer .links { display: flex; gap: 20px; flex-wrap: wrap; font-family: "JetBrains Mono", monospace; font-size: 0.85rem; }
    footer .fine { margin-top: 18px; font-size: 0.8rem; color: var(--faint); }

    /* scroll reveal */
    .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
    .reveal.in { opacity: 1; transform: none; }

    @media (max-width: 820px) {
      .hero-grid, .code-grid, .shots, .modes { grid-template-columns: 1fr; }
      .refs { columns: 1; }
      header.hero { padding-top: 40px; }
      .bloch-wrap { order: -1; }
    }
    @media (prefers-reduced-motion: reduce) {
      .precess, .nutate, .eyebrow .dot { animation: none; }
      .reveal { transition: none; opacity: 1; transform: none; }
    }
