/*
 * PerfCop docsite theme override.
 * Re-skins the Jekyll midnight theme to match the unreal-insights-copilot
 * website look and feel (dark blue surfaces, orange accent, Space Grotesk).
 */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --ink: #f4f6fb;
  --muted: #a6b7c7;
  --bg: #071423;
  --surface: #0b1b2c;
  --surface-soft: #0a1727;
  --panel: #071423;
  --accent: #eb8b21;
  --accent-dark: #c9761c;
  --accent-light: #f5a64a;
  --line: #16314b;
  --line-soft: #0f2640;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #0c1a2d 0%, #061322 50%, #05101e 100%);
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.65;
}

/* ---------- Header / top nav ---------- */
#header {
  z-index: 100;
  background: linear-gradient(180deg, rgba(11, 28, 45, 0.98) 0%, rgba(7, 19, 33, 0.98) 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  height: 60px;
}

#header nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  background: none;
  display: flex;
  align-items: center;
  height: 60px;
}

#header nav ul {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

#header nav ul li,
#header nav li {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  height: auto;
  line-height: normal;
  margin: 0;
  padding: 0;
  text-shadow: none;
  float: none;
}

#header nav ul li.downloads {
  margin-left: auto;
}

#header nav ul li a,
#header nav li a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  text-shadow: none;
  background: rgba(10, 23, 38, 0.6);
  box-shadow: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

#header nav ul li a:hover,
#header nav li a:hover {
  color: var(--ink);
  border-color: rgba(235, 139, 33, 0.6);
  background: rgba(235, 139, 33, 0.14);
  box-shadow: none;
}

#header nav ul li.downloads a,
#header nav li.downloads a {
  color: var(--accent);
  border-color: rgba(235, 139, 33, 0.55);
  background: rgba(235, 139, 33, 0.1);
}

#header nav ul li.downloads a:hover,
#header nav li.downloads a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- Layout ---------- */
.wrapper {
  width: auto;
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 24px 72px;
}

section {
  width: auto;
  max-width: none;
  float: none;
  padding: 0;
  margin: 0;
}

section #title {
  margin-top: 0;
}

/* ---------- Title / hero ---------- */
#title {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 32px;
}

#title h1 {
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

#title p {
  color: var(--muted);
  font-size: 16px;
}

#title hr {
  display: none;
}

#title + * {
  margin-top: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
  margin: 1.6em 0 0.6em;
}

h1 { font-size: 28px; }
h2 {
  font-size: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
h3 { font-size: 18px; }

p, li {
  color: #d5dfea;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

strong {
  color: var(--ink);
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 28px 0;
}

ul, ol {
  padding-left: 1.4em;
}

li {
  margin-bottom: 6px;
}

blockquote {
  border-left: 3px solid var(--accent);
  background: rgba(235, 139, 33, 0.06);
  color: var(--muted);
  margin: 18px 0;
  padding: 12px 18px;
  border-radius: 0 10px 10px 0;
}

/* ---------- Code ---------- */
code {
  font-family: "Consolas", "Monaco", monospace;
  background: rgba(235, 139, 33, 0.12);
  color: var(--accent-light);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

pre {
  background: #050d18;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  box-shadow: var(--shadow);
}

pre code {
  background: none;
  color: #d5dfea;
  padding: 0;
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-align: left;
}

th {
  background: rgba(14, 35, 56, 0.78);
  color: var(--ink);
  font-weight: 600;
}

td {
  color: #d5dfea;
}

img {
  max-width: 100%;
  border-radius: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .wrapper {
    padding: 28px 16px 56px;
  }

  #title h1 {
    font-size: 28px;
  }

  #header nav {
    padding: 0 16px;
  }
}
