:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c12;
  --paper: #11121a;
  --paper-2: #191b25;
  --ink: #f5f5f8;
  --ink-2: #d6d7df;
  --muted: #9ca0ae;
  --muted-2: #777b8b;
  --line: #252838;
  --line-strong: #464b62;
  --dark: #05060b;
  --dark-2: #0b0d14;
  --blue: #7281ff;
  --blue-2: #9b75ff;
  --accent: #78dce8;
  --accent-2: #f5a6d6;
  --accent-soft: rgba(114, 129, 255, 0.14);
  --card-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
  --page-bg: var(--bg);
  --header-bg: rgba(8, 9, 13, 0.82);
  --header-scrolled-bg: rgba(8, 9, 13, 0.94);
  --stat-bg: rgba(17, 18, 26, 0.9);
  --thumb-bg: #0d0f16;
  --mobile-menu-bg: rgba(17, 18, 26, 0.98);
  --mobile-menu-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  --skeleton-bg: #1d2030;
  --contact-bg: #05060b;
  --contact-text: #a5a8b5;
  --social-bg: #08090d;
  --social-hover-bg: #10121b;
  --social-border: #292d3c;
  --social-color: #c7cad5;
  --tweet-shell-bg: rgba(17, 18, 26, 0.72);
  --max: 1280px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f8;
  --paper: #ffffff;
  --paper-2: #f0f0f2;
  --ink: #0b0b0d;
  --ink-2: #2d2d31;
  --muted: #66666f;
  --muted-2: #8a8a94;
  --line: #dedee3;
  --line-strong: #b8b8c0;
  --dark: #08090d;
  --dark-2: #111219;
  --blue: #5668ff;
  --blue-2: #746bff;
  --accent: #2b8ca0;
  --accent-2: #9d4edd;
  --accent-soft: rgba(86, 104, 255, 0.09);
  --card-shadow: 0 18px 52px rgba(38, 39, 55, 0.08);
  --page-bg: var(--bg);
  --header-bg: rgba(255, 255, 255, 0.82);
  --header-scrolled-bg: rgba(255, 255, 255, 0.94);
  --stat-bg: rgba(255, 255, 255, 0.86);
  --thumb-bg: #eeeeef;
  --mobile-menu-bg: rgba(255, 255, 255, 0.98);
  --mobile-menu-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
  --skeleton-bg: #e1e2e6;
  --contact-bg: #08090d;
  --contact-text: #9a9da8;
  --social-bg: #08090d;
  --social-hover-bg: #111219;
  --social-border: #cfd0d6;
  --social-color: #aeb0b9;
  --tweet-shell-bg: rgba(255, 255, 255, 0.78);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.78rem max(1.25rem, calc((100vw - var(--max)) / 2));
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.scrolled {
  background: var(--header-scrolled-bg);
  border-color: var(--line);
}

.brand,
.header-actions,
.site-nav,
.hero-actions,
.social-actions,
.game-meta,
.skill-list,
.tool-list,
.contact-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  color: var(--ink);
  font-weight: 900;
}

.site-nav {
  gap: 0.25rem;
}

.site-nav a {
  min-height: 2.4rem;
  padding: 0.66rem 0.9rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 850;
  transition: background 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--paper-2);
  color: var(--ink);
}

.header-actions {
  gap: 0.45rem;
}

.theme-toggle,
.nav-toggle {
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.theme-toggle {
  display: grid;
}

.nav-toggle {
  display: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--line-strong);
  background: var(--paper-2);
  transform: translateY(-1px);
}

.theme-icon {
  grid-area: 1 / 1;
  width: 1.14rem;
  height: 1.14rem;
}

:root[data-theme="light"] .sun-icon,
:root:not([data-theme="light"]) .moon-icon {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.43fr);
  gap: 2.5rem;
  align-items: start;
  padding: 5.65rem max(1.25rem, calc((100vw - var(--max)) / 2)) 3.25rem;
}

.hero-copy {
  max-width: 890px;
}

.status-pill {
  display: inline-flex;
  min-height: 1.9rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.34rem 0.72rem;
  border: 1px solid rgba(86, 104, 255, 0.32);
  border-radius: 999px;
  background: var(--paper);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: 0 0.7rem 1.7rem rgba(86, 104, 255, 0.14);
}

.status-pill.closed {
  border-color: var(--line);
  background: var(--paper);
  color: var(--muted);
  box-shadow: none;
}

.status-pill.compact {
  margin-bottom: 1rem;
}

h1 {
  max-width: 9ch;
  margin-bottom: 1rem;
  color: var(--ink);
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-text {
  max-width: 50rem;
  margin-bottom: 0;
  color: var(--ink-2);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.68;
}

.hero-text strong {
  color: var(--ink);
}

.secondary-copy {
  margin-top: 0.7rem;
}

.skill-block,
.tool-block {
  margin-top: 1.45rem;
}

.tool-block {
  margin-top: 1rem;
}

.skill-block > span,
.tool-block > span {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skill-list,
.tool-list {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-list span,
.tool-list span {
  min-height: 2rem;
  padding: 0.42rem 0.62rem;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 850;
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.social-actions {
  gap: 0.65rem;
}

.button,
.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 900;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button {
  min-height: 3rem;
  gap: 0.55rem;
  padding: 0.78rem 1rem;
  border: 1px solid var(--line);
}

.button.primary {
  min-width: 11.6rem;
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(86, 104, 255, 0.28);
}

.button.secondary {
  background: var(--paper);
  color: var(--ink);
}

.button svg {
  width: 1.08rem;
  height: 1.08rem;
}

.social-button {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--social-border);
  background: var(--social-bg);
  color: var(--social-color);
}

.social-button svg {
  width: 1.22rem;
  height: 1.22rem;
}

.button:hover,
.button:focus-visible,
.social-button:hover,
.social-button:focus-visible,
.game-card:hover,
.video-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.social-button:hover,
.social-button:focus-visible {
  background: var(--social-hover-bg);
  color: #f2f2f4;
}

.hero-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.stat {
  min-height: 7.6rem;
  padding: 1.15rem;
  background: var(--stat-bg);
}

.stat span {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  color: var(--ink);
  font-size: 2.25rem;
  line-height: 1;
}

.section {
  padding: 4.2rem max(1.25rem, calc((100vw - var(--max)) / 2));
}

.games-section {
  padding-top: 3.35rem;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 1.7rem;
}

.section-heading > p:first-child {
  margin-bottom: 0.5rem;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.section-heading h2,
.contact-panel h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.section-copy {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.game-card,
.video-card,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
}

.game-card {
  min-width: 0;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease;
}

.game-card a {
  display: block;
}

.game-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--thumb-bg);
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 160ms ease;
}

.game-card:hover .game-thumb img {
  transform: scale(1.015);
}

.game-body {
  padding: 1.12rem;
}

.game-creator {
  display: block;
  margin-bottom: 0.48rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.game-card h3 {
  margin-bottom: 0.8rem;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.25;
}

.game-meta {
  flex-wrap: wrap;
  gap: 0.7rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
  align-items: start;
  gap: 1rem;
  min-width: 0;
}

.video-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow: hidden;
  padding: 0.62rem;
  background: var(--tweet-shell-bg);
  box-shadow: var(--card-shadow);
  transition: transform 160ms ease, border-color 160ms ease;
}

.video-card .twitter-tweet {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  background: transparent !important;
}

.tweet-card iframe {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border-radius: 8px !important;
  background: transparent !important;
}

.contact-section {
  padding: 5rem max(1.25rem, calc((100vw - var(--max)) / 2));
  background: var(--contact-bg);
}

.contact-panel {
  max-width: 820px;
  margin-inline: auto;
  padding: 2.6rem 1rem;
  border: 0;
  background: transparent;
  text-align: center;
}

.contact-panel .status-pill {
  border-color: rgba(116, 107, 255, 0.52);
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 0.75rem 1.9rem rgba(86, 104, 255, 0.2);
}

.contact-panel h2 {
  margin-bottom: 1rem;
  color: #f7f7fb;
}

.contact-panel p {
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 0;
  color: var(--contact-text);
  line-height: 1.7;
}

.contact-actions {
  justify-content: center;
}

.contact-actions .social-button {
  border-color: #222532;
  background: #05060b;
}

.site-footer {
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem max(1.25rem, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer a {
  color: var(--ink);
  font-weight: 850;
}

.skeleton .game-thumb,
.skeleton .game-body span,
.skeleton .game-body strong,
.skeleton .game-body p {
  background: var(--skeleton-bg);
  background-size: 220% 100%;
  animation: pulse 1.3s linear infinite;
}

.skeleton .game-body span,
.skeleton .game-body strong,
.skeleton .game-body p {
  display: block;
  height: 0.9rem;
  border-radius: 8px;
}

.skeleton .game-body span {
  width: 38%;
  margin-bottom: 0.8rem;
}

.skeleton .game-body strong {
  width: 76%;
  height: 1.2rem;
  margin-bottom: 1rem;
}

.skeleton .game-body p {
  width: 54%;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  to {
    background-position: -220% 0;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 700px) {
  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: fixed;
    top: 4.35rem;
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--mobile-menu-bg);
    box-shadow: var(--mobile-menu-shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .hero {
    padding-top: 5.25rem;
    padding-bottom: 2.8rem;
  }

  h1 {
    font-size: clamp(3.5rem, 22vw, 5.5rem);
  }

  .button.primary {
    min-width: 0;
  }

  .hero-panel,
  .game-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 3.6rem;
    padding-bottom: 3.6rem;
  }

  .contact-panel {
    padding: 1.35rem 0;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

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