*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #c9a84c;
  --gold-dark: #a07830;
  --bg: #0e0c08;
  --bg-card: #1a1610;
  --bg-card2: #211d14;
  --text: #e8dfc8;
  --text-muted: #9a8f78;
  --border: #3a3020;
  --accent: #d4a843;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Navigation ── */
header {
  background: rgba(14, 12, 8, 0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 60px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--accent);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

nav ul a {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  text-decoration: none;
}

nav ul a:hover,
nav ul a.active {
  color: var(--gold);
}

/* ── Hero ── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.hero-content .subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.hero-content .description {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  color: var(--text);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hero-image img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.notice {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 3px;
  font-size: 0.95rem;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: #0e0c08;
  font-weight: bold;
}

.btn-primary:hover {
  background: var(--accent);
  color: #0e0c08;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-secondary:hover {
  background: rgba(201,168,76,0.1);
  text-decoration: none;
}

/* ── Features ── */
.features {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 100%;
}

.feature {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
}

.feature:last-child {
  border-right: none;
}

.feature h3 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.feature p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Community ── */
.community {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.community h2 {
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 2rem;
}

.community-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.community-btn {
  display: inline-block;
  padding: 0.65rem 1.8rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  background: var(--bg-card);
  font-size: 0.95rem;
  transition: all 0.2s;
  text-decoration: none;
}

.community-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  text-decoration: none;
}

/* ── Footer ── */
footer {
  margin-top: auto;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 2;
}

footer a {
  color: var(--text-muted);
}

footer a:hover {
  color: var(--gold);
}

/* ── Contributors page ── */
.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

.contributor {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  transition: all 0.2s;
}

.contributor:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.contributor h3 {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.commit-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  font-family: monospace;
}

.contributor p:last-child {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.contributors-list {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-top: 1rem;
}

.contributor.inactive {
  opacity: 0.6;
}

.inactive-badge {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-top: 0.5rem;
  font-family: monospace;
}

/* ── Inner pages ── */
.page-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  flex: 1;
}

.page-content h1 {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── About page ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

.about-text h2 {
  font-size: 1.3rem;
  color: var(--gold);
  margin: 2rem 0 0.75rem;
}

.about-text h2:first-child {
  margin-top: 0;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text);
}

.about-text ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.about-text ul li {
  margin-bottom: 0.4rem;
}

.about-image img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── Gallery ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.gallery a:hover img {
  transform: scale(1.04);
}

/* ── Downloads ── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
  text-align: center;
}

.download-card h2 {
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.download-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  min-height: 2.5rem;
}

.platform-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--gold);
}

.platform-icon svg {
  width: 100%;
  height: 100%;
}

.download-alt {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem;
}

.download-alt h2 {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.download-alt ul {
  padding-left: 1.5rem;
  color: var(--text);
}

.download-alt li {
  margin-bottom: 0.5rem;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.3rem;
  color: var(--gold);
  margin: 2rem 0 0.75rem;
}

.contact-info h2:first-child {
  margin-top: 0;
}

.contact-info ul {
  padding-left: 1.5rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.contact-info li {
  margin-bottom: 0.5rem;
}

.contact-screenshot img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── Devblog ── */
.post {
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.post:last-child {
  border-bottom: none;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.post h2 {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.post p {
  margin-bottom: 0.75rem;
  color: var(--text);
}

.post ul {
  padding-left: 1.5rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.post ul li {
  margin-bottom: 0.35rem;
}

.post code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88em;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 2px;
  padding: 0.1em 0.35em;
  color: var(--gold);
}

.post-image {
  width: 100%;
  max-width: 600px;
  border-radius: 4px;
  border: 1px solid var(--border);
  margin-top: 1rem;
}

/* ── Post page ── */
.post-page h2 {
  font-size: 1.4rem;
  color: var(--gold);
  margin: 2rem 0 0.75rem;
}

.post-page h3 {
  font-size: 1.1rem;
  color: var(--accent);
  margin: 1.5rem 0 0.5rem;
}

.post-page p {
  margin-bottom: 1rem;
}

.post-page ul,
.post-page ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.post-page li {
  margin-bottom: 0.4rem;
}

.post-page pre {
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 3px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.85em;
  line-height: 1.6;
}

.post-page code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88em;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 2px;
  padding: 0.1em 0.35em;
  color: var(--gold);
}

.post-page pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--text);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  gap: 1rem;
}

.post-nav a {
  color: var(--text-muted);
}

.post-nav a:hover {
  color: var(--gold);
}

.post h2 a {
  color: var(--gold);
  text-decoration: none;
}

.post h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.post .read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.post .read-more:hover {
  color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem;
    gap: 2rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-image {
    order: -1;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .feature:last-child {
    border-bottom: none;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-image,
  .contact-screenshot {
    order: -1;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  nav {
    padding: 0 1rem;
  }

  nav ul {
    gap: 1rem;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .page-content {
    padding: 2rem 1rem 3rem;
  }
}
