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

:root {
  --bg: #0b1118;
  --surface: #111b26;
  --surface-soft: #162231;
  --text: #e8f1f7;
  --muted: #9ab2c3;
  --line: #243446;
  --primary: #32b1d6;
  --accent: #ff9f5a;
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #3a5874 #0f1a26;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans Thai", "Space Grotesk", sans-serif;
  background: radial-gradient(circle at 0% 0%, #1a2230 0, #0b1118 42%, #0b1118 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
  flex: 1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 18px 30px -24px rgba(0, 0, 0, 0.7);
}

.card--highlight {
  background: linear-gradient(135deg, rgba(50, 177, 214, 0.2), rgba(255, 159, 90, 0.1));
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 60px -40px rgba(50, 177, 214, 0.9);
}

.highlight-text {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-block;
}

.relocated-term {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.05rem 0.35rem;
  margin: 0 0.15rem;
  display: inline-block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

a.button {
  display: inline-block;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  color: #041017;
  background: linear-gradient(120deg, var(--primary), #56c4e2);
}

a.button.alt {
  color: #251102;
  background: linear-gradient(120deg, var(--accent), #ffbf82);
}

pre {
  margin: 0;
  padding: 0.85rem;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid #2a3f55;
  background: #0a141e;
  color: #dff4ff;
}

code {
  display: inline;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Space Grotesk", monospace;
}

pre code {
  display: block;
}

/* simple syntax colors */
.token-keyword { color: #7fd0ff; }
.token-type { color: #f7c46c; }
.token-string { color: #9be27d; }
.token-number { color: #ff9f5a; }
.token-comment { color: #7b8ca3; font-style: italic; }
.token-variable { color: #6fc8ff; }
.token-function { color: #ffd86b; }

pre::-webkit-scrollbar,
code::-webkit-scrollbar,
body::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

pre::-webkit-scrollbar-track,
code::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #0f1a26;
}

pre::-webkit-scrollbar-thumb,
code::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3d9fbe, #2f6f9f);
  border-radius: 999px;
  border: 2px solid #0f1a26;
}

h2,
h3,
h4 {
  color: #f5fbff;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.9rem 0 1rem;
}

p {
  line-height: 1.55;
  color: var(--muted);
}
