/* ==========================================================================
   Abheek Bajaj: base styles
   Tokens, reset, typography and the shared "blockout" components used by
   both the landing page and the project decks.
   ========================================================================== */

/* ---------- Tokens: day lighting (default) ---------- */
:root {
  --paper: #f3f0e8;
  --paper-2: #ebe7dd;
  --paper-3: #dfdace;
  --card: #fbfaf6;
  --ink: #1c1c1e;
  --ink-2: #4b4943;
  --ink-3: #75726a;
  --line: rgba(28, 28, 30, 0.14);
  --line-strong: rgba(28, 28, 30, 0.34);
  --grid-minor: rgba(28, 28, 30, 0.045);
  --grid-major: rgba(28, 28, 30, 0.075);

  --accent: #f2611d;          /* dev-texture orange: fills, strokes, big numbers */
  --accent-deep: #d24f10;
  --accent-ink: #b0410b;      /* orange that passes contrast for small text */
  --accent-soft: rgba(242, 97, 29, 0.14);
  --blue: #2f6bdf;            /* PlayerStart arrow / measurement lines */
  --red: #d7263d;             /* unblockable */
  --yellow: #f2b705;          /* held attacks / caution tape */
  --green: #24945a;

  --note: #ffe38a;
  --note-ink: #2a2414;
  --tape: rgba(255, 244, 205, 0.72);

  /* grey-box material */
  --gb-top: #e6e2d8;
  --gb-left: #cbc6ba;
  --gb-right: #aea99c;
  --gb-edge: rgba(28, 28, 30, 0.38);
  --floor-top: #ece8df;
  --floor-left: #d3cec2;
  --floor-right: #bdb8ab;

  --arena: #1f2023;           /* dark "in-engine" viewport used for mock-ups */
  --arena-2: #2a2b2f;

  --font-sans: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;

  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 4px;
  --nav-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------- Tokens: night lighting ---------- */
:root[data-theme="night"] {
  --paper: #131417;
  --paper-2: #1a1b1f;
  --paper-3: #24262b;
  --card: #1c1e22;
  --ink: #ece8df;
  --ink-2: #b9b4a9;
  --ink-3: #8d897f;
  --line: rgba(236, 232, 223, 0.13);
  --line-strong: rgba(236, 232, 223, 0.3);
  --grid-minor: rgba(236, 232, 223, 0.03);
  --grid-major: rgba(236, 232, 223, 0.055);

  --accent: #ff6b2c;
  --accent-deep: #d9541a;
  --accent-ink: #ff9563;
  --accent-soft: rgba(255, 107, 44, 0.16);
  --blue: #6c9bff;
  --red: #ff4d63;

  --note: #e9d27a;
  --note-ink: #221d0e;
  --tape: rgba(255, 240, 190, 0.22);

  --gb-top: #3b3d43;
  --gb-left: #2d2f34;
  --gb-right: #242529;
  --gb-edge: rgba(236, 232, 223, 0.22);
  --floor-top: #2a2c31;
  --floor-left: #222327;
  --floor-right: #1b1c20;

  --arena: #0d0e10;
  --arena-2: #1a1b1e;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* graph-paper grid: 24px minor, 120px major */
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

::selection { background: var(--accent); color: #fff; }

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

/* ---------- Typography helpers ---------- */
.display {
  font-size: clamp(3rem, 8.4vw, 6.75rem);
  font-weight: 760;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  font-weight: 720;
  letter-spacing: -0.035em;
}

.h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 680;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 36em;
}

.muted { color: var(--ink-2); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow__num {
  display: inline-grid;
  place-items: center;
  min-width: 2.2em;
  padding: 0.15em 0.4em;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.hand {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--accent-ink);
}

.marker {
  background: linear-gradient(transparent 60%, var(--accent-soft) 60%, var(--accent-soft) 92%, transparent 92%);
  padding-inline: 0.08em;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.container {
  width: min(var(--maxw), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-shadow: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.25em;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--btn-shadow);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.2s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--btn-shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--btn-shadow); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

.btn--ghost {
  --btn-shadow: var(--line-strong);
  background: var(--card);
  color: var(--ink);
}
.btn--ghost:hover { --btn-shadow: var(--accent); }

.btn--small { padding: 0.6em 0.9em; font-size: 0.7rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-ink);
}
.link-arrow span { transition: transform 0.2s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Tags, chips, status ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.tag {
  display: inline-block;
  padding: 0.28em 0.6em;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  white-space: nowrap;
}
.tag--accent { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.tag--wip { border-color: var(--ink); color: var(--note-ink); background: var(--yellow); font-weight: 700; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.45em 0.8em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-2);
}
.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- Grey-box textures ---------- */
.tex-checker {
  background-color: var(--accent);
  background-image: conic-gradient(var(--accent-deep) 25%, transparent 0 50%, var(--accent-deep) 0 75%, transparent 0);
  background-size: 28px 28px;
}
.tex-grey {
  background-color: var(--paper-2);
  background-image: conic-gradient(var(--paper-3) 25%, transparent 0 50%, var(--paper-3) 0 75%, transparent 0);
  background-size: 24px 24px;
}

/* masking tape strip, positioned by the parent */
.tape {
  position: absolute;
  width: 92px;
  height: 26px;
  background: var(--tape);
  border-left: 1px dashed rgba(0, 0, 0, 0.06);
  border-right: 1px dashed rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  z-index: 2;
  pointer-events: none;
}

.sticky {
  position: relative;
  padding: 16px 18px 18px;
  background: var(--note);
  color: var(--note-ink);
  font-family: var(--font-hand);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.15;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06), 0 10px 18px -10px rgba(0, 0, 0, 0.45);
  transform: rotate(-1.5deg);
}
.sticky::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 64px;
  height: 18px;
  translate: -50% 0;
  background: var(--tape);
  rotate: 2deg;
}
.sticky small {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* framed image with offset "print" shadow */
.frame {
  position: relative;
  border: 1.5px solid var(--ink);
  background: var(--card);
  box-shadow: 8px 8px 0 var(--paper-3);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Site navigation (landing + 404) ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 720;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}
.brand__cube { width: 26px; height: 28px; flex: none; }
.brand__cube .top { fill: var(--gb-top); }
.brand__cube .left { fill: var(--gb-left); }
.brand__cube .right { fill: var(--accent); }
.brand__cube path { stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 28px);
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  padding-block: 6px;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 0 2px;
  transition: background-size 0.25s var(--ease), color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current="true"] { color: var(--ink); background-size: 100% 2px; }

/* ---------- Day / night toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle__icon {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  transition: background-color 0.3s, box-shadow 0.3s;
}
[data-theme="night"] .theme-toggle__icon {
  background: transparent;
  box-shadow: inset -5px -2px 0 0 var(--ink);
}

/* Header actions: LinkedIn and Email stay one tap away, next to the lighting toggle. */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 0.2s;
}
.nav-pill:hover { border-color: var(--accent); }
.nav-pill svg { flex: none; width: 15px; height: 15px; }
@media (max-width: 900px) {
  .nav-pill { justify-content: center; width: 34px; padding: 0; }
  .nav-pill span { display: none; }
}

/* Phones: the nav keeps two links; contact lives in the icons. */
@media (max-width: 640px) {
  .site-nav__inner { gap: 10px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.7rem; letter-spacing: 0.06em; }
  .nav-links li:nth-child(n + 3) { display: none; }
  .nav-actions { gap: 8px; }
  .theme-toggle { padding: 0 10px; }
  .theme-toggle__label { display: none; }
}

/* ---------- Video facade (thumbnail until clicked) ---------- */
.video {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--arena);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.4s;
}
.video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.65));
  pointer-events: none;
}
.video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 68px;
  height: 68px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(242, 97, 29, 0.25);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.video__play::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 21px;
  border-left: 20px solid #fff;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
}
.video:hover img { transform: scale(1.035); }
.video:hover .video__play { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(242, 97, 29, 0.25); }
.video__label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  right: 14px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video.is-playing::after { display: none; }

/* ---------- Media modal (videos + image zoom) ---------- */
.media-modal {
  width: min(1100px, 100% - 32px);
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  box-shadow: 10px 10px 0 var(--accent);
  overflow: visible;
}
.media-modal::backdrop {
  background: rgba(15, 15, 17, 0.72);
  backdrop-filter: blur(3px);
}
.media-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.media-modal__close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.media-modal__close:hover { border-color: var(--ink); background: var(--paper-2); }
.media-modal__body { padding: 12px; }
.media-modal__body .video { border-radius: 2px; }
.media-modal__body img {
  max-height: calc(100vh - 150px);
  width: auto;
  margin-inline: auto;
  object-fit: contain;
}

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Debug view easter egg (press `) ---------- */
.debug * { outline: 1px dashed color-mix(in srgb, var(--blue) 55%, transparent) !important; outline-offset: -1px; }
.debug-toast {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 300;
  padding: 8px 12px;
  border: 1px solid var(--blue);
  border-radius: 3px;
  background: var(--card);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--blue) 30%, transparent);
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer kbd {
  padding: 0.1em 0.45em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  font-family: inherit;
  color: var(--ink-2);
}
.secret {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--font-hand);
  font-size: 1.05rem;
  cursor: pointer;
}
.secret:hover { color: var(--accent-ink); border-color: var(--accent); }
.secret-found {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--accent-ink);
  letter-spacing: 0;
}

/* ---------- Grey-box arena mock-up (WIP card, Boss Fight deck) ---------- */
.arena {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    var(--arena);
}
.arena__floor {
  position: absolute;
  left: -40%;
  right: -40%;
  bottom: -30%;
  height: 95%;
  transform: perspective(380px) rotateX(62deg);
  transform-origin: 50% 100%;
  background-color: #2b2c30;
  background-image:
    linear-gradient(rgba(242, 97, 29, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 97, 29, 0.55) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
}
.arena__capsule {
  position: absolute;
  bottom: 28%;
  width: var(--w);
  height: var(--h);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: linear-gradient(90deg, #8d8a82, #c9c5bb 45%, #7b786f);
}
.arena__capsule::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  translate: -50% 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.7);
}
.arena__capsule--boss { --w: 46px; --h: 128px; left: 58%; }
.arena__capsule--player { --w: 20px; --h: 56px; left: 32%; bottom: 20%; background: linear-gradient(90deg, #2d58b8, #6c9bff 45%, #244a9c); }

.bossbar {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: 72%;
  translate: -50% 0;
  z-index: 2;
  color: #f1ede4;
}
.bossbar__name {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.bossbar__track {
  position: relative;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.55);
}
.bossbar__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--hp, 72%);
  background: linear-gradient(#e4472b, #a42412);
  transition: width 0.8s var(--ease);
}
.bossbar__fill::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 160, 0.45));
}
.bossbar__tick {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #fff;
  left: var(--at);
}
.bossbar__phases {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Island-code tile (Crateyard) ---------- */
.islandcard {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  color: #f1ede4;
  text-align: center;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 255, 255, 0.09), transparent 65%),
    linear-gradient(rgba(242, 97, 29, 0.16) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(242, 97, 29, 0.16) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--arena);
}
.islandcard__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.islandcard__code {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
  text-shadow: 3px 3px 0 var(--accent-deep);
}
.islandcard__sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffb08a;
}
.islandcard__reticle {
  justify-self: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

/* ---------- Status badges (cards, decks, recruiter page) ---------- */
:root { --state-ok: #1c7a49; --state-wip: #8a6500; --state-tool: #2557b8; }
:root[data-theme="night"] { --state-ok: #4cc98a; --state-wip: #f2c94c; --state-tool: #7ea6ff; }

.state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 9px 2px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-2);
}
.state::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state--shipped,
.state--live { color: var(--state-ok); }
.state--wip { color: var(--state-wip); }
.state--tool { color: var(--state-tool); }
.state--solo::before,
.state--study::before { border-radius: 1px; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
