:root {
  --bg: #080908;
  --bg-2: #12110d;
  --paper: rgba(25, 22, 16, 0.88);
  --paper-strong: rgba(39, 32, 20, 0.94);
  --ink: #f5e8bd;
  --muted: #c6b98d;
  --line: rgba(225, 183, 91, 0.28);
  --accent: #f0b44b;
  --accent-strong: #ffe08a;
  --green: #8fe06b;
  --red: #d26042;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(8, 9, 8, 0.72), rgba(8, 9, 8, 0.9)),
    radial-gradient(circle at 18% 8%, rgba(204, 88, 39, 0.28), transparent 26rem),
    radial-gradient(circle at 82% 18%, rgba(107, 195, 84, 0.13), transparent 28rem),
    url('/assets/images/noita-bg.jpg') center top / cover fixed,
    var(--bg);
  line-height: 1.65;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.95), transparent 82%);
}

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

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #fff3bc;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 11, 10, 0.88);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(240, 180, 75, 0.28));
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.brand small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-family: Arial, sans-serif;
  font-size: 0.94rem;
}

.main-nav a {
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
  border-color: rgba(240, 180, 75, 0.32);
  background: rgba(240, 180, 75, 0.13);
  color: var(--accent-strong);
}

.hero {
  padding: 78px 0 58px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 42px;
  align-items: center;
}

.hero-copy h1,
.article-header h1,
.not-found h1 {
  margin: 0;
  max-width: 880px;
  color: #fff0b3;
  font-size: clamp(2.45rem, 5.3vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-shadow: 0 0 24px rgba(240, 180, 75, 0.2), 0 5px 28px rgba(0, 0, 0, 0.65);
}

.lead {
  color: var(--muted);
  font-size: 1.22rem;
  max-width: 68ch;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: Arial, sans-serif;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(143, 224, 107, 0.28);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 224, 138, 0.8);
  border-radius: 999px;
  background: linear-gradient(180deg, #d98c34, #8c3c20);
  color: #fff8cf;
  box-shadow: 0 0 18px rgba(240, 180, 75, 0.24), inset 0 1px 0 rgba(255,255,255,0.2);
  font-family: Arial, sans-serif;
  font-weight: 800;
  text-decoration: none;
}

.button:hover {
  background: linear-gradient(180deg, #eaa34d, #a44725);
  color: #fff8cf;
}

.button.secondary {
  background: rgba(14, 13, 10, 0.6);
  color: var(--accent-strong);
}

.button.secondary:hover {
  background: rgba(240, 180, 75, 0.14);
}

.rune-row,
.article-icons,
.inline-art,
.item-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.rune-row {
  margin-top: 24px;
}

.rune-row img,
.article-icons img,
.inline-art img,
.item-strip img {
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(255, 224, 138, 0.25));
}

.rune-row img,
.article-icons img {
  width: 48px;
  height: 48px;
}

.rune-row img:nth-child(2),
.article-icons img:nth-child(2),
.inline-art img:nth-child(2),
.item-strip img:first-child {
  width: 112px;
}

.inline-art,
.item-strip {
  margin-top: 18px;
}

.inline-art img,
.item-strip img {
  width: 42px;
  height: 42px;
}

.hero-card,
.wide-figure,
.split-section figure,
.meme-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.noita-frame {
  position: relative;
}

.noita-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 165, 0.14), inset 0 -80px 120px rgba(0, 0, 0, 0.25);
}

.hero-card img,
.wide-figure img,
.split-section figure img,
.meme-card img {
  width: 100%;
}

figcaption {
  padding: 12px 16px 14px;
  color: var(--muted);
  border-top: 1px solid rgba(225, 183, 91, 0.18);
  background: rgba(9, 9, 7, 0.5);
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}

.content-section,
.note-panel,
.article-layout,
.not-found {
  padding: 50px 0;
}

.section-heading h2,
.article-section h2,
.note-panel h2 {
  margin: 0 0 12px;
  color: #ffe8a0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.catalog-card,
.note-panel,
.article-section,
.article-footer {
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 224, 138, 0.055), transparent 38%),
    var(--paper);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.catalog-list {
  display: grid;
  gap: 24px;
}

.catalog-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  padding: 28px;
}

.catalog-card h3 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.catalog-card p,
.note-panel p,
.article-section p,
.article-footer p {
  color: var(--muted);
}

.meta-list {
  margin: 0;
  display: grid;
  gap: 14px;
  font-family: Arial, sans-serif;
}

.meta-list div {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.meta-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-list dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.visual-panel {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 56px;
}

.visual-panel .note-panel {
  margin: 0;
}

.note-panel {
  padding: 28px;
}

.article-layout {
  max-width: 940px;
}

.article-header {
  padding: 34px 0 34px;
}

.article-icons {
  margin-top: 20px;
}

.article-section {
  margin: 28px 0;
  padding: 30px;
}

.article-section p:last-child,
.article-footer p:last-child,
.note-panel p:last-child {
  margin-bottom: 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: 26px;
  align-items: start;
}

.wide-figure {
  margin: 28px 0;
}

.checklist ul,
.sources-list ol,
.sources-list ul {
  padding-left: 1.3rem;
}

.checklist li,
.sources-list li {
  margin: 0 0 12px;
  color: var(--muted);
}

.sources-list li strong,
.sources-list li span,
.sources-list li a {
  display: block;
}

.sources-list li strong {
  color: var(--ink);
}

code {
  padding: 0.1em 0.3em;
  border: 1px solid rgba(225, 183, 91, 0.2);
  border-radius: 6px;
  background: rgba(255, 224, 138, 0.11);
  color: #ffe08a;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.92em;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 10px;
  padding: 26px 30px;
}

.compact-page {
  max-width: 900px;
}

.not-found {
  min-height: 58vh;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(8, 9, 8, 0.92);
  color: var(--muted);
  font-family: Arial, sans-serif;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-size: 0.9rem;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 820px) {
  body {
    background-attachment: scroll;
  }

  .header-inner,
  .footer-inner,
  .article-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero-grid,
  .catalog-card,
  .split-section,
  .visual-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 42px;
  }

  .article-section,
  .catalog-card,
  .note-panel {
    padding: 22px;
  }
}
