
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
  font-family: var(--font-mono);
  line-height: 1.6;
}
img, iframe { max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--yellow); color: #001c21; }

.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid color-mix(in srgb, var(--line) 18%, transparent);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px) saturate(150%);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.brand {
  display: flex;
  flex-direction: column;
  min-width: max-content;
  color: inherit;
  text-decoration: none;
}
.title-with-logo { display: flex; align-items: center; gap: .65rem; }
.title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.subtitle {
  margin: 4px 0 0 42px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.brand-mark-wrap { width: 32px; height: 32px; flex: 0 0 auto; display: inline-grid; place-items: center; }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--line) 16%, transparent);
}

.nav-links { display: flex; justify-content: flex-end; align-items: center; gap: 9px; flex-wrap: wrap; }
.pill, .btn, .icon-btn {
  border: var(--border);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-small);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pill { padding: 8px 11px; border-radius: 999px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 15px; border-radius: 13px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 7px; border-radius: 50%; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.pill:hover, .btn:hover, .icon-btn:hover { transform: translate(-2px, -2px); }
.pill:active, .btn:active, .icon-btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--line); }
.pill.active, .btn.primary { background: linear-gradient(90deg, var(--green), var(--pink)); color: #001c21; }

main { padding: 34px 0 48px; }
.h-title, .section-title, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.08;
  text-transform: uppercase;
}
.h-title { margin: 0 0 12px; font-size: clamp(2.35rem, 8vw, 5.8rem); max-width: 14ch; }
.h-sub { max-width: 78ch; margin: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.section-title { margin: 34px 0 12px; font-size: clamp(1.55rem, 4vw, 2.4rem); }
.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-copy, .small { color: var(--muted); font-size: .96rem; }
.kbd { padding: 2px 7px; border: 1px dashed var(--line); border-radius: 7px; font-weight: 700; white-space: nowrap; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 350px); align-items: center; gap: 28px; }
.hero-mark {
  justify-self: center;
  max-height: 520px;
  width: min(100%, 300px);
  object-fit: contain;
  opacity: .98;
  filter: drop-shadow(8px 8px 0 color-mix(in srgb, var(--ink) 16%, transparent));
}

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  position: relative;
  overflow: hidden;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--yellow) 20%, transparent), transparent 50%),
    radial-gradient(circle at 80% 75%, color-mix(in srgb, var(--purple) 15%, transparent), transparent 50%);
  transform: rotate(8deg);
  pointer-events: none;
}
.card > * { position: relative; z-index: 1; }
.card h3 { margin: 0 0 10px; font-size: 1.28rem; }
.card p { margin: 0; }
.card a.inline, .list-links a { display: inline-block; margin-top: 14px; font-weight: 700; text-underline-offset: 4px; }
.actions, .badges, .tag-list { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 16px; }
.badges .pill, .tag-list .pill { box-shadow: none; border-style: dashed; cursor: default; }
.list-clean { padding-left: 18px; margin: 10px 0 0; }
.list-clean li + li { margin-top: 6px; }
.tree-block {
  margin-top: 18px;
  padding: 18px;
  border: var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 84%, var(--paper));
  box-shadow: var(--shadow-small);
  overflow-x: auto;
}
.tree-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .95rem;
  white-space: pre;
}
.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; margin-top: 18px; }
.callout {
  margin-top: 20px;
  border-left: 6px solid var(--pink);
  padding: 16px 16px 16px 18px;
  background: color-mix(in srgb, var(--surface) 75%, var(--yellow) 8%);
  border-radius: 0 16px 16px 0;
}
.callout p { margin: 0; }

.itch-embed {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(100%, 420px);
  min-width: 208px;
  min-height: 167px;
  aspect-ratio: 208 / 167;
  margin: 18px auto 0;
}
.itch-embed iframe { width: 100%; height: 100%; min-width: 208px; min-height: 167px; border: 0; border-radius: 10px; }
.itch-embed-desktop { display: block; margin-top: 18px; }
.itch-embed-desktop iframe { display: block; width: min(100%, 800px); height: 620px; margin: 0 auto; border: 0; border-radius: 10px; }
.itch-embed-mobile { display: none; }

.footer { padding: 24px 0 40px; color: var(--muted); }
.footer .container { border-top: 2px solid color-mix(in srgb, var(--line) 16%, transparent); padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .nav { align-items: flex-start; flex-direction: column; }
  .nav-links { justify-content: flex-start; }
  .hero-grid, .split-grid { grid-template-columns: 1fr; }
  .hero-mark { width: 180px; max-height: 320px; }
  .grid, .grid.two, .grid.four { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 22px, 1160px); }
  .nav-links { gap: 7px; }
  .pill { padding: 7px 9px; font-size: 10px; }
  .subtitle { margin-left: 38px; }
  .card { padding: 18px; box-shadow: 6px 6px 0 var(--line); }
  .itch-embed-desktop { display: none; }
  .itch-embed-mobile { display: flex; }
}
@media (max-width: 420px) {
  .brand-mark-wrap, .brand-mark { width: 28px; height: 28px; }
  .title { font-size: 14px; }
  .subtitle { margin-left: 35px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
