:root {
  --sky-1: #74d7ff;
  --nav-height: 4.9rem;
  --sky-2: #ffd37e;
  --sky-3: #fff5c8;
  --night: #10213a;
  --panel: rgba(255, 251, 241, 0.9);
  --panel-strong: #fff7e4;
  --ink: #1b1a18;
  --muted: #5e544b;
  --line: rgba(27, 26, 24, 0.18);
  --line-strong: rgba(27, 26, 24, 0.34);
  --red: #e53935;
  --red-deep: #b31f24;
  --green: #2ca34d;
  --green-deep: #14622b;
  --brick: #b14a2b;
  --brick-light: #d27a3a;
  --coin: #ffd54a;
  --star: #fff7a6;
  --cloud: #f8fbff;
  --shadow: 0 22px 0 rgba(27, 26, 24, 0.18);
  --shadow-soft: 0 18px 42px rgba(27, 26, 24, 0.16);
  --maxw: 1200px;
  --pointer-x: 50%;
  --pointer-y: 20%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(1200px 700px at 15% 8%, rgba(255, 211, 126, 0.72), transparent 50%),
    radial-gradient(900px 640px at 84% 18%, rgba(116, 215, 255, 0.52), transparent 42%),
    linear-gradient(180deg, #7edcff 0%, #9adfff 24%, #d2f2ff 52%, #fff4d2 100%);
  overflow-x: hidden;
  position: relative;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image:
    linear-gradient(rgba(27, 26, 24, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 26, 24, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.22;
  mix-blend-mode: soft-light;
}
body::after {
  background:
    radial-gradient(280px 180px at 14% 14%, rgba(255, 255, 255, 0.52), transparent 60%),
    radial-gradient(240px 160px at 84% 10%, rgba(255, 255, 255, 0.42), transparent 60%),
    radial-gradient(760px 460px at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.16), transparent 58%);
}
main, nav, footer { position: relative; z-index: 1; }
a, button { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(229, 57, 53, 0.22); }
:focus-visible { outline: 3px solid rgba(255, 213, 74, 0.95); outline-offset: 3px; }
.container { width: min(var(--maxw), calc(100% - 2rem)); margin: 0 auto; }
.shell { position: relative; overflow-x: hidden; }
.skyline {
  position: fixed; inset: 0 0 auto; height: 42vh; pointer-events: none; z-index: 0; opacity: 0.95;
}
.skyline::before,
.skyline::after { content: ""; position: absolute; inset: auto 0 0; height: 100%; }
.skyline::before {
  background:
    radial-gradient(120px 46px at 14% 26%, var(--cloud) 40%, transparent 41%),
    radial-gradient(160px 62px at 23% 24%, var(--cloud) 36%, transparent 37%),
    radial-gradient(132px 52px at 74% 16%, var(--cloud) 38%, transparent 39%),
    radial-gradient(180px 66px at 83% 20%, var(--cloud) 36%, transparent 37%),
    radial-gradient(240px 120px at 18% 92%, #3ec35d 55%, transparent 56%),
    radial-gradient(260px 128px at 79% 95%, #2f9f4d 52%, transparent 53%);
  opacity: 0.85;
  transform: translateY(-14%);
  animation: drift 26s linear infinite alternate;
}
.skyline::after {
  background:
    linear-gradient(180deg, transparent 0 68%, rgba(194, 101, 49, 0.9) 68% 100%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 22px, transparent 22px 44px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.08) 0 22px, transparent 22px 44px);
  mask:
    radial-gradient(circle at 18% 90%, black 0 12%, transparent 13%),
    radial-gradient(circle at 46% 90%, black 0 13%, transparent 14%),
    radial-gradient(circle at 78% 92%, black 0 11%, transparent 12%);
  opacity: 0.14;
}
.scrollbar {
  position: fixed; inset: 0 auto auto 0; height: 5px; width: 0; background: linear-gradient(90deg, var(--red), var(--coin));
  box-shadow: 0 0 18px rgba(255, 213, 74, 0.6); z-index: 50;
}
nav {
  position: sticky; top: 0; background: rgba(11, 16, 26, 0.72); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 4px solid rgba(255, 255, 255, 0.14); z-index: 40;
}
.nav-wrap {
  width: min(var(--maxw), calc(100% - 2rem)); margin: 0 auto; min-height: 4.9rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.85rem; text-decoration: none; color: #fffaf0;
}
.brand-mark {
  width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border: 4px solid #1b1a18; border-radius: 0.75rem;
  background: linear-gradient(180deg, #ffcb3f 0%, #ff8d1f 100%); color: #1b1a18; box-shadow: 0 6px 0 rgba(27, 26, 24, 0.7);
  font-family: "Press Start 2P", monospace; font-size: 0.42rem; letter-spacing: -0.05em;
}
.brand-copy { display: grid; gap: 0.12rem; }
.brand-copy strong { font-family: "Bungee", sans-serif; letter-spacing: 0.03em; font-size: 1rem; line-height: 1; }
.brand-copy span { color: rgba(255, 250, 240, 0.68); font-size: 0.76rem; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; position: relative; }
.nav-links {
  display: flex; align-items: center; gap: 0.5rem; list-style: none; margin: 0; padding: 0.55rem;
  border: 4px solid #1b1a18; border-radius: 999px; background: rgba(255, 250, 240, 0.95); box-shadow: 0 6px 0 rgba(27, 26, 24, 0.7);
}
.nav-links a {
  display: inline-flex; align-items: center; justify-content: center; padding: 0.72rem 0.9rem; border-radius: 999px; text-decoration: none;
  color: var(--muted); font-family: "Press Start 2P", monospace; font-size: 0.45rem; letter-spacing: 0.06em; text-transform: uppercase; border: 2px solid transparent;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.nav-links a:hover,
.nav-links a.active { color: #1b1a18; background: rgba(255, 213, 74, 0.18); border-color: rgba(27, 26, 24, 0.16); }
.nav-cta,
.button,
.link-button,
.project-link,
.tile-link {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center; padding: 0.85rem 1rem; border: 4px solid #1b1a18; border-radius: 999px;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%); color: #fffaf0; text-decoration: none; font-family: "Press Start 2P", monospace;
  font-size: 0.42rem; letter-spacing: 0.08em; box-shadow: 0 6px 0 rgba(27, 26, 24, 0.7);
}
.nav-cta:hover,
.button:hover,
.link-button:hover,
.project-link:hover,
.tile-link:hover { transform: translateY(-3px); }
.menu-btn {
  display: none; align-items: center; justify-content: center; padding: 0.8rem 0.95rem; border: 4px solid #1b1a18; border-radius: 0.9rem;
  background: #fff7e4; color: #1b1a18; font-family: "Press Start 2P", monospace; font-size: 0.42rem; box-shadow: 0 6px 0 rgba(27, 26, 24, 0.7);
}
main { padding: 2rem 0 0; }
section { padding: 4.5rem 0; }
.hero { padding-top: 2.2rem; min-height: calc(100vh - var(--nav-height)); display: grid; align-items: center; }
.hero-grid,
.two-col,
.four-col,
.project-grid,
.contact-grid,
.skill-grid,
.timeline-grid { display: grid; gap: 1rem; }
.hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.hero-grid > * { min-width: 0; }
.hero-copy { padding: 0.6rem 0; max-width: 100%; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem; color: #fff7a6; font-family: "Press Start 2P", monospace; font-size: 0.6rem; line-height: 1.6;
  letter-spacing: 0.08em; text-transform: uppercase; text-shadow: 0 2px 0 rgba(27, 26, 24, 0.7);
}
.eyebrow::before { content: ""; width: 2rem; height: 2px; background: currentColor; opacity: 0.65; }
.hero-title,
.section-title {
  margin: 0; font-family: "Bungee", sans-serif; letter-spacing: 0.02em; line-height: 0.94; color: var(--ink); text-shadow: 0 7px 0 rgba(27, 26, 24, 0.72);
}
.hero-title { font-size: clamp(2.4rem, 9vw, 5.2rem); max-width: 9ch; margin: 0.6rem 0 0.9rem; }
body:not([data-page="home"]) .hero-title {
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  max-width: 22ch;
  text-wrap: balance;
}
.section-title { font-size: clamp(1.8rem, 4.6vw, 3.7rem); color: var(--brick); text-shadow: 0 4px 0 rgba(27, 26, 24, 0.6); }
.hero-title .accent,
.section-title .accent { color: #ffe25b; }

.hero-title span:first-child { color: #ffffff; }
.hero-lead,
.section-copy,
.card p,
.timeline-item p,
.contact-copy,
.tile-copy,
.project p {
  color: rgba(27, 26, 24, 0.82); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere;
}
.hero-lead { max-width: 42ch; color: rgba(255, 250, 240, 0.86); font-size: clamp(1.03rem, 1.4vw, 1.15rem); margin-top: 0.3rem; }
.cta-row,
.badge-row,
.chip-row,
.tile-row,
.contact-actions,
.game-stats,
.tag-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.cta-row { margin-top: 1.55rem; }
.button,
.link-button,
.project-link,
.tile-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.92rem 1.06rem; border: 4px solid #1b1a18; border-radius: 0.95rem;
  text-decoration: none; font-family: "Press Start 2P", monospace; font-size: 0.43rem; letter-spacing: 0.07em; text-transform: uppercase; background: #fff7e4; color: #1b1a18; box-shadow: 0 6px 0 rgba(27, 26, 24, 0.7);
}
.button.primary,
.tile-link.primary,
.link-button.primary { background: linear-gradient(180deg, #ffcf42 0%, #f7a321 100%); }
.button.alt,
.link-button.alt { background: linear-gradient(180deg, #f4ffdd 0%, #d1f5ab 100%); }
.badge,
.chip,
.stat,
.game-stat,
.tag,
.level-chip {
  display: inline-flex; align-items: center; justify-content: center; padding: 0.55rem 0.75rem; border: 3px solid rgba(27, 26, 24, 0.86); border-radius: 999px;
  background: rgba(255, 250, 240, 0.96); box-shadow: 0 4px 0 rgba(27, 26, 24, 0.55); font-family: "Press Start 2P", monospace; font-size: 0.38rem; letter-spacing: 0.05em; text-transform: uppercase; color: #1b1a18;
}
.badge-row { margin-top: 1.25rem; }
.card,
.story-card,
.timeline-item,
.skill-card,
.project,
.contact-card,
.map-card,
.stage-card,
.boss-card,
.warp-card {
  position: relative; border: 4px solid #1b1a18; border-radius: 1.2rem; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; isolation: isolate;
}
.card::after,
.story-card::after,
.timeline-item::after,
.skill-card::after,
.project::after,
.contact-card::after,
.map-card::after,
.stage-card::after,
.boss-card::after,
.warp-card::after,
.scene-shell::after {
  content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.22), transparent 30%); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; z-index: -1;
}
.card:hover::after,
.story-card:hover::after,
.timeline-item:hover::after,
.skill-card:hover::after,
.project:hover::after,
.contact-card:hover::after,
.map-card:hover::after,
.stage-card:hover::after,
.boss-card:hover::after,
.warp-card:hover::after,
.scene-shell:hover::after { opacity: 1; }
.card,
.story-card,
.timeline-item,
.skill-card,
.project,
.contact-card,
.map-card,
.stage-card,
.boss-card,
.warp-card { padding: 1.1rem; }
.scene-shell { padding: 1rem; border: 4px solid #1b1a18; border-radius: 1.6rem; background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)); box-shadow: var(--shadow); }
.scene {
  position: relative; min-height: 28rem; max-width: 100%; box-sizing: border-box;
  border: 4px solid #1b1a18; border-radius: 1.1rem; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0 60%, rgba(198, 101, 54, 0.92) 60% 100%), linear-gradient(180deg, #9ae8ff 0%, #dffbff 100%);
  image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor;
  will-change: transform, opacity;
}
.scene-grid { position: absolute; inset: 0; background-image: 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: 24px 24px; mix-blend-mode: soft-light; }
.cloud,
.hill,
.pipe,
.block,
.coin,
.star,
.flag,
.hero-sprite,
.warp,
.tube,
.mushroom,
.brick-run { position: absolute; image-rendering: pixelated; transform: translateZ(0); }
.cloud {
  width: 7rem; height: 2.5rem; background: var(--cloud); border: 4px solid #1b1a18; border-radius: 999px; box-shadow: 0 5px 0 rgba(27, 26, 24, 0.45); animation: float 8s ease-in-out infinite;
}
.cloud::before,
.cloud::after { content: ""; position: absolute; border: 4px solid #1b1a18; background: inherit; border-radius: 999px; }
.cloud::before { width: 3rem; height: 3rem; left: 0.9rem; top: -1.1rem; }
.cloud::after { width: 2.5rem; height: 2.5rem; right: 0.8rem; top: -0.9rem; }
.cloud.one { left: 1rem; top: 1.3rem; }
.cloud.two { right: 1.4rem; top: 2.1rem; animation-delay: -2.5s; }
.hill { bottom: 5.4rem; border: 4px solid #1b1a18; border-radius: 50% 50% 0 0; background: linear-gradient(180deg, #52cc63 0%, #2e9d44 100%); box-shadow: 0 6px 0 rgba(27, 26, 24, 0.45); }
.hill.one { width: 15rem; height: 7.8rem; left: -0.8rem; }
.hill.two { width: 12rem; height: 6.3rem; right: 3rem; }
.ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 5.8rem; border-top: 4px solid #1b1a18;
  background: linear-gradient(180deg, #62d463 0 24%, #429f46 24% 100%), repeating-linear-gradient(90deg, rgba(27, 26, 24, 0.14) 0 24px, transparent 24px 48px);
}
.block-run { position: absolute; bottom: 10.2rem; left: 12%; display: grid; grid-template-columns: repeat(3, 2.4rem); gap: 0.3rem; }
.block { width: 2.4rem; height: 2.4rem; border: 4px solid #1b1a18; background: linear-gradient(180deg, var(--brick-light) 0%, var(--brick) 100%); box-shadow: 0 5px 0 rgba(27, 26, 24, 0.45); }
.block.question { background: linear-gradient(180deg, #ffe45f 0%, #ffb629 100%); }
.block.question::before { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font-family: "Bungee", sans-serif; font-size: 1rem; color: #1b1a18; }
.pipe { width: 7.5rem; height: 7rem; right: 2.2rem; bottom: 5.8rem; border: 4px solid #1b1a18; border-radius: 0.85rem 0.85rem 0 0; background: linear-gradient(180deg, #32cc61 0%, #15983d 100%); box-shadow: 0 6px 0 rgba(27, 26, 24, 0.45); }
.pipe::before { content: ""; position: absolute; left: -0.6rem; right: -0.6rem; top: -1.1rem; height: 2.2rem; border: 4px solid #1b1a18; border-radius: 0.6rem; background: linear-gradient(180deg, #46e073 0%, #26b14b 100%); }
.coin { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 4px solid #1b1a18; background: radial-gradient(circle at 35% 30%, #fff6c8 0 16%, transparent 17%), linear-gradient(180deg, #ffeb7f 0%, var(--coin) 100%); box-shadow: 0 4px 0 rgba(27, 26, 24, 0.45); animation: bob 1.7s ease-in-out infinite; image-rendering: pixelated; }
.coin::before { content: ""; position: absolute; inset: 0.4rem; border: 3px solid rgba(27, 26, 24, 0.75); border-radius: 50%; }
.coin.one { left: 43%; top: 5.1rem; }
.coin.two { left: 50%; top: 3.5rem; animation-delay: -0.5s; }
.star { width: 2rem; height: 2rem; left: 19%; top: 6.4rem; background: var(--star); border: 4px solid #1b1a18; box-shadow: 0 4px 0 rgba(27, 26, 24, 0.45); clip-path: polygon(50% 0%, 61% 34%, 98% 38%, 69% 59%, 79% 96%, 50% 74%, 21% 96%, 31% 59%, 2% 38%, 39% 34%); animation: spin 3.2s linear infinite; }
.flag { width: 0.5rem; height: 12rem; right: 10.8rem; bottom: 5.8rem; background: #1b1a18; }
.flag::before { content: ""; position: absolute; left: 0.4rem; top: 0.4rem; width: 4.4rem; height: 3rem; border: 4px solid #1b1a18; background: linear-gradient(180deg, #ff5f59 0%, #e23430 100%); clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%); }
.hero-sprite { left: 7.2rem; bottom: 5.2rem; width: 5.2rem; height: 6.8rem; box-shadow: 0 6px 0 rgba(27, 26, 24, 0.45); animation: bob 1.9s ease-in-out infinite; display: block; }
.hero-sprite svg { width: 100%; height: 100%; image-rendering: pixelated; shape-rendering: crispEdges; }
.game-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 0.85rem; color: #fffaf0; }
.game-meta strong,
.game-meta span { font-family: "Press Start 2P", monospace; font-size: 0.38rem; letter-spacing: 0.06em; }
.scene-grid-2 { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 0.85rem; margin-top: 0.85rem; }
.meter,
.progress { position: relative; height: 0.95rem; border: 3px solid #1b1a18; border-radius: 999px; background: rgba(255, 250, 240, 0.92); overflow: hidden; }
.meter > span,
.progress > span { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #ffba2f 0%, #ff6f45 100%); transform-origin: left; }
.section-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.35rem; flex-wrap: wrap; }
.section-index { flex: 0 0 auto; width: 3rem; height: 3rem; border: 4px solid #1b1a18; border-radius: 0.95rem; background: linear-gradient(180deg, #fff7e4 0%, #ffe25b 100%); display: grid; place-items: center; font-family: "Press Start 2P", monospace; font-size: 0.5rem; box-shadow: 0 6px 0 rgba(27, 26, 24, 0.7); }
.section-title-group { max-width: 52rem; }
.section-copy { max-width: 54ch; margin-top: 0.7rem; }
.four-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timeline-grid,
.project-grid,
.skill-grid,
.contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.story-card p + p,
.card p + p,
.tile-copy + .tile-copy { margin-top: 0.8rem; }
.orbital { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.orbital .mini-card { padding: 0.9rem; border: 3px solid #1b1a18; border-radius: 1rem; background: rgba(255, 247, 228, 0.96); box-shadow: 0 5px 0 rgba(27, 26, 24, 0.55); }
.mini-card strong,
.metric strong,
.timeline-item strong,
.contact-card strong,
.project h3,
.skill-card h3,
.stage-title { display: block; margin: 0 0 0.35rem; font-family: "Bungee", sans-serif; font-size: 1rem; line-height: 1.08; }
.mini-card span,
.metric span,
.timeline-item time,
.project .kicker,
.skill-card .kicker,
.contact-card .kicker,
.stage-meta { display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 0.5rem; color: var(--muted); font-family: "Press Start 2P", monospace; font-size: 0.36rem; letter-spacing: 0.06em; text-transform: uppercase; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.metric { padding: 0.95rem; border: 3px solid #1b1a18; border-radius: 1rem; background: rgba(255, 255, 255, 0.92); box-shadow: 0 4px 0 rgba(27, 26, 24, 0.45); }
.metric p { margin: 0; font-size: 0.9rem; }
.skill-card,
.project,
.contact-card,
.timeline-item,
.stage-card,
.boss-card,
.warp-card,
.map-card { display: flex; flex-direction: column; gap: 0.7rem; }
.skill-card p,
.project p,
.contact-card p,
.timeline-item p,
.stage-card p,
.boss-card p { margin: 0; }
.chip-row,
.tag-row { margin-top: 0.25rem; }
.tag,
.chip,
.level-chip { width: fit-content; }
.meter-block { margin-top: 0.35rem; }
.meter-label { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 0.35rem; font-family: "Press Start 2P", monospace; font-size: 0.34rem; text-transform: uppercase; }
.project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project { min-height: 100%; }
.project .visual,
.boss-visual,
.warp-visual,
.stage-visual { position: relative; min-height: 13rem; padding: 1rem; border: 3px solid #1b1a18; border-radius: 1rem; background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0 64%, rgba(198, 101, 54, 0.92) 64% 100%), linear-gradient(180deg, #9ae8ff 0%, #dffbff 100%); overflow: hidden; }
.project .visual::before,
.boss-visual::before,
.warp-visual::before,
.stage-visual::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(27, 26, 24, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(27, 26, 24, 0.08) 1px, transparent 1px); background-size: 20px 20px; mix-blend-mode: multiply; opacity: 0.3; }
.stage-visual .level-number,
.project .visual .level-number { position: absolute; inset: 0.9rem auto auto 0.9rem; z-index: 1; padding: 0.5rem 0.65rem; border: 3px solid #1b1a18; border-radius: 999px; background: rgba(255, 250, 240, 0.96); font-family: "Press Start 2P", monospace; font-size: 0.34rem; }
.project .visual .level-art,
.stage-visual .level-art,
.boss-visual .level-art,
.warp-visual .level-art { position: absolute; inset: auto 1rem 1rem; z-index: 1; display: grid; gap: 0.55rem; }
.stage-visual .level-art { grid-template-columns: 1fr 1fr; align-items: end; }
.tile-stack,
.reward-stack { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.brick-run.compact { position: static; display: grid; grid-template-columns: repeat(4, 2rem); gap: 0.3rem; }
.brick-run.compact .block { width: 2rem; height: 2rem; }
.brick-run.compact .block.question { width: 2rem; height: 2rem; }
.project-link,
.tile-link { margin-top: auto; align-self: flex-start; }
.project-link::after,
.tile-link::after { content: " ->"; }
.contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact-links { display: grid; gap: 0.7rem; }
.contact-links a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.9rem 1rem; border: 3px solid #1b1a18; border-radius: 1rem; background: rgba(255, 250, 240, 0.94); box-shadow: 0 5px 0 rgba(27, 26, 24, 0.55); text-decoration: none; }
.contact-links span { display: block; color: var(--muted); font-family: "Press Start 2P", monospace; font-size: 0.34rem; letter-spacing: 0.06em; text-transform: uppercase; }
.contact-links strong { font-family: "Bungee", sans-serif; font-size: 0.96rem; line-height: 1.1; }
footer { padding: 1.2rem 0 2rem; color: rgba(27, 26, 24, 0.72); font-size: 0.82rem; }
footer .container { text-align: center; }
.interactive,
.tilt { transform-style: preserve-3d; transition: transform 0.18s ease, box-shadow 0.18s ease; will-change: transform; }
.interactive:hover,
.tilt:hover { box-shadow: 0 26px 0 rgba(27, 26, 24, 0.18); }
.marquee { margin-top: 1.2rem; overflow: hidden; border: 4px solid #1b1a18; border-radius: 999px; background: rgba(255, 250, 240, 0.9); box-shadow: 0 6px 0 rgba(27, 26, 24, 0.7); }
.marquee-track { display: flex; width: max-content; animation: marquee 22s linear infinite; }
.marquee-group { display: flex; gap: 1.4rem; padding: 0.8rem 0.95rem; flex: 0 0 auto; white-space: nowrap; }
.marquee-group span { font-family: "Press Start 2P", monospace; font-size: 0.36rem; text-transform: uppercase; }
.marquee-group span::before { content: "*"; margin-right: 0.8rem; color: var(--red); }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes drift { from{transform:translateX(-2%)} to{transform:translateX(2%)} }
@keyframes marquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }
@media (max-width: 1100px) { .hero-grid,.two-col,.project-grid,.skill-grid,.contact-grid,.timeline-grid,.four-col { grid-template-columns: 1fr 1fr; } .scene { min-height: 28rem; } }

/* Mobile-first polish: ensure single-column flows, tighter type, bigger tap targets */
@media (max-width: 900px) {
  .container, .nav-wrap { width: calc(100% - 1rem); }
  .hero-grid, .scene-grid-2, .two-col { grid-template-columns: 1fr; }
  .hero { padding-top: 1.6rem; }
  .hero-title { font-size: clamp(1.9rem, 9vw, 3.4rem); }
  body:not([data-page="home"]) .hero-title { font-size: clamp(1.85rem, 4.4vw, 3rem); max-width: 24ch; }
  .hero-lead { font-size: 0.98rem; }
  .nav-links { right: 0; width: min(100%, calc(100vw - 2rem)); padding: 0.65rem; }
  .nav-links a { padding: 0.9rem 1rem; font-size: 0.46rem; }
  .scene { min-height: 22rem; }
  .scene, .scene * { image-rendering: pixelated; }
  .card, .project, .skill-card, .contact-card { padding: 0.9rem; border-width: 3px; }
  .button, .project-link, .tile-link { padding: 0.9rem; font-size: 0.38rem; }
  .marquee { border-width: 3px; }
}

@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .cloud { animation-duration: 12s; }
  .coin { animation-duration: 2.2s; }
}

@media (max-width: 860px) {
  .nav-wrap { min-height: 4.4rem; }
  .nav-links { position: absolute; top: calc(100% + 0.8rem); right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0.35rem; width: min(19rem, calc(100vw - 2rem)); padding: 0.75rem; border-radius: 1rem; box-shadow: 0 8px 0 rgba(27, 26, 24, 0.7); }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; justify-content: flex-start; }
  .menu-btn { display: inline-flex; }
  .nav-cta { display: none; }
  .hero { min-height: auto; padding-top: 1.6rem; }
  .hero-grid,.two-col,.project-grid,.skill-grid,.contact-grid,.timeline-grid,.four-col,.scene-grid-2,.metric-grid,.orbital { grid-template-columns: 1fr; }
  .scene,.scene-shell { min-height: auto; }
  .hero-title { max-width: 8ch; }
}
@media (max-width: 520px) {
  body { background: linear-gradient(180deg, #7edcff 0%, #a6ecff 34%, #fff2c2 100%); }
  .container,.nav-wrap { width: calc(100% - 1rem); }
  .brand { gap: 0.55rem; }
  .brand-mark { width: 2.2rem; height: 2.2rem; font-size: 0.34rem; }
  .brand-copy strong { font-size: 0.82rem; }
  .brand-copy span { font-size: 0.58rem; }
  .section-head { gap: 0.6rem; }
  .section-index { width: 2.2rem; height: 2.2rem; font-size: 0.4rem; }
  .hero-title { font-size: clamp(1.9rem, 13vw, 3.2rem); }
  body:not([data-page="home"]) .hero-title { font-size: clamp(1.55rem, 8vw, 2.6rem); max-width: 24ch; }
  .section-title { font-size: clamp(1.35rem, 8vw, 2.1rem); color: var(--brick); text-shadow: 0 3px 0 rgba(27, 26, 24, 0.6); }
  .hero-lead,.section-copy,.card p,.timeline-item p,.contact-copy,.tile-copy,.project p { font-size: 0.92rem; }
  .button,.link-button,.project-link,.tile-link,.nav-cta,.menu-btn { padding: 0.75rem 0.8rem; font-size: 0.34rem; }
  .badge,.chip,.stat,.game-stat,.tag,.level-chip { font-size: 0.3rem; }
  .scene { min-height: 21rem; }
  .pipe { width: 5.8rem; height: 5.4rem; }
  .hero-sprite { left: 4.4rem; width: 4.3rem; height: 5.6rem; }
  .cloud { width: 5.2rem; }
  .coin.one { left: 39%; }
  .coin.two { left: 51%; }
  .marquee-group span { font-size: 0.28rem; }
  footer { font-size: 0.74rem; }
}
@media (max-width: 420px) {
  .hero-title { font-size: clamp(1.55rem, 11vw, 2.6rem); }
  body:not([data-page="home"]) .hero-title { font-size: clamp(1.45rem, 8.8vw, 2.35rem); max-width: 26ch; }
  .hero-lead { font-size: 0.9rem; }
  .menu-btn { padding: 0.55rem 0.75rem; }
  .nav-links a { padding: 0.7rem 0.85rem; font-size: 0.42rem; }
  .scene { min-height: 17.5rem; }
  .hero { padding-top: 0.9rem; }
  .brand-copy strong { font-size: 0.86rem; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
