:root {
  --bg: #ffff;
  --fg: #1a1a1a;
  --muted: #5a5a5a;
  --accent: #cc45c8;
  --border: #e5e5e5;
  --card: #fafafa;
  --maxw: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --fg: #e8e8e8;
    --muted: #a0a0a0;
    --accent: #cc45c8;
    --border: #2a2d34;
    --card: #1c1f25;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
  line-height: 1.6;
  font-size: 18px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

a {
  color: var(--accent);
}

a:hover {
  text-decoration: none;
}

/* Header / nav */
.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.25rem;
}

/* Drop the nav tabs to the bottom so they line up with the logo's baseline. */
.site-header nav {
  padding-bottom: 0.35rem;
}

/* Full-width colored banner behind the header. The bar spans the viewport;
   the inner .site-header keeps its content in the centered column. */
.site-header-bar {
  background: var(--accent);
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
}

/* Hand-drawn logo standing in for the brand text. White-backed art, so a
   little rounding makes it read as an intentional panel on the colored bar. */
.brand-logo {
  display: block;
  height: 96px;
  width: auto;
  border-radius: 0.5rem;
}

.site-header nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: #fff;
}

.site-header nav a[aria-current="page"] {
  font-weight: 600;
}

/* Main content */
main {
  padding-block: 2.5rem;
  min-height: 60vh;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-top: 0;
}

/* First paragraph after a page title reads as an intro/lede. */
main h1 + p,
.lede {
  font-size: 1.15rem;
  color: var(--muted);
}

/* Section + sub-section headings in Markdown content. */
main h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

main h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.25rem;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

.button:hover {
  opacity: 0.9;
}

/* Screenshots */
main picture {
  display: block;
}

/* Image beside text (e.g. the About page). Photo column left, text right;
   stacks vertically on narrow screens. */
.media {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin: 1.5rem 0;
}

.media-figure {
  flex: 0 0 auto;
  width: 260px;
  max-width: 40%;
}

.media-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
}

/* Don't let the body text push the row taller with stray top/bottom margins. */
.media-body > :first-child {
  margin-top: 0;
}

.media-body > :last-child {
  margin-bottom: 0;
}

@media (max-width: 34rem) {
  .media {
    flex-direction: column;
  }

  .media-figure {
    width: 70%;
    max-width: 260px;
  }
}

/* Layout A: full-width image, text written below in Markdown. */
.shot-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
  margin: 0.5rem 0 0.25rem;
}

/* Layout B: full-width image with the title overlaid on it. */
.shot-overlay {
  position: relative;
  margin: 1.5rem 0 0.5rem;
  border-radius: 0.6rem;
  overflow: hidden;
}

.shot-overlay img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.shot-overlay figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3rem 1.25rem 1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
}

.shot-overlay .shot-title {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Role + collaborators, overlaid under the title. Casing is preserved as
   written (no forced uppercase) so deliberately lowercase credits stay so. */
.shot-overlay .shot-role {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
}

/* Game entry: image+overlay (title → role) → tagline lead → body. */
.game {
  margin-block: 3rem;
}

.game .shot-overlay {
  margin-bottom: 0.75rem;
}

.game-body {
  margin-top: 0.5rem;
}

/* Call-to-action button on a game's detail page. */
.game-cta {
  margin-top: 1.5rem;
}

/* First paragraph of the body reads as a tagline/lead. */
.game-body > p:first-child {
  font-size: 1.15rem;
  color: var(--fg);
  margin-top: 0.25rem;
}

/* Remaining paragraphs are the quieter reflection text. */
.game-body > p:not(:first-child) {
  color: var(--muted);
  font-size: 0.98rem;
}

/* When the screenshot links somewhere, signal it's clickable. */
.shot-overlay a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.shot-overlay a:hover img,
.shot-overlay a:focus-visible img {
  transform: scale(1.03);
}

.shot-overlay a:hover figcaption,
.shot-overlay a:focus-visible figcaption {
  text-decoration: underline;
}

/* News list */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.post-list time,
.post-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.post-back {
  margin-top: 2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}
