/* Minimal black/white site (no framework) */

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  scrollbar-gutter: stable;
}

:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: rgba(0, 0, 0, 0.65);
  --border: rgba(0, 0, 0, 0.16);
  --borderStrong: rgba(0, 0, 0, 0.28);
  --max: 860px;
  --radius: 10px;
  --shadowOffset: 3px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.55;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

.skipLink {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}
.skipLink:focus {
  left: 12px;
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.siteHeader {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.headerRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 18px;
  padding: 8px 0;
}

.siteTitle {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: inherit;
  text-decoration: none;
}
a.siteTitle:hover,
a.siteTitle:focus {
  color: var(--muted);
  outline: none;
}
.siteSubtitle {
  margin: 6px 0 0 0;
  color: var(--muted);
  font-size: 14px;
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.nav a {
  color: var(--fg);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a:focus {
  color: var(--muted);
  outline: none;
}
.nav a[aria-current="true"],
.nav a[aria-current="page"] {
  border-bottom-color: var(--fg);
}

.section {
  padding: 44px 0;
  scroll-margin-top: 110px;
}
.section + .section {
  border-top: 1px solid var(--border);
}

.sectionHeader {
  margin-bottom: 14px;
}

h2 {
  margin: 0 0 10px 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.prose p {
  margin: 0 0 12px 0;
}
.prose code,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

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

.aboutGrid {
  display: grid;
  grid-template-columns: 1fr 160px;
  grid-template-rows: auto 1fr;
  gap: 18px;
  align-items: start;
}

.aboutHeading {
  grid-column: 1;
  grid-row: 1;
  margin-top: 0;
}

.aboutProse {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  display: flex;
  flex-direction: column;
}

.aboutProse .prose {
  flex: 1;
}

.aboutProse .prose p:last-child {
  margin-bottom: 0;
}

.aboutPhoto {
  margin: 0;
  width: 160px;
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  height: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
  display: flex;
}

.aboutPhoto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.status {
  margin: 10px 0 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}
.status:empty {
  display: none;
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

#researchList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--bg);
}
.card:hover {
  border-color: var(--borderStrong);
}

.paperCard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px 18px 16px 22px;
  border-radius: 0;
  cursor: pointer;
  overflow: hidden;
}
.paperCard:hover,
.paperCard:focus {
  border-color: var(--fg);
  outline: none;
}
.paperMark {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--fg);
}
.paperCard .row {
  margin-top: auto;
  padding-top: 14px;
}
button.paperBtn,
a.paperBtn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
button.paperBtn:hover,
button.paperBtn:focus,
a.paperBtn:hover,
a.paperBtn:focus {
  background: #111;
  color: #fff;
  outline: none;
}

body.paperOpen {
  overflow: hidden;
}

.paperReader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}
.paperReader[hidden] {
  display: none;
}
.paperScrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.58);
}
.paperSheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  height: min(88vh, 920px);
  background: #fff;
  border: 1px solid #111;
  border-radius: 0;
  box-shadow: 12px 12px 0 #111;
}
.paperHead {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.paperKicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.paperHead h2 {
  margin: 0;
  max-width: 42ch;
  font-size: 20px;
  line-height: 1.25;
}
.paperClose {
  flex: none;
  padding: 6px 10px;
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.paperClose:hover,
.paperClose:focus {
  background: #111;
  color: #fff;
  outline: none;
}
.paperSummary {
  margin: 0;
  padding: 12px 20px;
  color: rgba(0, 0, 0, 0.78);
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.paperSummary:empty {
  display: none;
}
.paperStage {
  flex: 1;
  min-height: 0;
  background:
    linear-gradient(#f6f6f6, #f6f6f6) padding-box,
    repeating-linear-gradient(90deg, #ececec 0 12px, #f6f6f6 12px 24px);
  padding: 14px 14px 0;
}
.paperStage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  background: #fff;
}
.paperBar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.paperBar .paperBtn {
  min-width: 118px;
}

.cardTitle {
  margin: 0;
  font-size: 16px;
}
.cardMeta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.cardText {
  margin: 10px 0 0 0;
  color: rgba(0, 0, 0, 0.86);
  font-size: calc(1em - 2px);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  color: var(--fg);
}
.pill:hover,
.pill:focus {
  border-color: var(--fg);
  outline: none;
}

.details {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.experienceEntry {
  margin-bottom: 24px;
}
.experienceEntry:last-child {
  margin-bottom: 0;
}
.experienceEntry h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}
.experienceEntry p {
  margin: 0 0 8px 0;
  color: rgba(0, 0, 0, 0.86);
}
.experienceEntry p:last-child {
  margin-bottom: 0;
}

.bullets {
  margin: 10px 0 0 0;
  padding-left: 18px;
}
.bullets li {
  margin: 0 0 8px 0;
}

.tags {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag {
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.linkGrid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  .headerRow {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav {
    justify-content: flex-start;
  }
  .aboutGrid {
    grid-template-columns: 1fr 140px;
  }
  .aboutPhoto {
    width: 140px;
    height: 140px;
    justify-self: end;
  }
  .linkGrid {
    grid-template-columns: 1fr;
  }
  #researchList {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
  }
}

@media (max-width: 520px) {
  .aboutGrid {
    grid-template-columns: 1fr;
  }
  .aboutPhoto {
    justify-self: end;
  }
  #researchList {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .paperReader {
    padding: 10px;
  }
  .paperSheet {
    height: calc(100vh - 20px);
    box-shadow: 6px 6px 0 #111;
  }
  .paperHead {
    flex-direction: column;
  }
}

.linkCard {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
}
.linkCard:hover,
.linkCard:focus {
  border-color: var(--fg);
  outline: none;
}
.linkCardImg {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: cover;
}
.linkCardTitle {
  margin: 0;
  font-size: 14px;
}
.linkCardDesc {
  margin: 6px 0 0 0;
  font-size: 13px;
  color: var(--muted);
}
.linkCardHost {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.inlineList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.inlineList a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.siteFooter {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.footerRow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.container.wide {
  max-width: 1100px;
}

html:has(.playPage),
.playPage {
  overflow: hidden;
  height: 100%;
}

.playPage {
  display: flex;
  flex-direction: column;
}

.playHeader {
  background: rgba(255, 255, 255, 0.82);
}

.playStage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #78a7ff;
}

#world {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.playHud {
  pointer-events: none;
}

.playIntro,
.playCard,
.playFallback {
  pointer-events: auto;
}

.playIntro {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  padding: 22px 24px 18px;
  background: #f4efe6;
  color: #1b1b1b;
  border: 4px solid #1b1b1b;
  border-radius: 0;
  box-shadow:
    4px 0 0 #c49a5a,
    -4px 0 0 #c49a5a,
    0 4px 0 #c49a5a,
    0 -4px 0 #c49a5a,
    8px 0 0 #1b1b1b,
    -8px 0 0 #1b1b1b,
    0 8px 0 #1b1b1b,
    0 -8px 0 #1b1b1b;
  text-align: left;
  font-family: "Press Start 2P", ui-monospace, monospace;
  image-rendering: pixelated;
  transition: opacity 0.2s steps(4, end);
  z-index: 13;
}

.playIntro[hidden] {
  display: block;
  opacity: 0;
  pointer-events: none;
}

.playIntroHi {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1.2;
}

.playIntroLead {
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.9;
}

.playIntroHint {
  margin: 0;
  font-size: 8px;
  line-height: 1.8;
  color: #6b4f2a;
}

.playCard h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.playKicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.playLead,
.playCard p,
.playHint {
  margin: 0 0 12px;
  color: rgba(0, 0, 0, 0.82);
}

.playHint,
.playHelp {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.playCta {
  display: inline-block;
  margin: 0 0 10px;
  padding: 8px 14px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.playCta.small {
  margin: 0;
  background: transparent;
  color: var(--fg);
}

.playCta:hover,
.playCta:focus {
  outline: none;
  opacity: 0.86;
}

.crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.playPrompt,
.playStats,
.playHelp {
  position: absolute;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.playPrompt {
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-size: 15px;
}

.playStats {
  right: 18px;
  top: 18px;
  font-size: 13px;
}

.gameMap {
  position: absolute;
  right: 18px;
  top: 46px;
  display: grid;
  gap: 6px;
  pointer-events: auto;
  z-index: 8;
}

.gameMapBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 168px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.gameMapBtn span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--fg);
  color: var(--bg);
  font-size: 11px;
}

.gameMapBtn[data-tone="orange"] span { background: #e67a22; }
.gameMapBtn[data-tone="magenta"] span { background: #c43cff; }
.gameMapBtn[data-tone="leaf"] span { background: #2f8f46; }
.gameMapBtn[data-tone="cyan"] span { background: #2ec4b6; color: #111; }
.gameMapBtn[data-tone="ink"] span { background: #1a1520; }
.gameMapBtn[data-tone="obsidian"] span { background: #15051a; }

.gameMapBtn[aria-current="true"] {
  outline: 2px solid var(--fg);
}

.playHelp {
  left: 18px;
  bottom: 18px;
}

.playCard {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(340px, calc(100vw - 36px));
  padding: 16px 18px 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.playCard.isLeaving {
  opacity: 0;
  transform: translateY(8px);
}

.playCardClose {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.playCardActions {
  display: flex;
  gap: 8px;
}

.arcadeOverlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: auto;
}

.arcadeShell {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #000;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.arcadeBar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 0;
  padding: 6px 10px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.arcadeBar .playKicker {
  margin: 0;
  font-size: 10px;
}

.arcadeBar h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.arcadeBar .playCta,
.arcadePicks .playCta {
  margin: 0;
  padding: 4px 8px;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.2;
}

.arcadeBarActions,
.arcadePicks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.arcadePicks .playCta[aria-current="true"] {
  background: var(--fg);
  color: var(--bg);
}

#arcadeFrame {
  flex: 1;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #000;
  min-height: 0;
}

.createStudio {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 0;
  padding: 36px 28px;
  background: #0f0d13;
  color: #f4efe6;
}

.createStudio[hidden] {
  display: none;
}

.createKicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c43cff;
}

.createStudio h3 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.createStudio p {
  margin: 0;
  max-width: 42ch;
  color: rgba(244, 239, 230, 0.72);
}

.createStudio textarea {
  width: min(640px, 100%);
  min-height: 140px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: #17141d;
  color: #fff;
  font: inherit;
  resize: vertical;
}

.createActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.createStudio .playCta {
  background: #fff;
  color: #111;
}

.createStudio .playCta.small {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

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

.playFallback {
  position: absolute;
  inset: 18px;
  padding: 18px;
  background: #fff;
  border-radius: var(--radius);
}

.playPad {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 12;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  pointer-events: none;
}
.playPad > * {
  pointer-events: auto;
}

.playStickBase {
  width: 104px;
  height: 104px;
  border: 2px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
  position: relative;
  touch-action: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.playStickKnob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  background: #111;
  transition: transform 0.04s linear;
  pointer-events: none;
}

.playUseBtn {
  width: 48px;
  height: 48px;
  margin: 0 0 28px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 16px;
  color: #111;
  touch-action: none;
}
.playUseBtn:active {
  background: #111;
  color: #fff;
}

.playLook {
  position: fixed;
  right: 0;
  top: 0;
  width: 55%;
  height: 100%;
  z-index: 11;
  touch-action: none;
}

@media (max-width: 720px) {
  .playPad {
    left: 12px;
    bottom: 12px;
  }
  .playStickBase {
    width: 96px;
    height: 96px;
  }
  .playLook {
    width: 62%;
  }
}

@media (max-width: 720px) {
  .playIntro {
    width: calc(100vw - 40px);
    padding: 18px 16px 14px;
  }
  .playIntroHi {
    font-size: 22px;
  }
  .playCard {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
  .playCard {
    bottom: 110px;
  }
  .arcadeOverlay {
    inset: 0;
  }
  .arcadeBar {
    flex-direction: column;
  }
  .playStats {
    top: auto;
    bottom: 18px;
  }
  .gameMap {
    top: auto;
    bottom: 52px;
    right: 12px;
    left: auto;
  }
  .gameMapBtn {
    min-width: 0;
  }
}

@media print {
  .siteHeader {
    position: static;
  }
  .nav {
    display: none;
  }
  .section {
    padding: 20px 0;
  }
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
    color: var(--muted);
  }
}
