/* Moved from index.html: inline style block 1. */

    :root {
      color-scheme: dark;
      --bg: #06090d;
      --bg2: #0a0f16;
      --panel: #0c1219;
      --ink: #ffffff;
      --muted: #a8a294;
      --line: rgba(255, 255, 255, .09);
      --accent: #ffffff;
      --signal: #f04438;
      --blue: #5b8def;
      --accent-dim: rgba(255, 255, 255, .08);
      --display: "Space Grotesk", "Inter", system-ui, sans-serif;
      --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
      --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    }
    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body { animation: pagein .9s ease both; }
    @keyframes pagein { from { opacity: 0; } to { opacity: 1; } }
    body {
      margin: 0;
      font-family: var(--sans);
      color: var(--ink);
      background: var(--bg);
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
    }
    ::selection { background: var(--accent); color: #04121a; }
    .wrap { width: min(1280px, calc(100% - 48px)); margin: 0 auto; }

    /* Reveal on scroll */
    .rv { opacity: 0; transform: translateY(34px); transition: opacity 1s ease, transform 1s cubic-bezier(.16,1,.3,1); }
    .rv.in { opacity: 1; transform: none; }
    @media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } body { animation: none; } }

    /* Awareness banner */
    .csam {
      background: #04070b;
      color: var(--muted);
      text-align: center;
      padding: 9px 20px;
      font-family: var(--mono);
      font-size: .76rem;
      letter-spacing: .06em;
      border-bottom: 1px solid var(--line);
    }
    .csam strong { color: var(--accent); font-weight: 500; }

    /* Nav */
    nav.top {
      position: sticky; top: 0; z-index: 50;
      background: rgba(6, 9, 13, .78);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--line);
    }
    nav.top .wrap { display: flex; align-items: center; gap: 30px; padding-top: 14px; padding-bottom: 14px; }
    .brand {
      font-family: var(--mono); font-weight: 700; font-size: .95rem;
      color: var(--ink); text-decoration: none; letter-spacing: .14em;
      margin-right: auto; display: flex; align-items: center; gap: 10px;
    }
    .brand::before {
      content: ""; width: 9px; height: 9px; background: var(--blue);
      box-shadow: 0 0 12px var(--blue); border-radius: 1px;
      animation: pulse 2.6s ease-in-out infinite;
    }
    @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
    nav.top a.link {
      font-family: var(--mono); font-size: .76rem; letter-spacing: .16em;
      color: var(--muted); text-decoration: none;
      transition: color .25s ease;
    }
    nav.top a.link:hover { color: var(--accent); }
    nav.top a.cta {
      font-family: var(--mono); font-size: .76rem; letter-spacing: .14em;
      color: #04121a; background: var(--accent); text-decoration: none;
      font-weight: 700; padding: 9px 20px; border-radius: 3px;
      transition: box-shadow .25s ease, transform .25s ease;
    }
    nav.top a.cta:hover { box-shadow: 0 0 24px rgba(255,255,255,.22); transform: translateY(-1px); }
    @media (max-width: 760px) { nav.top a.link { display: none; } }

    /* Hero */
    .hero {
      position: relative;
      padding: 110px 0 90px;
      background:
        radial-gradient(900px 480px at 85% 0%, rgba(255,255,255,.05), transparent 60%),
        radial-gradient(700px 500px at 10% 110%, rgba(255,255,255,.03), transparent 60%),
        var(--bg);
      overflow: hidden;
    }
    .hero::before {
      content: "";
      position: absolute; inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
      background-size: 72px 72px;
      mask-image: radial-gradient(800px 500px at 70% 20%, black, transparent 75%);
      -webkit-mask-image: radial-gradient(800px 500px at 70% 20%, black, transparent 75%);
      pointer-events: none;
    }
    .hero-grid { position: relative; display: grid; grid-template-columns: 1.4fr .6fr; gap: 60px; align-items: center; }
    .kicker {
      font-family: var(--mono); font-size: .78rem; letter-spacing: .28em;
      color: var(--accent); margin: 0 0 22px; text-transform: uppercase;
    }
    .kicker::before { content: "// "; opacity: .6; }
    .hero h1 {
      font-family: var(--display); font-weight: 700;
      font-size: clamp(3.4rem, 8.5vw, 6.4rem);
      line-height: .98; margin: 0 0 14px; letter-spacing: -0.03em;
    }
    .hero h1 .thin { font-weight: 400; color: var(--muted); }
    .hero .role {
      font-family: var(--display); font-size: clamp(1.05rem, 2.2vw, 1.35rem);
      color: var(--ink); margin: 0 0 24px; font-weight: 500; letter-spacing: .01em;
    }
    .hero .role em { color: var(--blue); font-style: normal; }
    .hero .lede { max-width: 600px; font-size: 1.06rem; color: #eae5db; margin: 0 0 18px; }
    .hero .grounding { max-width: 600px; font-family: var(--mono); font-size: .8rem; letter-spacing: .16em; color: var(--muted); margin: 0 0 36px; text-transform: uppercase; }
    .btnrow { display: flex; flex-wrap: wrap; gap: 14px; }
    .btn {
      display: inline-block; padding: 14px 30px; border-radius: 3px;
      font-family: var(--mono); font-size: .8rem; letter-spacing: .14em; font-weight: 700;
      text-decoration: none; text-transform: uppercase;
      transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
    }
    .btn.solid { background: var(--accent); color: #04121a; }
    .btn.solid:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,255,255,.16); }
    .btn.line { border: 1px solid rgba(255,255,255,.22); color: var(--ink); background: transparent; }
    .btn.line:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

    .portrait { margin: 0; justify-self: end; position: relative; text-align: center; width: min(340px, 100%); }
    .portrait .frame { position: relative; display: inline-block; }
    .portrait img {
      width: min(300px, 100%); height: auto; display: block;
      border-radius: 4px;
      border: 1px solid rgba(255,255,255,.16);
      filter: saturate(.92) contrast(1.04);
      transition: filter .4s ease, transform .4s cubic-bezier(.16,1,.3,1);
    }
    .portrait .frame:hover img { filter: saturate(1.05) contrast(1.06); transform: scale(1.015); }
    .tick { display: none; position: absolute; width: 22px; height: 22px; border: 2px solid var(--accent); transition: all .3s ease; }
    .tick.tl { top: -8px; left: -8px; border-right: none; border-bottom: none; }
    .tick.tr { top: -8px; right: -8px; border-left: none; border-bottom: none; }
    .tick.bl { bottom: -8px; left: -8px; border-right: none; border-top: none; }
    .tick.br { bottom: -8px; right: -8px; border-left: none; border-top: none; }
    .portrait figcaption {
      font-family: var(--mono); font-size: .72rem; letter-spacing: .2em;
      color: var(--muted); margin-top: 18px; text-align: center; text-transform: uppercase;
    }
    @media (max-width: 900px) {
      .hero-grid { grid-template-columns: 1fr; gap: 48px; }
      .portrait { justify-self: start; }
      .portrait img { width: 210px; }
      .hero { padding: 72px 0 60px; }
    }

    /* Telemetry stat band */
    .telemetry { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg2); }
    .telemetry .wrap {
      display: grid; grid-template-columns: repeat(4, 1fr);
      padding-top: 30px; padding-bottom: 30px; gap: 24px;
    }
    .tstat { border-left: 1px solid var(--line); padding-left: 22px; transition: border-color .3s ease; }
    .tstat:hover { border-color: var(--accent); }
    .tstat b {
      display: block; font-family: var(--mono); font-weight: 700;
      font-size: 2rem; color: var(--ink); letter-spacing: -0.02em;
    }
    .tstat b i { font-style: normal; color: var(--accent); }
    .tstat span { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
    @media (max-width: 760px) { .telemetry .wrap { grid-template-columns: repeat(2, 1fr); } }

    main { padding: 90px 0 100px; }
    section.block { margin: 0 0 96px; }
    section.block:last-child { margin-bottom: 0; }
    .secnum {
      font-family: var(--mono); font-size: .74rem; font-weight: 500;
      letter-spacing: .26em; color: var(--accent); text-transform: uppercase;
      margin: 0 0 12px; display: flex; align-items: center; gap: 14px;
    }
    .secnum::after { content: ""; height: 1px; flex: 1; background: var(--line); }
    h2.stitle {
      font-family: var(--display); font-weight: 600;
      font-size: clamp(1.9rem, 3.6vw, 2.7rem);
      margin: 0 0 10px; letter-spacing: -0.02em;
    }
    .ssub { color: var(--muted); max-width: 680px; margin: 0 0 36px; font-size: 1.03rem; }

    .grid2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
    @media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
    .prose p { margin: 0 0 18px; font-size: 1.05rem; color: #e8eef4; }
    .prose p strong { color: var(--ink); }

    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 30px;
      transition: border-color .3s ease, box-shadow .3s ease, transform .3s cubic-bezier(.16,1,.3,1);
    }
    .panel:hover { border-color: rgba(255,255,255,.18); box-shadow: 0 18px 44px rgba(0,0,0,.45); }
    .panel h3 {
      font-family: var(--mono); font-size: .78rem; font-weight: 700;
      letter-spacing: .22em; text-transform: uppercase;
      margin: 0 0 18px; color: var(--accent);
    }
    .panel ul { padding-left: 1.1rem; margin: 0; color: #e8eef4; }
    .panel li { margin: 0 0 12px; }
    .panel li::marker { color: var(--accent); }
    .panel .pnote { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; color: var(--muted); line-height: 1.7; }
    .panel li strong { color: var(--ink); }

    .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .tiles.two { grid-template-columns: repeat(2, 1fr); }
    @media (max-width: 900px) { .tiles, .tiles.two { grid-template-columns: 1fr; } }
    a.tile {
      display: flex; flex-direction: column;
      background: var(--panel); border: 1px solid var(--line);
      border-radius: 6px; padding: 30px 28px; text-decoration: none; color: inherit;
      position: relative; overflow: hidden;
      transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s ease, box-shadow .3s ease;
    }
    a.tile::before {
      content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
      background: var(--accent); transform: scaleX(0); transform-origin: left;
      transition: transform .35s cubic-bezier(.16,1,.3,1);
    }
    a.tile:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.22); box-shadow: 0 24px 50px rgba(0,0,0,.5); }
    a.tile:hover::before { transform: scaleX(1); }
    a.tile .k { font-family: var(--mono); font-size: .68rem; letter-spacing: .22em; color: var(--muted); text-transform: uppercase; margin-bottom: 12px; }
    a.tile .t { font-family: var(--display); font-size: 1.28rem; font-weight: 600; letter-spacing: -0.01em; display: block; margin-bottom: 10px; }
    a.tile .d { color: var(--muted); font-size: .94rem; flex: 1; }
    a.tile .go {
      display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
      font-family: var(--mono); font-size: .74rem; font-weight: 700;
      letter-spacing: .18em; text-transform: uppercase; color: var(--blue);
    }
    a.tile .go::after { content: "→"; transition: transform .25s ease; }
    a.tile:hover .go::after { transform: translateX(5px); }

    .credline {
      border-left: 2px solid var(--accent); padding: 6px 0 6px 24px;
      color: var(--muted); font-size: 1rem; max-width: 860px;
    }

    .notes3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
    @media (max-width: 900px) { .notes3 { grid-template-columns: 1fr; } }
    .note {
      border: 1px solid var(--line); border-radius: 6px; padding: 26px;
      background: var(--panel);
      transition: border-color .3s ease, transform .3s cubic-bezier(.16,1,.3,1);
    }
    .note:hover { border-color: rgba(255,255,255,.18); transform: translateY(-4px); }
    .note strong { font-family: var(--display); font-size: 1.12rem; font-weight: 600; display: block; margin-bottom: 8px; }
    .note span { color: var(--muted); font-size: .93rem; }

    footer {
      background: #04070b; border-top: 1px solid var(--line);
      padding: 56px 0 44px; font-size: .92rem; color: #cdd7e1;
    }
    footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 48px; align-items: baseline; justify-content: space-between; }
    footer .fname { font-family: var(--display); color: var(--ink); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }
    footer .fname i { font-style: normal; color: var(--blue); }
    footer nav a {
      font-family: var(--mono); font-size: .74rem; letter-spacing: .16em;
      color: #e8eef4; text-decoration: none; margin-right: 22px; text-transform: uppercase;
      transition: color .25s ease;
    }
    footer nav a:hover { color: var(--accent); }

    /* Full-bleed hero: full viewport, atmospheric background, oversized type */
    .hero { position: relative; min-height: 100svh; display: flex; align-items: center;
      background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.88)), url('hero-bg.webp') center/cover no-repeat; }
    .hero h1 { font-size: clamp(4rem, 10vw, 8rem); }
    .hero .scrollcue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
      font-family: var(--mono); font-size: .7rem; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; }

    /* PREVIEW v7: balanced hero + DesignRush inspiration (grain, gray gradient, drift, air) */
    .hero { background: linear-gradient(180deg, rgba(0,0,0,.42), rgba(0,0,0,.78)), url('hero-bg.webp') center/cover no-repeat;
      animation: heroDrift 32s ease-in-out infinite alternate; }
    @keyframes heroDrift { from { background-position: center 30%; } to { background-position: center 68%; } }
    .hero-grid { grid-template-columns: 1.15fr .85fr; }
    .portrait img { width: min(340px, 100%); }
    .portrait::before { content: ""; position: absolute; width: 460px; height: 460px; right: -50px; top: 50%;
      transform: translateY(-50%); background: radial-gradient(circle, rgba(91,141,239,.30), transparent 65%);
      filter: blur(12px); z-index: 0; pointer-events: none; }
    .portrait .frame { position: relative; z-index: 1; }
    .hero h1 .fix-i { font-family: "Inter", system-ui, sans-serif; }
    /* Film grain over everything, very subtle */
    body::after { content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: .05;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E"); }
    /* Gray gradient down the page: charcoal to warm stone-dark */
    main { background: linear-gradient(180deg, #0a0e13 0%, #10151b 45%, #171512 100%); }
    main { padding: 90px 0 100px; }
    section.block { margin: 0 0 80px; }
    @media (prefers-reduced-motion: reduce) { .hero { animation: none; } }
  