:root {
  color-scheme: dark;
  --bg: #0a0b0a;
  --bg-2: #130707;
  --ink: #f4eee6;
  --muted: rgba(244, 238, 230, 0.66);
  --faint: rgba(244, 238, 230, 0.42);
  --line: rgba(244, 238, 230, 0.18);
  --line-soft: rgba(244, 238, 230, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(244, 238, 230, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 238, 230, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 78% 18%, rgba(164, 58, 53, 0.28), transparent 34rem),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-size: 36px 36px, 36px 36px, auto, auto;
  color: var(--ink);
  font-family: "IM Fell English", Georgia, serif;
  font-size: 16px;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 0, 0, 0.965), rgba(0, 0, 0, 0.965)),
    url("assets/odin-manuscript.png") center center / cover no-repeat;
  background-blend-mode: normal, luminosity;
  filter: blur(8px) saturate(0.78) contrast(0.9);
  transform: scale(1.035);
}

a {
  color: inherit;
  text-decoration: none;
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 10, 0.82);
  backdrop-filter: blur(18px);
}

.docs-brand,
.docs-topbar nav,
.top-actions {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
}

.docs-brand {
  padding: 0 24px;
  font-family: Cinzel, serif;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  gap: 12px;
}

.docs-brand img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.docs-topbar nav,
.top-actions {
  gap: 26px;
  padding: 0 24px;
  color: var(--muted);
  font-family: Cinzel, serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.top-actions {
  border-right: 0;
}

.docs-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  width: min(100% - 72px, 1920px);
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.docs-sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  height: calc(100vh - 76px);
  border-right: 1px solid var(--line);
  padding: 28px 22px;
  background: rgba(255, 255, 255, 0.012);
}

.language {
  margin-bottom: 28px;
  color: var(--faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.docs-sidebar nav {
  display: grid;
  gap: 13px;
}

.docs-sidebar a {
  color: var(--muted);
  font-size: 1.02rem;
}

.docs-sidebar a:hover {
  color: var(--ink);
}

.docs-content {
  max-width: 980px;
  padding: 58px clamp(24px, 5vw, 72px) 80px;
}

.doc-hero {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Cinzel, serif;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 5.8vw, 6.2rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.doc-hero p,
.doc-section p,
.doc-section li {
  color: var(--muted);
  font-size: clamp(1.04rem, 1.1vw, 1.18rem);
  line-height: 1.58;
}

.doc-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.doc-buttons a,
.details-link {
  border: 1px solid var(--line);
  padding: 10px 13px;
  color: var(--ink);
  font-family: Cinzel, serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.doc-buttons a:hover,
.link-grid a:hover {
  background: rgba(255, 255, 255, 0.045);
}

.doc-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.doc-section h2 {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  letter-spacing: -0.01em;
}

.caption {
  margin-bottom: 8px;
  color: var(--faint) !important;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem !important;
  font-weight: 500;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

pre {
  overflow-x: auto;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

code {
  font-family: "JetBrains Mono", monospace;
}

pre code {
  display: block;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 0.86rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.link-grid a {
  min-height: 106px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.link-grid a:nth-child(2n) {
  border-right: 0;
}

.link-grid a:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.link-grid b {
  display: block;
  margin-bottom: 7px;
  font-family: Cinzel, serif;
  font-size: 0.96rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.link-grid span {
  color: var(--muted);
  line-height: 1.52;
}

ul {
  padding-left: 1.2rem;
}

li + li {
  margin-top: 10px;
}

.docs-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: 34px;
}

.docs-footer h3 {
  margin-bottom: 12px;
  font-family: Cinzel, serif;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-footer a {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .docs-topbar,
  .docs-shell {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 1920px);
  }

  .docs-brand,
  .docs-topbar nav,
  .top-actions {
    min-height: 54px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .docs-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .docs-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-grid,
  .docs-footer {
    grid-template-columns: 1fr;
  }

  .link-grid a,
  .link-grid a:nth-child(2n),
  .link-grid a:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
