/* site.css — the shared look for the new layout (PUR-009 Plan c, 2026-10-05).
   One file: the sticky top with its sideways-scrolling chip bar, the full-width art stage, the detail card,
   the area tiles, the footer link columns, and the two tests (THE GLASS = width, THE MOUSE = pointer). */
:root{ --paper:#e9e4d7; --gold:#c98a1e; --blue:#7aa0ff; --navy:#16213e; --navyline:#2c4a8a; --red:#cf4b43; }
*{box-sizing:border-box} html,body{margin:0;min-height:100%}
body{background:#15140f;color:var(--paper);font-family:'Segoe UI',system-ui,sans-serif;min-height:100vh;
     background-image:radial-gradient(#ffffff08 1px,transparent 1px);background-size:24px 24px;}

/* ---- top: brand row + chip bar (chips are rendered by nav.js) ---- */
.top{position:sticky;top:0;z-index:30;background:linear-gradient(180deg,#2c281f,#211e17);border-bottom:1px solid #ffffff14}
.brand{padding:9px 16px 4px;font-size:17px;font-weight:700;letter-spacing:-.3px}
.brand b{color:var(--gold)}
.brand .t{display:block;font-family:'Consolas',monospace;font-size:10px;color:#b3a98f;font-weight:400;margin-top:1px}
.chips{display:flex;gap:8px;overflow-x:auto;padding:6px 16px 9px;white-space:nowrap;
     scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
.chips::-webkit-scrollbar{display:none}
.chips a{flex:0 0 auto;scroll-snap-align:start;font-family:'Consolas',monospace;font-size:12px;color:#d8cfb6;text-decoration:none;
     border:1px solid #ffffff1f;border-radius:16px;padding:6px 13px;background:#ffffff0a}
.chips a:hover{background:#ffffff18;color:#fff}
.chips a.here{border-color:var(--gold);color:#ffe6b3;background:#c98a1e22}

/* ---- page body ---- */
.wrap{position:relative;max-width:1280px;margin:0 auto;padding:12px 12px 28px}
.cap{font-family:'Consolas',monospace;font-size:11px;color:#b3a98f;text-align:center;margin-bottom:8px}
h1{font-size:26px;margin:0 0 4px;color:#ffe6b3;letter-spacing:-.4px}
.lede{font-size:13px;color:#b3a98f;margin:0 0 16px}

/* ---- the art stage: fills the glass, no side panels ---- */
.stagewrap{position:relative;scroll-margin-top:96px}
.stage{position:relative;width:100%;border-radius:10px;overflow:hidden;
     box-shadow:0 10px 32px #000b, inset 0 0 0 1px #ffffff18;background:#0c0b08;touch-action:manipulation}
.stage img.base{position:absolute;inset:0;width:100%;height:100%;display:block;filter:grayscale(1) contrast(.92) brightness(.7)}
/* the bloom: a full-colour copy clipped to the region polygon with CSS (iOS Safari repaints this; SVG image clips it does not) */
.stage img.rev{position:absolute;inset:0;width:100%;height:100%;display:none;pointer-events:none}
.stage svg.map{position:absolute;inset:0;width:100%;height:100%}
.stage svg.map .hit{fill:#fff;fill-opacity:0;pointer-events:fill;cursor:pointer}
.stage.show svg.map .hit{fill-opacity:.06;stroke:#7aa0ff55;stroke-width:1;vector-effect:non-scaling-stroke}
.stage .lbl{position:absolute;z-index:5;font-family:'Consolas',monospace;font-size:11px;white-space:nowrap;color:#fff;
     background:#000000d0;border:1px solid #ffffff44;border-radius:5px;padding:2px 7px;opacity:0;transform:translate(-50%,-135%);pointer-events:none}
.stage .lbl.on{opacity:1}

/* ---- the detail card: pops up in the quadrant away from the region ---- */
.card{position:absolute;z-index:10;width:min(34%,340px);min-width:210px;background:#0e1424f2;border:1.5px solid #7aa0ff;
     border-radius:10px;padding:11px 13px;box-shadow:0 8px 26px #000c;opacity:0;visibility:hidden;transition:opacity .12s}
.card.on{opacity:1;visibility:visible}
.card.q-tl{top:3%;left:2%} .card.q-tr{top:3%;right:2%} .card.q-bl{bottom:3%;left:2%} .card.q-br{bottom:3%;right:2%}
.card .k{font-family:'Consolas',monospace;font-size:9px;letter-spacing:1.4px;color:#6f86b8}
.card h4{margin:2px 0 4px;font-size:16px;color:#ffe6b3}
.card p{margin:0;font-size:12.5px;line-height:1.5;color:#cdd9f2}
.card .go{display:inline-block;margin-top:8px;font-size:12.5px;font-weight:700;color:#15140f;background:var(--gold);
     border-radius:6px;padding:5px 12px;text-decoration:none}
.card .soon{display:inline-block;margin-top:8px;font-family:'Consolas',monospace;font-size:11px;color:#8a8270}

/* ---- area tiles under the art: lit by the same hover ---- */
.tlab{font-family:'Consolas',monospace;font-size:10px;letter-spacing:1.4px;color:#6f86b8;margin:16px 0 8px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:7px}
.ftile{display:flex;align-items:center;gap:9px;background:var(--navy);border:1.5px solid var(--navyline);border-radius:8px;
     padding:9px 10px;color:#bcd0f5;opacity:.7;cursor:pointer;transition:opacity .14s,border-color .14s,background .14s}
.ftile.wired{border-left:3px solid var(--gold)}
.ftile.lit{opacity:1;border-color:#7aa0ff;background:#1e3566;color:#fff}
.ftile .dot{width:9px;height:9px;border-radius:50%;background:#3a5bd0;flex:0 0 auto}
.ftile.lit .dot{background:#9ec0ff}
.ftile .nm{font-size:12.5px;font-weight:600}
.note{font-size:11.5px;color:#8a8270;margin-top:14px;line-height:1.5}
.wires{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:20}   /* on the page, so zoom and scroll keep it anchored */

/* ---- footer link columns ---- */
.links{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:22px;padding-top:14px;border-top:1px solid #ffffff12}
.links h3{font-family:'Consolas',monospace;font-size:10px;letter-spacing:1.5px;color:#b3a98f;margin:0 0 8px;border-bottom:1px solid #ffffff14;padding-bottom:5px}
.links a,.links span.dead{display:block;font-size:12.5px;color:#e3dcc8;text-decoration:none;padding:4px 8px;border-radius:5px;margin-bottom:3px;border:1px solid transparent}
.links a:hover{background:#ffffff12;border-color:#ffffff20;color:#fff}
.links span.dead{color:#9d937a}
.links small{color:#8a8270;font-size:9.5px;font-family:'Consolas',monospace;margin-left:4px}
.links .ld{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px;vertical-align:middle}
.links .g{background:#2f9457}.links .r{background:var(--red)}.links .b{background:#4a5bd0}.links .gold{background:var(--gold)}

/* ---- a plain picture page (about me) ---- */
.pic{display:block;width:100%;height:auto;border-radius:10px;box-shadow:0 10px 32px #000b, inset 0 0 0 1px #ffffff18}

/* ---- THE GLASS: narrow screen ---- */
@media (max-width:700px){
  .wrap{padding:8px 8px 24px}
  .card,.card.q-tl,.card.q-tr,.card.q-bl,.card.q-br{position:static;width:auto;min-width:0;margin-top:10px;
       opacity:1;visibility:visible;box-shadow:none}
  .tiles{grid-template-columns:repeat(2,1fr)}
  .links{grid-template-columns:repeat(2,1fr)}
}

/* ---- sub pages (generated from the master content document, PUR-010) ---- */
.page{max-width:960px}
.banner{border-radius:10px;overflow:hidden;background:#0c0b08;box-shadow:0 10px 32px #000b, inset 0 0 0 1px #ffffff18;margin-bottom:18px}
.banner img{display:block;width:100%;height:auto;max-height:46vh;object-fit:contain;background:#0c0b08}
article{font-size:14.5px;line-height:1.6;color:#cfc7b2}
article h2{font-size:19px;color:#ffe6b3;text-align:center;margin:28px 0 10px;padding-bottom:6px;border-bottom:1px solid #ffffff1f}
article h3{font-size:15px;color:#ffe6b3;margin:18px 0 6px}
article p{margin:0 0 8px}
article strong{color:#fff}
article ul{margin:4px 0 12px;padding-left:22px}
article li{margin:0 0 6px}
article ul.cites{list-style:none;padding-left:0}
article ul.cites li{font-size:13px;padding:6px 10px;border-left:3px solid #2c4a8a;background:#16213e66;border-radius:0 6px 6px 0;margin-bottom:6px}
article ul.cites a{color:#a9c2ff;text-decoration:none}
article ul.cites a:hover{text-decoration:underline;color:#cfe0ff}
article .pdf{display:inline-block;font-family:'Consolas',monospace;font-size:10px;color:#ffe6b3;border:1px solid var(--gold);border-radius:4px;padding:1px 6px;margin-left:6px;vertical-align:1px}
article figure{margin:14px auto;text-align:center}
article figure img{max-width:100%;height:auto;border-radius:8px;box-shadow:0 8px 26px #000a;background:#fff}

/* ---- the splash: a 4x4 grid of tiles, each jumping to its page ---- */
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;max-width:1120px;margin:8px auto 0}
.tile{display:flex;flex-direction:column;border-radius:14px;overflow:hidden;background:linear-gradient(180deg,#2a3f78,#16213e);
     border:1.5px solid #4e6fc2;box-shadow:0 10px 26px #000b;text-decoration:none;color:#e9f0ff;transition:transform .14s,box-shadow .14s,border-color .14s}
.tile:hover{transform:translateY(-3px);border-color:#9ec0ff;box-shadow:0 14px 34px #000d}
.tile img{display:block;width:100%;aspect-ratio:236/200;object-fit:cover;background:#fff}
.tile .lbl{padding:9px 8px;text-align:center;font-size:15px;font-weight:600;letter-spacing:-.2px}
.tile.me{background:linear-gradient(180deg,#7fb07a,#4e7d49);border-color:#a7d5a2;color:#f4fff2}
.tile.gray{background:linear-gradient(180deg,#d9d9d9,#bfbfbf);border-color:#e6e6e6;cursor:default;box-shadow:0 6px 18px #0008}
.tile.gray:hover{transform:none}
/* @media (max-width:700px){ .grid{grid-template-columns:repeat(2,1fr);gap:10px} .tile .lbl{font-size:13px} .page article{font-size:14px} } */   /* DEAD 2026-10-19 */
/* 2026-10-19 (Bob): smaller home tiles, three per line on a phone; the movie reel goes two-up with a smaller play button */
@media (max-width:700px){ .grid{grid-template-columns:repeat(3,1fr);gap:8px} .tile{border-radius:10px} .tile .lbl{font-size:11.5px;padding:6px 4px;line-height:1.2}
  .page article{font-size:14px} }

/* ---- page buttons under the banner (Movies · Papers · Home) and the movie collection ---- */
.pagebar{display:flex;gap:8px;flex-wrap:wrap;margin:-6px 0 14px}
.btn{font-family:'Consolas',monospace;font-size:12px;color:#ffe6b3;text-decoration:none;border:1px solid var(--gold);border-radius:6px;padding:6px 12px;background:#c98a1e1a}
.btn:hover{background:var(--gold);color:#15140f}
section.movie{scroll-margin-top:110px;margin-bottom:34px}
section.movie video,section.movie .soonwrap{display:block;width:100%;max-width:960px;margin:0 auto;border-radius:10px;overflow:hidden;background:#000;
     box-shadow:0 10px 32px #000b, inset 0 0 0 1px #ffffff18}
section.movie .soonwrap{position:relative}
section.movie .soonwrap img{display:block;width:100%;height:auto;filter:grayscale(.3) brightness(.75)}
section.movie .soontag{position:absolute;right:12px;bottom:12px;font-family:'Consolas',monospace;font-size:12px;color:#ffe6b3;background:#000000c0;border:1px solid var(--gold);border-radius:6px;padding:5px 10px}
section.movie p{text-align:center;color:#9a917c;font-size:13px;margin-top:8px}
/* a subject with several movies lays them out two-up; one movie keeps the full 960 width; phones stack (2026-10-12) */
/* section.movie .reel{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,400px),1fr));gap:22px 18px;max-width:960px;margin:0 auto} */   /* DEAD 2026-10-19 */
/* 2026-10-19 (Bob): tiles half as wide: four-up on a desktop, two-up on a phone (rule in THE GLASS below).
   auto-fill (not auto-fit) so a row with one movie keeps the same tile width instead of stretching to 960 */
section.movie .reel{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:20px 14px;max-width:960px;margin:0 auto}
section.movie .reel figure{margin:0}
/* a movie tile is a poster + play button linking to watch.html, the full-screen player (handoff from autonomyAlgorithms, 2026-10-12) */
section.movie .playlink{position:relative;display:block;width:100%;max-width:960px;margin:0 auto;border-radius:10px;overflow:hidden;background:#000;
     box-shadow:0 10px 32px #000b, inset 0 0 0 1px #ffffff18}
section.movie .playlink img{display:block;width:100%;height:auto}
section.movie .playbtn{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:48px;height:48px;border-radius:50%;   /* 64 -> 48 with the half-width tiles, 2026-10-19 */
  background:#000000b0;border:2px solid var(--gold);color:#ffe6b3;font-size:20px;display:flex;align-items:center;justify-content:center;padding-left:4px;box-sizing:border-box}
section.movie .playlink:hover .playbtn{background:var(--gold);color:#000}
/* THE GLASS for the movie reel (2026-10-19): two-up on a phone, smaller play button + caption. Must sit after the rules above. */
@media (max-width:700px){
  section.movie .reel{grid-template-columns:repeat(2,1fr);gap:14px 10px}
  section.movie .playbtn{width:40px;height:40px;font-size:17px;padding-left:3px}
  section.movie p{font-size:11.5px;line-height:1.3;margin-top:5px}
}
/* jump list: a bullet list at the top of a long page whose items scroll to the matching section (Bob's pattern, 2026-10-08) */
article ul.jumps{list-style:none;padding-left:0;display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 16px}
article ul.jumps li{margin:0}
article ul.jumps a{display:inline-block;font-size:13px;color:#ffe6b3;text-decoration:none;border:1px solid var(--gold);border-radius:16px;padding:5px 12px;background:#c98a1e1a}
article ul.jumps a:hover{background:var(--gold);color:#15140f}
article h2{scroll-margin-top:110px}
