/* =====================================================================
   Portfolio styles
   Change --brand (and its ink colour) to re-skin the banner and accents.
   ===================================================================== */

:root {
  color-scheme: dark;

  /* --brand is the brand blue (#b3ebf2) deepened to sit level with the
     section colours; the original pastel stays on as --brand-soft */
  --brand: #18b9d4;
  --brand-soft: #b3ebf2;
  --brand-ink: #04262e;

  /* the two numbers are the fingertip, the point that does the clicking */
  --cur: url("../assets/ui/cursor.svg") 2 8, auto;
  --cur-pointer: url("../assets/ui/cursor-pointer.svg") 4 3, pointer;

  --edits: #f1543f;
  --thumbnails: #ffa21f;
  --minecraft: #1fae6a;
  --analytics: #7a5cf5;

  --bg: #151517;
  --card: #1e1e22;
  --card-2: #27272c;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --tx: #fff;
  --tx-2: #b7b7c2;
  --tx-3: #7f7f8c;

  --r: 10px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-px: "Pixelify Sans", ui-monospace, monospace;
  --f-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}

/* section colours: --c is the fill, --ink is the text that sits on it */
.c-home, .c-contact { --c: var(--brand); --ink: var(--brand-ink); --shade: 90%; }
.c-edits { --c: var(--edits); --ink: #fff; }
.c-thumbnails { --c: var(--thumbnails); --ink: #2a1800; --shade: 90%; }
.c-minecraft { --c: var(--minecraft); --ink: #fff; }
.c-analytics { --c: var(--analytics); --ink: #fff; }

*, *::before, *::after { box-sizing: border-box; }

html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; cursor: var(--cur); }
a, button, [role="tab"] { cursor: var(--cur-pointer); }
html.locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 500 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--brand); color: var(--brand-ink); }

:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 36px); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 8px;
  background: #fff; color: #000; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.noscript { padding: 60px 0; text-align: center; color: var(--tx-2); }

.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------------
   Banner
   --------------------------------------------------------------------- */
.banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brand);
  color: var(--brand-ink);
}
.banner::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(55% 150% at 18% 0%, color-mix(in srgb, var(--brand-soft) 80%, transparent), transparent 62%),
    radial-gradient(45% 130% at 100% 100%, rgba(4, 38, 46, .24), transparent 62%);
}
.banner-fx { position: absolute; inset: 0; z-index: -1; }
.banner-fx svg { width: 100%; height: 100%; }
.px-d { fill: rgba(4, 38, 46, .13); }
.px-l { fill: color-mix(in srgb, var(--brand-soft) 55%, transparent); }

.banner-in {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 18px 40px;
  min-height: clamp(150px, 23vh, 210px);
  padding-block: 30px 54px;
}
.banner-edge {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 36px;
  background-repeat: repeat-x; background-position: center bottom;
}

.logo {
  display: block;
  transform: rotate(-3deg);
  transform-origin: 30% 60%;
  transition: transform .3s var(--ease);
  text-decoration: none;
}
.logo:hover { transform: rotate(-1deg) scale(1.03); }
.logo img { height: clamp(64px, 11vw, 116px); width: auto; }
.wm { height: clamp(54px, 9vw, 108px); width: auto; overflow: visible; }
.wm text { font: 900 64px var(--f-display); letter-spacing: -1.5px; }
.wm-shadow, .wm-stroke { fill: var(--brand-ink); stroke: var(--brand-ink); stroke-width: 17px; stroke-linejoin: round; }
.wm-shadow { transform: translate(0, 7px); }
.wm-fill { fill: #fff; }

.hello { display: flex; align-items: center; gap: 16px; }
.hello-ic {
  width: 50px; height: 50px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--brand) 70%, var(--brand-ink));
  color: var(--brand-ink);
}
.hello-ic .ic { width: 26px; height: 26px; }
.hello small {
  display: block;
  font: 700 13px/1.25 var(--f-display); text-transform: uppercase; letter-spacing: .02em;
  opacity: .62;
}
.hello b {
  display: block;
  font: 800 clamp(17px, 2.3vw, 22px)/1.2 var(--f-display); text-transform: uppercase;
}

/* ---------------------------------------------------------------------
   Section tabs (the card row under the banner)
   --------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  padding: 14px 0 12px;
  background: linear-gradient(var(--bg) 82%, transparent);
}
.tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }

.tabcard {
  display: flex; align-items: center; gap: 12px;
  min-width: 0; padding: 13px 14px;
  border-radius: var(--r);
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 17%, var(--card)), var(--card) 72%);
  color: var(--tx);
  text-decoration: none;
  transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.tabcard:hover { transform: translateY(-3px) scale(1.02); border-color: color-mix(in srgb, var(--c) 70%, transparent); }
.tab-ic {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--c); color: var(--ink);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.tab-tx { min-width: 0; }
.tab-t, .tab-s { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.tab-t { font: 700 14px/1.25 var(--f-display); }
.tab-s { font: 600 10.5px/1.4 var(--f-display); color: var(--tx-3); transition: color .3s var(--ease); }

.tabcard[aria-current="page"] {
  background: var(--c); border-color: var(--c); color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 14px 30px -16px var(--c);
}
.tabcard[aria-current="page"] .tab-ic { background: rgba(0, 0, 0, .2); color: inherit; }
.tabcard[aria-current="page"] .tab-s { color: inherit; opacity: .72; }

/* ---------------------------------------------------------------------
   Views
   --------------------------------------------------------------------- */
main { min-height: 46vh; padding: 6px 0 20px; }
main:focus { outline: none; }
.view { animation: view-in .35s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } }

/* the big colour cards (home bento + section headers) */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }

.bc {
  position: relative; isolation: isolate; overflow: hidden;
  display: block;
  grid-column: span 2;
  min-height: 198px;
  padding: 26px 26px 24px;
  border: 0; border-radius: var(--r);
  background:
    radial-gradient(130% 150% at 0 0, rgba(255, 255, 255, .22), transparent 54%),
    linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) var(--shade, 78%), #000));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
  color: var(--ink);
  text-align: left; text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.bc::after {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background-image: var(--px-tile); background-size: 260px 260px;
  opacity: .1; pointer-events: none;
}
.c-home.bc::after, .c-contact.bc::after, .c-thumbnails.bc::after { filter: invert(1); opacity: .07; }
a.bc, button.bc { cursor: var(--cur-pointer); }
a.bc:hover, button.bc:hover {
  transform: translateY(-4px) scale(1.012);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 20px 40px -20px var(--c);
}
.bc.wide { grid-column: span 6; }

.bc-k, .bc-t, .bc-rule, .bc-p { position: relative; z-index: 2; }
.bc-k {
  display: flex; align-items: center; gap: 9px;
  font: 700 13px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .02em;
  opacity: .74;
}
.bc-k .ic { width: 20px; height: 20px; }
.bc-t {
  margin-top: 24px;
  font: 700 clamp(18px, 1.8vw, 21px)/1.06 var(--f-display); text-transform: uppercase; letter-spacing: -.01em;
}
.bc-t span { display: block; }
.wide .bc-t { font-size: clamp(22px, 3.1vw, 31px); margin-top: 16px; }
.bc-rule {
  display: block; width: 112px; height: 3px; margin-top: 13px; border-radius: 2px;
  background: linear-gradient(90deg, currentColor, transparent);
}
.bc-p { margin-top: 14px; max-width: min(46ch, 54%); font-size: 15px; font-weight: 600; opacity: .86; }

.bc-peek {
  position: absolute; right: 0; bottom: 0; z-index: 1;
  width: 43%; height: 70%;
  border-radius: var(--r) 0 0 0;
  background: #fff; overflow: hidden;
  box-shadow: -8px -8px 28px rgba(0, 0, 0, .2);
  transition: transform .4s var(--ease);
}
.wide .bc-peek { width: min(38%, 330px); height: 82%; }
.bc-peek svg { width: 100%; height: 100%; }
a.bc:hover .bc-peek, button.bc:hover .bc-peek { transform: translate(-6px, -6px); }

/* the fainter second panel behind the peek on wide cards */
.bc-peek2 {
  position: absolute; right: min(31%, 270px); bottom: 0; z-index: 1;
  width: min(24%, 210px); height: 56%;
  border-radius: var(--r) 0 0 0;
  background:
    linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .5)) 16px 18px / 55% 9px no-repeat,
    linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, .35)) 16px 38px / 72% 9px no-repeat,
    linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, .35)) 16px 58px / 40% 9px no-repeat,
    rgba(255, 255, 255, .3);
  transition: transform .4s var(--ease);
}
a.bc:hover .bc-peek2 { transform: translate(-3px, -3px); }

.il-a { fill: var(--c); }
.il-as { stroke: var(--c); fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.il-k { fill: #1d1e24; }
.il-g { fill: #e7e8ee; }
.il-d { fill: #cdcfd9; }
.il-w { fill: #fff; }

/* section header strip */
.strip { min-height: 176px; margin-bottom: 16px; }
.strip .bc-t { font-size: clamp(24px, 3.6vw, 36px); }

/* sub-tabs */
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.seg-b {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 18px;
  border-radius: var(--r); border: 1px solid var(--line);
  background: var(--card); color: var(--tx-2);
  font: 700 13px var(--f-display); text-transform: uppercase;
  cursor: var(--cur-pointer);
  transition: transform .3s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.seg-b:hover { transform: translateY(-2px); color: var(--tx); border-color: var(--line-2); }
.seg-b[aria-selected="true"] { background: var(--c); border-color: var(--c); color: var(--ink); }
.seg-n {
  min-width: 24px; padding: 2px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font: 700 11px var(--f-body); text-align: center;
}
.seg-b[aria-selected="true"] .seg-n { background: rgba(0, 0, 0, .22); }

/* ---------------------------------------------------------------------
   Grids and work cards
   --------------------------------------------------------------------- */
.grid { display: grid; gap: 18px 16px; align-items: start; }
.grid.long { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid.short { grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); }
.grid.thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid.thumbs.feature > :first-child { grid-column: span 2; grid-row: span 2; }
.grid.models { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
/* two or four pieces read better as big pairs than as three and a straggler */
.grid.long.duo, .grid.thumbs.duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 901px) { .grid.short.duo { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid.mods { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }

.cc {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  text-align: left; color: inherit; cursor: var(--cur-pointer);
}
.cc.is-empty { cursor: var(--cur); }
.cc-media, .cc-meta, .cc-title, .cc-sub, .cc-cap { display: block; }
.cc-media {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.short .cc-media { aspect-ratio: 9 / 16; }
.cc-media > img, .cc-media > video { width: 100%; height: 100%; object-fit: cover; }
.cc-media > .cc-cover { position: absolute; inset: 0; z-index: 1; transition: opacity .25s var(--ease); }
.cc.previewing .cc-cover { opacity: 0; }
.cc-play, .cc-dur { z-index: 2; }
.cc-dur:empty, .cc-sub:empty { display: none; }
.cc-media::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); pointer-events: none;
}
.cc:not(.is-empty):hover .cc-media, .cc:not(.is-empty):focus-visible .cc-media {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 20px 40px -22px var(--c), 0 0 0 2px var(--c);
}
.cc-play {
  position: absolute; left: 12px; bottom: 12px;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c); color: var(--ink);
  opacity: 0; transform: scale(.8);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.cc-play .ic { width: 20px; height: 20px; }
.cc:hover .cc-play, .cc:focus-visible .cc-play { opacity: 1; transform: none; }
@media (hover: none) { .cc-play { opacity: 1; transform: none; } }
.cc-dur {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 7px; border-radius: 5px;
  background: rgba(0, 0, 0, .78); font: 700 12px var(--f-body);
}
.chip-sample {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  padding: 3px 7px; border-radius: 5px;
  background: rgba(0, 0, 0, .7); color: #fff;
  font: 700 9px var(--f-display); letter-spacing: .08em;
}
.cc-meta { padding: 11px 2px 0; }
.cc-title { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.cc-sub { margin-top: 2px; font-size: 13.5px; color: var(--tx-2); }
.is-empty .cc-title { color: var(--tx-2); }

/* thumbnails */
.th { position: relative; }

/* a glint that sweeps across each thumbnail now and then, and again on hover */
.th:not(.is-empty) .cc-media::before {
  content: "";
  position: absolute; top: -20%; bottom: -20%; left: 0; z-index: 1;
  width: 32%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16) 30%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, .16) 70%, transparent);
  transform: translateX(-170%) skewX(-18deg);
  pointer-events: none;
  animation: glint 6s var(--ease) infinite;
}
.grid.thumbs > :nth-child(4n + 2) .cc-media::before { animation-delay: 1.1s; }
.grid.thumbs > :nth-child(4n + 3) .cc-media::before { animation-delay: 2.2s; }
.grid.thumbs > :nth-child(4n + 4) .cc-media::before { animation-delay: 3.3s; }
.th:not(.is-empty):hover .cc-media::before { animation: glint-once .8s var(--ease) both; }
@keyframes glint {
  0%, 78% { transform: translateX(-170%) skewX(-18deg); }
  100% { transform: translateX(440%) skewX(-18deg); }
}
@keyframes glint-once {
  from { transform: translateX(-170%) skewX(-18deg); }
  to { transform: translateX(440%) skewX(-18deg); }
}
.th .cc-cap {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  padding: 34px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .82));
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.th:hover .cc-cap, .th:focus-visible .cc-cap { opacity: 1; transform: none; }
@media (hover: none) { .th .cc-cap { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------
   Empty-state slates
   --------------------------------------------------------------------- */
.slate { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; padding: 12px; text-align: center; }

/* edits: "media offline" */
.slate-off {
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, .1) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, #96202b, #5a0e17);
  color: #fff;
}
.slate-off b { font: 800 clamp(14px, 2vw, 21px)/1.1 var(--f-display); text-transform: uppercase; }
.slate-off small { display: block; margin-top: 8px; font: 500 10px/1.55 var(--f-mono); opacity: .62; }

/* thumbnails: empty artboard */
.slate-art { background: repeating-conic-gradient(#26262b 0 25%, #1c1c20 0 50%) 0 0 / 26px 26px; color: var(--tx-2); }
.slate-art b { font: 700 clamp(12px, 1.5vw, 15px) var(--f-display); color: var(--tx); }
.slate-art small { margin-top: 4px; font: 500 11px var(--f-mono); }
.bbox { position: absolute; inset: 13% 11%; border: 1px solid #4da3ff; pointer-events: none; }
.bbox i { position: absolute; width: 8px; height: 8px; margin: -4px; background: #fff; border: 1px solid #4da3ff; }
.bbox i:nth-child(1) { left: 0; top: 0; } .bbox i:nth-child(2) { left: 50%; top: 0; } .bbox i:nth-child(3) { left: 100%; top: 0; }
.bbox i:nth-child(4) { left: 0; top: 50%; } .bbox i:nth-child(5) { left: 100%; top: 50%; }
.bbox i:nth-child(6) { left: 0; top: 100%; } .bbox i:nth-child(7) { left: 50%; top: 100%; } .bbox i:nth-child(8) { left: 100%; top: 100%; }

/* minecraft: missing texture */
.missing, .mod-icon.missing { background: repeating-conic-gradient(#f800f8 0 25%, #000 0 50%) 0 0 / 50% 50%; image-rendering: pixelated; }
.slate-cube { background: radial-gradient(80% 80% at 50% 40%, #2b2b31, #19191c); perspective: 700px; }
.cube {
  --s: clamp(64px, 9vw, 92px);
  position: relative; width: var(--s); height: var(--s);
  transform-style: preserve-3d;
  animation: cube-spin 16s linear infinite;
}
.cube i { position: absolute; inset: 0; }
.cube i:nth-child(1) { transform: translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.78); }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.78); }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(1.12); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.55); }
@keyframes cube-spin { from { transform: rotateX(-24deg) rotateY(0); } to { transform: rotateX(-24deg) rotateY(360deg); } }

/* analytics: no signal */
.nosignal {
  position: relative; overflow: hidden;
  height: clamp(200px, 30vw, 280px);
  border-radius: var(--r);
  background: linear-gradient(90deg,
    #b9b9b9 0 14.285%, #b9b900 0 28.57%, #00b9b9 0 42.855%, #00b900 0 57.14%,
    #b900b9 0 71.425%, #b90000 0 85.71%, #0000b9 0);
  display: grid; place-items: center;
}
.nosignal::before { content: ""; position: absolute; inset: 0; background: rgba(21, 21, 23, .5); }
.nosignal span {
  position: relative; padding: 12px 20px; border-radius: 6px;
  background: #000; color: #fff;
  font: 700 clamp(14px, 2vw, 20px) var(--f-display); letter-spacing: .08em;
}

/* analytics: coming soon (the same test card, with the dots ticking) */
.soon { height: clamp(240px, 36vw, 360px); }
.soon i { font-style: normal; animation: soon-dot 1.5s infinite both; }
.soon i:nth-child(2) { animation-delay: .25s; }
.soon i:nth-child(3) { animation-delay: .5s; }
@keyframes soon-dot { 0%, 20% { opacity: 0; } 45%, 100% { opacity: 1; } }

/* owner hint under an empty section */
.note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  margin-top: 18px; padding: 13px 16px;
  border: 1px dashed var(--line-2); border-radius: var(--r);
  color: var(--tx-2); font-size: 14.5px;
}
.note b { color: var(--tx); font-weight: 700; }
.note code, .steps code {
  padding: 2px 7px; border-radius: 5px;
  background: var(--card-2); color: var(--tx);
  font: 500 12.5px var(--f-mono);
}

/* ---------------------------------------------------------------------
   Minecraft: mod / plugin cards
   --------------------------------------------------------------------- */
.mod {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px;
  padding: 18px;
  border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, var(--card)), var(--card) 60%);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.mod:not(.is-empty):hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.mod-icon { width: 64px; height: 64px; border-radius: 8px; object-fit: contain; background: rgba(0, 0, 0, .25); }
.mod-icon.px { image-rendering: pixelated; }
.mod-stat { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 14.5px; color: var(--tx-2); }
.mod-stat .ic { width: 18px; height: 18px; color: var(--c); }
.mod-stat b { font: 800 19px/1 var(--f-body); color: var(--tx); }
.mod-icon.letter {
  display: grid; place-items: center;
  background: var(--c); color: var(--ink);
  font: 700 30px var(--f-px);
}
.mod-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.mod-name { font: 700 16px/1.25 var(--f-display); }
.mod-ver { font: 600 12px var(--f-mono); color: var(--tx-3); }
.mod-desc { margin-top: 6px; font-size: 14.5px; color: var(--tx-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: var(--tx-2);
  font: 700 11.5px var(--f-body);
}
.mod-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--card-2); color: var(--tx);
  font: 700 13px var(--f-body); text-decoration: none; cursor: var(--cur-pointer);
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); border-color: var(--c, #fff); }
.btn .ic { width: 16px; height: 16px; }

/* models */
.model .cc-media { aspect-ratio: 4 / 3; background: radial-gradient(80% 80% at 50% 40%, #2b2b31, #19191c); }
.model .cc-media > img { object-fit: contain; padding: 8%; }
.model .cc-media > img.px { image-rendering: pixelated; }

/* textures: an inventory */
.inv-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.inv {
  --slot: clamp(30px, calc((min(100vw, 1160px) - 36px - 34px) / 9), 64px);
  padding: 14px 14px 16px;
  background: #c6c6c6;
  border-radius: 4px;
  box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 #555, 0 0 0 3px #000;
}
.inv-title { margin: 0 0 8px 2px; font: 500 20px/1 var(--f-px); color: #404040; }
.inv-grid { display: grid; grid-template-columns: repeat(9, var(--slot)); }
.slot {
  position: relative;
  width: var(--slot); height: var(--slot); padding: 0; border: 0; border-radius: 0;
  display: grid; place-items: center;
  background: #8b8b8b;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff;
}
button.slot { cursor: var(--cur-pointer); }
button.slot:hover::after, button.slot:focus-visible::after {
  content: ""; position: absolute; inset: 2px; background: rgba(255, 255, 255, .45);
}
button.slot:focus-visible { outline: 3px solid #fff; outline-offset: -3px; z-index: 1; }
.slot-item { width: 78%; aspect-ratio: 1; overflow: hidden; }
.slot-item img { width: 100%; height: auto; image-rendering: pixelated; }
.slot-item.anim img { animation: frames var(--dur, 1s) steps(var(--n)) infinite; }
@keyframes frames { to { transform: translateY(-100%); } }

/* ---------------------------------------------------------------------
   Analytics
   --------------------------------------------------------------------- */
.src {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-bottom: 14px;
  font: 600 11px var(--f-display); text-transform: uppercase; letter-spacing: .05em; color: var(--tx-3);
}
.src-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tx-3); }
.src.live .src-dot { background: #37d67a; box-shadow: 0 0 0 4px rgba(55, 214, 122, .18); }
.src-err { color: #ffb4a8; text-transform: none; letter-spacing: 0; font: 600 13px var(--f-body); }

.channel {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px; padding: 14px 16px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--card);
}
.channel img { width: 46px; height: 46px; border-radius: 50%; }
.channel-name { font: 700 15px var(--f-display); }
.channel-sub { font-size: 13.5px; color: var(--tx-2); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tile {
  padding: 17px 18px 16px;
  border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, var(--card)), var(--card) 65%);
}
.tile-label { font-size: 13.5px; font-weight: 600; color: var(--tx-2); }
.tile-value { margin-top: 4px; font: 800 clamp(26px, 3vw, 34px)/1.15 var(--f-body); letter-spacing: -.01em; }
.tile-note { margin-top: 2px; font-size: 12.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.panel {
  margin-top: 12px; padding: 18px 18px 14px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--card);
}
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-bottom: 22px; }
.panel-title { font: 700 14px var(--f-display); text-transform: uppercase; }
.panel-sub { font-size: 13px; color: var(--tx-3); }

.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; }
.chart-y { position: relative; height: 230px; }
.chart-y .sizer { visibility: hidden; }
.chart-y span { display: block; font: 600 11.5px var(--f-body); color: var(--tx-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-y span:not(.sizer) { position: absolute; right: 0; bottom: calc(var(--at) * 100%); transform: translateY(50%); }
.chart-plot { position: relative; height: 230px; }
.chart-grid i { position: absolute; left: 0; right: 0; bottom: calc(var(--at) * 100%); height: 1px; background: rgba(255, 255, 255, .08); }
.chart-grid i:first-child { background: rgba(255, 255, 255, .22); }
.chart-cols { position: absolute; inset: 0; display: flex; }
.col {
  position: relative; flex: 1; min-width: 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 1px; border: 0; background: none; cursor: var(--cur-pointer);
}
.col::before { content: ""; position: absolute; inset: 0 1px; border-radius: 4px; background: rgba(255, 255, 255, 0); transition: background .15s; }
.col:hover::before, .col:focus-visible::before { background: rgba(255, 255, 255, .06); }
.col:focus-visible { outline: none; }
.col:focus-visible .bar { outline: 2px solid #fff; outline-offset: 2px; }
.bar {
  position: relative;
  width: min(24px, 72%); height: calc(var(--v) * 100%); min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--c);
  transition: filter .15s;
}
.col:hover .bar, .col:focus-visible .bar { filter: brightness(1.18); }
.cap {
  position: absolute; left: 50%; bottom: calc(var(--v) * 100% + 6px); transform: translateX(-50%);
  font: 800 12px var(--f-body); color: var(--tx); white-space: nowrap; pointer-events: none;
}
.chart-x { grid-column: 2; display: flex; padding-top: 8px; }
.chart-x span { flex: 1; min-width: 0; text-align: center; font: 600 11px var(--f-body); color: var(--tx-3); white-space: nowrap; }
.chart-x span.off { visibility: hidden; }

.vt-wrap { overflow-x: auto; margin: 0 -6px; }
.vt { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.vt th {
  padding: 8px 10px; border-bottom: 1px solid var(--line-2);
  font: 600 10.5px var(--f-display); text-transform: uppercase; letter-spacing: .05em; color: var(--tx-3);
  text-align: left; white-space: nowrap;
}
.vt td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.vt tr:last-child td { border-bottom: 0; }
.vt .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vt .rank { width: 1%; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.vt-video { display: flex; align-items: center; gap: 12px; min-width: 220px; text-decoration: none; }
.vt-video img { width: 72px; height: 40.5px; flex: none; border-radius: 5px; object-fit: cover; background: var(--card-2); }
.shortform .vt-video img { width: 30px; height: 53px; }
.vt-title { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.vt-video:hover .vt-title { text-decoration: underline; }
.vt .muted { color: var(--tx-2); white-space: nowrap; }

.steps { margin: 16px 0 0; padding: 0 0 0 22px; color: var(--tx-2); font-size: 15px; }
.steps li { margin-top: 8px; }
.steps b { color: var(--tx); }

/* ---------------------------------------------------------------------
   About (home)
   --------------------------------------------------------------------- */
.about {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 32px;
  margin-bottom: 14px; padding: 24px 26px;
  border-radius: var(--r);
  border: 1px solid color-mix(in srgb, var(--brand) 38%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 15%, var(--card)), var(--card) 70%);
}
.about-tx { flex: 1 1 380px; min-width: 0; }
.about h2 { font: 700 13px var(--f-display); text-transform: uppercase; letter-spacing: .02em; color: var(--brand); }
.about p { margin-top: 8px; max-width: 64ch; font-size: 17.5px; line-height: 1.5; font-weight: 600; white-space: pre-line; }
.about .tags { margin-top: 14px; }
.about-cta {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 20px;
  border-radius: var(--r);
  background: var(--brand); color: var(--brand-ink);
  font: 700 13px var(--f-display); text-transform: uppercase; text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.about-cta:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 30px -14px var(--brand); }

/* ---------------------------------------------------------------------
   Footer / contact
   --------------------------------------------------------------------- */
.foot { padding: 34px 0 70px; scroll-margin-top: 110px; }
.foot-h { margin-bottom: 14px; font: 700 14px var(--f-display); text-transform: uppercase; color: var(--tx-3); }
.socials { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.social {
  display: flex; align-items: center; gap: 13px;
  min-width: 0; padding: 14px; width: 100%;
  border-radius: var(--r);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--card)), var(--card) 72%);
  text-align: left; text-decoration: none; cursor: var(--cur-pointer);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.social:hover { transform: translateY(-3px) scale(1.02); border-color: color-mix(in srgb, var(--c) 75%, transparent); }
.social-ic {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px; background: var(--c); color: var(--ink, #fff);
}
.social-tx { min-width: 0; }
.social-t, .social-s { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.social-t { font: 700 14px/1.3 var(--f-display); }
.social-s { font: 600 11px/1.4 var(--f-display); color: var(--tx-3); }

.biz { margin-top: 44px; text-align: center; font: 600 16px/1.5 var(--f-display); }
.biz a {
  display: inline-block; margin-top: 6px;
  color: var(--brand); text-decoration: none;
  border-bottom: 2px solid var(--brand);
  overflow-wrap: anywhere;
}
.biz a:hover { color: #fff; border-color: #fff; }
.copy { margin-top: 34px; text-align: center; font-size: 13px; color: var(--tx-3); }

/* ---------------------------------------------------------------------
   Viewer (video player / lightbox)
   --------------------------------------------------------------------- */
.mv {
  position: fixed; inset: 0; z-index: 80;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(10, 10, 12, .93);
  backdrop-filter: blur(10px);
  animation: mv-in .2s var(--ease) both;
}
@keyframes mv-in { from { opacity: 0; } }
.mv-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.mv-title { flex: 1; min-width: 0; font: 700 14px var(--f-display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-count { font: 700 13px var(--f-body); color: var(--tx-3); font-variant-numeric: tabular-nums; }
.mv-x, .mv-nav {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--card-2); cursor: var(--cur-pointer);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.mv-x:hover, .mv-nav:hover { background: #34343b; }
.mv-stage { display: grid; place-items: center; min-height: 0; padding: 0 70px; }
.mv-frame {
  position: relative; overflow: hidden;
  width: min(100%, calc((100vh - 190px) * 16 / 9)); aspect-ratio: 16 / 9;
  border-radius: var(--r); background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.mv-frame.short { width: auto; height: min(100%, 100vh - 190px); aspect-ratio: 9 / 16; max-width: 100%; }
.mv-frame video, .mv-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.mv-frame.loading::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff;
  animation: mv-spin .8s linear infinite;
  pointer-events: none;
}
@keyframes mv-spin { to { transform: rotate(360deg); } }
.mv-img { max-width: 100%; max-height: calc(100vh - 190px); border-radius: var(--r); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.mv-px {
  width: min(52vh, 78vw); aspect-ratio: 1;
  display: grid; place-items: center;
  background: #8b8b8b;
  box-shadow: inset 6px 6px 0 #373737, inset -6px -6px 0 #fff, 0 30px 80px rgba(0, 0, 0, .6);
}
.mv-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.mv-prev { left: 14px; } .mv-next { right: 14px; }
.mv-cap { min-height: 24px; padding: 14px 18px 22px; text-align: center; color: var(--tx-2); font-size: 14.5px; }

/* ---------------------------------------------------------------------
   Tooltip
   --------------------------------------------------------------------- */
.tip {
  position: fixed; left: 0; top: 0; z-index: 90;
  max-width: 280px; padding: 10px 12px;
  border-radius: 8px; border: 1px solid var(--line-2);
  background: #2a2a30; color: var(--tx-2);
  font-size: 13px; line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity .12s;
}
.tip.on { opacity: 1; visibility: visible; }
.tip b { display: block; font: 800 17px/1.2 var(--f-body); color: var(--tx); }
.tip .tip-k { display: inline-block; width: 14px; height: 3px; margin-right: 6px; border-radius: 2px; background: var(--analytics); vertical-align: middle; }
.tip.mc {
  padding: 6px 9px 7px; border-radius: 0;
  border: 2px solid #2d0a63; outline: 2px solid #100010;
  background: rgba(16, 0, 16, .95); color: #a8a8a8;
  font: 400 16px/1.25 var(--f-px);
  box-shadow: none;
}
.tip.mc b { font: 500 18px/1.2 var(--f-px); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }

.demo-flag {
  position: fixed; left: 50%; bottom: 14px; z-index: 70; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px 9px 16px; border-radius: 999px;
  background: #fff; color: #111;
  font: 700 12px var(--f-display); text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  white-space: nowrap;
}
.demo-flag a { padding: 5px 11px; border-radius: 999px; background: #111; color: #fff; text-decoration: none; }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1040px) {
  /* keep the peek panel clear of the two-line title on narrower cards */
  .bento > .bc:not(.wide) { min-height: 214px; }
  .bento > .bc:not(.wide) .bc-peek { width: 45%; height: 47%; }
  .tabcard { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tab-s { display: none; }
  .tab-t { font-size: 12.5px; }
}

@media (max-width: 900px) {
  .bc { grid-column: span 3; }
  .bento > .bc:nth-child(3) { grid-column: span 6; }
  .bento > .bc:nth-child(3) .bc-peek { width: 44%; height: 74%; }
  .grid.thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-p { max-width: 58%; }
}

@media (max-width: 680px) {
  .banner-in { padding-block: 26px 50px; }
  .nav { padding: 10px 0 8px; }
  .tabs {
    display: flex; gap: 8px;
    width: 100%; padding: 0 18px;
    overflow-x: auto; scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabcard { flex: none; flex-direction: row; align-items: center; padding: 8px 14px 8px 8px; }
  .tabcard:hover { transform: none; }
  .tab-ic { width: 32px; height: 32px; border-radius: 7px; }
  .tab-ic .ic { width: 18px; height: 18px; }

  .bc, .bento > .bc:nth-child(3) { grid-column: span 6; min-height: 172px; }
  .bento > .bc:nth-child(3) .bc-peek { width: 45%; height: 47%; }
  .strip { min-height: 0; }
  .strip .bc-peek, .bc-peek2 { display: none; }
  .wide .bc-peek { width: 43%; height: 62%; }
  .vt-video { min-width: 0; gap: 10px; }
  .vt-video img { width: 56px; height: 31.5px; }
  .vt th, .vt td { padding-inline: 6px; }
  .bc-p { max-width: none; }
  .grid.thumbs.feature > :first-child { grid-column: span 2; grid-row: auto; }
  .grid.long.duo, .grid.thumbs.duo { grid-template-columns: minmax(0, 1fr); }
  .seg-b { height: 42px; padding: 0 14px; font-size: 12px; }
  .mv-stage { padding: 0 12px; }
  .mv-nav { top: auto; bottom: 64px; transform: none; }
  .vt .opt { display: none; }
  .chart-y, .chart-plot { height: 190px; }
  .inv { padding: 10px 10px 12px; --slot: calc((100vw - 36px - 26px) / 9); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .cube { transform: rotateX(-24deg) rotateY(38deg); animation: none !important; }
}
