/* ===== CSS Variables & Reset ===== */
:root{
    --bg:#050607;
    --bg2:#07090b;
    --panel:#0a0d10;
    --text:#d7ffe9;
    --muted:rgba(215,255,233,.62);
    --accent:#5cffc6;
    --accent2:#86d8ff;
    --line:rgba(var(--accent-rgb), .22);
    --line2:rgba(255,255,255,.08);
    --border-soft: rgba(255,255,255,.08);
    --border-accent: rgba(var(--accent-rgb), .28);
    --ease:cubic-bezier(.2,.85,.2,1);
    --dur1:140ms; --dur2:220ms; --dur3:520ms;
    --r:12px;
    --font-main: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --letter: .02em;
  }
  *{box-sizing:border-box}
  html,body{height:100%}

  /* ===== Base Layout & Background ===== */
  body{
    margin:0;
    font-size:13.5px;
    background:
      radial-gradient(1200px 700px at 70% 10%, rgba(var(--accent-rgb), .10), transparent 55%),
      radial-gradient(900px 600px at 20% 70%, rgba(var(--accent2-rgb), .08), transparent 60%),
      linear-gradient(180deg, var(--bg), var(--bg2));
    color:var(--text);
    font-family: var(--font-main);
    letter-spacing: var(--letter);
    overflow-x:hidden;
  }

  /* ===== CRT Effects (Terminal Mode) ===== */
  .scanlines{
    position:fixed; inset:0; pointer-events:none; z-index:0;
    background:
      repeating-linear-gradient(180deg,
        rgba(255,255,255,.035) 0px,
        rgba(255,255,255,.035) 1px,
        rgba(0,0,0,0) 3px,
        rgba(0,0,0,0) 6px);
    opacity:.06;
    mix-blend-mode: overlay;
  }
  .vignette{
    position:fixed; inset:-10%; pointer-events:none; z-index:0;
    background: radial-gradient(circle at 50% 40%, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 80%);
    opacity:.85;
  }
  .noise{
    position:fixed; inset:0; pointer-events:none; z-index:0;
    opacity:.06;
    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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
  }

  /* ===== Layout Containers ===== */
  .wrap{position:relative; z-index:1; width:min(1100px, 92vw); margin:26px auto 40px;}

  /* ===== Panel Components ===== */
  .panel{
    background:
      linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.15)),
      rgba(10,13,16,.78);
    border:1px solid var(--border-soft);
    box-shadow: 0 0 0 1px rgba(0,0,0,.55) inset, 0 18px 70px rgba(0,0,0,.55);
    border-radius: var(--r);
    backdrop-filter: blur(10px);
  }

  /* ===== Header / Navigation ===== */
  .topbar{
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    padding:16px 16px;
    box-shadow: 0 0 0 1px var(--border-accent) inset;
    border-radius: var(--r);
  }
  .brand{
    display:flex; flex-direction:column; gap:2px; min-width:0;
  }
  .brand .title{
    font-weight:900;
    font-size: clamp(18px, 3.4vw, 26px);
    white-space:nowrap;
  }
  .brand .title span{ color:var(--accent); }
  .brand .sub{
    color:var(--muted);
    font-size:12px;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  .nav{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
  .nav a{
    text-decoration:none;
    color:var(--text);
    border:1px solid var(--border-soft);
    padding:8px 10px;
    border-radius:10px;
    transition: transform var(--dur1) var(--ease), border-color var(--dur1) var(--ease), background var(--dur1) var(--ease);
    font-weight:800;
    font-size:11px;
    opacity:.9;
  }
  .nav a:hover{
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), .55);
    background: rgba(var(--accent-rgb), .08);
    opacity:1;
  }

  /* ===== Hero Section ===== */
  .hero{ margin-top:16px; padding:24px; position:relative; overflow:hidden;}
  .cmd{
    border:1px solid var(--border-accent);
    border-radius:14px;
    background: rgba(0,0,0,.35);
    padding:14px 14px 12px;
  }
  .cmdline{ display:flex; gap:10px; align-items:baseline; flex-wrap:wrap;}
  .prompt{ color:rgba(var(--accent-rgb), .95); font-weight:900;}
  .blink{
    display:inline-block; width:10px; height:1.1em;
    background: rgba(var(--accent-rgb), .95);
    transform: translateY(2px);
    animation: blink 1.1s steps(1,end) infinite;
  }
  @keyframes blink{ 50%{opacity:0} }
  .cmd p{ margin:10px 0 0; color:var(--muted); font-size:13px; line-height:1.55; max-width: 70ch;}
  .actions{ margin-top:14px; display:flex; gap:10px; flex-wrap:wrap;}
  .btn{
    appearance:none; border:1px solid rgba(var(--accent-rgb), .35);
    background: rgba(var(--accent-rgb), .08);
    color: var(--text);
    padding:10px 12px;
    border-radius:12px;
    font: 800 12px/1 ui-monospace, monospace;
    cursor:pointer;
    transition: transform var(--dur1) var(--ease), background var(--dur1) var(--ease), border-color var(--dur1) var(--ease);
  }
  .btn.primary{
    background: rgba(var(--accent-rgb), .18);
    border-color: rgba(var(--accent-rgb), .55);
  }
  .btn:hover{ transform: translateY(-2px); background: rgba(var(--accent-rgb), .14); }
  .btn:active{ transform: translateY(0px) scale(.98); }

  /* ===== Hero Sphere Animation ===== */
  .siteSphere{
    position:absolute;
    right:-48px;
    top:-58px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    pointer-events:none;
    will-change: transform;
    background:
      radial-gradient(circle at 28% 26%, rgba(var(--accent-rgb), .95), rgba(0,0,0,0) 55%),
      radial-gradient(circle at 72% 74%, rgba(var(--accent2-rgb), .22), rgba(0,0,0,0) 62%),
      radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), .10), rgba(0,0,0,0) 70%);
    filter: saturate(1.18) contrast(1.02);
    opacity:.70;
    animation: floaty 7.2s var(--ease) infinite;
  }
  .siteSphere::before{
    content:"";
    position:absolute; inset:-14px;
    border-radius:inherit;
    background: radial-gradient(circle at 50% 50%,
      rgba(var(--accent-rgb), 0) 46%,
      rgba(var(--accent-rgb), .16) 62%,
      rgba(var(--accent-rgb), 0) 76%);
    filter: drop-shadow(0 0 22px rgba(var(--accent-rgb), .35));
    opacity:.95;
  }
  @keyframes floaty{
    0%,100%{ transform: translate(0,0) scale(1); }
    45%{ transform: translate(-10px, 8px) scale(1.02); }
    70%{ transform: translate(-2px, 14px) scale(0.995); }
  }

  /* ===== App Grid & Cards ===== */
  .sectionTitle{
    margin:16px 2px 10px;
    display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:baseline;
  }
  .sectionTitle h2{ margin:0; font-size:15px; font-weight:900; letter-spacing:.12em; text-transform:uppercase;}
  .sectionTitle .hint{ color:var(--muted); font-size:12px; }
  .grid{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
  }
  .card{
    padding:16px;
    border-radius: var(--r);
    border:1px solid var(--border-soft);
    background: rgba(9,12,15,.62);
    box-shadow: 0 0 0 1px rgba(0,0,0,.55) inset;
    transition: transform var(--dur2) var(--ease), border-color var(--dur2) var(--ease), background var(--dur2) var(--ease);
    overflow:hidden;
    position:relative;
    will-change: transform;
  }
  .card:hover{
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), .55);
    background: rgba(10,14,18,.72);
  }
  .cardTop{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
  .card h3{ margin:0; font-size:14px; font-weight:900; }
  .tag{
    font-size:12px; font-weight:900;
    border:1px solid rgba(var(--accent-rgb), .30);
    color: rgba(var(--accent-rgb), .92);
    padding:4px 8px;
    border-radius:999px;
    background: rgba(var(--accent-rgb), .06);
    white-space:nowrap;
  }
  .desc{ margin:8px 0 10px; color:var(--muted); font-size:13px; line-height:1.55; }
  .cardActions{
    display:flex;
    gap:12px;
    margin-top:8px;
    flex-wrap:wrap;
    align-items:center;
  }
  .link{
    text-decoration:none;
    color: var(--text);
    border:1px solid var(--border-soft);
    /* consistent "pill" geometry */
    padding:10px 16px;
    min-height:38px;
    border-radius:14px;
    font-weight:900;
    font-size:13px;
    font-family: var(--font-main);
    letter-spacing:0.10em;
    line-height:1;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor: pointer;
    background: transparent;
    /* ensure border never visually kisses adjacent elements */
    background-clip: padding-box;
    transition:
      transform var(--dur1) var(--ease),
      border-color var(--dur1) var(--ease),
      background var(--dur1) var(--ease);
  }
  button.link{ -webkit-appearance:none; appearance:none; }
  .link:hover{ transform: translateY(-2px); border-color: rgba(var(--accent-rgb), .60); background: rgba(var(--accent-rgb), .10); }
  .link.primary{ border-color: rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .12); }

  /* ===== Preview Animations ===== */
  /* Mini NoteCenter (sticky notes + side terminal) */
  .ncPreview{
  width: 92%;
  height: 112px;
  display:grid;
  grid-template-columns: 1.35fr .9fr;
  gap:10px;
  align-items:stretch;
}
.ncNotes{
  position:relative;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  overflow:hidden;
}
.ncNotes::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(240px 140px at 25% 20%, rgba(var(--accent-rgb), .10), transparent 60%),
    radial-gradient(260px 160px at 70% 80%, rgba(var(--accent2-rgb), .08), transparent 62%);
  opacity:.95;
  pointer-events:none;
}
.noteDot{
  position:absolute;
  width:44px; height:34px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.25);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  background: rgba(255,255,255,.10);
  overflow:hidden;
}
.noteDot::after{
  content:"";
  position:absolute; left:9px; right:9px; top:11px; height:2px;
  background: rgba(0,0,0,.20);
  box-shadow: 0 7px 0 rgba(0,0,0,.18), 0 14px 0 rgba(0,0,0,.12);
  opacity:.55;
}
.n1{ left:10px; top:10px; transform: rotate(-4deg); background: rgba(255,240,120,.18); }
.n2{ left:56px; top:18px; transform: rotate(3deg); background: rgba(255,150,180,.14); }
.n3{ left:22px; top:54px; transform: rotate(2deg); background: rgba(140,220,255,.14); }
.n4{ left:74px; top:58px; transform: rotate(-2deg); background: rgba(170,255,210,.12); }
.ncTermMini{
  position:relative;
  border-radius:12px;
  border:1px solid rgba(var(--accent-rgb), .22);
  background: rgba(0,0,0,.38);
  padding:10px 10px 8px;
  overflow:hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.55);
}
.ncTermMini .h{
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  color: rgba(var(--accent-rgb), .88);
  margin-bottom:6px;
}
.ncTermMini .l{
  font-size:10.5px;
  line-height:1.35;
  color: rgba(215,255,233,.86);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ncCaret{
  display:inline-block;
  width:8px; height:1em;
  background: rgba(var(--accent-rgb), .92);
  transform: translateY(2px);
  animation: blink 1.1s steps(1,end) infinite;
  margin-left:4px;
}
  .preview{
    height: 140px;
    border-radius: 14px;
    border:1px solid rgba(var(--accent-rgb), .18);
    background:
      radial-gradient(600px 240px at 40% 30%, rgba(var(--accent-rgb), .10), transparent 55%),
      radial-gradient(520px 240px at 70% 80%, rgba(var(--accent2-rgb), .08), transparent 60%),
      rgba(0,0,0,.30);
    display:grid;
    place-items:center;
    overflow:hidden;
    position:relative;
    margin-top:10px;
  }
  .preview::after{
    content:"";
    position:absolute; inset:0;
    border-radius:inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    pointer-events:none;
  }
  /* Mini Orby sphere */
  .miniSphere{
    width:72px; height:72px; border-radius:999px;
    background:
      radial-gradient(circle at 26% 26%, rgba(var(--accent-rgb), .95), rgba(0,0,0,0) 58%),
      radial-gradient(circle at 68% 74%, rgba(var(--accent2-rgb), .18), rgba(0,0,0,0) 62%),
      radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), .08), rgba(0,0,0,0) 72%);
    filter: saturate(1.18);
    opacity:.92;
    animation: sphereBreath 1.9s var(--ease) infinite;
    position:relative;
    will-change: transform;
  }
  .miniSphere::before{
    content:"";
    position:absolute; inset:-8px;
    border-radius:inherit;
    background: radial-gradient(circle at 50% 50%,
      rgba(var(--accent-rgb), 0) 46%,
      rgba(var(--accent-rgb), .18) 63%,
      rgba(var(--accent-rgb), 0) 77%);
    filter: drop-shadow(0 0 16px rgba(var(--accent-rgb), .28));
    opacity:.85;
  }
  @keyframes sphereBreath{
    0%,100%{ transform: translateY(0) scale(1); }
    50%{ transform: translateY(-6px) scale(1.05); }
  }
  /* Mini Cube (CSS 3D) */
  .miniCubeScene{ width:78px; height:78px; perspective:520px; }
  .miniCube{
    width:78px; height:78px; position:relative; transform-style:preserve-3d;
    animation: cubeSpin 4.2s linear infinite;
    will-change: transform;
  }
  @keyframes cubeSpin{
    0%{ transform: rotateX(-18deg) rotateY(22deg); }
    50%{ transform: rotateX(-30deg) rotateY(210deg); }
    100%{ transform: rotateX(-18deg) rotateY(382deg); }
  }
  .f{
    position:absolute; inset:0;
    background: rgba(var(--accent-rgb), .06);
    border:1px solid rgba(var(--accent-rgb), .35);
    box-shadow: inset 0 0 20px rgba(var(--accent-rgb), .08);
  }
  .f1{ transform: rotateY(0deg) translateZ(39px); }
  .f2{ transform: rotateY(90deg) translateZ(39px); }
  .f3{ transform: rotateY(180deg) translateZ(39px); }
  .f4{ transform: rotateY(-90deg) translateZ(39px); }
  .f5{ transform: rotateX(90deg) translateZ(39px); }
  .f6{ transform: rotateX(-90deg) translateZ(39px); }
  /* Mini Wordbeat typing */
  .typeWrap{ width: 88%; max-width: 260px; }
  .typeHdr{
    font-size:11px; color:rgba(var(--accent-rgb), .85); font-weight:900; letter-spacing:.12em; text-transform:uppercase;
    margin-bottom:8px;
  }
  .fakeInput{
    height:40px;
    border-radius:12px;
    border:1px solid rgba(var(--accent-rgb), .25);
    background: rgba(0,0,0,.35);
    display:flex; align-items:center;
    padding:0 12px;
    gap:8px;
  }
  .typed{ font-weight:900; letter-spacing:.04em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .caret{
    width:9px; height:18px; background: rgba(var(--accent-rgb), .92);
    animation: blink 1.1s steps(1,end) infinite;
  }
  /* Mini HopHop character */
  .hopWorld{ position:relative; width: 100%; height:100%; }
  .platform{
    position:absolute; left:18%; right:18%; bottom:26px; height:10px;
    border-radius:999px;
    background: rgba(255,255,255,.06);
    border:1px solid rgba(var(--accent-rgb), .22);
    box-shadow: 0 0 24px rgba(var(--accent-rgb), .08);
  }
  .hopper{
    position:absolute; left:50%; bottom:36px;
    width:22px; height:22px;
    transform: translateX(-50%);
    border-radius:6px;
    background: rgba(var(--accent-rgb), .22);
    border:1px solid rgba(var(--accent-rgb), .55);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), .18);
    animation: hop 1.2s var(--ease) infinite;
    will-change: transform;
  }
  .hopper::before{
    content:"";
    position:absolute; left:5px; top:6px; width:4px; height:4px; border-radius:2px;
    background: rgba(255,255,255,.85);
    box-shadow: 8px 0 0 rgba(255,255,255,.85);
    opacity:.92;
  }
  .hopper::after{
    content:"";
    position:absolute; left:7px; bottom:4px; width:8px; height:3px; border-radius:999px;
    background: rgba(0,0,0,.35);
    opacity:.6;
  }
  @keyframes hop{
    0%,100%{ transform: translateX(-50%) translateY(0) rotate(0deg); }
    45%{ transform: translateX(-50%) translateY(-22px) rotate(-6deg); }
    65%{ transform: translateX(-50%) translateY(-12px) rotate(5deg); }
  }

  /* New game preview animations */
  @keyframes polyBounce{
    0%,100%{ transform: translateY(0); }
    50%{ transform: translateY(-8px); }
  }
  @keyframes targetPulse{
    0%,100%{ transform: scale(1); opacity: 1; }
    50%{ transform: scale(1.1); opacity: .8; }
  }
  @keyframes eggFloat{
    0%,100%{ transform: translateY(0) rotate(-3deg); }
    50%{ transform: translateY(-6px) rotate(3deg); }
  }
  @keyframes rpsFlash{
    0%,100%{ transform: scale(1); }
    50%{ transform: scale(1.15); }
  }
  @keyframes towerPulse{
    0%,100%{ box-shadow: 0 0 16px rgba(0,255,255,.5); }
    50%{ box-shadow: 0 0 24px rgba(0,255,255,.9); }
  }
  @keyframes beamFlash{
    0%,100%{ opacity: 0; width: 2px; }
    50%{ opacity: 1; width: 50px; }
  }
  @keyframes enemyMove{
    0%{ transform: translateX(0) scale(1); }
    50%{ transform: translateX(8px) scale(0.95); }
    100%{ transform: translateX(0) scale(1); }
  }

  /* Neon TD Preview */
  .neonTdPreview{
    position:relative;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    background: #070012;
  }
  .tdGrid{
    position:absolute;
    inset:0;
    background-image:
      repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(0,255,255,.06) 19px, rgba(0,255,255,.06) 20px),
      repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(0,255,255,.06) 19px, rgba(0,255,255,.06) 20px);
    opacity:.35;
  }
  .tdPath{
    position:absolute;
    left:20%;
    top:35%;
    width:60%;
    height:30%;
    background: rgba(18,0,32,.88);
    border-radius:4px;
    box-shadow: 0 0 20px rgba(255,0,255,.15);
  }
  .tdTower{
    position:relative;
    width:32px;
    height:32px;
    background: rgba(0,255,255,.08);
    border:2px solid rgba(0,255,255,.75);
    box-shadow: 0 0 18px rgba(0,255,255,.5), inset 0 0 10px rgba(0,255,255,.12);
    z-index:3;
    animation: tdTowerGlow 1.5s ease-in-out infinite;
  }
  .tdUpgradeRing{
    position:absolute;
    inset:-6px;
    border-radius:50%;
    border:2px solid transparent;
    border-top-color: rgba(255,0,80,.7);
    border-right-color: rgba(255,107,0,.7);
    animation: tdRingSpin 3s linear infinite;
  }
  .tdCore{
    position:absolute;
    left:50%;
    top:50%;
    width:8px;
    height:8px;
    transform:translate(-50%,-50%);
    background: rgba(255,255,255,.85);
    border-radius:50%;
    box-shadow: 0 0 10px rgba(0,255,255,.9);
  }
  .tdBeam{
    position:absolute;
    left:50%;
    top:50%;
    width:0px;
    height:2px;
    background: linear-gradient(90deg, rgba(0,255,255,.95), transparent);
    transform-origin: left center;
    animation: tdBeamShoot 1.2s ease-in-out infinite;
    z-index:2;
    filter: drop-shadow(0 0 4px rgba(0,255,255,.8));
  }
  .tdEnemy{
    position:absolute;
    width:14px;
    height:14px;
    border-radius:50%;
    background: rgba(255,0,255,.9);
    box-shadow: 0 0 14px rgba(255,0,255,.7);
    z-index:1;
  }
  .tdEnemy.td1{
    left:25%;
    top:50%;
    animation: tdEnemyPath1 2.5s ease-in-out infinite;
  }
  .tdEnemy.td2{
    left:30%;
    top:50%;
    animation: tdEnemyPath1 2.5s ease-in-out infinite .8s;
  }
  .tdSpawn{
    position:absolute;
    left:15%;
    top:50%;
    width:20px;
    height:20px;
    border-radius:50%;
    border:2px solid rgba(255,0,255,.6);
    transform:translate(-50%,-50%);
    animation: tdSpawnPulse 1.8s ease-in-out infinite;
    z-index:0;
  }
  @keyframes tdTowerGlow{
    0%,100%{ box-shadow: 0 0 16px rgba(0,255,255,.5), inset 0 0 10px rgba(0,255,255,.12); }
    50%{ box-shadow: 0 0 28px rgba(0,255,255,.8), inset 0 0 18px rgba(0,255,255,.22); }
  }
  @keyframes tdRingSpin{
    from{ transform: rotate(0deg); }
    to{ transform: rotate(360deg); }
  }
  @keyframes tdBeamShoot{
    0%,100%{ width:0px; opacity:0; }
    15%,85%{ width:45px; opacity:1; }
  }
  @keyframes tdEnemyPath1{
    0%{ transform: translateX(0) translateY(0); }
    50%{ transform: translateX(40px) translateY(-5px); }
    100%{ transform: translateX(80px) translateY(0); }
  }
  @keyframes tdSpawnPulse{
    0%,100%{ transform: translate(-50%,-50%) scale(.8); opacity:.4; }
    50%{ transform: translate(-50%,-50%) scale(1.2); opacity:.8; }
  }

  /* Arena Preview - Pixel-art style matching actual game */
  .arenaPreview{
    position:relative;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    background: radial-gradient(circle at 50% 50%, #1a1528 0%, #0a0511 100%);
    overflow:hidden;
  }
  /* Warrior player - pixel-art character with green cape */
  .arenaPlayer{
    position:relative;
    width:12px;
    height:24px;
    z-index:3;
    animation: arenaPlayerPulse 1.6s ease-in-out infinite;
  }
  .arenaPlayer::before{
    content:'';
    position:absolute;
    width:12px;
    height:16px;
    top:4px;
    background:#8a6a4a;
    box-shadow:
      -2px 0 0 0 #3cff6b,
      14px 0 0 0 #3cff6b,
      0 -2px 0 0 #d4a574,
      4px -2px 0 0 #d4a574;
  }
  .arenaPlayer::after{
    content:'';
    position:absolute;
    width:4px;
    height:6px;
    bottom:0;
    left:0;
    background:#6a5a4a;
    box-shadow: 6px 0 0 0 #6a5a4a;
  }
  .arenaEnemy{
    position:absolute;
    width:12px;
    height:18px;
    z-index:1;
  }
  /* Grunt - red pixel enemy */
  .arenaEnemy.ae1{
    top:18%;
    left:26%;
    animation: arenaEnemyFloat1 2.2s ease-in-out infinite;
  }
  .arenaEnemy.ae1::before{
    content:'';
    position:absolute;
    width:12px;
    height:16px;
    top:4px;
    background:#ff4444;
    box-shadow:
      0 -4px 0 0 #cc2222,
      4px -2px 0 0 #fff,
      -2px 8px 0 4px rgba(0,0,0,.3);
    filter: drop-shadow(0 0 8px rgba(255,136,136,.6));
  }
  /* Runner - orange pixel enemy */
  .arenaEnemy.ae2{
    top:60%;
    right:20%;
    animation: arenaEnemyFloat2 2s ease-in-out infinite .5s;
  }
  .arenaEnemy.ae2::before{
    content:'';
    position:absolute;
    width:12px;
    height:14px;
    top:6px;
    background:#ffaa33;
    box-shadow:
      0 -4px 0 0 #cc8822,
      3px 2px 0 0 #ffee88,
      -2px 10px 0 4px rgba(0,0,0,.3);
    filter: drop-shadow(0 0 8px rgba(255,204,119,.6));
  }
  /* Shooter - pink pixel enemy with glow */
  .arenaEnemy.ae3{
    bottom:20%;
    left:22%;
    animation: arenaEnemyFloat3 2.4s ease-in-out infinite 1s;
  }
  .arenaEnemy.ae3::before{
    content:'';
    position:absolute;
    width:12px;
    height:16px;
    top:4px;
    background:#ff44d9;
    box-shadow:
      0 -4px 0 0 #cc22aa,
      4px -2px 0 0 #ff88ee,
      -2px 10px 0 4px rgba(0,0,0,.3);
    filter: drop-shadow(0 0 10px rgba(255,136,238,.7));
  }
  .arenaShot{
    position:absolute;
    width:16px;
    height:4px;
    left:52%;
    top:26%;
    z-index:2;
    background:#e6edf3;
    box-shadow:
      5px -3px 0 0 #e6edf3,
      5px 3px 0 0 #e6edf3,
      0 0 8px rgba(68,217,255,.9);
    animation: arenaShotFly 1.8s ease-out infinite;
  }
  @keyframes arenaPlayerPulse{
    0%,100%{
      transform: translateY(0) scale(1);
      filter: drop-shadow(0 0 8px rgba(60,255,107,.8));
    }
    50%{
      transform: translateY(-2px) scale(1.05);
      filter: drop-shadow(0 0 12px rgba(60,255,107,1));
    }
  }
  @keyframes arenaEnemyFloat1{
    0%,100%{ transform: translate(0,0) translateY(0); }
    50%{ transform: translate(6px,-8px) translateY(sin(0.5) * 2px); }
  }
  @keyframes arenaEnemyFloat2{
    0%,100%{ transform: translate(0,0) translateY(0); }
    50%{ transform: translate(-8px,6px) translateY(sin(0.5) * 2px); }
  }
  @keyframes arenaEnemyFloat3{
    0%,100%{ transform: translate(0,0) translateY(0); }
    50%{ transform: translate(10px,-5px) translateY(sin(0.5) * 2px); }
  }
  @keyframes arenaShotFly{
    0%{
      transform: translateX(-50%) translateY(0) scale(0);
      opacity:0;
    }
    15%{
      transform: translateX(-50%) translateY(0) scale(1);
      opacity:1;
    }
    85%{ opacity:1; }
    100%{
      transform: translateX(-50%) translateY(-45px) scale(.7);
      opacity:0;
    }
  }

  /* ===== Footer ===== */
  .footer{
    margin-top: 16px;
    padding:12px 14px;
    display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:center;
    color:var(--muted);
    font-size:12px;
  }
  .kbd{
    display:inline-block;
    border:1px solid rgba(255,255,255,.12);
    border-bottom-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.05);
    padding:2px 6px;
    border-radius:8px;
    color:rgba(215,255,233,.88);
    font-weight:900;
  }

  /* ===== Mobile & Responsive ===== */
  /* iOS notch / safe-area friendly */
  body{
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
  }
  /* Better anchor positioning under top spacing */
  #apps, #about, #contact { scroll-margin-top: 18px; }
  @media (max-width: 720px){
    .wrap{ width: min(1100px, 94vw); margin: 18px auto 28px; }
    .topbar{ padding:14px; gap:12px; }
    .brand .sub{ white-space: normal; line-height:1.35; }
    .nav{ gap:8px; }
    .nav a{ padding:10px 12px; font-size:12px; } /* thumb-friendly */
    .sectionTitle{ margin:14px 2px 10px; }
    .grid{ gap:14px; }
  }
  @media (max-width: 520px){
    .wrap{ width: 94vw; margin: 14px auto 22px; }
    .topbar{ flex-direction: column; align-items: flex-start; }
    .nav{ width:100%; justify-content:flex-start; }
    .nav a{ flex: 1 1 auto; text-align:center; }
    .hero{ padding: 18px; }
    .cmd{ padding: 14px; }
    .cmdline{ gap:8px; }
    .cmd p{ font-size:12.5px; }
    .actions{ width:100%; gap:10px; }
    .btn{ flex: 1 1 140px; padding:12px 12px; } /* bigger tap */
    /* Make the decorative sphere feel intentional on small screens */
    .siteSphere{
      width: 180px; height: 180px;
      right: -64px; top: -78px;
      opacity: .55;
    }
    .card{ padding: 14px; }
    .preview{ height: 132px; }
    .footer{ padding: 12px; gap:10px; }
  }
  /* Reduce motion for users who prefer it */
  @media (prefers-reduced-motion: reduce){
    .siteSphere, .miniSphere, .miniCube, .hopper,
    .tdTower, .tdUpgradeRing, .tdBeam, .tdEnemy, .tdSpawn{ animation: none !important; }
    .nav a:hover, .btn:hover, .link:hover, .card:hover{ transform:none; }
  }

  /* ===== Terminal Panel ===== */
  .term{
    margin-top:14px;
    padding:14px;
  }
  .termHeader{
    display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
    margin-bottom:10px;
  }
  .termHeader .left{
    display:flex; gap:10px; align-items:center; flex-wrap:wrap;
    color:var(--muted);
    font-size:12px;
  }
  .dot{
    width:10px; height:10px; border-radius:999px; display:inline-block;
    border:1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
    box-shadow: 0 0 14px rgba(var(--accent-rgb), .10);
  }
  .termHeader .right{
    display:flex; gap:8px; flex-wrap:wrap;
  }
  .chip{
    font: 900 11px/1 ui-monospace, monospace;
    padding:6px 10px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: rgba(215,255,233,.88);
    cursor:pointer;
    transition: transform var(--dur1) var(--ease), border-color var(--dur1) var(--ease), background var(--dur1) var(--ease);
  }
  .chip:hover{ transform: translateY(-1px); border-color: rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .06); }
  .termOut{
    height: 210px;
    overflow:auto;
    border-radius: 14px;
    border:1px solid rgba(var(--accent-rgb), .22);
    background: rgba(0,0,0,.40);
    padding: 12px 12px 10px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.55);
  }
  .termLine{
    display:flex; gap:10px;
    font-size:12.5px;
    line-height:1.55;
    color: rgba(215,255,233,.92);
    white-space:pre-wrap;
  }
  .termLine .p{ color: rgba(var(--accent-rgb), .95); font-weight:900; flex: 0 0 auto;}
  .termLine .t{ color: rgba(215,255,233,.92); }
  .termLine .m{ color: var(--muted); }
  .termLine .err{ color: rgba(255,140,140,.92); font-weight:900; }
  .termDivider{
    margin:10px 0;
    height:1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .22), transparent);
    opacity:.9;
  }
  .termIn{
    margin-top:10px;
    display:flex; gap:10px; align-items:center;
    border-radius: 14px;
    border:1px solid rgba(var(--accent-rgb), .25);
    background: rgba(0,0,0,.35);
    padding: 10px 12px;
  }
  .termIn .p{ color: rgba(var(--accent-rgb), .95); font-weight:900; }
  .termInput{
    appearance:none;
    width:100%;
    border:none;
    outline:none;
    background: transparent;
    color: var(--text);
    font: 900 12.5px/1.2 ui-monospace, monospace;
    letter-spacing: var(--letter);
  }
  .termHint{
    margin-top:8px;
    color: var(--muted);
    font-size:12px;
  }
  @media (max-width:520px){
    .termOut{ height: 220px; }
    .termLine{ font-size:12.2px; }
    .termInput{ font-size:12.2px; }
  }

  /* ===== Theme System ===== */
  body[data-mode="boring"]{
    overflow-x:hidden;
  }
  body[data-mode="boring"] .scanlines,
  body[data-mode="boring"] .noise,
  body[data-mode="boring"] .vignette{ display:none !important; }
  /* Remove terminal vibes in boring mode */
  body[data-mode="boring"] .cmdline .prompt,
  body[data-mode="boring"] .cmdline .blink{ display:none !important; }
  body[data-mode="boring"] .term{ display:none !important; }
  /* Keep the hero copy readable without the prompt */
  body[data-mode="boring"] .cmdline{
    font-weight: 900;
    letter-spacing: .02em;
  }
  body[data-mode="boring"] .cmd{
    border-color: rgba(0,0,0,.10);
    background: rgba(255,255,255,.70);
  }
  body[data-mode="boring"] .siteSphere{
    opacity: .35;
    filter: saturate(1.05) contrast(1.0);
  }

  /* ===== Modern ("Boring") Mode ===== */
  #boringSite{display:none;}
body.mode-boring #terminalSite{display:none;}
body.mode-boring #boringSite{display:block;}
body.mode-boring .scanlines, body.mode-boring .noise{display:none !important;}
/* Modern site styling */
#boringSite{
  color:#0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 55%, #ffffff 100%);
  min-height:100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
#boringSite *{box-sizing:border-box;}
#boringSite a{color:inherit; text-decoration:none;}
#boringSite a:hover{text-decoration:underline;}
.bWrap{max-width:1100px; margin:0 auto; padding:0 20px;}
.bHeader{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.70);
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.bNav{display:flex; align-items:center; justify-content:space-between; padding:14px 0; gap:18px;}
.bBrand{display:flex; align-items:center; gap:12px; min-width:180px;}
.bLogo{
  width:40px; height:40px; border-radius:12px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(37,99,235,.18), rgba(16,185,129,.18));
  border:1px solid rgba(15,23,42,.12);
  font-weight:800;
}
.bTitle{font-weight:800; letter-spacing:-.02em;}
.bSub{font-size:12px; color: rgba(15,23,42,.65); margin-top:2px;}
.bLinks{display:flex; gap:16px; font-weight:600; color: rgba(15,23,42,.80);}
.bCtas{display:flex; gap:10px; align-items:center;}
.bBtn{
  border:1px solid rgba(15,23,42,.14);
  background:#0f172a;
  color:white;
  padding:10px 14px;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
  box-shadow: 0 10px 20px rgba(15,23,42,.08);
}
.bBtn:hover{transform: translateY(-1px);}
.bBtn:active{transform: translateY(0px);}
.bGhost{
  background: rgba(255,255,255,.80);
  color:#0f172a;
}
.bMain{padding-bottom:40px;}
.bHero{padding:42px 0 18px;}
.bHeroGrid{display:grid; grid-template-columns: 1.2fr .8fr; gap:22px; align-items:stretch;}
@media (max-width: 900px){ .bHeroGrid{grid-template-columns:1fr; } .bLinks{display:none;} }
.bBadge{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.75);
  font-weight:700;
  font-size:12px;
}
.bHeroCopy h1{
  margin:14px 0 10px;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing:-.04em;
}
@media (max-width: 700px){ .bHeroCopy h1{font-size:36px;} }
.bHeroCopy p{color: rgba(15,23,42,.72); font-size:16px; line-height:1.55; margin:0 0 16px;}
.bHeroActions{display:flex; gap:10px; flex-wrap:wrap; margin: 8px 0 14px;}
.bStats{display:grid; grid-template-columns: repeat(3, 1fr); gap:10px;}
@media (max-width: 520px){ .bStats{grid-template-columns:1fr;} }
.bStat{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.78);
}
.bStat .k{font-size:12px; color: rgba(15,23,42,.62); font-weight:700;}
.bStat .v{font-size:14px; font-weight:800; margin-top:4px;}
.bHeroCard{
  border-radius:18px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.80);
  box-shadow: 0 18px 50px rgba(15,23,42,.10);
  overflow:hidden;
}
.bHeroCardTop{display:flex; align-items:center; justify-content:space-between; padding:14px 14px; border-bottom:1px solid rgba(15,23,42,.08);}
.bHeroCardTitle{font-weight:900;}
.bPills{display:flex; gap:8px;}
.pill{
  font-size:12px; font-weight:800;
  padding:6px 10px; border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(37,99,235,.08);
}
.bHeroCardBody{padding:14px;}
.bPreviewBox{
  height:170px;
  border-radius:14px;
  border:1px dashed rgba(15,23,42,.22);
  background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(16,185,129,.06));
  display:grid; place-items:center;
}
.bPreviewText{font-weight:800; color: rgba(15,23,42,.55);}
.bMini{margin-top:12px; display:grid; gap:8px;}
.bMiniItem{display:flex; align-items:center; gap:10px; color: rgba(15,23,42,.72); font-weight:650;}
.dot{width:10px; height:10px; border-radius:999px; background: rgba(37,99,235,.35); border:1px solid rgba(15,23,42,.10);}
.bSection{padding:34px 0;}
.bAlt{background: rgba(255,255,255,.55); border-top:1px solid rgba(15,23,42,.06); border-bottom:1px solid rgba(15,23,42,.06);}
.bSectionTop{display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:14px;}
.bSectionTop h2{margin:0; font-size:26px; letter-spacing:-.02em;}
.bSectionTop p{margin:0; color: rgba(15,23,42,.65);}
.bGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}
@media (max-width: 900px){ .bGrid{grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 620px){ .bGrid{grid-template-columns: 1fr;} }
.pCard{
  border-radius:18px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.86);
  padding:14px;
  box-shadow: 0 14px 40px rgba(15,23,42,.08);
  display:flex; flex-direction:column; gap:10px;
  min-height: 180px;
}
.pTop{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.pCard h3{margin:0; font-size:18px; letter-spacing:-.01em;}
.pTag{
  font-size:12px; font-weight:900;
  padding:6px 10px; border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(16,185,129,.10);
  color: rgba(15,23,42,.78);
  white-space:nowrap;
}
.pDesc{color: rgba(15,23,42,.70); line-height:1.5; font-size:14px; margin:0;}
.pActions{display:flex; gap:10px; margin-top:auto;}
.pActions .bBtn{padding:9px 12px; border-radius:12px; font-size:13px;}
.pActions .bGhost{box-shadow:none;}
.bTwo{display:grid; grid-template-columns: 1.2fr .8fr; gap:18px; align-items:start;}
@media (max-width: 900px){ .bTwo{grid-template-columns:1fr;} }
.bCallout{
  border-radius:18px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.86);
  padding:14px;
  box-shadow: 0 14px 40px rgba(15,23,42,.08);
}
.bCalloutTitle{font-weight:900; margin-bottom:6px;}
.bCalloutText{color: rgba(15,23,42,.70); margin-bottom:12px;}
.bContactRow{display:flex; gap:10px; flex-wrap:wrap; margin-top:14px;}
.bContactCard{
  border-radius:18px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.86);
  padding:14px;
  box-shadow: 0 14px 40px rgba(15,23,42,.08);
}
.bContactTitle{font-weight:900; margin-bottom:10px;}
.bQuick{display:grid; grid-template-columns: repeat(2, 1fr); gap:10px;}
.bQuickBtn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.85);
  font-weight:800;
  cursor:pointer;
}
.bQuickBtn:hover{transform: translateY(-1px);}
.bFooter{padding:22px 0 10px; border-top:1px solid rgba(15,23,42,.08); color: rgba(15,23,42,.70);}
.bFoot{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.bFootLinks{display:flex; gap:14px; font-weight:700;}
/* === Boring mode v2 (more modern / professional) === */
#boringSite{
  --bText:#0b1220;
  --bMuted: rgba(11,18,32,.68);
  --bBorder: rgba(15,23,42,.10);
  --bShadow: 0 18px 60px rgba(15,23,42,.10);
  --bBlue: #2563eb;
  --bTeal: #14b8a6;
}
.bHeader{
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 30px rgba(15,23,42,.06);
}
.bLinks a{
  padding:10px 10px;
  border-radius: 12px;
}
.bLinks a:hover{
  background: rgba(37,99,235,.08);
  text-decoration:none;
}
.bBtn{
  transition: transform 140ms var(--ease), box-shadow 220ms var(--ease), background 140ms var(--ease), border-color 140ms var(--ease);
}
.bBtn:hover{
  box-shadow: 0 14px 30px rgba(15,23,42,.14);
}
.bBtn.bGhost{
  background: rgba(255,255,255,.92);
}
.bHero{
  padding: 54px 0 18px;
}
.bHeroCopy h1{
  font-size: clamp(38px, 4.6vw, 56px);
}
.bHeroCopy p{
  font-size: 17px;
}
.bHeroCard{
  border-radius: 22px;
  box-shadow: var(--bShadow);
}
.pCard{
  border-radius: 22px;
  padding: 16px;
  transition: transform 160ms var(--ease), box-shadow 220ms var(--ease), border-color 160ms var(--ease);
}
.pCard:hover{
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(15,23,42,.14);
  border-color: rgba(37,99,235,.20);
}
.pMedia{
  height: 140px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(16,185,129,.06));
  display:grid;
  place-items:center;
  overflow:hidden;
}
.pMedia .preview{
  width: 100%;
  height: 100%;
  margin:0;
  border:none;
  background: transparent;
}

/* Override terminal green colors in boring mode previews for better contrast */
#boringSite .preview .miniSphere {
  background:
    radial-gradient(circle at 26% 26%, rgba(37,99,235,.90), rgba(0,0,0,0) 58%),
    radial-gradient(circle at 68% 74%, rgba(20,184,166,.25), rgba(0,0,0,0) 62%),
    radial-gradient(circle at 50% 50%, rgba(37,99,235,.12), rgba(0,0,0,0) 72%);
}
#boringSite .preview .miniSphere::before {
  background: radial-gradient(circle at 50% 50%,
    rgba(37,99,235,0) 46%,
    rgba(37,99,235,.22) 63%,
    rgba(37,99,235,0) 77%);
  filter: drop-shadow(0 0 16px rgba(37,99,235,.35));
}

#boringSite .preview .f {
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.40);
  box-shadow: inset 0 0 20px rgba(37,99,235,.10);
}

#boringSite .preview .ncTermMini {
  border-color: rgba(37,99,235,.30);
  background: rgba(15,23,42,.90);
}
#boringSite .preview .ncTermMini .h {
  color: rgba(37,99,235,.95);
}
#boringSite .preview .ncTermMini .l span {
  color: rgba(37,99,235,.95) !important;
}
#boringSite .preview .ncCaret {
  background: rgba(37,99,235,.95);
}

#boringSite .preview .typeHdr {
  color: rgba(37,99,235,.90);
}
#boringSite .preview .fakeInput {
  border-color: rgba(37,99,235,.30);
  background: rgba(15,23,42,.85);
}
#boringSite .preview .caret {
  background: rgba(37,99,235,.95);
}
#boringSite .preview .typed {
  color: #e2e8f0;
}

#boringSite .preview .platform {
  border-color: rgba(37,99,235,.30);
  box-shadow: 0 0 24px rgba(37,99,235,.12);
}
#boringSite .preview .hopper {
  background: rgba(37,99,235,.25);
  border-color: rgba(37,99,235,.60);
  box-shadow: 0 0 18px rgba(37,99,235,.22);
}
.pMeta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color: rgba(15,23,42,.70);
  font-weight:650;
  font-size: 13px;
}
.bSectionTop h2{
  font-size: 30px;
}
.bFeatGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px){ .bFeatGrid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 620px){ .bFeatGrid{ grid-template-columns: 1fr;} }
.bFeat{
  border-radius: 22px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.86);
  padding: 16px;
  box-shadow: 0 14px 40px rgba(15,23,42,.08);
}
.bFeat h3{margin:0 0 6px; font-size: 16px; letter-spacing:-.01em;}
.bFeat p{margin:0; color: rgba(15,23,42,.70); line-height:1.55;}
.bDivider{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15,23,42,.10), transparent);
  margin: 18px 0;
}
.bForm{
  display:grid;
  gap:10px;
}
.bField{
  display:grid;
  gap:6px;
}
.bLabel{
  font-weight: 800;
  font-size: 12px;
  color: rgba(15,23,42,.72);
}
.bInput, .bTextarea{
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 16px;
  padding: 12px 12px;
  font: 650 14px/1.2 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: rgba(255,255,255,.92);
  outline: none;
}
.bTextarea{ min-height: 120px; resize: vertical; }
.bInput:focus, .bTextarea:focus{
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}
.bToast{
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.95);
  box-shadow: 0 14px 50px rgba(15,23,42,.18);
  color: rgba(15,23,42,.78);
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}
.bToast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ===== Hero Computer Illustration (Boring Theme Only) ===== */
.bHeroIllustration {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 20px;
}

.heroComputer {
  width: 100%;
  max-width: 320px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(15, 23, 42, 0.15));
}

/* Monitor subtle float */
.heroComputer .monitor-body,
.heroComputer .monitor-screen {
  animation: monitorFloat 6s ease-in-out infinite;
}

@keyframes monitorFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Screen cursor blink */
.heroComputer .screen-cursor {
  animation: cursorBlink 1s steps(1, end) infinite;
}

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

/* Screen glow pulse */
.heroComputer .monitor-glow {
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.22; }
}

/* Key press animation - base state */
.heroComputer .key {
  transition: transform 80ms ease-out, fill 80ms ease-out;
  transform-origin: center center;
  transform-box: fill-box;
}

/* Key pressed state (toggled via JS) */
.heroComputer .key.pressed {
  transform: translateY(1px) scale(0.95);
  fill: #3b82f6 !important;
}

/* Floating particles */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  opacity: 0.4;
}

.particle.p1 {
  top: 20%;
  left: 15%;
  animation: particleFloat 8s ease-in-out infinite;
}

.particle.p2 {
  top: 60%;
  right: 10%;
  width: 4px;
  height: 4px;
  animation: particleFloat 6s ease-in-out infinite 1s;
}

.particle.p3 {
  bottom: 25%;
  left: 25%;
  width: 5px;
  height: 5px;
  animation: particleFloat 7s ease-in-out infinite 2s;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  25% {
    transform: translate(10px, -15px) scale(1.1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-5px, -25px) scale(0.9);
    opacity: 0.3;
  }
  75% {
    transform: translate(15px, -10px) scale(1.05);
    opacity: 0.5;
  }
}

/* ===== Modern Motion Polish (Boring Theme) ===== */

/* Enhanced button focus states */
.bBtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 10px 20px rgba(15, 23, 42, 0.08);
}

.bGhost:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* Smooth hover transitions for all interactive elements */
.bBtn {
  transition: transform 160ms var(--ease),
              box-shadow 220ms var(--ease),
              background 140ms var(--ease),
              border-color 140ms var(--ease);
}

.bQuickBtn {
  transition: transform 140ms var(--ease),
              box-shadow 180ms var(--ease),
              background 140ms var(--ease);
}

.bQuickBtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* Enhanced card hover lift */
.pCard {
  transition: transform 180ms var(--ease),
              box-shadow 260ms var(--ease),
              border-color 180ms var(--ease);
}

.pCard:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

.bFeat {
  transition: transform 180ms var(--ease),
              box-shadow 260ms var(--ease);
}

.bFeat:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

/* Input focus enhancement */
.bInput:focus,
.bTextarea:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  transition: border-color 140ms var(--ease), box-shadow 180ms var(--ease);
}

/* Section reveal on load */
.bSection {
  opacity: 0;
  transform: translateY(20px);
  animation: sectionReveal 0.6s var(--ease) forwards;
}

.bSection:nth-child(1) { animation-delay: 0.1s; }
.bSection:nth-child(2) { animation-delay: 0.2s; }
.bSection:nth-child(3) { animation-delay: 0.3s; }
.bSection:nth-child(4) { animation-delay: 0.4s; }
.bSection:nth-child(5) { animation-delay: 0.5s; }

@keyframes sectionReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero reveal (slightly different timing) */
.bHero {
  opacity: 0;
  transform: translateY(16px);
  animation: heroReveal 0.7s var(--ease) 0.05s forwards;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero illustration entrance */
.bHeroIllustration {
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  animation: illustrationReveal 0.8s var(--ease) 0.2s forwards;
}

@keyframes illustrationReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Link hover underline animation */
.bLinks a {
  position: relative;
  overflow: hidden;
}

.bLinks a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: rgba(37, 99, 235, 0.5);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 200ms var(--ease);
}

.bLinks a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Stat card hover */
.bStat {
  transition: transform 160ms var(--ease),
              box-shadow 200ms var(--ease),
              border-color 160ms var(--ease);
}

.bStat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  border-color: rgba(37, 99, 235, 0.18);
}

/* Badge subtle pulse */
.bBadge {
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
  50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08); }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .heroComputer .monitor-body,
  .heroComputer .monitor-screen,
  .heroComputer .screen-cursor,
  .heroComputer .monitor-glow,
  .particle,
  .bSection,
  .bHero,
  .bHeroIllustration,
  .bBadge {
    animation: none !important;
  }

  .bSection,
  .bHero,
  .bHeroIllustration {
    opacity: 1;
    transform: none;
  }

  .pCard:hover,
  .bFeat:hover,
  .bStat:hover,
  .bBtn:hover,
  .bQuickBtn:hover {
    transform: none;
  }
}

/* Mobile adjustments for hero illustration */
@media (max-width: 900px) {
  .bHeroIllustration {
    min-height: 220px;
    margin-top: 20px;
  }

  .heroComputer {
    max-width: 280px;
  }
}



/* ===== Demo-in-monitor overlay (boring mode) ===== */
.bDemoWrap{
  position:absolute;
  inset:0;
  pointer-events:none;
}
.bDemoBackdrop{
  position:fixed;
  inset:0;
  background: rgba(2,6,23,.38);
  backdrop-filter: blur(6px);
  opacity:0;
  transition: opacity 220ms ease;
  z-index: 60;
}
.bDemoWrap.is-open .bDemoBackdrop{
  opacity:1;
  pointer-events:auto;
}
.bDemoScreen{
  position:absolute;
  /* Match the SVG monitor-screen rect: x=52 y=32 w=216 h=120 in viewBox 320x260 */
  left:16.25%;
  top:12.3077%;
  width:67.5%;
  height:46.1538%;
  border-radius: 10px;
  overflow:hidden;
  background: #0b1220;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 50px rgba(2,6,23,.35);
  opacity:0;
  transform: scale(.92);
  transform-origin: center;
  transition: transform 220ms ease, opacity 220ms ease;
  z-index: 61;
}
.bDemoWrap.is-open .bDemoScreen{
  opacity:1;
  transform: scale(1);
  pointer-events:auto;
}
.bDemoTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.02));
  border-bottom: 1px solid rgba(255,255,255,.10);
  font-size: 12px;
  color: rgba(255,255,255,.86);
}
.bDemoTitle{
  font-weight: 800;
  letter-spacing: .02em;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.bDemoBtns{ display:flex; gap:8px; }
.bDemoBtn{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.88);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.bDemoBtn:hover{ background: rgba(255,255,255,.10); }
.bDemoViewport{
  position:relative;
  width:100%;
  height: calc(100% - 34px);
}
.bDemoViewport canvas{
  display:block;
  width:100%;
  height:100%;
}
.bDemoViewport canvas:focus{
  outline: 2px solid rgba(59,130,246,.70);
  outline-offset: -2px;
}
body.demo-open #boringSite .bHeroIllustration{
  scroll-margin-top: 90px;
}
body.demo-open #boringSite .bHeroIllustration.demo-focus .bDemoScreen{
  box-shadow: 0 22px 70px rgba(2,6,23,.55);
}
.bDemoHint{
  position:absolute;
  left:10px;
  bottom:10px;
  right:10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(2,6,23,.55);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.80);
  font-size: 11px;
  pointer-events:none;
  opacity:0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.bDemoWrap.show-hint .bDemoHint{
  opacity:1;
  transform: translateY(0);
}



/* ===== Mobile polish for demo actions ===== */
.cardActions .link,
.cardActions .demoBtn,
.pActions .bBtn{
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (max-width: 520px){
  /* Give OPEN/DEMO room + consistent tap targets */
  .cardActions{ flex-wrap: wrap; gap: 10px; }
  .cardActions .link{ flex: 1 1 140px; padding: 12px 14px; font-size: 14px; }
  .cardActions .demoBtn{ flex: 1 1 180px; }
}

/* Label demos as desktop-recommended on touch devices (still shows the game) */
@media (hover: none), (pointer: coarse){
  .cardActions .demoBtn{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    line-height:1.1;
  }
  .cardActions .demoBtn::after{
    content:"Desktop recommended";
    font-size:11px;
    font-weight:800;
    letter-spacing:.01em;
    opacity:.72;
  }
}
