/* Optimized production stylesheet — 2026-07-28f */
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-400.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-500.woff2") format("woff2");
}

@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/press-start-2p.woff2") format("woff2");
}

:root {
  --ink: #101814;
  --cream: #f3ead8;
  --paper: #fff9eb;
  --coral: #df6f55;
  --blue: #3866a6;
  --line: #17221d;
  font-family: "DM Mono", monospace;
  color: var(--ink);
  background: #0c1511;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: #0c1511;
}

body {
  min-height: 100dvh;
  overflow: hidden;
}

button, a { font: inherit; }

button { color: inherit; }

button:focus-visible,
a:focus-visible {
  outline: 3px solid #e7ca72;
  outline-offset: 4px;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .12;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.13) 3px 4px),
    radial-gradient(rgba(0,0,0,.45) 1px, transparent 1px);
  background-size: 100% 4px, 5px 5px;
  mix-blend-mode: overlay;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
  color: white;
  background: linear-gradient(rgba(11, 24, 18, .22), rgba(11, 24, 18, .76));
  transition: opacity .7s cubic-bezier(.7,0,.2,1), visibility .7s;
}

.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, transparent 0 16%, rgba(7,15,12,.72) 76%);
}

.intro > * { position: relative; }

.intro__eyebrow {
  margin-bottom: 22px;
  font: 10px/1.6 "Press Start 2P", monospace;
  letter-spacing: .16em;
  color: #e7ca72;
}

.intro h1 {
  margin: 0;
  font: clamp(40px, 8vw, 102px)/.88 "Press Start 2P", monospace;
  letter-spacing: -.08em;
  text-shadow: 7px 7px 0 #17221d;
}

.intro h1 span { color: #ef825f; }

.intro p {
  margin: 26px 0 30px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.world {
  position: fixed;
  inset: 0;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(77,104,83,.68), rgba(8,15,12,.98) 74%),
    #0c1511;
}

.map-frame {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  border: 0;
  box-shadow: none;
  background: #15231b;
  isolation: isolate;
}

.world-surface {
  position: absolute;
  left: 0;
  top: 0;
  width: 1672px;
  height: 941px;
  transform-origin: 0 0;
  will-change: transform;
  contain: layout paint;
}

.map-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.map-glow {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  box-shadow: inset 0 0 110px rgba(6,18,12,.42);
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 24px;
  left: 28px;
  right: 28px;
  display: grid;
  grid-template-columns: 190px 1fr 190px;
  align-items: start;
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.brand {
  width: max-content;
  color: var(--cream);
  text-decoration: none;
  text-shadow: 3px 3px 0 #111;
}

.brand span, .brand strong {
  display: block;
  font: 19px/.92 "Press Start 2P", monospace;
}

.brand strong { color: #ed7b5d; }
.brand small { font-size: 8px; letter-spacing: .22em; }

.topbar nav {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.pixel-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 12px 18px 10px;
  border: 3px solid var(--line);
  color: var(--ink);
  background: var(--cream);
  box-shadow: 4px 4px 0 var(--line);
  text-decoration: none;
  font: 10px/1.2 "Press Start 2P", monospace;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .2s;
}

.pixel-button:hover {
  background: #fffaf0;
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--line);
}

.pixel-button:active {
  transform: translate(3px,3px);
  box-shadow: 1px 1px 0 var(--line);
}

.pixel-button--coral {
  color: white;
  background: var(--coral);
  min-width: 190px;
}

.pixel-button--coral:hover { background: #f18164; }

.sound-toggle {
  justify-self: end;
  padding: 9px 10px;
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(9,18,14,.58);
  font-size: 9px;
  letter-spacing: .12em;
  cursor: pointer;
}

.sound-toggle span { color: #ef825f; }

.map-pin {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px 6px;
  border: 2px solid #fff5dc;
  color: white;
  background: rgba(14,24,19,.88);
  box-shadow: 3px 3px 0 #142018;
  cursor: pointer;
  transform: translate(-50%,-50%);
  transition: transform .18s, background .18s;
}

.map-pin:hover {
  background: var(--coral);
  transform: translate(-50%,-50%) translateY(-5px);
}

.map-pin--about { left: 465px; top: 370px; }
.map-pin--gallery { left: 1260px; top: 390px; }
.map-pin--technology { left: 850px; top: 165px; }
.map-pin--contact { left: 835px; top: 720px; }

.pin-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 3px solid white;
  background: #e9cc6a;
  animation: pulse 1.8s infinite;
}

.map-pin em {
  font-style: normal;
  font-size: 8px;
  letter-spacing: .12em;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 7px rgba(255,240,174,.2); }
}

.game-help {
  position: fixed;
  z-index: 8;
  left: 50%;
  bottom: 22px;
  color: white;
  text-align: center;
  transform: translateX(-50%);
}

.game-help span {
  display: block;
  font: 9px "Press Start 2P", monospace;
}

.game-help small { opacity: .72; font-size: 9px; }

.site-footer {
  position: fixed;
  z-index: 8;
  right: 22px;
  bottom: 20px;
  color: rgba(255,255,255,.82);
  font-size: 10px;
  text-shadow: 1px 1px 0 #000;
}

.game-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.actor {
  --actor-x: 0px;
  --actor-y: 0px;
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 58px;
  transform: translate3d(var(--actor-x), var(--actor-y), 0) translate(-50%, -88%);
  transform-origin: 50% 88%;
  filter: drop-shadow(2px 3px 0 rgba(0,0,0,.42));
  will-change: transform;
  contain: layout paint;
  user-select: none;
}

.actor--player {
  z-index: 7;
  width: 40px;
  height: 64px;
}

.actor--npc { z-index: 5; }

.actor > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.actor__body {
  clip-path: inset(0 0 40% 0);
}

.actor__leg--left {
  clip-path: polygon(0 52%, 50% 52%, 50% 100%, 0 100%);
  transform-origin: 42% 58%;
}

.actor__leg--right {
  clip-path: polygon(50% 52%, 100% 52%, 100% 100%, 50% 100%);
  transform-origin: 58% 58%;
}

.actor.is-walking {
  animation: sprite-walk .28s steps(2,end) infinite;
}

.actor.is-walking .actor__leg--left {
  animation: left-leg .28s steps(2,end) infinite;
}

.actor.is-walking .actor__leg--right {
  animation: right-leg .28s steps(2,end) infinite;
}

.actor.is-left {
  transform: translate3d(var(--actor-x), var(--actor-y), 0) translate(-50%, -88%) scaleX(-1);
}

.actor.is-sitting {
  height: 48px;
  transform: translate3d(var(--actor-x), var(--actor-y), 0) translate(-50%, -72%) scaleY(.8);
}

.welcome-bubble {
  position: absolute;
  width: max-content;
  max-width: 250px;
  padding: 11px 14px 10px;
  border: 3px solid var(--ink);
  color: var(--ink);
  background: var(--cream);
  box-shadow: 5px 5px 0 var(--ink);
  font: 9px/1.45 "Press Start 2P", monospace;
  text-align: center;
  transform: translate(-50%, -100%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
}

.welcome-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 14px;
  height: 14px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: var(--cream);
  transform: translateX(-50%) rotate(45deg);
}

.welcome-bubble.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -100%);
}

@keyframes sprite-walk {
  50% { margin-top: -3px; }
}

@keyframes left-leg {
  0%, 100% { transform: rotate(-9deg) translateY(1px); }
  50% { transform: rotate(10deg) translateY(-1px); }
}

@keyframes right-leg {
  0%, 100% { transform: rotate(10deg) translateY(-1px); }
  50% { transform: rotate(-9deg) translateY(1px); }
}

.vehicle {
  --vehicle-x: 0px;
  --vehicle-y: 0px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 58px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(3px 4px 0 rgba(0,0,0,.36));
  transform: translate3d(var(--vehicle-x), var(--vehicle-y), 0) translate(-50%, -50%);
  transform-origin: center;
  will-change: transform;
  contain: layout paint;
  user-select: none;
}

.vehicle.is-up {
  transform: translate3d(var(--vehicle-x), var(--vehicle-y), 0) translate(-50%, -50%) rotate(180deg);
}

.panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: start center;
  overflow-y: auto;
  padding: 6vw;
  background: rgba(8,15,12,.82);
  backdrop-filter: blur(9px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility .35s;
}

.panel.is-open {
  opacity: 1;
  visibility: visible;
}

.panel__content {
  width: min(100%, 1120px);
  max-height: 82dvh;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 11px 11px 0 var(--coral);
}

.panel__close {
  position: fixed;
  z-index: 2;
  top: 30px;
  right: 34px;
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: 4px 4px 0 var(--ink);
  font: 27px/1 "DM Mono", monospace;
  cursor: pointer;
}

.page { padding: clamp(30px, 6vw, 78px); }

.kicker {
  margin: 0 0 24px;
  font: 9px "Press Start 2P", monospace;
  letter-spacing: .12em;
  color: var(--coral);
}

.page h2 {
  margin: 0 0 44px;
  font: clamp(34px, 6vw, 76px)/.94 "Press Start 2P", monospace;
  letter-spacing: -.06em;
}

.page h2 span { color: var(--blue); }

.page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 8vw, 110px);
}

.page p { line-height: 1.75; }
.page .lead { font-size: clamp(18px, 2.2vw, 28px); line-height: 1.35; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 54px;
  border: 2px solid var(--ink);
  background: var(--ink);
}

.stats div { padding: 22px; background: var(--cream); }
.stats strong { display: block; font: 9px "Press Start 2P"; margin-bottom: 8px; }
.stats span { font-size: 11px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  position: relative;
  border: 3px solid var(--ink);
  padding: 10px;
  background: var(--cream);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .18s, box-shadow .18s;
  content-visibility: auto;
  contain-intrinsic-size: 0 340px;
}

.project-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 9px 9px 0 var(--ink);
}

.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 2px solid var(--ink);
}

.project-card--image-error {
  background:
    linear-gradient(135deg, rgba(255, 107, 107, .2), rgba(71, 176, 255, .25)),
    var(--cream);
}

.instagram-link {
  display: inline-block;
  margin-top: 30px;
  color: var(--ink);
  font: 9px "Press Start 2P";
  text-underline-offset: 6px;
}

.gallery-status {
  min-height: 18px;
  margin-top: 28px;
  color: rgba(16,24,20,.68);
  font: 8px/1.6 "Press Start 2P";
  text-align: center;
}

.gallery-status a {
  color: var(--ink);
  text-underline-offset: 5px;
}

.gallery-sentinel {
  height: 2px;
}

.technology-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.technology-grid article {
  min-height: 170px;
  padding: 26px;
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: 6px 6px 0 var(--ink);
}

.technology-grid strong {
  color: var(--coral);
  font: 8px "Press Start 2P";
}

.technology-grid h3 {
  margin: 18px 0 12px;
  font: 12px/1.4 "Press Start 2P";
}

.technology-grid p {
  margin: 0;
  font-size: 12px;
}

.contact-card {
  display: grid;
  gap: 28px;
  width: min(100%, 720px);
  padding: clamp(24px, 4vw, 48px);
  border: 3px solid var(--ink);
  background: var(--cream);
  box-shadow: 8px 8px 0 var(--blue);
}

.contact-card p {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(16px, 2vw, 22px);
}

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 12px;
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
  text-decoration: none;
  font-size: clamp(17px, 3vw, 32px);
}

.contact-link span { color: var(--coral); }

.availability {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 8px "Press Start 2P";
}

.availability i {
  width: 10px;
  height: 10px;
  background: #56a867;
  box-shadow: 0 0 0 5px rgba(86,168,103,.18);
}

@media (max-width: 1100px) {
  .grain { display: none; }
  .map-glow { box-shadow: none; }
  .panel {
    background: rgba(8,15,12,.94);
    backdrop-filter: none;
  }

  .topbar {
    top: 14px;
    left: 14px;
    right: 14px;
    grid-template-columns: 145px 1fr 90px;
  }

  .brand span, .brand strong { font-size: 14px; }
  .brand small { font-size: 6px; }
  .topbar nav { justify-content: center; gap: 6px; }
  .topbar .pixel-button { padding: 9px 8px 7px; font-size: 7px; min-height: 34px; }
  .sound-toggle { padding: 8px 7px; font-size: 7px; }
  .map-frame { width: 100vw; }
  .game-help { bottom: 36px; }
  .site-footer { right: 12px; bottom: 12px; font-size: 8px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .topbar {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    grid-template-columns: 1fr auto;
    gap: 9px 10px;
  }

  .brand { grid-column: 1; }
  .sound-toggle {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }
  .topbar nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 5px;
  }
  .topbar .pixel-button {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding: 8px 3px 6px;
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--line);
    font-size: 6px;
  }
  .map-pin {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
    padding: 6px;
  }
  .map-pin em { display: none; }
  .game-help { display: none; }
  .site-footer {
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    font-size: 6px;
    text-align: center;
  }
  .page-grid, .stats { grid-template-columns: 1fr; }
  .technology-grid { grid-template-columns: 1fr; }
  .panel {
    place-items: stretch;
    padding:
      max(64px, calc(env(safe-area-inset-top) + 54px))
      max(10px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }
  .panel__content {
    width: 100%;
    max-height: calc(100dvh - 78px);
    border-width: 3px;
    box-shadow: 7px 7px 0 var(--coral);
  }
  .panel__close {
    top: max(10px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 40px;
    height: 40px;
  }
  .page { padding: 26px 18px 34px; }
  .page h2 {
    margin-bottom: 28px;
    font-size: clamp(28px, 10vw, 46px);
  }
  .page--technology h2 {
    font-size: clamp(24px, 7.4vw, 32px);
  }
  .kicker { margin-bottom: 18px; font-size: 7px; }
  .welcome-bubble {
    max-width: 210px;
    padding: 9px 11px 8px;
    font-size: 7px;
  }
  .gallery-grid { gap: 10px; }
  .project-card { padding: 5px; box-shadow: 3px 3px 0 var(--ink); }
  .project-card img { aspect-ratio: 1; }
  .instagram-link { font-size: 7px; line-height: 1.6; }
  .technology-grid article { min-height: 0; padding: 20px; }
  .contact-card { gap: 22px; padding: 22px 18px; }
  .contact-link {
    gap: 8px;
    font-size: 15px;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 390px) {
  .topbar .pixel-button { font-size: 5px; }
  .brand span, .brand strong { font-size: 12px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
