/* ============ Games page ============ */
.games-stream {
  padding-top: 36px;
}

.games-topbar {
  align-items: end;
}

.games-steam-link {
  white-space: nowrap;
}

.games-platform-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

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

.game-card {
  grid-template-columns: minmax(180px, 0.48fr) minmax(0, 0.52fr);
}

.game-card .post-card-body {
  min-height: 190px;
}

.game-card-media {
  min-height: 210px;
  padding: 0;
  background: var(--card-2);
}

.game-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
}

.game-card-title-row h3 {
  min-width: 0;
  margin-bottom: 0;
}

.game-card-title-row > span {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(224, 111, 42, 0.18);
  background: rgba(224, 111, 42, 0.1);
  color: var(--blue-light);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

.game-card .card-meta {
  margin-top: auto;
  padding-top: 16px;
  display: block;
  align-items: initial;
  justify-content: initial;
  gap: 0;
}

.game-card-platforms {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  pointer-events: auto;
}

.game-card-platforms a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  color: var(--blue-light);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: transform .2s ease, color .2s ease;
}

.game-card-platforms a:hover,
.game-card-platforms a:focus-visible {
  color: #fff;
  transform: translateX(2px);
}

.game-card .tags-list span {
  pointer-events: none;
}

.games-empty {
  max-width: 720px;
}

/* ============ Home games ============ */
.home-games-section {
  position: relative;
  padding: 12px 0 34px;
  background: transparent;
}

.home-games-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.home-games-head .section-tag {
  margin-bottom: 10px;
}

.home-games-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: 0;
}

.home-games-head p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.home-games-more {
  white-space: nowrap;
}

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

.home-game-card {
  position: relative;
  min-width: 0;
  min-height: 304px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.home-game-primary-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.home-game-card:hover {
  border-color: rgba(224, 111, 42, .55);
  transform: translateY(-2px);
}

.home-game-card:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.home-game-visual {
  height: 142px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-2);
  overflow: hidden;
}

.home-game-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-game-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 14px;
}

.home-game-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 12px;
}

.home-game-meta span:first-child {
  color: var(--blue-light);
}

.home-game-body h3 {
  margin: 0;
  color: var(--heading);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0;
}

.home-game-body p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-game-tags {
  margin-top: auto;
}

.home-game-tags .tag {
  pointer-events: none;
}

.home-game-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
}

.home-game-open {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--blue-light);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: transform .2s ease, color .2s ease;
}

.home-game-open:hover,
.home-game-open:focus-visible {
  color: #fff;
  transform: translateX(2px);
}

html[data-theme="light"] .game-card-title-row > span,
html[data-theme="light"] .home-game-meta span:first-child,
html[data-theme="light"] .game-card-platforms a {
  color: var(--blue-2);
}

html[data-theme="light"] .home-game-card {
  box-shadow: var(--shadow);
}

html[data-theme="light"] .game-card-platforms a:hover,
html[data-theme="light"] .game-card-platforms a:focus-visible,
html[data-theme="light"] .home-game-open:hover,
html[data-theme="light"] .home-game-open:focus-visible {
  color: var(--blue-2);
}

/* ============ Home section heading unification ============ */
.home-projects-head h2,
.home-games-head h2,
.home-hot-head h2,
.home-media-head h2,
.home-toys-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: 0;
}

.home-projects-copy {
  margin-top: 14px;
}

.home-projects-head p,
.home-games-head p,
.home-hot-head p,
.home-media-head p,
.home-toys-head p {
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.home-games-head p,
.home-hot-head p,
.home-media-head p,
.home-toys-head p {
  margin: 14px 0 0;
}

.home-projects-head p {
  margin: 0;
}

@media (max-width: 1060px) {
  .games-post-stack,
  .home-games-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .game-card {
    grid-template-columns: 1fr;
  }

  .game-card .card-meta {
    grid-template-columns: 1fr;
  }

  .game-card-media {
    min-height: 160px;
  }

  .home-games-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-games-more,
  .games-steam-link {
    width: fit-content;
  }

  .games-platform-links {
    justify-content: flex-start;
  }
}
