@font-face { font-family: "Gamer"; src: url("/assets/fonts/gamer.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Press"; src: url("/assets/fonts/press.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Mono"; src: url("/assets/fonts/mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mono"; src: url("/assets/fonts/mono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0a1440;
  --tv: #0d1d52;
  --ink: #2a2016;
  --edge: #3a2c1c;
  --cream: #f6eed6;
  --cream-2: #efe3c2;
  --gold-1: #b88d3a;
  --gold-2: #f2d98f;
  --gold-3: #e3bf62;
  --gold-text: #b38a3c;
  --label: #d6b874;
  --sky: #8db4e8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--navy); overflow-x: clip; }
body { font-family: "Mono", ui-monospace, monospace; color: var(--ink); overflow-x: clip; min-height: 100svh; -webkit-font-smoothing: antialiased; }
img, svg, canvas, video { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }
a, button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* our blue background */
.bg { position: fixed; inset: -40px; z-index: -1; background: url("/assets/img/bg-blur.jpg") center / cover no-repeat; filter: saturate(1.3) brightness(.95); }
.bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(141,180,232,.15) 0%, rgba(10,20,64,.55) 100%); }

/* ---------- shared window chrome ---------- */
.scan {
  background-color: var(--cream);
  background-image: repeating-linear-gradient(0deg, rgba(60,40,10,.06) 0 1px, transparent 1px 4px);
}
.win {
  position: absolute;
  background-color: var(--cream);
  background-image: repeating-linear-gradient(0deg, rgba(60,40,10,.06) 0 1px, transparent 1px 4px);
  border: 3px solid var(--edge);
  box-shadow: 0 0 0 3px var(--cream-2), 0 24px 60px rgba(5,10,40,.45);
  padding: 10px;
}
.bar {
  display: flex; align-items: center; gap: 8px; height: 38px;
}
.bar-t {
  flex: 1; height: 100%; display: flex; align-items: center; padding: 0 12px;
  font-family: "Press"; font-size: 15px; color: var(--cream);
  text-shadow: 2px 2px 0 var(--edge);
  background: linear-gradient(90deg, var(--gold-1), var(--gold-2) 65%, var(--gold-3));
  border: 3px solid var(--edge); border-radius: 6px;
  box-shadow: inset 0 -4px 0 rgba(90,60,10,.25);
}
.bar-x, .bar-sq, .bar-grid {
  height: 100%; min-width: 38px; display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--edge); border-radius: 6px; background: var(--cream);
  font-family: "Press"; font-size: 11px; color: var(--edge); text-decoration: none;
}
.bar-x { padding: 0 10px; background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); }
.bar-x:hover { filter: brightness(1.08); }
.bar-sq { background: #2a1e3a; }
.bar-grid { background: radial-gradient(circle, var(--edge) 1.5px, transparent 2px) 0 0 / 7px 7px, var(--cream); min-width: 46px; }
.ctrl { display: flex; align-items: center; gap: 6px; margin: 10px 0 12px; }
.pill { width: 30px; height: 12px; border: 3px solid var(--edge); border-radius: 8px; }
.sq { margin-left: auto; display: flex; gap: 6px; }
.sq i { width: 18px; height: 18px; border: 3px solid var(--edge); border-radius: 3px; background: var(--gold-3); }

.box { border: 3px solid var(--edge); padding: 12px 14px; background: rgba(255,255,255,.35); }
.lbl { font-family: "Press"; font-size: 10px; color: var(--label); margin-bottom: 10px; letter-spacing: .02em; }

.gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Press"; color: var(--edge); text-decoration: none;
  background: linear-gradient(90deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3));
  border: 3px solid var(--edge); border-radius: 4px;
  box-shadow: 4px 4px 0 var(--edge);
  transition: transform .1s, box-shadow .1s, filter .1s;
}
.gold:hover { filter: brightness(1.07); }
.gold:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--edge); }
.gold.big { width: 100%; height: 46px; font-size: 17px; }
.gold.sm { height: 36px; padding: 0 14px; font-size: 11px; }

.nav { width: 40px; height: 26px; border: 3px solid var(--edge); border-radius: 6px; font-family: "Press"; font-size: 12px; color: var(--edge); background: var(--cream); }
.nav:hover { background: var(--gold-2); }

/* ---------- desk: fixed 2000x1240 design canvas scaled to the viewport ---------- */
.desk {
  position: absolute; left: 50%; top: 50%;
  width: 2000px; height: 1240px;
  transform: translate(-50%, -50%) scale(var(--s, .7));
  transform-origin: 50% 50%;
}

.meet { position: absolute; left: 30px; top: 150px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; }
.meet-k {
  display: inline-block; font-family: "Gamer"; font-size: 34px; color: #e7dcc4;
  background: rgba(20,24,60,.55); padding: 4px 22px 2px; margin-left: 46px;
  text-shadow: 3px 3px 0 #1b1838;
}
.meet-t {
  font-family: "Gamer"; font-weight: 400; font-size: 112px; line-height: .9; white-space: nowrap; letter-spacing: 2px;
  color: var(--gold-2);
  text-shadow: 4px 4px 0 var(--gold-1), 8px 8px 0 #6b4f22, 12px 12px 0 rgba(20,24,60,.7);
  background: rgba(20,24,60,.35); padding: 6px 8px 0;
}

.main { left: 535px; top: 170px; width: 940px; height: 940px; z-index: 2; display: flex; flex-direction: column; }
.main-grid { flex: 1; display: grid; grid-template-columns: 453px 1fr; gap: 12px; min-height: 0; }
.left { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.right { display: flex; flex-direction: column; min-height: 0; }

.tv { background: var(--tv); border: 3px solid var(--edge); border-radius: 6px; padding: 12px; color: #e9eefc; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-family: "Press"; font-size: 11px; line-height: 1.8; }
.tv-l { display: flex; flex-direction: column; }
.rec { font-weight: 400; display: inline-flex; align-items: center; gap: 8px; }
.rec i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.tv-meter { width: 168px; height: 16px; background: rgba(255,255,255,.12); position: relative; overflow: hidden; }
.tv-meter i { position: absolute; inset: 0 auto 0 0; width: 70%; background: repeating-linear-gradient(90deg, var(--gold-3) 0 40px, var(--gold-2) 40px 80px); transition: width .25s; }
.screen {
  position: relative; flex: 1; min-height: 0; margin: 10px 0;
  background: radial-gradient(ellipse at 50% 40%, #3a6fd8 0%, #1a3a9a 55%, #0d1d52 100%);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; touch-action: manipulation; overflow: hidden;
}
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px); }
#him { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; transform-origin: 50% 49%; will-change: transform; }
#him.inhale { animation: inhale .55s cubic-bezier(.2,.8,.2,1); }
#him.deep { animation: deep 1.6s cubic-bezier(.2,.8,.2,1); }
@keyframes inhale { 30% { transform: scale(1.06); } 60% { transform: scale(.97); } }
@keyframes deep { 15% { transform: scale(1.1) rotate(-2deg); } 30% { transform: scale(1.12) rotate(2deg); } 45% { transform: scale(1.14) rotate(-2deg); } 60% { transform: scale(1.16) rotate(1deg); } 80% { transform: scale(.95); } }
.desk.shake { animation: shake .5s; }
@keyframes shake { 20% { translate: -6px 3px; } 40% { translate: 6px -4px; } 60% { translate: -4px -2px; } 80% { translate: 3px 4px; } }
.fx { position: absolute; inset: 0; pointer-events: none; }
.word { position: absolute; font-family: "Gamer"; color: var(--gold-2); text-shadow: 3px 3px 0 var(--edge); white-space: nowrap; transform: translate(-50%, -50%); will-change: transform, opacity; }
.tv-bot { display: flex; justify-content: space-between; align-items: center; background: var(--gold-2); color: var(--edge); font-family: "Press"; font-size: 11px; padding: 7px 10px; }
.hint b { font-weight: 400; }

.peek { padding: 8px 10px 10px; }
.peek .lbl { margin-bottom: 8px; }
.peek-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.peek-row button, .eq-grid button { border: 3px solid var(--edge); border-radius: 4px; overflow: hidden; aspect-ratio: 1; background: #111; transition: transform .12s; }
.peek-row button:hover, .eq-grid button:hover { transform: translateY(-3px); }
.peek-row button.on { outline: 3px solid var(--gold-3); outline-offset: 1px; }
.peek-row img, .eq-grid img { width: 100%; height: 100%; display: block; object-fit: contain; }

.path { font-family: "Press"; font-size: 11px; color: var(--label); margin: 4px 0 6px; }
.name { font-family: "Gamer"; font-weight: 400; font-size: 64px; line-height: 1; color: var(--gold-3); text-shadow: 3px 3px 0 #8a6a2a; }
.sub { font-family: "Press"; font-size: 15px; color: var(--gold-text); margin: 12px 0 14px; }
.who { flex: 1; font-size: 16px; line-height: 1.55; overflow: auto; }
.who p + p { margin-top: 14px; }
.ca-box { margin-top: 12px; }
.ca-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ca-row + .ca-row { margin-top: 10px; }
.ca-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.btns { flex-wrap: wrap; }

.mq-wrap { margin-top: 10px; background: #1b1f52; overflow: hidden; border: 3px solid var(--edge); }
.mq { display: flex; width: max-content; animation: mq 50s linear infinite; }
.mq span { font-family: "Press"; font-size: 13px; color: var(--label); white-space: nowrap; padding: 8px 0; word-spacing: 6px; }
@keyframes mq { to { transform: translateX(-50%); } }

/* side windows */
.tweets { left: 45px; top: 492px; width: 427px; }
.tw { padding: 12px 4px 10px; border-bottom: 3px solid var(--edge); margin-bottom: 10px; min-height: 130px; }
.tw-h { display: flex; align-items: center; gap: 10px; }
.tw-h img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--edge); object-fit: cover; }
.tw-h b { display: block; font-family: "Press"; font-size: 12px; font-weight: 400; }
.tw-h span { font-size: 12px; color: var(--gold-text); }
.tw-h em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--gold-text); align-self: flex-start; }
.tw p { margin-top: 12px; font-size: 15px; line-height: 1.45; }
.tw-s { margin-top: 8px; font-size: 12px; color: var(--gold-text); display: flex; gap: 16px; }
.tw-nav { display: flex; align-items: center; justify-content: space-between; }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border: 2px solid var(--edge); border-radius: 50%; }
.dots i.on { background: var(--edge); }

.equip { left: 1535px; top: 112px; width: 300px; z-index: 1; }
.eq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; }
.slider { display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 8px 10px; font-family: "Press"; font-size: 9px; border-radius: 6px; }
.slider input { flex: 1; accent-color: var(--gold-1); height: 14px; }

.pfp { left: 1535px; top: 797px; width: 300px; z-index: 1; }
.pfp-view { margin: 10px 0; border: 3px solid var(--edge); aspect-ratio: 1; background: #ddd; }
.pfp-view canvas { width: 100%; height: 100%; display: block; }
.pfp-row { display: grid; grid-template-columns: 1fr 74px; gap: 8px; }
.pfp-row .gold.big { font-size: 11px; height: 40px; }

/* wires: dashed connectors with dots, drawn from each side window toward the main window */
.wire { position: absolute; height: 0; border-top: 4px dashed #e9d6a2; pointer-events: none; }
.wire::before, .wire::after { content: ""; position: absolute; top: -8px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold-3); border: 2px solid var(--edge); }
.wire::before { left: -6px; } .wire::after { right: -6px; }
.tweets .wire { left: 100%; top: 120px; width: 66px; margin-left: 2px; }
.equip .wire { right: 100%; top: 270px; width: 60px; margin-right: 2px; transform: rotate(-22deg); transform-origin: 100% 0; }
.pfp .wire { right: 100%; top: 120px; width: 60px; margin-right: 2px; transform: rotate(22deg); transform-origin: 100% 0; }

.handle { position: absolute; left: 30px; top: 1200px; font-family: "Press"; font-size: 20px; color: #e7dcc4; text-decoration: none; background: rgba(20,24,60,.5); padding: 8px 12px; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(8,12,34,.92); display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.lb figure { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb img { max-width: min(84vw, 860px); max-height: 78svh; width: auto; height: auto; border: 4px solid var(--cream); }
.lb figcaption { font-family: "Press"; font-size: 13px; color: var(--gold-2); text-align: center; }
.lb .nav { flex: none; }

/* ---------- phone / narrow: stacked windows ---------- */
@media (max-width: 1000px), (max-aspect-ratio: 1/1) {
  .desk { position: static; width: auto; height: auto; transform: none; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 22px; max-width: 640px; margin: 0 auto; }
  .win { position: relative; left: auto; top: auto; width: 100%; height: auto; }
  .wire { display: none; }
  .meet { position: static; text-align: center; margin-top: 8px; flex-direction: column; align-items: center; gap: 0; }
  .meet-k { margin-bottom: 0; }
  .meet-k { margin: 0; font-size: 20px; }
  .meet-t { font-size: clamp(56px, 17vw, 110px); }
  .main-grid { grid-template-columns: 1fr; }
  .screen { aspect-ratio: 1; flex: none; }
  .who { overflow: visible; font-size: 15px; }
  .name { font-size: 48px; }
  .tweets { order: 3; } .equip { order: 4; } .pfp { order: 2; }
  .handle { position: static; text-align: center; order: 5; }
  .bar-t { font-size: 12px; }
  .peek-row { grid-template-columns: repeat(6, 1fr); gap: 5px; }
  .lb .nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #him.inhale, #him.deep, .desk.shake, .mq, .rec i { animation: none; }
}

@media (min-width: 1001px) and (min-aspect-ratio: 1/1) { body { height: 100svh; overflow: hidden; position: relative; } }

/* pfp maker modal */
.pfp-view { cursor: pointer; }
.pm { position: fixed; inset: 0; z-index: 60; background: rgba(8,12,34,.8); display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.pm-win { width: min(980px, 100%); border: 3px solid var(--edge); box-shadow: 0 0 0 3px var(--cream-2), 0 30px 80px rgba(0,0,0,.5); padding: 10px; }
.pm-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 12px; }
.pm-view { border: 3px solid var(--edge); aspect-ratio: 1; background: #ddd; }
.pm-view canvas { width: 100%; height: 100%; display: block; }
.pm-side { display: flex; flex-direction: column; }
.pm-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 14px; }
.pm-grid button { aspect-ratio: 1; border: 3px solid var(--edge); border-radius: 4px; overflow: hidden; background: #fff; transition: transform .1s; }
.pm-grid button:hover { transform: translateY(-2px); }
.pm-grid button.on { outline: 3px solid var(--gold-1); outline-offset: 1px; background: var(--gold-2); }
.pm-grid img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pm-grid .hat img { object-fit: cover; object-position: 50% 8%; transform: scale(1.9); transform-origin: 50% 0; }
.pm-row { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pm-row .gold.big { font-size: 13px; }
.bar-x { cursor: pointer; }
@media (max-width: 760px) {
  .pm { align-items: flex-start; }
  .pm-body { grid-template-columns: 1fr; }
}

/* snif-cam video frame */
.cam { left: 45px; top: 770px; width: 427px; }
.cam-view { position: relative; margin-top: 10px; border: 3px solid var(--edge); background: #000; aspect-ratio: 922 / 720; cursor: pointer; overflow: hidden; }
.cam-view video { width: 100%; height: 100%; display: block; object-fit: contain; }
.cam-view::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.1) 0 1px, transparent 1px 3px); }
.cam-tag { position: absolute; left: 8px; bottom: 8px; z-index: 1; font-family: "Press"; font-size: 10px; color: var(--edge); background: var(--gold-2); border: 2px solid var(--edge); padding: 5px 7px; }
.cam .wire { left: 100%; top: 150px; width: 66px; margin-left: 2px; }
@media (max-width: 1000px), (max-aspect-ratio: 1/1) { .cam { order: 2; } }

/* ===== layout v4: reference balance on the 2000x1240 canvas ===== */
.col { display: contents; }
.desk .win { position: absolute; }
.meet { left: 40px; top: 128px; }
.meet-t { font-size: 112px; }
.main { left: 550px; top: 160px; width: 940px; height: 940px; }
.tweets { left: 62px; top: 482px; width: 427px; }
.equip { left: 1552px; top: 102px; width: 300px; }
.pfp { left: 1552px; top: 786px; width: 300px; }
.handle { display: none; }
.win.drag { transition: none; box-shadow: 0 0 0 3px var(--cream-2), 0 40px 90px rgba(5,10,40,.6); }
.wire { width: 52px !important; transform: none !important; }
.col-l .wire { left: 100%; right: auto; margin-left: 3px; }
.col-r .wire { right: 100%; left: auto; margin-right: 3px; }
.tweets .wire { top: 110px; }
.cam .wire { top: 180px; }
.equip .wire { top: 260px; }
.pfp .wire { top: 90px; }

@media (max-width: 1000px), (max-aspect-ratio: 1/1) {
  .desk .win { position: relative; left: auto; top: auto; width: 100%; height: auto; }
  .meet { order: 0; } .main { order: 1; } .cam { order: 2; } .pfp { order: 3; } .tweets { order: 4; } .equip { order: 5; }
  .meet-t { font-size: clamp(56px, 17vw, 110px); }
}

/* fill the TV around the square picture with its own blurred colours; larger lore type fills the WHO box */
.screen { background: url("/assets/img/bg-blur.jpg") center / cover no-repeat; }
.desk .who { font-size: 17px; line-height: 1.6; }
.desk .who p + p { margin-top: 16px; }
@media (max-width: 1000px), (max-aspect-ratio: 1/1) { .desk .who { font-size: 15px; } }

/* video lives in the TV as a channel */
#tvVid { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.peek-row .vid-t { position: relative; }
.peek-row .vid-t img { object-fit: cover; }
.peek-row .vid-t b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--gold-2); text-shadow: 2px 2px 0 var(--edge); background: rgba(10,20,64,.35); }
.peek-row .vid-t.on { outline: 3px solid var(--gold-3); outline-offset: 1px; }
.tv-bot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-bot #nowPlaying { min-width: 0; flex: 1; }

/* video inside the WHO box, fills the free space under the lore */
.who-vid { position: relative; aspect-ratio: 922 / 720; margin-top: 10px; border: 3px solid var(--edge); background: #000; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.who-vid video { width: 100%; height: 100%; object-fit: contain; display: block; }
.who-vid::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.1) 0 1px, transparent 1px 3px); }
.vid-tag { position: absolute; left: 8px; bottom: 8px; z-index: 1; font-family: "Press"; font-size: 10px; color: var(--edge); background: var(--gold-2); border: 2px solid var(--edge); padding: 5px 7px; }


.cam { left: 62px; top: 470px; width: 427px; }
.cam .wire { top: 180px; }
@media (max-width: 1000px), (max-aspect-ratio: 1/1) { .cam { order: 2; } }

/* option 1: tweets above, video below on the left */
.tweets { left: 62px; top: 420px; width: 427px; }
.cam { left: 62px; top: 790px; width: 427px; }
.cam .wire { top: 180px; }
@media (max-width: 1000px), (max-aspect-ratio: 1/1) { .cam { order: 2; } .tweets { order: 4; } }
