:root {
  --bg: #0d0c0b;
  --bg-2: #151311;
  --bg-3: #1d1915;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(212, 180, 104, 0.18);
  --line-strong: rgba(212, 180, 104, 0.32);
  --text: #d8d2c8;
  --muted: #968c7d;
  --gold: #b89b5e;
  --gold-soft: rgba(184, 155, 94, 0.12);
  --ember: #8a4b2a;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
  --maxw: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top, rgba(184, 155, 94, 0.08), transparent 30%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.25)),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.58)),
    radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.58) 100%);
  z-index: 0;
}

#embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: linear-gradient(
    to bottom,
    rgba(13, 12, 11, 0.92),
    rgba(13, 12, 11, 0.68)
  );
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(212, 180, 104, 0.1);
}

.brand,
.nav a,
.button,
.archive-card {
  text-decoration: none;
}

.brand {
  color: var(--gold);
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

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

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 180ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.brand:hover,
.brand:focus-visible {
  color: var(--text);
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
}

.hero-inner {
  max-width: 860px;
}

.kicker {
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

h1,
.section h2,
.panel h2,
.card h3,
.boss-card h3 {
  font-family: "Cinzel", serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.9rem, 8vw, 5.9rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.subtitle {
  max-width: 760px;
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.9;
}

.subtitle strong {
  color: var(--text);
  font-weight: 600;
}

.hero-meta {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-meta span,
.tags span {
  border: 1px solid rgba(212, 180, 104, 0.16);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  color: #cfc3a8;
  font-size: 0.88rem;
}

.hero-actions {
  margin-top: 2rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.82rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible,
.archive-card:hover,
.archive-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(212, 180, 104, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.button.primary {
  background: linear-gradient(
    to bottom,
    rgba(184, 155, 94, 0.18),
    rgba(184, 155, 94, 0.08)
  );
}

.button.small {
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

.panel,
.section,
.card,
.boss-card,
.archive-card {
  border: 1px solid var(--line);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.015)
  );
  box-shadow: var(--shadow);
}

.intro-panel {
  border-radius: 22px;
  padding: 1.6rem;
  margin-top: -3.2rem;
  backdrop-filter: blur(4px);
}

.intro-panel h2,
.section h2 {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-panel p {
  margin: 0;
  line-height: 1.8;
}

.section {
  border-radius: 22px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-index {
  min-width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--gold);
  font-family: "Cinzel", serif;
  background: var(--gold-soft);
}

.card-grid {
  display: grid;
  gap: 1rem;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.boss-card,
.archive-card {
  border-radius: 18px;
  padding: 1.2rem;
}

.card p,
.boss-card p,
.boss-card li {
  color: var(--text);
  line-height: 1.75;
}

.label {
  display: inline-block;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.stat-card p,
.project-card p,
.quest-card p {
  margin: 0;
}

.boss-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 1rem;
}

.boss-card {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.018)
  );
}

.boss-card.featured {
  border-color: rgba(212, 180, 104, 0.3);
  background: linear-gradient(
    to bottom,
    rgba(184, 155, 94, 0.1),
    rgba(255, 255, 255, 0.02)
  );
}

.boss-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.boss-rank {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boss-card h3,
.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.28rem;
}

.boss-summary {
  color: #c9c2b6;
  margin: 0 0 0.9rem;
}

.boss-card ul {
  margin: 0 0 1.1rem 1rem;
  padding: 0;
}

.tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tags.compact {
  margin-bottom: 0.75rem;
  justify-content: flex-start;
}

.tags.compact span {
  font-size: 0.8rem;
  padding: 0.35rem 0.62rem;
}

.metric {
  margin-top: 0.8rem !important;
  color: #c8b78e !important;
  font-size: 0.94rem;
}

/* GitHub link for project cards */
.ghost-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0 0 1px;
  border: none;
  border-bottom: 1px solid rgba(212, 180, 104, 0.22);
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    color 180ms ease,
    border-color 180ms ease;
}

.ghost-btn:hover,
.ghost-btn:focus-visible {
  color: var(--gold);
  border-color: rgba(212, 180, 104, 0.5);
  background: none;
  transform: none;
}

.muted-card {
  opacity: 0.84;
}

.relic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.relic {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(212, 180, 104, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.archive-card {
  display: block;
  color: var(--text);
}

.archive-card strong {
  display: block;
  font-weight: 600;
}

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem 2rem;
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .boss-grid {
    grid-template-columns: 1fr;
  }

  .three-up,
  .two-up,
  .relic-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: relative;
    padding-top: 1.1rem;
  }

  .nav {
    gap: 0.75rem;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .intro-panel {
    margin-top: 0;
  }

  .three-up,
  .two-up,
  .relic-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .boss-top {
    flex-direction: column;
  }

  .tags {
    justify-content: flex-start;
  }
}
