/* =========================================================
   Devaxio — portfolio
   One stylesheet, no build step. Colours and type live in :root.
   ========================================================= */

:root {
  --bg: #0a0c0f;
  --bg-2: #0d1014;
  --bg-3: #12161b;
  --bg-4: #181d23;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --text: #ece8e1;
  --text-2: #c4c8cd;
  --mute: #8b9096;
  --mute-2: #7d838b;
  --acc: #d9a24e;
  --acc-2: #e8b462;
  --acc-3: #b9832f;
  --acc-soft: rgba(217, 162, 78, .14);
  --on: #4ade80;
  --dev: #f2b544;
  --accent: var(--acc);

  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --maxw: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 72px;

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -.03em; font-weight: 600; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--acc); color: #16110a; }

:focus-visible { outline: 2px solid var(--acc-2); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: fixed; top: 10px; left: 10px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-s); background: var(--acc); color: #16110a; font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }

/* violet half of a heading */
.ser {
  background: linear-gradient(92deg, #f6dca8 0%, var(--acc-2) 45%, var(--acc) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* "— 01 / Services" */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--acc); }
.eyebrow span { color: var(--mute); }
.eyebrow span::after { content: " /"; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, #ecbd70, var(--acc) 60%, #c78f3d);
  box-shadow: 0 8px 28px -12px rgba(217, 162, 78, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
  color: #16110a; font-weight: 600; font-size: 14.5px; letter-spacing: -.005em; text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s, background .18s, border-color .18s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 34px -10px rgba(217, 162, 78, .95), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); box-shadow: none; color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); box-shadow: none; }
.btn--small { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 15.5px; }

/* ---------- nav: a full-width bar at the top that glides into a floating island once you scroll ---------- */
/* The bar's own height never changes, so nothing on the page jumps; only the inner island moves. */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); pointer-events: none; }
.nav__inner {
  position: relative; height: 100%; pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border: 1px solid transparent; border-radius: 0;
  transition: height .5s var(--ease), margin-top .5s var(--ease), width .5s var(--ease), max-width .5s var(--ease),
    padding .5s var(--ease), border-radius .5s var(--ease), background-color .35s, border-color .35s, box-shadow .5s;
}
.nav.is-scrolled .nav__inner {
  height: 56px; margin-top: 8px; width: calc(100% - 24px); max-width: calc(var(--maxw) + 40px);
  padding-inline: 16px 10px; border-color: var(--line-2); border-radius: 16px;
  background: rgba(13, 16, 20, .8);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 22px 50px -26px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .04);
}

/* reading progress along the island's bottom edge */
.nav__progress {
  position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--acc-3), var(--acc-2)); transform-origin: left; transform: scaleX(0); opacity: 0; transition: opacity .35s;
}
.nav.is-scrolled .nav__progress { opacity: .9; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; font-size: 17px; }
.brand__mark { width: 30px; height: 30px; fill: none; stroke: var(--acc-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.brand__mark rect { fill: var(--acc-soft); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.08); }

/* where you are: the section in view, rolled in beside the logo */
.nav__where {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 auto 0 2px; white-space: nowrap;
  font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute);
  opacity: 0; transform: translateX(-6px); transition: opacity .35s, transform .5s var(--ease);
}
.nav__where.is-on { opacity: 1; transform: none; }
.nav__where i { font-style: normal; color: var(--mute-2); }
.nav__where-box { position: relative; display: inline-block; height: 16px; overflow: hidden; transition: width .5s var(--ease); }
.nav__where-txt { position: absolute; left: 0; top: 0; line-height: 16px; color: var(--acc-2); transition: transform .5s var(--ease), opacity .35s; }
.nav__where-txt.is-enter { transform: translateY(100%); opacity: 0; }
.nav__where-txt.is-leave { transform: translateY(-100%); opacity: 0; }

.nav__links { position: relative; display: flex; align-items: center; gap: 2px; }
.nav__links a:not(.btn) {
  position: relative; z-index: 1; padding: 8px 12px; border-radius: var(--r-s);
  color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 600;
  transition: color .2s;
}
.nav__links a:not(.btn):hover, .nav__links a[aria-current="true"] { color: #fff; }
/* one highlight that glides to whatever you point at, and settles back on the section you're reading */
.nav__pill {
  position: absolute; left: 0; top: 50%; height: 34px; margin-top: -17px; width: 0; border-radius: 9px; pointer-events: none;
  background: rgba(255, 255, 255, .065); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); opacity: 0;
  transition: transform .5s var(--ease), width .5s var(--ease), opacity .25s;
}
.nav__pill.is-on { opacity: 1; }
.nav__pill.no-anim { transition: none; }
.nav__pill::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 16px; height: 2px; margin-left: -8px; border-radius: 2px;
  background: var(--acc); transform: scaleX(0); transition: transform .35s var(--ease);
}
.nav__pill.is-current::after { transform: scaleX(1); }
.nav__links .btn { position: relative; overflow: hidden; margin-left: 10px; }

.nav__toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; cursor: pointer; place-items: center; transition: border-color .2s, background-color .2s; }
.nav__toggle:hover { border-color: rgba(232, 180, 98, .5); }
.nav__toggle[aria-expanded="true"] { background: var(--acc-soft); border-color: rgba(232, 180, 98, .5); }
.nav__bars, .nav__bars::before, .nav__bars::after { display: block; width: 16px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .35s var(--ease), background-color .2s; }
.nav__bars { position: relative; }
.nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
.nav__bars::before { top: -5px; }
.nav__bars::after { top: 5px; }
.nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars::after { transform: translateY(-5px) rotate(-45deg); }

@media (prefers-reduced-motion: no-preference) {
  .brand__mark path { stroke-dasharray: 48; animation: nav-draw 1.1s .15s var(--ease) both; }
  .brand__mark rect { animation: nav-pop .6s var(--ease) both; }
  .nav__links .btn::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .42) 50%, transparent 65%);
    transform: translateX(-130%); animation: nav-shine 7s 2.5s ease-in-out infinite;
  }
}
@keyframes nav-draw { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
@keyframes nav-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes nav-shine { 0%, 82% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }

@media (max-width: 1140px) { .nav__where { display: none; } }

/* phones and small tablets: the links drop down as a panel under the bar, numbered, one after another */
@media (max-width: 900px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 2;
    flex-direction: column; align-items: stretch; gap: 2px;
    max-height: calc(100dvh - var(--nav-h) - 24px); overflow: auto; overscroll-behavior: contain;
    padding: 10px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-2);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .9);
    counter-reset: nav;
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.98); transform-origin: top center;
    transition: opacity .25s, transform .4s var(--ease), visibility 0s .4s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .4s var(--ease), visibility 0s; }
  .nav__links a { opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .4s var(--ease), color .2s, background-color .2s; }
  .nav__links.is-open a { opacity: 1; transform: none; }
  .nav__links a:not(.btn) { display: flex; align-items: center; padding: 13px 12px; font-size: 16px; counter-increment: nav; }
  .nav__links a:not(.btn)::before { content: counter(nav, decimal-leading-zero); width: 32px; font: 500 11px var(--mono); color: var(--mute-2); }
  .nav__links a:not(.btn):hover { background: rgba(255, 255, 255, .04); }
  .nav__links a[aria-current="true"] { background: rgba(255, 255, 255, .05); }
  .nav__links a[aria-current="true"]::before { color: var(--acc); }
  .nav__links .btn { margin: 8px 0 2px; justify-content: center; }
  .nav__pill { display: none; }
  /* a blurred parent lets the page bleed through the open panel in Chromium, so the island goes solid while it's open */
  .nav__inner:has(.nav__links.is-open) { background: var(--bg-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* lock the page behind the open menu on <body>: locking <html> turns <body> into its own scroller and unsticks the bar */
  html.menu-open body { overflow: hidden; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 88px); isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -72px 0 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 70% at 80% 28%, rgba(217, 162, 78, .16), transparent 65%),
    radial-gradient(45% 50% at 8% 90%, rgba(79, 209, 197, .07), transparent 70%),
    radial-gradient(70% 55% at 50% 62%, #121418 0%, var(--bg) 70%);
}
.hero::after {
  content: ""; position: absolute; inset: -72px 0 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image: linear-gradient(rgba(232, 180, 98, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(232, 180, 98, .08) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(60% 70% at 72% 35%, #000 10%, transparent 75%);
  mask-image: radial-gradient(60% 70% at 72% 35%, #000 10%, transparent 75%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }

.hero__kicker { margin-bottom: 22px; font: 500 12px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 4.9rem); line-height: 1.02; letter-spacing: -.035em; margin-bottom: 26px; }
.lede { font-size: clamp(1.02rem, 1.4vw, 1.12rem); line-height: 1.65; color: var(--text-2); max-width: 34em; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 26px 0 0; font-size: 14px; color: var(--mute); }
.hero__since { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }

/* availability badge (text and colour come from AVAILABILITY in main.js) */
.avail:empty { display: none; }
.avail {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px;
  border-radius: 999px; border: 1px solid rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08);
  font-size: 13px; font-weight: 600; color: var(--on);
}
.avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: availPulse 2.2s infinite; }
.avail[data-status="limited"] { color: var(--dev); border-color: rgba(242, 181, 68, .35); background: rgba(242, 181, 68, .08); }
.avail[data-status="closed"] { color: #ff6b6b; border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .08); }
.avail[data-status="closed"]::before { animation: none; }
@keyframes availPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

/* the hero panel, styled after Roblox Studio's Output window + Command Bar (dark theme) */
.console {
  --so-bg: #2e2e2e;
  --so-head: #252525;
  --so-line: #1c1c1c;
  --so-edge: #3c3c3c;
  --so-text: #d2d2d2;
  --so-dim: #9b9b9b;
  --so-info: #59a7ff;
  --so-field: #1f1f1f;
  position: relative; min-width: 0;
  background: var(--so-bg);
  border: 1px solid var(--so-line);
  border-radius: 8px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .04);
  overflow: hidden;
  font-family: "Builder Sans", "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  color: var(--so-text);
}
.so-head { display: flex; align-items: stretch; justify-content: space-between; height: 32px; background: var(--so-head); border-bottom: 1px solid var(--so-line); }
.so-tab { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; background: var(--so-bg); border-right: 1px solid var(--so-line); font-size: 13px; font-weight: 600; color: #f0f0f0; box-shadow: inset 0 2px 0 #3a8cff; }
.so-tab svg { width: 15px; height: 15px; fill: none; stroke: #bdbdbd; stroke-width: 1.3; stroke-linecap: round; }
.so-tools { display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; }
.so-tools i { width: 4px; height: 4px; border-radius: 50%; background: #9a9a9a; }
.so-bar { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-bottom: 1px solid var(--so-line); }
.so-select, .so-search {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  background: var(--so-field); border: 1px solid var(--so-edge); border-radius: 4px;
  font-size: 12px; color: var(--so-text); white-space: nowrap;
}
.so-select::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 6px; border-right: 1.5px solid #a8a8a8; border-bottom: 1.5px solid #a8a8a8; transform: rotate(45deg); }
.so-search { flex: 1; min-width: 0; color: var(--so-dim); }
.so-search svg { width: 13px; height: 13px; flex: none; fill: none; stroke: #9a9a9a; stroke-width: 1.5; stroke-linecap: round; }
.so-log { padding: 8px 0 10px; font-size: 13px; line-height: 1.55; overflow-x: auto; }
.so-log .ln { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin: 0; padding: 2px 12px; white-space: nowrap; }
.so-log .ln:hover { background: rgba(255, 255, 255, .04); }
.so-log time { color: var(--so-dim); font-variant-numeric: tabular-nums; }
.so-log em { font-style: normal; color: var(--so-dim); margin-left: 6px; }
.so-log .cmd span { color: #f2f2f2; }
.so-log .info span { color: var(--so-info); }
.so-log .info em { color: #84a3c6; }
.so-cmd { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; background: var(--so-head); border-top: 1px solid var(--so-line); }
.so-cmd__label { font-size: 11.5px; font-weight: 600; color: var(--so-dim); white-space: nowrap; }
.so-cmd__input { flex: 1; min-width: 0; display: flex; align-items: center; height: 26px; padding: 0 9px; background: var(--so-field); border: 1px solid var(--so-edge); border-radius: 4px; font-size: 12.5px; color: #959595; }
.caret { display: inline-block; width: 1.5px; height: 15px; background: #e6e6e6; margin-left: 3px; animation: blink 1.05s steps(1) infinite; }
.so-cmd__input .caret { order: -1; margin: 0 4px 0 0; }
@keyframes blink { 50% { opacity: 0; } }

.js .so-log .ln { opacity: 0; transition: opacity .3s; }
.js .so-log .ln.is-on { opacity: 1; }

/* game index under the hero */
.index { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(48px, 6vw, 72px); }
.index a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 500;
  background: rgba(255, 255, 255, .03);
  transition: border-color .2s, color .2s, background-color .2s;
}
.index a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.index a:hover { color: #fff; border-color: var(--line-2); background: rgba(255, 255, 255, .06); }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 136px) 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); column-gap: clamp(32px, 6vw, 96px); align-items: end;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section__head > * { grid-column: 1; }
.section__head .section__sub { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
.section__head h2, .contact h2 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); line-height: 1.02; letter-spacing: -.035em; }
.section__sub { color: var(--text-2); font-size: 1.06rem; line-height: 1.65; margin: 0; }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.service {
  position: relative; padding: 30px 28px 28px; border: 1px solid var(--line); border-radius: var(--r-l);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); overflow: hidden;
  transition: border-color .25s, transform .25s var(--ease);
}
.service:hover { border-color: rgba(232, 180, 98, .35); transform: translateY(-3px); }
.service::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(closest-side, rgba(217, 162, 78, .22), transparent); pointer-events: none; }
.service__icon { width: 44px; height: 44px; padding: 10px; margin-bottom: 20px; border-radius: var(--r-m); fill: none; stroke: var(--acc-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; background: var(--acc-soft); border: 1px solid rgba(232, 180, 98, .25); }
.service h3 { font-size: 1.4rem; margin-bottom: 10px; }
.service > p { color: var(--text-2); font-size: 15px; }
.services__also { margin: 22px 0 0; font: 500 12.5px var(--mono); color: var(--mute); }
.ticks li { position: relative; padding-left: 24px; margin-top: 10px; font-size: 14.5px; color: var(--text-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .48em; width: 10px; height: 6px; border-left: 2px solid var(--acc-2); border-bottom: 2px solid var(--acc-2); transform: rotate(-45deg); }

/* ---------- projects ---------- */
.project {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 64px); align-items: start;
  padding-block: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--line);
}
.project:nth-of-type(odd):not(.project--feature) .project__media { order: 2; }
.project__media { position: sticky; top: calc(var(--nav-h) + 24px); min-width: 0; }

.project--feature { grid-template-columns: 1fr; border-top: 0; padding-top: 0; }
.project--feature .project__media { position: static; }
.project--feature .project__body { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4.5vw, 64px); }

.shot {
  display: block; width: 100%; padding: 0; margin: 0;
  border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
  background: #000; cursor: zoom-in; position: relative;
  transition: border-color .2s, transform .25s var(--ease);
}
.shot img { width: 100%; transition: transform .6s var(--ease), opacity .3s; }
.shot:hover { border-color: rgba(232, 180, 98, .5); }
.shot:hover img { transform: scale(1.015); }
.shot--main { box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9); }
.shot--main::after {
  content: "View"; position: absolute; right: 14px; bottom: 14px;
  padding: 6px 12px; border-radius: 999px; background: rgba(10, 12, 15, .7); backdrop-filter: blur(6px);
  font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #fff;
  opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s;
}
.shot--main:hover::after, .shot--main:focus-visible::after { opacity: 1; transform: none; }

.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.thumbs .shot { border-radius: var(--r-m); }
.thumbs--fit .shot img { aspect-ratio: 1697 / 793; object-fit: cover; }
.thumbs--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.thumbs--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* artwork panels (stand-ins until there are screenshots) */
.art { margin: 0; position: relative; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; background: #000; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9); }
.art svg { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.art figcaption {
  position: absolute; left: 14px; bottom: 12px;
  padding: 5px 10px; border-radius: 999px; background: rgba(10, 12, 15, .65); backdrop-filter: blur(6px);
  font: 500 11px var(--mono); letter-spacing: .06em; color: rgba(255, 255, 255, .75);
}

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 18px; font: 500 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px; border: 1px solid; font-weight: 600; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--live { color: var(--on); border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08); }
.status--live::before { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: pulse 2.2s infinite; }
.status--dev { color: var(--acc-2); border-color: rgba(232, 180, 98, .35); background: var(--acc-soft); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

.project h3 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin-bottom: 12px; }
.project--feature h3 { font-size: clamp(2.3rem, 4.2vw, 3.4rem); }
.tagline { font-size: clamp(1.08rem, 1.5vw, 1.22rem); line-height: 1.5; font-weight: 500; color: var(--accent); color: color-mix(in srgb, var(--accent) 65%, #fff); margin-bottom: 18px; letter-spacing: -.01em; }
.project__body > p:not(.tagline), .project__intro > p:not(.tagline) { color: var(--text-2); }
.project h4 { font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 30px 0 16px; }
.project--feature .project__built h4 { margin-top: 6px; }

.built li { position: relative; padding-left: 24px; margin-bottom: 14px; color: var(--text-2); font-size: 15.5px; line-height: 1.6; }
.built li::before {
  content: ""; position: absolute; left: 3px; top: .62em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg);
  box-shadow: 0 0 10px var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips li { padding: 6px 11px; border: 1px solid var(--line-2); border-radius: var(--r-s); font: 500 12px var(--mono); color: var(--text-2); background: rgba(255, 255, 255, .03); }

.link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 26px;
  color: var(--acc-2); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(232, 180, 98, .4); padding-bottom: 2px;
}
.link:hover { border-bottom-color: var(--acc-2); }

/* prototypes & side projects */
.side { padding-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.side__head { max-width: 680px; margin-bottom: 28px; }
.side__head h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 10px; }
.side__head p { color: var(--text-2); margin: 0; }
.side__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.mini__h { margin: 6px 0 12px; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.mini__list { margin-bottom: 4px; }
.mini__list li { position: relative; padding-left: 20px; margin-bottom: 9px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.mini__list li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: var(--acc); transform: rotate(45deg); }

/* "How it's built": module → what it does */
.arch { margin: 0; border-top: 1px solid var(--line); }
.arch div { display: grid; grid-template-columns: 9.5em 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.arch dt { font: 500 12.5px/1.6 var(--mono); color: var(--acc-2); }
.arch dd { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
@media (max-width: 600px) { .arch div { grid-template-columns: 1fr; gap: 2px; } }
.mini {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-2);
  transition: border-color .25s, transform .25s var(--ease);
}
.mini:hover { border-color: rgba(232, 180, 98, .35); transform: translateY(-3px); }
.mini__art { margin: 0; border-bottom: 1px solid var(--line); background: #000; }
.mini__art svg { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.mini__art { position: relative; }
.mini__art .shot { border: 0; border-radius: 0; }
.mini__count {
  position: absolute; right: 10px; bottom: 10px; pointer-events: none;
  padding: 4px 9px; border-radius: 999px; background: rgba(10, 12, 15, .72); backdrop-filter: blur(6px);
  font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2);
}
.mini__art .shot img { aspect-ratio: 16 / 9; object-fit: cover; }
.mini__body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.mini__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.tag { padding: 4px 9px; border-radius: var(--r-s); border: 1px solid rgba(232, 180, 98, .35); color: var(--acc-2); background: var(--acc-soft); font-weight: 600; }
.mini h4 { font-size: 1.3rem; margin-bottom: 10px; }
.mini p:not(.mini__meta) { color: var(--text-2); font-size: 14.5px; }
.mini .chips { margin-top: auto; padding-top: 6px; }
.mini .chips li { font-size: 11px; padding: 5px 9px; }

/* artwork motion */
.m-far { animation: drift-far 10s linear infinite; }
.m-mid { animation: drift-mid 11s linear infinite; }
.m-near { animation: drift-near 13s linear infinite; }
@keyframes drift-far { to { transform: translateX(-120px); } }
@keyframes drift-mid { to { transform: translateX(-200px); } }
@keyframes drift-near { to { transform: translateX(-320px); } }
.m-bob { transform-box: fill-box; transform-origin: 50% 90%; animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(6px) rotate(1.4deg); } }

.d-flicker { animation: flicker 2.6s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: .85; } 30% { opacity: 1; } 55% { opacity: .7; } 80% { opacity: .95; } }
.d-klaxon { animation: klaxon 1.4s ease-in-out infinite; }
@keyframes klaxon { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
.d-ride { animation: ride 9s ease-in-out infinite alternate; }
@keyframes ride { to { transform: translateY(70px); } }
.d-ember { animation: ember 4s ease-in infinite; }
.d-ember:nth-child(2) { animation-delay: 1s; }
.d-ember:nth-child(3) { animation-delay: 2.1s; }
.d-ember:nth-child(4) { animation-delay: 3s; }
@keyframes ember { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-120px); opacity: 0; } }

.c-flicker { animation: neon 5s linear infinite; }
@keyframes neon { 0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: .35; } }
.c-sweep { animation: sweep 7s linear infinite; }
@keyframes sweep { to { transform: translateY(1300px); } }

/* ---------- systems cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 28px 26px 24px; border: 1px solid var(--line); border-radius: var(--r-l);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); overflow: hidden;
  transition: border-color .25s, transform .25s var(--ease);
}
.card:hover { border-color: rgba(232, 180, 98, .35); transform: translateY(-3px); }
.card__tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin-bottom: 20px; }
.card__tag b { padding: 5px 9px; border-radius: 6px; font-weight: 600; color: var(--accent); background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.card[data-cat="opt"] { --accent: #4ade80; }
.card[data-cat="maths"] { --accent: #8fb4ff; }
.card[data-cat="physics"] { --accent: #ff9a62; }
.card[data-cat="eng"] { --accent: #e8b462; }
.card p.card__big { margin: 0 0 4px !important; font-size: clamp(2.3rem, 3.6vw, 2.9rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; color: var(--text) !important; font-variant-numeric: tabular-nums; }
.card p.card__big small { font-size: .45em; font-weight: 600; letter-spacing: -.01em; color: var(--accent); margin-left: 2px; }
.card p.card__big sup { font-size: .5em; font-weight: 600; color: var(--accent); vertical-align: .9em; margin-left: 2px; }
.card p.card__unit { margin: 0 0 18px !important; font: 500 12px var(--mono); color: var(--mute) !important; }
.card p.card__formula { margin: 0 0 14px !important; padding: 9px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font: 500 12.5px var(--mono); color: var(--accent) !important; overflow-wrap: anywhere; }
.card.is-out { display: none; }
.card.is-in { animation: cardIn .45s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* discipline filter */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -16px 0 28px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text-2);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.tab span { font: 500 11px var(--mono); color: var(--mute); }
.tab:hover { color: #fff; border-color: rgba(232, 180, 98, .45); }
.tab.is-on { background: var(--acc); border-color: var(--acc); color: #16110a; }
.tab.is-on span { color: rgba(22, 17, 10, .82); }
.card h3 { font-size: 1.35rem; letter-spacing: -.02em; margin-bottom: 12px; }
.card p { color: var(--text-2); font-size: 15px; }
.card p.card__stat { margin: auto 0 0 !important; padding-top: 16px; border-top: 1px dashed var(--line-2); font: 500 12.5px var(--mono); color: var(--acc-2) !important; }

/* ---------- code viewer (styled after Roblox Studio's script editor, dark theme) ---------- */
.code { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.code__files { position: sticky; top: calc(var(--nav-h) + 20px); padding: 14px 10px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-3); }
.code__game { margin: 10px 8px 6px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.code__game:first-child { margin-top: 2px; }
.code__file {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text-2); font: 500 13px var(--mono); text-align: left; cursor: pointer; transition: background-color .15s, color .15s;
}
.code__file svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; opacity: .7; }
.code__file:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.code__file[aria-selected="true"] { color: #16110a; background: var(--acc); }
.code__file[aria-selected="true"] svg { opacity: 1; }
.code__panel { min-width: 0; }
.code__notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.code__notes > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg-3); }
.code__notes h3 { margin: 0 0 8px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc-2); }
.code__notes p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.code__editor { border: 1px solid #1c1c1c; border-radius: 10px; overflow: hidden; background: #1e1e1e; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); }
.code__bar { display: flex; justify-content: space-between; gap: 12px; padding: 0 14px; height: 34px; align-items: center; background: #252525; border-bottom: 1px solid #1a1a1a; font: 12px var(--mono); color: #9a9a9a; }
.code__bar b { color: #e6e6e6; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code__pre {
  margin: 0; max-height: 560px; overflow: auto; padding: 12px 0 16px;
  font: 13px/1.6 "JetBrains Mono", ui-monospace, Consolas, monospace; color: #cccccc; tab-size: 4;
  font-variant-ligatures: none; /* Studio shows >= and ~= as typed */
}
.code__pre .ln { display: block; padding-right: 18px; white-space: pre; }
.code__pre .ln i { display: inline-block; width: 48px; padding-right: 14px; margin-right: 6px; text-align: right; font-style: normal; color: #8a8a8a; user-select: none; border-right: 1px solid #2c2c2c; }
.code__pre .ln:hover { background: rgba(255, 255, 255, .03); }
.tk-k { color: #f86d7c; font-weight: 600; }
.tk-s { color: #adf195; }
.tk-n { color: #ffc600; }
.tk-c { color: #8c8c8c; font-style: italic; }
.tk-b { color: #84d6f7; }
.tk-f { color: #fdfbac; }
#code-viewer.is-swap .code__notes, #code-viewer.is-swap .code__editor { animation: rise .35s var(--ease) both; }
#code-viewer.is-swap .code__editor { animation-delay: 60ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.code__fg { display: none; font-style: normal; opacity: .65; }
@media (max-width: 900px) {
  .code { grid-template-columns: 1fr; }
  /* one swipeable row of files, each labelled with its game */
  .code__files { position: static; display: flex; flex-wrap: nowrap; gap: 6px; padding: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
  .code__game { display: none; }
  .code__fg { display: inline; }
  .code__file { width: auto; flex: none; scroll-snap-align: start; white-space: nowrap; }
  .code__notes { grid-template-columns: 1fr; }
}

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-2); }
.steps li::before { content: "0" counter(step); display: block; font: 500 12px var(--mono); color: var(--acc-2); letter-spacing: .12em; margin-bottom: 18px; }
.steps h3 { font-size: 1.22rem; letter-spacing: -.02em; margin-bottom: 10px; }
.steps p { color: var(--text-2); font-size: 15px; margin: 0; }

/* ---------- toolkit ---------- */
.kit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kit__group { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-3); }
.kit__group h3 { font: 500 11.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.kit__group .chips { margin-top: 16px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px clamp(32px, 6vw, 96px); align-items: start; }
.about .section__head { grid-column: 1 / -1; margin-bottom: 8px; display: block; }
.about__text p { font-size: 1.06rem; color: var(--text-2); }
.about__text p:first-child { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.5; letter-spacing: -.015em; color: var(--text); }
.about__facts { margin: 0; border-top: 1px solid var(--line); }
.about__facts div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.about__facts dt { font: 500 11.5px/1.9 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.about__facts dd { margin: 0; }

/* ---------- contact ---------- */
.contact { padding-top: 0; }
.contact__panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(36px, 6vw, 72px);
  border: 1px solid var(--line); border-radius: 24px;
  background:
    radial-gradient(60% 90% at 85% 10%, rgba(217, 162, 78, .25), transparent 70%),
    var(--bg-2);
}
.contact h2 { margin-bottom: 18px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.contact__actions .btn span { font-family: var(--mono); font-size: 13.5px; }
.copied { min-height: 1.6em; margin: 16px 0 0; font: 12.5px var(--mono); color: var(--on); }

/* Discord-style profile card */
.dc { border-radius: var(--r-l); overflow: hidden; background: #111214; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); font-family: "gg sans", "Noto Sans", var(--sans); }
.dc__banner { height: 96px; background: linear-gradient(120deg, #5a3f17, #d9a24e 55%, #23190b); }
.dc__head { position: relative; padding: 0 18px; }
.dc__avatar {
  position: relative; top: -40px; width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center; border: 6px solid #111214;
  background: linear-gradient(140deg, #1a1712, #2e271b);
}
.dc__avatar svg { width: 40px; height: 40px; fill: none; stroke: var(--acc-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dc__dot { position: absolute; right: -2px; bottom: 2px; width: 22px; height: 22px; border-radius: 50%; background: #23a55a; border: 5px solid #111214; }
.dc__body { margin: -26px 12px 12px; padding: 16px; border-radius: var(--r-m); background: #1e1f22; }
.dc__name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.dc__user { color: #b5bac1; font-size: 14px; margin: 2px 0 14px; }
.dc__rule { height: 1px; background: rgba(255, 255, 255, .07); margin: 12px 0; }
.dc__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #f2f3f5; margin: 0 0 6px; }
.dc__text { font-size: 14px; color: #dbdee1; margin: 0; }
.dc__roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.dc__roles li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 4px; background: #2b2d31; font-size: 12px; color: #dbdee1; }
.dc__roles li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--acc)); }
.dc__btn { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 14px; min-height: 40px; border: 0; border-radius: 4px; background: #5865f2; color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; transition: background-color .15s; }
.dc__copy { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: copy; border-bottom: 1px dashed rgba(181, 186, 193, .5); }
.dc__copy:hover { color: #fff; }
.dc__status { margin: 10px 0 0; }
.dc__status .avail { font-size: 12px; padding: 4px 10px 4px 8px; }
.dc__btn:hover { background: #4752c4; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--mute); font-size: 13.5px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer p { margin: 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* "copied" toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  padding: 11px 18px; border-radius: 10px;
  background: var(--bg-4); border: 1px solid var(--line-2); box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
  font: 500 13px var(--mono); color: var(--text);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { .toast { bottom: 96px; } }

/* sticky call-to-action bar on phones */
.dock { display: none; }
@media (max-width: 900px) {
  body { padding-bottom: 84px; }
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(10, 12, 15, 0), rgba(10, 12, 15, .92) 35%);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  .dock .btn { min-height: 48px; }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: var(--text);
}
.lightbox::backdrop { background: rgba(4, 5, 7, .92); backdrop-filter: blur(4px); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; padding: 64px 72px 24px; display: grid; justify-items: center; gap: 14px; }
.lightbox img { max-width: min(92vw, 1700px); max-height: 80vh; width: auto; height: auto; object-fit: contain; border-radius: var(--r-m); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.lightbox figcaption { font-size: 1rem; color: var(--text-2); text-align: center; max-width: 60ch; }
.lightbox__btn {
  position: fixed; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(18, 22, 27, .85); color: var(--text);
  font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: background-color .15s;
}
.lightbox__btn:hover { background: rgba(40, 46, 54, .95); }
.lightbox__close { top: 16px; right: 16px; font-size: 17px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next { display: none; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .section__head { grid-template-columns: 1fr; }
  .section__head .section__sub { grid-column: 1; grid-row: auto; margin-top: 16px; }
  .project, .project--feature .project__body { grid-template-columns: 1fr; }
  .project:nth-of-type(odd):not(.project--feature) .project__media { order: 0; }
  .project__media { position: static; }
  .about { grid-template-columns: 1fr; }
  .contact__panel { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .thumbs--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .thumbs--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .kit { grid-template-columns: 1fr; }
  .so-log { font-size: 11.5px; }
  .so-log .ln { gap: 8px; padding: 2px 10px; }
  .so-bar .so-select:nth-child(2) { display: none; }
  .about__facts div { grid-template-columns: 1fr; gap: 4px; }
  .lightbox figure { padding: 72px 12px 24px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
  .contact__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .so-log .ln { opacity: 1; transform: none; }
}

/* the link from the Game security card to sample-audit.html */
.service__more { margin: 0; }
.service__more .link { margin-top: 22px; font-size: 14.5px; }

/* ---------- live demo: Descent's flow field (js/flowfield.js) ---------- */
html:not(.js) .demo { display: none; }
.demo {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px 32px; align-items: end;
  margin: 0 0 clamp(44px, 6vw, 64px); padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line); border-radius: var(--r-l);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
}
.demo .card__tag { margin-bottom: 16px; }
.demo h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); letter-spacing: -.025em; margin-bottom: 12px; }
.demo__intro p:last-child { margin: 0; max-width: 64ch; color: var(--text-2); font-size: 15px; }
.demo__hud { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.demo__hud div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg); }
.demo__hud dt { font: 500 10.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.demo__hud dd { margin: 6px 0 0; font: 600 1.15rem/1 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.demo__stage { grid-column: 1 / -1; position: relative; }
.demo__canvas {
  display: block; width: 100%; height: auto; aspect-ratio: 64 / 36;
  border: 1px solid var(--line-2); border-radius: var(--r-m); background: #0d1115;
  cursor: crosshair; touch-action: pan-y pinch-zoom;
}
.demo__canvas.is-drawing { cursor: cell; touch-action: none; }
.demo__canvas:focus-visible { outline: 2px solid var(--acc-2); outline-offset: 3px; }
.demo__hint { position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 5px 9px; border-radius: 6px; background: rgba(10, 12, 15, .8); font: 500 11px var(--mono); color: var(--text-2); pointer-events: none; }
.demo__controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.demo__modes, .demo__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.demo__modes { gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); }
.demo__btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text-2);
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.demo__modes .demo__btn { min-height: 32px; border-color: transparent; background: none; }
.demo__btn:hover:not(:disabled) { color: #fff; border-color: rgba(232, 180, 98, .45); }
.demo__btn[aria-pressed="true"], .demo__modes .demo__btn[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: #16110a; }
.demo__btn span { font: 500 11px var(--mono); color: var(--mute); }
.demo__btn:disabled { opacity: .45; cursor: not-allowed; }
.demo__btn:focus-visible { outline: 2px solid var(--acc-2); outline-offset: 2px; }
@media (max-width: 900px) {
  .demo { grid-template-columns: 1fr; align-items: start; }
  .demo__hud { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .demo__hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo__hint { position: static; margin-top: 8px; padding: 0; background: none; }
  .demo__controls { justify-content: flex-start; }
}

/* ---------- accent colours (classes, not inline styles, so the content security policy can forbid inline CSS) ---------- */
.acc-aw { --accent: #e39a3b; }
.acc-brass { --accent: #d9a24e; }
.acc-cyan { --accent: #36c6e0; }
.acc-cyber { --accent: #ff3d8b; }
.acc-descent { --accent: #e0473c; }
.acc-gold { --accent: #f0c27a; }
.acc-grey { --accent: #a4a9b0; }
.acc-lime { --accent: #b8e05a; }
.acc-meridian { --accent: #c9a35a; }
.acc-teal { --accent: #4fd1c5; }
.acc-aegean { --accent: #5aa9e6; }
.acc-tyrian { --accent: #b07cc6; }
.dot-brass { --c: #d9a24e; }
.dot-teal { --c: #4fd1c5; }

/* ---------- links to the case study (IGC card, the bit-exact Systems card) ---------- */
.case-link {
  display: flex; align-items: center; gap: 12px; margin: 4px 0 22px; padding: 12px 14px; border: 1px solid rgba(217, 162, 78, .35);
  border-radius: var(--r-m); background: linear-gradient(90deg, rgba(217, 162, 78, .1), transparent); text-decoration: none; transition: border-color .2s, transform .25s var(--ease);
}
.case-link:hover { border-color: var(--acc); transform: translateX(3px); }
.case-link__tag { flex: none; padding: 3px 8px; border-radius: 6px; background: var(--acc); font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #16110a; }
.case-link__text { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.case-link__go { color: var(--acc-2); transition: transform .25s var(--ease); }
.case-link:hover .case-link__go { transform: translateX(4px); }
.card a.card__link { display: inline-block; margin-top: 14px; font: 600 12.5px var(--mono); color: var(--acc-2); text-decoration: none; border-bottom: 1px solid rgba(232, 180, 98, .4); }
.card a.card__link:hover { border-bottom-color: var(--acc-2); }
