:root {
  --bg: #07080c;
  --bg-raise: #12151c;
  --line: #2a303b;
  --text: #ece7dc;
  --muted: #9b958a;
  --accent: #7fd3c8;
  --dusk: #d7a15a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Liberation Serif", serif;
  --sans: "Segoe UI", "Liberation Sans", "Nimbus Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  background-color: var(--bg);
  background-image:
    linear-gradient(30deg, rgba(236, 231, 220, 0.035) 1px, transparent 1px),
    linear-gradient(150deg, rgba(236, 231, 220, 0.035) 1px, transparent 1px);
  background-size: 22px 38px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(127, 211, 200, 0.08), transparent 42%),
    linear-gradient(to bottom, transparent 0%, rgba(7, 8, 12, 0.2) 30%, var(--bg) 88%);
  z-index: 0;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #b7efe8; }

img { max-width: 100%; height: auto; }

.site {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 0 0.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand img { width: 54px; height: auto; display: block; }

.brand span {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.site-nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a.is-current {
  color: var(--text);
  background: rgba(236, 231, 220, 0.06);
}

.site-nav a.is-current { box-shadow: inset 0 0 0 1px var(--line); }

.search-form { display: flex; }

.search-form input {
  width: 9.5rem;
  border: 1px solid var(--line);
  background: rgba(7, 8, 12, 0.65);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
}

.search-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.kicker {
  margin: 0 0 0.4rem;
  color: var(--dusk);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.page-title {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.lede { color: var(--muted); font-size: 1.15rem; max-width: 38rem; }

.page-head .lede { margin: 0.85rem 0 0; }

.home-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 1.5rem;
}

.home-logo { width: 100%; height: auto; display: block; }

.hero-actions { display: flex; gap: 0.75rem; margin-top: 1.2rem; flex-wrap: wrap; }

.button {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  color: var(--text);
}

.button.primary { background: var(--accent); color: #08211e; border-color: transparent; font-weight: 650; }
.button.primary:hover { color: #08211e; background: #b7efe8; }

.section { padding: 1.2rem 0 0.4rem; }

.section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.8rem;
  margin: 0 0 0.9rem;
}

.page-head + .game-grid { margin-bottom: 1.4rem; }

.game-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: rgba(18, 21, 28, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  min-height: 100%;
}

.card:hover { border-color: #445058; color: inherit; }

.card-art {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #05060a;
  display: block;
  width: 100%;
}

.card-art.contain { object-fit: contain; padding: 1.5rem; background: radial-gradient(circle at 50% 40%, #241433, #07080c 70%); }
.card-art.right { object-position: 78% center; }

.stack { max-width: 52rem; padding-bottom: 2rem; }

.card-body { padding: 0.95rem 1rem 1.1rem; }

.card h3 { margin: 0 0 0.35rem; font-size: 1.15rem; font-family: var(--serif); font-weight: 500; }

.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.news-list { display: grid; gap: 0.8rem; }

.news-item {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(18, 21, 28, 0.8);
  color: inherit;
  text-decoration: none;
}

.news-item:hover { border-color: #445058; color: inherit; }

.news-item img { width: 100%; height: 104px; object-fit: cover; border-radius: 10px; background: #05060a; }

.news-item h3 { margin: 0 0 0.2rem; font-size: 1.15rem; }
.meta { color: var(--muted); font-size: 0.88rem; }

.page-head { padding: 2rem 0 1rem; }
.page-head .meta { margin: 0.7rem 0 0; }
.page-title { font-size: clamp(2rem, 4vw, 3.2rem); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 46rem) 16rem;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 3rem;
}

.prose { font-size: 1.05rem; }
.prose h2, .prose h3 { font-family: var(--serif); font-weight: 500; line-height: 1.25; }
.prose img { border-radius: 12px; margin: 0.4rem 0.5rem 0.4rem 0; }
.prose .alignright { float: right; margin: 0 0 0.8rem 1rem; }
.prose a[href$=".zip"],
.prose a[href$=".7z"],
.prose a[href$=".love"],
.prose a[href$=".gz"],
.prose a[href$=".bz2"],
.prose a[href$=".xz"],
.prose a[href$=".deb"],
.prose a[href$=".rpm"],
.prose a[href$=".exe"],
.prose a.downloadlink {
  display: inline-block;
  margin: 0.15rem 0.35rem 0.15rem 0;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  text-indent: 0;
  background: rgba(127, 211, 200, 0.06);
}

.prose a.latest-build {
  background: var(--accent);
  color: #08211e;
  border-color: transparent;
  font-weight: 650;
  text-decoration: none;
  text-indent: 0;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
}

.prose a.latest-build::after {
  content: "Latest";
  margin-left: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose a.latest-build:hover { color: #08211e; background: #b7efe8; }

.side-card {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(18, 21, 28, 0.9);
}

.side-card h2 { margin: 0 0 0.5rem; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-family: var(--sans); }
.side-card ul { list-style: none; margin: 0; padding: 0; }
.side-card li { margin: 0.35rem 0; }
.side-card a { color: var(--text); text-decoration: none; }
.side-card a:hover { color: var(--accent); }

.comments { margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.comments h2 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; }
.comment { padding: 0.8rem 0; border-bottom: 1px solid rgba(42, 48, 59, 0.7); }
.comment cite { font-style: normal; font-weight: 650; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1.2rem 0; }
.pager a { color: var(--text); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.7rem 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.4rem 0 2rem;
  margin-top: 2rem;
  font-size: 0.92rem;
}

.site-footer p { margin: 0; }

.social { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.social a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
}

.social a:hover { color: var(--text); border-color: #445058; }

@media (max-width: 800px) {
  .site-header { flex-wrap: wrap; }
  .search-form { width: 100%; }
  .search-form input { width: 100%; }
  .home-hero { grid-template-columns: 1fr; padding-top: 1.4rem; }
  .home-logo { width: min(220px, 60%); }
  .layout { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .news-item img { height: 180px; }
  .side-card { position: static; }
}
