/* =========================================================
   Rojid S. Mendoza: web-slinger comic theme
   Red & blue suit colors, ink outlines, halftone print, webs
   ========================================================= */
:root {
  --bg: #0a1238;          /* night-sky navy */
  --bg-deep: #060b24;
  --panel: #111b4c;
  --panel-2: #172463;
  --red: #e3262d;         /* suit red */
  --red-deep: #a3161c;
  --blue: #2350c9;        /* suit blue */
  --blue-light: #5b86ff;
  --ink: #05060d;         /* comic ink outlines */
  --paper: #fbf3e2;       /* comic page cream */
  --yellow: #ffd23f;      /* captions + sound effects */
  --go: #3ddc84;          /* "available" dot */
  --text: #f5f3ee;
  --muted: #b4bde2;
  --line: rgba(245, 243, 238, .18);

  /* legacy names used in markup/scripts */
  --green: var(--red);
  --magenta: var(--blue);

  --display: "Bangers", Impact, "Arial Black", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hud-h: 68px;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hud-h) + 12px); }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(255, 255, 255, .045) 1.2px, transparent 1.7px);
  background-size: 14px 14px;
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--yellow); color: var(--ink); padding: 8px 12px; font-family: var(--cond); font-weight: 800;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.prompt { color: var(--red); }
.cursor { color: var(--yellow); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* Comic narration caption (yellow box) */
.caption, .section__kicker {
  display: inline-block; transform: skewX(-8deg);
  font-family: var(--cond); font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: var(--yellow);
  padding: 4px 14px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}

/* ---------- Halftone print overlay (DOTS toggle) ---------- */
.crt {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background:
    radial-gradient(rgba(0, 0, 0, .22) 1px, transparent 1.5px) 0 0 / 5px 5px,
    radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, .35) 100%);
  opacity: .55;
}
.crt-off .crt { display: none; }

/* ---------- Background battles canvas ---------- */
.battle {
  position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: .85;
}
.fights-off .battle { display: none; }
main, .footer { position: relative; z-index: 1; }

/* ---------- Comic splash (once per visit) ---------- */
.boot {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; cursor: pointer;
  background:
    url("assets/web-round.svg") center / min(140vmin, 1100px) no-repeat,
    radial-gradient(rgba(0, 0, 0, .25) 1.4px, transparent 1.9px) 0 0 / 9px 9px,
    radial-gradient(circle at 50% 45%, var(--red) 0%, var(--red-deep) 70%, #5c0a0e 100%);
  transition: opacity .35s, transform .35s;
}
.boot[hidden] { display: none; }
.boot.is-leaving { opacity: 0; transform: scale(1.08); }
.boot__screen { width: min(560px, 90vw); text-align: center; }
.boot__sfx {
  font-family: var(--display); font-size: clamp(72px, 18vw, 150px); line-height: 1; color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--ink); transform: rotate(-6deg); margin-bottom: 22px;
  animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both;
}
.boot__log {
  margin: 0 auto 22px; min-height: 8em; white-space: pre-wrap; text-align: left; display: inline-block;
  font-family: var(--cond); font-weight: 700; font-size: 21px; line-height: 1.45; color: #fff;
  text-shadow: 2px 2px 0 var(--ink);
}
.boot__press { font-family: var(--cond); font-weight: 800; letter-spacing: .1em; font-size: 14px; color: var(--yellow); animation: blink 1.2s steps(1) infinite; }
@keyframes pop { 0% { transform: scale(.2) rotate(-20deg); opacity: 0; } 100% { transform: scale(1) rotate(-6deg); opacity: 1; } }

/* ---------- Top bar ---------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--hud-h);
  background:
    url("assets/web-corner.svg") left top / 260px no-repeat,
    linear-gradient(180deg, #e0242c, #b9141b);
  border-bottom: 4px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
}
.hud__inner {
  max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.hud__left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hud__logo { text-decoration: none; flex: none; }
.hud__mark {
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
  width: 48px; height: 48px; border-radius: 50%;
  font-family: var(--display); font-size: 24px; letter-spacing: .02em; line-height: 1; color: var(--ink);
  background: #fff;
  border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .2s;
}
.hud__mark b { color: var(--red); font-weight: 400; }
.hud__logo:hover .hud__mark { transform: rotate(-10deg) scale(1.06); }
.hud__mail {
  font-family: var(--cond); font-weight: 600; font-size: 18px; color: #fff; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hud__mail:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.hud__right { display: flex; align-items: center; gap: 12px; flex: none; }
.hud__score { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; margin-right: 4px; }
.hud__label { font-family: var(--cond); font-weight: 800; font-size: 11px; letter-spacing: .08em; color: var(--yellow); }
.hud__value { font-family: var(--display); font-size: 22px; letter-spacing: .06em; color: #fff; text-shadow: 2px 2px 0 var(--ink); }
.crt-toggle, .vs-toggle, .menu-btn {
  font-family: var(--cond); font-weight: 800; font-size: 14px; letter-spacing: .05em; line-height: 1;
  padding: 9px 11px; color: #fff; background: var(--ink);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(0, 0, 0, .35);
  transition: transform .12s, background-color .15s;
}
.crt-toggle span, .vs-toggle span { color: var(--yellow); }
.crt-off .crt-toggle span, .fights-off .vs-toggle span { color: #8c93b3; }
.crt-toggle:hover, .vs-toggle:hover, .menu-btn:hover { transform: translate(-1px, -1px); background: var(--blue); }
.vs-toggle[hidden] { display: none; }
.menu-btn { display: grid; place-items: center; width: 44px; height: 38px; padding: 0; }
.burger { display: grid; gap: 4px; width: 20px; }
.burger i { display: block; height: 3px; background: currentColor; border-radius: 2px; }
.burger i:nth-child(2) { width: 14px; justify-self: end; }
.menu-btn:hover .burger i:nth-child(2) { width: 20px; }

/* ---------- Menu ---------- */
.pause {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: rgba(5, 6, 13, .82);
}
.pause[hidden] { display: none; }
.pause__box {
  width: min(380px, 100%); padding: 28px 24px 22px; text-align: center;
  background: var(--paper);
  border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--red);
  color: var(--ink); animation: panelIn .3s cubic-bezier(.2, 1.4, .4, 1);
}
.pause__title { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--red); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); margin-bottom: 18px; transform: rotate(-3deg); }
.pause nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.pause nav a {
  font-family: var(--display); font-size: 28px; letter-spacing: .04em; line-height: 1.2; text-decoration: none;
  padding: 6px 10px; color: var(--ink);
}
.pause nav a:hover, .pause nav a:focus-visible, .pause nav a.is-active { color: var(--red); }
.pause nav a.is-active::before, .pause nav a:hover::before { content: "\25B6\00a0"; font-size: .7em; vertical-align: middle; }
.pause__resume { font-family: var(--cond); font-weight: 800; font-size: 14px; letter-spacing: .08em; color: #555a72; }
.pause__resume:hover { color: var(--ink); }
@keyframes panelIn { 0% { transform: scale(.85) rotate(-3deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- Buttons ---------- */
.px-btn {
  --c: var(--red);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-size: 24px; letter-spacing: .05em; line-height: 1; text-decoration: none;
  padding: 13px 24px 11px; color: #fff; background: var(--c);
  border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  transition: transform .12s, box-shadow .12s, filter .15s;
}
.px-btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); filter: brightness(1.08); }
.px-btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.px-btn--magenta { --c: var(--blue); }
.px-btn--sm { font-size: 20px; padding: 8px 14px 6px; }

/* ---------- Pills ---------- */
.pill {
  display: inline-block; font-family: var(--cond); font-weight: 800; font-size: 12px; letter-spacing: .06em; line-height: 1;
  padding: 5px 8px; border: 2px solid var(--ink); background: #e6e8f2; color: var(--ink); white-space: nowrap;
}
.pill--green { background: var(--yellow); }
.pill--magenta { background: var(--blue); color: #fff; }

.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--go); display: inline-block; box-shadow: 0 0 0 0 rgba(61, 220, 132, .7); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: min(100vh, 920px);
  padding: calc(var(--hud-h) + 40px) 0 150px;
  background:
    radial-gradient(circle at 50% 46%, transparent 0 18%, var(--bg) 62%),
    repeating-conic-gradient(from 0deg at 50% 46%, rgba(227, 38, 45, .22) 0 5deg, transparent 5deg 10deg),
    radial-gradient(ellipse 70% 60% at 50% 46%, rgba(35, 80, 201, .35), transparent 70%),
    var(--bg);
}
.hero__web { position: absolute; z-index: 1; width: 440px; height: 440px; pointer-events: none; background: url("assets/web-corner.svg") 0 0 / contain no-repeat; }
.hero__web--tl { top: var(--hud-h); left: 0; }
.hero__web--br { right: 0; bottom: 0; background-image: url("assets/web-corner-br.svg"); opacity: .8; }

.hero__grid {
  position: relative; z-index: 2;
  width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr minmax(320px, 1.3fr) 1fr; gap: 28px; align-items: center;
}

/* left column */
.hero__intro .caption { margin-bottom: 18px; }
.hero__hi { margin: 0 0 18px; font-weight: 400; }
.hero__big {
  display: inline-block;
  font-family: var(--display); font-size: clamp(72px, 8.4vw, 124px); line-height: .9; letter-spacing: .02em; color: #fff;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--red), 10px 10px 0 var(--ink);
}
.hero__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero__code {
  position: relative; display: inline-block; transform: rotate(-5deg); margin-left: 4px;
  font-family: var(--display); font-size: clamp(34px, 3.2vw, 48px); line-height: 1; letter-spacing: .03em; color: var(--red);
  background: #fff; padding: 10px 20px 8px; border: 3px solid var(--ink); border-radius: 26px;
  box-shadow: 5px 5px 0 var(--ink);
}
.hero__code::before, .hero__code::after { content: ""; position: absolute; left: 14px; bottom: -18px; border-style: solid; }
.hero__code::before { border-width: 18px 18px 0 0; border-color: var(--ink) transparent transparent; left: 12px; bottom: -21px; }
.hero__code::after { border-width: 13px 13px 0 0; border-color: #fff transparent transparent; left: 16px; bottom: -13px; }
.hero__role {
  font-family: var(--cond); font-weight: 800; font-size: clamp(20px, 1.7vw, 25px); line-height: 1.15; text-transform: uppercase;
  color: #fff; margin: 22px 0 10px; max-width: 18em;
}
.hero__type { font-family: var(--cond); font-weight: 600; font-size: 21px; margin-bottom: 26px; min-height: 1.4em; color: var(--muted); }
.hero__type .prompt { font-family: var(--display); letter-spacing: .06em; font-size: 22px; margin-right: 4px; }
.hero__type .typed { color: var(--yellow); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__actions .px-btn { font-size: 21px; padding: 12px 16px 10px; }
.hero__links { display: flex; gap: 12px; margin-bottom: 14px; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--ink); background: #fff; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, background-color .15s, color .15s;
}
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn:hover, .icon-btn:focus-visible { background: var(--red); color: #fff; transform: translate(-2px, -2px) rotate(-8deg); }
.hero__base { font-family: var(--cond); font-weight: 600; font-style: italic; color: var(--muted); font-size: 17px; }

/* center column */
.hero__figure { position: relative; align-self: end; display: grid; place-items: end center; min-height: 560px; }
.halo {
  position: absolute; left: 50%; top: 50%; width: 80%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 5px solid var(--ink);
  background:
    url("assets/web-round.svg") center / 100% no-repeat,
    repeating-conic-gradient(from 0deg, var(--red) 0 7.5deg, #c41820 7.5deg 15deg);
  box-shadow: 10px 10px 0 var(--ink), inset 0 0 0 10px rgba(0, 0, 0, .15);
}
.halo::after {
  content: ""; position: absolute; inset: -22px; border-radius: 50%;
  border: 4px dashed rgba(91, 134, 255, .65);
  animation: spin 50s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dangler { position: absolute; z-index: 4; top: -4%; left: 12%; width: 34px; height: 112px; transform-origin: 50% 0; animation: swing 3.6s ease-in-out infinite; overflow: visible; }
.dangler line { stroke: rgba(255, 255, 255, .85); stroke-width: 1.4; }
.dangler path { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.dangler ellipse { fill: var(--ink); stroke: #fff; stroke-width: 1.2; }
@keyframes swing { 0%, 100% { transform: rotate(7deg); } 50% { transform: rotate(-7deg); } }

.portrait {
  position: relative; z-index: 2; width: 100%; max-width: 600px; aspect-ratio: 1;
  -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
}
.portrait__hd {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: bottom;
  filter: drop-shadow(3px 0 0 var(--ink)) drop-shadow(-3px 0 0 var(--ink)) drop-shadow(0 -3px 0 var(--ink)) drop-shadow(8px 6px 0 rgba(35, 80, 201, .85));
}
.portrait__badge {
  position: absolute; top: 12%; right: 4%; z-index: 3;
  display: grid; place-content: center; text-align: center; width: 116px; height: 116px;
  font-family: var(--display); font-size: 30px; line-height: .95; color: var(--ink); letter-spacing: .03em;
  background: var(--yellow); transform: rotate(10deg);
  clip-path: polygon(50% 0, 59% 14%, 75% 7%, 77% 24%, 93% 25%, 86% 41%, 100% 50%, 86% 59%, 93% 75%, 77% 76%, 75% 93%, 59% 86%, 50% 100%, 41% 86%, 25% 93%, 23% 76%, 7% 75%, 14% 59%, 0 50%, 14% 41%, 7% 25%, 23% 24%, 25% 7%, 41% 14%);
  filter: drop-shadow(4px 4px 0 var(--ink));
}
.portrait__badge small { font-family: var(--cond); font-weight: 800; font-size: 10px; letter-spacing: .05em; }
.sfx {
  position: absolute; z-index: 4; pointer-events: none;
  font-family: var(--display); color: var(--yellow); letter-spacing: .04em; line-height: 1;
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--red);
}
.sfx--1 { left: 0; bottom: 30%; font-size: clamp(34px, 3.4vw, 52px); transform: rotate(-14deg); animation: sfxPop 4s ease-in-out infinite; }
@keyframes sfxPop { 0%, 70%, 100% { transform: rotate(-14deg) scale(1); } 78% { transform: rotate(-10deg) scale(1.18); } 86% { transform: rotate(-14deg) scale(.96); } }

/* right column */
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  font-family: var(--cond); font-weight: 800; font-size: 15px; letter-spacing: .06em; line-height: 1;
  color: #fff; padding: 9px 14px; background: var(--blue); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.hero__label {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
  font-family: var(--cond); font-weight: 800; font-size: 16px; letter-spacing: .14em; color: var(--red);
}
.hero__label::before { content: ""; width: 30px; height: 4px; background: var(--red); }
.hero__headline {
  font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.3vw, 50px); line-height: 1; letter-spacing: .02em;
  color: #fff; margin-bottom: 18px; text-shadow: 3px 3px 0 var(--ink);
}
.hero__headline span { color: var(--red); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.hero__bio { color: var(--muted); max-width: 30em; margin-bottom: 26px; }
.hero__more { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero__cta {
  font-family: var(--display); font-size: 22px; letter-spacing: .05em; color: #fff; text-decoration: none;
  padding-bottom: 2px; border-bottom: 4px solid var(--red);
}
.hero__cta:hover { color: var(--yellow); border-color: var(--yellow); }
.hero__ghost { font-family: var(--cond); font-weight: 800; font-size: 15px; letter-spacing: .08em; color: var(--muted); text-decoration: none; }
.hero__ghost:hover { color: var(--yellow); }

/* city skyline at the bottom of the hero */
.skyline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 210px; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, var(--bg) 0%, transparent 40%),
    url("assets/skyline.svg") center bottom / auto 100% repeat-x;
}

/* Spider-verse style offset glitch on "HI," */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0;
  -webkit-text-stroke: 0; text-shadow: none;
}
.glitch::before { color: var(--blue-light); transform: translate(-6px, 0); clip-path: inset(8% 0 58% 0); }
.glitch::after { color: var(--red); transform: translate(6px, 0); clip-path: inset(52% 0 12% 0); }
.glitch:hover::before, .glitch:hover::after, .glitch.is-glitching::before, .glitch.is-glitching::after { opacity: .95; animation: glitch .3s steps(3) 2; }
@keyframes glitch {
  0% { transform: translate(-6px, 2px); }
  50% { transform: translate(6px, -2px); }
  100% { transform: translate(-2px, 3px); }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: 96px 0; border-top: 4px solid var(--ink); }
.section__head { margin-bottom: 44px; }
.section__kicker { margin-bottom: 14px; }
.section__title {
  font-family: var(--display); font-weight: 400; font-size: clamp(48px, 6vw, 80px); line-height: .95; letter-spacing: .03em;
  color: #fff; -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--red), 8px 8px 0 var(--ink);
}

/* red "suit" section with web pattern */
#quests {
  background:
    url("assets/web-corner.svg") left top / 520px no-repeat,
    url("assets/web-corner-br.svg") right bottom / 520px no-repeat,
    radial-gradient(rgba(0, 0, 0, .2) 1.3px, transparent 1.8px) 0 0 / 10px 10px,
    linear-gradient(160deg, #e3262d, #a3161c);
}
#quests .section__title { text-shadow: 4px 4px 0 var(--blue), 8px 8px 0 var(--ink); }
/* blue "suit" section */
#inventory {
  background:
    url("assets/web-corner-tr.svg") right top / 480px no-repeat,
    radial-gradient(rgba(0, 0, 0, .18) 1.3px, transparent 1.8px) 0 0 / 10px 10px,
    linear-gradient(160deg, #2350c9, #142f86);
}
#inventory .section__title { text-shadow: 4px 4px 0 var(--red), 8px 8px 0 var(--ink); }

/* ---------- Comic panel (story box / form) ---------- */
.term {
  background: var(--paper); color: var(--ink);
  border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--red);
}
.term__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--red); color: #fff; border-bottom: 4px solid var(--ink);
  font-family: var(--display); font-size: 24px; letter-spacing: .05em; line-height: 1; padding: 10px 16px 8px;
  text-shadow: 2px 2px 0 var(--ink);
}
.term__dots { color: var(--yellow); }
.term__body { padding: 24px 26px; display: flex; flex-direction: column; gap: 14px; font-size: 18px; }
.term__body mark { background: var(--yellow); color: var(--ink); padding: 0 4px; font-weight: 600; }
.term__body a { color: var(--red); }
.term__sign { font-family: var(--display); font-size: 24px; letter-spacing: .04em; color: var(--red); text-align: right; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: start; }
.saves__title { font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: .04em; color: #fff; text-shadow: 3px 3px 0 var(--ink); margin-bottom: 18px; }
.saves__title small { font-family: var(--cond); font-weight: 600; font-size: 17px; letter-spacing: 0; color: var(--muted); margin-left: 8px; text-shadow: none; }
.saves__list { display: flex; flex-direction: column; gap: 18px; }
.save {
  display: grid; gap: 2px; padding: 14px 18px;
  background: var(--panel); border: 3px solid var(--ink); border-left: 8px solid var(--blue);
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform .15s;
}
.save:hover { transform: translate(-3px, -3px) rotate(-.6deg); }
.save--active { border-left-color: var(--red); }
.save__slot { font-family: var(--cond); font-weight: 800; font-size: 13px; letter-spacing: .1em; color: var(--yellow); }
.save__name { font-family: var(--cond); font-weight: 700; font-size: 22px; color: #fff; line-height: 1.15; }
.save__meta { color: var(--muted); font-size: 16px; }
.save__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; font-family: var(--cond); font-weight: 700; font-size: 15px; color: var(--muted); }

/* ---------- Missions ---------- */
.quests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.quest {
  display: flex; flex-direction: column; padding: 22px;
  background: var(--panel); border: 4px solid var(--ink); box-shadow: 9px 9px 0 var(--ink);
  transition: transform .15s;
}
.quest:hover { transform: translate(-3px, -4px) rotate(-.8deg); }
.quest:nth-child(2):hover { transform: translate(-3px, -4px) rotate(.8deg); }
.quest__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.quest__no { font-family: var(--display); font-size: 24px; letter-spacing: .05em; color: var(--yellow); text-shadow: 2px 2px 0 var(--ink); }
.quest__role { font-family: var(--display); font-weight: 400; font-size: 32px; letter-spacing: .03em; line-height: 1; color: #fff; text-shadow: 3px 3px 0 var(--red); margin-bottom: 8px; }
.quest__where { font-family: var(--cond); font-weight: 700; color: var(--blue-light); font-size: 18px; line-height: 1.2; }
.quest__time { font-family: var(--cond); font-weight: 600; color: var(--muted); font-size: 16px; margin: 4px 0 14px; }
.objectives { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; flex: 1; }
.objectives li { position: relative; padding-left: 32px; font-size: 16px; line-height: 1.45; }
.objectives li::before {
  content: "\2713"; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--red); border: 2px solid var(--ink);
}
.quest__reward { border-top: 3px dashed var(--line); padding-top: 12px; font-size: 15px; color: var(--muted); }
.quest__reward span { font-family: var(--cond); font-weight: 800; font-size: 13px; letter-spacing: .1em; color: var(--yellow); display: block; margin-bottom: 4px; }

/* ---------- Case files (projects) ---------- */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.level {
  display: flex; flex-direction: column; text-align: left; color: var(--text);
  background: var(--panel); border: 4px solid var(--ink); box-shadow: 9px 9px 0 var(--red);
  transition: transform .15s, box-shadow .15s;
}
.level:not(.level--locked):hover, .level:not(.level--locked):focus-visible { transform: translate(-3px, -4px) rotate(-.8deg); box-shadow: 12px 12px 0 var(--red); }
.level__screen {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden;
  background:
    url("assets/web-round.svg") center / 130% no-repeat,
    radial-gradient(rgba(0, 0, 0, .22) 1.3px, transparent 1.8px) 0 0 / 9px 9px,
    linear-gradient(150deg, var(--blue), #142f86);
  border-bottom: 4px solid var(--ink);
}
.level:nth-child(2) .level__screen {
  background:
    url("assets/web-round.svg") center / 130% no-repeat,
    radial-gradient(rgba(0, 0, 0, .22) 1.3px, transparent 1.8px) 0 0 / 9px 9px,
    linear-gradient(150deg, var(--red), var(--red-deep));
}
.level__world {
  position: absolute; top: 12px; left: 12px; transform: skewX(-8deg);
  font-family: var(--cond); font-weight: 800; font-size: 14px; letter-spacing: .08em;
  color: var(--ink); background: var(--yellow); padding: 3px 10px; border: 2px solid var(--ink);
}
.level__icon { width: 78px; height: 78px; fill: #fff; filter: drop-shadow(4px 4px 0 var(--ink)); }
.level__play {
  position: absolute; bottom: 10px; right: 12px; font-family: var(--display); font-size: 22px; letter-spacing: .05em;
  color: #fff; text-shadow: 2px 2px 0 var(--ink); opacity: 0; transform: translateX(8px); transition: opacity .2s, transform .2s;
}
.level:hover .level__play, .level:focus-visible .level__play { opacity: 1; transform: none; }
.level__info { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; }
.level__name { font-family: var(--display); font-size: 28px; letter-spacing: .03em; line-height: 1; color: #fff; }
.level__desc { color: var(--muted); font-size: 16px; line-height: 1.45; }
.level__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--cond); font-weight: 700; font-size: 15px; color: var(--yellow); margin-top: 4px; }
.level__meta span + span { color: var(--muted); }
.level--locked { box-shadow: 9px 9px 0 #2b335e; opacity: .75; }
.level--locked .level__screen { background: repeating-linear-gradient(-45deg, #1b2452 0 14px, #141b40 14px 28px); }
.level--locked .level__icon { fill: #8c93b3; }
.level--locked .level__play { opacity: 1; transform: rotate(-8deg); color: var(--red); font-size: 30px; right: auto; bottom: auto; position: absolute; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.level--locked .level__meta { color: var(--muted); }

/* ---------- Utility belt (skills) ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 22px; font-family: var(--cond); font-weight: 800; font-size: 14px; letter-spacing: .08em; color: #fff; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 16px; height: 16px; display: inline-block; border: 2px solid var(--ink); }
.sw--green { background: var(--red); }
.sw--magenta { background: var(--paper); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.item {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; overflow: hidden;
  aspect-ratio: 1; padding: 14px; background: var(--red); color: #fff;
  border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  transition: transform .15s;
}
.item::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; background: url("assets/web-round.svg") center / contain no-repeat; opacity: .7; }
.item--soft { background: var(--paper); color: var(--ink); }
.item--soft::after { filter: invert(1); opacity: .35; }
.item:hover { transform: translate(-3px, -3px) rotate(-2deg); }
.item:nth-child(even):hover { transform: translate(-3px, -3px) rotate(2deg); }
.item__code {
  position: relative; z-index: 1;
  font-family: var(--display); font-size: 46px; line-height: 1; letter-spacing: .02em;
  color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink);
}
.item--soft .item__code { color: var(--blue); }
.item__name { position: relative; z-index: 1; font-family: var(--cond); font-weight: 700; font-size: 18px; line-height: 1.1; }

/* ---------- Hall of fame (certificates) ---------- */
.trophies { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.trophy {
  display: flex; flex-direction: column; text-align: left; color: var(--text);
  background: var(--panel); border: 4px solid var(--ink); box-shadow: 10px 10px 0 var(--blue);
  transition: transform .15s, box-shadow .15s;
}
.trophy:hover, .trophy:focus-visible { transform: translate(-3px, -4px) rotate(-.6deg); box-shadow: 13px 13px 0 var(--blue); }
.trophy__banner {
  font-family: var(--display); font-size: 24px; letter-spacing: .06em; line-height: 1; padding: 10px 16px 8px;
  background: var(--yellow); color: var(--ink); border-bottom: 4px solid var(--ink);
}
.trophy__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f2f2f2; border-bottom: 4px solid var(--ink); }
.trophy__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.trophy:hover .trophy__img img { transform: scale(1.04); }
.trophy__name { font-family: var(--cond); font-weight: 700; font-size: 22px; line-height: 1.2; padding: 16px 20px 4px; color: #fff; }
.trophy__meta { font-family: var(--cond); font-weight: 600; font-size: 16px; color: var(--blue-light); padding: 0 20px 20px; }

/* Styled stand-in for the Jobs180 certificate (no image file available) */
.trophy__img--cert, .viewer .mini-cert-wrap {
  display: grid; place-items: center;
  background:
    linear-gradient(135deg, #ff7a2f 0 11%, transparent 11%),
    linear-gradient(135deg, #0b4d1e 0 17%, transparent 17%),
    linear-gradient(315deg, #ff7a2f 0 11%, transparent 11%),
    linear-gradient(315deg, #127a2c 0 17%, transparent 17%),
    #f3f3f3;
}
.mini-cert { display: flex; flex-direction: column; align-items: center; text-align: center; color: #2b2b2b; padding: 20px; font-family: Arial, Helvetica, sans-serif; }
.mini-cert__title { font-weight: 800; font-size: 32px; letter-spacing: .04em; line-height: 1; }
.mini-cert__sub { font-weight: 700; letter-spacing: .25em; font-size: 12px; margin-top: 6px; }
.mini-cert__name { font-weight: 700; font-size: 18px; margin-top: 22px; }
.mini-cert__event { font-size: 13px; margin-top: 4px; color: #127a2c; font-weight: 600; }

/* ---------- Contact ---------- */
.section--contact {
  background:
    url("assets/web-corner-bl.svg") left bottom / 460px no-repeat,
    radial-gradient(ellipse 50% 60% at 85% 30%, rgba(227, 38, 45, .22), transparent 70%),
    var(--bg);
}
/* short call-to-action on the main page */
.cta { display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: center; }
.cta__main .section__title { margin-bottom: 22px; }
.cta__lead { color: var(--muted); max-width: 34em; margin-bottom: 30px; }
.cta__bubble {
  position: relative; justify-self: end; max-width: 330px; transform: rotate(3deg);
  font-family: var(--cond); font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--ink);
  background: #fff; padding: 20px 24px; border: 3px solid var(--ink); border-radius: 30px;
  box-shadow: 6px 6px 0 var(--ink);
}
.cta__bubble::before, .cta__bubble::after { content: ""; position: absolute; border-style: solid; }
.cta__bubble::before { left: 34px; bottom: -24px; border-width: 24px 24px 0 0; border-color: var(--ink) transparent transparent; }
.cta__bubble::after { left: 38px; bottom: -16px; border-width: 17px 17px 0 0; border-color: #fff transparent transparent; }

/* standalone message page */
.page-top {
  position: relative; z-index: 2;
  background: linear-gradient(180deg, #e0242c, #b9141b);
  border-bottom: 4px solid var(--ink);
}
.page-top__inner { display: flex; justify-content: space-between; align-items: center; min-height: var(--hud-h); }
.back-link { font-family: var(--display); font-size: 22px; letter-spacing: .05em; color: #fff; text-decoration: none; text-shadow: 2px 2px 0 var(--ink); }
.back-link:hover { color: var(--yellow); }
.contact-page { border-top: 0; padding-top: 64px; min-height: calc(100vh - var(--hud-h) - 100px); }

.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: start; }
.contact__info .section__kicker { margin-bottom: 14px; }
.contact__info .section__title { margin-bottom: 24px; }
.contact__lead { color: var(--muted); margin-bottom: 30px; max-width: 30em; }

.status-card {
  padding: 18px 22px; margin-bottom: 34px;
  background: var(--panel); border: 3px solid var(--ink); border-left: 8px solid var(--go);
  box-shadow: 6px 6px 0 var(--ink);
}
.status-card__title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  font-family: var(--display); font-size: 24px; letter-spacing: .05em; line-height: 1; color: #fff;
}
.status-card__text { color: var(--muted); font-size: 16px; }
.status-card__text mark { background: var(--yellow); color: var(--ink); padding: 0 4px; font-weight: 600; white-space: nowrap; }

.channels__title { font-family: var(--cond); font-weight: 800; font-size: 14px; letter-spacing: .14em; color: var(--red); margin-bottom: 6px; }
.channels li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 0; border-bottom: 2px dashed var(--line);
}
.channels li:first-child { border-top: 2px dashed var(--line); }
.channels li > span:first-child { color: var(--muted); font-family: var(--cond); font-weight: 600; }
.channels a, .channels__value { color: #fff; font-weight: 500; text-decoration: none; text-align: right; overflow-wrap: anywhere; }
.channels a:hover { color: var(--yellow); }

/* form inside the comic panel */
.contact__card { box-shadow: 10px 10px 0 var(--blue); }
.msg-form { padding: 26px 24px 22px; display: grid; gap: 18px; }
.msg-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field__label { font-family: var(--cond); font-weight: 800; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.field__label em { font-style: normal; font-weight: 600; text-transform: none; color: #5b6078; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); border-radius: 0;
  padding: 10px 14px; transition: box-shadow .12s, transform .12s;
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.45; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--red) 50%), linear-gradient(-45deg, transparent 50%, var(--red) 50%);
  background-size: 8px 8px; background-repeat: no-repeat;
  background-position: calc(100% - 24px) 50%, calc(100% - 16px) 50%;
}
.field select option { background: #fff; color: var(--ink); }
.field ::placeholder { color: #8a8fa6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--red); transform: translate(-2px, -2px); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red); background: #fff0f0; }
.msg-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg-form__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px 20px; flex-wrap: wrap; margin-top: 4px; }
.msg-form__note { color: #5b6078; font-size: 15px; }
.msg-form__send[disabled] { opacity: .6; cursor: wait; }
.msg-form__status { min-height: 1.4em; font-family: var(--cond); font-weight: 700; font-size: 18px; }
.msg-form__status.is-ok { color: #0b7a3e; }
.msg-form__status.is-err { color: var(--red-deep); }
.msg-form__status a { color: inherit; }

/* ---------- Footer ---------- */
.footer {
  background:
    url("assets/web-corner-tr.svg") right top / 300px no-repeat,
    linear-gradient(180deg, #d01f27, #a3161c);
  border-top: 4px solid var(--ink); padding: 28px 0;
}
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; color: #fff; font-size: 15px; }
.footer__thanks { font-family: var(--display); font-size: 30px; letter-spacing: .05em; line-height: 1; color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.footer__top { font-family: var(--display); font-size: 20px; letter-spacing: .06em; color: #fff; text-decoration: none; text-shadow: 2px 2px 0 var(--ink); }
.footer__top:hover { color: var(--yellow); }

/* ---------- Viewer (comic panel modal) ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(rgba(0, 0, 0, .35) 1.3px, transparent 1.8px) 0 0 / 8px 8px, rgba(5, 6, 13, .85);
}
.viewer[hidden] { display: none; }
.viewer__box {
  width: min(960px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  border: 4px solid var(--ink); box-shadow: 12px 12px 0 var(--red);
  animation: panelIn .3s cubic-bezier(.2, 1.4, .4, 1);
}
.viewer__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--red); color: #fff; padding: 8px 10px 8px 16px; border-bottom: 4px solid var(--ink);
  font-family: var(--display); font-size: 22px; letter-spacing: .04em; text-shadow: 2px 2px 0 var(--ink);
}
.viewer__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__close {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); font-size: 16px; font-weight: 700; text-shadow: none;
}
.viewer__close:hover { background: var(--yellow); }
.viewer__stage { display: grid; place-items: center; padding: 16px; min-height: 0; flex: 1; overflow: auto; }
.viewer__stage img { max-height: 66vh; width: auto; max-width: 100%; object-fit: contain; border: 3px solid var(--ink); }
.viewer__card { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.viewer__card .big { font-family: var(--display); font-size: 64px; line-height: 1; letter-spacing: .04em; color: var(--red); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.viewer__card h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 36px; letter-spacing: .03em; line-height: 1; color: var(--blue); }
.viewer__card p { max-width: 30em; color: #3b4060; }
.viewer .mini-cert-wrap { width: min(86vw, 640px); aspect-ratio: 4 / 3; }
.viewer .mini-cert__title { font-size: clamp(28px, 7vw, 56px); }
.viewer .mini-cert__name { font-size: clamp(18px, 3vw, 26px); }
.viewer__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; border-top: 3px dashed rgba(5, 6, 13, .25); }
.viewer__sub { color: #3b4060; font-size: 15px; }
.viewer__nav { display: flex; gap: 12px; flex: none; }

/* ---------- Toast (easter egg) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 96; transform: translateX(-50%) rotate(-2deg);
  font-family: var(--display); font-size: 26px; letter-spacing: .05em; line-height: 1.2; text-align: center;
  background: var(--yellow); color: var(--ink); padding: 14px 22px;
  border: 4px solid var(--ink); box-shadow: 7px 7px 0 var(--red);
}
.toast[hidden] { display: none; }
.rainbow .hero__hi, .rainbow .halo { animation: hue 2s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }

/* ---------- Comic motion on scroll (set up by script.js) ----------
   Uses the separate translate / scale / rotate properties so it stacks on top of
   each element's own transform (tilted captions, rotated badges, hover lifts). */
.js-reveal [data-anim] {
  --ease-pop: cubic-bezier(.2, 1.55, .45, 1);
  transition:
    opacity .35s ease-out,
    translate .6s var(--ease-pop),
    scale .55s var(--ease-pop),
    rotate .6s var(--ease-pop),
    transform .15s, box-shadow .15s, filter .15s;
  transition-delay: var(--d, 0ms), var(--d, 0ms), var(--d, 0ms), var(--d, 0ms), 0s, 0s, 0s;
}
.js-reveal [data-anim]:not(.is-in) { opacity: 0; transition-delay: 0s; transition-duration: .2s; }
/* slam in from below when scrolling down, from above when scrolling up */
.js-reveal [data-anim="panel"]:not(.is-in) { translate: 0 calc(var(--dir, 1) * 80px); rotate: calc(var(--dir, 1) * -4deg); scale: .9; }
.js-reveal [data-anim="pow"]:not(.is-in) { scale: 1.9; rotate: -10deg; }
.js-reveal [data-anim="pop"]:not(.is-in) { scale: .15; rotate: -20deg; }
.js-reveal [data-anim="slide"]:not(.is-in) { translate: -70px 0; }
.js-reveal [data-anim="slide-r"]:not(.is-in) { translate: 70px 0; }
.js-reveal [data-anim="bubble"]:not(.is-in) { scale: 0; }
.js-reveal [data-anim="bubble"] { transform-origin: 18% 100%; }

/* sound-effect burst next to section titles */
.section__title { position: relative; width: fit-content; max-width: 100%; }
.pow-burst {
  position: absolute; left: 100%; top: -18px; margin-left: 18px; z-index: 3; pointer-events: none;
  display: grid; place-items: center; width: 132px; height: 92px;
  font-family: var(--display); font-size: 34px; letter-spacing: .03em; line-height: 1; color: var(--ink);
  -webkit-text-stroke: 0; text-shadow: none;
  background: var(--yellow);
  clip-path: polygon(50% 0, 60% 22%, 82% 6%, 78% 32%, 100% 30%, 86% 50%, 100% 72%, 76% 70%, 80% 96%, 58% 78%, 46% 100%, 38% 76%, 14% 92%, 20% 66%, 0 64%, 16% 46%, 2% 24%, 26% 28%, 24% 4%, 42% 22%);
  filter: drop-shadow(4px 4px 0 var(--red));
  animation: burstPop 1.4s cubic-bezier(.2, 1.6, .4, 1) forwards;
}
@keyframes burstPop {
  0% { scale: 0; rotate: -35deg; opacity: 1; }
  18% { scale: 1.25; rotate: 10deg; }
  30% { scale: 1; rotate: 6deg; }
  78% { opacity: 1; }
  100% { scale: 1.15; rotate: 6deg; opacity: 0; }
}

/* comic speed lines that flash when scrolling fast */
.speedlines {
  position: fixed; inset: -10%; z-index: 99; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    transparent 0 4deg, rgba(255, 255, 255, .55) 4deg 4.5deg, transparent 4.5deg 9deg,
    rgba(227, 38, 45, .45) 9deg 9.4deg, transparent 9.4deg 14deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 36%, #000 80%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 36%, #000 80%);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr 1fr; gap: 24px 32px; }
  .hero__profile { grid-column: 1 / -1; max-width: 720px; }
  .hero__figure { min-height: 470px; }
}

@media (max-width: 1020px) {
  .hud__score { display: none; }
  .quests, .levels { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero { padding-top: calc(var(--hud-h) + 28px); padding-bottom: 140px; min-height: 0; }
  .hero__grid { grid-template-columns: 1fr; gap: 12px; }
  .hero__figure { min-height: 0; order: -1; max-width: 420px; width: 100%; justify-self: center; margin-bottom: 8px; }
  .hero__profile { margin-top: 28px; }
  .hero__web { width: 300px; height: 300px; }
  .contact { grid-template-columns: 1fr; gap: 44px; }
  .cta { grid-template-columns: 1fr; gap: 40px; }
  .cta__bubble { justify-self: start; }
  .about { grid-template-columns: 1fr; }
  .trophies { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap, .hud__inner { padding-left: 16px; padding-right: 16px; }
  .hud__inner { gap: 8px; }
  .hud__right { gap: 8px; }
  .hud__mail { display: none; }
  .hud__mark { width: 42px; height: 42px; font-size: 20px; }
  .crt-toggle, .vs-toggle { font-size: 12px; padding: 8px 7px; }
  .menu-btn { width: 40px; height: 34px; }
  .hero__grid { padding-left: 16px; padding-right: 16px; }
  .hero__big { font-size: 76px; }
  .portrait__badge { width: 92px; height: 92px; font-size: 24px; }
  .section { padding: 72px 0; }
  .section__title { font-size: 50px; }
  .pow-burst { left: auto; right: -8px; top: -70px; margin-left: 0; width: 110px; height: 78px; font-size: 28px; }
  .quests, .levels { grid-template-columns: 1fr; }
  .items { grid-template-columns: repeat(2, 1fr); }
  .item__code { font-size: 38px; }
  .px-btn { font-size: 21px; padding: 12px 18px 10px; }
  .hero__actions { gap: 14px; }
  .msg-form { padding: 20px 16px; }
  .msg-form__row { grid-template-columns: 1fr; }
  .msg-form__send { width: 100%; }
  .term { box-shadow: 7px 7px 0 var(--red); }
  .term__body { padding: 18px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .viewer { padding: 12px; }
  .viewer__foot { flex-direction: column; align-items: stretch; }
  .viewer__nav { justify-content: flex-end; }
}
