/* Deliberately minimal. Styling comes after the site is live and working. */

:root {
  color-scheme: light dark;
}

html {
  overflow-x: hidden; /* required by the .hero full-bleed technique */
}

body {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  font: 1rem/1.6 system-ui, sans-serif;
  /* Long tokens (URLs, inline code) must wrap rather than widen the page. */
  overflow-wrap: break-word;
}

/* Scoped: a bare `header` selector would also match header.hero and turn the
   banner into a flex container, collapsing .hero-inner to its content width. */
.site-header {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 3rem;
}

.brand {
  font-weight: 600;
  text-decoration: none;
}

nav a {
  margin-right: 0.75rem;
}

/* --- Game post banner -------------------------------------------------- */

/* Full-bleed: escape the centred body column without a wrapper element.
   html has overflow-x hidden so 100vw can't induce a horizontal scrollbar. */
.hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -2rem;
  margin-bottom: 2.5rem;
  padding: 3.5rem 0 1.75rem;
  position: relative;
  isolation: isolate;
  color: #fff; /* fixed: text always sits on the darkened backdrop */
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(10, 12, 20, 0.65), rgba(10, 12, 20, 0.92)),
    var(--backdrop, none) center / cover no-repeat;
  background-color: #0a0c14; /* shows through when a game has no artwork */
}

/* Same max-width + padding + content-box as body, so the cover's left edge
   lines up exactly with the article text below the banner. */
.hero-inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: flex-end;
  gap: 1.25rem;
}

.hero-cover {
  flex: none;
  width: 11rem;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  min-width: 0;
}

.hero-meta h1 {
  margin: 0 0 0.4rem;
  font-size: 1.75rem;
  line-height: 1.15;
}

.hero-released {
  margin: 0;
  font-size: 0.9rem;
}

.hero-platforms {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

@media (max-width: 34rem) {
  .hero-inner {
    align-items: center;
    gap: 1rem;
  }

  .hero-cover {
    width: 7rem;
  }

  .hero-meta h1 {
    font-size: 1.3rem;
  }
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
}

.post-list time {
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

footer .sep {
  margin: 0 0.35rem;
  opacity: 0.4;
}

footer {
  clear: both; /* drop below a floated cover rather than beside it */
  margin-top: 4rem;
  font-size: 0.875rem;
  opacity: 0.6;
}

pre {
  overflow-x: auto;
  padding: 0.75rem;
  background: color-mix(in srgb, currentColor 8%, transparent);
  border-radius: 4px;
}
