:root {
  --bg: #0f1628;
  --bg-2: #1d2943;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f3f6fb;
  --soft: #c9d3e6;
  --muted: #a9b6cc;
  --yellow: #febc1f;
  --orange: #ff8f3a;
  --red: #f34b58;
  --blue: #5c70ff;
  --mint: #3ee6b0;
  --ink: #141a2e;
  --warm: linear-gradient(135deg, var(--yellow), var(--orange) 55%, var(--red));
  --display: "Unbounded", "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 26px;
  --header: 70px;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

b {
  color: var(--text);
}

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

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

.container {
  width: min(100% - 2 * clamp(20px, 5vw, 80px), 1140px);
  margin-inline: auto;
}

.grad {
  background: linear-gradient(95deg, var(--yellow) 0%, var(--orange) 45%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.8;
}

.blob-1 {
  top: -30vmax;
  left: -25vmax;
  background: radial-gradient(circle, rgba(243, 75, 88, 0.5), transparent 65%);
}

.blob-2 {
  top: -10vmax;
  right: -30vmax;
  background: radial-gradient(circle, rgba(255, 143, 58, 0.4), transparent 65%);
}

.blob-3 {
  bottom: -35vmax;
  left: -20vmax;
  background: radial-gradient(circle, rgba(92, 112, 255, 0.35), transparent 65%);
}

.blob-4 {
  bottom: -30vmax;
  right: -25vmax;
  background: radial-gradient(circle, rgba(254, 188, 31, 0.22), transparent 65%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 22, 40, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand-tld {
  color: #8d9ab3;
  font-weight: 600;
}

.menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu a:not(.btn) {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--soft);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu a:not(.btn):hover,
.menu a[aria-current="true"] {
  background: var(--surface-strong);
  color: var(--text);
}

.menu .btn {
  margin-left: 10px;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

.menu-open .menu-icon {
  background: transparent;
}

.menu-open .menu-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.menu-open .menu-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-small {
  padding: 9px 18px;
  font-size: 14px;
}

.btn-primary {
  background: var(--warm);
  color: var(--ink);
  box-shadow: 0 16px 40px -14px rgba(243, 75, 88, 0.85);
}

.btn-primary:hover {
  box-shadow: 0 20px 46px -14px rgba(243, 75, 88, 1);
}

.btn-ghost {
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font-weight: 700;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-dark {
  background: var(--ink);
  color: var(--text);
}

.btn-light {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.75);
}

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
}

.pulse {
  animation: pulse 1.8s ease-in-out infinite;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 4vw, 56px);
  padding-block: clamp(32px, 5vw, 64px) clamp(48px, 6vw, 88px);
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid rgba(62, 230, 176, 0.35);
  border-radius: 999px;
  background: rgba(62, 230, 176, 0.1);
  color: #9ff5d8;
  font-weight: 700;
  font-size: 15px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 18px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.code-card {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  padding: 28px 0 0 28px;
}

.code-logo {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: clamp(80px, 9vw, 112px);
  height: auto;
  border-radius: 30px;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.75), 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.code-frame {
  padding: 2px;
  border-radius: 30px;
  background: linear-gradient(140deg, rgba(254, 188, 31, 0.9), rgba(243, 75, 88, 0.7) 50%, rgba(92, 112, 255, 0.7));
  box-shadow: 0 40px 100px -40px rgba(243, 75, 88, 0.55);
}

.code-panel {
  height: clamp(360px, 34vw, 460px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: #0b1222;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 58px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #8d9ab3;
  font-size: 14px;
  font-weight: 600;
}

.code-window {
  flex: 1;
  overflow: hidden;
  padding: 0 24px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 88%, transparent 100%);
}

.code-track {
  font-family: var(--mono);
  font-size: clamp(11px, 1vw, 13px);
  line-height: 22px;
  animation: codescroll 70s linear infinite;
}

.code-line {
  display: flex;
  gap: 16px;
  min-height: 22px;
  white-space: pre;
}

.code-num {
  width: 24px;
  flex: none;
  text-align: right;
  color: #3d4b66;
}

.section {
  padding-block: clamp(48px, 6vw, 88px) clamp(16px, 2vw, 32px);
}

.section-title {
  margin-bottom: 28px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.glass {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.about {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(22px, 3vw, 32px);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.65;
  color: var(--soft);
}

.about .muted {
  font-size: 0.92em;
}

.games-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin-bottom: 32px;
}

.games-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 7.5vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.games-head p {
  max-width: 420px;
  padding-bottom: 10px;
  font-size: 18px;
}

.featured {
  max-width: 980px;
  margin-inline: auto;
  padding: 2px;
  border-radius: 38px;
  background: linear-gradient(135deg, var(--yellow), var(--orange) 35%, var(--red) 65%, rgba(92, 112, 255, 0.8));
  box-shadow: 0 50px 120px -40px rgba(243, 75, 88, 0.6);
}

.featured-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 3vw, 36px);
  padding: clamp(20px, 2.6vw, 34px);
  border-radius: 36px;
  background: linear-gradient(160deg, #1a2440, #111a2e 60%);
}

.featured-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.featured-badges {
  display: flex;
  align-items: center;
  gap: 16px;
}

.featured-badges img {
  width: 50px;
  height: 50px;
}

.featured h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.featured-info > p {
  color: var(--soft);
  font-size: 16px;
  line-height: 1.6;
}

.pill {
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.pill-mint {
  border: 1px solid rgba(62, 230, 176, 0.5);
  background: rgba(62, 230, 176, 0.14);
  color: #7ff2cb;
}

.pill-blue {
  align-self: flex-start;
  border: 1px solid rgba(124, 140, 255, 0.6);
  background: rgba(92, 112, 255, 0.18);
  color: #b9c2ff;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.facts div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.facts strong {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(18px, 1.6vw, 23px);
  white-space: nowrap;
}

.facts span {
  color: var(--muted);
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--soft);
  font-size: 14px;
  font-weight: 600;
}

.preview {
  max-width: 360px;
  justify-self: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: var(--bg-2);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
}

.preview-players {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
}

.chip-player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  font-size: 14px;
}

.chip-player.holding {
  border-color: rgba(255, 143, 58, 0.7);
  background: rgba(255, 143, 58, 0.18);
  box-shadow: 0 0 26px rgba(255, 143, 58, 0.35);
}

.chip-player.holding img {
  position: absolute;
  top: -30px;
  left: 0;
  width: 32px;
  height: 32px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--bg-2);
  font-weight: 800;
  font-size: 13px;
}

.av-1 {
  background: linear-gradient(145deg, #7ff2cb, #3ea8e6);
}

.av-2 {
  background: linear-gradient(145deg, #ffd37a, #ff8f3a);
}

.av-3 {
  background: linear-gradient(145deg, #c4a3ff, #7b7bff);
}

.preview-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.preview-word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.preview-sheet {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 20px;
  background: #ffffff;
}

.preview-sheet svg {
  width: 70%;
}

.preview-ai {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.preview-ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.preview-ai-head .dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 10px var(--mint);
}

.meter {
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #b6ff6b);
  box-shadow: 0 0 14px rgba(62, 230, 176, 0.7);
  transition: width 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s;
}

.featured.in .meter span,
html:not(.js) .meter span {
  width: 78%;
}

.games-grid {
  max-width: 980px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: 28px;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.game-card h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  letter-spacing: -0.03em;
}

.game-card p {
  color: var(--muted);
  font-size: 16px;
}

.game-card.wip {
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.game-card.idea {
  justify-content: space-between;
  border: 1px solid rgba(255, 143, 58, 0.35);
  background: linear-gradient(140deg, rgba(254, 188, 31, 0.16), rgba(243, 75, 88, 0.16));
}

.game-card.idea p {
  color: var(--soft);
}

.game-card.idea:hover,
.project:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}

.link-label {
  font-weight: 800;
  color: #ffde9b;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-bar {
  display: block;
  height: 6px;
}

.bar-blue {
  background: linear-gradient(90deg, #7c8cff, var(--blue));
}

.bar-warm {
  background: linear-gradient(90deg, var(--yellow), var(--orange));
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 26px;
}

.project h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.project p {
  color: var(--muted);
  font-size: 16px;
}

.project .btn {
  margin-top: auto;
}

.project .tags {
  margin-bottom: 8px;
}

.contact {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(32px, 5vw, 64px);
  padding: clamp(44px, 6vw, 72px) clamp(22px, 5vw, 56px);
  border-radius: 38px;
  text-align: center;
  background: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 38%, var(--red) 72%, #b33a8f 100%);
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.35), transparent 45%);
  pointer-events: none;
}

.contact > * {
  position: relative;
}

.contact h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.contact p {
  max-width: 580px;
  color: #2a1a26;
  font-size: clamp(16px, 1.3vw, 18px);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.wobble {
  transform-origin: 45% 60%;
  animation: wobble 0.8s ease-in-out infinite;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.js .reveal.d1 {
  transition-delay: 0.1s;
}

.js .reveal.d2 {
  transition-delay: 0.2s;
}

.js .reveal.d3 {
  transition-delay: 0.3s;
}

@keyframes codescroll {
  to {
    transform: translateY(-50%);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(62, 230, 176, 0.5);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(62, 230, 176, 0);
  }
}

@keyframes wobble {
  50% {
    transform: rotate(-7deg) scale(1.03);
  }
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .code-card {
    justify-self: start;
  }

  .featured-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  :root {
    --header: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px clamp(20px, 5vw, 96px) 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(15, 22, 40, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .menu-open .menu {
    display: flex;
  }

  .menu-open {
    background: rgba(15, 22, 40, 0.96);
  }

  .menu a:not(.btn) {
    padding: 14px 16px;
  }

  .menu .btn {
    margin: 8px 0 0;
  }

  .games-grid,
  .projects {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts div {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .actions .btn {
    flex: 1 1 auto;
  }

  .code-panel {
    height: 340px;
  }
}

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

  .pulse,
  .wobble,
  .code-track {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .meter span {
    width: 78%;
    transition: none;
  }
}
